From a89f5c206c47ce4b93afbb27bd20a161ee709a68 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Tue, 17 Jun 2025 02:15:28 +0000 Subject: [PATCH] Update generated code --- .../autogenerated/Endpoints/Namespace.swift | 952 ++++- ...yDeclarations.POST.f559971.generated.swift | 84 + ...rationsById.DELETE.ec25d6c.generated.swift | 72 + ...clarationsById.GET.ec25d6c.generated.swift | 165 + ...arationsById.PATCH.ec25d6c.generated.swift | 95 + .../Actors/Actors.GET.9d36d64.generated.swift | 59 +- .../ActorsById.GET.a087f6b.generated.swift | 59 +- ...arationsById.PATCH.0098304.generated.swift | 12 + ...ibutionDomains.GET.b6eabc5.generated.swift | 131 + ...butionDomains.POST.b6eabc5.generated.swift | 84 + ...DomainsById.DELETE.c66a2b2.generated.swift | 72 + ...ionDomainsById.GET.c66a2b2.generated.swift | 133 + ...stributionKeys.GET.6c0e9f9.generated.swift | 149 + ...tributionKeys.POST.6c0e9f9.generated.swift | 84 + ...ionKeysById.DELETE.dc8a9c6.generated.swift | 72 + ...utionKeysById.GET.dc8a9c6.generated.swift} | 60 +- ...kageDeltasById.GET.a86a0ce.generated.swift | 137 + ...geVariantsById.GET.e1f8111.generated.swift | 137 + ...geVersionsById.GET.f08d676.generated.swift | 285 ++ ...ionsByIdDeltas.GET.f0620b2.generated.swift | 142 + ...ionshipsDeltas.GET.1fdccbd.generated.swift | 88 + ...nshipsVariants.GET.e5aa275.generated.swift | 88 + ...nsByIdVariants.GET.fd255e7.generated.swift | 142 + ...utionPackages.POST.b486bd0.generated.swift | 84 + ...onPackagesById.GET.e82a039.generated.swift | 223 ++ ...nshipsVersions.GET.c1c5426.generated.swift | 88 + ...esByIdVersions.GET.5cabac6.generated.swift | 362 ++ ...tInstancesById.GET.b2280c3.generated.swift | 133 + ...nshipsSegments.GET.9ec4c60.generated.swift | 88 + ...esByIdSegments.GET.fc03c78.generated.swift | 138 + ...eportRequests.POST.692f63c.generated.swift | 84 + ...equestsById.DELETE.48bb12e.generated.swift | 72 + ...tRequestsById.GET.48bb12e.generated.swift} | 141 +- ...onshipsReports.GET.5366b53.generated.swift | 88 + ...stsByIdReports.GET.905a517.generated.swift | 203 + ...rtSegmentsById.GET.1fe931b.generated.swift | 133 + ...icsReportsById.GET.98b3a99.generated.swift | 133 + ...sByIdInstances.GET.206c771.generated.swift | 195 + ...shipsInstances.GET.53dcf9e.generated.swift | 88 + .../AppCategories.GET.6ce4d98.generated.swift | 114 +- ...CategoriesById.GET.923d0d7.generated.swift | 73 +- ...riesByIdParent.GET.42da8d7.generated.swift | 45 +- ...ionshipsParent.GET.c2da707.generated.swift | 86 + ...sSubcategories.GET.74856fe.generated.swift | 88 + ...dSubcategories.GET.5d7305e.generated.swift | 45 +- ...erienceImages.POST.f5969cf.generated.swift | 12 + ...enceImagesById.GET.208696c.generated.swift | 69 +- ...ceImagesById.PATCH.208696c.generated.swift | 12 + ...edExperiences.POST.4d9c6bc.generated.swift | 12 + ...xperiencesById.GET.79eae35.generated.swift | 146 +- ...eriencesById.PATCH.79eae35.generated.swift | 12 + ...ReviewDetails.POST.4346ef3.generated.swift | 12 + ...iewDetailsById.GET.8072c9a.generated.swift | 59 +- ...wDetailsById.PATCH.8072c9a.generated.swift | 12 + ...Localizations.POST.8d44541.generated.swift | 12 + ...zationsById.DELETE.da71bfb.generated.swift | 12 +- ...alizationsById.GET.da71bfb.generated.swift | 146 +- ...izationsById.PATCH.da71bfb.generated.swift | 12 + ...lipHeaderImage.GET.f5dae9f.generated.swift | 139 +- ...lipHeaderImage.GET.1e22c61.generated.swift | 86 + ...ltExperiences.POST.d79dbcf.generated.swift | 12 + ...reReviewDetail.GET.778274a.generated.swift | 113 +- ...eLocalizations.GET.7281113.generated.swift | 202 +- ...riencesById.DELETE.ce80d07.generated.swift | 12 +- ...xperiencesById.GET.ce80d07.generated.swift | 352 +- ...eriencesById.PATCH.ce80d07.generated.swift | 12 + ...reReviewDetail.GET.e8897c5.generated.swift | 86 + ...eLocalizations.GET.561b55b.generated.swift | 88 + ...ppStoreVersion.GET.5f5225a.generated.swift | 8 + ...StoreVersion.PATCH.5f5225a.generated.swift | 14 +- ...ppStoreVersion.GET.1dd4f03.generated.swift | 1522 ++++---- ...pHeaderImages.POST.11898e8.generated.swift | 12 + ...rImagesById.DELETE.324a2cc.generated.swift | 12 +- ...aderImagesById.GET.324a2cc.generated.swift | 97 +- ...erImagesById.PATCH.324a2cc.generated.swift | 12 + ...cedExperiences.GET.828ed30.generated.swift | 389 +- ...ultExperiences.GET.19800d5.generated.swift | 394 +- .../AppClipsById.GET.b5637d8.generated.swift | 188 +- ...cedExperiences.GET.c2d4b34.generated.swift | 88 + ...ultExperiences.GET.03b45ad.generated.swift | 88 + ...Localizations.POST.5483ae2.generated.swift | 12 + ...zationsById.DELETE.8c524c6.generated.swift | 12 +- ...alizationsById.GET.8c524c6.generated.swift | 198 +- ...izationsById.PATCH.8c524c6.generated.swift | 12 + ...AppPreviewSets.GET.8d6d7bd.generated.swift | 504 +-- ...ScreenshotSets.GET.489daf1.generated.swift | 605 +-- ...AppPreviewSets.GET.2d76aba.generated.swift | 88 + ...ScreenshotSets.GET.eb4c40c.generated.swift | 88 + ...tPageVersions.POST.bbb910c.generated.swift | 12 + ...eLocalizations.GET.98cd9de.generated.swift | 242 +- ...geVersionsById.GET.0840b44.generated.swift | 133 +- ...VersionsById.PATCH.0840b44.generated.swift | 95 + ...eLocalizations.GET.f65ae9f.generated.swift | 88 + ...mProductPages.POST.707e21d.generated.swift | 12 + ...ctPageVersions.GET.03c24a8.generated.swift | 262 +- ...ctPagesById.DELETE.fd7ab83.generated.swift | 12 +- ...oductPagesById.GET.fd7ab83.generated.swift | 139 +- ...uctPagesById.PATCH.fd7ab83.generated.swift | 12 + ...ctPageVersions.GET.59c6a85.generated.swift | 88 + ...tionDocuments.POST.7e9619f.generated.swift | 12 + ...nDocumentsById.GET.73613c9.generated.swift | 79 +- ...ocumentsById.PATCH.73613c9.generated.swift | 12 + ...onDeclarations.GET.dc4b248.generated.swift | 636 ++-- ...nDeclarations.POST.dc4b248.generated.swift | 84 + ...rationsByIdApp.GET.2323707.generated.swift | 357 +- ...rationDocument.GET.edf2ed6.generated.swift | 79 +- ...clarationsById.GET.2657e05.generated.swift | 597 +-- ...lationshipsApp.GET.fb7cd83.generated.swift | 87 + ...rationDocument.GET.626b24d.generated.swift | 86 + ...onshipsBuilds.POST.6eef119.generated.swift | 14 +- ...Localizations.POST.6091753.generated.swift | 12 + ...zationsById.DELETE.756638b.generated.swift | 12 +- ...alizationsById.GET.756638b.generated.swift | 273 +- ...izationsById.PATCH.756638b.generated.swift | 12 + ...entScreenshots.GET.47c3a0e.generated.swift | 169 +- ...ventVideoClips.GET.891b5ab.generated.swift | 184 +- ...entScreenshots.GET.f37c852.generated.swift | 88 + ...ventVideoClips.GET.5a78ae1.generated.swift | 88 + ...ntScreenshots.POST.e315a5e.generated.swift | 12 + ...enshotsById.DELETE.468aec9.generated.swift | 12 +- ...creenshotsById.GET.468aec9.generated.swift | 104 +- ...eenshotsById.PATCH.468aec9.generated.swift | 12 + ...entVideoClips.POST.da99af1.generated.swift | 12 + ...eoClipsById.DELETE.ed0e879.generated.swift | 12 +- ...VideoClipsById.GET.ed0e879.generated.swift | 119 +- ...deoClipsById.PATCH.ed0e879.generated.swift | 12 + .../AppEvents.POST.bc3723c.generated.swift | 12 + ...pEventsById.DELETE.d4ad439.generated.swift | 12 +- .../AppEventsById.GET.d4ad439.generated.swift | 190 +- ...ppEventsById.PATCH.d4ad439.generated.swift | 12 + ...dLocalizations.GET.59e9e3e.generated.swift | 369 +- ...sLocalizations.GET.963e26a.generated.swift | 88 + ...Localizations.POST.8a04fdc.generated.swift | 12 + ...zationsById.DELETE.0b83534.generated.swift | 12 +- ...alizationsById.GET.0b83534.generated.swift | 94 +- ...izationsById.PATCH.0b83534.generated.swift | 12 + ...ingDeclaration.GET.1dcaca2.generated.swift | 143 +- ...oLocalizations.GET.3d8ecb5.generated.swift | 224 +- .../AppInfosById.GET.f5390de.generated.swift | 452 ++- ...AppInfosById.PATCH.f5390de.generated.swift | 12 + ...rimaryCategory.GET.04e5301.generated.swift | 73 +- ...SubcategoryOne.GET.da6e89b.generated.swift | 73 +- ...SubcategoryTwo.GET.7dd937c.generated.swift | 73 +- ...ingDeclaration.GET.3bee647.generated.swift | 86 + ...oLocalizations.GET.df39862.generated.swift | 88 + ...rimaryCategory.GET.37f3439.generated.swift | 86 + ...SubcategoryOne.GET.fdef18f.generated.swift | 86 + ...SubcategoryTwo.GET.9f64d06.generated.swift | 86 + ...ondaryCategory.GET.05de6d7.generated.swift | 86 + ...SubcategoryOne.GET.280da7b.generated.swift | 86 + ...SubcategoryTwo.GET.31c4a44.generated.swift | 86 + ...ondaryCategory.GET.f94b3ff.generated.swift | 73 +- ...SubcategoryOne.GET.28e28b6.generated.swift | 73 +- ...SubcategoryTwo.GET.4c3495c.generated.swift | 73 +- ...ppPreviewSets.POST.704590c.generated.swift | 12 + ...iewSetsById.DELETE.fc798bf.generated.swift | 12 +- ...reviewSetsById.GET.fc798bf.generated.swift | 200 +- ...yIdAppPreviews.GET.a3d2673.generated.swift | 177 +- ...ipsAppPreviews.GET.7ca8051.generated.swift | 8 + ...sAppPreviews.PATCH.7ca8051.generated.swift | 14 +- .../AppPreviews.POST.177bb39.generated.swift | 12 + ...reviewsById.DELETE.9a43a28.generated.swift | 12 +- ...ppPreviewsById.GET.9a43a28.generated.swift | 126 +- ...PreviewsById.PATCH.9a43a28.generated.swift | 12 + ...riceSchedules.POST.fa8f58f.generated.swift | 12 + ...eSchedulesById.GET.de4a989.generated.swift | 168 +- ...utomaticPrices.GET.e73fde7.generated.swift | 159 +- ...dBaseTerritory.GET.fd833f1.generated.swift | 29 +- ...IdManualPrices.GET.ca8c204.generated.swift | 159 +- ...utomaticPrices.GET.5bfe9c0.generated.swift | 88 + ...sBaseTerritory.GET.4c6bf42.generated.swift | 86 + ...psManualPrices.GET.0d2a1d6.generated.swift | 88 + .../AppPriceTiers.GET.73f69af.generated.swift | 233 -- ...creenshotSets.POST.31b308a.generated.swift | 12 + ...hotSetsById.DELETE.0b8968b.generated.swift | 12 +- ...enshotSetsById.GET.0b8968b.generated.swift | 185 +- ...AppScreenshots.GET.e7ccee6.generated.swift | 162 +- ...AppScreenshots.GET.a264720.generated.swift | 8 + ...pScreenshots.PATCH.a264720.generated.swift | 14 +- ...ppScreenshots.POST.2f0287f.generated.swift | 12 + ...enshotsById.DELETE.1a453d6.generated.swift | 12 +- ...creenshotsById.GET.1a453d6.generated.swift | 111 +- ...eenshotsById.PATCH.1a453d6.generated.swift | 12 + ...ewAttachments.POST.c08e869.generated.swift | 12 + ...chmentsById.DELETE.f1889f3.generated.swift | 12 +- ...ttachmentsById.GET.f1889f3.generated.swift | 90 +- ...achmentsById.PATCH.f1889f3.generated.swift | 12 + ...ReviewDetails.POST.e9d2b0b.generated.swift | 12 + ...iewAttachments.GET.5161e3c.generated.swift | 176 +- ...iewDetailsById.GET.680b6d4.generated.swift | 183 +- ...wDetailsById.PATCH.680b6d4.generated.swift | 12 + ...iewAttachments.GET.49653b4.generated.swift | 88 + ...Localizations.POST.733fb9f.generated.swift | 12 + ...AppPreviewSets.GET.7672523.generated.swift | 504 +-- ...ScreenshotSets.GET.52e9ae2.generated.swift | 605 +-- ...zationsById.DELETE.fa4aca6.generated.swift | 12 +- ...alizationsById.GET.fa4aca6.generated.swift | 191 +- ...AppPreviewSets.GET.f714c7c.generated.swift | 88 + ...ScreenshotSets.GET.04df64b.generated.swift | 88 + ...entTreatments.POST.7683017.generated.swift | 12 + ...tLocalizations.GET.368e9bf.generated.swift | 252 +- ...atmentsById.DELETE.5d1c48f.generated.swift | 12 +- ...TreatmentsById.GET.5d1c48f.generated.swift | 150 +- ...eatmentsById.PATCH.5d1c48f.generated.swift | 12 + ...tLocalizations.GET.0ef2c13.generated.swift | 88 + ...onExperiments.POST.3804a5f.generated.swift | 12 + ...mentTreatments.GET.7c47f84.generated.swift | 253 +- ...rimentsById.DELETE.1b9917e.generated.swift | 12 +- ...xperimentsById.GET.1b9917e.generated.swift | 176 +- ...erimentsById.PATCH.1b9917e.generated.swift | 12 + ...mentTreatments.GET.5ffc3b8.generated.swift | 89 + ...Localizations.POST.ea9eac7.generated.swift | 12 + ...AppPreviewSets.GET.9dc3d45.generated.swift | 504 +-- ...ScreenshotSets.GET.468d156.generated.swift | 605 +-- ...zationsById.DELETE.90f82c6.generated.swift | 12 +- ...alizationsById.GET.90f82c6.generated.swift | 231 +- ...izationsById.PATCH.90f82c6.generated.swift | 12 + ...AppPreviewSets.GET.829b8c5.generated.swift | 88 + ...ScreenshotSets.GET.fa3030d.generated.swift | 88 + ...hasedReleases.POST.8bf10f1.generated.swift | 12 + ...eleasesById.DELETE.1456d86.generated.swift | 12 +- ...ReleasesById.PATCH.1456d86.generated.swift | 12 + ...ionPromotions.POST.6463381.generated.swift | 12 + ...leaseRequests.POST.baf494e.generated.swift | 12 + ...issionsById.DELETE.6b3fe31.generated.swift | 12 +- ...StoreVersions.POST.ca5c114.generated.swift | 12 + ...ingDeclaration.GET.3f2b7d4.generated.swift | 143 +- ...ibutionPackage.GET.5412e83.generated.swift | 223 ++ ...aultExperience.GET.b1d9f94.generated.swift | 394 +- ...reReviewDetail.GET.929876e.generated.swift | 359 +- ...ionExperiments.GET.88c084b.generated.swift | 431 ++- ...nExperimentsV2.GET.0ffe859.generated.swift | 816 +++-- ...nLocalizations.GET.4eb815e.generated.swift | 392 +- ...nPhasedRelease.GET.9c7237a.generated.swift | 55 +- ...sionSubmission.GET.656f393.generated.swift | 226 +- ...ersionsById.DELETE.60ca87e.generated.swift | 12 +- ...reVersionsById.GET.60ca87e.generated.swift | 1202 +++--- ...VersionsById.PATCH.60ca87e.generated.swift | 12 + ...ustomerReviews.GET.17f4f93.generated.swift | 1820 +++++---- ...nterAppVersion.GET.08895ae.generated.swift | 303 ++ ...ingDeclaration.GET.342e198.generated.swift | 87 + ...ibutionPackage.GET.2a7d286.generated.swift | 86 + ...aultExperience.GET.2723b06.generated.swift | 8 + ...ltExperience.PATCH.2723b06.generated.swift | 14 +- ...reReviewDetail.GET.9a54c13.generated.swift | 86 + ...ionExperiments.GET.53f31c3.generated.swift | 89 + ...nExperimentsV2.GET.e1ee67f.generated.swift | 88 + ...nLocalizations.GET.864e6c5.generated.swift | 88 + ...nPhasedRelease.GET.7873803.generated.swift | 86 + ...sionSubmission.GET.e4c51a4.generated.swift | 87 + ...ustomerReviews.GET.6b84b95.generated.swift | 88 + ...nterAppVersion.GET.de8c5bf.generated.swift | 86 + ...ingAppCoverage.GET.0784fd6.generated.swift | 86 + ...ingAppCoverage.GET.9100bd7.generated.swift | 69 +- .../V1/Apps/Apps.GET.d3db1ee.generated.swift | 3261 +++++++++-------- ...tyDeclarations.GET.aeba05e.generated.swift | 263 ++ ...istributionKey.GET.570aa20.generated.swift | 125 + ...ReportRequests.GET.071994a.generated.swift | 265 ++ ...ppAvailability.GET.f0965f3.generated.swift | 361 -- ...vailabilityV2.GET.c915a14.generated.swift} | 137 +- ...psByIdAppClips.GET.4f64412.generated.swift | 480 +-- ...omProductPages.GET.e48b834.generated.swift | 487 +-- ...onDeclarations.GET.f75eb3f.generated.swift | 824 +++-- ...sByIdAppEvents.GET.873389c.generated.swift | 276 +- ...psByIdAppInfos.GET.dcf3ea6.generated.swift | 800 ++-- ...AppPricePoints.GET.a67db3c.generated.swift | 456 ++- ...pPriceSchedule.GET.2431519.generated.swift | 514 +-- ...nExperimentsV2.GET.839e482.generated.swift | 816 +++-- ...pStoreVersions.GET.5202570.generated.swift | 1739 +++++---- .../ById/AppsById.GET.37ceec0.generated.swift | 2740 +++++++------- .../AppsById.PATCH.37ceec0.generated.swift | 12 + ...ckgroundAssets.GET.77addb9.generated.swift | 240 ++ ...pLocalizations.GET.e032b03.generated.swift | 73 +- ...ppReviewDetail.GET.2b03a96.generated.swift | 87 +- ...ashSubmissions.GET.4ae2302.generated.swift | 562 +++ ...hotSubmissions.GET.aa35b42.generated.swift | 562 +++ ...ByIdBetaGroups.GET.14638c3.generated.swift | 134 +- ...censeAgreement.GET.e36781c.generated.swift | 38 +- ...AppsByIdBuilds.GET.8af2daf.generated.swift | 196 +- ...sByIdCiProduct.GET.53dedfe.generated.swift | 614 ++-- ...Summarizations.GET.cb8c5d4.generated.swift | 251 ++ ...ustomerReviews.GET.b2cd7c0.generated.swift | 1820 +++++---- ...censeAgreement.GET.f233e41.generated.swift | 45 +- ...meCenterDetail.GET.ec5e6bc.generated.swift | 1495 +++++--- ...nabledVersions.GET.69386a4.generated.swift | 502 +-- ...InAppPurchases.GET.8b65266.generated.swift | 537 +-- ...AppPurchasesV2.GET.a47247f.generated.swift | 780 ++-- ...ceSearchDetail.GET.5b4dcb3.generated.swift | 125 + ...taTesterUsages.GET.8807a65.generated.swift | 59 +- ...rfPowerMetrics.GET.7611cac.generated.swift | 94 +- ...eleaseVersions.GET.e73d506.generated.swift | 52 +- ...yIdPricePoints.GET.2176881.generated.swift | 408 --- ...AppsByIdPrices.GET.83c9fbe.generated.swift | 337 -- ...motedPurchases.GET.62d9cf2.generated.swift | 438 +-- ...tyDeclarations.GET.d342b13.generated.swift | 88 + ...istributionKey.GET.5ed9734.generated.swift | 86 + ...ReportRequests.GET.aa7d3d5.generated.swift | 88 + ...AvailabilityV2.GET.8425a03.generated.swift | 86 + ...nshipsAppClips.GET.c839455.generated.swift | 88 + ...omProductPages.GET.0ca67e7.generated.swift | 88 + ...onDeclarations.GET.108f6f5.generated.swift | 88 + ...shipsAppEvents.GET.7392ea0.generated.swift | 88 + ...nshipsAppInfos.GET.72825f0.generated.swift | 88 + ...AppPricePoints.GET.a9b6454.generated.swift | 88 + ...pPriceSchedule.GET.1363afb.generated.swift | 86 + ...nExperimentsV2.GET.e79927d.generated.swift | 88 + ...pStoreVersions.GET.1fab7ec.generated.swift | 88 + ...ckgroundAssets.GET.d7aa9c7.generated.swift | 88 + ...pLocalizations.GET.75f7850.generated.swift | 88 + ...ppReviewDetail.GET.e5ed9b6.generated.swift | 86 + ...ashSubmissions.GET.134af14.generated.swift | 88 + ...hotSubmissions.GET.90656f3.generated.swift | 88 + ...hipsBetaGroups.GET.d789466.generated.swift | 88 + ...censeAgreement.GET.1ff41ab.generated.swift | 86 + ...BetaTesters.DELETE.c177ff4.generated.swift | 18 +- ...ionshipsBuilds.GET.8b2cb78.generated.swift | 88 + ...shipsCiProduct.GET.73fede2.generated.swift | 86 + ...ustomerReviews.GET.578d23b.generated.swift | 88 + ...censeAgreement.GET.f8d197b.generated.swift | 86 + ...meCenterDetail.GET.a4aba4b.generated.swift | 86 + ...nabledVersions.GET.2179bd8.generated.swift | 89 + ...InAppPurchases.GET.0d73652.generated.swift | 89 + ...AppPurchasesV2.GET.2dccce1.generated.swift | 88 + ...ceSearchDetail.GET.45000c7.generated.swift | 86 + ...eleaseVersions.GET.66145ba.generated.swift | 88 + ...motedPurchases.GET.8bab01e.generated.swift | 8 + ...tedPurchases.PATCH.8bab01e.generated.swift | 14 +- ...iewSubmissions.GET.f4edf48.generated.swift | 88 + ...ionGracePeriod.GET.d6f12be.generated.swift | 86 + ...criptionGroups.GET.9fc614e.generated.swift | 88 + ...nshipsWebhooks.GET.cbc7253.generated.swift | 88 + ...iewSubmissions.GET.7dc5c8b.generated.swift | 883 +++-- ...ionGracePeriod.GET.4b68811.generated.swift | 52 +- ...criptionGroups.GET.3586939.generated.swift | 385 +- ...psByIdWebhooks.GET.d07bfb0.generated.swift | 390 ++ ...etUploadFiles.POST.c7fa164.generated.swift | 84 + ...ploadFilesById.GET.1ad97cd.generated.swift | 149 + ...oadFilesById.PATCH.1ad97cd.generated.swift | 95 + ...taReleasesById.GET.c763a11.generated.swift | 150 + ...AssetVersions.POST.24a1fc5.generated.swift | 84 + ...setUploadFiles.GET.85c8b34.generated.swift | 154 + ...tVersionsById.GET.95cd11c.generated.swift} | 139 +- ...setUploadFiles.GET.c3a234c.generated.swift | 88 + ...kgroundAssets.POST.177247a.generated.swift | 84 + ...oundAssetsById.GET.ab8fadb.generated.swift | 158 + ...nshipsVersions.GET.d06fc9a.generated.swift | 88 + ...tsByIdVersions.GET.c529844.generated.swift | 374 ++ ...Localizations.POST.2333b59.generated.swift | 12 + ...zationsById.DELETE.f68cb29.generated.swift | 12 +- ...izationsById.PATCH.f68cb29.generated.swift | 12 + ...ipInvocations.POST.2056a5d.generated.swift | 12 + ...cationsById.DELETE.de3257b.generated.swift | 12 +- ...nvocationsById.GET.de3257b.generated.swift | 62 +- ...ocationsById.PATCH.de3257b.generated.swift | 12 + ...pLocalizations.GET.a08bdc9.generated.swift | 442 ++- ...Localizations.POST.a08bdc9.generated.swift | 12 + ...zationsByIdApp.GET.8283110.generated.swift | 356 +- ...zationsById.DELETE.59c6c03.generated.swift | 12 +- ...alizationsById.GET.59c6c03.generated.swift | 442 ++- ...izationsById.PATCH.59c6c03.generated.swift | 12 + ...lationshipsApp.GET.ec25861.generated.swift | 86 + ...pReviewDetails.GET.1e9828a.generated.swift | 456 ++- ...DetailsByIdApp.GET.4bf8d5e.generated.swift | 356 +- ...iewDetailsById.GET.0f84acd.generated.swift | 456 ++- ...wDetailsById.PATCH.0f84acd.generated.swift | 12 + ...lationshipsApp.GET.ab28547.generated.swift | 86 + ...iewSubmissions.GET.c59a8bc.generated.swift | 294 +- ...ewSubmissions.POST.c59a8bc.generated.swift | 12 + ...ubmissionsById.GET.22fc8d8.generated.swift | 252 +- ...dLocalizations.GET.3bc0b25.generated.swift | 252 +- ...Localizations.POST.3bc0b25.generated.swift | 12 + ...zationsById.DELETE.5c519b7.generated.swift | 12 +- ...alizationsById.GET.5c519b7.generated.swift | 252 +- ...izationsById.PATCH.5c519b7.generated.swift | 12 + ...CrashLogsById.GET.ada3fbb.generated.swift} | 52 +- ...issionsById.DELETE.a2529fe.generated.swift | 72 + ...ubmissionsById.GET.a2529fe.generated.swift | 238 ++ ...sByIdCrashLog.GET.623e984.generated.swift} | 57 +- ...nshipsCrashLog.GET.b383ae2.generated.swift | 86 + ...issionsById.DELETE.93f1434.generated.swift | 72 + ...ubmissionsById.GET.93f1434.generated.swift | 238 ++ .../BetaGroups.GET.b27708f.generated.swift | 877 +++-- .../BetaGroups.POST.b27708f.generated.swift | 12 + ...aGroupsByIdApp.GET.691b38e.generated.swift | 356 +- ...aGroupsById.DELETE.4ae6ed3.generated.swift | 12 +- ...BetaGroupsById.GET.4ae6ed3.generated.swift | 805 ++-- ...taGroupsById.PATCH.4ae6ed3.generated.swift | 12 + ...itmentCriteria.GET.f997474.generated.swift | 129 + ...ibleBuildCheck.GET.66455fd.generated.swift | 125 + ...yIdBetaTesters.GET.6be2957.generated.swift | 77 +- ...oupsByIdBuilds.GET.4c37b79.generated.swift | 196 +- ...taTesterUsages.GET.feeeb4f.generated.swift | 59 +- ...blicLinkUsages.GET.1e8a460.generated.swift | 88 + ...lationshipsApp.GET.1257202.generated.swift | 86 + ...itmentCriteria.GET.b05174d.generated.swift | 86 + ...ibleBuildCheck.GET.39f8e93.generated.swift | 86 + ...BetaTesters.DELETE.35d7641.generated.swift | 14 +- ...ipsBetaTesters.GET.35d7641.generated.swift | 8 + ...psBetaTesters.POST.35d7641.generated.swift | 14 +- ...shipsBuilds.DELETE.b710f39.generated.swift | 14 +- ...ionshipsBuilds.GET.b710f39.generated.swift | 8 + ...onshipsBuilds.POST.b710f39.generated.swift | 14 +- ...enseAgreements.GET.0f8b4d4.generated.swift | 405 +- ...eementsByIdApp.GET.622a7ba.generated.swift | 356 +- ...AgreementsById.GET.9ff773a.generated.swift | 405 +- ...reementsById.PATCH.9ff773a.generated.swift | 12 + ...lationshipsApp.GET.cc76054.generated.swift | 86 + ...tmentCriteria.POST.35b0940.generated.swift | 84 + ...riteriaById.DELETE.9c589da.generated.swift | 72 + ...CriteriaById.PATCH.9c589da.generated.swift | 95 + ...iterionOptions.GET.4116836.generated.swift | 123 + ...erInvitations.POST.b019dde.generated.swift | 12 + .../BetaTesters.GET.51a9871.generated.swift | 900 +++-- .../BetaTesters.POST.51a9871.generated.swift | 12 + ...estersByIdApps.GET.9b53491.generated.swift | 356 +- ...ByIdBetaGroups.GET.cf12194.generated.swift | 134 +- ...TestersById.DELETE.6ca796e.generated.swift | 16 +- ...etaTestersById.GET.6ca796e.generated.swift | 774 ++-- ...tersByIdBuilds.GET.72cb8ed.generated.swift | 196 +- ...taTesterUsages.GET.33b9bfc.generated.swift | 40 +- ...onshipsApps.DELETE.bfe586b.generated.swift | 18 +- ...ationshipsApps.GET.bfe586b.generated.swift | 8 + ...sBetaGroups.DELETE.0ad1815.generated.swift | 14 +- ...hipsBetaGroups.GET.0ad1815.generated.swift | 8 + ...ipsBetaGroups.POST.0ad1815.generated.swift | 14 +- ...shipsBuilds.DELETE.63f4bb8.generated.swift | 14 +- ...ionshipsBuilds.GET.63f4bb8.generated.swift | 8 + ...onshipsBuilds.POST.63f4bb8.generated.swift | 14 +- ...ildBetaDetails.GET.32db9cd.generated.swift | 259 +- ...etaDetailsById.GET.0d487b2.generated.swift | 259 +- ...aDetailsById.PATCH.0d487b2.generated.swift | 12 + ...Notifications.POST.d0f3109.generated.swift | 12 + ...ainCacheStatus.GET.b82a4a8.generated.swift | 38 +- ...ainDebugStatus.GET.50671f8.generated.swift | 38 +- ...lipInvocations.GET.aab33f0.generated.swift | 95 +- ...undleFileSizes.GET.4cd28f0.generated.swift | 52 +- ...ainCacheStatus.GET.73cfe9b.generated.swift | 86 + ...ainDebugStatus.GET.a611700.generated.swift | 86 + ...lipInvocations.GET.04d4dbe.generated.swift | 88 + ...undleFileSizes.GET.767e45c.generated.swift | 88 + .../Builds/Builds.GET.b0093ba.generated.swift | 1488 ++++---- .../BuildsByIdApp.GET.138c119.generated.swift | 356 +- ...ionDeclaration.GET.97e52a7.generated.swift | 143 +- ...ppStoreVersion.GET.42e9c68.generated.swift | 1522 ++++---- ...viewSubmission.GET.f3df835.generated.swift | 45 +- ...dLocalizations.GET.441a524.generated.swift | 45 +- ...uildBetaDetail.GET.e3302fd.generated.swift | 198 +- .../BuildsById.GET.30b1941.generated.swift | 1253 ++++--- .../BuildsById.PATCH.30b1941.generated.swift | 12 + ...sticSignatures.GET.c65dda0.generated.swift | 86 +- ...uildsByIdIcons.GET.07cf3e1.generated.swift | 45 +- ...ividualTesters.GET.f50d3ad.generated.swift | 77 +- ...etaBuildUsages.GET.bc353b3.generated.swift | 8 + ...rfPowerMetrics.GET.5ad0e3a.generated.swift | 94 +- ...ReleaseVersion.GET.a38831a.generated.swift | 52 +- ...lationshipsApp.GET.ddadfc8.generated.swift | 86 + ...ionDeclaration.GET.44e79a0.generated.swift | 8 + ...nDeclaration.PATCH.44e79a0.generated.swift | 14 +- ...ppStoreVersion.GET.880b286.generated.swift | 86 + ...viewSubmission.GET.085d4eb.generated.swift | 86 + ...dLocalizations.GET.42f541c.generated.swift | 88 + ...sBetaGroups.DELETE.aaa7e70.generated.swift | 14 +- ...ipsBetaGroups.POST.aaa7e70.generated.swift | 14 +- ...uildBetaDetail.GET.e49c469.generated.swift | 86 + ...sticSignatures.GET.c96c92f.generated.swift | 88 + ...tionshipsIcons.GET.b993946.generated.swift | 88 + ...dualTesters.DELETE.d176ffd.generated.swift | 14 +- ...ividualTesters.GET.d176ffd.generated.swift | 8 + ...vidualTesters.POST.d176ffd.generated.swift | 14 +- ...ReleaseVersion.GET.098a261.generated.swift | 86 + ...dCapabilities.POST.110b1c5.generated.swift | 12 + ...ilitiesById.DELETE.2e41da5.generated.swift | 12 +- ...bilitiesById.PATCH.2e41da5.generated.swift | 12 + .../BundleIds.GET.e1a0630.generated.swift | 718 ++-- .../BundleIds.POST.e1a0630.generated.swift | 12 + ...ndleIdsByIdApp.GET.febfeff.generated.swift | 356 +- ...IdCapabilities.GET.9ffe45d.generated.swift | 41 +- ...ndleIdsById.DELETE.8901881.generated.swift | 12 +- .../BundleIdsById.GET.8901881.generated.swift | 580 +-- ...undleIdsById.PATCH.8901881.generated.swift | 12 + ...dsByIdProfiles.GET.eb15301.generated.swift | 101 +- ...lationshipsApp.GET.f6f27e8.generated.swift | 86 + ...IdCapabilities.GET.88cb282.generated.swift | 88 + ...nshipsProfiles.GET.e44ec5a.generated.swift | 88 + ...ficatesById.DELETE.21ec8ea.generated.swift | 12 +- ...rtificatesById.GET.21ec8ea.generated.swift | 138 +- ...ificatesById.PATCH.21ec8ea.generated.swift | 95 + ...ByIdPassTypeId.GET.30b9657.generated.swift | 235 ++ ...hipsPassTypeId.GET.c9dc999.generated.swift | 86 + .../Certificates.GET.859127b.generated.swift | 329 +- .../Certificates.POST.859127b.generated.swift | 12 + ...iArtifactsById.GET.9d9880f.generated.swift | 52 +- ...sByIdArtifacts.GET.236354c.generated.swift | 52 +- ...nsByIdBuildRun.GET.5902374.generated.swift | 786 ++-- ...ildActionsById.GET.4bf84b5.generated.swift | 367 +- ...ionsByIdIssues.GET.0045118.generated.swift | 52 +- ...shipsArtifacts.GET.aea731d.generated.swift | 88 + ...nshipsBuildRun.GET.1a8a104.generated.swift | 86 + ...ionshipsIssues.GET.a13c06f.generated.swift | 88 + ...ipsTestResults.GET.3a9c66f.generated.swift | 88 + ...yIdTestResults.GET.32bf0e9.generated.swift | 66 +- ...unsByIdActions.GET.78a25ca.generated.swift | 284 +- ...RunsByIdBuilds.GET.d851595.generated.swift | 1738 +++++---- ...iBuildRunsById.GET.223226a.generated.swift | 460 ++- ...onshipsActions.GET.abff178.generated.swift | 88 + ...ionshipsBuilds.GET.9919e76.generated.swift | 88 + .../CiBuildRuns.POST.e7c5671.generated.swift | 12 + .../CiIssuesById.GET.6cfdfb0.generated.swift | 52 +- ...OsVersionsById.GET.f853409.generated.swift | 106 +- ...sXcodeVersions.GET.6ebd18b.generated.swift | 88 + ...dXcodeVersions.GET.ebe1db8.generated.swift | 106 +- ...iMacOsVersions.GET.7fc0431.generated.swift | 106 +- ...alRepositories.GET.a06cfdf.generated.swift | 203 +- ...roductsByIdApp.GET.a65f4ca.generated.swift | 2584 +++++++------ ...sByIdBuildRuns.GET.259afcd.generated.swift | 813 ++-- ...roductsById.DELETE.3ba4a0b.generated.swift | 12 +- ...CiProductsById.GET.3ba4a0b.generated.swift | 693 ++-- ...ryRepositories.GET.b6d021c.generated.swift | 203 +- ...alRepositories.GET.d3ee0c2.generated.swift | 88 + ...lationshipsApp.GET.17e2173.generated.swift | 86 + ...shipsBuildRuns.GET.00b2def.generated.swift | 88 + ...ryRepositories.GET.50480c9.generated.swift | 88 + ...shipsWorkflows.GET.f4038ab.generated.swift | 88 + ...sByIdWorkflows.GET.1e256ab.generated.swift | 434 ++- .../CiProducts.GET.56e2396.generated.swift | 721 ++-- ...estResultsById.GET.1e23798.generated.swift | 66 +- ...sByIdBuildRuns.GET.5c8de1d.generated.swift | 813 ++-- ...rkflowsById.DELETE.c983433.generated.swift | 12 +- ...iWorkflowsById.GET.c983433.generated.swift | 356 +- ...orkflowsById.PATCH.c983433.generated.swift | 12 + ...shipsBuildRuns.GET.103eb12.generated.swift | 88 + ...hipsRepository.GET.83706ea.generated.swift | 86 + ...ByIdRepository.GET.2136fe4.generated.swift | 201 +- .../CiWorkflows.POST.469d47c.generated.swift | 12 + ...deVersionsById.GET.0412077.generated.swift | 106 +- ...dMacOsVersions.GET.f4f5a22.generated.swift | 106 +- ...sMacOsVersions.GET.f0f805d.generated.swift | 88 + ...iXcodeVersions.GET.da7360c.generated.swift | 106 +- ...sponsesById.DELETE.bacc312.generated.swift | 12 +- ...wResponsesById.GET.bacc312.generated.swift | 73 +- ...viewResponses.POST.6ffe6fb.generated.swift | 12 + ...merReviewsById.GET.7a43fba.generated.swift | 136 +- ...nshipsResponse.GET.36fa137.generated.swift | 86 + ...wsByIdResponse.GET.986bb48.generated.swift | 136 +- .../DevicesById.GET.89246f7.generated.swift | 73 +- .../DevicesById.PATCH.89246f7.generated.swift | 12 + .../Devices.GET.f740d23.generated.swift | 223 +- .../Devices.POST.f740d23.generated.swift | 12 + ...aturesByIdLogs.GET.ef72589.generated.swift | 8 + ...lityPreOrders.POST.a7ae00d.generated.swift | 12 + ...eementsById.DELETE.940d270.generated.swift | 12 +- ...AgreementsById.GET.940d270.generated.swift | 94 +- ...reementsById.PATCH.940d270.generated.swift | 12 + ...ipsTerritories.GET.24bb68a.generated.swift | 88 + ...yIdTerritories.GET.e79c768.generated.swift | 29 +- ...nseAgreements.POST.fe1fd08.generated.swift | 12 + ...FinanceReports.GET.387f567.generated.swift | 38 +- ...tImagesById.DELETE.9dc559b.generated.swift | 12 +- ...mentImagesById.GET.9dc559b.generated.swift | 90 +- ...ntImagesById.PATCH.9dc559b.generated.swift | 12 + ...evementImages.POST.d1c317b.generated.swift | 12 + ...terAchievement.GET.833923b.generated.swift | 514 ++- ...hievementImage.GET.68fa9cf.generated.swift | 148 +- ...zationsById.DELETE.eec1c39.generated.swift | 12 +- ...alizationsById.GET.eec1c39.generated.swift | 256 +- ...izationsById.PATCH.eec1c39.generated.swift | 12 + ...terAchievement.GET.2437564.generated.swift | 86 + ...hievementImage.GET.02e1f8f.generated.swift | 86 + ...Localizations.POST.a6e083a.generated.swift | 12 + ...eleasesById.DELETE.41adca8.generated.swift | 12 +- ...ntReleasesById.GET.41adca8.generated.swift | 73 +- ...ementReleases.POST.ac65a3e.generated.swift | 12 + ...vementsById.DELETE.54c2f1b.generated.swift | 12 +- ...hievementsById.GET.54c2f1b.generated.swift | 257 +- ...evementsById.PATCH.54c2f1b.generated.swift | 12 + ...oupAchievement.GET.67c0921.generated.swift | 515 ++- ...dLocalizations.GET.6c3f65c.generated.swift | 256 +- ...ipsActivity.PATCH.767fb4e.generated.swift} | 26 +- ...oupAchievement.GET.7028b57.generated.swift | 9 + ...pAchievement.PATCH.7028b57.generated.swift | 15 +- ...sLocalizations.GET.3f46a50.generated.swift | 88 + ...nshipsReleases.GET.678b35f.generated.swift | 88 + ...tsByIdReleases.GET.2c93767.generated.swift | 299 +- ...rAchievements.POST.519abd7.generated.swift | 12 + ...ivitiesById.DELETE.2aa06fe.generated.swift | 72 + ...ActivitiesById.GET.2aa06fe.generated.swift | 297 ++ ...tivitiesById.PATCH.2aa06fe.generated.swift | 95 + ...chievements.DELETE.b6340bc.generated.swift | 72 + ...sAchievements.POST.b6340bc.generated.swift | 87 + ...eaderboards.DELETE.e0742e0.generated.swift | 72 + ...sLeaderboards.POST.e0742e0.generated.swift | 87 + ...nshipsVersions.GET.7318fd0.generated.swift | 88 + ...esByIdVersions.GET.3ed11b1.generated.swift | 395 ++ ...terActivities.POST.323e8fc.generated.swift | 84 + ...yImagesById.DELETE.dba6219.generated.swift | 72 + ...vityImagesById.GET.dba6219.generated.swift | 141 + ...tyImagesById.PATCH.dba6219.generated.swift | 95 + ...ctivityImages.POST.8ba0e6d.generated.swift | 84 + ...zationsById.DELETE.498f7b3.generated.swift | 72 + ...alizationsById.GET.498f7b3.generated.swift | 205 ++ ...izationsById.PATCH.498f7b3.generated.swift | 95 + ...tionsByIdImage.GET.5bfb995.generated.swift | 141 + ...tionshipsImage.GET.d1c0278.generated.swift | 86 + ...Localizations.POST.3f32ce8.generated.swift | 84 + ...eleasesById.DELETE.4df0d43.generated.swift | 72 + ...nReleasesById.GET.4df0d43.generated.swift} | 81 +- ...rsionReleases.POST.9d43f0e.generated.swift | 84 + ...IdDefaultImage.GET.766df69.generated.swift | 141 + ...tyVersionsById.GET.8b3116f.generated.swift | 293 ++ ...VersionsById.PATCH.8b3116f.generated.swift | 95 + ...dLocalizations.GET.e77059d.generated.swift | 257 ++ ...psDefaultImage.GET.f8986b4.generated.swift | 86 + ...sLocalizations.GET.5b62918.generated.swift | 88 + ...ivityVersions.POST.d398713.generated.swift | 84 + ...ppStoreVersion.GET.c01ca76.generated.swift | 1522 ++++---- ...bilityVersions.GET.9045903.generated.swift | 247 +- ...ppVersionsById.GET.a2ccb05.generated.swift | 247 +- ...VersionsById.PATCH.a2ccb05.generated.swift | 12 + ...ppStoreVersion.GET.f0c4373.generated.swift | 86 + ...ityVersions.DELETE.4d7708b.generated.swift | 14 +- ...bilityVersions.GET.4d7708b.generated.swift | 8 + ...ilityVersions.POST.4d7708b.generated.swift | 14 +- ...erAppVersions.POST.b822948.generated.swift | 12 + ...eImagesById.DELETE.93e7d1b.generated.swift | 72 + ...engeImagesById.GET.93e7d1b.generated.swift | 141 + ...geImagesById.PATCH.93e7d1b.generated.swift | 95 + ...allengeImages.POST.f409490.generated.swift | 84 + ...zationsById.DELETE.12ccb9a.generated.swift | 72 + ...alizationsById.GET.12ccb9a.generated.swift | 205 ++ ...izationsById.PATCH.12ccb9a.generated.swift | 95 + ...tionsByIdImage.GET.cfc3d8c.generated.swift | 141 + ...tionshipsImage.GET.b844617.generated.swift | 86 + ...Localizations.POST.eb8493b.generated.swift | 84 + ...eleasesById.DELETE.da07552.generated.swift | 72 + ...nReleasesById.GET.da07552.generated.swift} | 81 +- ...rsionReleases.POST.9d1e993.generated.swift | 84 + ...IdDefaultImage.GET.d50e7c3.generated.swift | 141 + ...geVersionsById.GET.f4c42e2.generated.swift | 289 ++ ...dLocalizations.GET.4f0787b.generated.swift | 253 ++ ...psDefaultImage.GET.65737a1.generated.swift | 86 + ...sLocalizations.GET.4faef94.generated.swift | 88 + ...lengeVersions.POST.ac02250.generated.swift | 84 + ...llengesById.DELETE.7dbeef3.generated.swift | 72 + ...ChallengesById.GET.7dbeef3.generated.swift | 263 ++ ...allengesById.PATCH.7dbeef3.generated.swift | 95 + ...sLeaderboard.PATCH.b83f437.generated.swift | 87 + ...nshipsVersions.GET.df59605.generated.swift | 88 + ...esByIdVersions.GET.fd8fc17.generated.swift | 379 ++ ...terChallenges.POST.8f45db2.generated.swift | 84 + ...vementReleases.GET.5816a34.generated.swift | 299 +- ...tivityReleases.GET.3e146f9.generated.swift | 198 + ...llengeReleases.GET.7d048ec.generated.swift | 194 + ...erAchievements.GET.601c9ef.generated.swift | 514 ++- ...nterActivities.GET.dc2d5a7.generated.swift | 617 ++++ ...terAppVersions.GET.7515b8e.generated.swift | 247 +- ...nterChallenges.GET.26b4d91.generated.swift | 552 +++ ...terDetailsById.GET.2adb42c.generated.swift | 1020 ++++-- ...rDetailsById.PATCH.2adb42c.generated.swift | 12 + ...ameCenterGroup.GET.1810e15.generated.swift | 714 ++-- ...eaderboardSets.GET.8110c49.generated.swift | 552 +-- ...erLeaderboards.GET.a47a5dc.generated.swift | 713 ++-- ...rboardReleases.GET.47d956f.generated.swift | 349 +- ...ardSetReleases.GET.e2b4917.generated.swift | 270 +- ...makingRequests.GET.7b8b3ec.generated.swift | 179 +- ...makingRequests.GET.d03d7a2.generated.swift | 179 +- ...vementReleases.GET.ad59285.generated.swift | 88 + ...tivityReleases.GET.646dfe2.generated.swift | 88 + ...llengeReleases.GET.870b3e5.generated.swift | 88 + ...formVersions.PATCH.269e67e.generated.swift | 87 + ...erAchievements.GET.f55ff27.generated.swift | 8 + ...Achievements.PATCH.f55ff27.generated.swift | 14 +- ...nterActivities.GET.4d45542.generated.swift | 88 + ...terAppVersions.GET.f4cb3e4.generated.swift | 88 + ...nterChallenges.GET.1bc48c1.generated.swift | 88 + ...ameCenterGroup.GET.8aa8410.generated.swift | 86 + ...eaderboardSets.GET.dfb5b36.generated.swift | 8 + ...derboardSets.PATCH.dfb5b36.generated.swift | 14 +- ...erLeaderboards.GET.8c64c98.generated.swift | 8 + ...Leaderboards.PATCH.8c64c98.generated.swift | 14 +- ...rboardReleases.GET.a743dea.generated.swift | 88 + ...ardSetReleases.GET.39b5bb9.generated.swift | 88 + ...CenterDetails.POST.3c838f0.generated.swift | 12 + ...atibleVersions.GET.2090b0a.generated.swift | 502 +-- ...bleVersions.DELETE.085e87f.generated.swift | 14 +- ...atibleVersions.GET.085e87f.generated.swift | 8 + ...ibleVersions.PATCH.085e87f.generated.swift | 14 +- ...tibleVersions.POST.085e87f.generated.swift | 14 +- ...erAchievements.GET.cb0d30b.generated.swift | 514 ++- ...nterActivities.GET.23eb322.generated.swift | 617 ++++ ...nterChallenges.GET.29ff21f.generated.swift | 552 +++ ...eCenterDetails.GET.1a856a2.generated.swift | 1495 +++++--- ...rGroupsById.DELETE.dd9abc7.generated.swift | 12 +- ...nterGroupsById.GET.dd9abc7.generated.swift | 714 ++-- ...erGroupsById.PATCH.dd9abc7.generated.swift | 12 + ...eaderboardSets.GET.70de902.generated.swift | 552 +-- ...erLeaderboards.GET.b07e7d1.generated.swift | 713 ++-- ...erAchievements.GET.67b0033.generated.swift | 8 + ...Achievements.PATCH.67b0033.generated.swift | 14 +- ...nterActivities.GET.6bc57bd.generated.swift | 88 + ...nterChallenges.GET.2840c87.generated.swift | 88 + ...eCenterDetails.GET.954c2f8.generated.swift | 88 + ...eaderboardSets.GET.62648bd.generated.swift | 8 + ...derboardSets.PATCH.62648bd.generated.swift | 14 +- ...erLeaderboards.GET.204da09.generated.swift | 8 + ...Leaderboards.PATCH.204da09.generated.swift | 14 +- ...meCenterGroups.GET.1fdc22f.generated.swift | 714 ++-- ...eCenterGroups.POST.1fdc22f.generated.swift | 12 + ...rySubmissions.POST.390a5fa.generated.swift | 84 + ...dImagesById.DELETE.4371df3.generated.swift | 12 +- ...oardImagesById.GET.4371df3.generated.swift | 90 +- ...rdImagesById.PATCH.4371df3.generated.swift | 12 + ...erboardImages.POST.b6b7af5.generated.swift | 12 + ...aderboardImage.GET.a5d1321.generated.swift | 155 +- ...zationsById.DELETE.2430b72.generated.swift | 12 +- ...alizationsById.GET.2430b72.generated.swift | 162 +- ...izationsById.PATCH.2430b72.generated.swift | 12 + ...aderboardImage.GET.a6e0f98.generated.swift | 86 + ...Localizations.POST.a888ab8.generated.swift | 12 + ...eleasesById.DELETE.a2786c0.generated.swift | 12 +- ...rdReleasesById.GET.a2786c0.generated.swift | 73 +- ...boardReleases.POST.f8bdb62.generated.swift | 12 + ...tImagesById.DELETE.7256c04.generated.swift | 12 +- ...dSetImagesById.GET.7256c04.generated.swift | 90 +- ...etImagesById.PATCH.7256c04.generated.swift | 12 + ...oardSetImages.POST.c6bb25f.generated.swift | 12 + ...rboardSetImage.GET.b014917.generated.swift | 132 +- ...zationsById.DELETE.34b0638.generated.swift | 12 +- ...alizationsById.GET.34b0638.generated.swift | 139 +- ...izationsById.PATCH.34b0638.generated.swift | 12 + ...rboardSetImage.GET.92d4c95.generated.swift | 86 + ...Localizations.POST.305e38b.generated.swift | 12 + ...terLeaderboard.GET.58b4616.generated.swift | 713 ++-- ...LeaderboardSet.GET.b1e4b3a.generated.swift | 552 +-- ...zationsById.DELETE.45631f6.generated.swift | 12 +- ...izationsById.PATCH.45631f6.generated.swift | 12 + ...terLeaderboard.GET.c79b006.generated.swift | 86 + ...LeaderboardSet.GET.accdc75.generated.swift | 86 + ...rLocalizations.GET.9af70d9.generated.swift | 301 +- ...Localizations.POST.9af70d9.generated.swift | 12 + ...eleasesById.DELETE.76004f9.generated.swift | 12 +- ...etReleasesById.GET.76004f9.generated.swift | 73 +- ...rdSetReleases.POST.b8fcd20.generated.swift | 12 + ...ardSetsById.DELETE.6529e2e.generated.swift | 12 +- ...rboardSetsById.GET.6529e2e.generated.swift | 366 +- ...oardSetsById.PATCH.6529e2e.generated.swift | 12 + ...erLeaderboards.GET.db53a38.generated.swift | 713 ++-- ...LeaderboardSet.GET.ddc5a04.generated.swift | 553 +-- ...dLocalizations.GET.28f9cb6.generated.swift | 211 +- ...eaderboards.DELETE.048f1ad.generated.swift | 14 +- ...erLeaderboards.GET.048f1ad.generated.swift | 8 + ...Leaderboards.PATCH.048f1ad.generated.swift | 14 +- ...rLeaderboards.POST.048f1ad.generated.swift | 14 +- ...LeaderboardSet.GET.67e0c36.generated.swift | 9 + ...aderboardSet.PATCH.67e0c36.generated.swift | 15 +- ...sLocalizations.GET.aefd59c.generated.swift | 88 + ...nshipsReleases.GET.5d777b2.generated.swift | 88 + ...tsByIdReleases.GET.9a8ef38.generated.swift | 270 +- ...aderboardSets.POST.075cd04.generated.swift | 12 + ...rboardsById.DELETE.3a3f5a7.generated.swift | 12 +- ...aderboardsById.GET.3a3f5a7.generated.swift | 325 +- ...erboardsById.PATCH.3a3f5a7.generated.swift | 12 + ...oupLeaderboard.GET.67a613a.generated.swift | 714 ++-- ...dLocalizations.GET.bb221ae.generated.swift | 313 +- ...ipsActivity.PATCH.336d35f.generated.swift} | 27 +- ...ipsChallenge.PATCH.9533bb8.generated.swift | 87 + ...oupLeaderboard.GET.6b8f8be.generated.swift | 9 + ...pLeaderboard.PATCH.6b8f8be.generated.swift | 15 +- ...sLocalizations.GET.0d8aed4.generated.swift | 88 + ...nshipsReleases.GET.b492f17.generated.swift | 88 + ...dsByIdReleases.GET.da84c20.generated.swift | 349 +- ...rLeaderboards.POST.97f27b8.generated.swift | 12 + ...gQueuesById.DELETE.40e9852.generated.swift | 12 +- ...kingQueuesById.GET.40e9852.generated.swift | 77 +- ...ngQueuesById.PATCH.40e9852.generated.swift | 12 + ...kingQueueSizes.GET.b93214f.generated.swift | 119 +- ...makingRequests.GET.114c537.generated.swift | 186 +- ...kingQueueSizes.GET.c49fcc2.generated.swift | 119 +- ...makingRequests.GET.e14edf2.generated.swift | 186 +- ...makingSessions.GET.a4c9340.generated.swift | 119 +- ...chmakingQueues.GET.906e511.generated.swift | 77 +- ...hmakingQueues.POST.906e511.generated.swift | 12 + ...gRuleSetTests.POST.5b6028a.generated.swift | 12 + ...uleSetsById.DELETE.c70f4a2.generated.swift | 12 +- ...ngRuleSetsById.GET.c70f4a2.generated.swift | 239 +- ...RuleSetsById.PATCH.c70f4a2.generated.swift | 12 + ...chmakingQueues.GET.26f697c.generated.swift | 140 +- ...chmakingQueues.GET.21e41b7.generated.swift | 88 + ...tionshipsRules.GET.109bd75.generated.swift | 88 + ...tionshipsTeams.GET.638b2b8.generated.swift | 88 + ...eSetsByIdRules.GET.9a5e9ae.generated.swift | 62 +- ...eSetsByIdTeams.GET.66c196f.generated.swift | 48 +- ...makingRuleSets.GET.88552e0.generated.swift | 239 +- ...akingRuleSets.POST.88552e0.generated.swift | 12 + ...ngRulesById.DELETE.962af29.generated.swift | 12 +- ...ingRulesById.PATCH.962af29.generated.swift | 12 + ...eanRuleResults.GET.af8fe6c.generated.swift | 105 +- ...berRuleResults.GET.a1f635a.generated.swift | 142 +- ...kingRuleErrors.GET.c5ce74b.generated.swift | 98 +- ...chmakingRules.POST.318d415.generated.swift | 12 + ...ngTeamsById.DELETE.d8cc2e0.generated.swift | 12 +- ...ingTeamsById.PATCH.d8cc2e0.generated.swift | 12 + ...chmakingTeams.POST.951ff87.generated.swift | 12 + ...ntSubmissions.POST.50bb913.generated.swift | 84 + ...enshotsById.DELETE.66cbd18.generated.swift | 12 +- ...creenshotsById.GET.66cbd18.generated.swift | 111 +- ...eenshotsById.PATCH.66cbd18.generated.swift | 12 + ...ewScreenshots.POST.25a6772.generated.swift | 12 + ...bleTerritories.GET.a435fd4.generated.swift | 29 +- ...labilitiesById.GET.535cad0.generated.swift | 83 +- ...bleTerritories.GET.16c122b.generated.swift | 88 + ...vailabilities.POST.a7bca8a.generated.swift | 12 + ...seContentsById.GET.b1b4b4b.generated.swift | 80 +- ...eImagesById.DELETE.9dc78df.generated.swift | 72 + ...aseImagesById.GET.9dc78df.generated.swift} | 129 +- ...seImagesById.PATCH.9dc78df.generated.swift | 95 + ...urchaseImages.POST.a0ba306.generated.swift | 84 + ...zationsById.DELETE.36e69d9.generated.swift | 12 +- ...alizationsById.GET.36e69d9.generated.swift | 80 +- ...izationsById.PATCH.36e69d9.generated.swift | 12 + ...Localizations.POST.62f9ff4.generated.swift | 12 + ...Equalizations.GET.6f0ca23.generated.swift} | 141 +- ...sEqualizations.GET.9c3df36.generated.swift | 88 + ...utomaticPrices.GET.0489234.generated.swift | 158 +- ...dBaseTerritory.GET.63bd028.generated.swift | 29 +- ...eSchedulesById.GET.ef73501.generated.swift | 163 +- ...IdManualPrices.GET.291dbba.generated.swift | 158 +- ...utomaticPrices.GET.5858f49.generated.swift | 88 + ...sBaseTerritory.GET.3dbbaa2.generated.swift | 86 + ...psManualPrices.GET.9b39a6f.generated.swift | 88 + ...riceSchedules.POST.7f8bfd9.generated.swift | 12 + ...seSubmissions.POST.0d31d8f.generated.swift | 12 + ...pPurchasesById.GET.81fb623.generated.swift | 80 +- ...DetailsById.DELETE.50b8a11.generated.swift | 72 + ...hDetailsById.PATCH.50b8a11.generated.swift | 95 + ...SearchDetails.POST.20dda23.generated.swift | 84 + ...ebhooksById.DELETE.40c121d.generated.swift | 72 + ...WebhooksById.PATCH.40c121d.generated.swift | 95 + ...placeWebhooks.GET.3bb82e0.generated.swift} | 59 +- ...placeWebhooks.POST.3bb82e0.generated.swift | 84 + ...IdCertificates.GET.09c9050.generated.swift | 394 ++ ...antIdsById.DELETE.a4c15f7.generated.swift} | 17 +- ...erchantIdsById.GET.a4c15f7.generated.swift | 235 ++ ...chantIdsById.PATCH.a4c15f7.generated.swift | 95 + ...psCertificates.GET.7cb8d86.generated.swift | 88 + .../MerchantIds.GET.f84be12.generated.swift | 302 ++ .../MerchantIds.POST.f84be12.generated.swift} | 27 +- ...nationsById.DELETE.b051da8.generated.swift | 72 + ...ominationsById.GET.b051da8.generated.swift | 290 ++ ...inationsById.PATCH.b051da8.generated.swift | 95 + .../Nominations.GET.c0bf6fc.generated.swift | 436 +++ .../Nominations.POST.c0bf6fc.generated.swift} | 26 +- ...IdCertificates.GET.70cd78d.generated.swift | 394 ++ ...TypeIdsById.DELETE.702ea05.generated.swift | 72 + ...assTypeIdsById.GET.702ea05.generated.swift | 235 ++ ...sTypeIdsById.PATCH.702ea05.generated.swift | 95 + ...psCertificates.GET.42f1856.generated.swift | 88 + .../PassTypeIds.GET.95793d2.generated.swift | 317 ++ .../PassTypeIds.POST.95793d2.generated.swift | 84 + ...ersionsByIdApp.GET.ea361cf.generated.swift | 356 +- ...ionsByIdBuilds.GET.dd40f29.generated.swift | 196 +- ...seVersionsById.GET.e94aeb6.generated.swift | 614 ++-- ...lationshipsApp.GET.e10704f.generated.swift | 86 + ...ionshipsBuilds.GET.feeeafe.generated.swift | 88 + ...eleaseVersions.GET.39a7a9a.generated.swift | 750 ++-- ...esByIdBundleId.GET.df3df84.generated.swift | 73 +- ...IdCertificates.GET.4aba5e8.generated.swift | 84 +- ...lesByIdDevices.GET.f79fc7a.generated.swift | 73 +- ...rofilesById.DELETE.4f505d4.generated.swift | 12 +- .../ProfilesById.GET.4f505d4.generated.swift | 342 +- ...nshipsBundleId.GET.e318143.generated.swift | 86 + ...psCertificates.GET.d413fd5.generated.swift | 88 + ...onshipsDevices.GET.939dcf5.generated.swift | 88 + .../Profiles.GET.d776efa.generated.swift | 556 +-- .../Profiles.POST.d776efa.generated.swift | 12 + ...rchasesById.DELETE.1e5319f.generated.swift | 12 +- ...dPurchasesById.GET.1e5319f.generated.swift | 163 +- ...urchasesById.PATCH.1e5319f.generated.swift | 12 + ...romotionImages.GET.4b831e7.generated.swift | 220 -- ...otedPurchases.POST.f9a8746.generated.swift | 12 + ...onItemsById.DELETE.32784e2.generated.swift | 12 +- ...ionItemsById.PATCH.32784e2.generated.swift | 12 + ...bmissionItems.POST.2be26fe.generated.swift | 12 + ...sionsByIdItems.GET.82e114e.generated.swift | 547 +-- ...tionshipsItems.GET.73ca031.generated.swift | 88 + ...ubmissionsById.GET.1799edb.generated.swift | 204 +- ...missionsById.PATCH.1799edb.generated.swift | 12 + ...iewSubmissions.GET.2271ac3.generated.swift | 308 +- ...ewSubmissions.POST.2271ac3.generated.swift | 12 + ...veragesById.DELETE.2ec2ee8.generated.swift | 12 +- ...pCoveragesById.GET.2ec2ee8.generated.swift | 90 +- ...overagesById.PATCH.2ec2ee8.generated.swift | 12 + ...gAppCoverages.POST.a3dbf9e.generated.swift | 12 + .../SalesReports.GET.e6b1814.generated.swift | 167 +- ...ReferencesById.GET.fed25a4.generated.swift | 80 +- ...psRepositories.GET.f7c37c7.generated.swift | 88 + ...IdRepositories.GET.d4fa50c.generated.swift | 203 +- ...mProvidersById.GET.1d89e59.generated.swift | 89 +- .../ScmProviders.GET.79f23b3.generated.swift | 87 +- ...llRequestsById.GET.0538892.generated.swift | 129 +- ...dGitReferences.GET.4d19adc.generated.swift | 159 +- ...IdPullRequests.GET.0ceb0e1.generated.swift | 208 +- ...sGitReferences.GET.4c69e0b.generated.swift | 88 + ...psPullRequests.GET.d3fe2a1.generated.swift | 88 + ...positoriesById.GET.a4518c0.generated.swift | 194 +- ...cmRepositories.GET.83c2368.generated.swift | 194 +- ...enshotsById.DELETE.1504677.generated.swift | 12 +- ...creenshotsById.GET.1504677.generated.swift | 111 +- ...eenshotsById.PATCH.1504677.generated.swift | 12 + ...ewScreenshots.POST.687e771.generated.swift | 12 + ...bleTerritories.GET.ec82b5e.generated.swift | 29 +- ...bleTerritories.GET.83b9b65.generated.swift | 88 + ...labilitiesById.GET.93e5129.generated.swift | 86 +- ...vailabilities.POST.55eb408.generated.swift | 12 + ...acePeriodsById.GET.86c7258.generated.swift | 52 +- ...ePeriodsById.PATCH.86c7258.generated.swift | 12 + ...zationsById.DELETE.8ac8701.generated.swift | 12 +- ...alizationsById.GET.8ac8701.generated.swift | 80 +- ...izationsById.PATCH.8ac8701.generated.swift | 12 + ...Localizations.POST.1dd2d21.generated.swift | 12 + ...upSubmissions.POST.fa4dadd.generated.swift | 12 + ...pLocalizations.GET.aef4047.generated.swift | 88 + ...sSubscriptions.GET.e652166.generated.swift | 88 + ...pLocalizations.GET.3b1b1be.generated.swift | 120 +- ...nGroupsById.DELETE.216dec1.generated.swift | 12 +- ...tionGroupsById.GET.216dec1.generated.swift | 271 +- ...onGroupsById.PATCH.216dec1.generated.swift | 12 + ...dSubscriptions.GET.c1878f2.generated.swift | 1083 +++--- ...riptionGroups.POST.7832dc5.generated.swift | 12 + ...nImagesById.DELETE.e335fd1.generated.swift | 72 + ...tionImagesById.GET.e335fd1.generated.swift | 174 + ...onImagesById.PATCH.e335fd1.generated.swift | 95 + ...riptionImages.POST.d99e36c.generated.swift | 84 + ...yOffersById.DELETE.2d4490f.generated.swift | 12 +- ...ryOffersById.PATCH.2d4490f.generated.swift | 12 + ...ductoryOffers.POST.25d9919.generated.swift | 12 + ...zationsById.DELETE.731e3ba.generated.swift | 12 +- ...alizationsById.GET.731e3ba.generated.swift | 80 +- ...izationsById.PATCH.731e3ba.generated.swift | 12 + ...Localizations.POST.b0a7555.generated.swift | 12 + ...ustomCodesById.GET.3300220.generated.swift | 87 +- ...tomCodesById.PATCH.3300220.generated.swift | 12 + ...deCustomCodes.POST.9c18b39.generated.swift | 12 + ...meUseCodesById.GET.5f16424.generated.swift | 87 +- ...UseCodesById.PATCH.5f16424.generated.swift | 12 + ...odesByIdValues.GET.ccf98b9.generated.swift | 8 + ...eTimeUseCodes.POST.52053ec.generated.swift | 12 + ...yIdCustomCodes.GET.2081035.generated.swift | 183 +- ...neTimeUseCodes.GET.2f05613.generated.swift | 183 +- ...odesByIdPrices.GET.86de8a9.generated.swift | 139 +- ...ipsCustomCodes.GET.64eecdf.generated.swift | 88 + ...neTimeUseCodes.GET.5a205ac.generated.swift | 88 + ...ionshipsPrices.GET.4dfcb0d.generated.swift | 88 + ...OfferCodesById.GET.6f18d2e.generated.swift | 292 +- ...ferCodesById.PATCH.6f18d2e.generated.swift | 12 + ...ionOfferCodes.POST.23dd2c3.generated.swift | 12 + ...dEqualizations.GET.044b8ee.generated.swift | 104 +- ...sEqualizations.GET.1fb0014.generated.swift | 88 + ...ricePointsById.GET.a50bff2.generated.swift | 83 +- ...nPricesById.DELETE.4db4d31.generated.swift | 12 +- ...riptionPrices.POST.5874aae.generated.swift | 12 + ...fersByIdPrices.GET.45d0d63.generated.swift | 139 +- ...ionshipsPrices.GET.c230293.generated.swift | 88 + ...lOffersById.DELETE.c143fce.generated.swift | 12 +- ...onalOffersById.GET.c143fce.generated.swift | 129 +- ...alOffersById.PATCH.c143fce.generated.swift | 12 + ...otionalOffers.POST.ca956ba.generated.swift | 12 + ...onSubmissions.POST.ed372cf.generated.swift | 12 + ...viewScreenshot.GET.1e85fc9.generated.swift | 257 +- ...ionsByIdImages.GET.dc8952a.generated.swift | 274 ++ ...oductoryOffers.GET.a4dd192.generated.swift | 336 +- ...ByIdOfferCodes.GET.12e3713.generated.swift | 438 ++- ...yIdPricePoints.GET.423b6c1.generated.swift | 104 +- ...ionsByIdPrices.GET.e41242b.generated.swift | 161 +- ...omotedPurchase.GET.96fa960.generated.swift | 433 +-- ...motionalOffers.GET.0f955f5.generated.swift | 275 +- ...viewScreenshot.GET.b03d5c2.generated.swift | 86 + ...ionshipsImages.GET.041f9d7.generated.swift | 88 + ...ctoryOffers.DELETE.10ab867.generated.swift | 14 +- ...oductoryOffers.GET.10ab867.generated.swift | 8 + ...hipsOfferCodes.GET.9aeb85a.generated.swift | 88 + ...ipsPricePoints.GET.35a9334.generated.swift | 88 + ...shipsPrices.DELETE.80efbd4.generated.swift | 14 +- ...ionshipsPrices.GET.80efbd4.generated.swift | 8 + ...omotedPurchase.GET.2f79e5f.generated.swift | 86 + ...motionalOffers.GET.6d2ca03.generated.swift | 88 + ...onAvailability.GET.40de5dc.generated.swift | 86 + ...nLocalizations.GET.93b5051.generated.swift | 88 + ...sWinBackOffers.GET.ea511f7.generated.swift | 88 + ...onAvailability.GET.7ff32af.generated.swift | 155 +- ...nLocalizations.GET.eef6109.generated.swift | 226 +- ...iptionsById.DELETE.fc34fc5.generated.swift | 12 +- ...scriptionsById.GET.fc34fc5.generated.swift | 912 +++-- ...riptionsById.PATCH.fc34fc5.generated.swift | 12 + ...dWinBackOffers.GET.befc1c2.generated.swift | 255 ++ ...Subscriptions.POST.ce7f6ec.generated.swift | 12 + .../Territories.GET.d379ce3.generated.swift | 29 +- ...bilitiesById.PATCH.8ed0900.generated.swift | 12 + ...ipsVisibleApps.GET.5b1770a.generated.swift | 88 + ...tationsById.DELETE.4728350.generated.swift | 12 +- ...nvitationsById.GET.4728350.generated.swift | 449 ++- ...yIdVisibleApps.GET.037be59.generated.swift | 356 +- ...serInvitations.GET.dab0615.generated.swift | 600 +-- ...erInvitations.POST.dab0615.generated.swift | 12 + ...VisibleApps.DELETE.4ae29aa.generated.swift | 14 +- ...ipsVisibleApps.GET.4ae29aa.generated.swift | 8 + ...sVisibleApps.PATCH.4ae29aa.generated.swift | 14 +- ...psVisibleApps.POST.4ae29aa.generated.swift | 14 +- .../UsersById.DELETE.0681a45.generated.swift | 12 +- .../UsersById.GET.0681a45.generated.swift | 442 ++- .../UsersById.PATCH.0681a45.generated.swift | 12 + ...yIdVisibleApps.GET.26969de.generated.swift | 356 +- .../Users/Users.GET.eab0d41.generated.swift | 593 +-- ...ookDeliveries.POST.8a857a1.generated.swift | 84 + ...WebhookPings.POST.c3049aa.generated.swift} | 27 +- ...ByIdDeliveries.GET.f8fe4d7.generated.swift | 278 ++ ...hipsDeliveries.GET.2baf075.generated.swift | 88 + ...bhooksById.DELETE.30521c1.generated.swift} | 16 +- .../WebhooksById.GET.30521c1.generated.swift | 166 + ...WebhooksById.PATCH.30521c1.generated.swift | 95 + .../Webhooks.POST.026e467.generated.swift} | 27 +- ...ersByIdPrices.GET.3de578d.generated.swift} | 165 +- ...ionshipsPrices.GET.e2cb13a.generated.swift | 88 + ...kOffersById.DELETE.0e8f1fd.generated.swift | 72 + ...BackOffersById.GET.0e8f1fd.generated.swift | 247 ++ ...ckOffersById.PATCH.0e8f1fd.generated.swift | 95 + ...WinBackOffers.POST.10ac4bb.generated.swift | 84 + ...vailabilities.POST.aa1f3b3.generated.swift | 12 + ...labilitiesById.GET.be43f8b.generated.swift | 118 +- ...Availabilities.GET.30ab2ab.generated.swift | 88 + ...Availabilities.GET.0578b27.generated.swift | 108 +- ...onExperiments.POST.6fa7f10.generated.swift | 12 + ...mentTreatments.GET.d40f958.generated.swift | 253 +- ...rimentsById.DELETE.7d297f5.generated.swift | 12 +- ...xperimentsById.GET.7d297f5.generated.swift | 213 +- ...erimentsById.PATCH.7d297f5.generated.swift | 12 + ...mentTreatments.GET.cf72947.generated.swift | 88 + ...viewScreenshot.GET.6300db3.generated.swift | 235 +- ...sesByIdContent.GET.6af7bd8.generated.swift | 204 +- ...pPriceSchedule.GET.d11cad2.generated.swift | 226 +- ...asesByIdImages.GET.95733aa.generated.swift | 258 ++ ...seAvailability.GET.75a89f3.generated.swift | 83 +- ...eLocalizations.GET.f825840.generated.swift | 204 +- ...rchasesById.DELETE.2fb25cf.generated.swift | 12 +- ...pPurchasesById.GET.2fb25cf.generated.swift | 616 ++-- ...urchasesById.PATCH.2fb25cf.generated.swift | 12 + ...yIdPricePoints.GET.27c764e.generated.swift | 104 +- ...omotedPurchase.GET.12375e3.generated.swift | 433 +-- ...viewScreenshot.GET.b420411.generated.swift | 86 + ...onshipsContent.GET.c3ea467.generated.swift | 86 + ...pPriceSchedule.GET.4ba4f50.generated.swift | 86 + ...ionshipsImages.GET.eadbcad.generated.swift | 88 + ...seAvailability.GET.2cecb2a.generated.swift | 86 + ...eLocalizations.GET.9ce9cf6.generated.swift | 88 + ...ipsPricePoints.GET.67db2d7.generated.swift | 88 + ...omotedPurchase.GET.672cf06.generated.swift | 86 + ...nAppPurchases.POST.eb03461.generated.swift | 12 + ...xTestersById.PATCH.483d724.generated.swift | 12 + ...SandboxTesters.GET.daf1d70.generated.swift | 73 +- ...istoryRequest.POST.d4c1f1b.generated.swift | 12 + ...ricePointsById.GET.ad74125.generated.swift | 87 +- ...dEqualizations.GET.bbad334.generated.swift | 456 ++- ...sEqualizations.GET.fd5b2b1.generated.swift | 88 + .../AccessibilityDeclaration.generated.swift | 127 + .../Schemas/Actor.generated.swift | 50 +- .../AgeRatingDeclaration.generated.swift | 375 +- ...ernativeDistributionDomain.generated.swift | 63 + ...AlternativeDistributionKey.generated.swift | 51 + ...nativeDistributionPackage.generated.swift} | 48 +- ...veDistributionPackageDelta.generated.swift | 68 + ...DistributionPackageVariant.generated.swift | 68 + ...DistributionPackageVersion.generated.swift | 251 ++ .../Schemas/AnalyticsReport.generated.swift | 119 + .../AnalyticsReportInstance.generated.swift | 111 + .../AnalyticsReportSegment.generated.swift | 63 + .../autogenerated/Schemas/App.generated.swift | 1066 ++---- .../Schemas/AppAvailability.generated.swift | 202 - .../Schemas/AppAvailabilityV2.generated.swift | 37 +- .../Schemas/AppCategory.generated.swift | 66 +- .../Schemas/AppClip.generated.swift | 80 +- .../Schemas/AppClipAction.generated.swift | 37 +- .../AppClipAdvancedExperience.generated.swift | 715 ++-- ...lipAdvancedExperienceImage.generated.swift | 6 +- ...AdvancedExperienceLanguage.generated.swift | 240 +- ...ncedExperienceLocalization.generated.swift | 6 +- ...ceLocalizationInlineCreate.generated.swift | 6 +- ...ppClipAppStoreReviewDetail.generated.swift | 42 +- .../AppClipDefaultExperience.generated.swift | 129 +- ...aultExperienceLocalization.generated.swift | 71 +- .../AppClipDomainStatus.generated.swift | 144 +- .../AppClipHeaderImage.generated.swift | 42 +- .../AppCustomProductPage.generated.swift | 71 +- ...tomProductPageLocalization.generated.swift | 100 +- ...geLocalizationInlineCreate.generated.swift | 14 +- ...ppCustomProductPageVersion.generated.swift | 148 +- ...uctPageVersionInlineCreate.generated.swift | 35 +- .../AppEncryptionDeclaration.generated.swift | 97 +- ...ryptionDeclarationDocument.generated.swift | 6 +- ...EncryptionDeclarationState.generated.swift | 58 +- .../Schemas/AppEvent.generated.swift | 291 +- .../Schemas/AppEventAssetType.generated.swift | 28 +- .../AppEventLocalization.generated.swift | 100 +- .../AppEventScreenshot.generated.swift | 42 +- .../Schemas/AppEventVideoClip.generated.swift | 52 +- .../Schemas/AppInfo.generated.swift | 519 ++- .../AppInfoLocalization.generated.swift | 42 +- .../AppMediaAssetState.generated.swift | 46 +- ...ediaPreviewFrameImageState.generated.swift | 54 + .../AppMediaStateError.generated.swift | 2 +- .../AppMediaVideoState.generated.swift | 62 + .../Schemas/AppPreview.generated.swift | 52 +- .../Schemas/AppPreviewSet.generated.swift | 139 +- .../Schemas/AppPricePoint.generated.swift | 204 -- .../Schemas/AppPricePointV3.generated.swift | 85 +- .../Schemas/AppPriceSchedule.generated.swift | 127 +- .../Schemas/AppPriceV2.generated.swift | 76 +- .../AppPriceV2InlineCreate.generated.swift | 4 +- .../Schemas/AppScreenshot.generated.swift | 42 +- .../Schemas/AppScreenshotSet.generated.swift | 139 +- .../Schemas/AppStoreAgeRating.generated.swift | 48 +- .../AppStoreReviewAttachment.generated.swift | 42 +- .../AppStoreReviewDetail.generated.swift | 71 +- .../Schemas/AppStoreVersion.generated.swift | 458 +-- .../AppStoreVersionExperiment.generated.swift | 150 +- ...VersionExperimentTreatment.generated.swift | 105 +- ...imentTreatmentLocalization.generated.swift | 100 +- ...ppStoreVersionExperimentV2.generated.swift | 214 +- ...ppStoreVersionLocalization.generated.swift | 100 +- ...pStoreVersionPhasedRelease.generated.swift | 6 +- .../AppStoreVersionPromotion.generated.swift | 4 +- .../AppStoreVersionState.generated.swift | 153 +- .../AppStoreVersionSubmission.generated.swift | 40 +- .../Schemas/AppVersionState.generated.swift | 78 + .../Schemas/BackgroundAsset.generated.swift | 129 + .../BackgroundAssetUploadFile.generated.swift | 103 + .../BackgroundAssetVersion.generated.swift | 219 ++ ...VersionInternalBetaRelease.generated.swift | 123 + ...ackgroundAssetVersionState.generated.swift | 34 + .../BetaAppClipInvocation.generated.swift | 38 +- ...ClipInvocationLocalization.generated.swift | 6 +- ...onLocalizationInlineCreate.generated.swift | 14 +- .../BetaAppLocalization.generated.swift | 37 +- .../BetaAppReviewDetail.generated.swift | 37 +- .../BetaAppReviewSubmission.generated.swift | 37 +- .../BetaBuildLocalization.generated.swift | 37 +- .../Schemas/BetaCrashLog.generated.swift | 51 + ...etaFeedbackCrashSubmission.generated.swift | 259 ++ ...etaFeedbackScreenshotImage.generated.swift | 35 + ...edbackScreenshotSubmission.generated.swift | 247 ++ .../Schemas/BetaGroup.generated.swift | 144 +- .../Schemas/BetaInviteType.generated.swift | 28 +- .../BetaLicenseAgreement.generated.swift | 37 +- .../BetaRecruitmentCriterion.generated.swift | 58 + ...terionCompatibleBuildCheck.generated.swift | 51 + ...RecruitmentCriterionOption.generated.swift | 70 + .../Schemas/BetaReviewState.generated.swift | 44 +- .../Schemas/BetaTester.generated.swift | 102 +- .../BetaTesterInvitation.generated.swift | 4 +- .../Schemas/BetaTesterState.generated.swift | 38 + .../Schemas/BrazilAgeRating.generated.swift | 58 +- .../Schemas/Build.generated.swift | 393 +- .../Schemas/BuildAudienceType.generated.swift | 28 +- .../Schemas/BuildBetaDetail.generated.swift | 37 +- .../BuildBetaNotification.generated.swift | 4 +- .../Schemas/BuildBundle.generated.swift | 160 +- .../BuildBundleFileSize.generated.swift | 6 +- .../Schemas/BuildBundleType.generated.swift | 26 + .../Schemas/BuildIcon.generated.swift | 6 +- .../Schemas/BundleId.generated.swift | 95 +- .../BundleIdCapability.generated.swift | 6 +- .../Schemas/BundleIdPlatform.generated.swift | 34 +- .../Schemas/CapabilityOption.generated.swift | 60 +- .../Schemas/CapabilitySetting.generated.swift | 76 +- .../Schemas/CapabilityType.generated.swift | 212 +- .../Schemas/Certificate.generated.swift | 70 +- .../Schemas/CertificateType.generated.swift | 121 +- .../Schemas/CiAction.generated.swift | 160 +- .../Schemas/CiActionType.generated.swift | 44 +- .../Schemas/CiArtifact.generated.swift | 68 +- .../Schemas/CiBranchPatterns.generated.swift | 4 +- .../CiBranchStartCondition.generated.swift | 2 +- .../Schemas/CiBuildAction.generated.swift | 82 +- .../Schemas/CiBuildRun.generated.swift | 314 +- .../CiCompletionStatus.generated.swift | 51 +- .../CiExecutionProgress.generated.swift | 37 +- .../CiFilesAndFoldersRule.generated.swift | 32 +- .../Schemas/CiGitRefKind.generated.swift | 28 +- .../Schemas/CiGitUser.generated.swift | 2 +- .../Schemas/CiIssue.generated.swift | 50 +- .../Schemas/CiIssueCounts.generated.swift | 2 +- .../Schemas/CiMacOsVersion.generated.swift | 37 +- ...ManualBranchStartCondition.generated.swift | 18 + ...lPullRequestStartCondition.generated.swift | 25 + .../CiManualTagStartCondition.generated.swift | 18 + .../Schemas/CiProduct.generated.swift | 167 +- ...iPullRequestStartCondition.generated.swift | 2 +- .../CiScheduledStartCondition.generated.swift | 106 +- ...iStartConditionFileMatcher.generated.swift | 2 +- .../Schemas/CiTagPatterns.generated.swift | 4 +- .../CiTagStartCondition.generated.swift | 2 +- .../Schemas/CiTestDestination.generated.swift | 2 +- .../CiTestDestinationKind.generated.swift | 28 +- .../Schemas/CiTestResult.generated.swift | 8 +- .../Schemas/CiTestStatus.generated.swift | 51 +- .../Schemas/CiWorkflow.generated.swift | 171 +- .../Schemas/CiXcodeVersion.generated.swift | 41 +- .../Schemas/CustomerReview.generated.swift | 37 +- .../CustomerReviewResponseV1.generated.swift | 70 +- ...ustomerReviewSummarization.generated.swift | 120 + ...eliveryFileUploadOperation.generated.swift | 55 + .../Schemas/Device.generated.swift | 98 +- .../DeviceConnectionType.generated.swift | 38 + .../Schemas/DeviceFamily.generated.swift | 42 + ...eviceFamilyOsVersionFilter.generated.swift | 30 + .../Schemas/DiagnosticInsight.generated.swift | 49 + ...DiagnosticInsightDirection.generated.swift | 30 + .../DiagnosticInsightType.generated.swift | 22 + .../Schemas/DiagnosticLog.generated.swift | 4 +- ...DiagnosticLogCallStackNode.generated.swift | 2 +- .../DiagnosticSignature.generated.swift | 74 +- .../Schemas/DocumentLinks.generated.swift | 2 +- ...EndAppAvailabilityPreOrder.generated.swift | 4 +- .../EndUserLicenseAgreement.generated.swift | 71 +- .../Schemas/ErrorLinks.generated.swift | 88 + .../ErrorSourceParameter.generated.swift | 6 +- .../ErrorSourcePointer.generated.swift | 6 +- .../Schemas/ExternalBetaState.generated.swift | 104 +- .../Schemas/FileLocation.generated.swift | 2 +- .../GameCenterAchievement.generated.swift | 186 +- ...GameCenterAchievementImage.generated.swift | 42 +- ...terAchievementLocalization.generated.swift | 66 +- ...meCenterAchievementRelease.generated.swift | 76 +- .../GameCenterActivity.generated.swift | 358 ++ .../GameCenterActivityImage.generated.swift | 73 + ...enterActivityLocalization.generated.swift} | 120 +- .../GameCenterActivityVersion.generated.swift | 263 ++ ...nterActivityVersionRelease.generated.swift | 86 + .../GameCenterAppVersion.generated.swift | 66 +- .../GameCenterChallenge.generated.swift | 311 ++ .../GameCenterChallengeImage.generated.swift | 73 + ...enterChallengeLocalization.generated.swift | 164 + ...ameCenterChallengeVersion.generated.swift} | 184 +- ...terChallengeVersionRelease.generated.swift | 86 + .../Schemas/GameCenterDetail.generated.swift | 491 +-- .../GameCenterEnabledVersion.generated.swift | 71 +- .../Schemas/GameCenterGroup.generated.swift | 190 +- .../GameCenterLeaderboard.generated.swift | 328 +- ...LeaderboardEntrySubmission.generated.swift | 83 + ...CenterLeaderboardFormatter.generated.swift | 142 +- ...GameCenterLeaderboardImage.generated.swift | 42 +- ...terLeaderboardLocalization.generated.swift | 71 +- ...meCenterLeaderboardRelease.generated.swift | 76 +- .../GameCenterLeaderboardSet.generated.swift | 193 +- ...eCenterLeaderboardSetImage.generated.swift | 42 +- ...LeaderboardSetLocalization.generated.swift | 71 +- ...boardSetMemberLocalization.generated.swift | 66 +- ...enterLeaderboardSetRelease.generated.swift | 76 +- ...GameCenterMatchmakingQueue.generated.swift | 85 +- .../GameCenterMatchmakingRule.generated.swift | 50 +- ...meCenterMatchmakingRuleSet.generated.swift | 95 +- ...nterMatchmakingRuleSetTest.generated.swift | 8 +- .../GameCenterMatchmakingTeam.generated.swift | 6 +- ...rMatchmakingTeamAssignment.generated.swift | 2 +- ...PlayerPropertyInlineCreate.generated.swift | 6 +- ...ingTestRequestInlineCreate.generated.swift | 303 +- ...layerAchievementSubmission.generated.swift | 78 + .../GameCenterVersionState.generated.swift | 54 + .../Schemas/HttpHeader.generated.swift | 2 +- .../Schemas/IconAssetType.generated.swift | 58 +- .../Schemas/ImageAsset.generated.swift | 2 +- .../Schemas/InAppPurchase.generated.swift | 238 +- ...seAppStoreReviewScreenshot.generated.swift | 42 +- .../InAppPurchaseAvailability.generated.swift | 37 +- .../InAppPurchaseContent.generated.swift | 42 +- .../InAppPurchaseImage.generated.swift | 175 + .../InAppPurchaseLocalization.generated.swift | 86 +- .../InAppPurchasePrice.generated.swift | 76 +- ...pPurchasePriceInlineCreate.generated.swift | 20 +- .../InAppPurchasePricePoint.generated.swift | 69 +- ...InAppPurchasePriceSchedule.generated.swift | 159 +- .../InAppPurchaseState.generated.swift | 100 +- .../InAppPurchaseSubmission.generated.swift | 40 +- .../Schemas/InAppPurchaseType.generated.swift | 37 +- .../Schemas/InAppPurchaseV2.generated.swift | 249 +- .../Schemas/IntegerRange.generated.swift | 25 + .../Schemas/InternalBetaState.generated.swift | 65 +- .../Schemas/KidsAgeBand.generated.swift | 37 +- .../Schemas/Location.generated.swift | 2 +- .../MarketplaceSearchDetail.generated.swift | 51 + .../MarketplaceWebhook.generated.swift | 51 + .../Schemas/MerchantId.generated.swift | 122 + .../Schemas/MetricCategory.generated.swift | 65 +- .../Schemas/MetricsInsight.generated.swift | 4 +- .../Schemas/Nomination.generated.swift | 451 +++ .../PagedDocumentLinks.generated.swift | 2 +- .../Schemas/PagingInformation.generated.swift | 9 +- .../Schemas/PassTypeId.generated.swift | 122 + .../Schemas/PerfPowerMetric.generated.swift | 92 +- .../PhasedReleaseState.generated.swift | 44 +- .../Schemas/Platform.generated.swift | 41 +- .../Schemas/PrereleaseVersion.generated.swift | 66 +- .../Schemas/PreviewFrameImage.generated.swift | 25 + .../Schemas/PreviewType.generated.swift | 125 +- .../Schemas/Profile.generated.swift | 237 +- .../Schemas/PromotedPurchase.generated.swift | 191 +- .../PromotedPurchaseImage.generated.swift | 203 - .../Schemas/Property.generated.swift | 2 +- .../Schemas/RelationshipLinks.generated.swift | 25 + ...tyDeclarationCreateRequest.generated.swift | 152 + ...tyDeclarationUpdateRequest.generated.swift | 105 + ...ngDeclarationUpdateRequest.generated.swift | 377 +- ...ibutionDomainCreateRequest.generated.swift | 60 + ...stributionKeyCreateRequest.generated.swift | 105 + ...utionPackageCreateRequest.generated.swift} | 16 +- .../AnalyticsReportRequest.generated.swift | 142 + ...ReportRequestCreateRequest.generated.swift | 125 + ...vailabilityV2CreateRequest.generated.swift | 22 +- ...BetaTestersLinkagesRequest.generated.swift | 6 +- ...cedExperienceCreateRequest.generated.swift | 567 +-- ...perienceImageCreateRequest.generated.swift | 8 +- ...perienceImageUpdateRequest.generated.swift | 8 +- ...cedExperienceUpdateRequest.generated.swift | 567 +-- ...eReviewDetailCreateRequest.generated.swift | 16 +- ...eReviewDetailUpdateRequest.generated.swift | 8 +- ...ultExperienceCreateRequest.generated.swift | 28 +- ...eLocalizationCreateRequest.generated.swift | 16 +- ...eLocalizationUpdateRequest.generated.swift | 8 +- ...StoreVersionLinkageRequest.generated.swift | 6 +- ...ultExperienceUpdateRequest.generated.swift | 16 +- ...ipHeaderImageCreateRequest.generated.swift | 16 +- ...ipHeaderImageUpdateRequest.generated.swift | 8 +- ...omProductPageCreateRequest.generated.swift | 36 +- ...eLocalizationCreateRequest.generated.swift | 16 +- ...eLocalizationUpdateRequest.generated.swift | 8 +- ...omProductPageUpdateRequest.generated.swift | 8 +- ...ctPageVersionCreateRequest.generated.swift | 37 +- ...ctPageVersionUpdateRequest.generated.swift | 58 + ...ationBuildsLinkagesRequest.generated.swift | 6 +- ...onDeclarationCreateRequest.generated.swift | 123 + ...ationDocumentCreateRequest.generated.swift | 16 +- ...ationDocumentUpdateRequest.generated.swift | 8 +- .../AppEventCreateRequest.generated.swift | 182 +- ...tLocalizationCreateRequest.generated.swift | 16 +- ...tLocalizationUpdateRequest.generated.swift | 8 +- ...entScreenshotCreateRequest.generated.swift | 16 +- ...entScreenshotUpdateRequest.generated.swift | 8 +- .../AppEventUpdateRequest.generated.swift | 172 +- ...ventVideoClipCreateRequest.generated.swift | 16 +- ...ventVideoClipUpdateRequest.generated.swift | 8 +- ...oLocalizationCreateRequest.generated.swift | 20 +- ...oLocalizationUpdateRequest.generated.swift | 8 +- .../AppInfoUpdateRequest.generated.swift | 44 +- .../AppPreviewCreateRequest.generated.swift | 16 +- ...AppPreviewsLinkagesRequest.generated.swift | 6 +- ...AppPreviewSetCreateRequest.generated.swift | 28 +- .../AppPreviewUpdateRequest.generated.swift | 8 +- ...PriceScheduleCreateRequest.generated.swift | 28 +- ...edPurchasesLinkagesRequest.generated.swift | 6 +- ...AppScreenshotCreateRequest.generated.swift | 16 +- ...ScreenshotsLinkagesRequest.generated.swift | 6 +- ...ScreenshotSetCreateRequest.generated.swift | 28 +- ...AppScreenshotUpdateRequest.generated.swift | 8 +- ...iewAttachmentCreateRequest.generated.swift | 16 +- ...iewAttachmentUpdateRequest.generated.swift | 8 +- ...eReviewDetailCreateRequest.generated.swift | 16 +- ...eReviewDetailUpdateRequest.generated.swift | 8 +- ...ltExperienceLinkageRequest.generated.swift | 6 +- ...VersionBuildLinkageRequest.generated.swift | 6 +- ...pStoreVersionCreateRequest.generated.swift | 96 +- ...ionExperimentCreateRequest.generated.swift | 16 +- ...mentTreatmentCreateRequest.generated.swift | 34 +- ...tLocalizationCreateRequest.generated.swift | 16 +- ...mentTreatmentUpdateRequest.generated.swift | 8 +- ...ionExperimentUpdateRequest.generated.swift | 8 +- ...nExperimentV2CreateRequest.generated.swift | 16 +- ...nExperimentV2UpdateRequest.generated.swift | 8 +- ...nLocalizationCreateRequest.generated.swift | 16 +- ...nLocalizationUpdateRequest.generated.swift | 8 +- ...PhasedReleaseCreateRequest.generated.swift | 16 +- ...PhasedReleaseUpdateRequest.generated.swift | 8 +- ...sionPromotionCreateRequest.generated.swift | 20 +- ...StoreVersionReleaseRequest.generated.swift | 4 +- ...eleaseRequestCreateRequest.generated.swift | 14 +- ...pStoreVersionUpdateRequest.generated.swift | 90 +- .../Requests/AppUpdateRequest.generated.swift | 151 +- ...ckgroundAssetCreateRequest.generated.swift | 105 + ...setUploadFileCreateRequest.generated.swift | 137 + ...setUploadFileUpdateRequest.generated.swift | 65 + ...dAssetVersionCreateRequest.generated.swift | 88 + ...lipInvocationCreateRequest.generated.swift | 22 +- ...nLocalizationCreateRequest.generated.swift | 16 +- ...nLocalizationUpdateRequest.generated.swift | 8 +- ...lipInvocationUpdateRequest.generated.swift | 8 +- ...pLocalizationCreateRequest.generated.swift | 16 +- ...pLocalizationUpdateRequest.generated.swift | 8 +- ...pReviewDetailUpdateRequest.generated.swift | 8 +- ...iewSubmissionCreateRequest.generated.swift | 14 +- ...dLocalizationCreateRequest.generated.swift | 16 +- ...dLocalizationUpdateRequest.generated.swift | 8 +- ...BetaTestersLinkagesRequest.generated.swift | 6 +- ...GroupBuildsLinkagesRequest.generated.swift | 6 +- .../BetaGroupCreateRequest.generated.swift | 28 +- .../BetaGroupUpdateRequest.generated.swift | 13 +- ...enseAgreementUpdateRequest.generated.swift | 8 +- ...mentCriterionCreateRequest.generated.swift | 105 + ...mentCriterionUpdateRequest.generated.swift | 58 + ...aTesterAppsLinkagesRequest.generated.swift | 6 +- ...rBetaGroupsLinkagesRequest.generated.swift | 6 +- ...esterBuildsLinkagesRequest.generated.swift | 6 +- .../BetaTesterCreateRequest.generated.swift | 22 +- ...terInvitationCreateRequest.generated.swift | 29 +- ...nDeclarationLinkageRequest.generated.swift | 6 +- ...ildBetaDetailUpdateRequest.generated.swift | 8 +- ...dBetaGroupsLinkagesRequest.generated.swift | 6 +- ...aNotificationCreateRequest.generated.swift | 14 +- ...dualTestersLinkagesRequest.generated.swift | 6 +- .../BuildUpdateRequest.generated.swift | 16 +- ...eIdCapabilityCreateRequest.generated.swift | 16 +- ...eIdCapabilityUpdateRequest.generated.swift | 8 +- .../BundleIdCreateRequest.generated.swift | 8 +- .../BundleIdUpdateRequest.generated.swift | 8 +- .../CertificateCreateRequest.generated.swift | 104 +- .../CertificateUpdateRequest.generated.swift | 58 + .../CiBuildRunCreateRequest.generated.swift | 34 +- .../CiWorkflowCreateRequest.generated.swift | 49 +- .../CiWorkflowUpdateRequest.generated.swift | 37 +- ...iewResponseV1CreateRequest.generated.swift | 16 +- .../DeviceCreateRequest.generated.swift | 8 +- .../DeviceUpdateRequest.generated.swift | 38 +- ...ilityPreOrderCreateRequest.generated.swift | 14 +- ...enseAgreementCreateRequest.generated.swift | 22 +- ...enseAgreementUpdateRequest.generated.swift | 16 +- ...mentActivityLinkageRequest.generated.swift | 41 + ...erAchievementCreateRequest.generated.swift | 27 +- ...pAchievementLinkageRequest.generated.swift | 6 +- ...ievementImageCreateRequest.generated.swift | 16 +- ...ievementImageUpdateRequest.generated.swift | 8 +- ...tLocalizationCreateRequest.generated.swift | 16 +- ...tLocalizationUpdateRequest.generated.swift | 8 +- ...vementReleaseCreateRequest.generated.swift | 20 +- ...erAchievementUpdateRequest.generated.swift | 13 +- ...chievementsLinkagesRequest.generated.swift | 41 + ...enterActivityCreateRequest.generated.swift | 199 + ...ActivityImageCreateRequest.generated.swift | 154 + ...ActivityImageUpdateRequest.generated.swift | 58 + ...eaderboardsLinkagesRequest.generated.swift | 41 + ...yLocalizationCreateRequest.generated.swift | 117 + ...yLocalizationUpdateRequest.generated.swift | 65 + ...enterActivityUpdateRequest.generated.swift | 110 + ...tivityVersionCreateRequest.generated.swift | 105 + ...rsionReleaseCreateRequest.generated.swift} | 63 +- ...tivityVersionUpdateRequest.generated.swift | 58 + ...ityVersionsLinkagesRequest.generated.swift | 6 +- ...terAppVersionCreateRequest.generated.swift | 14 +- ...terAppVersionUpdateRequest.generated.swift | 8 +- ...nterChallengeCreateRequest.generated.swift | 249 ++ ...hallengeImageCreateRequest.generated.swift | 154 + ...hallengeImageUpdateRequest.generated.swift | 58 + ...eLeaderboardLinkageRequest.generated.swift | 41 + ...eLocalizationCreateRequest.generated.swift | 117 + ...eLocalizationUpdateRequest.generated.swift | 65 + ...nterChallengeUpdateRequest.generated.swift | 151 + ...llengeVersionCreateRequest.generated.swift | 88 + ...ersionReleaseCreateRequest.generated.swift | 130 + ...ormVersionsLinkagesRequest.generated.swift | 41 + ...eCenterDetailCreateRequest.generated.swift | 17 +- ...chievementsLinkagesRequest.generated.swift | 6 +- ...erboardSetsLinkagesRequest.generated.swift | 6 +- ...eaderboardsLinkagesRequest.generated.swift | 6 +- ...eCenterDetailUpdateRequest.generated.swift | 29 +- ...bleVersionsLinkagesRequest.generated.swift | 6 +- ...meCenterGroupCreateRequest.generated.swift | 8 +- ...chievementsLinkagesRequest.generated.swift | 6 +- ...erboardSetsLinkagesRequest.generated.swift | 6 +- ...eaderboardsLinkagesRequest.generated.swift | 6 +- ...meCenterGroupUpdateRequest.generated.swift | 8 +- ...oardActivityLinkageRequest.generated.swift | 41 + ...ardChallengeLinkageRequest.generated.swift | 41 + ...erLeaderboardCreateRequest.generated.swift | 116 +- ...trySubmissionCreateRequest.generated.swift | 85 + ...pLeaderboardLinkageRequest.generated.swift | 6 +- ...derboardImageCreateRequest.generated.swift | 16 +- ...derboardImageUpdateRequest.generated.swift | 8 +- ...dLocalizationCreateRequest.generated.swift | 16 +- ...dLocalizationUpdateRequest.generated.swift | 8 +- ...rboardReleaseCreateRequest.generated.swift | 20 +- ...eaderboardSetCreateRequest.generated.swift | 28 +- ...eaderboardsLinkagesRequest.generated.swift | 6 +- ...aderboardSetLinkageRequest.generated.swift | 6 +- ...boardSetImageCreateRequest.generated.swift | 16 +- ...boardSetImageUpdateRequest.generated.swift | 8 +- ...tLocalizationCreateRequest.generated.swift | 16 +- ...tLocalizationUpdateRequest.generated.swift | 8 +- ...rLocalizationCreateRequest.generated.swift | 22 +- ...rLocalizationUpdateRequest.generated.swift | 8 +- ...ardSetReleaseCreateRequest.generated.swift | 20 +- ...eaderboardSetUpdateRequest.generated.swift | 8 +- ...erLeaderboardUpdateRequest.generated.swift | 100 +- ...chmakingQueueCreateRequest.generated.swift | 31 +- ...chmakingQueueUpdateRequest.generated.swift | 37 +- ...tchmakingRuleCreateRequest.generated.swift | 60 +- ...makingRuleSetCreateRequest.generated.swift | 8 +- ...ngRuleSetTestCreateRequest.generated.swift | 22 +- ...makingRuleSetUpdateRequest.generated.swift | 8 +- ...tchmakingRuleUpdateRequest.generated.swift | 8 +- ...tchmakingTeamCreateRequest.generated.swift | 16 +- ...tchmakingTeamUpdateRequest.generated.swift | 8 +- ...entSubmissionCreateRequest.generated.swift | 80 + ...iewScreenshotCreateRequest.generated.swift | 16 +- ...iewScreenshotUpdateRequest.generated.swift | 8 +- ...eAvailabilityCreateRequest.generated.swift | 22 +- ...PurchaseImageCreateRequest.generated.swift | 112 + ...PurchaseImageUpdateRequest.generated.swift | 65 + ...eLocalizationCreateRequest.generated.swift | 16 +- ...eLocalizationUpdateRequest.generated.swift | 8 +- ...PriceScheduleCreateRequest.generated.swift | 36 +- ...aseSubmissionCreateRequest.generated.swift | 14 +- ...AppPurchaseV2CreateRequest.generated.swift | 22 +- ...AppPurchaseV2UpdateRequest.generated.swift | 14 +- ...SearchDetailCreateRequest.generated.swift} | 30 +- ...eSearchDetailUpdateRequest.generated.swift | 58 + ...tplaceWebhookCreateRequest.generated.swift | 60 + ...tplaceWebhookUpdateRequest.generated.swift | 65 + .../MerchantIdCreateRequest.generated.swift | 60 + ...> MerchantIdUpdateRequest.generated.swift} | 18 +- .../NominationCreateRequest.generated.swift | 273 ++ .../NominationUpdateRequest.generated.swift | 283 ++ .../PassTypeIdCreateRequest.generated.swift | 60 + .../PassTypeIdUpdateRequest.generated.swift | 58 + .../ProfileCreateRequest.generated.swift | 142 +- ...motedPurchaseCreateRequest.generated.swift | 28 +- ...motedPurchaseUpdateRequest.generated.swift | 8 +- ...iewSubmissionCreateRequest.generated.swift | 24 +- ...ubmissionItemCreateRequest.generated.swift | 44 +- ...ubmissionItemUpdateRequest.generated.swift | 8 +- ...iewSubmissionUpdateRequest.generated.swift | 13 +- ...ngAppCoverageCreateRequest.generated.swift | 16 +- ...ngAppCoverageUpdateRequest.generated.swift | 8 +- ...ndboxTesterV2UpdateRequest.generated.swift | 59 +- ...toryRequestV2CreateRequest.generated.swift | 14 +- .../Requests/ScmPullRequest.generated.swift | 42 +- ...iewScreenshotCreateRequest.generated.swift | 16 +- ...iewScreenshotUpdateRequest.generated.swift | 8 +- ...nAvailabilityCreateRequest.generated.swift | 22 +- .../SubscriptionCreateRequest.generated.swift | 80 +- ...onGracePeriodUpdateRequest.generated.swift | 38 +- ...criptionGroupCreateRequest.generated.swift | 16 +- ...pLocalizationCreateRequest.generated.swift | 16 +- ...pLocalizationUpdateRequest.generated.swift | 8 +- ...oupSubmissionCreateRequest.generated.swift | 14 +- ...criptionGroupUpdateRequest.generated.swift | 8 +- ...riptionImageCreateRequest.generated.swift} | 28 +- ...riptionImageUpdateRequest.generated.swift} | 10 +- ...oductoryOfferCreateRequest.generated.swift | 28 +- ...oductoryOfferUpdateRequest.generated.swift | 8 +- ...ctoryOffersLinkagesRequest.generated.swift | 6 +- ...nLocalizationCreateRequest.generated.swift | 16 +- ...nLocalizationUpdateRequest.generated.swift | 8 +- ...tionOfferCodeCreateRequest.generated.swift | 22 +- ...odeCustomCodeCreateRequest.generated.swift | 16 +- ...odeCustomCodeUpdateRequest.generated.swift | 8 +- ...neTimeUseCodeCreateRequest.generated.swift | 16 +- ...neTimeUseCodeUpdateRequest.generated.swift | 8 +- ...tionOfferCodeUpdateRequest.generated.swift | 8 +- ...criptionPriceCreateRequest.generated.swift | 28 +- ...ptionPricesLinkagesRequest.generated.swift | 6 +- ...motionalOfferCreateRequest.generated.swift | 22 +- ...motionalOfferUpdateRequest.generated.swift | 14 +- ...ionSubmissionCreateRequest.generated.swift | 14 +- .../SubscriptionUpdateRequest.generated.swift | 94 +- ...yAvailabilityUpdateRequest.generated.swift | 8 +- ...serInvitationCreateRequest.generated.swift | 16 +- .../UserUpdateRequest.generated.swift | 16 +- ...VisibleAppsLinkagesRequest.generated.swift | 6 +- .../WebhookCreateRequest.generated.swift | 127 + ...bhookDeliveryCreateRequest.generated.swift | 88 + .../WebhookPingCreateRequest.generated.swift | 88 + .../WebhookUpdateRequest.generated.swift | 80 + .../WinBackOfferCreateRequest.generated.swift | 251 ++ .../WinBackOfferUpdateRequest.generated.swift | 130 + .../Schemas/ResourceLinks.generated.swift | 2 +- ...ibilityDeclarationResponse.generated.swift | 25 + ...bilityDeclarationsResponse.generated.swift | 30 + .../Responses/ActorResponse.generated.swift | 2 +- .../Responses/ActorsResponse.generated.swift | 2 +- ...eRatingDeclarationResponse.generated.swift | 2 +- ...ionWithoutIncludesResponse.generated.swift | 6 +- ...DistributionDomainResponse.generated.swift | 25 + ...istributionDomainsResponse.generated.swift | 30 + ...iveDistributionKeyResponse.generated.swift | 25 + ...veDistributionKeysResponse.generated.swift | 30 + ...butionPackageDeltaResponse.generated.swift | 25 + ...utionPackageDeltasResponse.generated.swift | 30 + ...istributionPackageResponse.generated.swift | 30 + ...tionPackageVariantResponse.generated.swift | 25 + ...ionPackageVariantsResponse.generated.swift | 30 + ...sionDeltasLinkagesResponse.generated.swift | 53 + ...tionPackageVersionResponse.generated.swift | 71 + ...onVariantsLinkagesResponse.generated.swift | 53 + ...geVersionsLinkagesResponse.generated.swift | 53 + ...ionPackageVersionsResponse.generated.swift | 76 + ...ticsReportInstanceResponse.generated.swift | 25 + ...ceSegmentsLinkagesResponse.generated.swift | 53 + ...tInstancesLinkagesResponse.generated.swift | 53 + ...icsReportInstancesResponse.generated.swift | 30 + ...estReportsLinkagesResponse.generated.swift | 53 + ...yticsReportRequestResponse.generated.swift | 30 + ...ticsReportRequestsResponse.generated.swift | 35 + .../AnalyticsReportResponse.generated.swift | 25 + ...yticsReportSegmentResponse.generated.swift | 25 + ...ticsReportSegmentsResponse.generated.swift | 30 + ... AnalyticsReportsResponse.generated.swift} | 6 +- ...clarationsLinkagesResponse.generated.swift | 53 + ...ributionKeyLinkageResponse.generated.swift | 48 + ...rtRequestsLinkagesResponse.generated.swift | 53 + ...ilabilityV2LinkageResponse.generated.swift | 48 + ...ppAppClipsLinkagesResponse.generated.swift | 53 + ...oductPagesLinkagesResponse.generated.swift | 53 + ...clarationsLinkagesResponse.generated.swift | 53 + ...pAppEventsLinkagesResponse.generated.swift | 53 + ...ppAppInfosLinkagesResponse.generated.swift | 53 + ...ricePointsLinkagesResponse.generated.swift | 53 + ...iceScheduleLinkageResponse.generated.swift | 48 + ...erimentsV2LinkagesResponse.generated.swift | 53 + ...reVersionsLinkagesResponse.generated.swift | 53 + .../AppAvailabilityV2Response.generated.swift | 2 +- ...labilitiesLinkagesResponse.generated.swift | 53 + ...oundAssetsLinkagesResponse.generated.swift | 53 + ...alizationsLinkagesResponse.generated.swift | 53 + ...eviewDetailLinkageResponse.generated.swift | 48 + ...ubmissionsLinkagesResponse.generated.swift | 53 + ...ubmissionsLinkagesResponse.generated.swift | 53 + ...BetaGroupsLinkagesResponse.generated.swift | 53 + ...seAgreementLinkageResponse.generated.swift | 48 + .../AppBuildsLinkagesResponse.generated.swift | 53 + .../AppCategoriesResponse.generated.swift | 2 +- ...iesWithoutIncludesResponse.generated.swift | 2 +- ...egoryParentLinkageResponse.generated.swift | 48 + .../AppCategoryResponse.generated.swift | 2 +- ...categoriesLinkagesResponse.generated.swift | 53 + ...oryWithoutIncludesResponse.generated.swift | 2 +- ...ppCiProductLinkageResponse.generated.swift | 48 + ...cedExperienceImageResponse.generated.swift | 2 +- ...AdvancedExperienceResponse.generated.swift | 4 +- ...dvancedExperiencesResponse.generated.swift | 4 +- ...xperiencesLinkagesResponse.generated.swift | 53 + ...xperiencesLinkagesResponse.generated.swift | 53 + ...pStoreReviewDetailResponse.generated.swift | 2 +- ...eviewDetailLinkageResponse.generated.swift | 48 + ...alizationsLinkagesResponse.generated.swift | 53 + ...HeaderImageLinkageResponse.generated.swift | 48 + ...rienceLocalizationResponse.generated.swift | 4 +- ...ienceLocalizationsResponse.generated.swift | 4 +- ...toreVersionLinkageResponse.generated.swift | 6 +- ...pDefaultExperienceResponse.generated.swift | 4 +- ...DefaultExperiencesResponse.generated.swift | 4 +- ...ppClipDomainStatusResponse.generated.swift | 2 +- ...AppClipHeaderImageResponse.generated.swift | 2 +- .../Responses/AppClipResponse.generated.swift | 4 +- .../AppClipsResponse.generated.swift | 4 +- ...geVersionsLinkagesResponse.generated.swift | 53 + ...reviewSetsLinkagesResponse.generated.swift | 53 + ...enshotSetsLinkagesResponse.generated.swift | 53 + ...ctPageLocalizationResponse.generated.swift | 4 +- ...tPageLocalizationsResponse.generated.swift | 4 +- ...pCustomProductPageResponse.generated.swift | 4 +- ...alizationsLinkagesResponse.generated.swift | 53 + ...ProductPageVersionResponse.generated.swift | 4 +- ...roductPageVersionsResponse.generated.swift | 4 +- ...CustomProductPagesResponse.generated.swift | 4 +- ...merReviewsLinkagesResponse.generated.swift | 53 + ...ionDocumentLinkageResponse.generated.swift | 48 + ...larationAppLinkageResponse.generated.swift | 48 + ...eclarationDocumentResponse.generated.swift | 2 +- ...ryptionDeclarationResponse.generated.swift | 4 +- ...ionWithoutIncludesResponse.generated.swift | 6 +- ...yptionDeclarationsResponse.generated.swift | 4 +- ...seAgreementLinkageResponse.generated.swift | 48 + ...creenshotsLinkagesResponse.generated.swift | 53 + ...VideoClipsLinkagesResponse.generated.swift | 53 + ...pEventLocalizationResponse.generated.swift | 4 +- ...alizationsLinkagesResponse.generated.swift | 53 + ...EventLocalizationsResponse.generated.swift | 4 +- .../AppEventResponse.generated.swift | 2 +- ...AppEventScreenshotResponse.generated.swift | 2 +- ...ppEventScreenshotsResponse.generated.swift | 2 +- .../AppEventVideoClipResponse.generated.swift | 2 +- ...AppEventVideoClipsResponse.generated.swift | 2 +- .../AppEventsResponse.generated.swift | 2 +- ...enterDetailLinkageResponse.generated.swift | 48 + ...edVersionsLinkagesResponse.generated.swift | 53 + ...pPurchasesLinkagesResponse.generated.swift | 53 + ...urchasesV2LinkagesResponse.generated.swift | 53 + ...DeclarationLinkageResponse.generated.swift | 48 + ...alizationsLinkagesResponse.generated.swift | 53 + ...ppInfoLocalizationResponse.generated.swift | 2 +- ...pInfoLocalizationsResponse.generated.swift | 2 +- ...aryCategoryLinkageResponse.generated.swift | 48 + ...categoryOneLinkageResponse.generated.swift | 48 + ...categoryTwoLinkageResponse.generated.swift | 48 + .../Responses/AppInfoResponse.generated.swift | 4 +- ...aryCategoryLinkageResponse.generated.swift | 48 + ...categoryOneLinkageResponse.generated.swift | 48 + ...categoryTwoLinkageResponse.generated.swift | 48 + .../AppInfosResponse.generated.swift | 4 +- ...earchDetailLinkageResponse.generated.swift | 48 + ...werMetricsLinkagesResponse.generated.swift | 53 + ...seVersionsLinkagesResponse.generated.swift | 53 + .../AppPreviewResponse.generated.swift | 2 +- ...ppPreviewsLinkagesResponse.generated.swift | 6 +- .../AppPreviewSetResponse.generated.swift | 4 +- .../AppPreviewSetsResponse.generated.swift | 4 +- .../AppPreviewsResponse.generated.swift | 2 +- ...alizationsLinkagesResponse.generated.swift | 53 + .../AppPricePointV3Response.generated.swift | 4 +- .../AppPricePointsV3Response.generated.swift | 4 +- ...aticPricesLinkagesResponse.generated.swift | 53 + ...seTerritoryLinkageResponse.generated.swift | 48 + ...nualPricesLinkagesResponse.generated.swift | 53 + .../AppPriceScheduleResponse.generated.swift | 4 +- .../AppPricesV2Response.generated.swift | 4 +- ...dPurchasesLinkagesResponse.generated.swift | 6 +- .../Responses/AppResponse.generated.swift | 31 +- ...ubmissionsLinkagesResponse.generated.swift | 53 + .../AppScreenshotResponse.generated.swift | 2 +- ...creenshotsLinkagesResponse.generated.swift | 6 +- .../AppScreenshotSetResponse.generated.swift | 4 +- .../AppScreenshotSetsResponse.generated.swift | 4 +- .../AppScreenshotsResponse.generated.swift | 2 +- ...reReviewAttachmentResponse.generated.swift | 2 +- ...eReviewAttachmentsResponse.generated.swift | 2 +- ...ttachmentsLinkagesResponse.generated.swift | 53 + ...pStoreReviewDetailResponse.generated.swift | 4 +- ...DeclarationLinkageResponse.generated.swift | 48 + ...tionPackageLinkageResponse.generated.swift | 48 + ...tExperienceLinkageResponse.generated.swift | 6 +- ...eviewDetailLinkageResponse.generated.swift | 48 + ...xperimentsLinkagesResponse.generated.swift | 53 + ...erimentsV2LinkagesResponse.generated.swift | 53 + ...alizationsLinkagesResponse.generated.swift | 53 + ...asedReleaseLinkageResponse.generated.swift | 48 + ...nSubmissionLinkageResponse.generated.swift | 48 + ...ersionBuildLinkageResponse.generated.swift | 6 +- ...merReviewsLinkagesResponse.generated.swift | 53 + ...TreatmentsLinkagesResponse.generated.swift | 53 + ...eVersionExperimentResponse.generated.swift | 4 +- ...alizationsLinkagesResponse.generated.swift | 53 + ...reviewSetsLinkagesResponse.generated.swift | 53 + ...enshotSetsLinkagesResponse.generated.swift | 53 + ...atmentLocalizationResponse.generated.swift | 4 +- ...tmentLocalizationsResponse.generated.swift | 4 +- ...xperimentTreatmentResponse.generated.swift | 4 +- ...perimentTreatmentsResponse.generated.swift | 4 +- ...TreatmentsLinkagesResponse.generated.swift | 53 + ...ersionExperimentV2Response.generated.swift | 4 +- ...VersionExperimentsResponse.generated.swift | 4 +- ...rsionExperimentsV2Response.generated.swift | 4 +- ...rAppVersionLinkageResponse.generated.swift | 48 + ...reviewSetsLinkagesResponse.generated.swift | 53 + ...enshotSetsLinkagesResponse.generated.swift | 53 + ...ersionLocalizationResponse.generated.swift | 4 +- ...rsionLocalizationsResponse.generated.swift | 4 +- ...rsionPhasedReleaseResponse.generated.swift | 2 +- ...aseWithoutIncludesResponse.generated.swift | 6 +- ...reVersionPromotionResponse.generated.swift | 2 +- ...sionReleaseRequestResponse.generated.swift | 2 +- .../AppStoreVersionResponse.generated.swift | 22 +- ...AppCoverageLinkageResponse.generated.swift | 48 + ...eVersionSubmissionResponse.generated.swift | 2 +- .../AppStoreVersionsResponse.generated.swift | 22 +- ...GracePeriodLinkageResponse.generated.swift | 48 + ...tionGroupsLinkagesResponse.generated.swift | 53 + ...ppWebhooksLinkagesResponse.generated.swift | 53 + ...AppWithoutIncludesResponse.generated.swift | 6 +- ...sterUsagesV1MetricResponse.generated.swift | 23 +- .../Responses/AppsResponse.generated.swift | 31 +- ...ppsWithoutIncludesResponse.generated.swift | 6 +- .../BackgroundAssetResponse.generated.swift | 30 + ...undAssetUploadFileResponse.generated.swift | 25 + ...ndAssetUploadFilesResponse.generated.swift | 30 + ...ploadFilesLinkagesResponse.generated.swift | 53 + ...nternalBetaReleaseResponse.generated.swift | 30 + ...groundAssetVersionResponse.generated.swift | 62 + ...etVersionsLinkagesResponse.generated.swift | 53 + ...roundAssetVersionsResponse.generated.swift | 67 + .../BackgroundAssetsResponse.generated.swift | 35 + ...cationLocalizationResponse.generated.swift | 2 +- ...aAppClipInvocationResponse.generated.swift | 2 +- ...AppClipInvocationsResponse.generated.swift | 2 +- ...lizationAppLinkageResponse.generated.swift | 48 + ...etaAppLocalizationResponse.generated.swift | 2 +- ...taAppLocalizationsResponse.generated.swift | 2 +- ...onsWithoutIncludesResponse.generated.swift | 6 +- ...ewDetailAppLinkageResponse.generated.swift | 48 + ...etaAppReviewDetailResponse.generated.swift | 2 +- ...ailWithoutIncludesResponse.generated.swift | 6 +- ...taAppReviewDetailsResponse.generated.swift | 2 +- ...issionBuildLinkageResponse.generated.swift | 48 + ...ppReviewSubmissionResponse.generated.swift | 2 +- ...ionWithoutIncludesResponse.generated.swift | 6 +- ...pReviewSubmissionsResponse.generated.swift | 2 +- ...zationBuildLinkageResponse.generated.swift | 48 + ...aBuildLocalizationResponse.generated.swift | 2 +- ...BuildLocalizationsResponse.generated.swift | 2 +- ...onsWithoutIncludesResponse.generated.swift | 6 +- ...uildUsagesV1MetricResponse.generated.swift | 53 +- ...t => BetaCrashLogResponse.generated.swift} | 6 +- ...ionCrashLogLinkageResponse.generated.swift | 48 + ...ckCrashSubmissionResponse.generated.swift} | 20 +- ...kCrashSubmissionsResponse.generated.swift} | 20 +- ...eenshotSubmissionResponse.generated.swift} | 20 +- ...eenshotSubmissionsResponse.generated.swift | 67 + ...etaGroupAppLinkageResponse.generated.swift | 48 + ...entCriteriaLinkageResponse.generated.swift | 48 + ...eBuildCheckLinkageResponse.generated.swift | 48 + ...etaTestersLinkagesResponse.generated.swift | 6 +- ...roupBuildsLinkagesResponse.generated.swift | 6 +- .../BetaGroupResponse.generated.swift | 13 +- .../BetaGroupsResponse.generated.swift | 13 +- ...upsWithoutIncludesResponse.generated.swift | 6 +- ...greementAppLinkageResponse.generated.swift | 48 + ...taLicenseAgreementResponse.generated.swift | 2 +- ...entWithoutIncludesResponse.generated.swift | 6 +- ...aLicenseAgreementsResponse.generated.swift | 2 +- ...LinkUsagesV1MetricResponse.generated.swift | 110 + ...mpatibleBuildCheckResponse.generated.swift | 25 + ...ntCriterionOptionsResponse.generated.swift | 30 + ...cruitmentCriterionResponse.generated.swift | 25 + ...TesterAppsLinkagesResponse.generated.swift | 6 +- ...BetaGroupsLinkagesResponse.generated.swift | 6 +- ...sterBuildsLinkagesResponse.generated.swift | 6 +- ...taTesterInvitationResponse.generated.swift | 2 +- .../BetaTesterResponse.generated.swift | 4 +- ...sterUsagesV1MetricResponse.generated.swift | 23 +- .../BetaTestersResponse.generated.swift | 4 +- ...ersWithoutIncludesResponse.generated.swift | 6 +- ...DeclarationLinkageResponse.generated.swift | 6 +- .../BuildAppLinkageResponse.generated.swift | 48 + ...toreVersionLinkageResponse.generated.swift | 48 + ...wSubmissionLinkageResponse.generated.swift | 48 + ...alizationsLinkagesResponse.generated.swift | 53 + ...DetailBuildLinkageResponse.generated.swift | 48 + .../BuildBetaDetailResponse.generated.swift | 2 +- .../BuildBetaDetailsResponse.generated.swift | 2 +- ...ldBetaNotificationResponse.generated.swift | 2 +- ...dBetaDetailLinkageResponse.generated.swift | 48 + ...CacheStatusLinkageResponse.generated.swift | 48 + ...DebugStatusLinkageResponse.generated.swift | 48 + ...nvocationsLinkagesResponse.generated.swift | 53 + ...eFileSizesLinkagesResponse.generated.swift | 53 + ...ildBundleFileSizesResponse.generated.swift | 2 +- ...SignaturesLinkagesResponse.generated.swift | 53 + ...BuildIconsLinkagesResponse.generated.swift | 53 + .../BuildIconsResponse.generated.swift | 2 +- ...onsWithoutIncludesResponse.generated.swift | 6 +- ...ualTestersLinkagesResponse.generated.swift | 6 +- ...werMetricsLinkagesResponse.generated.swift | 53 + ...easeVersionLinkageResponse.generated.swift | 48 + .../Responses/BuildResponse.generated.swift | 4 +- ...ildWithoutIncludesResponse.generated.swift | 6 +- .../Responses/BuildsResponse.generated.swift | 4 +- ...ldsWithoutIncludesResponse.generated.swift | 6 +- ...BundleIdAppLinkageResponse.generated.swift | 48 + ...pabilitiesLinkagesResponse.generated.swift | 53 + ...ndleIdCapabilitiesResponse.generated.swift | 2 +- ...iesWithoutIncludesResponse.generated.swift | 6 +- ...BundleIdCapabilityResponse.generated.swift | 2 +- ...IdProfilesLinkagesResponse.generated.swift | 53 + .../BundleIdResponse.generated.swift | 4 +- ...eIdWithoutIncludesResponse.generated.swift | 6 +- .../BundleIdsResponse.generated.swift | 4 +- ...ePassTypeIdLinkageResponse.generated.swift | 48 + .../CertificateResponse.generated.swift | 7 +- .../CertificatesResponse.generated.swift | 7 +- ...tesWithoutIncludesResponse.generated.swift | 6 +- .../CiArtifactResponse.generated.swift | 2 +- .../CiArtifactsResponse.generated.swift | 2 +- ...nArtifactsLinkagesResponse.generated.swift | 53 + ...ionBuildRunLinkageResponse.generated.swift | 48 + ...tionIssuesLinkagesResponse.generated.swift | 53 + .../CiBuildActionResponse.generated.swift | 2 +- ...estResultsLinkagesResponse.generated.swift | 53 + .../CiBuildActionsResponse.generated.swift | 2 +- ...RunActionsLinkagesResponse.generated.swift | 53 + ...dRunBuildsLinkagesResponse.generated.swift | 53 + .../CiBuildRunResponse.generated.swift | 4 +- .../CiBuildRunsResponse.generated.swift | 4 +- .../Responses/CiIssueResponse.generated.swift | 2 +- .../CiIssuesResponse.generated.swift | 2 +- .../CiMacOsVersionResponse.generated.swift | 2 +- ...deVersionsLinkagesResponse.generated.swift | 53 + .../CiMacOsVersionsResponse.generated.swift | 2 +- ...positoriesLinkagesResponse.generated.swift | 53 + ...iProductAppLinkageResponse.generated.swift | 48 + ...tBuildRunsLinkagesResponse.generated.swift | 53 + ...positoriesLinkagesResponse.generated.swift | 53 + .../CiProductResponse.generated.swift | 4 +- ...tWorkflowsLinkagesResponse.generated.swift | 53 + .../CiProductsResponse.generated.swift | 4 +- .../CiTestResultResponse.generated.swift | 2 +- .../CiTestResultsResponse.generated.swift | 2 +- ...wBuildRunsLinkagesResponse.generated.swift | 53 + ...wRepositoryLinkageResponse.generated.swift | 48 + .../CiWorkflowResponse.generated.swift | 4 +- .../CiWorkflowsResponse.generated.swift | 4 +- ...OsVersionsLinkagesResponse.generated.swift | 53 + .../CiXcodeVersionResponse.generated.swift | 2 +- .../CiXcodeVersionsResponse.generated.swift | 2 +- .../CustomerReviewResponse.generated.swift | 2 +- ...iewResponseLinkageResponse.generated.swift | 48 + ...erReviewResponseV1Response.generated.swift | 2 +- ...viewSummarizationsResponse.generated.swift | 35 + .../CustomerReviewsResponse.generated.swift | 2 +- .../Responses/DeviceResponse.generated.swift | 2 +- .../Responses/DevicesResponse.generated.swift | 2 +- ...cesWithoutIncludesResponse.generated.swift | 6 +- ...natureLogsLinkagesResponse.generated.swift | 53 + ...agnosticSignaturesResponse.generated.swift | 2 +- ...ailabilityPreOrderResponse.generated.swift | 2 +- ...erLicenseAgreementResponse.generated.swift | 4 +- ...erritoriesLinkagesResponse.generated.swift | 53 + ...entWithoutIncludesResponse.generated.swift | 6 +- .../Responses/ErrorResponse.generated.swift | 16 +- ...AchievementLinkageResponse.generated.swift | 6 +- ...erAchievementImageResponse.generated.swift | 2 +- ...vementImageLinkageResponse.generated.swift | 48 + ...AchievementLinkageResponse.generated.swift | 48 + ...vementLocalizationResponse.generated.swift | 4 +- ...alizationsLinkagesResponse.generated.swift | 53 + ...ementLocalizationsResponse.generated.swift | 4 +- ...AchievementReleaseResponse.generated.swift | 4 +- ...ntReleasesLinkagesResponse.generated.swift | 53 + ...chievementReleasesResponse.generated.swift | 4 +- ...eCenterAchievementResponse.generated.swift | 13 +- ...CenterAchievementsResponse.generated.swift | 13 +- ...meCenterActivitiesResponse.generated.swift | 94 + ...enterActivityImageResponse.generated.swift | 25 + ...zationImageLinkageResponse.generated.swift | 48 + ...tivityLocalizationResponse.generated.swift | 62 + ...ivityLocalizationsResponse.generated.swift | 67 + ...GameCenterActivityResponse.generated.swift | 89 + ...efaultImageLinkageResponse.generated.swift | 48 + ...alizationsLinkagesResponse.generated.swift | 53 + ...vityVersionReleaseResponse.generated.swift | 30 + ...ityVersionReleasesResponse.generated.swift | 35 + ...terActivityVersionResponse.generated.swift | 80 + ...tyVersionsLinkagesResponse.generated.swift | 53 + ...erActivityVersionsResponse.generated.swift | 85 + ...toreVersionLinkageResponse.generated.swift | 48 + ...tyVersionsLinkagesResponse.generated.swift | 6 +- ...meCenterAppVersionResponse.generated.swift | 4 +- ...eCenterAppVersionsResponse.generated.swift | 4 +- ...nterChallengeImageResponse.generated.swift | 25 + ...zationImageLinkageResponse.generated.swift | 48 + ...llengeLocalizationResponse.generated.swift | 62 + ...lengeLocalizationsResponse.generated.swift | 67 + ...ameCenterChallengeResponse.generated.swift | 80 + ...efaultImageLinkageResponse.generated.swift | 48 + ...alizationsLinkagesResponse.generated.swift | 53 + ...engeVersionReleaseResponse.generated.swift | 30 + ...ngeVersionReleasesResponse.generated.swift | 35 + ...erChallengeVersionResponse.generated.swift | 80 + ...geVersionsLinkagesResponse.generated.swift | 53 + ...rChallengeVersionsResponse.generated.swift | 85 + ...meCenterChallengesResponse.generated.swift | 85 + ...ntReleasesLinkagesResponse.generated.swift | 53 + ...tyReleasesLinkagesResponse.generated.swift | 53 + ...geReleasesLinkagesResponse.generated.swift | 53 + ...hievementsLinkagesResponse.generated.swift | 6 +- ...ActivitiesLinkagesResponse.generated.swift | 53 + ...ppVersionsLinkagesResponse.generated.swift | 53 + ...ChallengesLinkagesResponse.generated.swift | 53 + ...CenterGroupLinkageResponse.generated.swift | 48 + ...rboardSetsLinkagesResponse.generated.swift | 6 +- ...aderboardsLinkagesResponse.generated.swift | 6 +- ...rdReleasesLinkagesResponse.generated.swift | 53 + ...etReleasesLinkagesResponse.generated.swift | 53 + .../GameCenterDetailResponse.generated.swift | 49 +- .../GameCenterDetailsResponse.generated.swift | 49 +- ...leVersionsLinkagesResponse.generated.swift | 6 +- ...terEnabledVersionsResponse.generated.swift | 4 +- ...hievementsLinkagesResponse.generated.swift | 6 +- ...ActivitiesLinkagesResponse.generated.swift | 53 + ...ChallengesLinkagesResponse.generated.swift | 53 + ...terDetailsLinkagesResponse.generated.swift | 53 + ...rboardSetsLinkagesResponse.generated.swift | 6 +- ...aderboardsLinkagesResponse.generated.swift | 6 +- .../GameCenterGroupResponse.generated.swift | 22 +- .../GameCenterGroupsResponse.generated.swift | 22 +- ...ardEntrySubmissionResponse.generated.swift | 25 + ...LeaderboardLinkageResponse.generated.swift | 6 +- ...erLeaderboardImageResponse.generated.swift | 2 +- ...rboardImageLinkageResponse.generated.swift | 48 + ...rboardLocalizationResponse.generated.swift | 4 +- ...alizationsLinkagesResponse.generated.swift | 53 + ...boardLocalizationsResponse.generated.swift | 4 +- ...LeaderboardReleaseResponse.generated.swift | 4 +- ...rdReleasesLinkagesResponse.generated.swift | 53 + ...eaderboardReleasesResponse.generated.swift | 4 +- ...eCenterLeaderboardResponse.generated.swift | 22 +- ...aderboardsLinkagesResponse.generated.swift | 6 +- ...derboardSetLinkageResponse.generated.swift | 6 +- ...eaderboardSetImageResponse.generated.swift | 2 +- ...ardSetImageLinkageResponse.generated.swift | 48 + ...ardSetLocalizationResponse.generated.swift | 4 +- ...alizationsLinkagesResponse.generated.swift | 53 + ...rdSetLocalizationsResponse.generated.swift | 4 +- ...LeaderboardLinkageResponse.generated.swift | 48 + ...derboardSetLinkageResponse.generated.swift | 48 + ...MemberLocalizationResponse.generated.swift | 4 +- ...emberLocalizationsResponse.generated.swift | 4 +- ...derboardSetReleaseResponse.generated.swift | 4 +- ...etReleasesLinkagesResponse.generated.swift | 53 + ...erboardSetReleasesResponse.generated.swift | 4 +- ...nterLeaderboardSetResponse.generated.swift | 4 +- ...terLeaderboardSetsResponse.generated.swift | 4 +- ...CenterLeaderboardsResponse.generated.swift | 22 +- ...ppRequestsV1MetricResponse.generated.swift | 84 +- ...uleResultsV1MetricResponse.generated.swift | 73 +- ...uleResultsV1MetricResponse.generated.swift | 60 +- ...ueRequestsV1MetricResponse.generated.swift | 97 +- ...erMatchmakingQueueResponse.generated.swift | 2 +- ...QueueSizesV1MetricResponse.generated.swift | 45 +- ...rMatchmakingQueuesResponse.generated.swift | 2 +- ...RuleErrorsV1MetricResponse.generated.swift | 60 +- ...terMatchmakingRuleResponse.generated.swift | 2 +- ...kingQueuesLinkagesResponse.generated.swift | 53 + ...MatchmakingRuleSetResponse.generated.swift | 4 +- ...leSetRulesLinkagesResponse.generated.swift | 53 + ...leSetTeamsLinkagesResponse.generated.swift | 53 + ...hmakingRuleSetTestResponse.generated.swift | 2 +- ...atchmakingRuleSetsResponse.generated.swift | 4 +- ...erMatchmakingRulesResponse.generated.swift | 2 +- ...ngSessionsV1MetricResponse.generated.swift | 45 +- ...terMatchmakingTeamResponse.generated.swift | 2 +- ...erMatchmakingTeamsResponse.generated.swift | 2 +- ...ievementSubmissionResponse.generated.swift | 25 + ...reReviewScreenshotResponse.generated.swift | 2 +- ...erritoriesLinkagesResponse.generated.swift | 53 + ...rchaseAvailabilityResponse.generated.swift | 2 +- ...AppPurchaseContentResponse.generated.swift | 2 +- ...nAppPurchaseImageResponse.generated.swift} | 10 +- ...AppPurchaseImagesResponse.generated.swift} | 10 +- ...rchaseLocalizationResponse.generated.swift | 2 +- ...chaseLocalizationsResponse.generated.swift | 2 +- ...alizationsLinkagesResponse.generated.swift | 53 + ...urchasePricePointsResponse.generated.swift | 2 +- ...aticPricesLinkagesResponse.generated.swift | 53 + ...seTerritoryLinkageResponse.generated.swift | 48 + ...nualPricesLinkagesResponse.generated.swift | 53 + ...chasePriceScheduleResponse.generated.swift | 13 +- ...nAppPurchasePricesResponse.generated.swift | 4 +- .../InAppPurchaseResponse.generated.swift | 2 +- ...PurchaseSubmissionResponse.generated.swift | 2 +- ...wScreenshotLinkageResponse.generated.swift | 48 + ...seV2ContentLinkageResponse.generated.swift | 48 + ...iceScheduleLinkageResponse.generated.swift | 48 + ...seV2ImagesLinkagesResponse.generated.swift | 53 + ...vailabilityLinkageResponse.generated.swift | 48 + ...alizationsLinkagesResponse.generated.swift | 53 + ...ricePointsLinkagesResponse.generated.swift | 53 + ...tedPurchaseLinkageResponse.generated.swift | 48 + .../InAppPurchaseV2Response.generated.swift | 13 +- .../InAppPurchasesResponse.generated.swift | 2 +- .../InAppPurchasesV2Response.generated.swift | 13 +- ...tplaceSearchDetailResponse.generated.swift | 25 + ...MarketplaceWebhookResponse.generated.swift | 25 + ...arketplaceWebhooksResponse.generated.swift | 30 + ...rtificatesLinkagesResponse.generated.swift | 53 + ...ift => MerchantIdResponse.generated.swift} | 10 +- ...ft => MerchantIdsResponse.generated.swift} | 10 +- ...ift => NominationResponse.generated.swift} | 26 +- ...ft => NominationsResponse.generated.swift} | 23 +- ...rtificatesLinkagesResponse.generated.swift | 53 + .../PassTypeIdResponse.generated.swift | 30 + .../PassTypeIdsResponse.generated.swift | 35 + ...PreReleaseVersionsResponse.generated.swift | 4 +- ...onsWithoutIncludesResponse.generated.swift | 6 +- ...eVersionAppLinkageResponse.generated.swift | 48 + ...sionBuildsLinkagesResponse.generated.swift | 53 + .../PrereleaseVersionResponse.generated.swift | 4 +- ...ionWithoutIncludesResponse.generated.swift | 6 +- ...ileBundleIdLinkageResponse.generated.swift | 48 + ...rtificatesLinkagesResponse.generated.swift | 53 + ...ileDevicesLinkagesResponse.generated.swift | 53 + .../Responses/ProfileResponse.generated.swift | 4 +- .../ProfilesResponse.generated.swift | 4 +- ...lesWithoutIncludesResponse.generated.swift | 6 +- .../PromotedPurchaseResponse.generated.swift | 13 +- .../PromotedPurchasesResponse.generated.swift | 13 +- ...viewSubmissionItemResponse.generated.swift | 4 +- ...ssionItemsLinkagesResponse.generated.swift | 53 + ...iewSubmissionItemsResponse.generated.swift | 4 +- .../ReviewSubmissionResponse.generated.swift | 4 +- .../ReviewSubmissionsResponse.generated.swift | 4 +- ...RoutingAppCoverageResponse.generated.swift | 2 +- ...ageWithoutIncludesResponse.generated.swift | 6 +- .../SandboxTesterV2Response.generated.swift | 2 +- ...seHistoryRequestV2Response.generated.swift | 2 +- .../SandboxTestersV2Response.generated.swift | 2 +- .../ScmGitReferenceResponse.generated.swift | 2 +- .../ScmGitReferencesResponse.generated.swift | 2 +- ...positoriesLinkagesResponse.generated.swift | 53 + .../ScmProviderResponse.generated.swift | 2 +- .../ScmProvidersResponse.generated.swift | 2 +- .../ScmPullRequestResponse.generated.swift | 2 +- .../ScmPullRequestsResponse.generated.swift | 2 +- .../ScmRepositoriesResponse.generated.swift | 4 +- ...ReferencesLinkagesResponse.generated.swift | 53 + ...llRequestsLinkagesResponse.generated.swift | 53 + .../ScmRepositoryResponse.generated.swift | 4 +- ...wScreenshotLinkageResponse.generated.swift | 48 + ...reReviewScreenshotResponse.generated.swift | 2 +- ...erritoriesLinkagesResponse.generated.swift | 53 + ...iptionAvailabilityResponse.generated.swift | 38 +- ...riptionGracePeriodResponse.generated.swift | 2 +- ...nGroupLocalizationResponse.generated.swift | 2 +- ...GroupLocalizationsResponse.generated.swift | 2 +- .../SubscriptionGroupResponse.generated.swift | 4 +- ...ionGroupSubmissionResponse.generated.swift | 2 +- ...alizationsLinkagesResponse.generated.swift | 53 + ...scriptionsLinkagesResponse.generated.swift | 53 + ...SubscriptionGroupsResponse.generated.swift | 4 +- .../SubscriptionImageResponse.generated.swift | 30 + ...tionImagesLinkagesResponse.generated.swift | 53 + ...SubscriptionImagesResponse.generated.swift | 35 + ...nIntroductoryOfferResponse.generated.swift | 4 +- ...toryOffersLinkagesResponse.generated.swift | 6 +- ...IntroductoryOffersResponse.generated.swift | 4 +- ...iptionLocalizationResponse.generated.swift | 2 +- ...ptionLocalizationsResponse.generated.swift | 2 +- ...fferCodeCustomCodeResponse.generated.swift | 2 +- ...ustomCodesLinkagesResponse.generated.swift | 53 + ...ferCodeCustomCodesResponse.generated.swift | 2 +- ...CodeOneTimeUseCodeResponse.generated.swift | 2 +- ...eCodeValuesLinkageResponse.generated.swift | 48 + ...meUseCodesLinkagesResponse.generated.swift | 53 + ...odeOneTimeUseCodesResponse.generated.swift | 2 +- ...CodePricesLinkagesResponse.generated.swift | 53 + ...ionOfferCodePricesResponse.generated.swift | 4 +- ...scriptionOfferCodeResponse.generated.swift | 4 +- ...OfferCodesLinkagesResponse.generated.swift | 53 + ...criptionOfferCodesResponse.generated.swift | 4 +- ...alizationsLinkagesResponse.generated.swift | 53 + ...criptionPricePointResponse.generated.swift | 2 +- ...ricePointsLinkagesResponse.generated.swift | 53 + ...riptionPricePointsResponse.generated.swift | 2 +- .../SubscriptionPriceResponse.generated.swift | 4 +- ...tionPricesLinkagesResponse.generated.swift | 6 +- ...SubscriptionPricesResponse.generated.swift | 4 +- ...tedPurchaseLinkageResponse.generated.swift | 48 + ...fferPricesLinkagesResponse.generated.swift | 53 + ...otionalOfferPricesResponse.generated.swift | 4 +- ...onPromotionalOfferResponse.generated.swift | 4 +- ...onalOffersLinkagesResponse.generated.swift | 53 + ...nPromotionalOffersResponse.generated.swift | 4 +- .../SubscriptionResponse.generated.swift | 22 +- ...criptionSubmissionResponse.generated.swift | 2 +- ...vailabilityLinkageResponse.generated.swift | 48 + ...alizationsLinkagesResponse.generated.swift | 53 + ...BackOffersLinkagesResponse.generated.swift | 53 + .../SubscriptionsResponse.generated.swift | 22 +- .../TerritoriesResponse.generated.swift | 2 +- ...iesWithoutIncludesResponse.generated.swift | 6 +- ...toryAvailabilitiesResponse.generated.swift | 2 +- ...ritoryAvailabilityResponse.generated.swift | 2 +- .../TerritoryResponse.generated.swift | 2 +- .../UserInvitationResponse.generated.swift | 2 +- ...isibleAppsLinkagesResponse.generated.swift | 53 + .../UserInvitationsResponse.generated.swift | 2 +- .../Responses/UserResponse.generated.swift | 2 +- ...isibleAppsLinkagesResponse.generated.swift | 6 +- .../Responses/UsersResponse.generated.swift | 2 +- ...DeliveriesLinkagesResponse.generated.swift | 53 + .../WebhookDeliveriesResponse.generated.swift | 35 + .../WebhookDeliveryResponse.generated.swift | 30 + ...ft => WebhookPingResponse.generated.swift} | 6 +- ....swift => WebhookResponse.generated.swift} | 6 +- .../WebhooksResponse.generated.swift | 35 + ...fferPricesLinkagesResponse.generated.swift | 53 + ...inBackOfferPricesResponse.generated.swift} | 18 +- .../WinBackOfferResponse.generated.swift | 30 + .../WinBackOffersResponse.generated.swift | 35 + .../Schemas/ReviewSubmission.generated.swift | 238 +- .../ReviewSubmissionItem.generated.swift | 229 +- .../RoutingAppCoverage.generated.swift | 42 +- .../Schemas/SandboxTesterV2.generated.swift | 57 +- ...arPurchaseHistoryRequestV2.generated.swift | 4 +- .../Schemas/ScmGitReference.generated.swift | 42 +- .../Schemas/ScmProvider.generated.swift | 35 +- .../Schemas/ScmProviderType.generated.swift | 60 +- .../Schemas/ScmRepository.generated.swift | 100 +- .../ScreenshotDisplayType.generated.swift | 241 +- .../Schemas/Subscription.generated.swift | 491 ++- ...onAppStoreReviewScreenshot.generated.swift | 42 +- .../SubscriptionAvailability.generated.swift | 107 +- ...riptionCustomerEligibility.generated.swift | 37 +- .../SubscriptionGracePeriod.generated.swift | 36 +- ...riptionGracePeriodDuration.generated.swift | 37 +- .../Schemas/SubscriptionGroup.generated.swift | 66 +- ...scriptionGroupLocalization.generated.swift | 86 +- ...ubscriptionGroupSubmission.generated.swift | 4 +- .../Schemas/SubscriptionImage.generated.swift | 175 + ...scriptionIntroductoryOffer.generated.swift | 110 +- ...roductoryOfferInlineCreate.generated.swift | 26 +- .../SubscriptionLocalization.generated.swift | 86 +- .../SubscriptionOfferCode.generated.swift | 136 +- ...riptionOfferCodeCustomCode.generated.swift | 42 +- ...ionOfferCodeOneTimeUseCode.generated.swift | 55 +- ...ferCodeOneTimeUseCodeValue.generated.swift | 4 +- ...SubscriptionOfferCodePrice.generated.swift | 74 +- ...OfferCodePriceInlineCreate.generated.swift | 18 +- .../SubscriptionOfferDuration.generated.swift | 75 +- ...bscriptionOfferEligibility.generated.swift | 28 +- .../SubscriptionOfferMode.generated.swift | 37 +- .../Schemas/SubscriptionPrice.generated.swift | 76 +- ...scriptionPriceInlineCreate.generated.swift | 26 +- .../SubscriptionPricePoint.generated.swift | 63 +- ...tionPricePointInlineCreate.generated.swift | 4 +- ...bscriptionPromotionalOffer.generated.swift | 71 +- ...omotionalOfferInlineCreate.generated.swift | 20 +- ...ptionPromotionalOfferPrice.generated.swift | 74 +- ...onalOfferPriceInlineCreate.generated.swift | 18 +- ...bscriptionStatusUrlVersion.generated.swift | 34 +- .../SubscriptionSubmission.generated.swift | 40 +- .../Schemas/Territory.generated.swift | 6 +- .../TerritoryAvailability.generated.swift | 277 +- ...ryAvailabilityInlineCreate.generated.swift | 4 +- .../Schemas/TerritoryCode.generated.swift | 1640 +++++---- .../TerritoryInlineCreate.generated.swift | 4 +- .../Schemas/UploadOperation.generated.swift | 2 +- .../Schemas/User.generated.swift | 37 +- .../Schemas/UserInvitation.generated.swift | 37 +- .../Schemas/UserRole.generated.swift | 107 +- ...enerated.swift => Webhook.generated.swift} | 83 +- .../Schemas/WebhookDelivery.generated.swift | 190 + .../Schemas/WebhookEvent.generated.swift | 68 + .../Schemas/WebhookEventType.generated.swift | 30 + ...ated.swift => WebhookPing.generated.swift} | 6 +- .../Schemas/WinBackOffer.generated.swift | 212 ++ .../Schemas/WinBackOfferPrice.generated.swift | 128 + ...ackOfferPriceInlineCreate.generated.swift} | 6 +- .../Schemas/diagnosticLogs.generated.swift | 14 +- .../Schemas/xcodeMetrics.generated.swift | 48 +- 2243 files changed, 153023 insertions(+), 71080 deletions(-) create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AccessibilityDeclarations/AccessibilityDeclarations.POST.f559971.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AccessibilityDeclarations/ById/AccessibilityDeclarationsById.DELETE.ec25d6c.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AccessibilityDeclarations/ById/AccessibilityDeclarationsById.GET.ec25d6c.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AccessibilityDeclarations/ById/AccessibilityDeclarationsById.PATCH.ec25d6c.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AlternativeDistributionDomains/AlternativeDistributionDomains.GET.b6eabc5.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AlternativeDistributionDomains/AlternativeDistributionDomains.POST.b6eabc5.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AlternativeDistributionDomains/ById/AlternativeDistributionDomainsById.DELETE.c66a2b2.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AlternativeDistributionDomains/ById/AlternativeDistributionDomainsById.GET.c66a2b2.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AlternativeDistributionKeys/AlternativeDistributionKeys.GET.6c0e9f9.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AlternativeDistributionKeys/AlternativeDistributionKeys.POST.6c0e9f9.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AlternativeDistributionKeys/ById/AlternativeDistributionKeysById.DELETE.dc8a9c6.generated.swift rename Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/{Apps/ById/PreOrder/AppsByIdPreOrder.GET.711ea1f.generated.swift => AlternativeDistributionKeys/ById/AlternativeDistributionKeysById.GET.dc8a9c6.generated.swift} (63%) create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AlternativeDistributionPackageDeltas/ById/AlternativeDistributionPackageDeltasById.GET.a86a0ce.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AlternativeDistributionPackageVariants/ById/AlternativeDistributionPackageVariantsById.GET.e1f8111.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AlternativeDistributionPackageVersions/ById/AlternativeDistributionPackageVersionsById.GET.f08d676.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AlternativeDistributionPackageVersions/ById/Deltas/AlternativeDistributionPackageVersionsByIdDeltas.GET.f0620b2.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AlternativeDistributionPackageVersions/ById/Relationships/Deltas/AlternativeDistributionPackageVersionsByIdRelationshipsDeltas.GET.1fdccbd.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AlternativeDistributionPackageVersions/ById/Relationships/Variants/AlternativeDistributionPackageVersionsByIdRelationshipsVariants.GET.e5aa275.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AlternativeDistributionPackageVersions/ById/Variants/AlternativeDistributionPackageVersionsByIdVariants.GET.fd255e7.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AlternativeDistributionPackages/AlternativeDistributionPackages.POST.b486bd0.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AlternativeDistributionPackages/ById/AlternativeDistributionPackagesById.GET.e82a039.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AlternativeDistributionPackages/ById/Relationships/Versions/AlternativeDistributionPackagesByIdRelationshipsVersions.GET.c1c5426.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AlternativeDistributionPackages/ById/Versions/AlternativeDistributionPackagesByIdVersions.GET.5cabac6.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AnalyticsReportInstances/ById/AnalyticsReportInstancesById.GET.b2280c3.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AnalyticsReportInstances/ById/Relationships/Segments/AnalyticsReportInstancesByIdRelationshipsSegments.GET.9ec4c60.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AnalyticsReportInstances/ById/Segments/AnalyticsReportInstancesByIdSegments.GET.fc03c78.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AnalyticsReportRequests/AnalyticsReportRequests.POST.692f63c.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AnalyticsReportRequests/ById/AnalyticsReportRequestsById.DELETE.48bb12e.generated.swift rename Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/{AppPriceTiers/ById/AppPriceTiersById.GET.32125c2.generated.swift => AnalyticsReportRequests/ById/AnalyticsReportRequestsById.GET.48bb12e.generated.swift} (53%) create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AnalyticsReportRequests/ById/Relationships/Reports/AnalyticsReportRequestsByIdRelationshipsReports.GET.5366b53.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AnalyticsReportRequests/ById/Reports/AnalyticsReportRequestsByIdReports.GET.905a517.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AnalyticsReportSegments/ById/AnalyticsReportSegmentsById.GET.1fe931b.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AnalyticsReports/ById/AnalyticsReportsById.GET.98b3a99.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AnalyticsReports/ById/Instances/AnalyticsReportsByIdInstances.GET.206c771.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AnalyticsReports/ById/Relationships/Instances/AnalyticsReportsByIdRelationshipsInstances.GET.53dcf9e.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppCategories/ById/Relationships/Parent/AppCategoriesByIdRelationshipsParent.GET.c2da707.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppCategories/ById/Relationships/Subcategories/AppCategoriesByIdRelationshipsSubcategories.GET.74856fe.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppClipDefaultExperienceLocalizations/ById/Relationships/AppClipHeaderImage/AppClipDefaultExperienceLocalizationsByIdRelationshipsAppClipHeaderImage.GET.1e22c61.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppClipDefaultExperiences/ById/Relationships/AppClipAppStoreReviewDetail/AppClipDefaultExperiencesByIdRelationshipsAppClipAppStoreReviewDetail.GET.e8897c5.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppClipDefaultExperiences/ById/Relationships/AppClipDefaultExperienceLocalizations/AppClipDefaultExperiencesByIdRelationshipsAppClipDefaultExperienceLocalizations.GET.561b55b.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppClips/ById/Relationships/AppClipAdvancedExperiences/AppClipsByIdRelationshipsAppClipAdvancedExperiences.GET.c2d4b34.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppClips/ById/Relationships/AppClipDefaultExperiences/AppClipsByIdRelationshipsAppClipDefaultExperiences.GET.03b45ad.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppCustomProductPageLocalizations/ById/Relationships/AppPreviewSets/AppCustomProductPageLocalizationsByIdRelationshipsAppPreviewSets.GET.2d76aba.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppCustomProductPageLocalizations/ById/Relationships/AppScreenshotSets/AppCustomProductPageLocalizationsByIdRelationshipsAppScreenshotSets.GET.eb4c40c.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppCustomProductPageVersions/ById/AppCustomProductPageVersionsById.PATCH.0840b44.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppCustomProductPageVersions/ById/Relationships/AppCustomProductPageLocalizations/AppCustomProductPageVersionsByIdRelationshipsAppCustomProductPageLocalizations.GET.f65ae9f.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppCustomProductPages/ById/Relationships/AppCustomProductPageVersions/AppCustomProductPagesByIdRelationshipsAppCustomProductPageVersions.GET.59c6a85.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppEncryptionDeclarations/AppEncryptionDeclarations.POST.dc4b248.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppEncryptionDeclarations/ById/Relationships/App/AppEncryptionDeclarationsByIdRelationshipsApp.GET.fb7cd83.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppEncryptionDeclarations/ById/Relationships/AppEncryptionDeclarationDocument/AppEncryptionDeclarationsByIdRelationshipsAppEncryptionDeclarationDocument.GET.626b24d.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppEventLocalizations/ById/Relationships/AppEventScreenshots/AppEventLocalizationsByIdRelationshipsAppEventScreenshots.GET.f37c852.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppEventLocalizations/ById/Relationships/AppEventVideoClips/AppEventLocalizationsByIdRelationshipsAppEventVideoClips.GET.5a78ae1.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppEvents/ById/Relationships/Localizations/AppEventsByIdRelationshipsLocalizations.GET.963e26a.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppInfos/ById/Relationships/AgeRatingDeclaration/AppInfosByIdRelationshipsAgeRatingDeclaration.GET.3bee647.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppInfos/ById/Relationships/AppInfoLocalizations/AppInfosByIdRelationshipsAppInfoLocalizations.GET.df39862.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppInfos/ById/Relationships/PrimaryCategory/AppInfosByIdRelationshipsPrimaryCategory.GET.37f3439.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppInfos/ById/Relationships/PrimarySubcategoryOne/AppInfosByIdRelationshipsPrimarySubcategoryOne.GET.fdef18f.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppInfos/ById/Relationships/PrimarySubcategoryTwo/AppInfosByIdRelationshipsPrimarySubcategoryTwo.GET.9f64d06.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppInfos/ById/Relationships/SecondaryCategory/AppInfosByIdRelationshipsSecondaryCategory.GET.05de6d7.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppInfos/ById/Relationships/SecondarySubcategoryOne/AppInfosByIdRelationshipsSecondarySubcategoryOne.GET.280da7b.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppInfos/ById/Relationships/SecondarySubcategoryTwo/AppInfosByIdRelationshipsSecondarySubcategoryTwo.GET.31c4a44.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppPriceSchedules/ById/Relationships/AutomaticPrices/AppPriceSchedulesByIdRelationshipsAutomaticPrices.GET.5bfe9c0.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppPriceSchedules/ById/Relationships/BaseTerritory/AppPriceSchedulesByIdRelationshipsBaseTerritory.GET.4c6bf42.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppPriceSchedules/ById/Relationships/ManualPrices/AppPriceSchedulesByIdRelationshipsManualPrices.GET.0d2a1d6.generated.swift delete mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppPriceTiers/AppPriceTiers.GET.73f69af.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppStoreReviewDetails/ById/Relationships/AppStoreReviewAttachments/AppStoreReviewDetailsByIdRelationshipsAppStoreReviewAttachments.GET.49653b4.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppStoreVersionExperimentTreatmentLocalizations/ById/Relationships/AppPreviewSets/AppStoreVersionExperimentTreatmentLocalizationsByIdRelationshipsAppPreviewSets.GET.f714c7c.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppStoreVersionExperimentTreatmentLocalizations/ById/Relationships/AppScreenshotSets/AppStoreVersionExperimentTreatmentLocalizationsByIdRelationshipsAppScreenshotSets.GET.04df64b.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppStoreVersionExperimentTreatments/ById/Relationships/AppStoreVersionExperimentTreatmentLocalizations/AppStoreVersionExperimentTreatmentsByIdRelationshipsAppStoreVersionExperimentTreatmentLocalizations.GET.0ef2c13.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppStoreVersionExperiments/ById/Relationships/AppStoreVersionExperimentTreatments/AppStoreVersionExperimentsByIdRelationshipsAppStoreVersionExperimentTreatments.GET.5ffc3b8.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppStoreVersionLocalizations/ById/Relationships/AppPreviewSets/AppStoreVersionLocalizationsByIdRelationshipsAppPreviewSets.GET.829b8c5.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppStoreVersionLocalizations/ById/Relationships/AppScreenshotSets/AppStoreVersionLocalizationsByIdRelationshipsAppScreenshotSets.GET.fa3030d.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppStoreVersions/ById/AlternativeDistributionPackage/AppStoreVersionsByIdAlternativeDistributionPackage.GET.5412e83.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppStoreVersions/ById/GameCenterAppVersion/AppStoreVersionsByIdGameCenterAppVersion.GET.08895ae.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppStoreVersions/ById/Relationships/AgeRatingDeclaration/AppStoreVersionsByIdRelationshipsAgeRatingDeclaration.GET.342e198.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppStoreVersions/ById/Relationships/AlternativeDistributionPackage/AppStoreVersionsByIdRelationshipsAlternativeDistributionPackage.GET.2a7d286.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppStoreVersions/ById/Relationships/AppStoreReviewDetail/AppStoreVersionsByIdRelationshipsAppStoreReviewDetail.GET.9a54c13.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppStoreVersions/ById/Relationships/AppStoreVersionExperiments/AppStoreVersionsByIdRelationshipsAppStoreVersionExperiments.GET.53f31c3.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppStoreVersions/ById/Relationships/AppStoreVersionExperimentsV2/AppStoreVersionsByIdRelationshipsAppStoreVersionExperimentsV2.GET.e1ee67f.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppStoreVersions/ById/Relationships/AppStoreVersionLocalizations/AppStoreVersionsByIdRelationshipsAppStoreVersionLocalizations.GET.864e6c5.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppStoreVersions/ById/Relationships/AppStoreVersionPhasedRelease/AppStoreVersionsByIdRelationshipsAppStoreVersionPhasedRelease.GET.7873803.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppStoreVersions/ById/Relationships/AppStoreVersionSubmission/AppStoreVersionsByIdRelationshipsAppStoreVersionSubmission.GET.e4c51a4.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppStoreVersions/ById/Relationships/CustomerReviews/AppStoreVersionsByIdRelationshipsCustomerReviews.GET.6b84b95.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppStoreVersions/ById/Relationships/GameCenterAppVersion/AppStoreVersionsByIdRelationshipsGameCenterAppVersion.GET.de8c5bf.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppStoreVersions/ById/Relationships/RoutingAppCoverage/AppStoreVersionsByIdRelationshipsRoutingAppCoverage.GET.0784fd6.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/AccessibilityDeclarations/AppsByIdAccessibilityDeclarations.GET.aeba05e.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/AlternativeDistributionKey/AppsByIdAlternativeDistributionKey.GET.570aa20.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/AnalyticsReportRequests/AppsByIdAnalyticsReportRequests.GET.071994a.generated.swift delete mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/AppAvailability/AppsByIdAppAvailability.GET.f0965f3.generated.swift rename Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/{AppAvailabilities/ById/AppAvailabilitiesById.GET.cdab385.generated.swift => Apps/ById/AppAvailabilityV2/AppsByIdAppAvailabilityV2.GET.c915a14.generated.swift} (55%) create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/BackgroundAssets/AppsByIdBackgroundAssets.GET.77addb9.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/BetaFeedbackCrashSubmissions/AppsByIdBetaFeedbackCrashSubmissions.GET.4ae2302.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/BetaFeedbackScreenshotSubmissions/AppsByIdBetaFeedbackScreenshotSubmissions.GET.aa35b42.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/CustomerReviewSummarizations/AppsByIdCustomerReviewSummarizations.GET.cb8c5d4.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/MarketplaceSearchDetail/AppsByIdMarketplaceSearchDetail.GET.5b4dcb3.generated.swift delete mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/PricePoints/AppsByIdPricePoints.GET.2176881.generated.swift delete mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/Prices/AppsByIdPrices.GET.83c9fbe.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/Relationships/AccessibilityDeclarations/AppsByIdRelationshipsAccessibilityDeclarations.GET.d342b13.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/Relationships/AlternativeDistributionKey/AppsByIdRelationshipsAlternativeDistributionKey.GET.5ed9734.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/Relationships/AnalyticsReportRequests/AppsByIdRelationshipsAnalyticsReportRequests.GET.aa7d3d5.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/Relationships/AppAvailabilityV2/AppsByIdRelationshipsAppAvailabilityV2.GET.8425a03.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/Relationships/AppClips/AppsByIdRelationshipsAppClips.GET.c839455.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/Relationships/AppCustomProductPages/AppsByIdRelationshipsAppCustomProductPages.GET.0ca67e7.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/Relationships/AppEncryptionDeclarations/AppsByIdRelationshipsAppEncryptionDeclarations.GET.108f6f5.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/Relationships/AppEvents/AppsByIdRelationshipsAppEvents.GET.7392ea0.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/Relationships/AppInfos/AppsByIdRelationshipsAppInfos.GET.72825f0.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/Relationships/AppPricePoints/AppsByIdRelationshipsAppPricePoints.GET.a9b6454.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/Relationships/AppPriceSchedule/AppsByIdRelationshipsAppPriceSchedule.GET.1363afb.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/Relationships/AppStoreVersionExperimentsV2/AppsByIdRelationshipsAppStoreVersionExperimentsV2.GET.e79927d.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/Relationships/AppStoreVersions/AppsByIdRelationshipsAppStoreVersions.GET.1fab7ec.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/Relationships/BackgroundAssets/AppsByIdRelationshipsBackgroundAssets.GET.d7aa9c7.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/Relationships/BetaAppLocalizations/AppsByIdRelationshipsBetaAppLocalizations.GET.75f7850.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/Relationships/BetaAppReviewDetail/AppsByIdRelationshipsBetaAppReviewDetail.GET.e5ed9b6.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/Relationships/BetaFeedbackCrashSubmissions/AppsByIdRelationshipsBetaFeedbackCrashSubmissions.GET.134af14.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/Relationships/BetaFeedbackScreenshotSubmissions/AppsByIdRelationshipsBetaFeedbackScreenshotSubmissions.GET.90656f3.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/Relationships/BetaGroups/AppsByIdRelationshipsBetaGroups.GET.d789466.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/Relationships/BetaLicenseAgreement/AppsByIdRelationshipsBetaLicenseAgreement.GET.1ff41ab.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/Relationships/Builds/AppsByIdRelationshipsBuilds.GET.8b2cb78.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/Relationships/CiProduct/AppsByIdRelationshipsCiProduct.GET.73fede2.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/Relationships/CustomerReviews/AppsByIdRelationshipsCustomerReviews.GET.578d23b.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/Relationships/EndUserLicenseAgreement/AppsByIdRelationshipsEndUserLicenseAgreement.GET.f8d197b.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/Relationships/GameCenterDetail/AppsByIdRelationshipsGameCenterDetail.GET.a4aba4b.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/Relationships/GameCenterEnabledVersions/AppsByIdRelationshipsGameCenterEnabledVersions.GET.2179bd8.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/Relationships/InAppPurchases/AppsByIdRelationshipsInAppPurchases.GET.0d73652.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/Relationships/InAppPurchasesV2/AppsByIdRelationshipsInAppPurchasesV2.GET.2dccce1.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/Relationships/MarketplaceSearchDetail/AppsByIdRelationshipsMarketplaceSearchDetail.GET.45000c7.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/Relationships/PreReleaseVersions/AppsByIdRelationshipsPreReleaseVersions.GET.66145ba.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/Relationships/ReviewSubmissions/AppsByIdRelationshipsReviewSubmissions.GET.f4edf48.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/Relationships/SubscriptionGracePeriod/AppsByIdRelationshipsSubscriptionGracePeriod.GET.d6f12be.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/Relationships/SubscriptionGroups/AppsByIdRelationshipsSubscriptionGroups.GET.9fc614e.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/Relationships/Webhooks/AppsByIdRelationshipsWebhooks.GET.cbc7253.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/Webhooks/AppsByIdWebhooks.GET.d07bfb0.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BackgroundAssetUploadFiles/BackgroundAssetUploadFiles.POST.c7fa164.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BackgroundAssetUploadFiles/ById/BackgroundAssetUploadFilesById.GET.1ad97cd.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BackgroundAssetUploadFiles/ById/BackgroundAssetUploadFilesById.PATCH.1ad97cd.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BackgroundAssetVersionInternalBetaReleases/ById/BackgroundAssetVersionInternalBetaReleasesById.GET.c763a11.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BackgroundAssetVersions/BackgroundAssetVersions.POST.24a1fc5.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BackgroundAssetVersions/ById/BackgroundAssetUploadFiles/BackgroundAssetVersionsByIdBackgroundAssetUploadFiles.GET.85c8b34.generated.swift rename Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/{AppPricePoints/ById/AppPricePointsById.GET.97761a8.generated.swift => BackgroundAssetVersions/ById/BackgroundAssetVersionsById.GET.95cd11c.generated.swift} (50%) create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BackgroundAssetVersions/ById/Relationships/BackgroundAssetUploadFiles/BackgroundAssetVersionsByIdRelationshipsBackgroundAssetUploadFiles.GET.c3a234c.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BackgroundAssets/BackgroundAssets.POST.177247a.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BackgroundAssets/ById/BackgroundAssetsById.GET.ab8fadb.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BackgroundAssets/ById/Relationships/Versions/BackgroundAssetsByIdRelationshipsVersions.GET.d06fc9a.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BackgroundAssets/ById/Versions/BackgroundAssetsByIdVersions.GET.c529844.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaAppLocalizations/ById/Relationships/App/BetaAppLocalizationsByIdRelationshipsApp.GET.ec25861.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaAppReviewDetails/ById/Relationships/App/BetaAppReviewDetailsByIdRelationshipsApp.GET.ab28547.generated.swift rename Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/{AppPricePoints/ById/Territory/AppPricePointsByIdTerritory.GET.1cb31a4.generated.swift => BetaCrashLogs/ById/BetaCrashLogsById.GET.ada3fbb.generated.swift} (66%) create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaFeedbackCrashSubmissions/ById/BetaFeedbackCrashSubmissionsById.DELETE.a2529fe.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaFeedbackCrashSubmissions/ById/BetaFeedbackCrashSubmissionsById.GET.a2529fe.generated.swift rename Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/{Apps/ById/AvailableTerritories/AppsByIdAvailableTerritories.GET.5cd8bdc.generated.swift => BetaFeedbackCrashSubmissions/ById/CrashLog/BetaFeedbackCrashSubmissionsByIdCrashLog.GET.623e984.generated.swift} (65%) create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaFeedbackCrashSubmissions/ById/Relationships/CrashLog/BetaFeedbackCrashSubmissionsByIdRelationshipsCrashLog.GET.b383ae2.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaFeedbackScreenshotSubmissions/ById/BetaFeedbackScreenshotSubmissionsById.DELETE.93f1434.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaFeedbackScreenshotSubmissions/ById/BetaFeedbackScreenshotSubmissionsById.GET.93f1434.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaGroups/ById/BetaRecruitmentCriteria/BetaGroupsByIdBetaRecruitmentCriteria.GET.f997474.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaGroups/ById/BetaRecruitmentCriterionCompatibleBuildCheck/BetaGroupsByIdBetaRecruitmentCriterionCompatibleBuildCheck.GET.66455fd.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaGroups/ById/Metrics/PublicLinkUsages/BetaGroupsByIdMetricsPublicLinkUsages.GET.1e8a460.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaGroups/ById/Relationships/App/BetaGroupsByIdRelationshipsApp.GET.1257202.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaGroups/ById/Relationships/BetaRecruitmentCriteria/BetaGroupsByIdRelationshipsBetaRecruitmentCriteria.GET.b05174d.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaGroups/ById/Relationships/BetaRecruitmentCriterionCompatibleBuildCheck/BetaGroupsByIdRelationshipsBetaRecruitmentCriterionCompatibleBuildCheck.GET.39f8e93.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaLicenseAgreements/ById/Relationships/App/BetaLicenseAgreementsByIdRelationshipsApp.GET.cc76054.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaRecruitmentCriteria/BetaRecruitmentCriteria.POST.35b0940.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaRecruitmentCriteria/ById/BetaRecruitmentCriteriaById.DELETE.9c589da.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaRecruitmentCriteria/ById/BetaRecruitmentCriteriaById.PATCH.9c589da.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaRecruitmentCriterionOptions/BetaRecruitmentCriterionOptions.GET.4116836.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BuildBundles/ById/Relationships/AppClipDomainCacheStatus/BuildBundlesByIdRelationshipsAppClipDomainCacheStatus.GET.73cfe9b.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BuildBundles/ById/Relationships/AppClipDomainDebugStatus/BuildBundlesByIdRelationshipsAppClipDomainDebugStatus.GET.a611700.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BuildBundles/ById/Relationships/BetaAppClipInvocations/BuildBundlesByIdRelationshipsBetaAppClipInvocations.GET.04d4dbe.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BuildBundles/ById/Relationships/BuildBundleFileSizes/BuildBundlesByIdRelationshipsBuildBundleFileSizes.GET.767e45c.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Builds/ById/Relationships/App/BuildsByIdRelationshipsApp.GET.ddadfc8.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Builds/ById/Relationships/AppStoreVersion/BuildsByIdRelationshipsAppStoreVersion.GET.880b286.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Builds/ById/Relationships/BetaAppReviewSubmission/BuildsByIdRelationshipsBetaAppReviewSubmission.GET.085d4eb.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Builds/ById/Relationships/BetaBuildLocalizations/BuildsByIdRelationshipsBetaBuildLocalizations.GET.42f541c.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Builds/ById/Relationships/BuildBetaDetail/BuildsByIdRelationshipsBuildBetaDetail.GET.e49c469.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Builds/ById/Relationships/DiagnosticSignatures/BuildsByIdRelationshipsDiagnosticSignatures.GET.c96c92f.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Builds/ById/Relationships/Icons/BuildsByIdRelationshipsIcons.GET.b993946.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Builds/ById/Relationships/PreReleaseVersion/BuildsByIdRelationshipsPreReleaseVersion.GET.098a261.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BundleIds/ById/Relationships/App/BundleIdsByIdRelationshipsApp.GET.f6f27e8.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BundleIds/ById/Relationships/BundleIdCapabilities/BundleIdsByIdRelationshipsBundleIdCapabilities.GET.88cb282.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BundleIds/ById/Relationships/Profiles/BundleIdsByIdRelationshipsProfiles.GET.e44ec5a.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Certificates/ById/CertificatesById.PATCH.21ec8ea.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Certificates/ById/PassTypeId/CertificatesByIdPassTypeId.GET.30b9657.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Certificates/ById/Relationships/PassTypeId/CertificatesByIdRelationshipsPassTypeId.GET.c9dc999.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/CiBuildActions/ById/Relationships/Artifacts/CiBuildActionsByIdRelationshipsArtifacts.GET.aea731d.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/CiBuildActions/ById/Relationships/BuildRun/CiBuildActionsByIdRelationshipsBuildRun.GET.1a8a104.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/CiBuildActions/ById/Relationships/Issues/CiBuildActionsByIdRelationshipsIssues.GET.a13c06f.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/CiBuildActions/ById/Relationships/TestResults/CiBuildActionsByIdRelationshipsTestResults.GET.3a9c66f.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/CiBuildRuns/ById/Relationships/Actions/CiBuildRunsByIdRelationshipsActions.GET.abff178.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/CiBuildRuns/ById/Relationships/Builds/CiBuildRunsByIdRelationshipsBuilds.GET.9919e76.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/CiMacOsVersions/ById/Relationships/XcodeVersions/CiMacOsVersionsByIdRelationshipsXcodeVersions.GET.6ebd18b.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/CiProducts/ById/Relationships/AdditionalRepositories/CiProductsByIdRelationshipsAdditionalRepositories.GET.d3ee0c2.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/CiProducts/ById/Relationships/App/CiProductsByIdRelationshipsApp.GET.17e2173.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/CiProducts/ById/Relationships/BuildRuns/CiProductsByIdRelationshipsBuildRuns.GET.00b2def.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/CiProducts/ById/Relationships/PrimaryRepositories/CiProductsByIdRelationshipsPrimaryRepositories.GET.50480c9.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/CiProducts/ById/Relationships/Workflows/CiProductsByIdRelationshipsWorkflows.GET.f4038ab.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/CiWorkflows/ById/Relationships/BuildRuns/CiWorkflowsByIdRelationshipsBuildRuns.GET.103eb12.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/CiWorkflows/ById/Relationships/Repository/CiWorkflowsByIdRelationshipsRepository.GET.83706ea.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/CiXcodeVersions/ById/Relationships/MacOsVersions/CiXcodeVersionsByIdRelationshipsMacOsVersions.GET.f0f805d.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/CustomerReviews/ById/Relationships/Response/CustomerReviewsByIdRelationshipsResponse.GET.36fa137.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/EndUserLicenseAgreements/ById/Relationships/Territories/EndUserLicenseAgreementsByIdRelationshipsTerritories.GET.24bb68a.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterAchievementLocalizations/ById/Relationships/GameCenterAchievement/GameCenterAchievementLocalizationsByIdRelationshipsGameCenterAchievement.GET.2437564.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterAchievementLocalizations/ById/Relationships/GameCenterAchievementImage/GameCenterAchievementLocalizationsByIdRelationshipsGameCenterAchievementImage.GET.02e1f8f.generated.swift rename Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/{PromotedPurchaseImages/ById/PromotedPurchaseImagesById.PATCH.307096c.generated.swift => GameCenterAchievements/ById/Relationships/Activity/GameCenterAchievementsByIdRelationshipsActivity.PATCH.767fb4e.generated.swift} (74%) create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterAchievements/ById/Relationships/Localizations/GameCenterAchievementsByIdRelationshipsLocalizations.GET.3f46a50.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterAchievements/ById/Relationships/Releases/GameCenterAchievementsByIdRelationshipsReleases.GET.678b35f.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterActivities/ById/GameCenterActivitiesById.DELETE.2aa06fe.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterActivities/ById/GameCenterActivitiesById.GET.2aa06fe.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterActivities/ById/GameCenterActivitiesById.PATCH.2aa06fe.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterActivities/ById/Relationships/Achievements/GameCenterActivitiesByIdRelationshipsAchievements.DELETE.b6340bc.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterActivities/ById/Relationships/Achievements/GameCenterActivitiesByIdRelationshipsAchievements.POST.b6340bc.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterActivities/ById/Relationships/Leaderboards/GameCenterActivitiesByIdRelationshipsLeaderboards.DELETE.e0742e0.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterActivities/ById/Relationships/Leaderboards/GameCenterActivitiesByIdRelationshipsLeaderboards.POST.e0742e0.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterActivities/ById/Relationships/Versions/GameCenterActivitiesByIdRelationshipsVersions.GET.7318fd0.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterActivities/ById/Versions/GameCenterActivitiesByIdVersions.GET.3ed11b1.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterActivities/GameCenterActivities.POST.323e8fc.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterActivityImages/ById/GameCenterActivityImagesById.DELETE.dba6219.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterActivityImages/ById/GameCenterActivityImagesById.GET.dba6219.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterActivityImages/ById/GameCenterActivityImagesById.PATCH.dba6219.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterActivityImages/GameCenterActivityImages.POST.8ba0e6d.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterActivityLocalizations/ById/GameCenterActivityLocalizationsById.DELETE.498f7b3.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterActivityLocalizations/ById/GameCenterActivityLocalizationsById.GET.498f7b3.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterActivityLocalizations/ById/GameCenterActivityLocalizationsById.PATCH.498f7b3.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterActivityLocalizations/ById/Image/GameCenterActivityLocalizationsByIdImage.GET.5bfb995.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterActivityLocalizations/ById/Relationships/Image/GameCenterActivityLocalizationsByIdRelationshipsImage.GET.d1c0278.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterActivityLocalizations/GameCenterActivityLocalizations.POST.3f32ce8.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterActivityVersionReleases/ById/GameCenterActivityVersionReleasesById.DELETE.4df0d43.generated.swift rename Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/{AppPrices/ById/AppPricesById.GET.fb6e1b4.generated.swift => GameCenterActivityVersionReleases/ById/GameCenterActivityVersionReleasesById.GET.4df0d43.generated.swift} (61%) create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterActivityVersionReleases/GameCenterActivityVersionReleases.POST.9d43f0e.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterActivityVersions/ById/DefaultImage/GameCenterActivityVersionsByIdDefaultImage.GET.766df69.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterActivityVersions/ById/GameCenterActivityVersionsById.GET.8b3116f.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterActivityVersions/ById/GameCenterActivityVersionsById.PATCH.8b3116f.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterActivityVersions/ById/Localizations/GameCenterActivityVersionsByIdLocalizations.GET.e77059d.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterActivityVersions/ById/Relationships/DefaultImage/GameCenterActivityVersionsByIdRelationshipsDefaultImage.GET.f8986b4.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterActivityVersions/ById/Relationships/Localizations/GameCenterActivityVersionsByIdRelationshipsLocalizations.GET.5b62918.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterActivityVersions/GameCenterActivityVersions.POST.d398713.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterAppVersions/ById/Relationships/AppStoreVersion/GameCenterAppVersionsByIdRelationshipsAppStoreVersion.GET.f0c4373.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterChallengeImages/ById/GameCenterChallengeImagesById.DELETE.93e7d1b.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterChallengeImages/ById/GameCenterChallengeImagesById.GET.93e7d1b.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterChallengeImages/ById/GameCenterChallengeImagesById.PATCH.93e7d1b.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterChallengeImages/GameCenterChallengeImages.POST.f409490.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterChallengeLocalizations/ById/GameCenterChallengeLocalizationsById.DELETE.12ccb9a.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterChallengeLocalizations/ById/GameCenterChallengeLocalizationsById.GET.12ccb9a.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterChallengeLocalizations/ById/GameCenterChallengeLocalizationsById.PATCH.12ccb9a.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterChallengeLocalizations/ById/Image/GameCenterChallengeLocalizationsByIdImage.GET.cfc3d8c.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterChallengeLocalizations/ById/Relationships/Image/GameCenterChallengeLocalizationsByIdRelationshipsImage.GET.b844617.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterChallengeLocalizations/GameCenterChallengeLocalizations.POST.eb8493b.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterChallengeVersionReleases/ById/GameCenterChallengeVersionReleasesById.DELETE.da07552.generated.swift rename Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/{AppPreOrders/ById/AppPreOrdersById.GET.7c9dbe6.generated.swift => GameCenterChallengeVersionReleases/ById/GameCenterChallengeVersionReleasesById.GET.da07552.generated.swift} (60%) create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterChallengeVersionReleases/GameCenterChallengeVersionReleases.POST.9d1e993.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterChallengeVersions/ById/DefaultImage/GameCenterChallengeVersionsByIdDefaultImage.GET.d50e7c3.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterChallengeVersions/ById/GameCenterChallengeVersionsById.GET.f4c42e2.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterChallengeVersions/ById/Localizations/GameCenterChallengeVersionsByIdLocalizations.GET.4f0787b.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterChallengeVersions/ById/Relationships/DefaultImage/GameCenterChallengeVersionsByIdRelationshipsDefaultImage.GET.65737a1.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterChallengeVersions/ById/Relationships/Localizations/GameCenterChallengeVersionsByIdRelationshipsLocalizations.GET.4faef94.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterChallengeVersions/GameCenterChallengeVersions.POST.ac02250.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterChallenges/ById/GameCenterChallengesById.DELETE.7dbeef3.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterChallenges/ById/GameCenterChallengesById.GET.7dbeef3.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterChallenges/ById/GameCenterChallengesById.PATCH.7dbeef3.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterChallenges/ById/Relationships/Leaderboard/GameCenterChallengesByIdRelationshipsLeaderboard.PATCH.b83f437.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterChallenges/ById/Relationships/Versions/GameCenterChallengesByIdRelationshipsVersions.GET.df59605.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterChallenges/ById/Versions/GameCenterChallengesByIdVersions.GET.fd8fc17.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterChallenges/GameCenterChallenges.POST.8f45db2.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterDetails/ById/ActivityReleases/GameCenterDetailsByIdActivityReleases.GET.3e146f9.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterDetails/ById/ChallengeReleases/GameCenterDetailsByIdChallengeReleases.GET.7d048ec.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterDetails/ById/GameCenterActivities/GameCenterDetailsByIdGameCenterActivities.GET.dc2d5a7.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterDetails/ById/GameCenterChallenges/GameCenterDetailsByIdGameCenterChallenges.GET.26b4d91.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterDetails/ById/Relationships/AchievementReleases/GameCenterDetailsByIdRelationshipsAchievementReleases.GET.ad59285.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterDetails/ById/Relationships/ActivityReleases/GameCenterDetailsByIdRelationshipsActivityReleases.GET.646dfe2.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterDetails/ById/Relationships/ChallengeReleases/GameCenterDetailsByIdRelationshipsChallengeReleases.GET.870b3e5.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterDetails/ById/Relationships/ChallengesMinimumPlatformVersions/GameCenterDetailsByIdRelationshipsChallengesMinimumPlatformVersions.PATCH.269e67e.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterDetails/ById/Relationships/GameCenterActivities/GameCenterDetailsByIdRelationshipsGameCenterActivities.GET.4d45542.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterDetails/ById/Relationships/GameCenterAppVersions/GameCenterDetailsByIdRelationshipsGameCenterAppVersions.GET.f4cb3e4.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterDetails/ById/Relationships/GameCenterChallenges/GameCenterDetailsByIdRelationshipsGameCenterChallenges.GET.1bc48c1.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterDetails/ById/Relationships/GameCenterGroup/GameCenterDetailsByIdRelationshipsGameCenterGroup.GET.8aa8410.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterDetails/ById/Relationships/LeaderboardReleases/GameCenterDetailsByIdRelationshipsLeaderboardReleases.GET.a743dea.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterDetails/ById/Relationships/LeaderboardSetReleases/GameCenterDetailsByIdRelationshipsLeaderboardSetReleases.GET.39b5bb9.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterGroups/ById/GameCenterActivities/GameCenterGroupsByIdGameCenterActivities.GET.23eb322.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterGroups/ById/GameCenterChallenges/GameCenterGroupsByIdGameCenterChallenges.GET.29ff21f.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterGroups/ById/Relationships/GameCenterActivities/GameCenterGroupsByIdRelationshipsGameCenterActivities.GET.6bc57bd.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterGroups/ById/Relationships/GameCenterChallenges/GameCenterGroupsByIdRelationshipsGameCenterChallenges.GET.2840c87.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterGroups/ById/Relationships/GameCenterDetails/GameCenterGroupsByIdRelationshipsGameCenterDetails.GET.954c2f8.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterLeaderboardEntrySubmissions/GameCenterLeaderboardEntrySubmissions.POST.390a5fa.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterLeaderboardLocalizations/ById/Relationships/GameCenterLeaderboardImage/GameCenterLeaderboardLocalizationsByIdRelationshipsGameCenterLeaderboardImage.GET.a6e0f98.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterLeaderboardSetLocalizations/ById/Relationships/GameCenterLeaderboardSetImage/GameCenterLeaderboardSetLocalizationsByIdRelationshipsGameCenterLeaderboardSetImage.GET.92d4c95.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterLeaderboardSetMemberLocalizations/ById/Relationships/GameCenterLeaderboard/GameCenterLeaderboardSetMemberLocalizationsByIdRelationshipsGameCenterLeaderboard.GET.c79b006.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterLeaderboardSetMemberLocalizations/ById/Relationships/GameCenterLeaderboardSet/GameCenterLeaderboardSetMemberLocalizationsByIdRelationshipsGameCenterLeaderboardSet.GET.accdc75.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterLeaderboardSets/ById/Relationships/Localizations/GameCenterLeaderboardSetsByIdRelationshipsLocalizations.GET.aefd59c.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterLeaderboardSets/ById/Relationships/Releases/GameCenterLeaderboardSetsByIdRelationshipsReleases.GET.5d777b2.generated.swift rename Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/{AppPreOrders/ById/AppPreOrdersById.PATCH.7c9dbe6.generated.swift => GameCenterLeaderboards/ById/Relationships/Activity/GameCenterLeaderboardsByIdRelationshipsActivity.PATCH.336d35f.generated.swift} (74%) create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterLeaderboards/ById/Relationships/Challenge/GameCenterLeaderboardsByIdRelationshipsChallenge.PATCH.9533bb8.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterLeaderboards/ById/Relationships/Localizations/GameCenterLeaderboardsByIdRelationshipsLocalizations.GET.0d8aed4.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterLeaderboards/ById/Relationships/Releases/GameCenterLeaderboardsByIdRelationshipsReleases.GET.b492f17.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterMatchmakingRuleSets/ById/Relationships/MatchmakingQueues/GameCenterMatchmakingRuleSetsByIdRelationshipsMatchmakingQueues.GET.21e41b7.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterMatchmakingRuleSets/ById/Relationships/Rules/GameCenterMatchmakingRuleSetsByIdRelationshipsRules.GET.109bd75.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterMatchmakingRuleSets/ById/Relationships/Teams/GameCenterMatchmakingRuleSetsByIdRelationshipsTeams.GET.638b2b8.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterPlayerAchievementSubmissions/GameCenterPlayerAchievementSubmissions.POST.50bb913.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/InAppPurchaseAvailabilities/ById/Relationships/AvailableTerritories/InAppPurchaseAvailabilitiesByIdRelationshipsAvailableTerritories.GET.16c122b.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/InAppPurchaseImages/ById/InAppPurchaseImagesById.DELETE.9dc78df.generated.swift rename Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/{PromotedPurchaseImages/ById/PromotedPurchaseImagesById.GET.307096c.generated.swift => InAppPurchaseImages/ById/InAppPurchaseImagesById.GET.9dc78df.generated.swift} (50%) create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/InAppPurchaseImages/ById/InAppPurchaseImagesById.PATCH.9dc78df.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/InAppPurchaseImages/InAppPurchaseImages.POST.a0ba306.generated.swift rename Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/{AppPricePoints/AppPricePoints.GET.fee089a.generated.swift => InAppPurchasePricePoints/ById/Equalizations/InAppPurchasePricePointsByIdEqualizations.GET.6f0ca23.generated.swift} (57%) create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/InAppPurchasePricePoints/ById/Relationships/Equalizations/InAppPurchasePricePointsByIdRelationshipsEqualizations.GET.9c3df36.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/InAppPurchasePriceSchedules/ById/Relationships/AutomaticPrices/InAppPurchasePriceSchedulesByIdRelationshipsAutomaticPrices.GET.5858f49.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/InAppPurchasePriceSchedules/ById/Relationships/BaseTerritory/InAppPurchasePriceSchedulesByIdRelationshipsBaseTerritory.GET.3dbbaa2.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/InAppPurchasePriceSchedules/ById/Relationships/ManualPrices/InAppPurchasePriceSchedulesByIdRelationshipsManualPrices.GET.9b39a6f.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/MarketplaceSearchDetails/ById/MarketplaceSearchDetailsById.DELETE.50b8a11.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/MarketplaceSearchDetails/ById/MarketplaceSearchDetailsById.PATCH.50b8a11.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/MarketplaceSearchDetails/MarketplaceSearchDetails.POST.20dda23.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/MarketplaceWebhooks/ById/MarketplaceWebhooksById.DELETE.40c121d.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/MarketplaceWebhooks/ById/MarketplaceWebhooksById.PATCH.40c121d.generated.swift rename Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/{AppAvailabilities/ById/AvailableTerritories/AppAvailabilitiesByIdAvailableTerritories.GET.c407e06.generated.swift => MarketplaceWebhooks/MarketplaceWebhooks.GET.3bb82e0.generated.swift} (64%) create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/MarketplaceWebhooks/MarketplaceWebhooks.POST.3bb82e0.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/MerchantIds/ById/Certificates/MerchantIdsByIdCertificates.GET.09c9050.generated.swift rename Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/{AppPreOrders/ById/AppPreOrdersById.DELETE.7c9dbe6.generated.swift => MerchantIds/ById/MerchantIdsById.DELETE.a4c15f7.generated.swift} (82%) create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/MerchantIds/ById/MerchantIdsById.GET.a4c15f7.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/MerchantIds/ById/MerchantIdsById.PATCH.a4c15f7.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/MerchantIds/ById/Relationships/Certificates/MerchantIdsByIdRelationshipsCertificates.GET.7cb8d86.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/MerchantIds/MerchantIds.GET.f84be12.generated.swift rename Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/{AppStoreVersionSubmissions/AppStoreVersionSubmissions.POST.14cb2d6.generated.swift => MerchantIds/MerchantIds.POST.f84be12.generated.swift} (68%) create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Nominations/ById/NominationsById.DELETE.b051da8.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Nominations/ById/NominationsById.GET.b051da8.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Nominations/ById/NominationsById.PATCH.b051da8.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Nominations/Nominations.GET.c0bf6fc.generated.swift rename Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/{PromotedPurchaseImages/PromotedPurchaseImages.POST.6510a51.generated.swift => Nominations/Nominations.POST.c0bf6fc.generated.swift} (68%) create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/PassTypeIds/ById/Certificates/PassTypeIdsByIdCertificates.GET.70cd78d.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/PassTypeIds/ById/PassTypeIdsById.DELETE.702ea05.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/PassTypeIds/ById/PassTypeIdsById.GET.702ea05.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/PassTypeIds/ById/PassTypeIdsById.PATCH.702ea05.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/PassTypeIds/ById/Relationships/Certificates/PassTypeIdsByIdRelationshipsCertificates.GET.42f1856.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/PassTypeIds/PassTypeIds.GET.95793d2.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/PassTypeIds/PassTypeIds.POST.95793d2.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/PreReleaseVersions/ById/Relationships/App/PreReleaseVersionsByIdRelationshipsApp.GET.e10704f.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/PreReleaseVersions/ById/Relationships/Builds/PreReleaseVersionsByIdRelationshipsBuilds.GET.feeeafe.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Profiles/ById/Relationships/BundleId/ProfilesByIdRelationshipsBundleId.GET.e318143.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Profiles/ById/Relationships/Certificates/ProfilesByIdRelationshipsCertificates.GET.d413fd5.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Profiles/ById/Relationships/Devices/ProfilesByIdRelationshipsDevices.GET.939dcf5.generated.swift delete mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/PromotedPurchases/ById/PromotionImages/PromotedPurchasesByIdPromotionImages.GET.4b831e7.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/ReviewSubmissions/ById/Relationships/Items/ReviewSubmissionsByIdRelationshipsItems.GET.73ca031.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/ScmProviders/ById/Relationships/Repositories/ScmProvidersByIdRelationshipsRepositories.GET.f7c37c7.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/ScmRepositories/ById/Relationships/GitReferences/ScmRepositoriesByIdRelationshipsGitReferences.GET.4c69e0b.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/ScmRepositories/ById/Relationships/PullRequests/ScmRepositoriesByIdRelationshipsPullRequests.GET.d3fe2a1.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/SubscriptionAvailabilities/ById/Relationships/AvailableTerritories/SubscriptionAvailabilitiesByIdRelationshipsAvailableTerritories.GET.83b9b65.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/SubscriptionGroups/ById/Relationships/SubscriptionGroupLocalizations/SubscriptionGroupsByIdRelationshipsSubscriptionGroupLocalizations.GET.aef4047.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/SubscriptionGroups/ById/Relationships/Subscriptions/SubscriptionGroupsByIdRelationshipsSubscriptions.GET.e652166.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/SubscriptionImages/ById/SubscriptionImagesById.DELETE.e335fd1.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/SubscriptionImages/ById/SubscriptionImagesById.GET.e335fd1.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/SubscriptionImages/ById/SubscriptionImagesById.PATCH.e335fd1.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/SubscriptionImages/SubscriptionImages.POST.d99e36c.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/SubscriptionOfferCodes/ById/Relationships/CustomCodes/SubscriptionOfferCodesByIdRelationshipsCustomCodes.GET.64eecdf.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/SubscriptionOfferCodes/ById/Relationships/OneTimeUseCodes/SubscriptionOfferCodesByIdRelationshipsOneTimeUseCodes.GET.5a205ac.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/SubscriptionOfferCodes/ById/Relationships/Prices/SubscriptionOfferCodesByIdRelationshipsPrices.GET.4dfcb0d.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/SubscriptionPricePoints/ById/Relationships/Equalizations/SubscriptionPricePointsByIdRelationshipsEqualizations.GET.1fb0014.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/SubscriptionPromotionalOffers/ById/Relationships/Prices/SubscriptionPromotionalOffersByIdRelationshipsPrices.GET.c230293.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Subscriptions/ById/Images/SubscriptionsByIdImages.GET.dc8952a.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Subscriptions/ById/Relationships/AppStoreReviewScreenshot/SubscriptionsByIdRelationshipsAppStoreReviewScreenshot.GET.b03d5c2.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Subscriptions/ById/Relationships/Images/SubscriptionsByIdRelationshipsImages.GET.041f9d7.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Subscriptions/ById/Relationships/OfferCodes/SubscriptionsByIdRelationshipsOfferCodes.GET.9aeb85a.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Subscriptions/ById/Relationships/PricePoints/SubscriptionsByIdRelationshipsPricePoints.GET.35a9334.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Subscriptions/ById/Relationships/PromotedPurchase/SubscriptionsByIdRelationshipsPromotedPurchase.GET.2f79e5f.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Subscriptions/ById/Relationships/PromotionalOffers/SubscriptionsByIdRelationshipsPromotionalOffers.GET.6d2ca03.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Subscriptions/ById/Relationships/SubscriptionAvailability/SubscriptionsByIdRelationshipsSubscriptionAvailability.GET.40de5dc.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Subscriptions/ById/Relationships/SubscriptionLocalizations/SubscriptionsByIdRelationshipsSubscriptionLocalizations.GET.93b5051.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Subscriptions/ById/Relationships/WinBackOffers/SubscriptionsByIdRelationshipsWinBackOffers.GET.ea511f7.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Subscriptions/ById/WinBackOffers/SubscriptionsByIdWinBackOffers.GET.befc1c2.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/UserInvitations/ById/Relationships/VisibleApps/UserInvitationsByIdRelationshipsVisibleApps.GET.5b1770a.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/WebhookDeliveries/WebhookDeliveries.POST.8a857a1.generated.swift rename Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/{AppPreOrders/AppPreOrders.POST.51ede6d.generated.swift => WebhookPings/WebhookPings.POST.c3049aa.generated.swift} (69%) create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Webhooks/ById/Deliveries/WebhooksByIdDeliveries.GET.f8fe4d7.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Webhooks/ById/Relationships/Deliveries/WebhooksByIdRelationshipsDeliveries.GET.2baf075.generated.swift rename Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/{PromotedPurchaseImages/ById/PromotedPurchaseImagesById.DELETE.307096c.generated.swift => Webhooks/ById/WebhooksById.DELETE.30521c1.generated.swift} (82%) create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Webhooks/ById/WebhooksById.GET.30521c1.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Webhooks/ById/WebhooksById.PATCH.30521c1.generated.swift rename Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/{AppAvailabilities/AppAvailabilities.POST.30d44e3.generated.swift => Webhooks/Webhooks.POST.026e467.generated.swift} (69%) rename Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/{AppPriceTiers/ById/PricePoints/AppPriceTiersByIdPricePoints.GET.cc8a323.generated.swift => WinBackOffers/ById/Prices/WinBackOffersByIdPrices.GET.3de578d.generated.swift} (56%) create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/WinBackOffers/ById/Relationships/Prices/WinBackOffersByIdRelationshipsPrices.GET.e2cb13a.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/WinBackOffers/ById/WinBackOffersById.DELETE.0e8f1fd.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/WinBackOffers/ById/WinBackOffersById.GET.0e8f1fd.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/WinBackOffers/ById/WinBackOffersById.PATCH.0e8f1fd.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/WinBackOffers/WinBackOffers.POST.10ac4bb.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/AppAvailabilities/ById/Relationships/TerritoryAvailabilities/AppAvailabilitiesByIdRelationshipsTerritoryAvailabilities.GET.30ab2ab.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/AppStoreVersionExperiments/ById/Relationships/AppStoreVersionExperimentTreatments/AppStoreVersionExperimentsByIdRelationshipsAppStoreVersionExperimentTreatments.GET.cf72947.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/InAppPurchases/ById/Images/InAppPurchasesByIdImages.GET.95733aa.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/InAppPurchases/ById/Relationships/AppStoreReviewScreenshot/InAppPurchasesByIdRelationshipsAppStoreReviewScreenshot.GET.b420411.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/InAppPurchases/ById/Relationships/Content/InAppPurchasesByIdRelationshipsContent.GET.c3ea467.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/InAppPurchases/ById/Relationships/IapPriceSchedule/InAppPurchasesByIdRelationshipsIapPriceSchedule.GET.4ba4f50.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/InAppPurchases/ById/Relationships/Images/InAppPurchasesByIdRelationshipsImages.GET.eadbcad.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/InAppPurchases/ById/Relationships/InAppPurchaseAvailability/InAppPurchasesByIdRelationshipsInAppPurchaseAvailability.GET.2cecb2a.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/InAppPurchases/ById/Relationships/InAppPurchaseLocalizations/InAppPurchasesByIdRelationshipsInAppPurchaseLocalizations.GET.9ce9cf6.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/InAppPurchases/ById/Relationships/PricePoints/InAppPurchasesByIdRelationshipsPricePoints.GET.67db2d7.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/InAppPurchases/ById/Relationships/PromotedPurchase/InAppPurchasesByIdRelationshipsPromotedPurchase.GET.672cf06.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Endpoints/V3/AppPricePoints/ById/Relationships/Equalizations/AppPricePointsByIdRelationshipsEqualizations.GET.fd5b2b1.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/AccessibilityDeclaration.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/AlternativeDistributionDomain.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/AlternativeDistributionKey.generated.swift rename Sources/AppStoreConnectKit/autogenerated/Schemas/{AppPriceTier.generated.swift => AlternativeDistributionPackage.generated.swift} (57%) create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/AlternativeDistributionPackageDelta.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/AlternativeDistributionPackageVariant.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/AlternativeDistributionPackageVersion.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/AnalyticsReport.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/AnalyticsReportInstance.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/AnalyticsReportSegment.generated.swift delete mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/AppAvailability.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/AppMediaPreviewFrameImageState.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/AppMediaVideoState.generated.swift delete mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/AppPricePoint.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/AppVersionState.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/BackgroundAsset.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/BackgroundAssetUploadFile.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/BackgroundAssetVersion.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/BackgroundAssetVersionInternalBetaRelease.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/BackgroundAssetVersionState.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/BetaCrashLog.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/BetaFeedbackCrashSubmission.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/BetaFeedbackScreenshotImage.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/BetaFeedbackScreenshotSubmission.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/BetaRecruitmentCriterion.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/BetaRecruitmentCriterionCompatibleBuildCheck.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/BetaRecruitmentCriterionOption.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/BetaTesterState.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/BuildBundleType.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/CiManualBranchStartCondition.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/CiManualPullRequestStartCondition.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/CiManualTagStartCondition.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/CustomerReviewSummarization.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/DeliveryFileUploadOperation.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/DeviceConnectionType.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/DeviceFamily.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/DeviceFamilyOsVersionFilter.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/DiagnosticInsight.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/DiagnosticInsightDirection.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/DiagnosticInsightType.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/ErrorLinks.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/GameCenterActivity.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/GameCenterActivityImage.generated.swift rename Sources/AppStoreConnectKit/autogenerated/Schemas/{AppPrice.generated.swift => GameCenterActivityLocalization.generated.swift} (50%) create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/GameCenterActivityVersion.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/GameCenterActivityVersionRelease.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/GameCenterChallenge.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/GameCenterChallengeImage.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/GameCenterChallengeLocalization.generated.swift rename Sources/AppStoreConnectKit/autogenerated/Schemas/{AppPricePointV2.generated.swift => GameCenterChallengeVersion.generated.swift} (50%) create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/GameCenterChallengeVersionRelease.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/GameCenterLeaderboardEntrySubmission.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/GameCenterPlayerAchievementSubmission.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/GameCenterVersionState.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/InAppPurchaseImage.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/IntegerRange.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/MarketplaceSearchDetail.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/MarketplaceWebhook.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/MerchantId.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/Nomination.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/PassTypeId.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/PreviewFrameImage.generated.swift delete mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/PromotedPurchaseImage.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/RelationshipLinks.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/AccessibilityDeclarationCreateRequest.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/AccessibilityDeclarationUpdateRequest.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/AlternativeDistributionDomainCreateRequest.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/AlternativeDistributionKeyCreateRequest.generated.swift rename Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/{AppStoreVersionSubmissionCreateRequest.generated.swift => AlternativeDistributionPackageCreateRequest.generated.swift} (79%) create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/AnalyticsReportRequest.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/AnalyticsReportRequestCreateRequest.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/AppCustomProductPageVersionUpdateRequest.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/AppEncryptionDeclarationCreateRequest.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/BackgroundAssetCreateRequest.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/BackgroundAssetUploadFileCreateRequest.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/BackgroundAssetUploadFileUpdateRequest.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/BackgroundAssetVersionCreateRequest.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/BetaRecruitmentCriterionCreateRequest.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/BetaRecruitmentCriterionUpdateRequest.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/CertificateUpdateRequest.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterAchievementActivityLinkageRequest.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterActivityAchievementsLinkagesRequest.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterActivityCreateRequest.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterActivityImageCreateRequest.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterActivityImageUpdateRequest.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterActivityLeaderboardsLinkagesRequest.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterActivityLocalizationCreateRequest.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterActivityLocalizationUpdateRequest.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterActivityUpdateRequest.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterActivityVersionCreateRequest.generated.swift rename Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/{AppAvailabilityCreateRequest.generated.swift => GameCenterActivityVersionReleaseCreateRequest.generated.swift} (60%) create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterActivityVersionUpdateRequest.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterChallengeCreateRequest.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterChallengeImageCreateRequest.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterChallengeImageUpdateRequest.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterChallengeLeaderboardLinkageRequest.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterChallengeLocalizationCreateRequest.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterChallengeLocalizationUpdateRequest.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterChallengeUpdateRequest.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterChallengeVersionCreateRequest.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterChallengeVersionReleaseCreateRequest.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterDetailChallengesMinimumPlatformVersionsLinkagesRequest.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterLeaderboardActivityLinkageRequest.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterLeaderboardChallengeLinkageRequest.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterLeaderboardEntrySubmissionCreateRequest.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterPlayerAchievementSubmissionCreateRequest.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/InAppPurchaseImageCreateRequest.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/InAppPurchaseImageUpdateRequest.generated.swift rename Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/{AppPreOrderCreateRequest.generated.swift => MarketplaceSearchDetailCreateRequest.generated.swift} (71%) create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/MarketplaceSearchDetailUpdateRequest.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/MarketplaceWebhookCreateRequest.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/MarketplaceWebhookUpdateRequest.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/MerchantIdCreateRequest.generated.swift rename Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/{AppPreOrderUpdateRequest.generated.swift => MerchantIdUpdateRequest.generated.swift} (65%) create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/NominationCreateRequest.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/NominationUpdateRequest.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/PassTypeIdCreateRequest.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/PassTypeIdUpdateRequest.generated.swift rename Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/{PromotedPurchaseImageCreateRequest.generated.swift => SubscriptionImageCreateRequest.generated.swift} (74%) rename Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/{PromotedPurchaseImageUpdateRequest.generated.swift => SubscriptionImageUpdateRequest.generated.swift} (80%) create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/WebhookCreateRequest.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/WebhookDeliveryCreateRequest.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/WebhookPingCreateRequest.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/WebhookUpdateRequest.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/WinBackOfferCreateRequest.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/WinBackOfferUpdateRequest.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AccessibilityDeclarationResponse.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AccessibilityDeclarationsResponse.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AlternativeDistributionDomainResponse.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AlternativeDistributionDomainsResponse.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AlternativeDistributionKeyResponse.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AlternativeDistributionKeysResponse.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AlternativeDistributionPackageDeltaResponse.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AlternativeDistributionPackageDeltasResponse.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AlternativeDistributionPackageResponse.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AlternativeDistributionPackageVariantResponse.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AlternativeDistributionPackageVariantsResponse.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AlternativeDistributionPackageVersionDeltasLinkagesResponse.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AlternativeDistributionPackageVersionResponse.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AlternativeDistributionPackageVersionVariantsLinkagesResponse.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AlternativeDistributionPackageVersionsLinkagesResponse.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AlternativeDistributionPackageVersionsResponse.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AnalyticsReportInstanceResponse.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AnalyticsReportInstanceSegmentsLinkagesResponse.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AnalyticsReportInstancesLinkagesResponse.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AnalyticsReportInstancesResponse.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AnalyticsReportRequestReportsLinkagesResponse.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AnalyticsReportRequestResponse.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AnalyticsReportRequestsResponse.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AnalyticsReportResponse.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AnalyticsReportSegmentResponse.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AnalyticsReportSegmentsResponse.generated.swift rename Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/{AppStoreVersionLocalizationsWithoutIncludesResponse.generated.swift => AnalyticsReportsResponse.generated.swift} (74%) create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppAccessibilityDeclarationsLinkagesResponse.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppAlternativeDistributionKeyLinkageResponse.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppAnalyticsReportRequestsLinkagesResponse.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppAppAvailabilityV2LinkageResponse.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppAppClipsLinkagesResponse.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppAppCustomProductPagesLinkagesResponse.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppAppEncryptionDeclarationsLinkagesResponse.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppAppEventsLinkagesResponse.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppAppInfosLinkagesResponse.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppAppPricePointsLinkagesResponse.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppAppPriceScheduleLinkageResponse.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppAppStoreVersionExperimentsV2LinkagesResponse.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppAppStoreVersionsLinkagesResponse.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppAvailabilityV2TerritoryAvailabilitiesLinkagesResponse.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppBackgroundAssetsLinkagesResponse.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppBetaAppLocalizationsLinkagesResponse.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppBetaAppReviewDetailLinkageResponse.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppBetaFeedbackCrashSubmissionsLinkagesResponse.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppBetaFeedbackScreenshotSubmissionsLinkagesResponse.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppBetaGroupsLinkagesResponse.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppBetaLicenseAgreementLinkageResponse.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppBuildsLinkagesResponse.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppCategoryParentLinkageResponse.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppCategorySubcategoriesLinkagesResponse.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppCiProductLinkageResponse.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppClipAppClipAdvancedExperiencesLinkagesResponse.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppClipAppClipDefaultExperiencesLinkagesResponse.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppClipDefaultExperienceAppClipAppStoreReviewDetailLinkageResponse.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppClipDefaultExperienceAppClipDefaultExperienceLocalizationsLinkagesResponse.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppClipDefaultExperienceLocalizationAppClipHeaderImageLinkageResponse.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppCustomProductPageAppCustomProductPageVersionsLinkagesResponse.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppCustomProductPageLocalizationAppPreviewSetsLinkagesResponse.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppCustomProductPageLocalizationAppScreenshotSetsLinkagesResponse.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppCustomProductPageVersionAppCustomProductPageLocalizationsLinkagesResponse.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppCustomerReviewsLinkagesResponse.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppEncryptionDeclarationAppEncryptionDeclarationDocumentLinkageResponse.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppEncryptionDeclarationAppLinkageResponse.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppEndUserLicenseAgreementLinkageResponse.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppEventLocalizationAppEventScreenshotsLinkagesResponse.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppEventLocalizationAppEventVideoClipsLinkagesResponse.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppEventLocalizationsLinkagesResponse.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppGameCenterDetailLinkageResponse.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppGameCenterEnabledVersionsLinkagesResponse.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppInAppPurchasesLinkagesResponse.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppInAppPurchasesV2LinkagesResponse.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppInfoAgeRatingDeclarationLinkageResponse.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppInfoAppInfoLocalizationsLinkagesResponse.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppInfoPrimaryCategoryLinkageResponse.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppInfoPrimarySubcategoryOneLinkageResponse.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppInfoPrimarySubcategoryTwoLinkageResponse.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppInfoSecondaryCategoryLinkageResponse.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppInfoSecondarySubcategoryOneLinkageResponse.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppInfoSecondarySubcategoryTwoLinkageResponse.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppMarketplaceSearchDetailLinkageResponse.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppPerfPowerMetricsLinkagesResponse.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppPreReleaseVersionsLinkagesResponse.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppPricePointV3EqualizationsLinkagesResponse.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppPriceScheduleAutomaticPricesLinkagesResponse.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppPriceScheduleBaseTerritoryLinkageResponse.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppPriceScheduleManualPricesLinkagesResponse.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppReviewSubmissionsLinkagesResponse.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppStoreReviewDetailAppStoreReviewAttachmentsLinkagesResponse.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppStoreVersionAgeRatingDeclarationLinkageResponse.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppStoreVersionAlternativeDistributionPackageLinkageResponse.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppStoreVersionAppStoreReviewDetailLinkageResponse.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppStoreVersionAppStoreVersionExperimentsLinkagesResponse.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppStoreVersionAppStoreVersionExperimentsV2LinkagesResponse.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppStoreVersionAppStoreVersionLocalizationsLinkagesResponse.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppStoreVersionAppStoreVersionPhasedReleaseLinkageResponse.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppStoreVersionAppStoreVersionSubmissionLinkageResponse.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppStoreVersionCustomerReviewsLinkagesResponse.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppStoreVersionExperimentAppStoreVersionExperimentTreatmentsLinkagesResponse.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppStoreVersionExperimentTreatmentAppStoreVersionExperimentTreatmentLocalizationsLinkagesResponse.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppStoreVersionExperimentTreatmentLocalizationAppPreviewSetsLinkagesResponse.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppStoreVersionExperimentTreatmentLocalizationAppScreenshotSetsLinkagesResponse.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppStoreVersionExperimentV2AppStoreVersionExperimentTreatmentsLinkagesResponse.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppStoreVersionGameCenterAppVersionLinkageResponse.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppStoreVersionLocalizationAppPreviewSetsLinkagesResponse.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppStoreVersionLocalizationAppScreenshotSetsLinkagesResponse.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppStoreVersionRoutingAppCoverageLinkageResponse.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppSubscriptionGracePeriodLinkageResponse.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppSubscriptionGroupsLinkagesResponse.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppWebhooksLinkagesResponse.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BackgroundAssetResponse.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BackgroundAssetUploadFileResponse.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BackgroundAssetUploadFilesResponse.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BackgroundAssetVersionBackgroundAssetUploadFilesLinkagesResponse.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BackgroundAssetVersionInternalBetaReleaseResponse.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BackgroundAssetVersionResponse.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BackgroundAssetVersionsLinkagesResponse.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BackgroundAssetVersionsResponse.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BackgroundAssetsResponse.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BetaAppLocalizationAppLinkageResponse.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BetaAppReviewDetailAppLinkageResponse.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BetaAppReviewSubmissionBuildLinkageResponse.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BetaBuildLocalizationBuildLinkageResponse.generated.swift rename Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/{AppPreOrderWithoutIncludesResponse.generated.swift => BetaCrashLogResponse.generated.swift} (72%) create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BetaFeedbackCrashSubmissionCrashLogLinkageResponse.generated.swift rename Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/{AppPriceResponse.generated.swift => BetaFeedbackCrashSubmissionResponse.generated.swift} (67%) rename Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/{AppPricesResponse.generated.swift => BetaFeedbackCrashSubmissionsResponse.generated.swift} (70%) rename Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/{AppPricePointResponse.generated.swift => BetaFeedbackScreenshotSubmissionResponse.generated.swift} (67%) create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BetaFeedbackScreenshotSubmissionsResponse.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BetaGroupAppLinkageResponse.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BetaGroupBetaRecruitmentCriteriaLinkageResponse.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BetaGroupBetaRecruitmentCriterionCompatibleBuildCheckLinkageResponse.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BetaLicenseAgreementAppLinkageResponse.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BetaPublicLinkUsagesV1MetricResponse.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BetaRecruitmentCriterionCompatibleBuildCheckResponse.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BetaRecruitmentCriterionOptionsResponse.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BetaRecruitmentCriterionResponse.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BuildAppLinkageResponse.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BuildAppStoreVersionLinkageResponse.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BuildBetaAppReviewSubmissionLinkageResponse.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BuildBetaBuildLocalizationsLinkagesResponse.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BuildBetaDetailBuildLinkageResponse.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BuildBuildBetaDetailLinkageResponse.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BuildBundleAppClipDomainCacheStatusLinkageResponse.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BuildBundleAppClipDomainDebugStatusLinkageResponse.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BuildBundleBetaAppClipInvocationsLinkagesResponse.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BuildBundleBuildBundleFileSizesLinkagesResponse.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BuildDiagnosticSignaturesLinkagesResponse.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BuildIconsLinkagesResponse.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BuildPerfPowerMetricsLinkagesResponse.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BuildPreReleaseVersionLinkageResponse.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BundleIdAppLinkageResponse.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BundleIdBundleIdCapabilitiesLinkagesResponse.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BundleIdProfilesLinkagesResponse.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/CertificatePassTypeIdLinkageResponse.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/CiBuildActionArtifactsLinkagesResponse.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/CiBuildActionBuildRunLinkageResponse.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/CiBuildActionIssuesLinkagesResponse.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/CiBuildActionTestResultsLinkagesResponse.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/CiBuildRunActionsLinkagesResponse.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/CiBuildRunBuildsLinkagesResponse.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/CiMacOsVersionXcodeVersionsLinkagesResponse.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/CiProductAdditionalRepositoriesLinkagesResponse.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/CiProductAppLinkageResponse.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/CiProductBuildRunsLinkagesResponse.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/CiProductPrimaryRepositoriesLinkagesResponse.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/CiProductWorkflowsLinkagesResponse.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/CiWorkflowBuildRunsLinkagesResponse.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/CiWorkflowRepositoryLinkageResponse.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/CiXcodeVersionMacOsVersionsLinkagesResponse.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/CustomerReviewResponseLinkageResponse.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/CustomerReviewSummarizationsResponse.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/DiagnosticSignatureLogsLinkagesResponse.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/EndUserLicenseAgreementTerritoriesLinkagesResponse.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterAchievementLocalizationGameCenterAchievementImageLinkageResponse.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterAchievementLocalizationGameCenterAchievementLinkageResponse.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterAchievementLocalizationsLinkagesResponse.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterAchievementReleasesLinkagesResponse.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterActivitiesResponse.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterActivityImageResponse.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterActivityLocalizationImageLinkageResponse.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterActivityLocalizationResponse.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterActivityLocalizationsResponse.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterActivityResponse.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterActivityVersionDefaultImageLinkageResponse.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterActivityVersionLocalizationsLinkagesResponse.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterActivityVersionReleaseResponse.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterActivityVersionReleasesResponse.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterActivityVersionResponse.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterActivityVersionsLinkagesResponse.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterActivityVersionsResponse.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterAppVersionAppStoreVersionLinkageResponse.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterChallengeImageResponse.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterChallengeLocalizationImageLinkageResponse.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterChallengeLocalizationResponse.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterChallengeLocalizationsResponse.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterChallengeResponse.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterChallengeVersionDefaultImageLinkageResponse.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterChallengeVersionLocalizationsLinkagesResponse.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterChallengeVersionReleaseResponse.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterChallengeVersionReleasesResponse.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterChallengeVersionResponse.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterChallengeVersionsLinkagesResponse.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterChallengeVersionsResponse.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterChallengesResponse.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterDetailAchievementReleasesLinkagesResponse.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterDetailActivityReleasesLinkagesResponse.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterDetailChallengeReleasesLinkagesResponse.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterDetailGameCenterActivitiesLinkagesResponse.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterDetailGameCenterAppVersionsLinkagesResponse.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterDetailGameCenterChallengesLinkagesResponse.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterDetailGameCenterGroupLinkageResponse.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterDetailLeaderboardReleasesLinkagesResponse.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterDetailLeaderboardSetReleasesLinkagesResponse.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterGroupGameCenterActivitiesLinkagesResponse.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterGroupGameCenterChallengesLinkagesResponse.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterGroupGameCenterDetailsLinkagesResponse.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterLeaderboardEntrySubmissionResponse.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterLeaderboardLocalizationGameCenterLeaderboardImageLinkageResponse.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterLeaderboardLocalizationsLinkagesResponse.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterLeaderboardReleasesLinkagesResponse.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterLeaderboardSetLocalizationGameCenterLeaderboardSetImageLinkageResponse.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterLeaderboardSetLocalizationsLinkagesResponse.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterLeaderboardSetMemberLocalizationGameCenterLeaderboardLinkageResponse.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterLeaderboardSetMemberLocalizationGameCenterLeaderboardSetLinkageResponse.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterLeaderboardSetReleasesLinkagesResponse.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterMatchmakingRuleSetMatchmakingQueuesLinkagesResponse.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterMatchmakingRuleSetRulesLinkagesResponse.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterMatchmakingRuleSetTeamsLinkagesResponse.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterPlayerAchievementSubmissionResponse.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/InAppPurchaseAvailabilityAvailableTerritoriesLinkagesResponse.generated.swift rename Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/{PromotedPurchaseImageResponse.generated.swift => InAppPurchaseImageResponse.generated.swift} (62%) rename Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/{PromotedPurchaseImagesResponse.generated.swift => InAppPurchaseImagesResponse.generated.swift} (68%) create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/InAppPurchasePricePointEqualizationsLinkagesResponse.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/InAppPurchasePriceScheduleAutomaticPricesLinkagesResponse.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/InAppPurchasePriceScheduleBaseTerritoryLinkageResponse.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/InAppPurchasePriceScheduleManualPricesLinkagesResponse.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/InAppPurchaseV2AppStoreReviewScreenshotLinkageResponse.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/InAppPurchaseV2ContentLinkageResponse.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/InAppPurchaseV2IapPriceScheduleLinkageResponse.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/InAppPurchaseV2ImagesLinkagesResponse.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/InAppPurchaseV2InAppPurchaseAvailabilityLinkageResponse.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/InAppPurchaseV2InAppPurchaseLocalizationsLinkagesResponse.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/InAppPurchaseV2PricePointsLinkagesResponse.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/InAppPurchaseV2PromotedPurchaseLinkageResponse.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/MarketplaceSearchDetailResponse.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/MarketplaceWebhookResponse.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/MarketplaceWebhooksResponse.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/MerchantIdCertificatesLinkagesResponse.generated.swift rename Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/{AppPriceTierResponse.generated.swift => MerchantIdResponse.generated.swift} (65%) rename Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/{AppPriceTiersResponse.generated.swift => MerchantIdsResponse.generated.swift} (71%) rename Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/{AppAvailabilityResponse.generated.swift => NominationResponse.generated.swift} (63%) rename Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/{AppPricePointsV2Response.generated.swift => NominationsResponse.generated.swift} (72%) create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/PassTypeIdCertificatesLinkagesResponse.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/PassTypeIdResponse.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/PassTypeIdsResponse.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/PrereleaseVersionAppLinkageResponse.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/PrereleaseVersionBuildsLinkagesResponse.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/ProfileBundleIdLinkageResponse.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/ProfileCertificatesLinkagesResponse.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/ProfileDevicesLinkagesResponse.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/ReviewSubmissionItemsLinkagesResponse.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/ScmProviderRepositoriesLinkagesResponse.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/ScmRepositoryGitReferencesLinkagesResponse.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/ScmRepositoryPullRequestsLinkagesResponse.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/SubscriptionAppStoreReviewScreenshotLinkageResponse.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/SubscriptionAvailabilityAvailableTerritoriesLinkagesResponse.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/SubscriptionGroupSubscriptionGroupLocalizationsLinkagesResponse.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/SubscriptionGroupSubscriptionsLinkagesResponse.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/SubscriptionImageResponse.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/SubscriptionImagesLinkagesResponse.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/SubscriptionImagesResponse.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/SubscriptionOfferCodeCustomCodesLinkagesResponse.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/SubscriptionOfferCodeOneTimeUseCodeValuesLinkageResponse.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/SubscriptionOfferCodeOneTimeUseCodesLinkagesResponse.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/SubscriptionOfferCodePricesLinkagesResponse.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/SubscriptionOfferCodesLinkagesResponse.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/SubscriptionPricePointEqualizationsLinkagesResponse.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/SubscriptionPricePointsLinkagesResponse.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/SubscriptionPromotedPurchaseLinkageResponse.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/SubscriptionPromotionalOfferPricesLinkagesResponse.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/SubscriptionPromotionalOffersLinkagesResponse.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/SubscriptionSubscriptionAvailabilityLinkageResponse.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/SubscriptionSubscriptionLocalizationsLinkagesResponse.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/SubscriptionWinBackOffersLinkagesResponse.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/UserInvitationVisibleAppsLinkagesResponse.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/WebhookDeliveriesLinkagesResponse.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/WebhookDeliveriesResponse.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/WebhookDeliveryResponse.generated.swift rename Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/{BuildBetaDetailWithoutIncludesResponse.generated.swift => WebhookPingResponse.generated.swift} (72%) rename Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/{AppPreOrderResponse.generated.swift => WebhookResponse.generated.swift} (79%) create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/WebhooksResponse.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/WinBackOfferPricesLinkagesResponse.generated.swift rename Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/{AppPricePointsResponse.generated.swift => WinBackOfferPricesResponse.generated.swift} (76%) create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/WinBackOfferResponse.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/WinBackOffersResponse.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/SubscriptionImage.generated.swift rename Sources/AppStoreConnectKit/autogenerated/Schemas/{AppPreOrder.generated.swift => Webhook.generated.swift} (54%) create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/WebhookDelivery.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/WebhookEvent.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/WebhookEventType.generated.swift rename Sources/AppStoreConnectKit/autogenerated/Schemas/{Requests/GameCenterMatchmakingTestRequest.generated.swift => WebhookPing.generated.swift} (74%) create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/WinBackOffer.generated.swift create mode 100644 Sources/AppStoreConnectKit/autogenerated/Schemas/WinBackOfferPrice.generated.swift rename Sources/AppStoreConnectKit/autogenerated/Schemas/{AppPriceInlineCreate.generated.swift => WinBackOfferPriceInlineCreate.generated.swift} (68%) diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/Namespace.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/Namespace.swift index 4b5e0eac..2391c87a 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/Namespace.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/Namespace.swift @@ -4,6 +4,10 @@ import Foundation public enum V1 { + public enum AccessibilityDeclarations { + public enum ById {} + } + public enum Actors { public enum ById {} } @@ -12,9 +16,77 @@ public enum V1 { public enum ById {} } - public enum AppAvailabilities { + public enum AlternativeDistributionDomains { + public enum ById {} + } + + public enum AlternativeDistributionKeys { + public enum ById {} + } + + public enum AlternativeDistributionPackageDeltas { + public enum ById {} + } + + public enum AlternativeDistributionPackageVariants { + public enum ById {} + } + + public enum AlternativeDistributionPackageVersions { public enum ById { - public enum AvailableTerritories {} + public enum Deltas {} + + public enum Relationships { + public enum Deltas {} + + public enum Variants {} + } + + public enum Variants {} + } + } + + public enum AlternativeDistributionPackages { + public enum ById { + public enum Relationships { + public enum Versions {} + } + + public enum Versions {} + } + } + + public enum AnalyticsReportInstances { + public enum ById { + public enum Relationships { + public enum Segments {} + } + + public enum Segments {} + } + } + + public enum AnalyticsReportRequests { + public enum ById { + public enum Relationships { + public enum Reports {} + } + + public enum Reports {} + } + } + + public enum AnalyticsReportSegments { + public enum ById {} + } + + public enum AnalyticsReports { + public enum ById { + public enum Instances {} + + public enum Relationships { + public enum Instances {} + } } } @@ -22,6 +94,12 @@ public enum V1 { public enum ById { public enum Parent {} + public enum Relationships { + public enum Parent {} + + public enum Subcategories {} + } + public enum Subcategories {} } } @@ -41,6 +119,10 @@ public enum V1 { public enum AppClipDefaultExperienceLocalizations { public enum ById { public enum AppClipHeaderImage {} + + public enum Relationships { + public enum AppClipHeaderImage {} + } } } @@ -51,6 +133,10 @@ public enum V1 { public enum AppClipDefaultExperienceLocalizations {} public enum Relationships { + public enum AppClipAppStoreReviewDetail {} + + public enum AppClipDefaultExperienceLocalizations {} + public enum ReleaseWithAppStoreVersion {} } @@ -67,6 +153,12 @@ public enum V1 { public enum AppClipAdvancedExperiences {} public enum AppClipDefaultExperiences {} + + public enum Relationships { + public enum AppClipAdvancedExperiences {} + + public enum AppClipDefaultExperiences {} + } } } @@ -75,18 +167,32 @@ public enum V1 { public enum AppPreviewSets {} public enum AppScreenshotSets {} + + public enum Relationships { + public enum AppPreviewSets {} + + public enum AppScreenshotSets {} + } } } public enum AppCustomProductPageVersions { public enum ById { public enum AppCustomProductPageLocalizations {} + + public enum Relationships { + public enum AppCustomProductPageLocalizations {} + } } } public enum AppCustomProductPages { public enum ById { public enum AppCustomProductPageVersions {} + + public enum Relationships { + public enum AppCustomProductPageVersions {} + } } } @@ -101,6 +207,10 @@ public enum V1 { public enum AppEncryptionDeclarationDocument {} public enum Relationships { + public enum App {} + + public enum AppEncryptionDeclarationDocument {} + public enum Builds {} } } @@ -111,6 +221,12 @@ public enum V1 { public enum AppEventScreenshots {} public enum AppEventVideoClips {} + + public enum Relationships { + public enum AppEventScreenshots {} + + public enum AppEventVideoClips {} + } } } @@ -125,6 +241,10 @@ public enum V1 { public enum AppEvents { public enum ById { public enum Localizations {} + + public enum Relationships { + public enum Localizations {} + } } } @@ -144,6 +264,24 @@ public enum V1 { public enum PrimarySubcategoryTwo {} + public enum Relationships { + public enum AgeRatingDeclaration {} + + public enum AppInfoLocalizations {} + + public enum PrimaryCategory {} + + public enum PrimarySubcategoryOne {} + + public enum PrimarySubcategoryTwo {} + + public enum SecondaryCategory {} + + public enum SecondarySubcategoryOne {} + + public enum SecondarySubcategoryTwo {} + } + public enum SecondaryCategory {} public enum SecondarySubcategoryOne {} @@ -152,10 +290,6 @@ public enum V1 { } } - public enum AppPreOrders { - public enum ById {} - } - public enum AppPreviewSets { public enum ById { public enum AppPreviews {} @@ -170,12 +304,6 @@ public enum V1 { public enum ById {} } - public enum AppPricePoints { - public enum ById { - public enum Territory {} - } - } - public enum AppPriceSchedules { public enum ById { public enum AutomaticPrices {} @@ -183,17 +311,15 @@ public enum V1 { public enum BaseTerritory {} public enum ManualPrices {} - } - } - public enum AppPriceTiers { - public enum ById { - public enum PricePoints {} - } - } + public enum Relationships { + public enum AutomaticPrices {} - public enum AppPrices { - public enum ById {} + public enum BaseTerritory {} + + public enum ManualPrices {} + } + } } public enum AppScreenshotSets { @@ -217,6 +343,10 @@ public enum V1 { public enum AppStoreReviewDetails { public enum ById { public enum AppStoreReviewAttachments {} + + public enum Relationships { + public enum AppStoreReviewAttachments {} + } } } @@ -225,18 +355,32 @@ public enum V1 { public enum AppPreviewSets {} public enum AppScreenshotSets {} + + public enum Relationships { + public enum AppPreviewSets {} + + public enum AppScreenshotSets {} + } } } public enum AppStoreVersionExperimentTreatments { public enum ById { public enum AppStoreVersionExperimentTreatmentLocalizations {} + + public enum Relationships { + public enum AppStoreVersionExperimentTreatmentLocalizations {} + } } } public enum AppStoreVersionExperiments { public enum ById { public enum AppStoreVersionExperimentTreatments {} + + public enum Relationships { + public enum AppStoreVersionExperimentTreatments {} + } } } @@ -245,6 +389,12 @@ public enum V1 { public enum AppPreviewSets {} public enum AppScreenshotSets {} + + public enum Relationships { + public enum AppPreviewSets {} + + public enum AppScreenshotSets {} + } } } @@ -264,6 +414,8 @@ public enum V1 { public enum ById { public enum AgeRatingDeclaration {} + public enum AlternativeDistributionPackage {} + public enum AppClipDefaultExperience {} public enum AppStoreReviewDetail {} @@ -282,10 +434,34 @@ public enum V1 { public enum CustomerReviews {} + public enum GameCenterAppVersion {} + public enum Relationships { + public enum AgeRatingDeclaration {} + + public enum AlternativeDistributionPackage {} + public enum AppClipDefaultExperience {} + public enum AppStoreReviewDetail {} + + public enum AppStoreVersionExperiments {} + + public enum AppStoreVersionExperimentsV2 {} + + public enum AppStoreVersionLocalizations {} + + public enum AppStoreVersionPhasedRelease {} + + public enum AppStoreVersionSubmission {} + public enum Build {} + + public enum CustomerReviews {} + + public enum GameCenterAppVersion {} + + public enum RoutingAppCoverage {} } public enum RoutingAppCoverage {} @@ -294,7 +470,13 @@ public enum V1 { public enum Apps { public enum ById { - public enum AppAvailability {} + public enum AccessibilityDeclarations {} + + public enum AlternativeDistributionKey {} + + public enum AnalyticsReportRequests {} + + public enum AppAvailabilityV2 {} public enum AppClips {} @@ -314,12 +496,16 @@ public enum V1 { public enum AppStoreVersions {} - public enum AvailableTerritories {} + public enum BackgroundAssets {} public enum BetaAppLocalizations {} public enum BetaAppReviewDetail {} + public enum BetaFeedbackCrashSubmissions {} + + public enum BetaFeedbackScreenshotSubmissions {} + public enum BetaGroups {} public enum BetaLicenseAgreement {} @@ -328,6 +514,8 @@ public enum V1 { public enum CiProduct {} + public enum CustomerReviewSummarizations {} + public enum CustomerReviews {} public enum EndUserLicenseAgreement {} @@ -340,26 +528,90 @@ public enum V1 { public enum InAppPurchasesV2 {} + public enum MarketplaceSearchDetail {} + public enum Metrics { public enum BetaTesterUsages {} } public enum PerfPowerMetrics {} - public enum PreOrder {} - public enum PreReleaseVersions {} - public enum PricePoints {} - - public enum Prices {} - public enum PromotedPurchases {} public enum Relationships { + public enum AccessibilityDeclarations {} + + public enum AlternativeDistributionKey {} + + public enum AnalyticsReportRequests {} + + public enum AppAvailabilityV2 {} + + public enum AppClips {} + + public enum AppCustomProductPages {} + + public enum AppEncryptionDeclarations {} + + public enum AppEvents {} + + public enum AppInfos {} + + public enum AppPricePoints {} + + public enum AppPriceSchedule {} + + public enum AppStoreVersionExperimentsV2 {} + + public enum AppStoreVersions {} + + public enum BackgroundAssets {} + + public enum BetaAppLocalizations {} + + public enum BetaAppReviewDetail {} + + public enum BetaFeedbackCrashSubmissions {} + + public enum BetaFeedbackScreenshotSubmissions {} + + public enum BetaGroups {} + + public enum BetaLicenseAgreement {} + public enum BetaTesters {} + public enum Builds {} + + public enum CiProduct {} + + public enum CustomerReviews {} + + public enum EndUserLicenseAgreement {} + + public enum GameCenterDetail {} + + public enum GameCenterEnabledVersions {} + + public enum InAppPurchases {} + + public enum InAppPurchasesV2 {} + + public enum MarketplaceSearchDetail {} + + public enum PreReleaseVersions {} + public enum PromotedPurchases {} + + public enum ReviewSubmissions {} + + public enum SubscriptionGracePeriod {} + + public enum SubscriptionGroups {} + + public enum Webhooks {} } public enum ReviewSubmissions {} @@ -367,6 +619,36 @@ public enum V1 { public enum SubscriptionGracePeriod {} public enum SubscriptionGroups {} + + public enum Webhooks {} + } + } + + public enum BackgroundAssetUploadFiles { + public enum ById {} + } + + public enum BackgroundAssetVersionInternalBetaReleases { + public enum ById {} + } + + public enum BackgroundAssetVersions { + public enum ById { + public enum BackgroundAssetUploadFiles {} + + public enum Relationships { + public enum BackgroundAssetUploadFiles {} + } + } + } + + public enum BackgroundAssets { + public enum ById { + public enum Relationships { + public enum Versions {} + } + + public enum Versions {} } } @@ -381,40 +663,86 @@ public enum V1 { public enum BetaAppLocalizations { public enum ById { public enum App {} + + public enum Relationships { + public enum App {} + } } } public enum BetaAppReviewDetails { public enum ById { public enum App {} + + public enum Relationships { + public enum App {} + } } } public enum BetaAppReviewSubmissions { public enum ById { public enum Build {} + + public enum Relationships { + public enum Build {} + } } } public enum BetaBuildLocalizations { public enum ById { public enum Build {} + + public enum Relationships { + public enum Build {} + } } } + public enum BetaCrashLogs { + public enum ById {} + } + + public enum BetaFeedbackCrashSubmissions { + public enum ById { + public enum CrashLog {} + + public enum Relationships { + public enum CrashLog {} + } + } + } + + public enum BetaFeedbackScreenshotSubmissions { + public enum ById {} + } + public enum BetaGroups { public enum ById { public enum App {} + public enum BetaRecruitmentCriteria {} + + public enum BetaRecruitmentCriterionCompatibleBuildCheck {} + public enum BetaTesters {} public enum Builds {} public enum Metrics { public enum BetaTesterUsages {} + + public enum PublicLinkUsages {} } public enum Relationships { + public enum App {} + + public enum BetaRecruitmentCriteria {} + + public enum BetaRecruitmentCriterionCompatibleBuildCheck {} + public enum BetaTesters {} public enum Builds {} @@ -425,9 +753,19 @@ public enum V1 { public enum BetaLicenseAgreements { public enum ById { public enum App {} + + public enum Relationships { + public enum App {} + } } } + public enum BetaRecruitmentCriteria { + public enum ById {} + } + + public enum BetaRecruitmentCriterionOptions {} + public enum BetaTesterInvitations {} public enum BetaTesters { @@ -455,6 +793,10 @@ public enum V1 { public enum BuildBetaDetails { public enum ById { public enum Build {} + + public enum Relationships { + public enum Build {} + } } } @@ -469,6 +811,16 @@ public enum V1 { public enum BetaAppClipInvocations {} public enum BuildBundleFileSizes {} + + public enum Relationships { + public enum AppClipDomainCacheStatus {} + + public enum AppClipDomainDebugStatus {} + + public enum BetaAppClipInvocations {} + + public enum BuildBundleFileSizes {} + } } } @@ -501,11 +853,27 @@ public enum V1 { public enum PreReleaseVersion {} public enum Relationships { + public enum App {} + public enum AppEncryptionDeclaration {} + public enum AppStoreVersion {} + + public enum BetaAppReviewSubmission {} + + public enum BetaBuildLocalizations {} + public enum BetaGroups {} + public enum BuildBetaDetail {} + + public enum DiagnosticSignatures {} + + public enum Icons {} + public enum IndividualTesters {} + + public enum PreReleaseVersion {} } } } @@ -521,11 +889,25 @@ public enum V1 { public enum BundleIdCapabilities {} public enum Profiles {} + + public enum Relationships { + public enum App {} + + public enum BundleIdCapabilities {} + + public enum Profiles {} + } } } public enum Certificates { - public enum ById {} + public enum ById { + public enum PassTypeId {} + + public enum Relationships { + public enum PassTypeId {} + } + } } public enum CiArtifacts { @@ -540,6 +922,16 @@ public enum V1 { public enum Issues {} + public enum Relationships { + public enum Artifacts {} + + public enum BuildRun {} + + public enum Issues {} + + public enum TestResults {} + } + public enum TestResults {} } } @@ -549,6 +941,12 @@ public enum V1 { public enum Actions {} public enum Builds {} + + public enum Relationships { + public enum Actions {} + + public enum Builds {} + } } } @@ -558,6 +956,10 @@ public enum V1 { public enum CiMacOsVersions { public enum ById { + public enum Relationships { + public enum XcodeVersions {} + } + public enum XcodeVersions {} } } @@ -572,97 +974,231 @@ public enum V1 { public enum PrimaryRepositories {} + public enum Relationships { + public enum AdditionalRepositories {} + + public enum App {} + + public enum BuildRuns {} + + public enum PrimaryRepositories {} + + public enum Workflows {} + } + public enum Workflows {} } } - public enum CiTestResults { - public enum ById {} - } + public enum CiTestResults { + public enum ById {} + } + + public enum CiWorkflows { + public enum ById { + public enum BuildRuns {} + + public enum Relationships { + public enum BuildRuns {} + + public enum Repository {} + } + + public enum Repository {} + } + } + + public enum CiXcodeVersions { + public enum ById { + public enum MacOsVersions {} + + public enum Relationships { + public enum MacOsVersions {} + } + } + } + + public enum CustomerReviewResponses { + public enum ById {} + } + + public enum CustomerReviews { + public enum ById { + public enum Relationships { + public enum Response {} + } + + public enum Response {} + } + } + + public enum Devices { + public enum ById {} + } + + public enum DiagnosticSignatures { + public enum ById { + public enum Logs {} + } + } + + public enum EndAppAvailabilityPreOrders {} + + public enum EndUserLicenseAgreements { + public enum ById { + public enum Relationships { + public enum Territories {} + } + + public enum Territories {} + } + } + + public enum FinanceReports {} + + public enum GameCenterAchievementImages { + public enum ById {} + } + + public enum GameCenterAchievementLocalizations { + public enum ById { + public enum GameCenterAchievement {} + + public enum GameCenterAchievementImage {} + + public enum Relationships { + public enum GameCenterAchievement {} + + public enum GameCenterAchievementImage {} + } + } + } + + public enum GameCenterAchievementReleases { + public enum ById {} + } + + public enum GameCenterAchievements { + public enum ById { + public enum GroupAchievement {} + + public enum Localizations {} + + public enum Relationships { + public enum Activity {} + + public enum GroupAchievement {} + + public enum Localizations {} - public enum CiWorkflows { - public enum ById { - public enum BuildRuns {} + public enum Releases {} + } - public enum Repository {} + public enum Releases {} } } - public enum CiXcodeVersions { + public enum GameCenterActivities { public enum ById { - public enum MacOsVersions {} + public enum Relationships { + public enum Achievements {} + + public enum Leaderboards {} + + public enum Versions {} + } + + public enum Versions {} } } - public enum CustomerReviewResponses { + public enum GameCenterActivityImages { public enum ById {} } - public enum CustomerReviews { + public enum GameCenterActivityLocalizations { public enum ById { - public enum Response {} + public enum Image {} + + public enum Relationships { + public enum Image {} + } } } - public enum Devices { + public enum GameCenterActivityVersionReleases { public enum ById {} } - public enum DiagnosticSignatures { + public enum GameCenterActivityVersions { public enum ById { - public enum Logs {} + public enum DefaultImage {} + + public enum Localizations {} + + public enum Relationships { + public enum DefaultImage {} + + public enum Localizations {} + } } } - public enum EndAppAvailabilityPreOrders {} - - public enum EndUserLicenseAgreements { + public enum GameCenterAppVersions { public enum ById { - public enum Territories {} + public enum AppStoreVersion {} + + public enum CompatibilityVersions {} + + public enum Relationships { + public enum AppStoreVersion {} + + public enum CompatibilityVersions {} + } } } - public enum FinanceReports {} - - public enum GameCenterAchievementImages { + public enum GameCenterChallengeImages { public enum ById {} } - public enum GameCenterAchievementLocalizations { + public enum GameCenterChallengeLocalizations { public enum ById { - public enum GameCenterAchievement {} + public enum Image {} - public enum GameCenterAchievementImage {} + public enum Relationships { + public enum Image {} + } } } - public enum GameCenterAchievementReleases { + public enum GameCenterChallengeVersionReleases { public enum ById {} } - public enum GameCenterAchievements { + public enum GameCenterChallengeVersions { public enum ById { - public enum GroupAchievement {} + public enum DefaultImage {} public enum Localizations {} public enum Relationships { - public enum GroupAchievement {} - } + public enum DefaultImage {} - public enum Releases {} + public enum Localizations {} + } } } - public enum GameCenterAppVersions { + public enum GameCenterChallenges { public enum ById { - public enum AppStoreVersion {} - - public enum CompatibilityVersions {} - public enum Relationships { - public enum CompatibilityVersions {} + public enum Leaderboard {} + + public enum Versions {} } + + public enum Versions {} } } @@ -670,10 +1206,18 @@ public enum V1 { public enum ById { public enum AchievementReleases {} + public enum ActivityReleases {} + + public enum ChallengeReleases {} + public enum GameCenterAchievements {} + public enum GameCenterActivities {} + public enum GameCenterAppVersions {} + public enum GameCenterChallenges {} + public enum GameCenterGroup {} public enum GameCenterLeaderboardSets {} @@ -691,11 +1235,31 @@ public enum V1 { } public enum Relationships { + public enum AchievementReleases {} + + public enum ActivityReleases {} + + public enum ChallengeReleases {} + + public enum ChallengesMinimumPlatformVersions {} + public enum GameCenterAchievements {} + public enum GameCenterActivities {} + + public enum GameCenterAppVersions {} + + public enum GameCenterChallenges {} + + public enum GameCenterGroup {} + public enum GameCenterLeaderboardSets {} public enum GameCenterLeaderboards {} + + public enum LeaderboardReleases {} + + public enum LeaderboardSetReleases {} } } } @@ -714,6 +1278,10 @@ public enum V1 { public enum ById { public enum GameCenterAchievements {} + public enum GameCenterActivities {} + + public enum GameCenterChallenges {} + public enum GameCenterDetails {} public enum GameCenterLeaderboardSets {} @@ -723,6 +1291,12 @@ public enum V1 { public enum Relationships { public enum GameCenterAchievements {} + public enum GameCenterActivities {} + + public enum GameCenterChallenges {} + + public enum GameCenterDetails {} + public enum GameCenterLeaderboardSets {} public enum GameCenterLeaderboards {} @@ -730,6 +1304,8 @@ public enum V1 { } } + public enum GameCenterLeaderboardEntrySubmissions {} + public enum GameCenterLeaderboardImages { public enum ById {} } @@ -737,6 +1313,10 @@ public enum V1 { public enum GameCenterLeaderboardLocalizations { public enum ById { public enum GameCenterLeaderboardImage {} + + public enum Relationships { + public enum GameCenterLeaderboardImage {} + } } } @@ -751,6 +1331,10 @@ public enum V1 { public enum GameCenterLeaderboardSetLocalizations { public enum ById { public enum GameCenterLeaderboardSetImage {} + + public enum Relationships { + public enum GameCenterLeaderboardSetImage {} + } } } @@ -759,6 +1343,12 @@ public enum V1 { public enum GameCenterLeaderboard {} public enum GameCenterLeaderboardSet {} + + public enum Relationships { + public enum GameCenterLeaderboard {} + + public enum GameCenterLeaderboardSet {} + } } } @@ -778,6 +1368,10 @@ public enum V1 { public enum GameCenterLeaderboards {} public enum GroupLeaderboardSet {} + + public enum Localizations {} + + public enum Releases {} } public enum Releases {} @@ -791,7 +1385,15 @@ public enum V1 { public enum Localizations {} public enum Relationships { + public enum Activity {} + + public enum Challenge {} + public enum GroupLeaderboard {} + + public enum Localizations {} + + public enum Releases {} } public enum Releases {} @@ -820,6 +1422,14 @@ public enum V1 { public enum ById { public enum MatchmakingQueues {} + public enum Relationships { + public enum MatchmakingQueues {} + + public enum Rules {} + + public enum Teams {} + } + public enum Rules {} public enum Teams {} @@ -842,6 +1452,8 @@ public enum V1 { public enum ById {} } + public enum GameCenterPlayerAchievementSubmissions {} + public enum InAppPurchaseAppStoreReviewScreenshots { public enum ById {} } @@ -849,6 +1461,10 @@ public enum V1 { public enum InAppPurchaseAvailabilities { public enum ById { public enum AvailableTerritories {} + + public enum Relationships { + public enum AvailableTerritories {} + } } } @@ -856,10 +1472,24 @@ public enum V1 { public enum ById {} } + public enum InAppPurchaseImages { + public enum ById {} + } + public enum InAppPurchaseLocalizations { public enum ById {} } + public enum InAppPurchasePricePoints { + public enum ById { + public enum Equalizations {} + + public enum Relationships { + public enum Equalizations {} + } + } + } + public enum InAppPurchasePriceSchedules { public enum ById { public enum AutomaticPrices {} @@ -867,6 +1497,14 @@ public enum V1 { public enum BaseTerritory {} public enum ManualPrices {} + + public enum Relationships { + public enum AutomaticPrices {} + + public enum BaseTerritory {} + + public enum ManualPrices {} + } } } @@ -876,11 +1514,49 @@ public enum V1 { public enum ById {} } + public enum MarketplaceSearchDetails { + public enum ById {} + } + + public enum MarketplaceWebhooks { + public enum ById {} + } + + public enum MerchantIds { + public enum ById { + public enum Certificates {} + + public enum Relationships { + public enum Certificates {} + } + } + } + + public enum Nominations { + public enum ById {} + } + + public enum PassTypeIds { + public enum ById { + public enum Certificates {} + + public enum Relationships { + public enum Certificates {} + } + } + } + public enum PreReleaseVersions { public enum ById { public enum App {} public enum Builds {} + + public enum Relationships { + public enum App {} + + public enum Builds {} + } } } @@ -891,17 +1567,19 @@ public enum V1 { public enum Certificates {} public enum Devices {} - } - } - public enum PromotedPurchaseImages { - public enum ById {} + public enum Relationships { + public enum BundleId {} + + public enum Certificates {} + + public enum Devices {} + } + } } public enum PromotedPurchases { - public enum ById { - public enum PromotionImages {} - } + public enum ById {} } public enum ReviewSubmissionItems { @@ -911,6 +1589,10 @@ public enum V1 { public enum ReviewSubmissions { public enum ById { public enum Items {} + + public enum Relationships { + public enum Items {} + } } } @@ -926,6 +1608,10 @@ public enum V1 { public enum ScmProviders { public enum ById { + public enum Relationships { + public enum Repositories {} + } + public enum Repositories {} } } @@ -939,6 +1625,12 @@ public enum V1 { public enum GitReferences {} public enum PullRequests {} + + public enum Relationships { + public enum GitReferences {} + + public enum PullRequests {} + } } } @@ -949,6 +1641,10 @@ public enum V1 { public enum SubscriptionAvailabilities { public enum ById { public enum AvailableTerritories {} + + public enum Relationships { + public enum AvailableTerritories {} + } } } @@ -964,12 +1660,22 @@ public enum V1 { public enum SubscriptionGroups { public enum ById { + public enum Relationships { + public enum SubscriptionGroupLocalizations {} + + public enum Subscriptions {} + } + public enum SubscriptionGroupLocalizations {} public enum Subscriptions {} } } + public enum SubscriptionImages { + public enum ById {} + } + public enum SubscriptionIntroductoryOffers { public enum ById {} } @@ -995,12 +1701,24 @@ public enum V1 { public enum OneTimeUseCodes {} public enum Prices {} + + public enum Relationships { + public enum CustomCodes {} + + public enum OneTimeUseCodes {} + + public enum Prices {} + } } } public enum SubscriptionPricePoints { public enum ById { public enum Equalizations {} + + public enum Relationships { + public enum Equalizations {} + } } } @@ -1011,6 +1729,10 @@ public enum V1 { public enum SubscriptionPromotionalOffers { public enum ById { public enum Prices {} + + public enum Relationships { + public enum Prices {} + } } } @@ -1020,6 +1742,8 @@ public enum V1 { public enum ById { public enum AppStoreReviewScreenshot {} + public enum Images {} + public enum IntroductoryOffers {} public enum OfferCodes {} @@ -1033,14 +1757,34 @@ public enum V1 { public enum PromotionalOffers {} public enum Relationships { + public enum AppStoreReviewScreenshot {} + + public enum Images {} + public enum IntroductoryOffers {} + public enum OfferCodes {} + + public enum PricePoints {} + public enum Prices {} + + public enum PromotedPurchase {} + + public enum PromotionalOffers {} + + public enum SubscriptionAvailability {} + + public enum SubscriptionLocalizations {} + + public enum WinBackOffers {} } public enum SubscriptionAvailability {} public enum SubscriptionLocalizations {} + + public enum WinBackOffers {} } } @@ -1052,6 +1796,10 @@ public enum V1 { public enum UserInvitations { public enum ById { + public enum Relationships { + public enum VisibleApps {} + } + public enum VisibleApps {} } } @@ -1065,10 +1813,38 @@ public enum V1 { public enum VisibleApps {} } } + + public enum WebhookDeliveries {} + + public enum WebhookPings {} + + public enum Webhooks { + public enum ById { + public enum Deliveries {} + + public enum Relationships { + public enum Deliveries {} + } + } + } + + public enum WinBackOffers { + public enum ById { + public enum Prices {} + + public enum Relationships { + public enum Prices {} + } + } + } } public enum V2 { public enum AppAvailabilities { public enum ById { + public enum Relationships { + public enum TerritoryAvailabilities {} + } + public enum TerritoryAvailabilities {} } } @@ -1076,6 +1852,10 @@ public enum V2 { public enum AppStoreVersionExperiments { public enum ById { public enum AppStoreVersionExperimentTreatments {} + + public enum Relationships { + public enum AppStoreVersionExperimentTreatments {} + } } } @@ -1087,6 +1867,8 @@ public enum V2 { public enum IapPriceSchedule {} + public enum Images {} + public enum InAppPurchaseAvailability {} public enum InAppPurchaseLocalizations {} @@ -1094,6 +1876,24 @@ public enum V2 { public enum PricePoints {} public enum PromotedPurchase {} + + public enum Relationships { + public enum AppStoreReviewScreenshot {} + + public enum Content {} + + public enum IapPriceSchedule {} + + public enum Images {} + + public enum InAppPurchaseAvailability {} + + public enum InAppPurchaseLocalizations {} + + public enum PricePoints {} + + public enum PromotedPurchase {} + } } } @@ -1107,6 +1907,10 @@ public enum V3 { public enum AppPricePoints { public enum ById { public enum Equalizations {} + + public enum Relationships { + public enum Equalizations {} + } } } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AccessibilityDeclarations/AccessibilityDeclarations.POST.f559971.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AccessibilityDeclarations/AccessibilityDeclarations.POST.f559971.generated.swift new file mode 100644 index 00000000..f52d1c62 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AccessibilityDeclarations/AccessibilityDeclarations.POST.f559971.generated.swift @@ -0,0 +1,84 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.AccessibilityDeclarations { + public struct POST: Endpoint { + public typealias Parameters = AccessibilityDeclarationCreateRequest + public typealias Response = AccessibilityDeclarationResponse + + public var path: String { + "/v1/accessibilityDeclarations" + } + + /// AccessibilityDeclaration representation + public var parameters: Parameters + + public init(parameters: Parameters) { + self.parameters = parameters + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "POST" + + var jsonEncoder: JSONEncoder { + let encoder = JSONEncoder() + return encoder + } + + urlRequest?.httpBody = try jsonEncoder.encode(parameters) + urlRequest?.setValue("application/json", forHTTPHeaderField: "Content-Type") + return urlRequest + } + + /// - Returns: **201**, Single AccessibilityDeclaration as `AccessibilityDeclarationResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **422**, Unprocessable request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 201: + return try jsonDecoder.decode(AccessibilityDeclarationResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 409: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 422: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AccessibilityDeclarations/ById/AccessibilityDeclarationsById.DELETE.ec25d6c.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AccessibilityDeclarations/ById/AccessibilityDeclarationsById.DELETE.ec25d6c.generated.swift new file mode 100644 index 00000000..dec016f8 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AccessibilityDeclarations/ById/AccessibilityDeclarationsById.DELETE.ec25d6c.generated.swift @@ -0,0 +1,72 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.AccessibilityDeclarations.ById { + public struct DELETE: Endpoint { + public typealias Parameters = Never + public typealias Response = Void + + public var path: String { + "/v1/accessibilityDeclarations/\(id)" + } + + /// the id of the requested resource + public var id: String + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "DELETE" + return urlRequest + } + + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 409: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AccessibilityDeclarations/ById/AccessibilityDeclarationsById.GET.ec25d6c.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AccessibilityDeclarations/ById/AccessibilityDeclarationsById.GET.ec25d6c.generated.swift new file mode 100644 index 00000000..43aebc4a --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AccessibilityDeclarations/ById/AccessibilityDeclarationsById.GET.ec25d6c.generated.swift @@ -0,0 +1,165 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.AccessibilityDeclarations.ById { + public struct GET: Endpoint { + public typealias Response = AccessibilityDeclarationResponse + + public var path: String { + "/v1/accessibilityDeclarations/\(id)" + } + + /// the id of the requested resource + public var id: String + + public var parameters: Parameters = Parameters() + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + components?.queryItems = [ + URLQueryItem(name: "fields[accessibilityDeclarations]", + value: parameters.fields[.accessibilityDeclarations]?.map { "\($0)" }.joined(separator: ",")) + ].filter { $0.value != nil } + if components?.queryItems?.isEmpty ?? false { + components?.queryItems = nil + } + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "GET" + return urlRequest + } + + /// - Returns: **200**, Single AccessibilityDeclaration as `AccessibilityDeclarationResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(AccessibilityDeclarationResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +extension V1.AccessibilityDeclarations.ById.GET { + public struct Parameters: Hashable { + public var fields: Fields = Fields() + + public struct Fields: Hashable { + public subscript (_ relation: Relation) -> T { + get { values[relation]?.base as! T } + set { values[relation] = AnyHashable(newValue) } + } + + private var values: [AnyHashable: AnyHashable] = [:] + + public struct AccessibilityDeclarations: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var deviceFamily: Self { + .init(rawValue: "deviceFamily") + } + + public static var state: Self { + .init(rawValue: "state") + } + + public static var supportsAudioDescriptions: Self { + .init(rawValue: "supportsAudioDescriptions") + } + + public static var supportsCaptions: Self { + .init(rawValue: "supportsCaptions") + } + + public static var supportsDarkInterface: Self { + .init(rawValue: "supportsDarkInterface") + } + + public static var supportsDifferentiateWithoutColorAlone: Self { + .init(rawValue: "supportsDifferentiateWithoutColorAlone") + } + + public static var supportsLargerText: Self { + .init(rawValue: "supportsLargerText") + } + + public static var supportsReducedMotion: Self { + .init(rawValue: "supportsReducedMotion") + } + + public static var supportsSufficientContrast: Self { + .init(rawValue: "supportsSufficientContrast") + } + + public static var supportsVoiceControl: Self { + .init(rawValue: "supportsVoiceControl") + } + + public static var supportsVoiceover: Self { + .init(rawValue: "supportsVoiceover") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct Relation: Hashable { + /// the fields to include for returned resources of type accessibilityDeclarations + public static var accessibilityDeclarations: Relation<[AccessibilityDeclarations]?> { + .init(key: "fields[accessibilityDeclarations]") + } + + internal let key: String + + public func hash(into hasher: inout Hasher) { + hasher.combine(key) + } + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AccessibilityDeclarations/ById/AccessibilityDeclarationsById.PATCH.ec25d6c.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AccessibilityDeclarations/ById/AccessibilityDeclarationsById.PATCH.ec25d6c.generated.swift new file mode 100644 index 00000000..3bde4b03 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AccessibilityDeclarations/ById/AccessibilityDeclarationsById.PATCH.ec25d6c.generated.swift @@ -0,0 +1,95 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.AccessibilityDeclarations.ById { + public struct PATCH: Endpoint { + public typealias Parameters = AccessibilityDeclarationUpdateRequest + public typealias Response = AccessibilityDeclarationResponse + + public var path: String { + "/v1/accessibilityDeclarations/\(id)" + } + + /// the id of the requested resource + public var id: String + + /// AccessibilityDeclaration representation + public var parameters: Parameters + + public init( + id: String, + parameters: Parameters + ) { + self.id = id + self.parameters = parameters + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "PATCH" + + var jsonEncoder: JSONEncoder { + let encoder = JSONEncoder() + return encoder + } + + urlRequest?.httpBody = try jsonEncoder.encode(parameters) + urlRequest?.setValue("application/json", forHTTPHeaderField: "Content-Type") + return urlRequest + } + + /// - Returns: **200**, Single AccessibilityDeclaration as `AccessibilityDeclarationResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **422**, Unprocessable request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(AccessibilityDeclarationResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 409: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 422: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Actors/Actors.GET.9d36d64.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Actors/Actors.GET.9d36d64.generated.swift index fbf82284..6f91a912 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Actors/Actors.GET.9d36d64.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Actors/Actors.GET.9d36d64.generated.swift @@ -43,7 +43,9 @@ extension V1.Actors { /// - Returns: **200**, List of Actors as `ActorsResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -57,9 +59,15 @@ extension V1.Actors { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -84,34 +92,35 @@ extension V1.Actors.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum Actors: Hashable, Codable, RawRepresentable { - case actorType - case apiKeyId - case userEmail - case userFirstName - case userLastName - case unknown(String) - - public var rawValue: String { - switch self { - case .actorType: return "actorType" - case .apiKeyId: return "apiKeyId" - case .userEmail: return "userEmail" - case .userFirstName: return "userFirstName" - case .userLastName: return "userLastName" - case .unknown(let rawValue): return rawValue - } + public struct Actors: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var actorType: Self { + .init(rawValue: "actorType") + } + + public static var apiKeyId: Self { + .init(rawValue: "apiKeyId") + } + + public static var userEmail: Self { + .init(rawValue: "userEmail") } + public static var userFirstName: Self { + .init(rawValue: "userFirstName") + } + + public static var userLastName: Self { + .init(rawValue: "userLastName") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "actorType": self = .actorType - case "apiKeyId": self = .apiKeyId - case "userEmail": self = .userEmail - case "userFirstName": self = .userFirstName - case "userLastName": self = .userLastName - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Actors/ById/ActorsById.GET.a087f6b.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Actors/ById/ActorsById.GET.a087f6b.generated.swift index e4963f0e..947ea478 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Actors/ById/ActorsById.GET.a087f6b.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Actors/ById/ActorsById.GET.a087f6b.generated.swift @@ -42,8 +42,10 @@ extension V1.Actors.ById { /// - Returns: **200**, Single Actor as `ActorResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -57,12 +59,18 @@ extension V1.Actors.ById { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 404: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -82,34 +90,35 @@ extension V1.Actors.ById.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum Actors: Hashable, Codable, RawRepresentable { - case actorType - case apiKeyId - case userEmail - case userFirstName - case userLastName - case unknown(String) - - public var rawValue: String { - switch self { - case .actorType: return "actorType" - case .apiKeyId: return "apiKeyId" - case .userEmail: return "userEmail" - case .userFirstName: return "userFirstName" - case .userLastName: return "userLastName" - case .unknown(let rawValue): return rawValue - } + public struct Actors: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var actorType: Self { + .init(rawValue: "actorType") + } + + public static var apiKeyId: Self { + .init(rawValue: "apiKeyId") + } + + public static var userEmail: Self { + .init(rawValue: "userEmail") } + public static var userFirstName: Self { + .init(rawValue: "userFirstName") + } + + public static var userLastName: Self { + .init(rawValue: "userLastName") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "actorType": self = .actorType - case "apiKeyId": self = .apiKeyId - case "userEmail": self = .userEmail - case "userFirstName": self = .userFirstName - case "userLastName": self = .userLastName - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AgeRatingDeclarations/ById/AgeRatingDeclarationsById.PATCH.0098304.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AgeRatingDeclarations/ById/AgeRatingDeclarationsById.PATCH.0098304.generated.swift index b51fbd93..8e1641ee 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AgeRatingDeclarations/ById/AgeRatingDeclarationsById.PATCH.0098304.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AgeRatingDeclarations/ById/AgeRatingDeclarationsById.PATCH.0098304.generated.swift @@ -48,9 +48,12 @@ extension V1.AgeRatingDeclarations.ById { /// - Returns: **200**, Single AgeRatingDeclaration as `AgeRatingDeclarationResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **422**, Unprocessable request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -64,6 +67,9 @@ extension V1.AgeRatingDeclarations.ById { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) @@ -73,6 +79,12 @@ extension V1.AgeRatingDeclarations.ById { case 409: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 422: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AlternativeDistributionDomains/AlternativeDistributionDomains.GET.b6eabc5.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AlternativeDistributionDomains/AlternativeDistributionDomains.GET.b6eabc5.generated.swift new file mode 100644 index 00000000..59b478d0 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AlternativeDistributionDomains/AlternativeDistributionDomains.GET.b6eabc5.generated.swift @@ -0,0 +1,131 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.AlternativeDistributionDomains { + public struct GET: Endpoint { + public typealias Response = AlternativeDistributionDomainsResponse + + public var path: String { + "/v1/alternativeDistributionDomains" + } + + public var parameters: Parameters = Parameters() + + public init() { + + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + components?.queryItems = [ + URLQueryItem(name: "fields[alternativeDistributionDomains]", + value: parameters.fields[.alternativeDistributionDomains]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "limit", + value: parameters.limit.map { "\($0)" }) + ].filter { $0.value != nil } + if components?.queryItems?.isEmpty ?? false { + components?.queryItems = nil + } + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "GET" + return urlRequest + } + + /// - Returns: **200**, List of AlternativeDistributionDomains as `AlternativeDistributionDomainsResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(AlternativeDistributionDomainsResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +extension V1.AlternativeDistributionDomains.GET { + public struct Parameters: Hashable { + public var fields: Fields = Fields() + + /// maximum resources per page + public var limit: Int? + + public struct Fields: Hashable { + public subscript (_ relation: Relation) -> T { + get { values[relation]?.base as! T } + set { values[relation] = AnyHashable(newValue) } + } + + private var values: [AnyHashable: AnyHashable] = [:] + + public struct AlternativeDistributionDomains: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var createdDate: Self { + .init(rawValue: "createdDate") + } + + public static var domain: Self { + .init(rawValue: "domain") + } + + public static var referenceName: Self { + .init(rawValue: "referenceName") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct Relation: Hashable { + /// the fields to include for returned resources of type alternativeDistributionDomains + public static var alternativeDistributionDomains: Relation<[AlternativeDistributionDomains]?> { + .init(key: "fields[alternativeDistributionDomains]") + } + + internal let key: String + + public func hash(into hasher: inout Hasher) { + hasher.combine(key) + } + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AlternativeDistributionDomains/AlternativeDistributionDomains.POST.b6eabc5.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AlternativeDistributionDomains/AlternativeDistributionDomains.POST.b6eabc5.generated.swift new file mode 100644 index 00000000..5973cde3 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AlternativeDistributionDomains/AlternativeDistributionDomains.POST.b6eabc5.generated.swift @@ -0,0 +1,84 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.AlternativeDistributionDomains { + public struct POST: Endpoint { + public typealias Parameters = AlternativeDistributionDomainCreateRequest + public typealias Response = AlternativeDistributionDomainResponse + + public var path: String { + "/v1/alternativeDistributionDomains" + } + + /// AlternativeDistributionDomain representation + public var parameters: Parameters + + public init(parameters: Parameters) { + self.parameters = parameters + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "POST" + + var jsonEncoder: JSONEncoder { + let encoder = JSONEncoder() + return encoder + } + + urlRequest?.httpBody = try jsonEncoder.encode(parameters) + urlRequest?.setValue("application/json", forHTTPHeaderField: "Content-Type") + return urlRequest + } + + /// - Returns: **201**, Single AlternativeDistributionDomain as `AlternativeDistributionDomainResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **422**, Unprocessable request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 201: + return try jsonDecoder.decode(AlternativeDistributionDomainResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 409: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 422: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AlternativeDistributionDomains/ById/AlternativeDistributionDomainsById.DELETE.c66a2b2.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AlternativeDistributionDomains/ById/AlternativeDistributionDomainsById.DELETE.c66a2b2.generated.swift new file mode 100644 index 00000000..b5209bf0 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AlternativeDistributionDomains/ById/AlternativeDistributionDomainsById.DELETE.c66a2b2.generated.swift @@ -0,0 +1,72 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.AlternativeDistributionDomains.ById { + public struct DELETE: Endpoint { + public typealias Parameters = Never + public typealias Response = Void + + public var path: String { + "/v1/alternativeDistributionDomains/\(id)" + } + + /// the id of the requested resource + public var id: String + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "DELETE" + return urlRequest + } + + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 409: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AlternativeDistributionDomains/ById/AlternativeDistributionDomainsById.GET.c66a2b2.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AlternativeDistributionDomains/ById/AlternativeDistributionDomainsById.GET.c66a2b2.generated.swift new file mode 100644 index 00000000..521055cf --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AlternativeDistributionDomains/ById/AlternativeDistributionDomainsById.GET.c66a2b2.generated.swift @@ -0,0 +1,133 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.AlternativeDistributionDomains.ById { + public struct GET: Endpoint { + public typealias Response = AlternativeDistributionDomainResponse + + public var path: String { + "/v1/alternativeDistributionDomains/\(id)" + } + + /// the id of the requested resource + public var id: String + + public var parameters: Parameters = Parameters() + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + components?.queryItems = [ + URLQueryItem(name: "fields[alternativeDistributionDomains]", + value: parameters.fields[.alternativeDistributionDomains]?.map { "\($0)" }.joined(separator: ",")) + ].filter { $0.value != nil } + if components?.queryItems?.isEmpty ?? false { + components?.queryItems = nil + } + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "GET" + return urlRequest + } + + /// - Returns: **200**, Single AlternativeDistributionDomain as `AlternativeDistributionDomainResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(AlternativeDistributionDomainResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +extension V1.AlternativeDistributionDomains.ById.GET { + public struct Parameters: Hashable { + public var fields: Fields = Fields() + + public struct Fields: Hashable { + public subscript (_ relation: Relation) -> T { + get { values[relation]?.base as! T } + set { values[relation] = AnyHashable(newValue) } + } + + private var values: [AnyHashable: AnyHashable] = [:] + + public struct AlternativeDistributionDomains: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var createdDate: Self { + .init(rawValue: "createdDate") + } + + public static var domain: Self { + .init(rawValue: "domain") + } + + public static var referenceName: Self { + .init(rawValue: "referenceName") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct Relation: Hashable { + /// the fields to include for returned resources of type alternativeDistributionDomains + public static var alternativeDistributionDomains: Relation<[AlternativeDistributionDomains]?> { + .init(key: "fields[alternativeDistributionDomains]") + } + + internal let key: String + + public func hash(into hasher: inout Hasher) { + hasher.combine(key) + } + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AlternativeDistributionKeys/AlternativeDistributionKeys.GET.6c0e9f9.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AlternativeDistributionKeys/AlternativeDistributionKeys.GET.6c0e9f9.generated.swift new file mode 100644 index 00000000..acf70432 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AlternativeDistributionKeys/AlternativeDistributionKeys.GET.6c0e9f9.generated.swift @@ -0,0 +1,149 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.AlternativeDistributionKeys { + public struct GET: Endpoint { + public typealias Response = AlternativeDistributionKeysResponse + + public var path: String { + "/v1/alternativeDistributionKeys" + } + + public var parameters: Parameters = Parameters() + + public init() { + + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + components?.queryItems = [ + URLQueryItem(name: "exists[app]", + value: parameters.exists[.app].map { "\($0)" }), + URLQueryItem(name: "fields[alternativeDistributionKeys]", + value: parameters.fields[.alternativeDistributionKeys]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "limit", + value: parameters.limit.map { "\($0)" }) + ].filter { $0.value != nil } + if components?.queryItems?.isEmpty ?? false { + components?.queryItems = nil + } + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "GET" + return urlRequest + } + + /// - Returns: **200**, List of AlternativeDistributionKeys as `AlternativeDistributionKeysResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(AlternativeDistributionKeysResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +extension V1.AlternativeDistributionKeys.GET { + public struct Parameters: Hashable { + public var exists: Exists = Exists() + + public var fields: Fields = Fields() + + /// maximum resources per page + public var limit: Int? + + public struct Exists: Hashable { + public subscript (_ relation: Relation) -> T { + get { values[relation]?.base as! T } + set { values[relation] = AnyHashable(newValue) } + } + + private var values: [AnyHashable: AnyHashable] = [:] + + public struct Relation: Hashable { + /// filter by existence or non-existence of related 'app' + public static var app: Relation { + .init(key: "exists[app]") + } + + internal let key: String + + public func hash(into hasher: inout Hasher) { + hasher.combine(key) + } + } + } + + public struct Fields: Hashable { + public subscript (_ relation: Relation) -> T { + get { values[relation]?.base as! T } + set { values[relation] = AnyHashable(newValue) } + } + + private var values: [AnyHashable: AnyHashable] = [:] + + public struct AlternativeDistributionKeys: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var publicKey: Self { + .init(rawValue: "publicKey") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct Relation: Hashable { + /// the fields to include for returned resources of type alternativeDistributionKeys + public static var alternativeDistributionKeys: Relation<[AlternativeDistributionKeys]?> { + .init(key: "fields[alternativeDistributionKeys]") + } + + internal let key: String + + public func hash(into hasher: inout Hasher) { + hasher.combine(key) + } + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AlternativeDistributionKeys/AlternativeDistributionKeys.POST.6c0e9f9.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AlternativeDistributionKeys/AlternativeDistributionKeys.POST.6c0e9f9.generated.swift new file mode 100644 index 00000000..34c81181 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AlternativeDistributionKeys/AlternativeDistributionKeys.POST.6c0e9f9.generated.swift @@ -0,0 +1,84 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.AlternativeDistributionKeys { + public struct POST: Endpoint { + public typealias Parameters = AlternativeDistributionKeyCreateRequest + public typealias Response = AlternativeDistributionKeyResponse + + public var path: String { + "/v1/alternativeDistributionKeys" + } + + /// AlternativeDistributionKey representation + public var parameters: Parameters + + public init(parameters: Parameters) { + self.parameters = parameters + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "POST" + + var jsonEncoder: JSONEncoder { + let encoder = JSONEncoder() + return encoder + } + + urlRequest?.httpBody = try jsonEncoder.encode(parameters) + urlRequest?.setValue("application/json", forHTTPHeaderField: "Content-Type") + return urlRequest + } + + /// - Returns: **201**, Single AlternativeDistributionKey as `AlternativeDistributionKeyResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **422**, Unprocessable request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 201: + return try jsonDecoder.decode(AlternativeDistributionKeyResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 409: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 422: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AlternativeDistributionKeys/ById/AlternativeDistributionKeysById.DELETE.dc8a9c6.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AlternativeDistributionKeys/ById/AlternativeDistributionKeysById.DELETE.dc8a9c6.generated.swift new file mode 100644 index 00000000..0c3f46e9 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AlternativeDistributionKeys/ById/AlternativeDistributionKeysById.DELETE.dc8a9c6.generated.swift @@ -0,0 +1,72 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.AlternativeDistributionKeys.ById { + public struct DELETE: Endpoint { + public typealias Parameters = Never + public typealias Response = Void + + public var path: String { + "/v1/alternativeDistributionKeys/\(id)" + } + + /// the id of the requested resource + public var id: String + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "DELETE" + return urlRequest + } + + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 409: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/PreOrder/AppsByIdPreOrder.GET.711ea1f.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AlternativeDistributionKeys/ById/AlternativeDistributionKeysById.GET.dc8a9c6.generated.swift similarity index 63% rename from Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/PreOrder/AppsByIdPreOrder.GET.711ea1f.generated.swift rename to Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AlternativeDistributionKeys/ById/AlternativeDistributionKeysById.GET.dc8a9c6.generated.swift index 111b5551..2d502b17 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/PreOrder/AppsByIdPreOrder.GET.711ea1f.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AlternativeDistributionKeys/ById/AlternativeDistributionKeysById.GET.dc8a9c6.generated.swift @@ -6,13 +6,12 @@ import Foundation import FoundationNetworking #endif -extension V1.Apps.ById.PreOrder { - @available(*, deprecated) +extension V1.AlternativeDistributionKeys.ById { public struct GET: Endpoint { - public typealias Response = AppPreOrderWithoutIncludesResponse + public typealias Response = AlternativeDistributionKeyResponse public var path: String { - "/v1/apps/\(id)/preOrder" + "/v1/alternativeDistributionKeys/\(id)" } /// the id of the requested resource @@ -29,8 +28,8 @@ extension V1.Apps.ById.PreOrder { components?.path = path components?.queryItems = [ - URLQueryItem(name: "fields[appPreOrders]", - value: parameters.fields[.appPreOrders]?.map { "\($0)" }.joined(separator: ",")) + URLQueryItem(name: "fields[alternativeDistributionKeys]", + value: parameters.fields[.alternativeDistributionKeys]?.map { "\($0)" }.joined(separator: ",")) ].filter { $0.value != nil } if components?.queryItems?.isEmpty ?? false { components?.queryItems = nil @@ -41,10 +40,12 @@ extension V1.Apps.ById.PreOrder { return urlRequest } - /// - Returns: **200**, Single AppPreOrder with get as `AppPreOrderWithoutIncludesResponse` + /// - Returns: **200**, Single AlternativeDistributionKey as `AlternativeDistributionKeyResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -53,17 +54,23 @@ extension V1.Apps.ById.PreOrder { switch urlResponse.statusCode { case 200: - return try jsonDecoder.decode(AppPreOrderWithoutIncludesResponse.self, from: data) + return try jsonDecoder.decode(AlternativeDistributionKeyResponse.self, from: data) case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 404: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -71,7 +78,7 @@ extension V1.Apps.ById.PreOrder { } } -extension V1.Apps.ById.PreOrder.GET { +extension V1.AlternativeDistributionKeys.ById.GET { public struct Parameters: Hashable { public var fields: Fields = Fields() @@ -83,35 +90,26 @@ extension V1.Apps.ById.PreOrder.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum AppPreOrders: Hashable, Codable, RawRepresentable { - case app - case appReleaseDate - case preOrderAvailableDate - case unknown(String) - - public var rawValue: String { - switch self { - case .app: return "app" - case .appReleaseDate: return "appReleaseDate" - case .preOrderAvailableDate: return "preOrderAvailableDate" - case .unknown(let rawValue): return rawValue - } + public struct AlternativeDistributionKeys: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var publicKey: Self { + .init(rawValue: "publicKey") } + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "app": self = .app - case "appReleaseDate": self = .appReleaseDate - case "preOrderAvailableDate": self = .preOrderAvailableDate - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } public struct Relation: Hashable { - /// the fields to include for returned resources of type appPreOrders - public static var appPreOrders: Relation<[AppPreOrders]?> { - .init(key: "fields[appPreOrders]") + /// the fields to include for returned resources of type alternativeDistributionKeys + public static var alternativeDistributionKeys: Relation<[AlternativeDistributionKeys]?> { + .init(key: "fields[alternativeDistributionKeys]") } internal let key: String diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AlternativeDistributionPackageDeltas/ById/AlternativeDistributionPackageDeltasById.GET.a86a0ce.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AlternativeDistributionPackageDeltas/ById/AlternativeDistributionPackageDeltasById.GET.a86a0ce.generated.swift new file mode 100644 index 00000000..6373448d --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AlternativeDistributionPackageDeltas/ById/AlternativeDistributionPackageDeltasById.GET.a86a0ce.generated.swift @@ -0,0 +1,137 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.AlternativeDistributionPackageDeltas.ById { + public struct GET: Endpoint { + public typealias Response = AlternativeDistributionPackageDeltaResponse + + public var path: String { + "/v1/alternativeDistributionPackageDeltas/\(id)" + } + + /// the id of the requested resource + public var id: String + + public var parameters: Parameters = Parameters() + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + components?.queryItems = [ + URLQueryItem(name: "fields[alternativeDistributionPackageDeltas]", + value: parameters.fields[.alternativeDistributionPackageDeltas]?.map { "\($0)" }.joined(separator: ",")) + ].filter { $0.value != nil } + if components?.queryItems?.isEmpty ?? false { + components?.queryItems = nil + } + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "GET" + return urlRequest + } + + /// - Returns: **200**, Single AlternativeDistributionPackageDelta as `AlternativeDistributionPackageDeltaResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(AlternativeDistributionPackageDeltaResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +extension V1.AlternativeDistributionPackageDeltas.ById.GET { + public struct Parameters: Hashable { + public var fields: Fields = Fields() + + public struct Fields: Hashable { + public subscript (_ relation: Relation) -> T { + get { values[relation]?.base as! T } + set { values[relation] = AnyHashable(newValue) } + } + + private var values: [AnyHashable: AnyHashable] = [:] + + public struct AlternativeDistributionPackageDeltas: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var alternativeDistributionKeyBlob: Self { + .init(rawValue: "alternativeDistributionKeyBlob") + } + + public static var fileChecksum: Self { + .init(rawValue: "fileChecksum") + } + + public static var url: Self { + .init(rawValue: "url") + } + + public static var urlExpirationDate: Self { + .init(rawValue: "urlExpirationDate") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct Relation: Hashable { + /// the fields to include for returned resources of type alternativeDistributionPackageDeltas + public static var alternativeDistributionPackageDeltas: Relation<[AlternativeDistributionPackageDeltas]?> { + .init(key: "fields[alternativeDistributionPackageDeltas]") + } + + internal let key: String + + public func hash(into hasher: inout Hasher) { + hasher.combine(key) + } + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AlternativeDistributionPackageVariants/ById/AlternativeDistributionPackageVariantsById.GET.e1f8111.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AlternativeDistributionPackageVariants/ById/AlternativeDistributionPackageVariantsById.GET.e1f8111.generated.swift new file mode 100644 index 00000000..4c38f257 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AlternativeDistributionPackageVariants/ById/AlternativeDistributionPackageVariantsById.GET.e1f8111.generated.swift @@ -0,0 +1,137 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.AlternativeDistributionPackageVariants.ById { + public struct GET: Endpoint { + public typealias Response = AlternativeDistributionPackageVariantResponse + + public var path: String { + "/v1/alternativeDistributionPackageVariants/\(id)" + } + + /// the id of the requested resource + public var id: String + + public var parameters: Parameters = Parameters() + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + components?.queryItems = [ + URLQueryItem(name: "fields[alternativeDistributionPackageVariants]", + value: parameters.fields[.alternativeDistributionPackageVariants]?.map { "\($0)" }.joined(separator: ",")) + ].filter { $0.value != nil } + if components?.queryItems?.isEmpty ?? false { + components?.queryItems = nil + } + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "GET" + return urlRequest + } + + /// - Returns: **200**, Single AlternativeDistributionPackageVariant as `AlternativeDistributionPackageVariantResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(AlternativeDistributionPackageVariantResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +extension V1.AlternativeDistributionPackageVariants.ById.GET { + public struct Parameters: Hashable { + public var fields: Fields = Fields() + + public struct Fields: Hashable { + public subscript (_ relation: Relation) -> T { + get { values[relation]?.base as! T } + set { values[relation] = AnyHashable(newValue) } + } + + private var values: [AnyHashable: AnyHashable] = [:] + + public struct AlternativeDistributionPackageVariants: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var alternativeDistributionKeyBlob: Self { + .init(rawValue: "alternativeDistributionKeyBlob") + } + + public static var fileChecksum: Self { + .init(rawValue: "fileChecksum") + } + + public static var url: Self { + .init(rawValue: "url") + } + + public static var urlExpirationDate: Self { + .init(rawValue: "urlExpirationDate") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct Relation: Hashable { + /// the fields to include for returned resources of type alternativeDistributionPackageVariants + public static var alternativeDistributionPackageVariants: Relation<[AlternativeDistributionPackageVariants]?> { + .init(key: "fields[alternativeDistributionPackageVariants]") + } + + internal let key: String + + public func hash(into hasher: inout Hasher) { + hasher.combine(key) + } + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AlternativeDistributionPackageVersions/ById/AlternativeDistributionPackageVersionsById.GET.f08d676.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AlternativeDistributionPackageVersions/ById/AlternativeDistributionPackageVersionsById.GET.f08d676.generated.swift new file mode 100644 index 00000000..297ac85f --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AlternativeDistributionPackageVersions/ById/AlternativeDistributionPackageVersionsById.GET.f08d676.generated.swift @@ -0,0 +1,285 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.AlternativeDistributionPackageVersions.ById { + public struct GET: Endpoint { + public typealias Response = AlternativeDistributionPackageVersionResponse + + public var path: String { + "/v1/alternativeDistributionPackageVersions/\(id)" + } + + /// the id of the requested resource + public var id: String + + public var parameters: Parameters = Parameters() + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + components?.queryItems = [ + URLQueryItem(name: "fields[alternativeDistributionPackageDeltas]", + value: parameters.fields[.alternativeDistributionPackageDeltas]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "fields[alternativeDistributionPackageVariants]", + value: parameters.fields[.alternativeDistributionPackageVariants]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "fields[alternativeDistributionPackageVersions]", + value: parameters.fields[.alternativeDistributionPackageVersions]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "include", + value: parameters.include?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "limit[deltas]", + value: parameters.limit[.deltas].map { "\($0)" }), + URLQueryItem(name: "limit[variants]", + value: parameters.limit[.variants].map { "\($0)" }) + ].filter { $0.value != nil } + if components?.queryItems?.isEmpty ?? false { + components?.queryItems = nil + } + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "GET" + return urlRequest + } + + /// - Returns: **200**, Single AlternativeDistributionPackageVersion as `AlternativeDistributionPackageVersionResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(AlternativeDistributionPackageVersionResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +extension V1.AlternativeDistributionPackageVersions.ById.GET { + public struct Parameters: Hashable { + public var fields: Fields = Fields() + + /// comma-separated list of relationships to include + public var include: [Include]? + + public var limit: Limit = Limit() + + public struct Fields: Hashable { + public subscript (_ relation: Relation) -> T { + get { values[relation]?.base as! T } + set { values[relation] = AnyHashable(newValue) } + } + + private var values: [AnyHashable: AnyHashable] = [:] + + public struct AlternativeDistributionPackageDeltas: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var alternativeDistributionKeyBlob: Self { + .init(rawValue: "alternativeDistributionKeyBlob") + } + + public static var fileChecksum: Self { + .init(rawValue: "fileChecksum") + } + + public static var url: Self { + .init(rawValue: "url") + } + + public static var urlExpirationDate: Self { + .init(rawValue: "urlExpirationDate") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct AlternativeDistributionPackageVariants: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var alternativeDistributionKeyBlob: Self { + .init(rawValue: "alternativeDistributionKeyBlob") + } + + public static var fileChecksum: Self { + .init(rawValue: "fileChecksum") + } + + public static var url: Self { + .init(rawValue: "url") + } + + public static var urlExpirationDate: Self { + .init(rawValue: "urlExpirationDate") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct AlternativeDistributionPackageVersions: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var alternativeDistributionPackage: Self { + .init(rawValue: "alternativeDistributionPackage") + } + + public static var deltas: Self { + .init(rawValue: "deltas") + } + + public static var fileChecksum: Self { + .init(rawValue: "fileChecksum") + } + + public static var state: Self { + .init(rawValue: "state") + } + + public static var url: Self { + .init(rawValue: "url") + } + + public static var urlExpirationDate: Self { + .init(rawValue: "urlExpirationDate") + } + + public static var variants: Self { + .init(rawValue: "variants") + } + + public static var version: Self { + .init(rawValue: "version") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct Relation: Hashable { + /// the fields to include for returned resources of type alternativeDistributionPackageDeltas + public static var alternativeDistributionPackageDeltas: Relation<[AlternativeDistributionPackageDeltas]?> { + .init(key: "fields[alternativeDistributionPackageDeltas]") + } + + /// the fields to include for returned resources of type alternativeDistributionPackageVariants + public static var alternativeDistributionPackageVariants: Relation<[AlternativeDistributionPackageVariants]?> { + .init(key: "fields[alternativeDistributionPackageVariants]") + } + + /// the fields to include for returned resources of type alternativeDistributionPackageVersions + public static var alternativeDistributionPackageVersions: Relation<[AlternativeDistributionPackageVersions]?> { + .init(key: "fields[alternativeDistributionPackageVersions]") + } + + internal let key: String + + public func hash(into hasher: inout Hasher) { + hasher.combine(key) + } + } + } + + public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var alternativeDistributionPackage: Self { + .init(rawValue: "alternativeDistributionPackage") + } + + public static var deltas: Self { + .init(rawValue: "deltas") + } + + public static var variants: Self { + .init(rawValue: "variants") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct Limit: Hashable { + public subscript (_ relation: Relation) -> T { + get { values[relation]?.base as! T } + set { values[relation] = AnyHashable(newValue) } + } + + private var values: [AnyHashable: AnyHashable] = [:] + + public struct Relation: Hashable { + /// maximum number of related deltas returned (when they are included) + public static var deltas: Relation { + .init(key: "limit[deltas]") + } + + /// maximum number of related variants returned (when they are included) + public static var variants: Relation { + .init(key: "limit[variants]") + } + + internal let key: String + + public func hash(into hasher: inout Hasher) { + hasher.combine(key) + } + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AlternativeDistributionPackageVersions/ById/Deltas/AlternativeDistributionPackageVersionsByIdDeltas.GET.f0620b2.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AlternativeDistributionPackageVersions/ById/Deltas/AlternativeDistributionPackageVersionsByIdDeltas.GET.f0620b2.generated.swift new file mode 100644 index 00000000..e6ca8389 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AlternativeDistributionPackageVersions/ById/Deltas/AlternativeDistributionPackageVersionsByIdDeltas.GET.f0620b2.generated.swift @@ -0,0 +1,142 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.AlternativeDistributionPackageVersions.ById.Deltas { + public struct GET: Endpoint { + public typealias Response = AlternativeDistributionPackageDeltasResponse + + public var path: String { + "/v1/alternativeDistributionPackageVersions/\(id)/deltas" + } + + /// the id of the requested resource + public var id: String + + public var parameters: Parameters = Parameters() + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + components?.queryItems = [ + URLQueryItem(name: "fields[alternativeDistributionPackageDeltas]", + value: parameters.fields[.alternativeDistributionPackageDeltas]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "limit", + value: parameters.limit.map { "\($0)" }) + ].filter { $0.value != nil } + if components?.queryItems?.isEmpty ?? false { + components?.queryItems = nil + } + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "GET" + return urlRequest + } + + /// - Returns: **200**, List of AlternativeDistributionPackageDeltas as `AlternativeDistributionPackageDeltasResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(AlternativeDistributionPackageDeltasResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +extension V1.AlternativeDistributionPackageVersions.ById.Deltas.GET { + public struct Parameters: Hashable { + public var fields: Fields = Fields() + + /// maximum resources per page + public var limit: Int? + + public struct Fields: Hashable { + public subscript (_ relation: Relation) -> T { + get { values[relation]?.base as! T } + set { values[relation] = AnyHashable(newValue) } + } + + private var values: [AnyHashable: AnyHashable] = [:] + + public struct AlternativeDistributionPackageDeltas: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var alternativeDistributionKeyBlob: Self { + .init(rawValue: "alternativeDistributionKeyBlob") + } + + public static var fileChecksum: Self { + .init(rawValue: "fileChecksum") + } + + public static var url: Self { + .init(rawValue: "url") + } + + public static var urlExpirationDate: Self { + .init(rawValue: "urlExpirationDate") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct Relation: Hashable { + /// the fields to include for returned resources of type alternativeDistributionPackageDeltas + public static var alternativeDistributionPackageDeltas: Relation<[AlternativeDistributionPackageDeltas]?> { + .init(key: "fields[alternativeDistributionPackageDeltas]") + } + + internal let key: String + + public func hash(into hasher: inout Hasher) { + hasher.combine(key) + } + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AlternativeDistributionPackageVersions/ById/Relationships/Deltas/AlternativeDistributionPackageVersionsByIdRelationshipsDeltas.GET.1fdccbd.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AlternativeDistributionPackageVersions/ById/Relationships/Deltas/AlternativeDistributionPackageVersionsByIdRelationshipsDeltas.GET.1fdccbd.generated.swift new file mode 100644 index 00000000..571052c8 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AlternativeDistributionPackageVersions/ById/Relationships/Deltas/AlternativeDistributionPackageVersionsByIdRelationshipsDeltas.GET.1fdccbd.generated.swift @@ -0,0 +1,88 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.AlternativeDistributionPackageVersions.ById.Relationships.Deltas { + public struct GET: Endpoint { + public typealias Response = AlternativeDistributionPackageVersionDeltasLinkagesResponse + + public var path: String { + "/v1/alternativeDistributionPackageVersions/\(id)/relationships/deltas" + } + + /// the id of the requested resource + public var id: String + + public var parameters: Parameters = Parameters() + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + components?.queryItems = [ + URLQueryItem(name: "limit", + value: parameters.limit.map { "\($0)" }) + ].filter { $0.value != nil } + if components?.queryItems?.isEmpty ?? false { + components?.queryItems = nil + } + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "GET" + return urlRequest + } + + /// - Returns: **200**, List of related linkages as `AlternativeDistributionPackageVersionDeltasLinkagesResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(AlternativeDistributionPackageVersionDeltasLinkagesResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +extension V1.AlternativeDistributionPackageVersions.ById.Relationships.Deltas.GET { + public struct Parameters: Hashable { + /// maximum resources per page + public var limit: Int? + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AlternativeDistributionPackageVersions/ById/Relationships/Variants/AlternativeDistributionPackageVersionsByIdRelationshipsVariants.GET.e5aa275.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AlternativeDistributionPackageVersions/ById/Relationships/Variants/AlternativeDistributionPackageVersionsByIdRelationshipsVariants.GET.e5aa275.generated.swift new file mode 100644 index 00000000..794848e3 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AlternativeDistributionPackageVersions/ById/Relationships/Variants/AlternativeDistributionPackageVersionsByIdRelationshipsVariants.GET.e5aa275.generated.swift @@ -0,0 +1,88 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.AlternativeDistributionPackageVersions.ById.Relationships.Variants { + public struct GET: Endpoint { + public typealias Response = AlternativeDistributionPackageVersionVariantsLinkagesResponse + + public var path: String { + "/v1/alternativeDistributionPackageVersions/\(id)/relationships/variants" + } + + /// the id of the requested resource + public var id: String + + public var parameters: Parameters = Parameters() + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + components?.queryItems = [ + URLQueryItem(name: "limit", + value: parameters.limit.map { "\($0)" }) + ].filter { $0.value != nil } + if components?.queryItems?.isEmpty ?? false { + components?.queryItems = nil + } + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "GET" + return urlRequest + } + + /// - Returns: **200**, List of related linkages as `AlternativeDistributionPackageVersionVariantsLinkagesResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(AlternativeDistributionPackageVersionVariantsLinkagesResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +extension V1.AlternativeDistributionPackageVersions.ById.Relationships.Variants.GET { + public struct Parameters: Hashable { + /// maximum resources per page + public var limit: Int? + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AlternativeDistributionPackageVersions/ById/Variants/AlternativeDistributionPackageVersionsByIdVariants.GET.fd255e7.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AlternativeDistributionPackageVersions/ById/Variants/AlternativeDistributionPackageVersionsByIdVariants.GET.fd255e7.generated.swift new file mode 100644 index 00000000..f9d00e47 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AlternativeDistributionPackageVersions/ById/Variants/AlternativeDistributionPackageVersionsByIdVariants.GET.fd255e7.generated.swift @@ -0,0 +1,142 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.AlternativeDistributionPackageVersions.ById.Variants { + public struct GET: Endpoint { + public typealias Response = AlternativeDistributionPackageVariantsResponse + + public var path: String { + "/v1/alternativeDistributionPackageVersions/\(id)/variants" + } + + /// the id of the requested resource + public var id: String + + public var parameters: Parameters = Parameters() + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + components?.queryItems = [ + URLQueryItem(name: "fields[alternativeDistributionPackageVariants]", + value: parameters.fields[.alternativeDistributionPackageVariants]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "limit", + value: parameters.limit.map { "\($0)" }) + ].filter { $0.value != nil } + if components?.queryItems?.isEmpty ?? false { + components?.queryItems = nil + } + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "GET" + return urlRequest + } + + /// - Returns: **200**, List of AlternativeDistributionPackageVariants as `AlternativeDistributionPackageVariantsResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(AlternativeDistributionPackageVariantsResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +extension V1.AlternativeDistributionPackageVersions.ById.Variants.GET { + public struct Parameters: Hashable { + public var fields: Fields = Fields() + + /// maximum resources per page + public var limit: Int? + + public struct Fields: Hashable { + public subscript (_ relation: Relation) -> T { + get { values[relation]?.base as! T } + set { values[relation] = AnyHashable(newValue) } + } + + private var values: [AnyHashable: AnyHashable] = [:] + + public struct AlternativeDistributionPackageVariants: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var alternativeDistributionKeyBlob: Self { + .init(rawValue: "alternativeDistributionKeyBlob") + } + + public static var fileChecksum: Self { + .init(rawValue: "fileChecksum") + } + + public static var url: Self { + .init(rawValue: "url") + } + + public static var urlExpirationDate: Self { + .init(rawValue: "urlExpirationDate") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct Relation: Hashable { + /// the fields to include for returned resources of type alternativeDistributionPackageVariants + public static var alternativeDistributionPackageVariants: Relation<[AlternativeDistributionPackageVariants]?> { + .init(key: "fields[alternativeDistributionPackageVariants]") + } + + internal let key: String + + public func hash(into hasher: inout Hasher) { + hasher.combine(key) + } + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AlternativeDistributionPackages/AlternativeDistributionPackages.POST.b486bd0.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AlternativeDistributionPackages/AlternativeDistributionPackages.POST.b486bd0.generated.swift new file mode 100644 index 00000000..fd671630 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AlternativeDistributionPackages/AlternativeDistributionPackages.POST.b486bd0.generated.swift @@ -0,0 +1,84 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.AlternativeDistributionPackages { + public struct POST: Endpoint { + public typealias Parameters = AlternativeDistributionPackageCreateRequest + public typealias Response = AlternativeDistributionPackageResponse + + public var path: String { + "/v1/alternativeDistributionPackages" + } + + /// AlternativeDistributionPackage representation + public var parameters: Parameters + + public init(parameters: Parameters) { + self.parameters = parameters + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "POST" + + var jsonEncoder: JSONEncoder { + let encoder = JSONEncoder() + return encoder + } + + urlRequest?.httpBody = try jsonEncoder.encode(parameters) + urlRequest?.setValue("application/json", forHTTPHeaderField: "Content-Type") + return urlRequest + } + + /// - Returns: **201**, Single AlternativeDistributionPackage as `AlternativeDistributionPackageResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **422**, Unprocessable request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 201: + return try jsonDecoder.decode(AlternativeDistributionPackageResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 409: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 422: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AlternativeDistributionPackages/ById/AlternativeDistributionPackagesById.GET.e82a039.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AlternativeDistributionPackages/ById/AlternativeDistributionPackagesById.GET.e82a039.generated.swift new file mode 100644 index 00000000..ce704aed --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AlternativeDistributionPackages/ById/AlternativeDistributionPackagesById.GET.e82a039.generated.swift @@ -0,0 +1,223 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.AlternativeDistributionPackages.ById { + public struct GET: Endpoint { + public typealias Response = AlternativeDistributionPackageResponse + + public var path: String { + "/v1/alternativeDistributionPackages/\(id)" + } + + /// the id of the requested resource + public var id: String + + public var parameters: Parameters = Parameters() + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + components?.queryItems = [ + URLQueryItem(name: "fields[alternativeDistributionPackageVersions]", + value: parameters.fields[.alternativeDistributionPackageVersions]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "fields[alternativeDistributionPackages]", + value: parameters.fields[.alternativeDistributionPackages]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "include", + value: parameters.include?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "limit[versions]", + value: parameters.limit[.versions].map { "\($0)" }) + ].filter { $0.value != nil } + if components?.queryItems?.isEmpty ?? false { + components?.queryItems = nil + } + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "GET" + return urlRequest + } + + /// - Returns: **200**, Single AlternativeDistributionPackage as `AlternativeDistributionPackageResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(AlternativeDistributionPackageResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +extension V1.AlternativeDistributionPackages.ById.GET { + public struct Parameters: Hashable { + public var fields: Fields = Fields() + + /// comma-separated list of relationships to include + public var include: [Include]? + + public var limit: Limit = Limit() + + public struct Fields: Hashable { + public subscript (_ relation: Relation) -> T { + get { values[relation]?.base as! T } + set { values[relation] = AnyHashable(newValue) } + } + + private var values: [AnyHashable: AnyHashable] = [:] + + public struct AlternativeDistributionPackageVersions: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var alternativeDistributionPackage: Self { + .init(rawValue: "alternativeDistributionPackage") + } + + public static var deltas: Self { + .init(rawValue: "deltas") + } + + public static var fileChecksum: Self { + .init(rawValue: "fileChecksum") + } + + public static var state: Self { + .init(rawValue: "state") + } + + public static var url: Self { + .init(rawValue: "url") + } + + public static var urlExpirationDate: Self { + .init(rawValue: "urlExpirationDate") + } + + public static var variants: Self { + .init(rawValue: "variants") + } + + public static var version: Self { + .init(rawValue: "version") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct AlternativeDistributionPackages: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var versions: Self { + .init(rawValue: "versions") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct Relation: Hashable { + /// the fields to include for returned resources of type alternativeDistributionPackageVersions + public static var alternativeDistributionPackageVersions: Relation<[AlternativeDistributionPackageVersions]?> { + .init(key: "fields[alternativeDistributionPackageVersions]") + } + + /// the fields to include for returned resources of type alternativeDistributionPackages + public static var alternativeDistributionPackages: Relation<[AlternativeDistributionPackages]?> { + .init(key: "fields[alternativeDistributionPackages]") + } + + internal let key: String + + public func hash(into hasher: inout Hasher) { + hasher.combine(key) + } + } + } + + public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var versions: Self { + .init(rawValue: "versions") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct Limit: Hashable { + public subscript (_ relation: Relation) -> T { + get { values[relation]?.base as! T } + set { values[relation] = AnyHashable(newValue) } + } + + private var values: [AnyHashable: AnyHashable] = [:] + + public struct Relation: Hashable { + /// maximum number of related versions returned (when they are included) + public static var versions: Relation { + .init(key: "limit[versions]") + } + + internal let key: String + + public func hash(into hasher: inout Hasher) { + hasher.combine(key) + } + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AlternativeDistributionPackages/ById/Relationships/Versions/AlternativeDistributionPackagesByIdRelationshipsVersions.GET.c1c5426.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AlternativeDistributionPackages/ById/Relationships/Versions/AlternativeDistributionPackagesByIdRelationshipsVersions.GET.c1c5426.generated.swift new file mode 100644 index 00000000..65e60ace --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AlternativeDistributionPackages/ById/Relationships/Versions/AlternativeDistributionPackagesByIdRelationshipsVersions.GET.c1c5426.generated.swift @@ -0,0 +1,88 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.AlternativeDistributionPackages.ById.Relationships.Versions { + public struct GET: Endpoint { + public typealias Response = AlternativeDistributionPackageVersionsLinkagesResponse + + public var path: String { + "/v1/alternativeDistributionPackages/\(id)/relationships/versions" + } + + /// the id of the requested resource + public var id: String + + public var parameters: Parameters = Parameters() + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + components?.queryItems = [ + URLQueryItem(name: "limit", + value: parameters.limit.map { "\($0)" }) + ].filter { $0.value != nil } + if components?.queryItems?.isEmpty ?? false { + components?.queryItems = nil + } + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "GET" + return urlRequest + } + + /// - Returns: **200**, List of related linkages as `AlternativeDistributionPackageVersionsLinkagesResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(AlternativeDistributionPackageVersionsLinkagesResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +extension V1.AlternativeDistributionPackages.ById.Relationships.Versions.GET { + public struct Parameters: Hashable { + /// maximum resources per page + public var limit: Int? + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AlternativeDistributionPackages/ById/Versions/AlternativeDistributionPackagesByIdVersions.GET.5cabac6.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AlternativeDistributionPackages/ById/Versions/AlternativeDistributionPackagesByIdVersions.GET.5cabac6.generated.swift new file mode 100644 index 00000000..536ee543 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AlternativeDistributionPackages/ById/Versions/AlternativeDistributionPackagesByIdVersions.GET.5cabac6.generated.swift @@ -0,0 +1,362 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.AlternativeDistributionPackages.ById.Versions { + public struct GET: Endpoint { + public typealias Response = AlternativeDistributionPackageVersionsResponse + + public var path: String { + "/v1/alternativeDistributionPackages/\(id)/versions" + } + + /// the id of the requested resource + public var id: String + + public var parameters: Parameters = Parameters() + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + components?.queryItems = [ + URLQueryItem(name: "fields[alternativeDistributionPackageDeltas]", + value: parameters.fields[.alternativeDistributionPackageDeltas]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "fields[alternativeDistributionPackageVariants]", + value: parameters.fields[.alternativeDistributionPackageVariants]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "fields[alternativeDistributionPackageVersions]", + value: parameters.fields[.alternativeDistributionPackageVersions]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "fields[alternativeDistributionPackages]", + value: parameters.fields[.alternativeDistributionPackages]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "filter[state]", + value: parameters.filter[.state]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "include", + value: parameters.include?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "limit[deltas]", + value: parameters.limit[.deltas].map { "\($0)" }), + URLQueryItem(name: "limit[variants]", + value: parameters.limit[.variants].map { "\($0)" }), + URLQueryItem(name: "limit", + value: parameters.limit[].map { "\($0)" }) + ].filter { $0.value != nil } + if components?.queryItems?.isEmpty ?? false { + components?.queryItems = nil + } + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "GET" + return urlRequest + } + + /// - Returns: **200**, List of AlternativeDistributionPackageVersions as `AlternativeDistributionPackageVersionsResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(AlternativeDistributionPackageVersionsResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +extension V1.AlternativeDistributionPackages.ById.Versions.GET { + public struct Parameters: Hashable { + public var fields: Fields = Fields() + + public var filter: Filter = Filter() + + /// comma-separated list of relationships to include + public var include: [Include]? + + /// maximum resources per page + public var limit: Limit = Limit() + + public struct Fields: Hashable { + public subscript (_ relation: Relation) -> T { + get { values[relation]?.base as! T } + set { values[relation] = AnyHashable(newValue) } + } + + private var values: [AnyHashable: AnyHashable] = [:] + + public struct AlternativeDistributionPackageDeltas: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var alternativeDistributionKeyBlob: Self { + .init(rawValue: "alternativeDistributionKeyBlob") + } + + public static var fileChecksum: Self { + .init(rawValue: "fileChecksum") + } + + public static var url: Self { + .init(rawValue: "url") + } + + public static var urlExpirationDate: Self { + .init(rawValue: "urlExpirationDate") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct AlternativeDistributionPackageVariants: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var alternativeDistributionKeyBlob: Self { + .init(rawValue: "alternativeDistributionKeyBlob") + } + + public static var fileChecksum: Self { + .init(rawValue: "fileChecksum") + } + + public static var url: Self { + .init(rawValue: "url") + } + + public static var urlExpirationDate: Self { + .init(rawValue: "urlExpirationDate") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct AlternativeDistributionPackageVersions: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var alternativeDistributionPackage: Self { + .init(rawValue: "alternativeDistributionPackage") + } + + public static var deltas: Self { + .init(rawValue: "deltas") + } + + public static var fileChecksum: Self { + .init(rawValue: "fileChecksum") + } + + public static var state: Self { + .init(rawValue: "state") + } + + public static var url: Self { + .init(rawValue: "url") + } + + public static var urlExpirationDate: Self { + .init(rawValue: "urlExpirationDate") + } + + public static var variants: Self { + .init(rawValue: "variants") + } + + public static var version: Self { + .init(rawValue: "version") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct AlternativeDistributionPackages: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var versions: Self { + .init(rawValue: "versions") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct Relation: Hashable { + /// the fields to include for returned resources of type alternativeDistributionPackageDeltas + public static var alternativeDistributionPackageDeltas: Relation<[AlternativeDistributionPackageDeltas]?> { + .init(key: "fields[alternativeDistributionPackageDeltas]") + } + + /// the fields to include for returned resources of type alternativeDistributionPackageVariants + public static var alternativeDistributionPackageVariants: Relation<[AlternativeDistributionPackageVariants]?> { + .init(key: "fields[alternativeDistributionPackageVariants]") + } + + /// the fields to include for returned resources of type alternativeDistributionPackageVersions + public static var alternativeDistributionPackageVersions: Relation<[AlternativeDistributionPackageVersions]?> { + .init(key: "fields[alternativeDistributionPackageVersions]") + } + + /// the fields to include for returned resources of type alternativeDistributionPackages + public static var alternativeDistributionPackages: Relation<[AlternativeDistributionPackages]?> { + .init(key: "fields[alternativeDistributionPackages]") + } + + internal let key: String + + public func hash(into hasher: inout Hasher) { + hasher.combine(key) + } + } + } + + public struct Filter: Hashable { + public subscript (_ relation: Relation) -> T { + get { values[relation]?.base as! T } + set { values[relation] = AnyHashable(newValue) } + } + + private var values: [AnyHashable: AnyHashable] = [:] + + public struct State: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var completed: Self { + .init(rawValue: "COMPLETED") + } + + public static var replaced: Self { + .init(rawValue: "REPLACED") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct Relation: Hashable { + /// filter by attribute 'state' + public static var state: Relation<[State]?> { + .init(key: "filter[state]") + } + + internal let key: String + + public func hash(into hasher: inout Hasher) { + hasher.combine(key) + } + } + } + + public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var alternativeDistributionPackage: Self { + .init(rawValue: "alternativeDistributionPackage") + } + + public static var deltas: Self { + .init(rawValue: "deltas") + } + + public static var variants: Self { + .init(rawValue: "variants") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct Limit: Hashable { + public subscript () -> Int? { + get { self[Relation(key: "limit")] } + set { self[Relation(key: "limit")] = newValue } + } + + public subscript (_ relation: Relation) -> T { + get { values[relation]?.base as! T } + set { values[relation] = AnyHashable(newValue) } + } + + private var values: [AnyHashable: AnyHashable] = [:] + + public struct Relation: Hashable { + /// maximum number of related deltas returned (when they are included) + public static var deltas: Relation { + .init(key: "limit[deltas]") + } + + /// maximum number of related variants returned (when they are included) + public static var variants: Relation { + .init(key: "limit[variants]") + } + + internal let key: String + + public func hash(into hasher: inout Hasher) { + hasher.combine(key) + } + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AnalyticsReportInstances/ById/AnalyticsReportInstancesById.GET.b2280c3.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AnalyticsReportInstances/ById/AnalyticsReportInstancesById.GET.b2280c3.generated.swift new file mode 100644 index 00000000..dd18be28 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AnalyticsReportInstances/ById/AnalyticsReportInstancesById.GET.b2280c3.generated.swift @@ -0,0 +1,133 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.AnalyticsReportInstances.ById { + public struct GET: Endpoint { + public typealias Response = AnalyticsReportInstanceResponse + + public var path: String { + "/v1/analyticsReportInstances/\(id)" + } + + /// the id of the requested resource + public var id: String + + public var parameters: Parameters = Parameters() + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + components?.queryItems = [ + URLQueryItem(name: "fields[analyticsReportInstances]", + value: parameters.fields[.analyticsReportInstances]?.map { "\($0)" }.joined(separator: ",")) + ].filter { $0.value != nil } + if components?.queryItems?.isEmpty ?? false { + components?.queryItems = nil + } + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "GET" + return urlRequest + } + + /// - Returns: **200**, Single AnalyticsReportInstance as `AnalyticsReportInstanceResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(AnalyticsReportInstanceResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +extension V1.AnalyticsReportInstances.ById.GET { + public struct Parameters: Hashable { + public var fields: Fields = Fields() + + public struct Fields: Hashable { + public subscript (_ relation: Relation) -> T { + get { values[relation]?.base as! T } + set { values[relation] = AnyHashable(newValue) } + } + + private var values: [AnyHashable: AnyHashable] = [:] + + public struct AnalyticsReportInstances: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var granularity: Self { + .init(rawValue: "granularity") + } + + public static var processingDate: Self { + .init(rawValue: "processingDate") + } + + public static var segments: Self { + .init(rawValue: "segments") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct Relation: Hashable { + /// the fields to include for returned resources of type analyticsReportInstances + public static var analyticsReportInstances: Relation<[AnalyticsReportInstances]?> { + .init(key: "fields[analyticsReportInstances]") + } + + internal let key: String + + public func hash(into hasher: inout Hasher) { + hasher.combine(key) + } + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AnalyticsReportInstances/ById/Relationships/Segments/AnalyticsReportInstancesByIdRelationshipsSegments.GET.9ec4c60.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AnalyticsReportInstances/ById/Relationships/Segments/AnalyticsReportInstancesByIdRelationshipsSegments.GET.9ec4c60.generated.swift new file mode 100644 index 00000000..266747af --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AnalyticsReportInstances/ById/Relationships/Segments/AnalyticsReportInstancesByIdRelationshipsSegments.GET.9ec4c60.generated.swift @@ -0,0 +1,88 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.AnalyticsReportInstances.ById.Relationships.Segments { + public struct GET: Endpoint { + public typealias Response = AnalyticsReportInstanceSegmentsLinkagesResponse + + public var path: String { + "/v1/analyticsReportInstances/\(id)/relationships/segments" + } + + /// the id of the requested resource + public var id: String + + public var parameters: Parameters = Parameters() + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + components?.queryItems = [ + URLQueryItem(name: "limit", + value: parameters.limit.map { "\($0)" }) + ].filter { $0.value != nil } + if components?.queryItems?.isEmpty ?? false { + components?.queryItems = nil + } + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "GET" + return urlRequest + } + + /// - Returns: **200**, List of related linkages as `AnalyticsReportInstanceSegmentsLinkagesResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(AnalyticsReportInstanceSegmentsLinkagesResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +extension V1.AnalyticsReportInstances.ById.Relationships.Segments.GET { + public struct Parameters: Hashable { + /// maximum resources per page + public var limit: Int? + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AnalyticsReportInstances/ById/Segments/AnalyticsReportInstancesByIdSegments.GET.fc03c78.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AnalyticsReportInstances/ById/Segments/AnalyticsReportInstancesByIdSegments.GET.fc03c78.generated.swift new file mode 100644 index 00000000..fc66d5ca --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AnalyticsReportInstances/ById/Segments/AnalyticsReportInstancesByIdSegments.GET.fc03c78.generated.swift @@ -0,0 +1,138 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.AnalyticsReportInstances.ById.Segments { + public struct GET: Endpoint { + public typealias Response = AnalyticsReportSegmentsResponse + + public var path: String { + "/v1/analyticsReportInstances/\(id)/segments" + } + + /// the id of the requested resource + public var id: String + + public var parameters: Parameters = Parameters() + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + components?.queryItems = [ + URLQueryItem(name: "fields[analyticsReportSegments]", + value: parameters.fields[.analyticsReportSegments]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "limit", + value: parameters.limit.map { "\($0)" }) + ].filter { $0.value != nil } + if components?.queryItems?.isEmpty ?? false { + components?.queryItems = nil + } + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "GET" + return urlRequest + } + + /// - Returns: **200**, List of AnalyticsReportSegments as `AnalyticsReportSegmentsResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(AnalyticsReportSegmentsResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +extension V1.AnalyticsReportInstances.ById.Segments.GET { + public struct Parameters: Hashable { + public var fields: Fields = Fields() + + /// maximum resources per page + public var limit: Int? + + public struct Fields: Hashable { + public subscript (_ relation: Relation) -> T { + get { values[relation]?.base as! T } + set { values[relation] = AnyHashable(newValue) } + } + + private var values: [AnyHashable: AnyHashable] = [:] + + public struct AnalyticsReportSegments: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var checksum: Self { + .init(rawValue: "checksum") + } + + public static var sizeInBytes: Self { + .init(rawValue: "sizeInBytes") + } + + public static var url: Self { + .init(rawValue: "url") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct Relation: Hashable { + /// the fields to include for returned resources of type analyticsReportSegments + public static var analyticsReportSegments: Relation<[AnalyticsReportSegments]?> { + .init(key: "fields[analyticsReportSegments]") + } + + internal let key: String + + public func hash(into hasher: inout Hasher) { + hasher.combine(key) + } + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AnalyticsReportRequests/AnalyticsReportRequests.POST.692f63c.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AnalyticsReportRequests/AnalyticsReportRequests.POST.692f63c.generated.swift new file mode 100644 index 00000000..2ca65dec --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AnalyticsReportRequests/AnalyticsReportRequests.POST.692f63c.generated.swift @@ -0,0 +1,84 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.AnalyticsReportRequests { + public struct POST: Endpoint { + public typealias Parameters = AnalyticsReportRequestCreateRequest + public typealias Response = AnalyticsReportRequestResponse + + public var path: String { + "/v1/analyticsReportRequests" + } + + /// AnalyticsReportRequest representation + public var parameters: Parameters + + public init(parameters: Parameters) { + self.parameters = parameters + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "POST" + + var jsonEncoder: JSONEncoder { + let encoder = JSONEncoder() + return encoder + } + + urlRequest?.httpBody = try jsonEncoder.encode(parameters) + urlRequest?.setValue("application/json", forHTTPHeaderField: "Content-Type") + return urlRequest + } + + /// - Returns: **201**, Single AnalyticsReportRequest as `AnalyticsReportRequestResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **422**, Unprocessable request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 201: + return try jsonDecoder.decode(AnalyticsReportRequestResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 409: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 422: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AnalyticsReportRequests/ById/AnalyticsReportRequestsById.DELETE.48bb12e.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AnalyticsReportRequests/ById/AnalyticsReportRequestsById.DELETE.48bb12e.generated.swift new file mode 100644 index 00000000..ab99122e --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AnalyticsReportRequests/ById/AnalyticsReportRequestsById.DELETE.48bb12e.generated.swift @@ -0,0 +1,72 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.AnalyticsReportRequests.ById { + public struct DELETE: Endpoint { + public typealias Parameters = Never + public typealias Response = Void + + public var path: String { + "/v1/analyticsReportRequests/\(id)" + } + + /// the id of the requested resource + public var id: String + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "DELETE" + return urlRequest + } + + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 409: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppPriceTiers/ById/AppPriceTiersById.GET.32125c2.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AnalyticsReportRequests/ById/AnalyticsReportRequestsById.GET.48bb12e.generated.swift similarity index 53% rename from Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppPriceTiers/ById/AppPriceTiersById.GET.32125c2.generated.swift rename to Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AnalyticsReportRequests/ById/AnalyticsReportRequestsById.GET.48bb12e.generated.swift index 1fe5353e..e165d7f1 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppPriceTiers/ById/AppPriceTiersById.GET.32125c2.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AnalyticsReportRequests/ById/AnalyticsReportRequestsById.GET.48bb12e.generated.swift @@ -6,13 +6,12 @@ import Foundation import FoundationNetworking #endif -extension V1.AppPriceTiers.ById { - @available(*, deprecated) +extension V1.AnalyticsReportRequests.ById { public struct GET: Endpoint { - public typealias Response = AppPriceTierResponse + public typealias Response = AnalyticsReportRequestResponse public var path: String { - "/v1/appPriceTiers/\(id)" + "/v1/analyticsReportRequests/\(id)" } /// the id of the requested resource @@ -29,14 +28,14 @@ extension V1.AppPriceTiers.ById { components?.path = path components?.queryItems = [ - URLQueryItem(name: "fields[appPricePoints]", - value: parameters.fields[.appPricePoints]?.map { "\($0)" }.joined(separator: ",")), - URLQueryItem(name: "fields[appPriceTiers]", - value: parameters.fields[.appPriceTiers]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "fields[analyticsReportRequests]", + value: parameters.fields[.analyticsReportRequests]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "fields[analyticsReports]", + value: parameters.fields[.analyticsReports]?.map { "\($0)" }.joined(separator: ",")), URLQueryItem(name: "include", value: parameters.include?.map { "\($0)" }.joined(separator: ",")), - URLQueryItem(name: "limit[pricePoints]", - value: parameters.limit[.pricePoints].map { "\($0)" }) + URLQueryItem(name: "limit[reports]", + value: parameters.limit[.reports].map { "\($0)" }) ].filter { $0.value != nil } if components?.queryItems?.isEmpty ?? false { components?.queryItems = nil @@ -47,10 +46,12 @@ extension V1.AppPriceTiers.ById { return urlRequest } - /// - Returns: **200**, Single AppPriceTier as `AppPriceTierResponse` + /// - Returns: **200**, Single AnalyticsReportRequest as `AnalyticsReportRequestResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -59,17 +60,23 @@ extension V1.AppPriceTiers.ById { switch urlResponse.statusCode { case 200: - return try jsonDecoder.decode(AppPriceTierResponse.self, from: data) + return try jsonDecoder.decode(AnalyticsReportRequestResponse.self, from: data) case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 404: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -77,7 +84,7 @@ extension V1.AppPriceTiers.ById { } } -extension V1.AppPriceTiers.ById.GET { +extension V1.AnalyticsReportRequests.ById.GET { public struct Parameters: Hashable { public var fields: Fields = Fields() @@ -94,62 +101,63 @@ extension V1.AppPriceTiers.ById.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum AppPricePoints: Hashable, Codable, RawRepresentable { - case customerPrice - case priceTier - case proceeds - case territory - case unknown(String) - - public var rawValue: String { - switch self { - case .customerPrice: return "customerPrice" - case .priceTier: return "priceTier" - case .proceeds: return "proceeds" - case .territory: return "territory" - case .unknown(let rawValue): return rawValue - } + public struct AnalyticsReportRequests: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var accessType: Self { + .init(rawValue: "accessType") + } + + public static var reports: Self { + .init(rawValue: "reports") } + public static var stoppedDueToInactivity: Self { + .init(rawValue: "stoppedDueToInactivity") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "customerPrice": self = .customerPrice - case "priceTier": self = .priceTier - case "proceeds": self = .proceeds - case "territory": self = .territory - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum AppPriceTiers: Hashable, Codable, RawRepresentable { - case pricePoints - case unknown(String) + public struct AnalyticsReports: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var category: Self { + .init(rawValue: "category") + } + + public static var instances: Self { + .init(rawValue: "instances") + } + + public static var name: Self { + .init(rawValue: "name") + } - public var rawValue: String { - switch self { - case .pricePoints: return "pricePoints" - case .unknown(let rawValue): return rawValue - } + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "pricePoints": self = .pricePoints - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } public struct Relation: Hashable { - /// the fields to include for returned resources of type appPricePoints - public static var appPricePoints: Relation<[AppPricePoints]?> { - .init(key: "fields[appPricePoints]") + /// the fields to include for returned resources of type analyticsReportRequests + public static var analyticsReportRequests: Relation<[AnalyticsReportRequests]?> { + .init(key: "fields[analyticsReportRequests]") } - /// the fields to include for returned resources of type appPriceTiers - public static var appPriceTiers: Relation<[AppPriceTiers]?> { - .init(key: "fields[appPriceTiers]") + /// the fields to include for returned resources of type analyticsReports + public static var analyticsReports: Relation<[AnalyticsReports]?> { + .init(key: "fields[analyticsReports]") } internal let key: String @@ -160,22 +168,19 @@ extension V1.AppPriceTiers.ById.GET { } } - public enum Include: Hashable, Codable, RawRepresentable { - case pricePoints - case unknown(String) + public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var reports: Self { + .init(rawValue: "reports") + } - public var rawValue: String { - switch self { - case .pricePoints: return "pricePoints" - case .unknown(let rawValue): return rawValue - } + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "pricePoints": self = .pricePoints - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } @@ -188,9 +193,9 @@ extension V1.AppPriceTiers.ById.GET { private var values: [AnyHashable: AnyHashable] = [:] public struct Relation: Hashable { - /// maximum number of related pricePoints returned (when they are included) - public static var pricePoints: Relation { - .init(key: "limit[pricePoints]") + /// maximum number of related reports returned (when they are included) + public static var reports: Relation { + .init(key: "limit[reports]") } internal let key: String diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AnalyticsReportRequests/ById/Relationships/Reports/AnalyticsReportRequestsByIdRelationshipsReports.GET.5366b53.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AnalyticsReportRequests/ById/Relationships/Reports/AnalyticsReportRequestsByIdRelationshipsReports.GET.5366b53.generated.swift new file mode 100644 index 00000000..6258d95d --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AnalyticsReportRequests/ById/Relationships/Reports/AnalyticsReportRequestsByIdRelationshipsReports.GET.5366b53.generated.swift @@ -0,0 +1,88 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.AnalyticsReportRequests.ById.Relationships.Reports { + public struct GET: Endpoint { + public typealias Response = AnalyticsReportRequestReportsLinkagesResponse + + public var path: String { + "/v1/analyticsReportRequests/\(id)/relationships/reports" + } + + /// the id of the requested resource + public var id: String + + public var parameters: Parameters = Parameters() + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + components?.queryItems = [ + URLQueryItem(name: "limit", + value: parameters.limit.map { "\($0)" }) + ].filter { $0.value != nil } + if components?.queryItems?.isEmpty ?? false { + components?.queryItems = nil + } + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "GET" + return urlRequest + } + + /// - Returns: **200**, List of related linkages as `AnalyticsReportRequestReportsLinkagesResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(AnalyticsReportRequestReportsLinkagesResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +extension V1.AnalyticsReportRequests.ById.Relationships.Reports.GET { + public struct Parameters: Hashable { + /// maximum resources per page + public var limit: Int? + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AnalyticsReportRequests/ById/Reports/AnalyticsReportRequestsByIdReports.GET.905a517.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AnalyticsReportRequests/ById/Reports/AnalyticsReportRequestsByIdReports.GET.905a517.generated.swift new file mode 100644 index 00000000..2dea8e8f --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AnalyticsReportRequests/ById/Reports/AnalyticsReportRequestsByIdReports.GET.905a517.generated.swift @@ -0,0 +1,203 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.AnalyticsReportRequests.ById.Reports { + public struct GET: Endpoint { + public typealias Response = AnalyticsReportsResponse + + public var path: String { + "/v1/analyticsReportRequests/\(id)/reports" + } + + /// the id of the requested resource + public var id: String + + public var parameters: Parameters = Parameters() + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + components?.queryItems = [ + URLQueryItem(name: "fields[analyticsReports]", + value: parameters.fields[.analyticsReports]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "filter[category]", + value: parameters.filter[.category]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "filter[name]", + value: parameters.filter[.name]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "limit", + value: parameters.limit.map { "\($0)" }) + ].filter { $0.value != nil } + if components?.queryItems?.isEmpty ?? false { + components?.queryItems = nil + } + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "GET" + return urlRequest + } + + /// - Returns: **200**, List of AnalyticsReports as `AnalyticsReportsResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(AnalyticsReportsResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +extension V1.AnalyticsReportRequests.ById.Reports.GET { + public struct Parameters: Hashable { + public var fields: Fields = Fields() + + public var filter: Filter = Filter() + + /// maximum resources per page + public var limit: Int? + + public struct Fields: Hashable { + public subscript (_ relation: Relation) -> T { + get { values[relation]?.base as! T } + set { values[relation] = AnyHashable(newValue) } + } + + private var values: [AnyHashable: AnyHashable] = [:] + + public struct AnalyticsReports: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var category: Self { + .init(rawValue: "category") + } + + public static var instances: Self { + .init(rawValue: "instances") + } + + public static var name: Self { + .init(rawValue: "name") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct Relation: Hashable { + /// the fields to include for returned resources of type analyticsReports + public static var analyticsReports: Relation<[AnalyticsReports]?> { + .init(key: "fields[analyticsReports]") + } + + internal let key: String + + public func hash(into hasher: inout Hasher) { + hasher.combine(key) + } + } + } + + public struct Filter: Hashable { + public subscript (_ relation: Relation) -> T { + get { values[relation]?.base as! T } + set { values[relation] = AnyHashable(newValue) } + } + + private var values: [AnyHashable: AnyHashable] = [:] + + public struct Category: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var appStoreEngagement: Self { + .init(rawValue: "APP_STORE_ENGAGEMENT") + } + + public static var appUsage: Self { + .init(rawValue: "APP_USAGE") + } + + public static var commerce: Self { + .init(rawValue: "COMMERCE") + } + + public static var frameworkUsage: Self { + .init(rawValue: "FRAMEWORK_USAGE") + } + + public static var performance: Self { + .init(rawValue: "PERFORMANCE") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct Relation: Hashable { + /// filter by attribute 'category' + public static var category: Relation<[Category]?> { + .init(key: "filter[category]") + } + + /// filter by attribute 'name' + public static var name: Relation<[String]?> { + .init(key: "filter[name]") + } + + internal let key: String + + public func hash(into hasher: inout Hasher) { + hasher.combine(key) + } + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AnalyticsReportSegments/ById/AnalyticsReportSegmentsById.GET.1fe931b.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AnalyticsReportSegments/ById/AnalyticsReportSegmentsById.GET.1fe931b.generated.swift new file mode 100644 index 00000000..d587dbfc --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AnalyticsReportSegments/ById/AnalyticsReportSegmentsById.GET.1fe931b.generated.swift @@ -0,0 +1,133 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.AnalyticsReportSegments.ById { + public struct GET: Endpoint { + public typealias Response = AnalyticsReportSegmentResponse + + public var path: String { + "/v1/analyticsReportSegments/\(id)" + } + + /// the id of the requested resource + public var id: String + + public var parameters: Parameters = Parameters() + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + components?.queryItems = [ + URLQueryItem(name: "fields[analyticsReportSegments]", + value: parameters.fields[.analyticsReportSegments]?.map { "\($0)" }.joined(separator: ",")) + ].filter { $0.value != nil } + if components?.queryItems?.isEmpty ?? false { + components?.queryItems = nil + } + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "GET" + return urlRequest + } + + /// - Returns: **200**, Single AnalyticsReportSegment as `AnalyticsReportSegmentResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(AnalyticsReportSegmentResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +extension V1.AnalyticsReportSegments.ById.GET { + public struct Parameters: Hashable { + public var fields: Fields = Fields() + + public struct Fields: Hashable { + public subscript (_ relation: Relation) -> T { + get { values[relation]?.base as! T } + set { values[relation] = AnyHashable(newValue) } + } + + private var values: [AnyHashable: AnyHashable] = [:] + + public struct AnalyticsReportSegments: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var checksum: Self { + .init(rawValue: "checksum") + } + + public static var sizeInBytes: Self { + .init(rawValue: "sizeInBytes") + } + + public static var url: Self { + .init(rawValue: "url") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct Relation: Hashable { + /// the fields to include for returned resources of type analyticsReportSegments + public static var analyticsReportSegments: Relation<[AnalyticsReportSegments]?> { + .init(key: "fields[analyticsReportSegments]") + } + + internal let key: String + + public func hash(into hasher: inout Hasher) { + hasher.combine(key) + } + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AnalyticsReports/ById/AnalyticsReportsById.GET.98b3a99.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AnalyticsReports/ById/AnalyticsReportsById.GET.98b3a99.generated.swift new file mode 100644 index 00000000..a64cb601 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AnalyticsReports/ById/AnalyticsReportsById.GET.98b3a99.generated.swift @@ -0,0 +1,133 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.AnalyticsReports.ById { + public struct GET: Endpoint { + public typealias Response = AnalyticsReportResponse + + public var path: String { + "/v1/analyticsReports/\(id)" + } + + /// the id of the requested resource + public var id: String + + public var parameters: Parameters = Parameters() + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + components?.queryItems = [ + URLQueryItem(name: "fields[analyticsReports]", + value: parameters.fields[.analyticsReports]?.map { "\($0)" }.joined(separator: ",")) + ].filter { $0.value != nil } + if components?.queryItems?.isEmpty ?? false { + components?.queryItems = nil + } + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "GET" + return urlRequest + } + + /// - Returns: **200**, Single AnalyticsReport as `AnalyticsReportResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(AnalyticsReportResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +extension V1.AnalyticsReports.ById.GET { + public struct Parameters: Hashable { + public var fields: Fields = Fields() + + public struct Fields: Hashable { + public subscript (_ relation: Relation) -> T { + get { values[relation]?.base as! T } + set { values[relation] = AnyHashable(newValue) } + } + + private var values: [AnyHashable: AnyHashable] = [:] + + public struct AnalyticsReports: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var category: Self { + .init(rawValue: "category") + } + + public static var instances: Self { + .init(rawValue: "instances") + } + + public static var name: Self { + .init(rawValue: "name") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct Relation: Hashable { + /// the fields to include for returned resources of type analyticsReports + public static var analyticsReports: Relation<[AnalyticsReports]?> { + .init(key: "fields[analyticsReports]") + } + + internal let key: String + + public func hash(into hasher: inout Hasher) { + hasher.combine(key) + } + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AnalyticsReports/ById/Instances/AnalyticsReportsByIdInstances.GET.206c771.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AnalyticsReports/ById/Instances/AnalyticsReportsByIdInstances.GET.206c771.generated.swift new file mode 100644 index 00000000..675b7f93 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AnalyticsReports/ById/Instances/AnalyticsReportsByIdInstances.GET.206c771.generated.swift @@ -0,0 +1,195 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.AnalyticsReports.ById.Instances { + public struct GET: Endpoint { + public typealias Response = AnalyticsReportInstancesResponse + + public var path: String { + "/v1/analyticsReports/\(id)/instances" + } + + /// the id of the requested resource + public var id: String + + public var parameters: Parameters = Parameters() + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + components?.queryItems = [ + URLQueryItem(name: "fields[analyticsReportInstances]", + value: parameters.fields[.analyticsReportInstances]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "filter[granularity]", + value: parameters.filter[.granularity]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "filter[processingDate]", + value: parameters.filter[.processingDate]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "limit", + value: parameters.limit.map { "\($0)" }) + ].filter { $0.value != nil } + if components?.queryItems?.isEmpty ?? false { + components?.queryItems = nil + } + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "GET" + return urlRequest + } + + /// - Returns: **200**, List of AnalyticsReportInstances as `AnalyticsReportInstancesResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(AnalyticsReportInstancesResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +extension V1.AnalyticsReports.ById.Instances.GET { + public struct Parameters: Hashable { + public var fields: Fields = Fields() + + public var filter: Filter = Filter() + + /// maximum resources per page + public var limit: Int? + + public struct Fields: Hashable { + public subscript (_ relation: Relation) -> T { + get { values[relation]?.base as! T } + set { values[relation] = AnyHashable(newValue) } + } + + private var values: [AnyHashable: AnyHashable] = [:] + + public struct AnalyticsReportInstances: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var granularity: Self { + .init(rawValue: "granularity") + } + + public static var processingDate: Self { + .init(rawValue: "processingDate") + } + + public static var segments: Self { + .init(rawValue: "segments") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct Relation: Hashable { + /// the fields to include for returned resources of type analyticsReportInstances + public static var analyticsReportInstances: Relation<[AnalyticsReportInstances]?> { + .init(key: "fields[analyticsReportInstances]") + } + + internal let key: String + + public func hash(into hasher: inout Hasher) { + hasher.combine(key) + } + } + } + + public struct Filter: Hashable { + public subscript (_ relation: Relation) -> T { + get { values[relation]?.base as! T } + set { values[relation] = AnyHashable(newValue) } + } + + private var values: [AnyHashable: AnyHashable] = [:] + + public struct Granularity: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var daily: Self { + .init(rawValue: "DAILY") + } + + public static var monthly: Self { + .init(rawValue: "MONTHLY") + } + + public static var weekly: Self { + .init(rawValue: "WEEKLY") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct Relation: Hashable { + /// filter by attribute 'granularity' + public static var granularity: Relation<[Granularity]?> { + .init(key: "filter[granularity]") + } + + /// filter by attribute 'processingDate' + public static var processingDate: Relation<[String]?> { + .init(key: "filter[processingDate]") + } + + internal let key: String + + public func hash(into hasher: inout Hasher) { + hasher.combine(key) + } + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AnalyticsReports/ById/Relationships/Instances/AnalyticsReportsByIdRelationshipsInstances.GET.53dcf9e.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AnalyticsReports/ById/Relationships/Instances/AnalyticsReportsByIdRelationshipsInstances.GET.53dcf9e.generated.swift new file mode 100644 index 00000000..3f8a17c6 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AnalyticsReports/ById/Relationships/Instances/AnalyticsReportsByIdRelationshipsInstances.GET.53dcf9e.generated.swift @@ -0,0 +1,88 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.AnalyticsReports.ById.Relationships.Instances { + public struct GET: Endpoint { + public typealias Response = AnalyticsReportInstancesLinkagesResponse + + public var path: String { + "/v1/analyticsReports/\(id)/relationships/instances" + } + + /// the id of the requested resource + public var id: String + + public var parameters: Parameters = Parameters() + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + components?.queryItems = [ + URLQueryItem(name: "limit", + value: parameters.limit.map { "\($0)" }) + ].filter { $0.value != nil } + if components?.queryItems?.isEmpty ?? false { + components?.queryItems = nil + } + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "GET" + return urlRequest + } + + /// - Returns: **200**, List of related linkages as `AnalyticsReportInstancesLinkagesResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(AnalyticsReportInstancesLinkagesResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +extension V1.AnalyticsReports.ById.Relationships.Instances.GET { + public struct Parameters: Hashable { + /// maximum resources per page + public var limit: Int? + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppCategories/AppCategories.GET.6ce4d98.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppCategories/AppCategories.GET.6ce4d98.generated.swift index 8f9395ba..68d18e5d 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppCategories/AppCategories.GET.6ce4d98.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppCategories/AppCategories.GET.6ce4d98.generated.swift @@ -49,7 +49,9 @@ extension V1.AppCategories { /// - Returns: **200**, List of AppCategories as `AppCategoriesResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -63,9 +65,15 @@ extension V1.AppCategories { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -117,28 +125,27 @@ extension V1.AppCategories.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum AppCategories: Hashable, Codable, RawRepresentable { - case parent - case platforms - case subcategories - case unknown(String) - - public var rawValue: String { - switch self { - case .parent: return "parent" - case .platforms: return "platforms" - case .subcategories: return "subcategories" - case .unknown(let rawValue): return rawValue - } + public struct AppCategories: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var parent: Self { + .init(rawValue: "parent") } + public static var platforms: Self { + .init(rawValue: "platforms") + } + + public static var subcategories: Self { + .init(rawValue: "subcategories") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "parent": self = .parent - case "platforms": self = .platforms - case "subcategories": self = .subcategories - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } @@ -164,28 +171,31 @@ extension V1.AppCategories.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum Platforms: Hashable, Codable, RawRepresentable { - case iOS - case macOS - case tvOS - case unknown(String) - - public var rawValue: String { - switch self { - case .iOS: return "IOS" - case .macOS: return "MAC_OS" - case .tvOS: return "TV_OS" - case .unknown(let rawValue): return rawValue - } + public struct Platforms: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var iOS: Self { + .init(rawValue: "IOS") + } + + public static var macOS: Self { + .init(rawValue: "MAC_OS") } + public static var tvOS: Self { + .init(rawValue: "TV_OS") + } + + public static var visionOS: Self { + .init(rawValue: "VISION_OS") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "IOS": self = .iOS - case "MAC_OS": self = .macOS - case "TV_OS": self = .tvOS - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } @@ -203,25 +213,23 @@ extension V1.AppCategories.GET { } } - public enum Include: Hashable, Codable, RawRepresentable { - case parent - case subcategories - case unknown(String) + public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var parent: Self { + .init(rawValue: "parent") + } - public var rawValue: String { - switch self { - case .parent: return "parent" - case .subcategories: return "subcategories" - case .unknown(let rawValue): return rawValue - } + public static var subcategories: Self { + .init(rawValue: "subcategories") + } + + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "parent": self = .parent - case "subcategories": self = .subcategories - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppCategories/ById/AppCategoriesById.GET.923d0d7.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppCategories/ById/AppCategoriesById.GET.923d0d7.generated.swift index d70e5e11..aff218bc 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppCategories/ById/AppCategoriesById.GET.923d0d7.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppCategories/ById/AppCategoriesById.GET.923d0d7.generated.swift @@ -46,8 +46,10 @@ extension V1.AppCategories.ById { /// - Returns: **200**, Single AppCategory as `AppCategoryResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -61,12 +63,18 @@ extension V1.AppCategories.ById { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 404: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -91,28 +99,27 @@ extension V1.AppCategories.ById.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum AppCategories: Hashable, Codable, RawRepresentable { - case parent - case platforms - case subcategories - case unknown(String) - - public var rawValue: String { - switch self { - case .parent: return "parent" - case .platforms: return "platforms" - case .subcategories: return "subcategories" - case .unknown(let rawValue): return rawValue - } + public struct AppCategories: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var parent: Self { + .init(rawValue: "parent") } + public static var platforms: Self { + .init(rawValue: "platforms") + } + + public static var subcategories: Self { + .init(rawValue: "subcategories") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "parent": self = .parent - case "platforms": self = .platforms - case "subcategories": self = .subcategories - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } @@ -130,25 +137,23 @@ extension V1.AppCategories.ById.GET { } } - public enum Include: Hashable, Codable, RawRepresentable { - case parent - case subcategories - case unknown(String) + public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var parent: Self { + .init(rawValue: "parent") + } - public var rawValue: String { - switch self { - case .parent: return "parent" - case .subcategories: return "subcategories" - case .unknown(let rawValue): return rawValue - } + public static var subcategories: Self { + .init(rawValue: "subcategories") } + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "parent": self = .parent - case "subcategories": self = .subcategories - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppCategories/ById/Parent/AppCategoriesByIdParent.GET.42da8d7.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppCategories/ById/Parent/AppCategoriesByIdParent.GET.42da8d7.generated.swift index c6a18b89..3eb43cf1 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppCategories/ById/Parent/AppCategoriesByIdParent.GET.42da8d7.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppCategories/ById/Parent/AppCategoriesByIdParent.GET.42da8d7.generated.swift @@ -42,8 +42,10 @@ extension V1.AppCategories.ById.Parent { /// - Returns: **200**, Single AppCategory with get as `AppCategoryWithoutIncludesResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -57,12 +59,18 @@ extension V1.AppCategories.ById.Parent { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 404: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -82,28 +90,27 @@ extension V1.AppCategories.ById.Parent.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum AppCategories: Hashable, Codable, RawRepresentable { - case parent - case platforms - case subcategories - case unknown(String) - - public var rawValue: String { - switch self { - case .parent: return "parent" - case .platforms: return "platforms" - case .subcategories: return "subcategories" - case .unknown(let rawValue): return rawValue - } + public struct AppCategories: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var parent: Self { + .init(rawValue: "parent") + } + + public static var platforms: Self { + .init(rawValue: "platforms") } + public static var subcategories: Self { + .init(rawValue: "subcategories") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "parent": self = .parent - case "platforms": self = .platforms - case "subcategories": self = .subcategories - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppCategories/ById/Relationships/Parent/AppCategoriesByIdRelationshipsParent.GET.c2da707.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppCategories/ById/Relationships/Parent/AppCategoriesByIdRelationshipsParent.GET.c2da707.generated.swift new file mode 100644 index 00000000..6f95083f --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppCategories/ById/Relationships/Parent/AppCategoriesByIdRelationshipsParent.GET.c2da707.generated.swift @@ -0,0 +1,86 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.AppCategories.ById.Relationships.Parent { + public struct GET: Endpoint { + public typealias Response = AppCategoryParentLinkageResponse + + public var path: String { + "/v1/appCategories/\(id)/relationships/parent" + } + + /// the id of the requested resource + public var id: String + + public var parameters: Parameters = Parameters() + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + components?.queryItems = [ + + ].filter { $0.value != nil } + if components?.queryItems?.isEmpty ?? false { + components?.queryItems = nil + } + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "GET" + return urlRequest + } + + /// - Returns: **200**, Related linkage as `AppCategoryParentLinkageResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(AppCategoryParentLinkageResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +extension V1.AppCategories.ById.Relationships.Parent.GET { + public struct Parameters: Hashable { + + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppCategories/ById/Relationships/Subcategories/AppCategoriesByIdRelationshipsSubcategories.GET.74856fe.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppCategories/ById/Relationships/Subcategories/AppCategoriesByIdRelationshipsSubcategories.GET.74856fe.generated.swift new file mode 100644 index 00000000..493253e2 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppCategories/ById/Relationships/Subcategories/AppCategoriesByIdRelationshipsSubcategories.GET.74856fe.generated.swift @@ -0,0 +1,88 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.AppCategories.ById.Relationships.Subcategories { + public struct GET: Endpoint { + public typealias Response = AppCategorySubcategoriesLinkagesResponse + + public var path: String { + "/v1/appCategories/\(id)/relationships/subcategories" + } + + /// the id of the requested resource + public var id: String + + public var parameters: Parameters = Parameters() + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + components?.queryItems = [ + URLQueryItem(name: "limit", + value: parameters.limit.map { "\($0)" }) + ].filter { $0.value != nil } + if components?.queryItems?.isEmpty ?? false { + components?.queryItems = nil + } + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "GET" + return urlRequest + } + + /// - Returns: **200**, List of related linkages as `AppCategorySubcategoriesLinkagesResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(AppCategorySubcategoriesLinkagesResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +extension V1.AppCategories.ById.Relationships.Subcategories.GET { + public struct Parameters: Hashable { + /// maximum resources per page + public var limit: Int? + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppCategories/ById/Subcategories/AppCategoriesByIdSubcategories.GET.5d7305e.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppCategories/ById/Subcategories/AppCategoriesByIdSubcategories.GET.5d7305e.generated.swift index 6902e8fb..0d35652b 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppCategories/ById/Subcategories/AppCategoriesByIdSubcategories.GET.5d7305e.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppCategories/ById/Subcategories/AppCategoriesByIdSubcategories.GET.5d7305e.generated.swift @@ -44,8 +44,10 @@ extension V1.AppCategories.ById.Subcategories { /// - Returns: **200**, List of AppCategories with get as `AppCategoriesWithoutIncludesResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -59,12 +61,18 @@ extension V1.AppCategories.ById.Subcategories { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 404: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -87,28 +95,27 @@ extension V1.AppCategories.ById.Subcategories.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum AppCategories: Hashable, Codable, RawRepresentable { - case parent - case platforms - case subcategories - case unknown(String) - - public var rawValue: String { - switch self { - case .parent: return "parent" - case .platforms: return "platforms" - case .subcategories: return "subcategories" - case .unknown(let rawValue): return rawValue - } + public struct AppCategories: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var parent: Self { + .init(rawValue: "parent") + } + + public static var platforms: Self { + .init(rawValue: "platforms") } + public static var subcategories: Self { + .init(rawValue: "subcategories") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "parent": self = .parent - case "platforms": self = .platforms - case "subcategories": self = .subcategories - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppClipAdvancedExperienceImages/AppClipAdvancedExperienceImages.POST.f5969cf.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppClipAdvancedExperienceImages/AppClipAdvancedExperienceImages.POST.f5969cf.generated.swift index a12c4f5c..77dd0a7b 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppClipAdvancedExperienceImages/AppClipAdvancedExperienceImages.POST.f5969cf.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppClipAdvancedExperienceImages/AppClipAdvancedExperienceImages.POST.f5969cf.generated.swift @@ -41,8 +41,11 @@ extension V1.AppClipAdvancedExperienceImages { /// - Returns: **201**, Single AppClipAdvancedExperienceImage as `AppClipAdvancedExperienceImageResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **422**, Unprocessable request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -56,12 +59,21 @@ extension V1.AppClipAdvancedExperienceImages { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 409: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 422: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppClipAdvancedExperienceImages/ById/AppClipAdvancedExperienceImagesById.GET.208696c.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppClipAdvancedExperienceImages/ById/AppClipAdvancedExperienceImagesById.GET.208696c.generated.swift index db9d5efc..df1d389a 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppClipAdvancedExperienceImages/ById/AppClipAdvancedExperienceImagesById.GET.208696c.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppClipAdvancedExperienceImages/ById/AppClipAdvancedExperienceImagesById.GET.208696c.generated.swift @@ -42,8 +42,10 @@ extension V1.AppClipAdvancedExperienceImages.ById { /// - Returns: **200**, Single AppClipAdvancedExperienceImage as `AppClipAdvancedExperienceImageResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -57,12 +59,18 @@ extension V1.AppClipAdvancedExperienceImages.ById { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 404: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -82,40 +90,39 @@ extension V1.AppClipAdvancedExperienceImages.ById.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum AppClipAdvancedExperienceImages: Hashable, Codable, RawRepresentable { - case assetDeliveryState - case fileName - case fileSize - case imageAsset - case sourceFileChecksum - case uploadOperations - case uploaded - case unknown(String) - - public var rawValue: String { - switch self { - case .assetDeliveryState: return "assetDeliveryState" - case .fileName: return "fileName" - case .fileSize: return "fileSize" - case .imageAsset: return "imageAsset" - case .sourceFileChecksum: return "sourceFileChecksum" - case .uploadOperations: return "uploadOperations" - case .uploaded: return "uploaded" - case .unknown(let rawValue): return rawValue - } + public struct AppClipAdvancedExperienceImages: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var assetDeliveryState: Self { + .init(rawValue: "assetDeliveryState") } + public static var fileName: Self { + .init(rawValue: "fileName") + } + + public static var fileSize: Self { + .init(rawValue: "fileSize") + } + + public static var imageAsset: Self { + .init(rawValue: "imageAsset") + } + + public static var sourceFileChecksum: Self { + .init(rawValue: "sourceFileChecksum") + } + + public static var uploadOperations: Self { + .init(rawValue: "uploadOperations") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "assetDeliveryState": self = .assetDeliveryState - case "fileName": self = .fileName - case "fileSize": self = .fileSize - case "imageAsset": self = .imageAsset - case "sourceFileChecksum": self = .sourceFileChecksum - case "uploadOperations": self = .uploadOperations - case "uploaded": self = .uploaded - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppClipAdvancedExperienceImages/ById/AppClipAdvancedExperienceImagesById.PATCH.208696c.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppClipAdvancedExperienceImages/ById/AppClipAdvancedExperienceImagesById.PATCH.208696c.generated.swift index 3b3abcdc..b6ab1761 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppClipAdvancedExperienceImages/ById/AppClipAdvancedExperienceImagesById.PATCH.208696c.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppClipAdvancedExperienceImages/ById/AppClipAdvancedExperienceImagesById.PATCH.208696c.generated.swift @@ -48,9 +48,12 @@ extension V1.AppClipAdvancedExperienceImages.ById { /// - Returns: **200**, Single AppClipAdvancedExperienceImage as `AppClipAdvancedExperienceImageResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **422**, Unprocessable request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -64,6 +67,9 @@ extension V1.AppClipAdvancedExperienceImages.ById { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) @@ -73,6 +79,12 @@ extension V1.AppClipAdvancedExperienceImages.ById { case 409: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 422: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppClipAdvancedExperiences/AppClipAdvancedExperiences.POST.4d9c6bc.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppClipAdvancedExperiences/AppClipAdvancedExperiences.POST.4d9c6bc.generated.swift index 13b6ec0b..37d1fb0a 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppClipAdvancedExperiences/AppClipAdvancedExperiences.POST.4d9c6bc.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppClipAdvancedExperiences/AppClipAdvancedExperiences.POST.4d9c6bc.generated.swift @@ -41,8 +41,11 @@ extension V1.AppClipAdvancedExperiences { /// - Returns: **201**, Single AppClipAdvancedExperience as `AppClipAdvancedExperienceResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **422**, Unprocessable request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -56,12 +59,21 @@ extension V1.AppClipAdvancedExperiences { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 409: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 422: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppClipAdvancedExperiences/ById/AppClipAdvancedExperiencesById.GET.79eae35.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppClipAdvancedExperiences/ById/AppClipAdvancedExperiencesById.GET.79eae35.generated.swift index 81b3eaf9..67e4da86 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppClipAdvancedExperiences/ById/AppClipAdvancedExperiencesById.GET.79eae35.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppClipAdvancedExperiences/ById/AppClipAdvancedExperiencesById.GET.79eae35.generated.swift @@ -46,8 +46,10 @@ extension V1.AppClipAdvancedExperiences.ById { /// - Returns: **200**, Single AppClipAdvancedExperience as `AppClipAdvancedExperienceResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -61,12 +63,18 @@ extension V1.AppClipAdvancedExperiences.ById { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 404: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -91,58 +99,63 @@ extension V1.AppClipAdvancedExperiences.ById.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum AppClipAdvancedExperiences: Hashable, Codable, RawRepresentable { - case action - case appClip - case businessCategory - case defaultLanguage - case headerImage - case isPoweredBy - case link - case localizations - case place - case placeStatus - case removed - case status - case version - case unknown(String) - - public var rawValue: String { - switch self { - case .action: return "action" - case .appClip: return "appClip" - case .businessCategory: return "businessCategory" - case .defaultLanguage: return "defaultLanguage" - case .headerImage: return "headerImage" - case .isPoweredBy: return "isPoweredBy" - case .link: return "link" - case .localizations: return "localizations" - case .place: return "place" - case .placeStatus: return "placeStatus" - case .removed: return "removed" - case .status: return "status" - case .version: return "version" - case .unknown(let rawValue): return rawValue - } + public struct AppClipAdvancedExperiences: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var action: Self { + .init(rawValue: "action") + } + + public static var appClip: Self { + .init(rawValue: "appClip") + } + + public static var businessCategory: Self { + .init(rawValue: "businessCategory") + } + + public static var defaultLanguage: Self { + .init(rawValue: "defaultLanguage") } + public static var headerImage: Self { + .init(rawValue: "headerImage") + } + + public static var isPoweredBy: Self { + .init(rawValue: "isPoweredBy") + } + + public static var link: Self { + .init(rawValue: "link") + } + + public static var localizations: Self { + .init(rawValue: "localizations") + } + + public static var place: Self { + .init(rawValue: "place") + } + + public static var placeStatus: Self { + .init(rawValue: "placeStatus") + } + + public static var status: Self { + .init(rawValue: "status") + } + + public static var version: Self { + .init(rawValue: "version") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "action": self = .action - case "appClip": self = .appClip - case "businessCategory": self = .businessCategory - case "defaultLanguage": self = .defaultLanguage - case "headerImage": self = .headerImage - case "isPoweredBy": self = .isPoweredBy - case "link": self = .link - case "localizations": self = .localizations - case "place": self = .place - case "placeStatus": self = .placeStatus - case "removed": self = .removed - case "status": self = .status - case "version": self = .version - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } @@ -160,28 +173,27 @@ extension V1.AppClipAdvancedExperiences.ById.GET { } } - public enum Include: Hashable, Codable, RawRepresentable { - case appClip - case headerImage - case localizations - case unknown(String) + public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var appClip: Self { + .init(rawValue: "appClip") + } - public var rawValue: String { - switch self { - case .appClip: return "appClip" - case .headerImage: return "headerImage" - case .localizations: return "localizations" - case .unknown(let rawValue): return rawValue - } + public static var headerImage: Self { + .init(rawValue: "headerImage") + } + + public static var localizations: Self { + .init(rawValue: "localizations") } + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "appClip": self = .appClip - case "headerImage": self = .headerImage - case "localizations": self = .localizations - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppClipAdvancedExperiences/ById/AppClipAdvancedExperiencesById.PATCH.79eae35.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppClipAdvancedExperiences/ById/AppClipAdvancedExperiencesById.PATCH.79eae35.generated.swift index 2d93505a..cf8e6436 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppClipAdvancedExperiences/ById/AppClipAdvancedExperiencesById.PATCH.79eae35.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppClipAdvancedExperiences/ById/AppClipAdvancedExperiencesById.PATCH.79eae35.generated.swift @@ -48,9 +48,12 @@ extension V1.AppClipAdvancedExperiences.ById { /// - Returns: **200**, Single AppClipAdvancedExperience as `AppClipAdvancedExperienceResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **422**, Unprocessable request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -64,6 +67,9 @@ extension V1.AppClipAdvancedExperiences.ById { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) @@ -73,6 +79,12 @@ extension V1.AppClipAdvancedExperiences.ById { case 409: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 422: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppClipAppStoreReviewDetails/AppClipAppStoreReviewDetails.POST.4346ef3.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppClipAppStoreReviewDetails/AppClipAppStoreReviewDetails.POST.4346ef3.generated.swift index 7a3fe9dc..032f2ace 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppClipAppStoreReviewDetails/AppClipAppStoreReviewDetails.POST.4346ef3.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppClipAppStoreReviewDetails/AppClipAppStoreReviewDetails.POST.4346ef3.generated.swift @@ -41,8 +41,11 @@ extension V1.AppClipAppStoreReviewDetails { /// - Returns: **201**, Single AppClipAppStoreReviewDetail as `AppClipAppStoreReviewDetailResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **422**, Unprocessable request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -56,12 +59,21 @@ extension V1.AppClipAppStoreReviewDetails { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 409: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 422: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppClipAppStoreReviewDetails/ById/AppClipAppStoreReviewDetailsById.GET.8072c9a.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppClipAppStoreReviewDetails/ById/AppClipAppStoreReviewDetailsById.GET.8072c9a.generated.swift index 8ba2a8b7..34d80c81 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppClipAppStoreReviewDetails/ById/AppClipAppStoreReviewDetailsById.GET.8072c9a.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppClipAppStoreReviewDetails/ById/AppClipAppStoreReviewDetailsById.GET.8072c9a.generated.swift @@ -44,8 +44,10 @@ extension V1.AppClipAppStoreReviewDetails.ById { /// - Returns: **200**, Single AppClipAppStoreReviewDetail as `AppClipAppStoreReviewDetailResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -59,12 +61,18 @@ extension V1.AppClipAppStoreReviewDetails.ById { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 404: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -87,25 +95,23 @@ extension V1.AppClipAppStoreReviewDetails.ById.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum AppClipAppStoreReviewDetails: Hashable, Codable, RawRepresentable { - case appClipDefaultExperience - case invocationUrls - case unknown(String) - - public var rawValue: String { - switch self { - case .appClipDefaultExperience: return "appClipDefaultExperience" - case .invocationUrls: return "invocationUrls" - case .unknown(let rawValue): return rawValue - } + public struct AppClipAppStoreReviewDetails: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var appClipDefaultExperience: Self { + .init(rawValue: "appClipDefaultExperience") } + public static var invocationUrls: Self { + .init(rawValue: "invocationUrls") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "appClipDefaultExperience": self = .appClipDefaultExperience - case "invocationUrls": self = .invocationUrls - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } @@ -123,22 +129,19 @@ extension V1.AppClipAppStoreReviewDetails.ById.GET { } } - public enum Include: Hashable, Codable, RawRepresentable { - case appClipDefaultExperience - case unknown(String) + public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var appClipDefaultExperience: Self { + .init(rawValue: "appClipDefaultExperience") + } - public var rawValue: String { - switch self { - case .appClipDefaultExperience: return "appClipDefaultExperience" - case .unknown(let rawValue): return rawValue - } + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "appClipDefaultExperience": self = .appClipDefaultExperience - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppClipAppStoreReviewDetails/ById/AppClipAppStoreReviewDetailsById.PATCH.8072c9a.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppClipAppStoreReviewDetails/ById/AppClipAppStoreReviewDetailsById.PATCH.8072c9a.generated.swift index b059a8b8..74306b17 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppClipAppStoreReviewDetails/ById/AppClipAppStoreReviewDetailsById.PATCH.8072c9a.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppClipAppStoreReviewDetails/ById/AppClipAppStoreReviewDetailsById.PATCH.8072c9a.generated.swift @@ -48,9 +48,12 @@ extension V1.AppClipAppStoreReviewDetails.ById { /// - Returns: **200**, Single AppClipAppStoreReviewDetail as `AppClipAppStoreReviewDetailResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **422**, Unprocessable request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -64,6 +67,9 @@ extension V1.AppClipAppStoreReviewDetails.ById { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) @@ -73,6 +79,12 @@ extension V1.AppClipAppStoreReviewDetails.ById { case 409: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 422: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppClipDefaultExperienceLocalizations/AppClipDefaultExperienceLocalizations.POST.8d44541.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppClipDefaultExperienceLocalizations/AppClipDefaultExperienceLocalizations.POST.8d44541.generated.swift index 6fea71ec..af661353 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppClipDefaultExperienceLocalizations/AppClipDefaultExperienceLocalizations.POST.8d44541.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppClipDefaultExperienceLocalizations/AppClipDefaultExperienceLocalizations.POST.8d44541.generated.swift @@ -41,8 +41,11 @@ extension V1.AppClipDefaultExperienceLocalizations { /// - Returns: **201**, Single AppClipDefaultExperienceLocalization as `AppClipDefaultExperienceLocalizationResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **422**, Unprocessable request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -56,12 +59,21 @@ extension V1.AppClipDefaultExperienceLocalizations { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 409: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 422: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppClipDefaultExperienceLocalizations/ById/AppClipDefaultExperienceLocalizationsById.DELETE.da71bfb.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppClipDefaultExperienceLocalizations/ById/AppClipDefaultExperienceLocalizationsById.DELETE.da71bfb.generated.swift index ed091475..03fb1587 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppClipDefaultExperienceLocalizations/ById/AppClipDefaultExperienceLocalizationsById.DELETE.da71bfb.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppClipDefaultExperienceLocalizations/ById/AppClipDefaultExperienceLocalizationsById.DELETE.da71bfb.generated.swift @@ -31,11 +31,12 @@ extension V1.AppClipDefaultExperienceLocalizations.ById { return urlRequest } - /// - Returns: **204**, Success (no content) /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -43,12 +44,12 @@ extension V1.AppClipDefaultExperienceLocalizations.ById { } switch urlResponse.statusCode { - case 204: - return - case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) @@ -58,6 +59,9 @@ extension V1.AppClipDefaultExperienceLocalizations.ById { case 409: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppClipDefaultExperienceLocalizations/ById/AppClipDefaultExperienceLocalizationsById.GET.da71bfb.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppClipDefaultExperienceLocalizations/ById/AppClipDefaultExperienceLocalizationsById.GET.da71bfb.generated.swift index 4528b0b9..5d6d4980 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppClipDefaultExperienceLocalizations/ById/AppClipDefaultExperienceLocalizationsById.GET.da71bfb.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppClipDefaultExperienceLocalizations/ById/AppClipDefaultExperienceLocalizationsById.GET.da71bfb.generated.swift @@ -46,8 +46,10 @@ extension V1.AppClipDefaultExperienceLocalizations.ById { /// - Returns: **200**, Single AppClipDefaultExperienceLocalization as `AppClipDefaultExperienceLocalizationResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -61,12 +63,18 @@ extension V1.AppClipDefaultExperienceLocalizations.ById { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 404: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -89,71 +97,71 @@ extension V1.AppClipDefaultExperienceLocalizations.ById.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum AppClipDefaultExperienceLocalizations: Hashable, Codable, RawRepresentable { - case appClipDefaultExperience - case appClipHeaderImage - case locale - case subtitle - case unknown(String) + public struct AppClipDefaultExperienceLocalizations: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var appClipDefaultExperience: Self { + .init(rawValue: "appClipDefaultExperience") + } + + public static var appClipHeaderImage: Self { + .init(rawValue: "appClipHeaderImage") + } + + public static var locale: Self { + .init(rawValue: "locale") + } - public var rawValue: String { - switch self { - case .appClipDefaultExperience: return "appClipDefaultExperience" - case .appClipHeaderImage: return "appClipHeaderImage" - case .locale: return "locale" - case .subtitle: return "subtitle" - case .unknown(let rawValue): return rawValue - } + public static var subtitle: Self { + .init(rawValue: "subtitle") } + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "appClipDefaultExperience": self = .appClipDefaultExperience - case "appClipHeaderImage": self = .appClipHeaderImage - case "locale": self = .locale - case "subtitle": self = .subtitle - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum AppClipHeaderImages: Hashable, Codable, RawRepresentable { - case appClipDefaultExperienceLocalization - case assetDeliveryState - case fileName - case fileSize - case imageAsset - case sourceFileChecksum - case uploadOperations - case uploaded - case unknown(String) - - public var rawValue: String { - switch self { - case .appClipDefaultExperienceLocalization: return "appClipDefaultExperienceLocalization" - case .assetDeliveryState: return "assetDeliveryState" - case .fileName: return "fileName" - case .fileSize: return "fileSize" - case .imageAsset: return "imageAsset" - case .sourceFileChecksum: return "sourceFileChecksum" - case .uploadOperations: return "uploadOperations" - case .uploaded: return "uploaded" - case .unknown(let rawValue): return rawValue - } + public struct AppClipHeaderImages: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var appClipDefaultExperienceLocalization: Self { + .init(rawValue: "appClipDefaultExperienceLocalization") + } + + public static var assetDeliveryState: Self { + .init(rawValue: "assetDeliveryState") + } + + public static var fileName: Self { + .init(rawValue: "fileName") } + public static var fileSize: Self { + .init(rawValue: "fileSize") + } + + public static var imageAsset: Self { + .init(rawValue: "imageAsset") + } + + public static var sourceFileChecksum: Self { + .init(rawValue: "sourceFileChecksum") + } + + public static var uploadOperations: Self { + .init(rawValue: "uploadOperations") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "appClipDefaultExperienceLocalization": self = .appClipDefaultExperienceLocalization - case "assetDeliveryState": self = .assetDeliveryState - case "fileName": self = .fileName - case "fileSize": self = .fileSize - case "imageAsset": self = .imageAsset - case "sourceFileChecksum": self = .sourceFileChecksum - case "uploadOperations": self = .uploadOperations - case "uploaded": self = .uploaded - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } @@ -176,25 +184,23 @@ extension V1.AppClipDefaultExperienceLocalizations.ById.GET { } } - public enum Include: Hashable, Codable, RawRepresentable { - case appClipDefaultExperience - case appClipHeaderImage - case unknown(String) + public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var appClipDefaultExperience: Self { + .init(rawValue: "appClipDefaultExperience") + } - public var rawValue: String { - switch self { - case .appClipDefaultExperience: return "appClipDefaultExperience" - case .appClipHeaderImage: return "appClipHeaderImage" - case .unknown(let rawValue): return rawValue - } + public static var appClipHeaderImage: Self { + .init(rawValue: "appClipHeaderImage") } + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "appClipDefaultExperience": self = .appClipDefaultExperience - case "appClipHeaderImage": self = .appClipHeaderImage - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppClipDefaultExperienceLocalizations/ById/AppClipDefaultExperienceLocalizationsById.PATCH.da71bfb.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppClipDefaultExperienceLocalizations/ById/AppClipDefaultExperienceLocalizationsById.PATCH.da71bfb.generated.swift index fa7b3361..9405c152 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppClipDefaultExperienceLocalizations/ById/AppClipDefaultExperienceLocalizationsById.PATCH.da71bfb.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppClipDefaultExperienceLocalizations/ById/AppClipDefaultExperienceLocalizationsById.PATCH.da71bfb.generated.swift @@ -48,9 +48,12 @@ extension V1.AppClipDefaultExperienceLocalizations.ById { /// - Returns: **200**, Single AppClipDefaultExperienceLocalization as `AppClipDefaultExperienceLocalizationResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **422**, Unprocessable request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -64,6 +67,9 @@ extension V1.AppClipDefaultExperienceLocalizations.ById { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) @@ -73,6 +79,12 @@ extension V1.AppClipDefaultExperienceLocalizations.ById { case 409: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 422: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppClipDefaultExperienceLocalizations/ById/AppClipHeaderImage/AppClipDefaultExperienceLocalizationsByIdAppClipHeaderImage.GET.f5dae9f.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppClipDefaultExperienceLocalizations/ById/AppClipHeaderImage/AppClipDefaultExperienceLocalizationsByIdAppClipHeaderImage.GET.f5dae9f.generated.swift index ec9c8f4b..845bad8b 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppClipDefaultExperienceLocalizations/ById/AppClipHeaderImage/AppClipDefaultExperienceLocalizationsByIdAppClipHeaderImage.GET.f5dae9f.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppClipDefaultExperienceLocalizations/ById/AppClipHeaderImage/AppClipDefaultExperienceLocalizationsByIdAppClipHeaderImage.GET.f5dae9f.generated.swift @@ -46,8 +46,10 @@ extension V1.AppClipDefaultExperienceLocalizations.ById.AppClipHeaderImage { /// - Returns: **200**, Single AppClipHeaderImage as `AppClipHeaderImageResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -61,12 +63,18 @@ extension V1.AppClipDefaultExperienceLocalizations.ById.AppClipHeaderImage { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 404: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -89,71 +97,71 @@ extension V1.AppClipDefaultExperienceLocalizations.ById.AppClipHeaderImage.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum AppClipDefaultExperienceLocalizations: Hashable, Codable, RawRepresentable { - case appClipDefaultExperience - case appClipHeaderImage - case locale - case subtitle - case unknown(String) + public struct AppClipDefaultExperienceLocalizations: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var appClipDefaultExperience: Self { + .init(rawValue: "appClipDefaultExperience") + } + + public static var appClipHeaderImage: Self { + .init(rawValue: "appClipHeaderImage") + } + + public static var locale: Self { + .init(rawValue: "locale") + } + + public static var subtitle: Self { + .init(rawValue: "subtitle") + } - public var rawValue: String { - switch self { - case .appClipDefaultExperience: return "appClipDefaultExperience" - case .appClipHeaderImage: return "appClipHeaderImage" - case .locale: return "locale" - case .subtitle: return "subtitle" - case .unknown(let rawValue): return rawValue - } + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "appClipDefaultExperience": self = .appClipDefaultExperience - case "appClipHeaderImage": self = .appClipHeaderImage - case "locale": self = .locale - case "subtitle": self = .subtitle - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum AppClipHeaderImages: Hashable, Codable, RawRepresentable { - case appClipDefaultExperienceLocalization - case assetDeliveryState - case fileName - case fileSize - case imageAsset - case sourceFileChecksum - case uploadOperations - case uploaded - case unknown(String) - - public var rawValue: String { - switch self { - case .appClipDefaultExperienceLocalization: return "appClipDefaultExperienceLocalization" - case .assetDeliveryState: return "assetDeliveryState" - case .fileName: return "fileName" - case .fileSize: return "fileSize" - case .imageAsset: return "imageAsset" - case .sourceFileChecksum: return "sourceFileChecksum" - case .uploadOperations: return "uploadOperations" - case .uploaded: return "uploaded" - case .unknown(let rawValue): return rawValue - } + public struct AppClipHeaderImages: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var appClipDefaultExperienceLocalization: Self { + .init(rawValue: "appClipDefaultExperienceLocalization") + } + + public static var assetDeliveryState: Self { + .init(rawValue: "assetDeliveryState") + } + + public static var fileName: Self { + .init(rawValue: "fileName") } + public static var fileSize: Self { + .init(rawValue: "fileSize") + } + + public static var imageAsset: Self { + .init(rawValue: "imageAsset") + } + + public static var sourceFileChecksum: Self { + .init(rawValue: "sourceFileChecksum") + } + + public static var uploadOperations: Self { + .init(rawValue: "uploadOperations") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "appClipDefaultExperienceLocalization": self = .appClipDefaultExperienceLocalization - case "assetDeliveryState": self = .assetDeliveryState - case "fileName": self = .fileName - case "fileSize": self = .fileSize - case "imageAsset": self = .imageAsset - case "sourceFileChecksum": self = .sourceFileChecksum - case "uploadOperations": self = .uploadOperations - case "uploaded": self = .uploaded - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } @@ -176,22 +184,19 @@ extension V1.AppClipDefaultExperienceLocalizations.ById.AppClipHeaderImage.GET { } } - public enum Include: Hashable, Codable, RawRepresentable { - case appClipDefaultExperienceLocalization - case unknown(String) + public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var appClipDefaultExperienceLocalization: Self { + .init(rawValue: "appClipDefaultExperienceLocalization") + } - public var rawValue: String { - switch self { - case .appClipDefaultExperienceLocalization: return "appClipDefaultExperienceLocalization" - case .unknown(let rawValue): return rawValue - } + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "appClipDefaultExperienceLocalization": self = .appClipDefaultExperienceLocalization - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppClipDefaultExperienceLocalizations/ById/Relationships/AppClipHeaderImage/AppClipDefaultExperienceLocalizationsByIdRelationshipsAppClipHeaderImage.GET.1e22c61.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppClipDefaultExperienceLocalizations/ById/Relationships/AppClipHeaderImage/AppClipDefaultExperienceLocalizationsByIdRelationshipsAppClipHeaderImage.GET.1e22c61.generated.swift new file mode 100644 index 00000000..48cb368e --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppClipDefaultExperienceLocalizations/ById/Relationships/AppClipHeaderImage/AppClipDefaultExperienceLocalizationsByIdRelationshipsAppClipHeaderImage.GET.1e22c61.generated.swift @@ -0,0 +1,86 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.AppClipDefaultExperienceLocalizations.ById.Relationships.AppClipHeaderImage { + public struct GET: Endpoint { + public typealias Response = AppClipDefaultExperienceLocalizationAppClipHeaderImageLinkageResponse + + public var path: String { + "/v1/appClipDefaultExperienceLocalizations/\(id)/relationships/appClipHeaderImage" + } + + /// the id of the requested resource + public var id: String + + public var parameters: Parameters = Parameters() + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + components?.queryItems = [ + + ].filter { $0.value != nil } + if components?.queryItems?.isEmpty ?? false { + components?.queryItems = nil + } + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "GET" + return urlRequest + } + + /// - Returns: **200**, Related linkage as `AppClipDefaultExperienceLocalizationAppClipHeaderImageLinkageResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(AppClipDefaultExperienceLocalizationAppClipHeaderImageLinkageResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +extension V1.AppClipDefaultExperienceLocalizations.ById.Relationships.AppClipHeaderImage.GET { + public struct Parameters: Hashable { + + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppClipDefaultExperiences/AppClipDefaultExperiences.POST.d79dbcf.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppClipDefaultExperiences/AppClipDefaultExperiences.POST.d79dbcf.generated.swift index e3828647..dc87dc8a 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppClipDefaultExperiences/AppClipDefaultExperiences.POST.d79dbcf.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppClipDefaultExperiences/AppClipDefaultExperiences.POST.d79dbcf.generated.swift @@ -41,8 +41,11 @@ extension V1.AppClipDefaultExperiences { /// - Returns: **201**, Single AppClipDefaultExperience as `AppClipDefaultExperienceResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **422**, Unprocessable request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -56,12 +59,21 @@ extension V1.AppClipDefaultExperiences { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 409: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 422: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppClipDefaultExperiences/ById/AppClipAppStoreReviewDetail/AppClipDefaultExperiencesByIdAppClipAppStoreReviewDetail.GET.778274a.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppClipDefaultExperiences/ById/AppClipAppStoreReviewDetail/AppClipDefaultExperiencesByIdAppClipAppStoreReviewDetail.GET.778274a.generated.swift index 68bd06c4..39c990e4 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppClipDefaultExperiences/ById/AppClipAppStoreReviewDetail/AppClipDefaultExperiencesByIdAppClipAppStoreReviewDetail.GET.778274a.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppClipDefaultExperiences/ById/AppClipAppStoreReviewDetail/AppClipDefaultExperiencesByIdAppClipAppStoreReviewDetail.GET.778274a.generated.swift @@ -46,8 +46,10 @@ extension V1.AppClipDefaultExperiences.ById.AppClipAppStoreReviewDetail { /// - Returns: **200**, Single AppClipAppStoreReviewDetail as `AppClipAppStoreReviewDetailResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -61,12 +63,18 @@ extension V1.AppClipDefaultExperiences.ById.AppClipAppStoreReviewDetail { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 404: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -89,59 +97,55 @@ extension V1.AppClipDefaultExperiences.ById.AppClipAppStoreReviewDetail.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum AppClipAppStoreReviewDetails: Hashable, Codable, RawRepresentable { - case appClipDefaultExperience - case invocationUrls - case unknown(String) - - public var rawValue: String { - switch self { - case .appClipDefaultExperience: return "appClipDefaultExperience" - case .invocationUrls: return "invocationUrls" - case .unknown(let rawValue): return rawValue - } + public struct AppClipAppStoreReviewDetails: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var appClipDefaultExperience: Self { + .init(rawValue: "appClipDefaultExperience") + } + + public static var invocationUrls: Self { + .init(rawValue: "invocationUrls") } + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "appClipDefaultExperience": self = .appClipDefaultExperience - case "invocationUrls": self = .invocationUrls - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum AppClipDefaultExperiences: Hashable, Codable, RawRepresentable { - case action - case appClip - case appClipAppStoreReviewDetail - case appClipDefaultExperienceLocalizations - case appClipDefaultExperienceTemplate - case releaseWithAppStoreVersion - case unknown(String) - - public var rawValue: String { - switch self { - case .action: return "action" - case .appClip: return "appClip" - case .appClipAppStoreReviewDetail: return "appClipAppStoreReviewDetail" - case .appClipDefaultExperienceLocalizations: return "appClipDefaultExperienceLocalizations" - case .appClipDefaultExperienceTemplate: return "appClipDefaultExperienceTemplate" - case .releaseWithAppStoreVersion: return "releaseWithAppStoreVersion" - case .unknown(let rawValue): return rawValue - } + public struct AppClipDefaultExperiences: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var action: Self { + .init(rawValue: "action") + } + + public static var appClip: Self { + .init(rawValue: "appClip") + } + + public static var appClipAppStoreReviewDetail: Self { + .init(rawValue: "appClipAppStoreReviewDetail") + } + + public static var appClipDefaultExperienceLocalizations: Self { + .init(rawValue: "appClipDefaultExperienceLocalizations") + } + + public static var releaseWithAppStoreVersion: Self { + .init(rawValue: "releaseWithAppStoreVersion") + } + + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "action": self = .action - case "appClip": self = .appClip - case "appClipAppStoreReviewDetail": self = .appClipAppStoreReviewDetail - case "appClipDefaultExperienceLocalizations": self = .appClipDefaultExperienceLocalizations - case "appClipDefaultExperienceTemplate": self = .appClipDefaultExperienceTemplate - case "releaseWithAppStoreVersion": self = .releaseWithAppStoreVersion - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } @@ -164,22 +168,19 @@ extension V1.AppClipDefaultExperiences.ById.AppClipAppStoreReviewDetail.GET { } } - public enum Include: Hashable, Codable, RawRepresentable { - case appClipDefaultExperience - case unknown(String) + public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var appClipDefaultExperience: Self { + .init(rawValue: "appClipDefaultExperience") + } - public var rawValue: String { - switch self { - case .appClipDefaultExperience: return "appClipDefaultExperience" - case .unknown(let rawValue): return rawValue - } + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "appClipDefaultExperience": self = .appClipDefaultExperience - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppClipDefaultExperiences/ById/AppClipDefaultExperienceLocalizations/AppClipDefaultExperiencesByIdAppClipDefaultExperienceLocalizations.GET.7281113.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppClipDefaultExperiences/ById/AppClipDefaultExperienceLocalizations/AppClipDefaultExperiencesByIdAppClipDefaultExperienceLocalizations.GET.7281113.generated.swift index d9d1f0f3..7adf90a0 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppClipDefaultExperiences/ById/AppClipDefaultExperienceLocalizations/AppClipDefaultExperiencesByIdAppClipDefaultExperienceLocalizations.GET.7281113.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppClipDefaultExperiences/ById/AppClipDefaultExperienceLocalizations/AppClipDefaultExperiencesByIdAppClipDefaultExperienceLocalizations.GET.7281113.generated.swift @@ -52,8 +52,10 @@ extension V1.AppClipDefaultExperiences.ById.AppClipDefaultExperienceLocalization /// - Returns: **200**, List of AppClipDefaultExperienceLocalizations as `AppClipDefaultExperienceLocalizationsResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -67,12 +69,18 @@ extension V1.AppClipDefaultExperiences.ById.AppClipDefaultExperienceLocalization case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 404: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -100,105 +108,103 @@ extension V1.AppClipDefaultExperiences.ById.AppClipDefaultExperienceLocalization private var values: [AnyHashable: AnyHashable] = [:] - public enum AppClipDefaultExperienceLocalizations: Hashable, Codable, RawRepresentable { - case appClipDefaultExperience - case appClipHeaderImage - case locale - case subtitle - case unknown(String) - - public var rawValue: String { - switch self { - case .appClipDefaultExperience: return "appClipDefaultExperience" - case .appClipHeaderImage: return "appClipHeaderImage" - case .locale: return "locale" - case .subtitle: return "subtitle" - case .unknown(let rawValue): return rawValue - } + public struct AppClipDefaultExperienceLocalizations: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var appClipDefaultExperience: Self { + .init(rawValue: "appClipDefaultExperience") + } + + public static var appClipHeaderImage: Self { + .init(rawValue: "appClipHeaderImage") + } + + public static var locale: Self { + .init(rawValue: "locale") + } + + public static var subtitle: Self { + .init(rawValue: "subtitle") + } + + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "appClipDefaultExperience": self = .appClipDefaultExperience - case "appClipHeaderImage": self = .appClipHeaderImage - case "locale": self = .locale - case "subtitle": self = .subtitle - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum AppClipDefaultExperiences: Hashable, Codable, RawRepresentable { - case action - case appClip - case appClipAppStoreReviewDetail - case appClipDefaultExperienceLocalizations - case appClipDefaultExperienceTemplate - case releaseWithAppStoreVersion - case unknown(String) - - public var rawValue: String { - switch self { - case .action: return "action" - case .appClip: return "appClip" - case .appClipAppStoreReviewDetail: return "appClipAppStoreReviewDetail" - case .appClipDefaultExperienceLocalizations: return "appClipDefaultExperienceLocalizations" - case .appClipDefaultExperienceTemplate: return "appClipDefaultExperienceTemplate" - case .releaseWithAppStoreVersion: return "releaseWithAppStoreVersion" - case .unknown(let rawValue): return rawValue - } + public struct AppClipDefaultExperiences: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var action: Self { + .init(rawValue: "action") + } + + public static var appClip: Self { + .init(rawValue: "appClip") + } + + public static var appClipAppStoreReviewDetail: Self { + .init(rawValue: "appClipAppStoreReviewDetail") + } + + public static var appClipDefaultExperienceLocalizations: Self { + .init(rawValue: "appClipDefaultExperienceLocalizations") + } + + public static var releaseWithAppStoreVersion: Self { + .init(rawValue: "releaseWithAppStoreVersion") + } + + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "action": self = .action - case "appClip": self = .appClip - case "appClipAppStoreReviewDetail": self = .appClipAppStoreReviewDetail - case "appClipDefaultExperienceLocalizations": self = .appClipDefaultExperienceLocalizations - case "appClipDefaultExperienceTemplate": self = .appClipDefaultExperienceTemplate - case "releaseWithAppStoreVersion": self = .releaseWithAppStoreVersion - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum AppClipHeaderImages: Hashable, Codable, RawRepresentable { - case appClipDefaultExperienceLocalization - case assetDeliveryState - case fileName - case fileSize - case imageAsset - case sourceFileChecksum - case uploadOperations - case uploaded - case unknown(String) - - public var rawValue: String { - switch self { - case .appClipDefaultExperienceLocalization: return "appClipDefaultExperienceLocalization" - case .assetDeliveryState: return "assetDeliveryState" - case .fileName: return "fileName" - case .fileSize: return "fileSize" - case .imageAsset: return "imageAsset" - case .sourceFileChecksum: return "sourceFileChecksum" - case .uploadOperations: return "uploadOperations" - case .uploaded: return "uploaded" - case .unknown(let rawValue): return rawValue - } + public struct AppClipHeaderImages: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var appClipDefaultExperienceLocalization: Self { + .init(rawValue: "appClipDefaultExperienceLocalization") + } + + public static var assetDeliveryState: Self { + .init(rawValue: "assetDeliveryState") + } + + public static var fileName: Self { + .init(rawValue: "fileName") + } + + public static var fileSize: Self { + .init(rawValue: "fileSize") + } + + public static var imageAsset: Self { + .init(rawValue: "imageAsset") + } + + public static var sourceFileChecksum: Self { + .init(rawValue: "sourceFileChecksum") } + public static var uploadOperations: Self { + .init(rawValue: "uploadOperations") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "appClipDefaultExperienceLocalization": self = .appClipDefaultExperienceLocalization - case "assetDeliveryState": self = .assetDeliveryState - case "fileName": self = .fileName - case "fileSize": self = .fileSize - case "imageAsset": self = .imageAsset - case "sourceFileChecksum": self = .sourceFileChecksum - case "uploadOperations": self = .uploadOperations - case "uploaded": self = .uploaded - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } @@ -248,25 +254,23 @@ extension V1.AppClipDefaultExperiences.ById.AppClipDefaultExperienceLocalization } } - public enum Include: Hashable, Codable, RawRepresentable { - case appClipDefaultExperience - case appClipHeaderImage - case unknown(String) + public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var appClipDefaultExperience: Self { + .init(rawValue: "appClipDefaultExperience") + } - public var rawValue: String { - switch self { - case .appClipDefaultExperience: return "appClipDefaultExperience" - case .appClipHeaderImage: return "appClipHeaderImage" - case .unknown(let rawValue): return rawValue - } + public static var appClipHeaderImage: Self { + .init(rawValue: "appClipHeaderImage") + } + + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "appClipDefaultExperience": self = .appClipDefaultExperience - case "appClipHeaderImage": self = .appClipHeaderImage - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppClipDefaultExperiences/ById/AppClipDefaultExperiencesById.DELETE.ce80d07.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppClipDefaultExperiences/ById/AppClipDefaultExperiencesById.DELETE.ce80d07.generated.swift index b187a16a..d242d204 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppClipDefaultExperiences/ById/AppClipDefaultExperiencesById.DELETE.ce80d07.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppClipDefaultExperiences/ById/AppClipDefaultExperiencesById.DELETE.ce80d07.generated.swift @@ -31,11 +31,12 @@ extension V1.AppClipDefaultExperiences.ById { return urlRequest } - /// - Returns: **204**, Success (no content) /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -43,12 +44,12 @@ extension V1.AppClipDefaultExperiences.ById { } switch urlResponse.statusCode { - case 204: - return - case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) @@ -58,6 +59,9 @@ extension V1.AppClipDefaultExperiences.ById { case 409: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppClipDefaultExperiences/ById/AppClipDefaultExperiencesById.GET.ce80d07.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppClipDefaultExperiences/ById/AppClipDefaultExperiencesById.GET.ce80d07.generated.swift index c98d5611..d6de48f5 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppClipDefaultExperiences/ById/AppClipDefaultExperiencesById.GET.ce80d07.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppClipDefaultExperiences/ById/AppClipDefaultExperiencesById.GET.ce80d07.generated.swift @@ -52,8 +52,10 @@ extension V1.AppClipDefaultExperiences.ById { /// - Returns: **200**, Single AppClipDefaultExperience as `AppClipDefaultExperienceResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -67,12 +69,18 @@ extension V1.AppClipDefaultExperiences.ById { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 404: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -97,163 +105,195 @@ extension V1.AppClipDefaultExperiences.ById.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum AppClipAppStoreReviewDetails: Hashable, Codable, RawRepresentable { - case appClipDefaultExperience - case invocationUrls - case unknown(String) + public struct AppClipAppStoreReviewDetails: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var appClipDefaultExperience: Self { + .init(rawValue: "appClipDefaultExperience") + } + + public static var invocationUrls: Self { + .init(rawValue: "invocationUrls") + } - public var rawValue: String { - switch self { - case .appClipDefaultExperience: return "appClipDefaultExperience" - case .invocationUrls: return "invocationUrls" - case .unknown(let rawValue): return rawValue - } + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "appClipDefaultExperience": self = .appClipDefaultExperience - case "invocationUrls": self = .invocationUrls - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum AppClipDefaultExperienceLocalizations: Hashable, Codable, RawRepresentable { - case appClipDefaultExperience - case appClipHeaderImage - case locale - case subtitle - case unknown(String) + public struct AppClipDefaultExperienceLocalizations: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var appClipDefaultExperience: Self { + .init(rawValue: "appClipDefaultExperience") + } + + public static var appClipHeaderImage: Self { + .init(rawValue: "appClipHeaderImage") + } - public var rawValue: String { - switch self { - case .appClipDefaultExperience: return "appClipDefaultExperience" - case .appClipHeaderImage: return "appClipHeaderImage" - case .locale: return "locale" - case .subtitle: return "subtitle" - case .unknown(let rawValue): return rawValue - } + public static var locale: Self { + .init(rawValue: "locale") } + public static var subtitle: Self { + .init(rawValue: "subtitle") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "appClipDefaultExperience": self = .appClipDefaultExperience - case "appClipHeaderImage": self = .appClipHeaderImage - case "locale": self = .locale - case "subtitle": self = .subtitle - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum AppClipDefaultExperiences: Hashable, Codable, RawRepresentable { - case action - case appClip - case appClipAppStoreReviewDetail - case appClipDefaultExperienceLocalizations - case appClipDefaultExperienceTemplate - case releaseWithAppStoreVersion - case unknown(String) - - public var rawValue: String { - switch self { - case .action: return "action" - case .appClip: return "appClip" - case .appClipAppStoreReviewDetail: return "appClipAppStoreReviewDetail" - case .appClipDefaultExperienceLocalizations: return "appClipDefaultExperienceLocalizations" - case .appClipDefaultExperienceTemplate: return "appClipDefaultExperienceTemplate" - case .releaseWithAppStoreVersion: return "releaseWithAppStoreVersion" - case .unknown(let rawValue): return rawValue - } + public struct AppClipDefaultExperiences: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var action: Self { + .init(rawValue: "action") + } + + public static var appClip: Self { + .init(rawValue: "appClip") } + public static var appClipAppStoreReviewDetail: Self { + .init(rawValue: "appClipAppStoreReviewDetail") + } + + public static var appClipDefaultExperienceLocalizations: Self { + .init(rawValue: "appClipDefaultExperienceLocalizations") + } + + public static var releaseWithAppStoreVersion: Self { + .init(rawValue: "releaseWithAppStoreVersion") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "action": self = .action - case "appClip": self = .appClip - case "appClipAppStoreReviewDetail": self = .appClipAppStoreReviewDetail - case "appClipDefaultExperienceLocalizations": self = .appClipDefaultExperienceLocalizations - case "appClipDefaultExperienceTemplate": self = .appClipDefaultExperienceTemplate - case "releaseWithAppStoreVersion": self = .releaseWithAppStoreVersion - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum AppStoreVersions: Hashable, Codable, RawRepresentable { - case ageRatingDeclaration - case app - case appClipDefaultExperience - case appStoreReviewDetail - case appStoreState - case appStoreVersionExperiments - case appStoreVersionExperimentsV2 - case appStoreVersionLocalizations - case appStoreVersionPhasedRelease - case appStoreVersionSubmission - case build - case copyright - case createdDate - case customerReviews - case downloadable - case earliestReleaseDate - case platform - case releaseType - case routingAppCoverage - case versionString - case unknown(String) - - public var rawValue: String { - switch self { - case .ageRatingDeclaration: return "ageRatingDeclaration" - case .app: return "app" - case .appClipDefaultExperience: return "appClipDefaultExperience" - case .appStoreReviewDetail: return "appStoreReviewDetail" - case .appStoreState: return "appStoreState" - case .appStoreVersionExperiments: return "appStoreVersionExperiments" - case .appStoreVersionExperimentsV2: return "appStoreVersionExperimentsV2" - case .appStoreVersionLocalizations: return "appStoreVersionLocalizations" - case .appStoreVersionPhasedRelease: return "appStoreVersionPhasedRelease" - case .appStoreVersionSubmission: return "appStoreVersionSubmission" - case .build: return "build" - case .copyright: return "copyright" - case .createdDate: return "createdDate" - case .customerReviews: return "customerReviews" - case .downloadable: return "downloadable" - case .earliestReleaseDate: return "earliestReleaseDate" - case .platform: return "platform" - case .releaseType: return "releaseType" - case .routingAppCoverage: return "routingAppCoverage" - case .versionString: return "versionString" - case .unknown(let rawValue): return rawValue - } + public struct AppStoreVersions: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var ageRatingDeclaration: Self { + .init(rawValue: "ageRatingDeclaration") + } + + public static var alternativeDistributionPackage: Self { + .init(rawValue: "alternativeDistributionPackage") + } + + public static var app: Self { + .init(rawValue: "app") + } + + public static var appClipDefaultExperience: Self { + .init(rawValue: "appClipDefaultExperience") + } + + public static var appStoreReviewDetail: Self { + .init(rawValue: "appStoreReviewDetail") + } + + public static var appStoreState: Self { + .init(rawValue: "appStoreState") + } + + public static var appStoreVersionExperiments: Self { + .init(rawValue: "appStoreVersionExperiments") + } + + public static var appStoreVersionExperimentsV2: Self { + .init(rawValue: "appStoreVersionExperimentsV2") + } + + public static var appStoreVersionLocalizations: Self { + .init(rawValue: "appStoreVersionLocalizations") + } + + public static var appStoreVersionPhasedRelease: Self { + .init(rawValue: "appStoreVersionPhasedRelease") } + public static var appStoreVersionSubmission: Self { + .init(rawValue: "appStoreVersionSubmission") + } + + public static var appVersionState: Self { + .init(rawValue: "appVersionState") + } + + public static var build: Self { + .init(rawValue: "build") + } + + public static var copyright: Self { + .init(rawValue: "copyright") + } + + public static var createdDate: Self { + .init(rawValue: "createdDate") + } + + public static var customerReviews: Self { + .init(rawValue: "customerReviews") + } + + public static var downloadable: Self { + .init(rawValue: "downloadable") + } + + public static var earliestReleaseDate: Self { + .init(rawValue: "earliestReleaseDate") + } + + public static var gameCenterAppVersion: Self { + .init(rawValue: "gameCenterAppVersion") + } + + public static var platform: Self { + .init(rawValue: "platform") + } + + public static var releaseType: Self { + .init(rawValue: "releaseType") + } + + public static var reviewType: Self { + .init(rawValue: "reviewType") + } + + public static var routingAppCoverage: Self { + .init(rawValue: "routingAppCoverage") + } + + public static var usesIdfa: Self { + .init(rawValue: "usesIdfa") + } + + public static var versionString: Self { + .init(rawValue: "versionString") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "ageRatingDeclaration": self = .ageRatingDeclaration - case "app": self = .app - case "appClipDefaultExperience": self = .appClipDefaultExperience - case "appStoreReviewDetail": self = .appStoreReviewDetail - case "appStoreState": self = .appStoreState - case "appStoreVersionExperiments": self = .appStoreVersionExperiments - case "appStoreVersionExperimentsV2": self = .appStoreVersionExperimentsV2 - case "appStoreVersionLocalizations": self = .appStoreVersionLocalizations - case "appStoreVersionPhasedRelease": self = .appStoreVersionPhasedRelease - case "appStoreVersionSubmission": self = .appStoreVersionSubmission - case "build": self = .build - case "copyright": self = .copyright - case "createdDate": self = .createdDate - case "customerReviews": self = .customerReviews - case "downloadable": self = .downloadable - case "earliestReleaseDate": self = .earliestReleaseDate - case "platform": self = .platform - case "releaseType": self = .releaseType - case "routingAppCoverage": self = .routingAppCoverage - case "versionString": self = .versionString - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } @@ -286,31 +326,31 @@ extension V1.AppClipDefaultExperiences.ById.GET { } } - public enum Include: Hashable, Codable, RawRepresentable { - case appClip - case appClipAppStoreReviewDetail - case appClipDefaultExperienceLocalizations - case releaseWithAppStoreVersion - case unknown(String) - - public var rawValue: String { - switch self { - case .appClip: return "appClip" - case .appClipAppStoreReviewDetail: return "appClipAppStoreReviewDetail" - case .appClipDefaultExperienceLocalizations: return "appClipDefaultExperienceLocalizations" - case .releaseWithAppStoreVersion: return "releaseWithAppStoreVersion" - case .unknown(let rawValue): return rawValue - } + public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var appClip: Self { + .init(rawValue: "appClip") + } + + public static var appClipAppStoreReviewDetail: Self { + .init(rawValue: "appClipAppStoreReviewDetail") } + public static var appClipDefaultExperienceLocalizations: Self { + .init(rawValue: "appClipDefaultExperienceLocalizations") + } + + public static var releaseWithAppStoreVersion: Self { + .init(rawValue: "releaseWithAppStoreVersion") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "appClip": self = .appClip - case "appClipAppStoreReviewDetail": self = .appClipAppStoreReviewDetail - case "appClipDefaultExperienceLocalizations": self = .appClipDefaultExperienceLocalizations - case "releaseWithAppStoreVersion": self = .releaseWithAppStoreVersion - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppClipDefaultExperiences/ById/AppClipDefaultExperiencesById.PATCH.ce80d07.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppClipDefaultExperiences/ById/AppClipDefaultExperiencesById.PATCH.ce80d07.generated.swift index 79e02fb3..2ac4a910 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppClipDefaultExperiences/ById/AppClipDefaultExperiencesById.PATCH.ce80d07.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppClipDefaultExperiences/ById/AppClipDefaultExperiencesById.PATCH.ce80d07.generated.swift @@ -48,9 +48,12 @@ extension V1.AppClipDefaultExperiences.ById { /// - Returns: **200**, Single AppClipDefaultExperience as `AppClipDefaultExperienceResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **422**, Unprocessable request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -64,6 +67,9 @@ extension V1.AppClipDefaultExperiences.ById { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) @@ -73,6 +79,12 @@ extension V1.AppClipDefaultExperiences.ById { case 409: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 422: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppClipDefaultExperiences/ById/Relationships/AppClipAppStoreReviewDetail/AppClipDefaultExperiencesByIdRelationshipsAppClipAppStoreReviewDetail.GET.e8897c5.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppClipDefaultExperiences/ById/Relationships/AppClipAppStoreReviewDetail/AppClipDefaultExperiencesByIdRelationshipsAppClipAppStoreReviewDetail.GET.e8897c5.generated.swift new file mode 100644 index 00000000..3d996014 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppClipDefaultExperiences/ById/Relationships/AppClipAppStoreReviewDetail/AppClipDefaultExperiencesByIdRelationshipsAppClipAppStoreReviewDetail.GET.e8897c5.generated.swift @@ -0,0 +1,86 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.AppClipDefaultExperiences.ById.Relationships.AppClipAppStoreReviewDetail { + public struct GET: Endpoint { + public typealias Response = AppClipDefaultExperienceAppClipAppStoreReviewDetailLinkageResponse + + public var path: String { + "/v1/appClipDefaultExperiences/\(id)/relationships/appClipAppStoreReviewDetail" + } + + /// the id of the requested resource + public var id: String + + public var parameters: Parameters = Parameters() + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + components?.queryItems = [ + + ].filter { $0.value != nil } + if components?.queryItems?.isEmpty ?? false { + components?.queryItems = nil + } + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "GET" + return urlRequest + } + + /// - Returns: **200**, Related linkage as `AppClipDefaultExperienceAppClipAppStoreReviewDetailLinkageResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(AppClipDefaultExperienceAppClipAppStoreReviewDetailLinkageResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +extension V1.AppClipDefaultExperiences.ById.Relationships.AppClipAppStoreReviewDetail.GET { + public struct Parameters: Hashable { + + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppClipDefaultExperiences/ById/Relationships/AppClipDefaultExperienceLocalizations/AppClipDefaultExperiencesByIdRelationshipsAppClipDefaultExperienceLocalizations.GET.561b55b.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppClipDefaultExperiences/ById/Relationships/AppClipDefaultExperienceLocalizations/AppClipDefaultExperiencesByIdRelationshipsAppClipDefaultExperienceLocalizations.GET.561b55b.generated.swift new file mode 100644 index 00000000..6ee4d78e --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppClipDefaultExperiences/ById/Relationships/AppClipDefaultExperienceLocalizations/AppClipDefaultExperiencesByIdRelationshipsAppClipDefaultExperienceLocalizations.GET.561b55b.generated.swift @@ -0,0 +1,88 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.AppClipDefaultExperiences.ById.Relationships.AppClipDefaultExperienceLocalizations { + public struct GET: Endpoint { + public typealias Response = AppClipDefaultExperienceAppClipDefaultExperienceLocalizationsLinkagesResponse + + public var path: String { + "/v1/appClipDefaultExperiences/\(id)/relationships/appClipDefaultExperienceLocalizations" + } + + /// the id of the requested resource + public var id: String + + public var parameters: Parameters = Parameters() + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + components?.queryItems = [ + URLQueryItem(name: "limit", + value: parameters.limit.map { "\($0)" }) + ].filter { $0.value != nil } + if components?.queryItems?.isEmpty ?? false { + components?.queryItems = nil + } + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "GET" + return urlRequest + } + + /// - Returns: **200**, List of related linkages as `AppClipDefaultExperienceAppClipDefaultExperienceLocalizationsLinkagesResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(AppClipDefaultExperienceAppClipDefaultExperienceLocalizationsLinkagesResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +extension V1.AppClipDefaultExperiences.ById.Relationships.AppClipDefaultExperienceLocalizations.GET { + public struct Parameters: Hashable { + /// maximum resources per page + public var limit: Int? + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppClipDefaultExperiences/ById/Relationships/ReleaseWithAppStoreVersion/AppClipDefaultExperiencesByIdRelationshipsReleaseWithAppStoreVersion.GET.5f5225a.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppClipDefaultExperiences/ById/Relationships/ReleaseWithAppStoreVersion/AppClipDefaultExperiencesByIdRelationshipsReleaseWithAppStoreVersion.GET.5f5225a.generated.swift index a897601d..2721527f 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppClipDefaultExperiences/ById/Relationships/ReleaseWithAppStoreVersion/AppClipDefaultExperiencesByIdRelationshipsReleaseWithAppStoreVersion.GET.5f5225a.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppClipDefaultExperiences/ById/Relationships/ReleaseWithAppStoreVersion/AppClipDefaultExperiencesByIdRelationshipsReleaseWithAppStoreVersion.GET.5f5225a.generated.swift @@ -41,8 +41,10 @@ extension V1.AppClipDefaultExperiences.ById.Relationships.ReleaseWithAppStoreVer /// - Returns: **200**, Related linkage as `AppClipDefaultExperienceReleaseWithAppStoreVersionLinkageResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -56,12 +58,18 @@ extension V1.AppClipDefaultExperiences.ById.Relationships.ReleaseWithAppStoreVer case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 404: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppClipDefaultExperiences/ById/Relationships/ReleaseWithAppStoreVersion/AppClipDefaultExperiencesByIdRelationshipsReleaseWithAppStoreVersion.PATCH.5f5225a.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppClipDefaultExperiences/ById/Relationships/ReleaseWithAppStoreVersion/AppClipDefaultExperiencesByIdRelationshipsReleaseWithAppStoreVersion.PATCH.5f5225a.generated.swift index 2e7b4fd4..b95241ef 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppClipDefaultExperiences/ById/Relationships/ReleaseWithAppStoreVersion/AppClipDefaultExperiencesByIdRelationshipsReleaseWithAppStoreVersion.PATCH.5f5225a.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppClipDefaultExperiences/ById/Relationships/ReleaseWithAppStoreVersion/AppClipDefaultExperiencesByIdRelationshipsReleaseWithAppStoreVersion.PATCH.5f5225a.generated.swift @@ -46,10 +46,12 @@ extension V1.AppClipDefaultExperiences.ById.Relationships.ReleaseWithAppStoreVer return urlRequest } - /// - Returns: **204**, Success (no content) + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **422**, Unprocessable request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -57,8 +59,8 @@ extension V1.AppClipDefaultExperiences.ById.Relationships.ReleaseWithAppStoreVer } switch urlResponse.statusCode { - case 204: - return + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) @@ -69,6 +71,12 @@ extension V1.AppClipDefaultExperiences.ById.Relationships.ReleaseWithAppStoreVer case 409: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 422: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppClipDefaultExperiences/ById/ReleaseWithAppStoreVersion/AppClipDefaultExperiencesByIdReleaseWithAppStoreVersion.GET.1dd4f03.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppClipDefaultExperiences/ById/ReleaseWithAppStoreVersion/AppClipDefaultExperiencesByIdReleaseWithAppStoreVersion.GET.1dd4f03.generated.swift index b11704bd..7de0c410 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppClipDefaultExperiences/ById/ReleaseWithAppStoreVersion/AppClipDefaultExperiencesByIdReleaseWithAppStoreVersion.GET.1dd4f03.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppClipDefaultExperiences/ById/ReleaseWithAppStoreVersion/AppClipDefaultExperiencesByIdReleaseWithAppStoreVersion.GET.1dd4f03.generated.swift @@ -30,6 +30,8 @@ extension V1.AppClipDefaultExperiences.ById.ReleaseWithAppStoreVersion { components?.queryItems = [ URLQueryItem(name: "fields[ageRatingDeclarations]", value: parameters.fields[.ageRatingDeclarations]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "fields[alternativeDistributionPackages]", + value: parameters.fields[.alternativeDistributionPackages]?.map { "\($0)" }.joined(separator: ",")), URLQueryItem(name: "fields[appClipDefaultExperiences]", value: parameters.fields[.appClipDefaultExperiences]?.map { "\($0)" }.joined(separator: ",")), URLQueryItem(name: "fields[appStoreReviewDetails]", @@ -48,6 +50,8 @@ extension V1.AppClipDefaultExperiences.ById.ReleaseWithAppStoreVersion { value: parameters.fields[.apps]?.map { "\($0)" }.joined(separator: ",")), URLQueryItem(name: "fields[builds]", value: parameters.fields[.builds]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "fields[gameCenterAppVersions]", + value: parameters.fields[.gameCenterAppVersions]?.map { "\($0)" }.joined(separator: ",")), URLQueryItem(name: "fields[routingAppCoverages]", value: parameters.fields[.routingAppCoverages]?.map { "\($0)" }.joined(separator: ",")), URLQueryItem(name: "include", @@ -70,8 +74,10 @@ extension V1.AppClipDefaultExperiences.ById.ReleaseWithAppStoreVersion { /// - Returns: **200**, Single AppStoreVersion as `AppStoreVersionResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -85,12 +91,18 @@ extension V1.AppClipDefaultExperiences.ById.ReleaseWithAppStoreVersion { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 404: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -115,650 +127,835 @@ extension V1.AppClipDefaultExperiences.ById.ReleaseWithAppStoreVersion.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum AgeRatingDeclarations: Hashable, Codable, RawRepresentable { - case alcoholTobaccoOrDrugUseOrReferences - case contests - case gambling - case gamblingAndContests - case gamblingSimulated - case horrorOrFearThemes - case kidsAgeBand - case matureOrSuggestiveThemes - case medicalOrTreatmentInformation - case profanityOrCrudeHumor - case seventeenPlus - case sexualContentGraphicAndNudity - case sexualContentOrNudity - case unrestrictedWebAccess - case violenceCartoonOrFantasy - case violenceRealistic - case violenceRealisticProlongedGraphicOrSadistic - case unknown(String) - - public var rawValue: String { - switch self { - case .alcoholTobaccoOrDrugUseOrReferences: return "alcoholTobaccoOrDrugUseOrReferences" - case .contests: return "contests" - case .gambling: return "gambling" - case .gamblingAndContests: return "gamblingAndContests" - case .gamblingSimulated: return "gamblingSimulated" - case .horrorOrFearThemes: return "horrorOrFearThemes" - case .kidsAgeBand: return "kidsAgeBand" - case .matureOrSuggestiveThemes: return "matureOrSuggestiveThemes" - case .medicalOrTreatmentInformation: return "medicalOrTreatmentInformation" - case .profanityOrCrudeHumor: return "profanityOrCrudeHumor" - case .seventeenPlus: return "seventeenPlus" - case .sexualContentGraphicAndNudity: return "sexualContentGraphicAndNudity" - case .sexualContentOrNudity: return "sexualContentOrNudity" - case .unrestrictedWebAccess: return "unrestrictedWebAccess" - case .violenceCartoonOrFantasy: return "violenceCartoonOrFantasy" - case .violenceRealistic: return "violenceRealistic" - case .violenceRealisticProlongedGraphicOrSadistic: return "violenceRealisticProlongedGraphicOrSadistic" - case .unknown(let rawValue): return rawValue - } + public struct AgeRatingDeclarations: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var alcoholTobaccoOrDrugUseOrReferences: Self { + .init(rawValue: "alcoholTobaccoOrDrugUseOrReferences") + } + + public static var contests: Self { + .init(rawValue: "contests") + } + + public static var gambling: Self { + .init(rawValue: "gambling") + } + + public static var gamblingSimulated: Self { + .init(rawValue: "gamblingSimulated") + } + + public static var horrorOrFearThemes: Self { + .init(rawValue: "horrorOrFearThemes") + } + + public static var kidsAgeBand: Self { + .init(rawValue: "kidsAgeBand") + } + + public static var koreaAgeRatingOverride: Self { + .init(rawValue: "koreaAgeRatingOverride") + } + + public static var lootBox: Self { + .init(rawValue: "lootBox") + } + + public static var matureOrSuggestiveThemes: Self { + .init(rawValue: "matureOrSuggestiveThemes") + } + + public static var medicalOrTreatmentInformation: Self { + .init(rawValue: "medicalOrTreatmentInformation") + } + + public static var profanityOrCrudeHumor: Self { + .init(rawValue: "profanityOrCrudeHumor") + } + + public static var sexualContentGraphicAndNudity: Self { + .init(rawValue: "sexualContentGraphicAndNudity") + } + + public static var sexualContentOrNudity: Self { + .init(rawValue: "sexualContentOrNudity") + } + + public static var unrestrictedWebAccess: Self { + .init(rawValue: "unrestrictedWebAccess") + } + + public static var violenceCartoonOrFantasy: Self { + .init(rawValue: "violenceCartoonOrFantasy") + } + + public static var violenceRealistic: Self { + .init(rawValue: "violenceRealistic") } + public static var violenceRealisticProlongedGraphicOrSadistic: Self { + .init(rawValue: "violenceRealisticProlongedGraphicOrSadistic") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "alcoholTobaccoOrDrugUseOrReferences": self = .alcoholTobaccoOrDrugUseOrReferences - case "contests": self = .contests - case "gambling": self = .gambling - case "gamblingAndContests": self = .gamblingAndContests - case "gamblingSimulated": self = .gamblingSimulated - case "horrorOrFearThemes": self = .horrorOrFearThemes - case "kidsAgeBand": self = .kidsAgeBand - case "matureOrSuggestiveThemes": self = .matureOrSuggestiveThemes - case "medicalOrTreatmentInformation": self = .medicalOrTreatmentInformation - case "profanityOrCrudeHumor": self = .profanityOrCrudeHumor - case "seventeenPlus": self = .seventeenPlus - case "sexualContentGraphicAndNudity": self = .sexualContentGraphicAndNudity - case "sexualContentOrNudity": self = .sexualContentOrNudity - case "unrestrictedWebAccess": self = .unrestrictedWebAccess - case "violenceCartoonOrFantasy": self = .violenceCartoonOrFantasy - case "violenceRealistic": self = .violenceRealistic - case "violenceRealisticProlongedGraphicOrSadistic": self = .violenceRealisticProlongedGraphicOrSadistic - default: self = .unknown(rawValue) - } - } - } - - public enum AppClipDefaultExperiences: Hashable, Codable, RawRepresentable { - case action - case appClip - case appClipAppStoreReviewDetail - case appClipDefaultExperienceLocalizations - case appClipDefaultExperienceTemplate - case releaseWithAppStoreVersion - case unknown(String) - - public var rawValue: String { - switch self { - case .action: return "action" - case .appClip: return "appClip" - case .appClipAppStoreReviewDetail: return "appClipAppStoreReviewDetail" - case .appClipDefaultExperienceLocalizations: return "appClipDefaultExperienceLocalizations" - case .appClipDefaultExperienceTemplate: return "appClipDefaultExperienceTemplate" - case .releaseWithAppStoreVersion: return "releaseWithAppStoreVersion" - case .unknown(let rawValue): return rawValue - } + self.rawValue = rawValue } + } + + public struct AlternativeDistributionPackages: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var versions: Self { + .init(rawValue: "versions") + } + + public var description: String { + rawValue + } + + public var rawValue: String public init(rawValue: String) { - switch rawValue { - case "action": self = .action - case "appClip": self = .appClip - case "appClipAppStoreReviewDetail": self = .appClipAppStoreReviewDetail - case "appClipDefaultExperienceLocalizations": self = .appClipDefaultExperienceLocalizations - case "appClipDefaultExperienceTemplate": self = .appClipDefaultExperienceTemplate - case "releaseWithAppStoreVersion": self = .releaseWithAppStoreVersion - default: self = .unknown(rawValue) - } - } - } - - public enum AppStoreReviewDetails: Hashable, Codable, RawRepresentable { - case appStoreReviewAttachments - case appStoreVersion - case contactEmail - case contactFirstName - case contactLastName - case contactPhone - case demoAccountName - case demoAccountPassword - case demoAccountRequired - case notes - case unknown(String) - - public var rawValue: String { - switch self { - case .appStoreReviewAttachments: return "appStoreReviewAttachments" - case .appStoreVersion: return "appStoreVersion" - case .contactEmail: return "contactEmail" - case .contactFirstName: return "contactFirstName" - case .contactLastName: return "contactLastName" - case .contactPhone: return "contactPhone" - case .demoAccountName: return "demoAccountName" - case .demoAccountPassword: return "demoAccountPassword" - case .demoAccountRequired: return "demoAccountRequired" - case .notes: return "notes" - case .unknown(let rawValue): return rawValue - } + self.rawValue = rawValue + } + } + + public struct AppClipDefaultExperiences: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var action: Self { + .init(rawValue: "action") + } + + public static var appClip: Self { + .init(rawValue: "appClip") + } + + public static var appClipAppStoreReviewDetail: Self { + .init(rawValue: "appClipAppStoreReviewDetail") + } + + public static var appClipDefaultExperienceLocalizations: Self { + .init(rawValue: "appClipDefaultExperienceLocalizations") } + public static var releaseWithAppStoreVersion: Self { + .init(rawValue: "releaseWithAppStoreVersion") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "appStoreReviewAttachments": self = .appStoreReviewAttachments - case "appStoreVersion": self = .appStoreVersion - case "contactEmail": self = .contactEmail - case "contactFirstName": self = .contactFirstName - case "contactLastName": self = .contactLastName - case "contactPhone": self = .contactPhone - case "demoAccountName": self = .demoAccountName - case "demoAccountPassword": self = .demoAccountPassword - case "demoAccountRequired": self = .demoAccountRequired - case "notes": self = .notes - default: self = .unknown(rawValue) - } - } - } - - public enum AppStoreVersionExperiments: Hashable, Codable, RawRepresentable { - case app - case appStoreVersion - case appStoreVersionExperimentTreatments - case controlVersions - case endDate - case latestControlVersion - case name - case platform - case reviewRequired - case startDate - case started - case state - case trafficProportion - case unknown(String) - - public var rawValue: String { - switch self { - case .app: return "app" - case .appStoreVersion: return "appStoreVersion" - case .appStoreVersionExperimentTreatments: return "appStoreVersionExperimentTreatments" - case .controlVersions: return "controlVersions" - case .endDate: return "endDate" - case .latestControlVersion: return "latestControlVersion" - case .name: return "name" - case .platform: return "platform" - case .reviewRequired: return "reviewRequired" - case .startDate: return "startDate" - case .started: return "started" - case .state: return "state" - case .trafficProportion: return "trafficProportion" - case .unknown(let rawValue): return rawValue - } + self.rawValue = rawValue + } + } + + public struct AppStoreReviewDetails: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var appStoreReviewAttachments: Self { + .init(rawValue: "appStoreReviewAttachments") + } + + public static var appStoreVersion: Self { + .init(rawValue: "appStoreVersion") + } + + public static var contactEmail: Self { + .init(rawValue: "contactEmail") + } + + public static var contactFirstName: Self { + .init(rawValue: "contactFirstName") } + public static var contactLastName: Self { + .init(rawValue: "contactLastName") + } + + public static var contactPhone: Self { + .init(rawValue: "contactPhone") + } + + public static var demoAccountName: Self { + .init(rawValue: "demoAccountName") + } + + public static var demoAccountPassword: Self { + .init(rawValue: "demoAccountPassword") + } + + public static var demoAccountRequired: Self { + .init(rawValue: "demoAccountRequired") + } + + public static var notes: Self { + .init(rawValue: "notes") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "app": self = .app - case "appStoreVersion": self = .appStoreVersion - case "appStoreVersionExperimentTreatments": self = .appStoreVersionExperimentTreatments - case "controlVersions": self = .controlVersions - case "endDate": self = .endDate - case "latestControlVersion": self = .latestControlVersion - case "name": self = .name - case "platform": self = .platform - case "reviewRequired": self = .reviewRequired - case "startDate": self = .startDate - case "started": self = .started - case "state": self = .state - case "trafficProportion": self = .trafficProportion - default: self = .unknown(rawValue) - } - } - } - - public enum AppStoreVersionLocalizations: Hashable, Codable, RawRepresentable { - case appPreviewSets - case appScreenshotSets - case appStoreVersion - case description - case keywords - case locale - case marketingUrl - case promotionalText - case supportUrl - case whatsNew - case unknown(String) - - public var rawValue: String { - switch self { - case .appPreviewSets: return "appPreviewSets" - case .appScreenshotSets: return "appScreenshotSets" - case .appStoreVersion: return "appStoreVersion" - case .description: return "description" - case .keywords: return "keywords" - case .locale: return "locale" - case .marketingUrl: return "marketingUrl" - case .promotionalText: return "promotionalText" - case .supportUrl: return "supportUrl" - case .whatsNew: return "whatsNew" - case .unknown(let rawValue): return rawValue - } + self.rawValue = rawValue + } + } + + public struct AppStoreVersionExperiments: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var app: Self { + .init(rawValue: "app") + } + + public static var appStoreVersion: Self { + .init(rawValue: "appStoreVersion") + } + + public static var appStoreVersionExperimentTreatments: Self { + .init(rawValue: "appStoreVersionExperimentTreatments") + } + + public static var controlVersions: Self { + .init(rawValue: "controlVersions") + } + + public static var endDate: Self { + .init(rawValue: "endDate") } + public static var latestControlVersion: Self { + .init(rawValue: "latestControlVersion") + } + + public static var name: Self { + .init(rawValue: "name") + } + + public static var platform: Self { + .init(rawValue: "platform") + } + + public static var reviewRequired: Self { + .init(rawValue: "reviewRequired") + } + + public static var startDate: Self { + .init(rawValue: "startDate") + } + + public static var state: Self { + .init(rawValue: "state") + } + + public static var trafficProportion: Self { + .init(rawValue: "trafficProportion") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "appPreviewSets": self = .appPreviewSets - case "appScreenshotSets": self = .appScreenshotSets - case "appStoreVersion": self = .appStoreVersion - case "description": self = .description - case "keywords": self = .keywords - case "locale": self = .locale - case "marketingUrl": self = .marketingUrl - case "promotionalText": self = .promotionalText - case "supportUrl": self = .supportUrl - case "whatsNew": self = .whatsNew - default: self = .unknown(rawValue) - } - } - } - - public enum AppStoreVersionPhasedReleases: Hashable, Codable, RawRepresentable { - case appStoreVersion - case currentDayNumber - case phasedReleaseState - case startDate - case totalPauseDuration - case unknown(String) - - public var rawValue: String { - switch self { - case .appStoreVersion: return "appStoreVersion" - case .currentDayNumber: return "currentDayNumber" - case .phasedReleaseState: return "phasedReleaseState" - case .startDate: return "startDate" - case .totalPauseDuration: return "totalPauseDuration" - case .unknown(let rawValue): return rawValue - } + self.rawValue = rawValue + } + } + + public struct AppStoreVersionLocalizations: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var appPreviewSets: Self { + .init(rawValue: "appPreviewSets") + } + + public static var appScreenshotSets: Self { + .init(rawValue: "appScreenshotSets") + } + + public static var appStoreVersion: Self { + .init(rawValue: "appStoreVersion") + } + + public static var description: Self { + .init(rawValue: "description") + } + + public static var keywords: Self { + .init(rawValue: "keywords") + } + + public static var locale: Self { + .init(rawValue: "locale") + } + + public static var marketingUrl: Self { + .init(rawValue: "marketingUrl") + } + + public static var promotionalText: Self { + .init(rawValue: "promotionalText") + } + + public static var supportUrl: Self { + .init(rawValue: "supportUrl") + } + + public static var whatsNew: Self { + .init(rawValue: "whatsNew") + } + + public var description: String { + rawValue } + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct AppStoreVersionPhasedReleases: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var currentDayNumber: Self { + .init(rawValue: "currentDayNumber") + } + + public static var phasedReleaseState: Self { + .init(rawValue: "phasedReleaseState") + } + + public static var startDate: Self { + .init(rawValue: "startDate") + } + + public static var totalPauseDuration: Self { + .init(rawValue: "totalPauseDuration") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "appStoreVersion": self = .appStoreVersion - case "currentDayNumber": self = .currentDayNumber - case "phasedReleaseState": self = .phasedReleaseState - case "startDate": self = .startDate - case "totalPauseDuration": self = .totalPauseDuration - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum AppStoreVersionSubmissions: Hashable, Codable, RawRepresentable { - case appStoreVersion - case unknown(String) + public struct AppStoreVersionSubmissions: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var appStoreVersion: Self { + .init(rawValue: "appStoreVersion") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct AppStoreVersions: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var ageRatingDeclaration: Self { + .init(rawValue: "ageRatingDeclaration") + } + + public static var alternativeDistributionPackage: Self { + .init(rawValue: "alternativeDistributionPackage") + } + + public static var app: Self { + .init(rawValue: "app") + } + + public static var appClipDefaultExperience: Self { + .init(rawValue: "appClipDefaultExperience") + } + + public static var appStoreReviewDetail: Self { + .init(rawValue: "appStoreReviewDetail") + } + + public static var appStoreState: Self { + .init(rawValue: "appStoreState") + } + + public static var appStoreVersionExperiments: Self { + .init(rawValue: "appStoreVersionExperiments") + } + + public static var appStoreVersionExperimentsV2: Self { + .init(rawValue: "appStoreVersionExperimentsV2") + } - public var rawValue: String { - switch self { - case .appStoreVersion: return "appStoreVersion" - case .unknown(let rawValue): return rawValue - } + public static var appStoreVersionLocalizations: Self { + .init(rawValue: "appStoreVersionLocalizations") } + public static var appStoreVersionPhasedRelease: Self { + .init(rawValue: "appStoreVersionPhasedRelease") + } + + public static var appStoreVersionSubmission: Self { + .init(rawValue: "appStoreVersionSubmission") + } + + public static var appVersionState: Self { + .init(rawValue: "appVersionState") + } + + public static var build: Self { + .init(rawValue: "build") + } + + public static var copyright: Self { + .init(rawValue: "copyright") + } + + public static var createdDate: Self { + .init(rawValue: "createdDate") + } + + public static var customerReviews: Self { + .init(rawValue: "customerReviews") + } + + public static var downloadable: Self { + .init(rawValue: "downloadable") + } + + public static var earliestReleaseDate: Self { + .init(rawValue: "earliestReleaseDate") + } + + public static var gameCenterAppVersion: Self { + .init(rawValue: "gameCenterAppVersion") + } + + public static var platform: Self { + .init(rawValue: "platform") + } + + public static var releaseType: Self { + .init(rawValue: "releaseType") + } + + public static var reviewType: Self { + .init(rawValue: "reviewType") + } + + public static var routingAppCoverage: Self { + .init(rawValue: "routingAppCoverage") + } + + public static var usesIdfa: Self { + .init(rawValue: "usesIdfa") + } + + public static var versionString: Self { + .init(rawValue: "versionString") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "appStoreVersion": self = .appStoreVersion - default: self = .unknown(rawValue) - } - } - } - - public enum AppStoreVersions: Hashable, Codable, RawRepresentable { - case ageRatingDeclaration - case app - case appClipDefaultExperience - case appStoreReviewDetail - case appStoreState - case appStoreVersionExperiments - case appStoreVersionExperimentsV2 - case appStoreVersionLocalizations - case appStoreVersionPhasedRelease - case appStoreVersionSubmission - case build - case copyright - case createdDate - case customerReviews - case downloadable - case earliestReleaseDate - case platform - case releaseType - case routingAppCoverage - case versionString - case unknown(String) - - public var rawValue: String { - switch self { - case .ageRatingDeclaration: return "ageRatingDeclaration" - case .app: return "app" - case .appClipDefaultExperience: return "appClipDefaultExperience" - case .appStoreReviewDetail: return "appStoreReviewDetail" - case .appStoreState: return "appStoreState" - case .appStoreVersionExperiments: return "appStoreVersionExperiments" - case .appStoreVersionExperimentsV2: return "appStoreVersionExperimentsV2" - case .appStoreVersionLocalizations: return "appStoreVersionLocalizations" - case .appStoreVersionPhasedRelease: return "appStoreVersionPhasedRelease" - case .appStoreVersionSubmission: return "appStoreVersionSubmission" - case .build: return "build" - case .copyright: return "copyright" - case .createdDate: return "createdDate" - case .customerReviews: return "customerReviews" - case .downloadable: return "downloadable" - case .earliestReleaseDate: return "earliestReleaseDate" - case .platform: return "platform" - case .releaseType: return "releaseType" - case .routingAppCoverage: return "routingAppCoverage" - case .versionString: return "versionString" - case .unknown(let rawValue): return rawValue - } + self.rawValue = rawValue + } + } + + public struct Apps: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var accessibilityDeclarations: Self { + .init(rawValue: "accessibilityDeclarations") + } + + public static var accessibilityUrl: Self { + .init(rawValue: "accessibilityUrl") + } + + public static var alternativeDistributionKey: Self { + .init(rawValue: "alternativeDistributionKey") + } + + public static var analyticsReportRequests: Self { + .init(rawValue: "analyticsReportRequests") + } + + public static var appAvailabilityV2: Self { + .init(rawValue: "appAvailabilityV2") + } + + public static var appClips: Self { + .init(rawValue: "appClips") + } + + public static var appCustomProductPages: Self { + .init(rawValue: "appCustomProductPages") + } + + public static var appEncryptionDeclarations: Self { + .init(rawValue: "appEncryptionDeclarations") + } + + public static var appEvents: Self { + .init(rawValue: "appEvents") + } + + public static var appInfos: Self { + .init(rawValue: "appInfos") + } + + public static var appPricePoints: Self { + .init(rawValue: "appPricePoints") + } + + public static var appPriceSchedule: Self { + .init(rawValue: "appPriceSchedule") + } + + public static var appStoreVersionExperimentsV2: Self { + .init(rawValue: "appStoreVersionExperimentsV2") + } + + public static var appStoreVersions: Self { + .init(rawValue: "appStoreVersions") + } + + public static var backgroundAssets: Self { + .init(rawValue: "backgroundAssets") } + public static var betaAppLocalizations: Self { + .init(rawValue: "betaAppLocalizations") + } + + public static var betaAppReviewDetail: Self { + .init(rawValue: "betaAppReviewDetail") + } + + public static var betaFeedbackCrashSubmissions: Self { + .init(rawValue: "betaFeedbackCrashSubmissions") + } + + public static var betaFeedbackScreenshotSubmissions: Self { + .init(rawValue: "betaFeedbackScreenshotSubmissions") + } + + public static var betaGroups: Self { + .init(rawValue: "betaGroups") + } + + public static var betaLicenseAgreement: Self { + .init(rawValue: "betaLicenseAgreement") + } + + public static var betaTesters: Self { + .init(rawValue: "betaTesters") + } + + public static var builds: Self { + .init(rawValue: "builds") + } + + public static var bundleId: Self { + .init(rawValue: "bundleId") + } + + public static var ciProduct: Self { + .init(rawValue: "ciProduct") + } + + public static var contentRightsDeclaration: Self { + .init(rawValue: "contentRightsDeclaration") + } + + public static var customerReviewSummarizations: Self { + .init(rawValue: "customerReviewSummarizations") + } + + public static var customerReviews: Self { + .init(rawValue: "customerReviews") + } + + public static var endUserLicenseAgreement: Self { + .init(rawValue: "endUserLicenseAgreement") + } + + public static var gameCenterDetail: Self { + .init(rawValue: "gameCenterDetail") + } + + public static var gameCenterEnabledVersions: Self { + .init(rawValue: "gameCenterEnabledVersions") + } + + public static var inAppPurchases: Self { + .init(rawValue: "inAppPurchases") + } + + public static var inAppPurchasesV2: Self { + .init(rawValue: "inAppPurchasesV2") + } + + public static var isOrEverWasMadeForKids: Self { + .init(rawValue: "isOrEverWasMadeForKids") + } + + public static var marketplaceSearchDetail: Self { + .init(rawValue: "marketplaceSearchDetail") + } + + public static var name: Self { + .init(rawValue: "name") + } + + public static var perfPowerMetrics: Self { + .init(rawValue: "perfPowerMetrics") + } + + public static var preReleaseVersions: Self { + .init(rawValue: "preReleaseVersions") + } + + public static var primaryLocale: Self { + .init(rawValue: "primaryLocale") + } + + public static var promotedPurchases: Self { + .init(rawValue: "promotedPurchases") + } + + public static var reviewSubmissions: Self { + .init(rawValue: "reviewSubmissions") + } + + public static var sku: Self { + .init(rawValue: "sku") + } + + public static var streamlinedPurchasingEnabled: Self { + .init(rawValue: "streamlinedPurchasingEnabled") + } + + public static var subscriptionGracePeriod: Self { + .init(rawValue: "subscriptionGracePeriod") + } + + public static var subscriptionGroups: Self { + .init(rawValue: "subscriptionGroups") + } + + public static var subscriptionStatusUrl: Self { + .init(rawValue: "subscriptionStatusUrl") + } + + public static var subscriptionStatusUrlForSandbox: Self { + .init(rawValue: "subscriptionStatusUrlForSandbox") + } + + public static var subscriptionStatusUrlVersion: Self { + .init(rawValue: "subscriptionStatusUrlVersion") + } + + public static var subscriptionStatusUrlVersionForSandbox: Self { + .init(rawValue: "subscriptionStatusUrlVersionForSandbox") + } + + public static var webhooks: Self { + .init(rawValue: "webhooks") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "ageRatingDeclaration": self = .ageRatingDeclaration - case "app": self = .app - case "appClipDefaultExperience": self = .appClipDefaultExperience - case "appStoreReviewDetail": self = .appStoreReviewDetail - case "appStoreState": self = .appStoreState - case "appStoreVersionExperiments": self = .appStoreVersionExperiments - case "appStoreVersionExperimentsV2": self = .appStoreVersionExperimentsV2 - case "appStoreVersionLocalizations": self = .appStoreVersionLocalizations - case "appStoreVersionPhasedRelease": self = .appStoreVersionPhasedRelease - case "appStoreVersionSubmission": self = .appStoreVersionSubmission - case "build": self = .build - case "copyright": self = .copyright - case "createdDate": self = .createdDate - case "customerReviews": self = .customerReviews - case "downloadable": self = .downloadable - case "earliestReleaseDate": self = .earliestReleaseDate - case "platform": self = .platform - case "releaseType": self = .releaseType - case "routingAppCoverage": self = .routingAppCoverage - case "versionString": self = .versionString - default: self = .unknown(rawValue) - } - } - } - - public enum Apps: Hashable, Codable, RawRepresentable { - case appAvailability - case appClips - case appCustomProductPages - case appEncryptionDeclarations - case appEvents - case appInfos - case appPricePoints - case appPriceSchedule - case appStoreVersionExperimentsV2 - case appStoreVersions - case availableInNewTerritories - case availableTerritories - case betaAppLocalizations - case betaAppReviewDetail - case betaGroups - case betaLicenseAgreement - case betaTesters - case builds - case bundleId - case ciProduct - case contentRightsDeclaration - case customerReviews - case endUserLicenseAgreement - case gameCenterDetail - case gameCenterEnabledVersions - case inAppPurchases - case inAppPurchasesV2 - case isOrEverWasMadeForKids - case name - case perfPowerMetrics - case preOrder - case preReleaseVersions - case pricePoints - case prices - case primaryLocale - case promotedPurchases - case reviewSubmissions - case sku - case subscriptionGracePeriod - case subscriptionGroups - case subscriptionStatusUrl - case subscriptionStatusUrlForSandbox - case subscriptionStatusUrlVersion - case subscriptionStatusUrlVersionForSandbox - case unknown(String) - - public var rawValue: String { - switch self { - case .appAvailability: return "appAvailability" - case .appClips: return "appClips" - case .appCustomProductPages: return "appCustomProductPages" - case .appEncryptionDeclarations: return "appEncryptionDeclarations" - case .appEvents: return "appEvents" - case .appInfos: return "appInfos" - case .appPricePoints: return "appPricePoints" - case .appPriceSchedule: return "appPriceSchedule" - case .appStoreVersionExperimentsV2: return "appStoreVersionExperimentsV2" - case .appStoreVersions: return "appStoreVersions" - case .availableInNewTerritories: return "availableInNewTerritories" - case .availableTerritories: return "availableTerritories" - case .betaAppLocalizations: return "betaAppLocalizations" - case .betaAppReviewDetail: return "betaAppReviewDetail" - case .betaGroups: return "betaGroups" - case .betaLicenseAgreement: return "betaLicenseAgreement" - case .betaTesters: return "betaTesters" - case .builds: return "builds" - case .bundleId: return "bundleId" - case .ciProduct: return "ciProduct" - case .contentRightsDeclaration: return "contentRightsDeclaration" - case .customerReviews: return "customerReviews" - case .endUserLicenseAgreement: return "endUserLicenseAgreement" - case .gameCenterDetail: return "gameCenterDetail" - case .gameCenterEnabledVersions: return "gameCenterEnabledVersions" - case .inAppPurchases: return "inAppPurchases" - case .inAppPurchasesV2: return "inAppPurchasesV2" - case .isOrEverWasMadeForKids: return "isOrEverWasMadeForKids" - case .name: return "name" - case .perfPowerMetrics: return "perfPowerMetrics" - case .preOrder: return "preOrder" - case .preReleaseVersions: return "preReleaseVersions" - case .pricePoints: return "pricePoints" - case .prices: return "prices" - case .primaryLocale: return "primaryLocale" - case .promotedPurchases: return "promotedPurchases" - case .reviewSubmissions: return "reviewSubmissions" - case .sku: return "sku" - case .subscriptionGracePeriod: return "subscriptionGracePeriod" - case .subscriptionGroups: return "subscriptionGroups" - case .subscriptionStatusUrl: return "subscriptionStatusUrl" - case .subscriptionStatusUrlForSandbox: return "subscriptionStatusUrlForSandbox" - case .subscriptionStatusUrlVersion: return "subscriptionStatusUrlVersion" - case .subscriptionStatusUrlVersionForSandbox: return "subscriptionStatusUrlVersionForSandbox" - case .unknown(let rawValue): return rawValue - } + self.rawValue = rawValue + } + } + + public struct Builds: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var app: Self { + .init(rawValue: "app") + } + + public static var appEncryptionDeclaration: Self { + .init(rawValue: "appEncryptionDeclaration") + } + + public static var appStoreVersion: Self { + .init(rawValue: "appStoreVersion") } + public static var betaAppReviewSubmission: Self { + .init(rawValue: "betaAppReviewSubmission") + } + + public static var betaBuildLocalizations: Self { + .init(rawValue: "betaBuildLocalizations") + } + + public static var betaGroups: Self { + .init(rawValue: "betaGroups") + } + + public static var buildAudienceType: Self { + .init(rawValue: "buildAudienceType") + } + + public static var buildBetaDetail: Self { + .init(rawValue: "buildBetaDetail") + } + + public static var buildBundles: Self { + .init(rawValue: "buildBundles") + } + + public static var computedMinMacOsVersion: Self { + .init(rawValue: "computedMinMacOsVersion") + } + + public static var computedMinVisionOsVersion: Self { + .init(rawValue: "computedMinVisionOsVersion") + } + + public static var diagnosticSignatures: Self { + .init(rawValue: "diagnosticSignatures") + } + + public static var expirationDate: Self { + .init(rawValue: "expirationDate") + } + + public static var expired: Self { + .init(rawValue: "expired") + } + + public static var iconAssetToken: Self { + .init(rawValue: "iconAssetToken") + } + + public static var icons: Self { + .init(rawValue: "icons") + } + + public static var individualTesters: Self { + .init(rawValue: "individualTesters") + } + + public static var lsMinimumSystemVersion: Self { + .init(rawValue: "lsMinimumSystemVersion") + } + + public static var minOsVersion: Self { + .init(rawValue: "minOsVersion") + } + + public static var perfPowerMetrics: Self { + .init(rawValue: "perfPowerMetrics") + } + + public static var preReleaseVersion: Self { + .init(rawValue: "preReleaseVersion") + } + + public static var processingState: Self { + .init(rawValue: "processingState") + } + + public static var uploadedDate: Self { + .init(rawValue: "uploadedDate") + } + + public static var usesNonExemptEncryption: Self { + .init(rawValue: "usesNonExemptEncryption") + } + + public static var version: Self { + .init(rawValue: "version") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "appAvailability": self = .appAvailability - case "appClips": self = .appClips - case "appCustomProductPages": self = .appCustomProductPages - case "appEncryptionDeclarations": self = .appEncryptionDeclarations - case "appEvents": self = .appEvents - case "appInfos": self = .appInfos - case "appPricePoints": self = .appPricePoints - case "appPriceSchedule": self = .appPriceSchedule - case "appStoreVersionExperimentsV2": self = .appStoreVersionExperimentsV2 - case "appStoreVersions": self = .appStoreVersions - case "availableInNewTerritories": self = .availableInNewTerritories - case "availableTerritories": self = .availableTerritories - case "betaAppLocalizations": self = .betaAppLocalizations - case "betaAppReviewDetail": self = .betaAppReviewDetail - case "betaGroups": self = .betaGroups - case "betaLicenseAgreement": self = .betaLicenseAgreement - case "betaTesters": self = .betaTesters - case "builds": self = .builds - case "bundleId": self = .bundleId - case "ciProduct": self = .ciProduct - case "contentRightsDeclaration": self = .contentRightsDeclaration - case "customerReviews": self = .customerReviews - case "endUserLicenseAgreement": self = .endUserLicenseAgreement - case "gameCenterDetail": self = .gameCenterDetail - case "gameCenterEnabledVersions": self = .gameCenterEnabledVersions - case "inAppPurchases": self = .inAppPurchases - case "inAppPurchasesV2": self = .inAppPurchasesV2 - case "isOrEverWasMadeForKids": self = .isOrEverWasMadeForKids - case "name": self = .name - case "perfPowerMetrics": self = .perfPowerMetrics - case "preOrder": self = .preOrder - case "preReleaseVersions": self = .preReleaseVersions - case "pricePoints": self = .pricePoints - case "prices": self = .prices - case "primaryLocale": self = .primaryLocale - case "promotedPurchases": self = .promotedPurchases - case "reviewSubmissions": self = .reviewSubmissions - case "sku": self = .sku - case "subscriptionGracePeriod": self = .subscriptionGracePeriod - case "subscriptionGroups": self = .subscriptionGroups - case "subscriptionStatusUrl": self = .subscriptionStatusUrl - case "subscriptionStatusUrlForSandbox": self = .subscriptionStatusUrlForSandbox - case "subscriptionStatusUrlVersion": self = .subscriptionStatusUrlVersion - case "subscriptionStatusUrlVersionForSandbox": self = .subscriptionStatusUrlVersionForSandbox - default: self = .unknown(rawValue) - } - } - } - - public enum Builds: Hashable, Codable, RawRepresentable { - case app - case appEncryptionDeclaration - case appStoreVersion - case betaAppReviewSubmission - case betaBuildLocalizations - case betaGroups - case buildAudienceType - case buildBetaDetail - case buildBundles - case computedMinMacOsVersion - case diagnosticSignatures - case expirationDate - case expired - case iconAssetToken - case icons - case individualTesters - case lsMinimumSystemVersion - case minOsVersion - case perfPowerMetrics - case preReleaseVersion - case processingState - case uploadedDate - case usesNonExemptEncryption - case version - case unknown(String) - - public var rawValue: String { - switch self { - case .app: return "app" - case .appEncryptionDeclaration: return "appEncryptionDeclaration" - case .appStoreVersion: return "appStoreVersion" - case .betaAppReviewSubmission: return "betaAppReviewSubmission" - case .betaBuildLocalizations: return "betaBuildLocalizations" - case .betaGroups: return "betaGroups" - case .buildAudienceType: return "buildAudienceType" - case .buildBetaDetail: return "buildBetaDetail" - case .buildBundles: return "buildBundles" - case .computedMinMacOsVersion: return "computedMinMacOsVersion" - case .diagnosticSignatures: return "diagnosticSignatures" - case .expirationDate: return "expirationDate" - case .expired: return "expired" - case .iconAssetToken: return "iconAssetToken" - case .icons: return "icons" - case .individualTesters: return "individualTesters" - case .lsMinimumSystemVersion: return "lsMinimumSystemVersion" - case .minOsVersion: return "minOsVersion" - case .perfPowerMetrics: return "perfPowerMetrics" - case .preReleaseVersion: return "preReleaseVersion" - case .processingState: return "processingState" - case .uploadedDate: return "uploadedDate" - case .usesNonExemptEncryption: return "usesNonExemptEncryption" - case .version: return "version" - case .unknown(let rawValue): return rawValue - } + self.rawValue = rawValue + } + } + + public struct GameCenterAppVersions: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var appStoreVersion: Self { + .init(rawValue: "appStoreVersion") + } + + public static var compatibilityVersions: Self { + .init(rawValue: "compatibilityVersions") + } + + public static var enabled: Self { + .init(rawValue: "enabled") + } + + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "app": self = .app - case "appEncryptionDeclaration": self = .appEncryptionDeclaration - case "appStoreVersion": self = .appStoreVersion - case "betaAppReviewSubmission": self = .betaAppReviewSubmission - case "betaBuildLocalizations": self = .betaBuildLocalizations - case "betaGroups": self = .betaGroups - case "buildAudienceType": self = .buildAudienceType - case "buildBetaDetail": self = .buildBetaDetail - case "buildBundles": self = .buildBundles - case "computedMinMacOsVersion": self = .computedMinMacOsVersion - case "diagnosticSignatures": self = .diagnosticSignatures - case "expirationDate": self = .expirationDate - case "expired": self = .expired - case "iconAssetToken": self = .iconAssetToken - case "icons": self = .icons - case "individualTesters": self = .individualTesters - case "lsMinimumSystemVersion": self = .lsMinimumSystemVersion - case "minOsVersion": self = .minOsVersion - case "perfPowerMetrics": self = .perfPowerMetrics - case "preReleaseVersion": self = .preReleaseVersion - case "processingState": self = .processingState - case "uploadedDate": self = .uploadedDate - case "usesNonExemptEncryption": self = .usesNonExemptEncryption - case "version": self = .version - default: self = .unknown(rawValue) - } - } - } - - public enum RoutingAppCoverages: Hashable, Codable, RawRepresentable { - case appStoreVersion - case assetDeliveryState - case fileName - case fileSize - case sourceFileChecksum - case uploadOperations - case uploaded - case unknown(String) - - public var rawValue: String { - switch self { - case .appStoreVersion: return "appStoreVersion" - case .assetDeliveryState: return "assetDeliveryState" - case .fileName: return "fileName" - case .fileSize: return "fileSize" - case .sourceFileChecksum: return "sourceFileChecksum" - case .uploadOperations: return "uploadOperations" - case .uploaded: return "uploaded" - case .unknown(let rawValue): return rawValue - } + self.rawValue = rawValue + } + } + + public struct RoutingAppCoverages: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var appStoreVersion: Self { + .init(rawValue: "appStoreVersion") } + public static var assetDeliveryState: Self { + .init(rawValue: "assetDeliveryState") + } + + public static var fileName: Self { + .init(rawValue: "fileName") + } + + public static var fileSize: Self { + .init(rawValue: "fileSize") + } + + public static var sourceFileChecksum: Self { + .init(rawValue: "sourceFileChecksum") + } + + public static var uploadOperations: Self { + .init(rawValue: "uploadOperations") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "appStoreVersion": self = .appStoreVersion - case "assetDeliveryState": self = .assetDeliveryState - case "fileName": self = .fileName - case "fileSize": self = .fileSize - case "sourceFileChecksum": self = .sourceFileChecksum - case "uploadOperations": self = .uploadOperations - case "uploaded": self = .uploaded - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } @@ -768,6 +965,11 @@ extension V1.AppClipDefaultExperiences.ById.ReleaseWithAppStoreVersion.GET { .init(key: "fields[ageRatingDeclarations]") } + /// the fields to include for returned resources of type alternativeDistributionPackages + public static var alternativeDistributionPackages: Relation<[AlternativeDistributionPackages]?> { + .init(key: "fields[alternativeDistributionPackages]") + } + /// the fields to include for returned resources of type appClipDefaultExperiences public static var appClipDefaultExperiences: Relation<[AppClipDefaultExperiences]?> { .init(key: "fields[appClipDefaultExperiences]") @@ -813,6 +1015,11 @@ extension V1.AppClipDefaultExperiences.ById.ReleaseWithAppStoreVersion.GET { .init(key: "fields[builds]") } + /// the fields to include for returned resources of type gameCenterAppVersions + public static var gameCenterAppVersions: Relation<[GameCenterAppVersions]?> { + .init(key: "fields[gameCenterAppVersions]") + } + /// the fields to include for returned resources of type routingAppCoverages public static var routingAppCoverages: Relation<[RoutingAppCoverages]?> { .init(key: "fields[routingAppCoverages]") @@ -826,52 +1033,67 @@ extension V1.AppClipDefaultExperiences.ById.ReleaseWithAppStoreVersion.GET { } } - public enum Include: Hashable, Codable, RawRepresentable { - case ageRatingDeclaration - case app - case appClipDefaultExperience - case appStoreReviewDetail - case appStoreVersionExperiments - case appStoreVersionExperimentsV2 - case appStoreVersionLocalizations - case appStoreVersionPhasedRelease - case appStoreVersionSubmission - case build - case routingAppCoverage - case unknown(String) - - public var rawValue: String { - switch self { - case .ageRatingDeclaration: return "ageRatingDeclaration" - case .app: return "app" - case .appClipDefaultExperience: return "appClipDefaultExperience" - case .appStoreReviewDetail: return "appStoreReviewDetail" - case .appStoreVersionExperiments: return "appStoreVersionExperiments" - case .appStoreVersionExperimentsV2: return "appStoreVersionExperimentsV2" - case .appStoreVersionLocalizations: return "appStoreVersionLocalizations" - case .appStoreVersionPhasedRelease: return "appStoreVersionPhasedRelease" - case .appStoreVersionSubmission: return "appStoreVersionSubmission" - case .build: return "build" - case .routingAppCoverage: return "routingAppCoverage" - case .unknown(let rawValue): return rawValue - } + public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var ageRatingDeclaration: Self { + .init(rawValue: "ageRatingDeclaration") + } + + public static var alternativeDistributionPackage: Self { + .init(rawValue: "alternativeDistributionPackage") } + public static var app: Self { + .init(rawValue: "app") + } + + public static var appClipDefaultExperience: Self { + .init(rawValue: "appClipDefaultExperience") + } + + public static var appStoreReviewDetail: Self { + .init(rawValue: "appStoreReviewDetail") + } + + public static var appStoreVersionExperiments: Self { + .init(rawValue: "appStoreVersionExperiments") + } + + public static var appStoreVersionExperimentsV2: Self { + .init(rawValue: "appStoreVersionExperimentsV2") + } + + public static var appStoreVersionLocalizations: Self { + .init(rawValue: "appStoreVersionLocalizations") + } + + public static var appStoreVersionPhasedRelease: Self { + .init(rawValue: "appStoreVersionPhasedRelease") + } + + public static var appStoreVersionSubmission: Self { + .init(rawValue: "appStoreVersionSubmission") + } + + public static var build: Self { + .init(rawValue: "build") + } + + public static var gameCenterAppVersion: Self { + .init(rawValue: "gameCenterAppVersion") + } + + public static var routingAppCoverage: Self { + .init(rawValue: "routingAppCoverage") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "ageRatingDeclaration": self = .ageRatingDeclaration - case "app": self = .app - case "appClipDefaultExperience": self = .appClipDefaultExperience - case "appStoreReviewDetail": self = .appStoreReviewDetail - case "appStoreVersionExperiments": self = .appStoreVersionExperiments - case "appStoreVersionExperimentsV2": self = .appStoreVersionExperimentsV2 - case "appStoreVersionLocalizations": self = .appStoreVersionLocalizations - case "appStoreVersionPhasedRelease": self = .appStoreVersionPhasedRelease - case "appStoreVersionSubmission": self = .appStoreVersionSubmission - case "build": self = .build - case "routingAppCoverage": self = .routingAppCoverage - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppClipHeaderImages/AppClipHeaderImages.POST.11898e8.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppClipHeaderImages/AppClipHeaderImages.POST.11898e8.generated.swift index 72a56552..e5f688ed 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppClipHeaderImages/AppClipHeaderImages.POST.11898e8.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppClipHeaderImages/AppClipHeaderImages.POST.11898e8.generated.swift @@ -41,8 +41,11 @@ extension V1.AppClipHeaderImages { /// - Returns: **201**, Single AppClipHeaderImage as `AppClipHeaderImageResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **422**, Unprocessable request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -56,12 +59,21 @@ extension V1.AppClipHeaderImages { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 409: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 422: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppClipHeaderImages/ById/AppClipHeaderImagesById.DELETE.324a2cc.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppClipHeaderImages/ById/AppClipHeaderImagesById.DELETE.324a2cc.generated.swift index bce538a5..c6d970ec 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppClipHeaderImages/ById/AppClipHeaderImagesById.DELETE.324a2cc.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppClipHeaderImages/ById/AppClipHeaderImagesById.DELETE.324a2cc.generated.swift @@ -31,11 +31,12 @@ extension V1.AppClipHeaderImages.ById { return urlRequest } - /// - Returns: **204**, Success (no content) /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -43,12 +44,12 @@ extension V1.AppClipHeaderImages.ById { } switch urlResponse.statusCode { - case 204: - return - case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) @@ -58,6 +59,9 @@ extension V1.AppClipHeaderImages.ById { case 409: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppClipHeaderImages/ById/AppClipHeaderImagesById.GET.324a2cc.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppClipHeaderImages/ById/AppClipHeaderImagesById.GET.324a2cc.generated.swift index 338261bd..f53412b1 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppClipHeaderImages/ById/AppClipHeaderImagesById.GET.324a2cc.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppClipHeaderImages/ById/AppClipHeaderImagesById.GET.324a2cc.generated.swift @@ -44,8 +44,10 @@ extension V1.AppClipHeaderImages.ById { /// - Returns: **200**, Single AppClipHeaderImage as `AppClipHeaderImageResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -59,12 +61,18 @@ extension V1.AppClipHeaderImages.ById { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 404: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -87,43 +95,43 @@ extension V1.AppClipHeaderImages.ById.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum AppClipHeaderImages: Hashable, Codable, RawRepresentable { - case appClipDefaultExperienceLocalization - case assetDeliveryState - case fileName - case fileSize - case imageAsset - case sourceFileChecksum - case uploadOperations - case uploaded - case unknown(String) - - public var rawValue: String { - switch self { - case .appClipDefaultExperienceLocalization: return "appClipDefaultExperienceLocalization" - case .assetDeliveryState: return "assetDeliveryState" - case .fileName: return "fileName" - case .fileSize: return "fileSize" - case .imageAsset: return "imageAsset" - case .sourceFileChecksum: return "sourceFileChecksum" - case .uploadOperations: return "uploadOperations" - case .uploaded: return "uploaded" - case .unknown(let rawValue): return rawValue - } + public struct AppClipHeaderImages: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var appClipDefaultExperienceLocalization: Self { + .init(rawValue: "appClipDefaultExperienceLocalization") + } + + public static var assetDeliveryState: Self { + .init(rawValue: "assetDeliveryState") + } + + public static var fileName: Self { + .init(rawValue: "fileName") + } + + public static var fileSize: Self { + .init(rawValue: "fileSize") + } + + public static var imageAsset: Self { + .init(rawValue: "imageAsset") } + public static var sourceFileChecksum: Self { + .init(rawValue: "sourceFileChecksum") + } + + public static var uploadOperations: Self { + .init(rawValue: "uploadOperations") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "appClipDefaultExperienceLocalization": self = .appClipDefaultExperienceLocalization - case "assetDeliveryState": self = .assetDeliveryState - case "fileName": self = .fileName - case "fileSize": self = .fileSize - case "imageAsset": self = .imageAsset - case "sourceFileChecksum": self = .sourceFileChecksum - case "uploadOperations": self = .uploadOperations - case "uploaded": self = .uploaded - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } @@ -141,22 +149,19 @@ extension V1.AppClipHeaderImages.ById.GET { } } - public enum Include: Hashable, Codable, RawRepresentable { - case appClipDefaultExperienceLocalization - case unknown(String) + public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var appClipDefaultExperienceLocalization: Self { + .init(rawValue: "appClipDefaultExperienceLocalization") + } - public var rawValue: String { - switch self { - case .appClipDefaultExperienceLocalization: return "appClipDefaultExperienceLocalization" - case .unknown(let rawValue): return rawValue - } + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "appClipDefaultExperienceLocalization": self = .appClipDefaultExperienceLocalization - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppClipHeaderImages/ById/AppClipHeaderImagesById.PATCH.324a2cc.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppClipHeaderImages/ById/AppClipHeaderImagesById.PATCH.324a2cc.generated.swift index c061d36f..f555de15 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppClipHeaderImages/ById/AppClipHeaderImagesById.PATCH.324a2cc.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppClipHeaderImages/ById/AppClipHeaderImagesById.PATCH.324a2cc.generated.swift @@ -48,9 +48,12 @@ extension V1.AppClipHeaderImages.ById { /// - Returns: **200**, Single AppClipHeaderImage as `AppClipHeaderImageResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **422**, Unprocessable request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -64,6 +67,9 @@ extension V1.AppClipHeaderImages.ById { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) @@ -73,6 +79,12 @@ extension V1.AppClipHeaderImages.ById { case 409: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 422: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppClips/ById/AppClipAdvancedExperiences/AppClipsByIdAppClipAdvancedExperiences.GET.828ed30.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppClips/ById/AppClipAdvancedExperiences/AppClipsByIdAppClipAdvancedExperiences.GET.828ed30.generated.swift index c023d0bb..58a73d78 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppClips/ById/AppClipAdvancedExperiences/AppClipsByIdAppClipAdvancedExperiences.GET.828ed30.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppClips/ById/AppClipAdvancedExperiences/AppClipsByIdAppClipAdvancedExperiences.GET.828ed30.generated.swift @@ -60,8 +60,10 @@ extension V1.AppClips.ById.AppClipAdvancedExperiences { /// - Returns: **200**, List of AppClipAdvancedExperiences as `AppClipAdvancedExperiencesResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -75,12 +77,18 @@ extension V1.AppClips.ById.AppClipAdvancedExperiences { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 404: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -108,148 +116,151 @@ extension V1.AppClips.ById.AppClipAdvancedExperiences.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum AppClipAdvancedExperienceImages: Hashable, Codable, RawRepresentable { - case assetDeliveryState - case fileName - case fileSize - case imageAsset - case sourceFileChecksum - case uploadOperations - case uploaded - case unknown(String) - - public var rawValue: String { - switch self { - case .assetDeliveryState: return "assetDeliveryState" - case .fileName: return "fileName" - case .fileSize: return "fileSize" - case .imageAsset: return "imageAsset" - case .sourceFileChecksum: return "sourceFileChecksum" - case .uploadOperations: return "uploadOperations" - case .uploaded: return "uploaded" - case .unknown(let rawValue): return rawValue - } + public struct AppClipAdvancedExperienceImages: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var assetDeliveryState: Self { + .init(rawValue: "assetDeliveryState") + } + + public static var fileName: Self { + .init(rawValue: "fileName") } + public static var fileSize: Self { + .init(rawValue: "fileSize") + } + + public static var imageAsset: Self { + .init(rawValue: "imageAsset") + } + + public static var sourceFileChecksum: Self { + .init(rawValue: "sourceFileChecksum") + } + + public static var uploadOperations: Self { + .init(rawValue: "uploadOperations") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "assetDeliveryState": self = .assetDeliveryState - case "fileName": self = .fileName - case "fileSize": self = .fileSize - case "imageAsset": self = .imageAsset - case "sourceFileChecksum": self = .sourceFileChecksum - case "uploadOperations": self = .uploadOperations - case "uploaded": self = .uploaded - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum AppClipAdvancedExperienceLocalizations: Hashable, Codable, RawRepresentable { - case language - case subtitle - case title - case unknown(String) + public struct AppClipAdvancedExperienceLocalizations: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var language: Self { + .init(rawValue: "language") + } - public var rawValue: String { - switch self { - case .language: return "language" - case .subtitle: return "subtitle" - case .title: return "title" - case .unknown(let rawValue): return rawValue - } + public static var subtitle: Self { + .init(rawValue: "subtitle") } + public static var title: Self { + .init(rawValue: "title") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "language": self = .language - case "subtitle": self = .subtitle - case "title": self = .title - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum AppClipAdvancedExperiences: Hashable, Codable, RawRepresentable { - case action - case appClip - case businessCategory - case defaultLanguage - case headerImage - case isPoweredBy - case link - case localizations - case place - case placeStatus - case removed - case status - case version - case unknown(String) - - public var rawValue: String { - switch self { - case .action: return "action" - case .appClip: return "appClip" - case .businessCategory: return "businessCategory" - case .defaultLanguage: return "defaultLanguage" - case .headerImage: return "headerImage" - case .isPoweredBy: return "isPoweredBy" - case .link: return "link" - case .localizations: return "localizations" - case .place: return "place" - case .placeStatus: return "placeStatus" - case .removed: return "removed" - case .status: return "status" - case .version: return "version" - case .unknown(let rawValue): return rawValue - } + public struct AppClipAdvancedExperiences: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var action: Self { + .init(rawValue: "action") + } + + public static var appClip: Self { + .init(rawValue: "appClip") + } + + public static var businessCategory: Self { + .init(rawValue: "businessCategory") + } + + public static var defaultLanguage: Self { + .init(rawValue: "defaultLanguage") + } + + public static var headerImage: Self { + .init(rawValue: "headerImage") + } + + public static var isPoweredBy: Self { + .init(rawValue: "isPoweredBy") + } + + public static var link: Self { + .init(rawValue: "link") + } + + public static var localizations: Self { + .init(rawValue: "localizations") + } + + public static var place: Self { + .init(rawValue: "place") + } + + public static var placeStatus: Self { + .init(rawValue: "placeStatus") } + public static var status: Self { + .init(rawValue: "status") + } + + public static var version: Self { + .init(rawValue: "version") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "action": self = .action - case "appClip": self = .appClip - case "businessCategory": self = .businessCategory - case "defaultLanguage": self = .defaultLanguage - case "headerImage": self = .headerImage - case "isPoweredBy": self = .isPoweredBy - case "link": self = .link - case "localizations": self = .localizations - case "place": self = .place - case "placeStatus": self = .placeStatus - case "removed": self = .removed - case "status": self = .status - case "version": self = .version - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum AppClips: Hashable, Codable, RawRepresentable { - case app - case appClipAdvancedExperiences - case appClipDefaultExperiences - case bundleId - case unknown(String) + public struct AppClips: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var app: Self { + .init(rawValue: "app") + } - public var rawValue: String { - switch self { - case .app: return "app" - case .appClipAdvancedExperiences: return "appClipAdvancedExperiences" - case .appClipDefaultExperiences: return "appClipDefaultExperiences" - case .bundleId: return "bundleId" - case .unknown(let rawValue): return rawValue - } + public static var appClipAdvancedExperiences: Self { + .init(rawValue: "appClipAdvancedExperiences") } + public static var appClipDefaultExperiences: Self { + .init(rawValue: "appClipDefaultExperiences") + } + + public static var bundleId: Self { + .init(rawValue: "bundleId") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "app": self = .app - case "appClipAdvancedExperiences": self = .appClipAdvancedExperiences - case "appClipDefaultExperiences": self = .appClipDefaultExperiences - case "bundleId": self = .bundleId - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } @@ -290,78 +301,75 @@ extension V1.AppClips.ById.AppClipAdvancedExperiences.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum Action: Hashable, Codable, RawRepresentable { - case open - case play - case view - case unknown(String) + public struct Action: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var open: Self { + .init(rawValue: "OPEN") + } + + public static var play: Self { + .init(rawValue: "PLAY") + } - public var rawValue: String { - switch self { - case .open: return "OPEN" - case .play: return "PLAY" - case .view: return "VIEW" - case .unknown(let rawValue): return rawValue - } + public static var view: Self { + .init(rawValue: "VIEW") } + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "OPEN": self = .open - case "PLAY": self = .play - case "VIEW": self = .view - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum PlaceStatus: Hashable, Codable, RawRepresentable { - case matched - case noMatch - case pending - case unknown(String) + public struct PlaceStatus: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var matched: Self { + .init(rawValue: "MATCHED") + } + + public static var noMatch: Self { + .init(rawValue: "NO_MATCH") + } + + public static var pending: Self { + .init(rawValue: "PENDING") + } - public var rawValue: String { - switch self { - case .matched: return "MATCHED" - case .noMatch: return "NO_MATCH" - case .pending: return "PENDING" - case .unknown(let rawValue): return rawValue - } + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "MATCHED": self = .matched - case "NO_MATCH": self = .noMatch - case "PENDING": self = .pending - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum Status: Hashable, Codable, RawRepresentable { - case appTransferInProgress - case deactivated - case received - case unknown(String) + public struct Status: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var appTransferInProgress: Self { + .init(rawValue: "APP_TRANSFER_IN_PROGRESS") + } + + public static var deactivated: Self { + .init(rawValue: "DEACTIVATED") + } + + public static var received: Self { + .init(rawValue: "RECEIVED") + } - public var rawValue: String { - switch self { - case .appTransferInProgress: return "APP_TRANSFER_IN_PROGRESS" - case .deactivated: return "DEACTIVATED" - case .received: return "RECEIVED" - case .unknown(let rawValue): return rawValue - } + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "APP_TRANSFER_IN_PROGRESS": self = .appTransferInProgress - case "DEACTIVATED": self = .deactivated - case "RECEIVED": self = .received - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } @@ -389,28 +397,27 @@ extension V1.AppClips.ById.AppClipAdvancedExperiences.GET { } } - public enum Include: Hashable, Codable, RawRepresentable { - case appClip - case headerImage - case localizations - case unknown(String) + public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var appClip: Self { + .init(rawValue: "appClip") + } - public var rawValue: String { - switch self { - case .appClip: return "appClip" - case .headerImage: return "headerImage" - case .localizations: return "localizations" - case .unknown(let rawValue): return rawValue - } + public static var headerImage: Self { + .init(rawValue: "headerImage") + } + + public static var localizations: Self { + .init(rawValue: "localizations") + } + + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "appClip": self = .appClip - case "headerImage": self = .headerImage - case "localizations": self = .localizations - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppClips/ById/AppClipDefaultExperiences/AppClipsByIdAppClipDefaultExperiences.GET.19800d5.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppClips/ById/AppClipDefaultExperiences/AppClipsByIdAppClipDefaultExperiences.GET.19800d5.generated.swift index 06fc1642..a4145a20 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppClips/ById/AppClipDefaultExperiences/AppClipsByIdAppClipDefaultExperiences.GET.19800d5.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppClips/ById/AppClipDefaultExperiences/AppClipsByIdAppClipDefaultExperiences.GET.19800d5.generated.swift @@ -58,8 +58,10 @@ extension V1.AppClips.ById.AppClipDefaultExperiences { /// - Returns: **200**, List of AppClipDefaultExperiences as `AppClipDefaultExperiencesResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -73,12 +75,18 @@ extension V1.AppClips.ById.AppClipDefaultExperiences { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 404: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -128,191 +136,223 @@ extension V1.AppClips.ById.AppClipDefaultExperiences.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum AppClipAppStoreReviewDetails: Hashable, Codable, RawRepresentable { - case appClipDefaultExperience - case invocationUrls - case unknown(String) + public struct AppClipAppStoreReviewDetails: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var appClipDefaultExperience: Self { + .init(rawValue: "appClipDefaultExperience") + } + + public static var invocationUrls: Self { + .init(rawValue: "invocationUrls") + } - public var rawValue: String { - switch self { - case .appClipDefaultExperience: return "appClipDefaultExperience" - case .invocationUrls: return "invocationUrls" - case .unknown(let rawValue): return rawValue - } + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "appClipDefaultExperience": self = .appClipDefaultExperience - case "invocationUrls": self = .invocationUrls - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum AppClipDefaultExperienceLocalizations: Hashable, Codable, RawRepresentable { - case appClipDefaultExperience - case appClipHeaderImage - case locale - case subtitle - case unknown(String) + public struct AppClipDefaultExperienceLocalizations: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var appClipDefaultExperience: Self { + .init(rawValue: "appClipDefaultExperience") + } + + public static var appClipHeaderImage: Self { + .init(rawValue: "appClipHeaderImage") + } + + public static var locale: Self { + .init(rawValue: "locale") + } - public var rawValue: String { - switch self { - case .appClipDefaultExperience: return "appClipDefaultExperience" - case .appClipHeaderImage: return "appClipHeaderImage" - case .locale: return "locale" - case .subtitle: return "subtitle" - case .unknown(let rawValue): return rawValue - } + public static var subtitle: Self { + .init(rawValue: "subtitle") } + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "appClipDefaultExperience": self = .appClipDefaultExperience - case "appClipHeaderImage": self = .appClipHeaderImage - case "locale": self = .locale - case "subtitle": self = .subtitle - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum AppClipDefaultExperiences: Hashable, Codable, RawRepresentable { - case action - case appClip - case appClipAppStoreReviewDetail - case appClipDefaultExperienceLocalizations - case appClipDefaultExperienceTemplate - case releaseWithAppStoreVersion - case unknown(String) - - public var rawValue: String { - switch self { - case .action: return "action" - case .appClip: return "appClip" - case .appClipAppStoreReviewDetail: return "appClipAppStoreReviewDetail" - case .appClipDefaultExperienceLocalizations: return "appClipDefaultExperienceLocalizations" - case .appClipDefaultExperienceTemplate: return "appClipDefaultExperienceTemplate" - case .releaseWithAppStoreVersion: return "releaseWithAppStoreVersion" - case .unknown(let rawValue): return rawValue - } + public struct AppClipDefaultExperiences: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var action: Self { + .init(rawValue: "action") + } + + public static var appClip: Self { + .init(rawValue: "appClip") + } + + public static var appClipAppStoreReviewDetail: Self { + .init(rawValue: "appClipAppStoreReviewDetail") + } + + public static var appClipDefaultExperienceLocalizations: Self { + .init(rawValue: "appClipDefaultExperienceLocalizations") } + public static var releaseWithAppStoreVersion: Self { + .init(rawValue: "releaseWithAppStoreVersion") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "action": self = .action - case "appClip": self = .appClip - case "appClipAppStoreReviewDetail": self = .appClipAppStoreReviewDetail - case "appClipDefaultExperienceLocalizations": self = .appClipDefaultExperienceLocalizations - case "appClipDefaultExperienceTemplate": self = .appClipDefaultExperienceTemplate - case "releaseWithAppStoreVersion": self = .releaseWithAppStoreVersion - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum AppClips: Hashable, Codable, RawRepresentable { - case app - case appClipAdvancedExperiences - case appClipDefaultExperiences - case bundleId - case unknown(String) + public struct AppClips: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var app: Self { + .init(rawValue: "app") + } + + public static var appClipAdvancedExperiences: Self { + .init(rawValue: "appClipAdvancedExperiences") + } + + public static var appClipDefaultExperiences: Self { + .init(rawValue: "appClipDefaultExperiences") + } + + public static var bundleId: Self { + .init(rawValue: "bundleId") + } - public var rawValue: String { - switch self { - case .app: return "app" - case .appClipAdvancedExperiences: return "appClipAdvancedExperiences" - case .appClipDefaultExperiences: return "appClipDefaultExperiences" - case .bundleId: return "bundleId" - case .unknown(let rawValue): return rawValue - } + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "app": self = .app - case "appClipAdvancedExperiences": self = .appClipAdvancedExperiences - case "appClipDefaultExperiences": self = .appClipDefaultExperiences - case "bundleId": self = .bundleId - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum AppStoreVersions: Hashable, Codable, RawRepresentable { - case ageRatingDeclaration - case app - case appClipDefaultExperience - case appStoreReviewDetail - case appStoreState - case appStoreVersionExperiments - case appStoreVersionExperimentsV2 - case appStoreVersionLocalizations - case appStoreVersionPhasedRelease - case appStoreVersionSubmission - case build - case copyright - case createdDate - case customerReviews - case downloadable - case earliestReleaseDate - case platform - case releaseType - case routingAppCoverage - case versionString - case unknown(String) - - public var rawValue: String { - switch self { - case .ageRatingDeclaration: return "ageRatingDeclaration" - case .app: return "app" - case .appClipDefaultExperience: return "appClipDefaultExperience" - case .appStoreReviewDetail: return "appStoreReviewDetail" - case .appStoreState: return "appStoreState" - case .appStoreVersionExperiments: return "appStoreVersionExperiments" - case .appStoreVersionExperimentsV2: return "appStoreVersionExperimentsV2" - case .appStoreVersionLocalizations: return "appStoreVersionLocalizations" - case .appStoreVersionPhasedRelease: return "appStoreVersionPhasedRelease" - case .appStoreVersionSubmission: return "appStoreVersionSubmission" - case .build: return "build" - case .copyright: return "copyright" - case .createdDate: return "createdDate" - case .customerReviews: return "customerReviews" - case .downloadable: return "downloadable" - case .earliestReleaseDate: return "earliestReleaseDate" - case .platform: return "platform" - case .releaseType: return "releaseType" - case .routingAppCoverage: return "routingAppCoverage" - case .versionString: return "versionString" - case .unknown(let rawValue): return rawValue - } + public struct AppStoreVersions: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var ageRatingDeclaration: Self { + .init(rawValue: "ageRatingDeclaration") + } + + public static var alternativeDistributionPackage: Self { + .init(rawValue: "alternativeDistributionPackage") + } + + public static var app: Self { + .init(rawValue: "app") + } + + public static var appClipDefaultExperience: Self { + .init(rawValue: "appClipDefaultExperience") + } + + public static var appStoreReviewDetail: Self { + .init(rawValue: "appStoreReviewDetail") + } + + public static var appStoreState: Self { + .init(rawValue: "appStoreState") + } + + public static var appStoreVersionExperiments: Self { + .init(rawValue: "appStoreVersionExperiments") + } + + public static var appStoreVersionExperimentsV2: Self { + .init(rawValue: "appStoreVersionExperimentsV2") } + public static var appStoreVersionLocalizations: Self { + .init(rawValue: "appStoreVersionLocalizations") + } + + public static var appStoreVersionPhasedRelease: Self { + .init(rawValue: "appStoreVersionPhasedRelease") + } + + public static var appStoreVersionSubmission: Self { + .init(rawValue: "appStoreVersionSubmission") + } + + public static var appVersionState: Self { + .init(rawValue: "appVersionState") + } + + public static var build: Self { + .init(rawValue: "build") + } + + public static var copyright: Self { + .init(rawValue: "copyright") + } + + public static var createdDate: Self { + .init(rawValue: "createdDate") + } + + public static var customerReviews: Self { + .init(rawValue: "customerReviews") + } + + public static var downloadable: Self { + .init(rawValue: "downloadable") + } + + public static var earliestReleaseDate: Self { + .init(rawValue: "earliestReleaseDate") + } + + public static var gameCenterAppVersion: Self { + .init(rawValue: "gameCenterAppVersion") + } + + public static var platform: Self { + .init(rawValue: "platform") + } + + public static var releaseType: Self { + .init(rawValue: "releaseType") + } + + public static var reviewType: Self { + .init(rawValue: "reviewType") + } + + public static var routingAppCoverage: Self { + .init(rawValue: "routingAppCoverage") + } + + public static var usesIdfa: Self { + .init(rawValue: "usesIdfa") + } + + public static var versionString: Self { + .init(rawValue: "versionString") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "ageRatingDeclaration": self = .ageRatingDeclaration - case "app": self = .app - case "appClipDefaultExperience": self = .appClipDefaultExperience - case "appStoreReviewDetail": self = .appStoreReviewDetail - case "appStoreState": self = .appStoreState - case "appStoreVersionExperiments": self = .appStoreVersionExperiments - case "appStoreVersionExperimentsV2": self = .appStoreVersionExperimentsV2 - case "appStoreVersionLocalizations": self = .appStoreVersionLocalizations - case "appStoreVersionPhasedRelease": self = .appStoreVersionPhasedRelease - case "appStoreVersionSubmission": self = .appStoreVersionSubmission - case "build": self = .build - case "copyright": self = .copyright - case "createdDate": self = .createdDate - case "customerReviews": self = .customerReviews - case "downloadable": self = .downloadable - case "earliestReleaseDate": self = .earliestReleaseDate - case "platform": self = .platform - case "releaseType": self = .releaseType - case "routingAppCoverage": self = .routingAppCoverage - case "versionString": self = .versionString - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } @@ -350,31 +390,31 @@ extension V1.AppClips.ById.AppClipDefaultExperiences.GET { } } - public enum Include: Hashable, Codable, RawRepresentable { - case appClip - case appClipAppStoreReviewDetail - case appClipDefaultExperienceLocalizations - case releaseWithAppStoreVersion - case unknown(String) - - public var rawValue: String { - switch self { - case .appClip: return "appClip" - case .appClipAppStoreReviewDetail: return "appClipAppStoreReviewDetail" - case .appClipDefaultExperienceLocalizations: return "appClipDefaultExperienceLocalizations" - case .releaseWithAppStoreVersion: return "releaseWithAppStoreVersion" - case .unknown(let rawValue): return rawValue - } + public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var appClip: Self { + .init(rawValue: "appClip") + } + + public static var appClipAppStoreReviewDetail: Self { + .init(rawValue: "appClipAppStoreReviewDetail") + } + + public static var appClipDefaultExperienceLocalizations: Self { + .init(rawValue: "appClipDefaultExperienceLocalizations") } + public static var releaseWithAppStoreVersion: Self { + .init(rawValue: "releaseWithAppStoreVersion") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "appClip": self = .appClip - case "appClipAppStoreReviewDetail": self = .appClipAppStoreReviewDetail - case "appClipDefaultExperienceLocalizations": self = .appClipDefaultExperienceLocalizations - case "releaseWithAppStoreVersion": self = .releaseWithAppStoreVersion - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppClips/ById/AppClipsById.GET.b5637d8.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppClips/ById/AppClipsById.GET.b5637d8.generated.swift index d79bd599..8f69a72b 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppClips/ById/AppClipsById.GET.b5637d8.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppClips/ById/AppClipsById.GET.b5637d8.generated.swift @@ -28,8 +28,6 @@ extension V1.AppClips.ById { components?.path = path components?.queryItems = [ - URLQueryItem(name: "fields[appClipAdvancedExperiences]", - value: parameters.fields[.appClipAdvancedExperiences]?.map { "\($0)" }.joined(separator: ",")), URLQueryItem(name: "fields[appClipDefaultExperiences]", value: parameters.fields[.appClipDefaultExperiences]?.map { "\($0)" }.joined(separator: ",")), URLQueryItem(name: "fields[appClips]", @@ -50,8 +48,10 @@ extension V1.AppClips.ById { /// - Returns: **200**, Single AppClip as `AppClipResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -65,12 +65,18 @@ extension V1.AppClips.ById { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 404: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -95,129 +101,67 @@ extension V1.AppClips.ById.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum AppClipAdvancedExperiences: Hashable, Codable, RawRepresentable { - case action - case appClip - case businessCategory - case defaultLanguage - case headerImage - case isPoweredBy - case link - case localizations - case place - case placeStatus - case removed - case status - case version - case unknown(String) - - public var rawValue: String { - switch self { - case .action: return "action" - case .appClip: return "appClip" - case .businessCategory: return "businessCategory" - case .defaultLanguage: return "defaultLanguage" - case .headerImage: return "headerImage" - case .isPoweredBy: return "isPoweredBy" - case .link: return "link" - case .localizations: return "localizations" - case .place: return "place" - case .placeStatus: return "placeStatus" - case .removed: return "removed" - case .status: return "status" - case .version: return "version" - case .unknown(let rawValue): return rawValue - } + public struct AppClipDefaultExperiences: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var action: Self { + .init(rawValue: "action") } - public init(rawValue: String) { - switch rawValue { - case "action": self = .action - case "appClip": self = .appClip - case "businessCategory": self = .businessCategory - case "defaultLanguage": self = .defaultLanguage - case "headerImage": self = .headerImage - case "isPoweredBy": self = .isPoweredBy - case "link": self = .link - case "localizations": self = .localizations - case "place": self = .place - case "placeStatus": self = .placeStatus - case "removed": self = .removed - case "status": self = .status - case "version": self = .version - default: self = .unknown(rawValue) - } + public static var appClip: Self { + .init(rawValue: "appClip") + } + + public static var appClipAppStoreReviewDetail: Self { + .init(rawValue: "appClipAppStoreReviewDetail") } - } - public enum AppClipDefaultExperiences: Hashable, Codable, RawRepresentable { - case action - case appClip - case appClipAppStoreReviewDetail - case appClipDefaultExperienceLocalizations - case appClipDefaultExperienceTemplate - case releaseWithAppStoreVersion - case unknown(String) - - public var rawValue: String { - switch self { - case .action: return "action" - case .appClip: return "appClip" - case .appClipAppStoreReviewDetail: return "appClipAppStoreReviewDetail" - case .appClipDefaultExperienceLocalizations: return "appClipDefaultExperienceLocalizations" - case .appClipDefaultExperienceTemplate: return "appClipDefaultExperienceTemplate" - case .releaseWithAppStoreVersion: return "releaseWithAppStoreVersion" - case .unknown(let rawValue): return rawValue - } + public static var appClipDefaultExperienceLocalizations: Self { + .init(rawValue: "appClipDefaultExperienceLocalizations") } + public static var releaseWithAppStoreVersion: Self { + .init(rawValue: "releaseWithAppStoreVersion") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "action": self = .action - case "appClip": self = .appClip - case "appClipAppStoreReviewDetail": self = .appClipAppStoreReviewDetail - case "appClipDefaultExperienceLocalizations": self = .appClipDefaultExperienceLocalizations - case "appClipDefaultExperienceTemplate": self = .appClipDefaultExperienceTemplate - case "releaseWithAppStoreVersion": self = .releaseWithAppStoreVersion - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum AppClips: Hashable, Codable, RawRepresentable { - case app - case appClipAdvancedExperiences - case appClipDefaultExperiences - case bundleId - case unknown(String) - - public var rawValue: String { - switch self { - case .app: return "app" - case .appClipAdvancedExperiences: return "appClipAdvancedExperiences" - case .appClipDefaultExperiences: return "appClipDefaultExperiences" - case .bundleId: return "bundleId" - case .unknown(let rawValue): return rawValue - } + public struct AppClips: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var app: Self { + .init(rawValue: "app") + } + + public static var appClipAdvancedExperiences: Self { + .init(rawValue: "appClipAdvancedExperiences") } + public static var appClipDefaultExperiences: Self { + .init(rawValue: "appClipDefaultExperiences") + } + + public static var bundleId: Self { + .init(rawValue: "bundleId") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "app": self = .app - case "appClipAdvancedExperiences": self = .appClipAdvancedExperiences - case "appClipDefaultExperiences": self = .appClipDefaultExperiences - case "bundleId": self = .bundleId - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } public struct Relation: Hashable { - /// the fields to include for returned resources of type appClipAdvancedExperiences - public static var appClipAdvancedExperiences: Relation<[AppClipAdvancedExperiences]?> { - .init(key: "fields[appClipAdvancedExperiences]") - } - /// the fields to include for returned resources of type appClipDefaultExperiences public static var appClipDefaultExperiences: Relation<[AppClipDefaultExperiences]?> { .init(key: "fields[appClipDefaultExperiences]") @@ -236,25 +180,23 @@ extension V1.AppClips.ById.GET { } } - public enum Include: Hashable, Codable, RawRepresentable { - case app - case appClipDefaultExperiences - case unknown(String) + public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var app: Self { + .init(rawValue: "app") + } - public var rawValue: String { - switch self { - case .app: return "app" - case .appClipDefaultExperiences: return "appClipDefaultExperiences" - case .unknown(let rawValue): return rawValue - } + public static var appClipDefaultExperiences: Self { + .init(rawValue: "appClipDefaultExperiences") } + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "app": self = .app - case "appClipDefaultExperiences": self = .appClipDefaultExperiences - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppClips/ById/Relationships/AppClipAdvancedExperiences/AppClipsByIdRelationshipsAppClipAdvancedExperiences.GET.c2d4b34.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppClips/ById/Relationships/AppClipAdvancedExperiences/AppClipsByIdRelationshipsAppClipAdvancedExperiences.GET.c2d4b34.generated.swift new file mode 100644 index 00000000..b0381a1b --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppClips/ById/Relationships/AppClipAdvancedExperiences/AppClipsByIdRelationshipsAppClipAdvancedExperiences.GET.c2d4b34.generated.swift @@ -0,0 +1,88 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.AppClips.ById.Relationships.AppClipAdvancedExperiences { + public struct GET: Endpoint { + public typealias Response = AppClipAppClipAdvancedExperiencesLinkagesResponse + + public var path: String { + "/v1/appClips/\(id)/relationships/appClipAdvancedExperiences" + } + + /// the id of the requested resource + public var id: String + + public var parameters: Parameters = Parameters() + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + components?.queryItems = [ + URLQueryItem(name: "limit", + value: parameters.limit.map { "\($0)" }) + ].filter { $0.value != nil } + if components?.queryItems?.isEmpty ?? false { + components?.queryItems = nil + } + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "GET" + return urlRequest + } + + /// - Returns: **200**, List of related linkages as `AppClipAppClipAdvancedExperiencesLinkagesResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(AppClipAppClipAdvancedExperiencesLinkagesResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +extension V1.AppClips.ById.Relationships.AppClipAdvancedExperiences.GET { + public struct Parameters: Hashable { + /// maximum resources per page + public var limit: Int? + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppClips/ById/Relationships/AppClipDefaultExperiences/AppClipsByIdRelationshipsAppClipDefaultExperiences.GET.03b45ad.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppClips/ById/Relationships/AppClipDefaultExperiences/AppClipsByIdRelationshipsAppClipDefaultExperiences.GET.03b45ad.generated.swift new file mode 100644 index 00000000..6d637a73 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppClips/ById/Relationships/AppClipDefaultExperiences/AppClipsByIdRelationshipsAppClipDefaultExperiences.GET.03b45ad.generated.swift @@ -0,0 +1,88 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.AppClips.ById.Relationships.AppClipDefaultExperiences { + public struct GET: Endpoint { + public typealias Response = AppClipAppClipDefaultExperiencesLinkagesResponse + + public var path: String { + "/v1/appClips/\(id)/relationships/appClipDefaultExperiences" + } + + /// the id of the requested resource + public var id: String + + public var parameters: Parameters = Parameters() + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + components?.queryItems = [ + URLQueryItem(name: "limit", + value: parameters.limit.map { "\($0)" }) + ].filter { $0.value != nil } + if components?.queryItems?.isEmpty ?? false { + components?.queryItems = nil + } + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "GET" + return urlRequest + } + + /// - Returns: **200**, List of related linkages as `AppClipAppClipDefaultExperiencesLinkagesResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(AppClipAppClipDefaultExperiencesLinkagesResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +extension V1.AppClips.ById.Relationships.AppClipDefaultExperiences.GET { + public struct Parameters: Hashable { + /// maximum resources per page + public var limit: Int? + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppCustomProductPageLocalizations/AppCustomProductPageLocalizations.POST.5483ae2.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppCustomProductPageLocalizations/AppCustomProductPageLocalizations.POST.5483ae2.generated.swift index db243db6..3dc7a08f 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppCustomProductPageLocalizations/AppCustomProductPageLocalizations.POST.5483ae2.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppCustomProductPageLocalizations/AppCustomProductPageLocalizations.POST.5483ae2.generated.swift @@ -41,8 +41,11 @@ extension V1.AppCustomProductPageLocalizations { /// - Returns: **201**, Single AppCustomProductPageLocalization as `AppCustomProductPageLocalizationResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **422**, Unprocessable request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -56,12 +59,21 @@ extension V1.AppCustomProductPageLocalizations { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 409: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 422: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppCustomProductPageLocalizations/ById/AppCustomProductPageLocalizationsById.DELETE.8c524c6.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppCustomProductPageLocalizations/ById/AppCustomProductPageLocalizationsById.DELETE.8c524c6.generated.swift index d32be5a4..12b19e65 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppCustomProductPageLocalizations/ById/AppCustomProductPageLocalizationsById.DELETE.8c524c6.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppCustomProductPageLocalizations/ById/AppCustomProductPageLocalizationsById.DELETE.8c524c6.generated.swift @@ -31,11 +31,12 @@ extension V1.AppCustomProductPageLocalizations.ById { return urlRequest } - /// - Returns: **204**, Success (no content) /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -43,12 +44,12 @@ extension V1.AppCustomProductPageLocalizations.ById { } switch urlResponse.statusCode { - case 204: - return - case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) @@ -58,6 +59,9 @@ extension V1.AppCustomProductPageLocalizations.ById { case 409: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppCustomProductPageLocalizations/ById/AppCustomProductPageLocalizationsById.GET.8c524c6.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppCustomProductPageLocalizations/ById/AppCustomProductPageLocalizationsById.GET.8c524c6.generated.swift index ebbf0f0c..3ad2f3cb 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppCustomProductPageLocalizations/ById/AppCustomProductPageLocalizationsById.GET.8c524c6.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppCustomProductPageLocalizations/ById/AppCustomProductPageLocalizationsById.GET.8c524c6.generated.swift @@ -52,8 +52,10 @@ extension V1.AppCustomProductPageLocalizations.ById { /// - Returns: **200**, Single AppCustomProductPageLocalization as `AppCustomProductPageLocalizationResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -67,12 +69,18 @@ extension V1.AppCustomProductPageLocalizations.ById { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 404: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -97,96 +105,99 @@ extension V1.AppCustomProductPageLocalizations.ById.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum AppCustomProductPageLocalizations: Hashable, Codable, RawRepresentable { - case appCustomProductPageVersion - case appPreviewSets - case appScreenshotSets - case locale - case promotionalText - case unknown(String) - - public var rawValue: String { - switch self { - case .appCustomProductPageVersion: return "appCustomProductPageVersion" - case .appPreviewSets: return "appPreviewSets" - case .appScreenshotSets: return "appScreenshotSets" - case .locale: return "locale" - case .promotionalText: return "promotionalText" - case .unknown(let rawValue): return rawValue - } + public struct AppCustomProductPageLocalizations: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var appCustomProductPageVersion: Self { + .init(rawValue: "appCustomProductPageVersion") + } + + public static var appPreviewSets: Self { + .init(rawValue: "appPreviewSets") + } + + public static var appScreenshotSets: Self { + .init(rawValue: "appScreenshotSets") + } + + public static var locale: Self { + .init(rawValue: "locale") + } + + public static var promotionalText: Self { + .init(rawValue: "promotionalText") } + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "appCustomProductPageVersion": self = .appCustomProductPageVersion - case "appPreviewSets": self = .appPreviewSets - case "appScreenshotSets": self = .appScreenshotSets - case "locale": self = .locale - case "promotionalText": self = .promotionalText - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum AppPreviewSets: Hashable, Codable, RawRepresentable { - case appCustomProductPageLocalization - case appPreviews - case appStoreVersionExperimentTreatmentLocalization - case appStoreVersionLocalization - case previewType - case unknown(String) - - public var rawValue: String { - switch self { - case .appCustomProductPageLocalization: return "appCustomProductPageLocalization" - case .appPreviews: return "appPreviews" - case .appStoreVersionExperimentTreatmentLocalization: return "appStoreVersionExperimentTreatmentLocalization" - case .appStoreVersionLocalization: return "appStoreVersionLocalization" - case .previewType: return "previewType" - case .unknown(let rawValue): return rawValue - } + public struct AppPreviewSets: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var appCustomProductPageLocalization: Self { + .init(rawValue: "appCustomProductPageLocalization") + } + + public static var appPreviews: Self { + .init(rawValue: "appPreviews") + } + + public static var appStoreVersionExperimentTreatmentLocalization: Self { + .init(rawValue: "appStoreVersionExperimentTreatmentLocalization") + } + + public static var appStoreVersionLocalization: Self { + .init(rawValue: "appStoreVersionLocalization") + } + + public static var previewType: Self { + .init(rawValue: "previewType") } + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "appCustomProductPageLocalization": self = .appCustomProductPageLocalization - case "appPreviews": self = .appPreviews - case "appStoreVersionExperimentTreatmentLocalization": self = .appStoreVersionExperimentTreatmentLocalization - case "appStoreVersionLocalization": self = .appStoreVersionLocalization - case "previewType": self = .previewType - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum AppScreenshotSets: Hashable, Codable, RawRepresentable { - case appCustomProductPageLocalization - case appScreenshots - case appStoreVersionExperimentTreatmentLocalization - case appStoreVersionLocalization - case screenshotDisplayType - case unknown(String) - - public var rawValue: String { - switch self { - case .appCustomProductPageLocalization: return "appCustomProductPageLocalization" - case .appScreenshots: return "appScreenshots" - case .appStoreVersionExperimentTreatmentLocalization: return "appStoreVersionExperimentTreatmentLocalization" - case .appStoreVersionLocalization: return "appStoreVersionLocalization" - case .screenshotDisplayType: return "screenshotDisplayType" - case .unknown(let rawValue): return rawValue - } + public struct AppScreenshotSets: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var appCustomProductPageLocalization: Self { + .init(rawValue: "appCustomProductPageLocalization") + } + + public static var appScreenshots: Self { + .init(rawValue: "appScreenshots") + } + + public static var appStoreVersionExperimentTreatmentLocalization: Self { + .init(rawValue: "appStoreVersionExperimentTreatmentLocalization") + } + + public static var appStoreVersionLocalization: Self { + .init(rawValue: "appStoreVersionLocalization") } + public static var screenshotDisplayType: Self { + .init(rawValue: "screenshotDisplayType") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "appCustomProductPageLocalization": self = .appCustomProductPageLocalization - case "appScreenshots": self = .appScreenshots - case "appStoreVersionExperimentTreatmentLocalization": self = .appStoreVersionExperimentTreatmentLocalization - case "appStoreVersionLocalization": self = .appStoreVersionLocalization - case "screenshotDisplayType": self = .screenshotDisplayType - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } @@ -214,28 +225,27 @@ extension V1.AppCustomProductPageLocalizations.ById.GET { } } - public enum Include: Hashable, Codable, RawRepresentable { - case appCustomProductPageVersion - case appPreviewSets - case appScreenshotSets - case unknown(String) - - public var rawValue: String { - switch self { - case .appCustomProductPageVersion: return "appCustomProductPageVersion" - case .appPreviewSets: return "appPreviewSets" - case .appScreenshotSets: return "appScreenshotSets" - case .unknown(let rawValue): return rawValue - } + public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var appCustomProductPageVersion: Self { + .init(rawValue: "appCustomProductPageVersion") } + public static var appPreviewSets: Self { + .init(rawValue: "appPreviewSets") + } + + public static var appScreenshotSets: Self { + .init(rawValue: "appScreenshotSets") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "appCustomProductPageVersion": self = .appCustomProductPageVersion - case "appPreviewSets": self = .appPreviewSets - case "appScreenshotSets": self = .appScreenshotSets - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppCustomProductPageLocalizations/ById/AppCustomProductPageLocalizationsById.PATCH.8c524c6.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppCustomProductPageLocalizations/ById/AppCustomProductPageLocalizationsById.PATCH.8c524c6.generated.swift index b97e4810..6f9ab5ab 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppCustomProductPageLocalizations/ById/AppCustomProductPageLocalizationsById.PATCH.8c524c6.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppCustomProductPageLocalizations/ById/AppCustomProductPageLocalizationsById.PATCH.8c524c6.generated.swift @@ -48,9 +48,12 @@ extension V1.AppCustomProductPageLocalizations.ById { /// - Returns: **200**, Single AppCustomProductPageLocalization as `AppCustomProductPageLocalizationResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **422**, Unprocessable request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -64,6 +67,9 @@ extension V1.AppCustomProductPageLocalizations.ById { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) @@ -73,6 +79,12 @@ extension V1.AppCustomProductPageLocalizations.ById { case 409: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 422: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppCustomProductPageLocalizations/ById/AppPreviewSets/AppCustomProductPageLocalizationsByIdAppPreviewSets.GET.8d6d7bd.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppCustomProductPageLocalizations/ById/AppPreviewSets/AppCustomProductPageLocalizationsByIdAppPreviewSets.GET.8d6d7bd.generated.swift index 1ee12e64..b0a53ba8 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppCustomProductPageLocalizations/ById/AppPreviewSets/AppCustomProductPageLocalizationsByIdAppPreviewSets.GET.8d6d7bd.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppCustomProductPageLocalizations/ById/AppPreviewSets/AppCustomProductPageLocalizationsByIdAppPreviewSets.GET.8d6d7bd.generated.swift @@ -62,8 +62,10 @@ extension V1.AppCustomProductPageLocalizations.ById.AppPreviewSets { /// - Returns: **200**, List of AppPreviewSets as `AppPreviewSetsResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -77,12 +79,18 @@ extension V1.AppCustomProductPageLocalizations.ById.AppPreviewSets { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 404: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -110,188 +118,207 @@ extension V1.AppCustomProductPageLocalizations.ById.AppPreviewSets.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum AppCustomProductPageLocalizations: Hashable, Codable, RawRepresentable { - case appCustomProductPageVersion - case appPreviewSets - case appScreenshotSets - case locale - case promotionalText - case unknown(String) - - public var rawValue: String { - switch self { - case .appCustomProductPageVersion: return "appCustomProductPageVersion" - case .appPreviewSets: return "appPreviewSets" - case .appScreenshotSets: return "appScreenshotSets" - case .locale: return "locale" - case .promotionalText: return "promotionalText" - case .unknown(let rawValue): return rawValue - } + public struct AppCustomProductPageLocalizations: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var appCustomProductPageVersion: Self { + .init(rawValue: "appCustomProductPageVersion") + } + + public static var appPreviewSets: Self { + .init(rawValue: "appPreviewSets") + } + + public static var appScreenshotSets: Self { + .init(rawValue: "appScreenshotSets") } + public static var locale: Self { + .init(rawValue: "locale") + } + + public static var promotionalText: Self { + .init(rawValue: "promotionalText") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "appCustomProductPageVersion": self = .appCustomProductPageVersion - case "appPreviewSets": self = .appPreviewSets - case "appScreenshotSets": self = .appScreenshotSets - case "locale": self = .locale - case "promotionalText": self = .promotionalText - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum AppPreviewSets: Hashable, Codable, RawRepresentable { - case appCustomProductPageLocalization - case appPreviews - case appStoreVersionExperimentTreatmentLocalization - case appStoreVersionLocalization - case previewType - case unknown(String) - - public var rawValue: String { - switch self { - case .appCustomProductPageLocalization: return "appCustomProductPageLocalization" - case .appPreviews: return "appPreviews" - case .appStoreVersionExperimentTreatmentLocalization: return "appStoreVersionExperimentTreatmentLocalization" - case .appStoreVersionLocalization: return "appStoreVersionLocalization" - case .previewType: return "previewType" - case .unknown(let rawValue): return rawValue - } + public struct AppPreviewSets: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var appCustomProductPageLocalization: Self { + .init(rawValue: "appCustomProductPageLocalization") } + public static var appPreviews: Self { + .init(rawValue: "appPreviews") + } + + public static var appStoreVersionExperimentTreatmentLocalization: Self { + .init(rawValue: "appStoreVersionExperimentTreatmentLocalization") + } + + public static var appStoreVersionLocalization: Self { + .init(rawValue: "appStoreVersionLocalization") + } + + public static var previewType: Self { + .init(rawValue: "previewType") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "appCustomProductPageLocalization": self = .appCustomProductPageLocalization - case "appPreviews": self = .appPreviews - case "appStoreVersionExperimentTreatmentLocalization": self = .appStoreVersionExperimentTreatmentLocalization - case "appStoreVersionLocalization": self = .appStoreVersionLocalization - case "previewType": self = .previewType - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum AppPreviews: Hashable, Codable, RawRepresentable { - case appPreviewSet - case assetDeliveryState - case fileName - case fileSize - case mimeType - case previewFrameTimeCode - case previewImage - case sourceFileChecksum - case uploadOperations - case uploaded - case videoUrl - case unknown(String) - - public var rawValue: String { - switch self { - case .appPreviewSet: return "appPreviewSet" - case .assetDeliveryState: return "assetDeliveryState" - case .fileName: return "fileName" - case .fileSize: return "fileSize" - case .mimeType: return "mimeType" - case .previewFrameTimeCode: return "previewFrameTimeCode" - case .previewImage: return "previewImage" - case .sourceFileChecksum: return "sourceFileChecksum" - case .uploadOperations: return "uploadOperations" - case .uploaded: return "uploaded" - case .videoUrl: return "videoUrl" - case .unknown(let rawValue): return rawValue - } + public struct AppPreviews: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var appPreviewSet: Self { + .init(rawValue: "appPreviewSet") + } + + public static var assetDeliveryState: Self { + .init(rawValue: "assetDeliveryState") + } + + public static var fileName: Self { + .init(rawValue: "fileName") + } + + public static var fileSize: Self { + .init(rawValue: "fileSize") + } + + public static var mimeType: Self { + .init(rawValue: "mimeType") + } + + public static var previewFrameImage: Self { + .init(rawValue: "previewFrameImage") + } + + public static var previewFrameTimeCode: Self { + .init(rawValue: "previewFrameTimeCode") + } + + public static var previewImage: Self { + .init(rawValue: "previewImage") + } + + public static var sourceFileChecksum: Self { + .init(rawValue: "sourceFileChecksum") + } + + public static var uploadOperations: Self { + .init(rawValue: "uploadOperations") + } + + public static var videoDeliveryState: Self { + .init(rawValue: "videoDeliveryState") } + public static var videoUrl: Self { + .init(rawValue: "videoUrl") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "appPreviewSet": self = .appPreviewSet - case "assetDeliveryState": self = .assetDeliveryState - case "fileName": self = .fileName - case "fileSize": self = .fileSize - case "mimeType": self = .mimeType - case "previewFrameTimeCode": self = .previewFrameTimeCode - case "previewImage": self = .previewImage - case "sourceFileChecksum": self = .sourceFileChecksum - case "uploadOperations": self = .uploadOperations - case "uploaded": self = .uploaded - case "videoUrl": self = .videoUrl - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum AppStoreVersionExperimentTreatmentLocalizations: Hashable, Codable, RawRepresentable { - case appPreviewSets - case appScreenshotSets - case appStoreVersionExperimentTreatment - case locale - case unknown(String) + public struct AppStoreVersionExperimentTreatmentLocalizations: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var appPreviewSets: Self { + .init(rawValue: "appPreviewSets") + } + + public static var appScreenshotSets: Self { + .init(rawValue: "appScreenshotSets") + } - public var rawValue: String { - switch self { - case .appPreviewSets: return "appPreviewSets" - case .appScreenshotSets: return "appScreenshotSets" - case .appStoreVersionExperimentTreatment: return "appStoreVersionExperimentTreatment" - case .locale: return "locale" - case .unknown(let rawValue): return rawValue - } + public static var appStoreVersionExperimentTreatment: Self { + .init(rawValue: "appStoreVersionExperimentTreatment") } + public static var locale: Self { + .init(rawValue: "locale") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "appPreviewSets": self = .appPreviewSets - case "appScreenshotSets": self = .appScreenshotSets - case "appStoreVersionExperimentTreatment": self = .appStoreVersionExperimentTreatment - case "locale": self = .locale - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum AppStoreVersionLocalizations: Hashable, Codable, RawRepresentable { - case appPreviewSets - case appScreenshotSets - case appStoreVersion - case description - case keywords - case locale - case marketingUrl - case promotionalText - case supportUrl - case whatsNew - case unknown(String) - - public var rawValue: String { - switch self { - case .appPreviewSets: return "appPreviewSets" - case .appScreenshotSets: return "appScreenshotSets" - case .appStoreVersion: return "appStoreVersion" - case .description: return "description" - case .keywords: return "keywords" - case .locale: return "locale" - case .marketingUrl: return "marketingUrl" - case .promotionalText: return "promotionalText" - case .supportUrl: return "supportUrl" - case .whatsNew: return "whatsNew" - case .unknown(let rawValue): return rawValue - } + public struct AppStoreVersionLocalizations: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var appPreviewSets: Self { + .init(rawValue: "appPreviewSets") + } + + public static var appScreenshotSets: Self { + .init(rawValue: "appScreenshotSets") + } + + public static var appStoreVersion: Self { + .init(rawValue: "appStoreVersion") + } + + public static var description: Self { + .init(rawValue: "description") + } + + public static var keywords: Self { + .init(rawValue: "keywords") + } + + public static var locale: Self { + .init(rawValue: "locale") + } + + public static var marketingUrl: Self { + .init(rawValue: "marketingUrl") + } + + public static var promotionalText: Self { + .init(rawValue: "promotionalText") + } + + public static var supportUrl: Self { + .init(rawValue: "supportUrl") + } + + public static var whatsNew: Self { + .init(rawValue: "whatsNew") } + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "appPreviewSets": self = .appPreviewSets - case "appScreenshotSets": self = .appScreenshotSets - case "appStoreVersion": self = .appStoreVersion - case "description": self = .description - case "keywords": self = .keywords - case "locale": self = .locale - case "marketingUrl": self = .marketingUrl - case "promotionalText": self = .promotionalText - case "supportUrl": self = .supportUrl - case "whatsNew": self = .whatsNew - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } @@ -337,64 +364,79 @@ extension V1.AppCustomProductPageLocalizations.ById.AppPreviewSets.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum PreviewType: Hashable, Codable, RawRepresentable { - case appleTv - case desktop - case ipad105 - case ipad97 - case ipadPro129 - case ipadPro3Gen11 - case ipadPro3Gen129 - case iphone35 - case iphone40 - case iphone47 - case iphone55 - case iphone58 - case iphone61 - case iphone65 - case iphone67 - case unknown(String) - - public var rawValue: String { - switch self { - case .appleTv: return "APPLE_TV" - case .desktop: return "DESKTOP" - case .ipad105: return "IPAD_105" - case .ipad97: return "IPAD_97" - case .ipadPro129: return "IPAD_PRO_129" - case .ipadPro3Gen11: return "IPAD_PRO_3GEN_11" - case .ipadPro3Gen129: return "IPAD_PRO_3GEN_129" - case .iphone35: return "IPHONE_35" - case .iphone40: return "IPHONE_40" - case .iphone47: return "IPHONE_47" - case .iphone55: return "IPHONE_55" - case .iphone58: return "IPHONE_58" - case .iphone61: return "IPHONE_61" - case .iphone65: return "IPHONE_65" - case .iphone67: return "IPHONE_67" - case .unknown(let rawValue): return rawValue - } + public struct PreviewType: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var appleTv: Self { + .init(rawValue: "APPLE_TV") + } + + public static var appleVisionPro: Self { + .init(rawValue: "APPLE_VISION_PRO") + } + + public static var desktop: Self { + .init(rawValue: "DESKTOP") + } + + public static var ipad105: Self { + .init(rawValue: "IPAD_105") + } + + public static var ipad97: Self { + .init(rawValue: "IPAD_97") + } + + public static var ipadPro129: Self { + .init(rawValue: "IPAD_PRO_129") + } + + public static var ipadPro3Gen11: Self { + .init(rawValue: "IPAD_PRO_3GEN_11") + } + + public static var ipadPro3Gen129: Self { + .init(rawValue: "IPAD_PRO_3GEN_129") + } + + public static var iphone35: Self { + .init(rawValue: "IPHONE_35") + } + + public static var iphone40: Self { + .init(rawValue: "IPHONE_40") + } + + public static var iphone47: Self { + .init(rawValue: "IPHONE_47") + } + + public static var iphone55: Self { + .init(rawValue: "IPHONE_55") + } + + public static var iphone58: Self { + .init(rawValue: "IPHONE_58") + } + + public static var iphone61: Self { + .init(rawValue: "IPHONE_61") + } + + public static var iphone65: Self { + .init(rawValue: "IPHONE_65") } + public static var iphone67: Self { + .init(rawValue: "IPHONE_67") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "APPLE_TV": self = .appleTv - case "DESKTOP": self = .desktop - case "IPAD_105": self = .ipad105 - case "IPAD_97": self = .ipad97 - case "IPAD_PRO_129": self = .ipadPro129 - case "IPAD_PRO_3GEN_11": self = .ipadPro3Gen11 - case "IPAD_PRO_3GEN_129": self = .ipadPro3Gen129 - case "IPHONE_35": self = .iphone35 - case "IPHONE_40": self = .iphone40 - case "IPHONE_47": self = .iphone47 - case "IPHONE_55": self = .iphone55 - case "IPHONE_58": self = .iphone58 - case "IPHONE_61": self = .iphone61 - case "IPHONE_65": self = .iphone65 - case "IPHONE_67": self = .iphone67 - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } @@ -422,31 +464,31 @@ extension V1.AppCustomProductPageLocalizations.ById.AppPreviewSets.GET { } } - public enum Include: Hashable, Codable, RawRepresentable { - case appCustomProductPageLocalization - case appPreviews - case appStoreVersionExperimentTreatmentLocalization - case appStoreVersionLocalization - case unknown(String) - - public var rawValue: String { - switch self { - case .appCustomProductPageLocalization: return "appCustomProductPageLocalization" - case .appPreviews: return "appPreviews" - case .appStoreVersionExperimentTreatmentLocalization: return "appStoreVersionExperimentTreatmentLocalization" - case .appStoreVersionLocalization: return "appStoreVersionLocalization" - case .unknown(let rawValue): return rawValue - } + public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var appCustomProductPageLocalization: Self { + .init(rawValue: "appCustomProductPageLocalization") + } + + public static var appPreviews: Self { + .init(rawValue: "appPreviews") } + public static var appStoreVersionExperimentTreatmentLocalization: Self { + .init(rawValue: "appStoreVersionExperimentTreatmentLocalization") + } + + public static var appStoreVersionLocalization: Self { + .init(rawValue: "appStoreVersionLocalization") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "appCustomProductPageLocalization": self = .appCustomProductPageLocalization - case "appPreviews": self = .appPreviews - case "appStoreVersionExperimentTreatmentLocalization": self = .appStoreVersionExperimentTreatmentLocalization - case "appStoreVersionLocalization": self = .appStoreVersionLocalization - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppCustomProductPageLocalizations/ById/AppScreenshotSets/AppCustomProductPageLocalizationsByIdAppScreenshotSets.GET.489daf1.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppCustomProductPageLocalizations/ById/AppScreenshotSets/AppCustomProductPageLocalizationsByIdAppScreenshotSets.GET.489daf1.generated.swift index 9e2ab4e6..446fc42e 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppCustomProductPageLocalizations/ById/AppScreenshotSets/AppCustomProductPageLocalizationsByIdAppScreenshotSets.GET.489daf1.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppCustomProductPageLocalizations/ById/AppScreenshotSets/AppCustomProductPageLocalizationsByIdAppScreenshotSets.GET.489daf1.generated.swift @@ -62,8 +62,10 @@ extension V1.AppCustomProductPageLocalizations.ById.AppScreenshotSets { /// - Returns: **200**, List of AppScreenshotSets as `AppScreenshotSetsResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -77,12 +79,18 @@ extension V1.AppCustomProductPageLocalizations.ById.AppScreenshotSets { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 404: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -110,185 +118,195 @@ extension V1.AppCustomProductPageLocalizations.ById.AppScreenshotSets.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum AppCustomProductPageLocalizations: Hashable, Codable, RawRepresentable { - case appCustomProductPageVersion - case appPreviewSets - case appScreenshotSets - case locale - case promotionalText - case unknown(String) - - public var rawValue: String { - switch self { - case .appCustomProductPageVersion: return "appCustomProductPageVersion" - case .appPreviewSets: return "appPreviewSets" - case .appScreenshotSets: return "appScreenshotSets" - case .locale: return "locale" - case .promotionalText: return "promotionalText" - case .unknown(let rawValue): return rawValue - } + public struct AppCustomProductPageLocalizations: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var appCustomProductPageVersion: Self { + .init(rawValue: "appCustomProductPageVersion") + } + + public static var appPreviewSets: Self { + .init(rawValue: "appPreviewSets") + } + + public static var appScreenshotSets: Self { + .init(rawValue: "appScreenshotSets") + } + + public static var locale: Self { + .init(rawValue: "locale") } + public static var promotionalText: Self { + .init(rawValue: "promotionalText") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "appCustomProductPageVersion": self = .appCustomProductPageVersion - case "appPreviewSets": self = .appPreviewSets - case "appScreenshotSets": self = .appScreenshotSets - case "locale": self = .locale - case "promotionalText": self = .promotionalText - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum AppScreenshotSets: Hashable, Codable, RawRepresentable { - case appCustomProductPageLocalization - case appScreenshots - case appStoreVersionExperimentTreatmentLocalization - case appStoreVersionLocalization - case screenshotDisplayType - case unknown(String) - - public var rawValue: String { - switch self { - case .appCustomProductPageLocalization: return "appCustomProductPageLocalization" - case .appScreenshots: return "appScreenshots" - case .appStoreVersionExperimentTreatmentLocalization: return "appStoreVersionExperimentTreatmentLocalization" - case .appStoreVersionLocalization: return "appStoreVersionLocalization" - case .screenshotDisplayType: return "screenshotDisplayType" - case .unknown(let rawValue): return rawValue - } + public struct AppScreenshotSets: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var appCustomProductPageLocalization: Self { + .init(rawValue: "appCustomProductPageLocalization") + } + + public static var appScreenshots: Self { + .init(rawValue: "appScreenshots") + } + + public static var appStoreVersionExperimentTreatmentLocalization: Self { + .init(rawValue: "appStoreVersionExperimentTreatmentLocalization") } + public static var appStoreVersionLocalization: Self { + .init(rawValue: "appStoreVersionLocalization") + } + + public static var screenshotDisplayType: Self { + .init(rawValue: "screenshotDisplayType") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "appCustomProductPageLocalization": self = .appCustomProductPageLocalization - case "appScreenshots": self = .appScreenshots - case "appStoreVersionExperimentTreatmentLocalization": self = .appStoreVersionExperimentTreatmentLocalization - case "appStoreVersionLocalization": self = .appStoreVersionLocalization - case "screenshotDisplayType": self = .screenshotDisplayType - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum AppScreenshots: Hashable, Codable, RawRepresentable { - case appScreenshotSet - case assetDeliveryState - case assetToken - case assetType - case fileName - case fileSize - case imageAsset - case sourceFileChecksum - case uploadOperations - case uploaded - case unknown(String) - - public var rawValue: String { - switch self { - case .appScreenshotSet: return "appScreenshotSet" - case .assetDeliveryState: return "assetDeliveryState" - case .assetToken: return "assetToken" - case .assetType: return "assetType" - case .fileName: return "fileName" - case .fileSize: return "fileSize" - case .imageAsset: return "imageAsset" - case .sourceFileChecksum: return "sourceFileChecksum" - case .uploadOperations: return "uploadOperations" - case .uploaded: return "uploaded" - case .unknown(let rawValue): return rawValue - } + public struct AppScreenshots: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var appScreenshotSet: Self { + .init(rawValue: "appScreenshotSet") + } + + public static var assetDeliveryState: Self { + .init(rawValue: "assetDeliveryState") + } + + public static var assetToken: Self { + .init(rawValue: "assetToken") + } + + public static var assetType: Self { + .init(rawValue: "assetType") + } + + public static var fileName: Self { + .init(rawValue: "fileName") + } + + public static var fileSize: Self { + .init(rawValue: "fileSize") + } + + public static var imageAsset: Self { + .init(rawValue: "imageAsset") } + public static var sourceFileChecksum: Self { + .init(rawValue: "sourceFileChecksum") + } + + public static var uploadOperations: Self { + .init(rawValue: "uploadOperations") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "appScreenshotSet": self = .appScreenshotSet - case "assetDeliveryState": self = .assetDeliveryState - case "assetToken": self = .assetToken - case "assetType": self = .assetType - case "fileName": self = .fileName - case "fileSize": self = .fileSize - case "imageAsset": self = .imageAsset - case "sourceFileChecksum": self = .sourceFileChecksum - case "uploadOperations": self = .uploadOperations - case "uploaded": self = .uploaded - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum AppStoreVersionExperimentTreatmentLocalizations: Hashable, Codable, RawRepresentable { - case appPreviewSets - case appScreenshotSets - case appStoreVersionExperimentTreatment - case locale - case unknown(String) + public struct AppStoreVersionExperimentTreatmentLocalizations: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var appPreviewSets: Self { + .init(rawValue: "appPreviewSets") + } + + public static var appScreenshotSets: Self { + .init(rawValue: "appScreenshotSets") + } - public var rawValue: String { - switch self { - case .appPreviewSets: return "appPreviewSets" - case .appScreenshotSets: return "appScreenshotSets" - case .appStoreVersionExperimentTreatment: return "appStoreVersionExperimentTreatment" - case .locale: return "locale" - case .unknown(let rawValue): return rawValue - } + public static var appStoreVersionExperimentTreatment: Self { + .init(rawValue: "appStoreVersionExperimentTreatment") } + public static var locale: Self { + .init(rawValue: "locale") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "appPreviewSets": self = .appPreviewSets - case "appScreenshotSets": self = .appScreenshotSets - case "appStoreVersionExperimentTreatment": self = .appStoreVersionExperimentTreatment - case "locale": self = .locale - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum AppStoreVersionLocalizations: Hashable, Codable, RawRepresentable { - case appPreviewSets - case appScreenshotSets - case appStoreVersion - case description - case keywords - case locale - case marketingUrl - case promotionalText - case supportUrl - case whatsNew - case unknown(String) - - public var rawValue: String { - switch self { - case .appPreviewSets: return "appPreviewSets" - case .appScreenshotSets: return "appScreenshotSets" - case .appStoreVersion: return "appStoreVersion" - case .description: return "description" - case .keywords: return "keywords" - case .locale: return "locale" - case .marketingUrl: return "marketingUrl" - case .promotionalText: return "promotionalText" - case .supportUrl: return "supportUrl" - case .whatsNew: return "whatsNew" - case .unknown(let rawValue): return rawValue - } + public struct AppStoreVersionLocalizations: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var appPreviewSets: Self { + .init(rawValue: "appPreviewSets") + } + + public static var appScreenshotSets: Self { + .init(rawValue: "appScreenshotSets") + } + + public static var appStoreVersion: Self { + .init(rawValue: "appStoreVersion") } + public static var description: Self { + .init(rawValue: "description") + } + + public static var keywords: Self { + .init(rawValue: "keywords") + } + + public static var locale: Self { + .init(rawValue: "locale") + } + + public static var marketingUrl: Self { + .init(rawValue: "marketingUrl") + } + + public static var promotionalText: Self { + .init(rawValue: "promotionalText") + } + + public static var supportUrl: Self { + .init(rawValue: "supportUrl") + } + + public static var whatsNew: Self { + .init(rawValue: "whatsNew") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "appPreviewSets": self = .appPreviewSets - case "appScreenshotSets": self = .appScreenshotSets - case "appStoreVersion": self = .appStoreVersion - case "description": self = .description - case "keywords": self = .keywords - case "locale": self = .locale - case "marketingUrl": self = .marketingUrl - case "promotionalText": self = .promotionalText - case "supportUrl": self = .supportUrl - case "whatsNew": self = .whatsNew - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } @@ -334,112 +352,147 @@ extension V1.AppCustomProductPageLocalizations.ById.AppScreenshotSets.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum ScreenshotDisplayType: Hashable, Codable, RawRepresentable { - case appAppleTv - case appDesktop - case appIpad105 - case appIpad97 - case appIpadPro129 - case appIpadPro3Gen11 - case appIpadPro3Gen129 - case appIphone35 - case appIphone40 - case appIphone47 - case appIphone55 - case appIphone58 - case appIphone61 - case appIphone65 - case appIphone67 - case appWatchSeries3 - case appWatchSeries4 - case appWatchSeries7 - case appWatchUltra - case imessageAppIpad105 - case imessageAppIpad97 - case imessageAppIpadPro129 - case imessageAppIpadPro3Gen11 - case imessageAppIpadPro3Gen129 - case imessageAppIphone40 - case imessageAppIphone47 - case imessageAppIphone55 - case imessageAppIphone58 - case imessageAppIphone61 - case imessageAppIphone65 - case imessageAppIphone67 - case unknown(String) - - public var rawValue: String { - switch self { - case .appAppleTv: return "APP_APPLE_TV" - case .appDesktop: return "APP_DESKTOP" - case .appIpad105: return "APP_IPAD_105" - case .appIpad97: return "APP_IPAD_97" - case .appIpadPro129: return "APP_IPAD_PRO_129" - case .appIpadPro3Gen11: return "APP_IPAD_PRO_3GEN_11" - case .appIpadPro3Gen129: return "APP_IPAD_PRO_3GEN_129" - case .appIphone35: return "APP_IPHONE_35" - case .appIphone40: return "APP_IPHONE_40" - case .appIphone47: return "APP_IPHONE_47" - case .appIphone55: return "APP_IPHONE_55" - case .appIphone58: return "APP_IPHONE_58" - case .appIphone61: return "APP_IPHONE_61" - case .appIphone65: return "APP_IPHONE_65" - case .appIphone67: return "APP_IPHONE_67" - case .appWatchSeries3: return "APP_WATCH_SERIES_3" - case .appWatchSeries4: return "APP_WATCH_SERIES_4" - case .appWatchSeries7: return "APP_WATCH_SERIES_7" - case .appWatchUltra: return "APP_WATCH_ULTRA" - case .imessageAppIpad105: return "IMESSAGE_APP_IPAD_105" - case .imessageAppIpad97: return "IMESSAGE_APP_IPAD_97" - case .imessageAppIpadPro129: return "IMESSAGE_APP_IPAD_PRO_129" - case .imessageAppIpadPro3Gen11: return "IMESSAGE_APP_IPAD_PRO_3GEN_11" - case .imessageAppIpadPro3Gen129: return "IMESSAGE_APP_IPAD_PRO_3GEN_129" - case .imessageAppIphone40: return "IMESSAGE_APP_IPHONE_40" - case .imessageAppIphone47: return "IMESSAGE_APP_IPHONE_47" - case .imessageAppIphone55: return "IMESSAGE_APP_IPHONE_55" - case .imessageAppIphone58: return "IMESSAGE_APP_IPHONE_58" - case .imessageAppIphone61: return "IMESSAGE_APP_IPHONE_61" - case .imessageAppIphone65: return "IMESSAGE_APP_IPHONE_65" - case .imessageAppIphone67: return "IMESSAGE_APP_IPHONE_67" - case .unknown(let rawValue): return rawValue - } + public struct ScreenshotDisplayType: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var appAppleTv: Self { + .init(rawValue: "APP_APPLE_TV") + } + + public static var appAppleVisionPro: Self { + .init(rawValue: "APP_APPLE_VISION_PRO") } + public static var appDesktop: Self { + .init(rawValue: "APP_DESKTOP") + } + + public static var appIpad105: Self { + .init(rawValue: "APP_IPAD_105") + } + + public static var appIpad97: Self { + .init(rawValue: "APP_IPAD_97") + } + + public static var appIpadPro129: Self { + .init(rawValue: "APP_IPAD_PRO_129") + } + + public static var appIpadPro3Gen11: Self { + .init(rawValue: "APP_IPAD_PRO_3GEN_11") + } + + public static var appIpadPro3Gen129: Self { + .init(rawValue: "APP_IPAD_PRO_3GEN_129") + } + + public static var appIphone35: Self { + .init(rawValue: "APP_IPHONE_35") + } + + public static var appIphone40: Self { + .init(rawValue: "APP_IPHONE_40") + } + + public static var appIphone47: Self { + .init(rawValue: "APP_IPHONE_47") + } + + public static var appIphone55: Self { + .init(rawValue: "APP_IPHONE_55") + } + + public static var appIphone58: Self { + .init(rawValue: "APP_IPHONE_58") + } + + public static var appIphone61: Self { + .init(rawValue: "APP_IPHONE_61") + } + + public static var appIphone65: Self { + .init(rawValue: "APP_IPHONE_65") + } + + public static var appIphone67: Self { + .init(rawValue: "APP_IPHONE_67") + } + + public static var appWatchSeries10: Self { + .init(rawValue: "APP_WATCH_SERIES_10") + } + + public static var appWatchSeries3: Self { + .init(rawValue: "APP_WATCH_SERIES_3") + } + + public static var appWatchSeries4: Self { + .init(rawValue: "APP_WATCH_SERIES_4") + } + + public static var appWatchSeries7: Self { + .init(rawValue: "APP_WATCH_SERIES_7") + } + + public static var appWatchUltra: Self { + .init(rawValue: "APP_WATCH_ULTRA") + } + + public static var imessageAppIpad105: Self { + .init(rawValue: "IMESSAGE_APP_IPAD_105") + } + + public static var imessageAppIpad97: Self { + .init(rawValue: "IMESSAGE_APP_IPAD_97") + } + + public static var imessageAppIpadPro129: Self { + .init(rawValue: "IMESSAGE_APP_IPAD_PRO_129") + } + + public static var imessageAppIpadPro3Gen11: Self { + .init(rawValue: "IMESSAGE_APP_IPAD_PRO_3GEN_11") + } + + public static var imessageAppIpadPro3Gen129: Self { + .init(rawValue: "IMESSAGE_APP_IPAD_PRO_3GEN_129") + } + + public static var imessageAppIphone40: Self { + .init(rawValue: "IMESSAGE_APP_IPHONE_40") + } + + public static var imessageAppIphone47: Self { + .init(rawValue: "IMESSAGE_APP_IPHONE_47") + } + + public static var imessageAppIphone55: Self { + .init(rawValue: "IMESSAGE_APP_IPHONE_55") + } + + public static var imessageAppIphone58: Self { + .init(rawValue: "IMESSAGE_APP_IPHONE_58") + } + + public static var imessageAppIphone61: Self { + .init(rawValue: "IMESSAGE_APP_IPHONE_61") + } + + public static var imessageAppIphone65: Self { + .init(rawValue: "IMESSAGE_APP_IPHONE_65") + } + + public static var imessageAppIphone67: Self { + .init(rawValue: "IMESSAGE_APP_IPHONE_67") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "APP_APPLE_TV": self = .appAppleTv - case "APP_DESKTOP": self = .appDesktop - case "APP_IPAD_105": self = .appIpad105 - case "APP_IPAD_97": self = .appIpad97 - case "APP_IPAD_PRO_129": self = .appIpadPro129 - case "APP_IPAD_PRO_3GEN_11": self = .appIpadPro3Gen11 - case "APP_IPAD_PRO_3GEN_129": self = .appIpadPro3Gen129 - case "APP_IPHONE_35": self = .appIphone35 - case "APP_IPHONE_40": self = .appIphone40 - case "APP_IPHONE_47": self = .appIphone47 - case "APP_IPHONE_55": self = .appIphone55 - case "APP_IPHONE_58": self = .appIphone58 - case "APP_IPHONE_61": self = .appIphone61 - case "APP_IPHONE_65": self = .appIphone65 - case "APP_IPHONE_67": self = .appIphone67 - case "APP_WATCH_SERIES_3": self = .appWatchSeries3 - case "APP_WATCH_SERIES_4": self = .appWatchSeries4 - case "APP_WATCH_SERIES_7": self = .appWatchSeries7 - case "APP_WATCH_ULTRA": self = .appWatchUltra - case "IMESSAGE_APP_IPAD_105": self = .imessageAppIpad105 - case "IMESSAGE_APP_IPAD_97": self = .imessageAppIpad97 - case "IMESSAGE_APP_IPAD_PRO_129": self = .imessageAppIpadPro129 - case "IMESSAGE_APP_IPAD_PRO_3GEN_11": self = .imessageAppIpadPro3Gen11 - case "IMESSAGE_APP_IPAD_PRO_3GEN_129": self = .imessageAppIpadPro3Gen129 - case "IMESSAGE_APP_IPHONE_40": self = .imessageAppIphone40 - case "IMESSAGE_APP_IPHONE_47": self = .imessageAppIphone47 - case "IMESSAGE_APP_IPHONE_55": self = .imessageAppIphone55 - case "IMESSAGE_APP_IPHONE_58": self = .imessageAppIphone58 - case "IMESSAGE_APP_IPHONE_61": self = .imessageAppIphone61 - case "IMESSAGE_APP_IPHONE_65": self = .imessageAppIphone65 - case "IMESSAGE_APP_IPHONE_67": self = .imessageAppIphone67 - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } @@ -467,31 +520,31 @@ extension V1.AppCustomProductPageLocalizations.ById.AppScreenshotSets.GET { } } - public enum Include: Hashable, Codable, RawRepresentable { - case appCustomProductPageLocalization - case appScreenshots - case appStoreVersionExperimentTreatmentLocalization - case appStoreVersionLocalization - case unknown(String) - - public var rawValue: String { - switch self { - case .appCustomProductPageLocalization: return "appCustomProductPageLocalization" - case .appScreenshots: return "appScreenshots" - case .appStoreVersionExperimentTreatmentLocalization: return "appStoreVersionExperimentTreatmentLocalization" - case .appStoreVersionLocalization: return "appStoreVersionLocalization" - case .unknown(let rawValue): return rawValue - } + public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var appCustomProductPageLocalization: Self { + .init(rawValue: "appCustomProductPageLocalization") } + public static var appScreenshots: Self { + .init(rawValue: "appScreenshots") + } + + public static var appStoreVersionExperimentTreatmentLocalization: Self { + .init(rawValue: "appStoreVersionExperimentTreatmentLocalization") + } + + public static var appStoreVersionLocalization: Self { + .init(rawValue: "appStoreVersionLocalization") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "appCustomProductPageLocalization": self = .appCustomProductPageLocalization - case "appScreenshots": self = .appScreenshots - case "appStoreVersionExperimentTreatmentLocalization": self = .appStoreVersionExperimentTreatmentLocalization - case "appStoreVersionLocalization": self = .appStoreVersionLocalization - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppCustomProductPageLocalizations/ById/Relationships/AppPreviewSets/AppCustomProductPageLocalizationsByIdRelationshipsAppPreviewSets.GET.2d76aba.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppCustomProductPageLocalizations/ById/Relationships/AppPreviewSets/AppCustomProductPageLocalizationsByIdRelationshipsAppPreviewSets.GET.2d76aba.generated.swift new file mode 100644 index 00000000..84701e1d --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppCustomProductPageLocalizations/ById/Relationships/AppPreviewSets/AppCustomProductPageLocalizationsByIdRelationshipsAppPreviewSets.GET.2d76aba.generated.swift @@ -0,0 +1,88 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.AppCustomProductPageLocalizations.ById.Relationships.AppPreviewSets { + public struct GET: Endpoint { + public typealias Response = AppCustomProductPageLocalizationAppPreviewSetsLinkagesResponse + + public var path: String { + "/v1/appCustomProductPageLocalizations/\(id)/relationships/appPreviewSets" + } + + /// the id of the requested resource + public var id: String + + public var parameters: Parameters = Parameters() + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + components?.queryItems = [ + URLQueryItem(name: "limit", + value: parameters.limit.map { "\($0)" }) + ].filter { $0.value != nil } + if components?.queryItems?.isEmpty ?? false { + components?.queryItems = nil + } + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "GET" + return urlRequest + } + + /// - Returns: **200**, List of related linkages as `AppCustomProductPageLocalizationAppPreviewSetsLinkagesResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(AppCustomProductPageLocalizationAppPreviewSetsLinkagesResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +extension V1.AppCustomProductPageLocalizations.ById.Relationships.AppPreviewSets.GET { + public struct Parameters: Hashable { + /// maximum resources per page + public var limit: Int? + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppCustomProductPageLocalizations/ById/Relationships/AppScreenshotSets/AppCustomProductPageLocalizationsByIdRelationshipsAppScreenshotSets.GET.eb4c40c.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppCustomProductPageLocalizations/ById/Relationships/AppScreenshotSets/AppCustomProductPageLocalizationsByIdRelationshipsAppScreenshotSets.GET.eb4c40c.generated.swift new file mode 100644 index 00000000..832249af --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppCustomProductPageLocalizations/ById/Relationships/AppScreenshotSets/AppCustomProductPageLocalizationsByIdRelationshipsAppScreenshotSets.GET.eb4c40c.generated.swift @@ -0,0 +1,88 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.AppCustomProductPageLocalizations.ById.Relationships.AppScreenshotSets { + public struct GET: Endpoint { + public typealias Response = AppCustomProductPageLocalizationAppScreenshotSetsLinkagesResponse + + public var path: String { + "/v1/appCustomProductPageLocalizations/\(id)/relationships/appScreenshotSets" + } + + /// the id of the requested resource + public var id: String + + public var parameters: Parameters = Parameters() + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + components?.queryItems = [ + URLQueryItem(name: "limit", + value: parameters.limit.map { "\($0)" }) + ].filter { $0.value != nil } + if components?.queryItems?.isEmpty ?? false { + components?.queryItems = nil + } + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "GET" + return urlRequest + } + + /// - Returns: **200**, List of related linkages as `AppCustomProductPageLocalizationAppScreenshotSetsLinkagesResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(AppCustomProductPageLocalizationAppScreenshotSetsLinkagesResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +extension V1.AppCustomProductPageLocalizations.ById.Relationships.AppScreenshotSets.GET { + public struct Parameters: Hashable { + /// maximum resources per page + public var limit: Int? + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppCustomProductPageVersions/AppCustomProductPageVersions.POST.bbb910c.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppCustomProductPageVersions/AppCustomProductPageVersions.POST.bbb910c.generated.swift index c7dd57d9..fff1f1d8 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppCustomProductPageVersions/AppCustomProductPageVersions.POST.bbb910c.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppCustomProductPageVersions/AppCustomProductPageVersions.POST.bbb910c.generated.swift @@ -41,8 +41,11 @@ extension V1.AppCustomProductPageVersions { /// - Returns: **201**, Single AppCustomProductPageVersion as `AppCustomProductPageVersionResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **422**, Unprocessable request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -56,12 +59,21 @@ extension V1.AppCustomProductPageVersions { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 409: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 422: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppCustomProductPageVersions/ById/AppCustomProductPageLocalizations/AppCustomProductPageVersionsByIdAppCustomProductPageLocalizations.GET.98cd9de.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppCustomProductPageVersions/ById/AppCustomProductPageLocalizations/AppCustomProductPageVersionsByIdAppCustomProductPageLocalizations.GET.98cd9de.generated.swift index 67d570e1..2fcdd210 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppCustomProductPageVersions/ById/AppCustomProductPageLocalizations/AppCustomProductPageVersionsByIdAppCustomProductPageLocalizations.GET.98cd9de.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppCustomProductPageVersions/ById/AppCustomProductPageLocalizations/AppCustomProductPageVersionsByIdAppCustomProductPageLocalizations.GET.98cd9de.generated.swift @@ -58,8 +58,10 @@ extension V1.AppCustomProductPageVersions.ById.AppCustomProductPageLocalizations /// - Returns: **200**, List of AppCustomProductPageLocalizations as `AppCustomProductPageLocalizationsResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -73,12 +75,18 @@ extension V1.AppCustomProductPageVersions.ById.AppCustomProductPageLocalizations case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 404: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -106,124 +114,131 @@ extension V1.AppCustomProductPageVersions.ById.AppCustomProductPageLocalizations private var values: [AnyHashable: AnyHashable] = [:] - public enum AppCustomProductPageLocalizations: Hashable, Codable, RawRepresentable { - case appCustomProductPageVersion - case appPreviewSets - case appScreenshotSets - case locale - case promotionalText - case unknown(String) - - public var rawValue: String { - switch self { - case .appCustomProductPageVersion: return "appCustomProductPageVersion" - case .appPreviewSets: return "appPreviewSets" - case .appScreenshotSets: return "appScreenshotSets" - case .locale: return "locale" - case .promotionalText: return "promotionalText" - case .unknown(let rawValue): return rawValue - } + public struct AppCustomProductPageLocalizations: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var appCustomProductPageVersion: Self { + .init(rawValue: "appCustomProductPageVersion") + } + + public static var appPreviewSets: Self { + .init(rawValue: "appPreviewSets") + } + + public static var appScreenshotSets: Self { + .init(rawValue: "appScreenshotSets") + } + + public static var locale: Self { + .init(rawValue: "locale") + } + + public static var promotionalText: Self { + .init(rawValue: "promotionalText") + } + + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "appCustomProductPageVersion": self = .appCustomProductPageVersion - case "appPreviewSets": self = .appPreviewSets - case "appScreenshotSets": self = .appScreenshotSets - case "locale": self = .locale - case "promotionalText": self = .promotionalText - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum AppCustomProductPageVersions: Hashable, Codable, RawRepresentable { - case appCustomProductPage - case appCustomProductPageLocalizations - case state - case version - case unknown(String) + public struct AppCustomProductPageVersions: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var appCustomProductPage: Self { + .init(rawValue: "appCustomProductPage") + } + + public static var appCustomProductPageLocalizations: Self { + .init(rawValue: "appCustomProductPageLocalizations") + } + + public static var deepLink: Self { + .init(rawValue: "deepLink") + } + + public static var state: Self { + .init(rawValue: "state") + } + + public static var version: Self { + .init(rawValue: "version") + } - public var rawValue: String { - switch self { - case .appCustomProductPage: return "appCustomProductPage" - case .appCustomProductPageLocalizations: return "appCustomProductPageLocalizations" - case .state: return "state" - case .version: return "version" - case .unknown(let rawValue): return rawValue - } + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "appCustomProductPage": self = .appCustomProductPage - case "appCustomProductPageLocalizations": self = .appCustomProductPageLocalizations - case "state": self = .state - case "version": self = .version - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum AppPreviewSets: Hashable, Codable, RawRepresentable { - case appCustomProductPageLocalization - case appPreviews - case appStoreVersionExperimentTreatmentLocalization - case appStoreVersionLocalization - case previewType - case unknown(String) - - public var rawValue: String { - switch self { - case .appCustomProductPageLocalization: return "appCustomProductPageLocalization" - case .appPreviews: return "appPreviews" - case .appStoreVersionExperimentTreatmentLocalization: return "appStoreVersionExperimentTreatmentLocalization" - case .appStoreVersionLocalization: return "appStoreVersionLocalization" - case .previewType: return "previewType" - case .unknown(let rawValue): return rawValue - } + public struct AppPreviewSets: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var appCustomProductPageLocalization: Self { + .init(rawValue: "appCustomProductPageLocalization") } + public static var appPreviews: Self { + .init(rawValue: "appPreviews") + } + + public static var appStoreVersionExperimentTreatmentLocalization: Self { + .init(rawValue: "appStoreVersionExperimentTreatmentLocalization") + } + + public static var appStoreVersionLocalization: Self { + .init(rawValue: "appStoreVersionLocalization") + } + + public static var previewType: Self { + .init(rawValue: "previewType") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "appCustomProductPageLocalization": self = .appCustomProductPageLocalization - case "appPreviews": self = .appPreviews - case "appStoreVersionExperimentTreatmentLocalization": self = .appStoreVersionExperimentTreatmentLocalization - case "appStoreVersionLocalization": self = .appStoreVersionLocalization - case "previewType": self = .previewType - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum AppScreenshotSets: Hashable, Codable, RawRepresentable { - case appCustomProductPageLocalization - case appScreenshots - case appStoreVersionExperimentTreatmentLocalization - case appStoreVersionLocalization - case screenshotDisplayType - case unknown(String) - - public var rawValue: String { - switch self { - case .appCustomProductPageLocalization: return "appCustomProductPageLocalization" - case .appScreenshots: return "appScreenshots" - case .appStoreVersionExperimentTreatmentLocalization: return "appStoreVersionExperimentTreatmentLocalization" - case .appStoreVersionLocalization: return "appStoreVersionLocalization" - case .screenshotDisplayType: return "screenshotDisplayType" - case .unknown(let rawValue): return rawValue - } + public struct AppScreenshotSets: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var appCustomProductPageLocalization: Self { + .init(rawValue: "appCustomProductPageLocalization") + } + + public static var appScreenshots: Self { + .init(rawValue: "appScreenshots") + } + + public static var appStoreVersionExperimentTreatmentLocalization: Self { + .init(rawValue: "appStoreVersionExperimentTreatmentLocalization") + } + + public static var appStoreVersionLocalization: Self { + .init(rawValue: "appStoreVersionLocalization") } + public static var screenshotDisplayType: Self { + .init(rawValue: "screenshotDisplayType") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "appCustomProductPageLocalization": self = .appCustomProductPageLocalization - case "appScreenshots": self = .appScreenshots - case "appStoreVersionExperimentTreatmentLocalization": self = .appStoreVersionExperimentTreatmentLocalization - case "appStoreVersionLocalization": self = .appStoreVersionLocalization - case "screenshotDisplayType": self = .screenshotDisplayType - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } @@ -278,28 +293,27 @@ extension V1.AppCustomProductPageVersions.ById.AppCustomProductPageLocalizations } } - public enum Include: Hashable, Codable, RawRepresentable { - case appCustomProductPageVersion - case appPreviewSets - case appScreenshotSets - case unknown(String) + public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var appCustomProductPageVersion: Self { + .init(rawValue: "appCustomProductPageVersion") + } - public var rawValue: String { - switch self { - case .appCustomProductPageVersion: return "appCustomProductPageVersion" - case .appPreviewSets: return "appPreviewSets" - case .appScreenshotSets: return "appScreenshotSets" - case .unknown(let rawValue): return rawValue - } + public static var appPreviewSets: Self { + .init(rawValue: "appPreviewSets") } + public static var appScreenshotSets: Self { + .init(rawValue: "appScreenshotSets") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "appCustomProductPageVersion": self = .appCustomProductPageVersion - case "appPreviewSets": self = .appPreviewSets - case "appScreenshotSets": self = .appScreenshotSets - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppCustomProductPageVersions/ById/AppCustomProductPageVersionsById.GET.0840b44.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppCustomProductPageVersions/ById/AppCustomProductPageVersionsById.GET.0840b44.generated.swift index 69cffd77..32b4143d 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppCustomProductPageVersions/ById/AppCustomProductPageVersionsById.GET.0840b44.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppCustomProductPageVersions/ById/AppCustomProductPageVersionsById.GET.0840b44.generated.swift @@ -48,8 +48,10 @@ extension V1.AppCustomProductPageVersions.ById { /// - Returns: **200**, Single AppCustomProductPageVersion as `AppCustomProductPageVersionResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -63,12 +65,18 @@ extension V1.AppCustomProductPageVersions.ById { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 404: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -93,62 +101,67 @@ extension V1.AppCustomProductPageVersions.ById.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum AppCustomProductPageLocalizations: Hashable, Codable, RawRepresentable { - case appCustomProductPageVersion - case appPreviewSets - case appScreenshotSets - case locale - case promotionalText - case unknown(String) - - public var rawValue: String { - switch self { - case .appCustomProductPageVersion: return "appCustomProductPageVersion" - case .appPreviewSets: return "appPreviewSets" - case .appScreenshotSets: return "appScreenshotSets" - case .locale: return "locale" - case .promotionalText: return "promotionalText" - case .unknown(let rawValue): return rawValue - } + public struct AppCustomProductPageLocalizations: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var appCustomProductPageVersion: Self { + .init(rawValue: "appCustomProductPageVersion") + } + + public static var appPreviewSets: Self { + .init(rawValue: "appPreviewSets") + } + + public static var appScreenshotSets: Self { + .init(rawValue: "appScreenshotSets") } + public static var locale: Self { + .init(rawValue: "locale") + } + + public static var promotionalText: Self { + .init(rawValue: "promotionalText") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "appCustomProductPageVersion": self = .appCustomProductPageVersion - case "appPreviewSets": self = .appPreviewSets - case "appScreenshotSets": self = .appScreenshotSets - case "locale": self = .locale - case "promotionalText": self = .promotionalText - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum AppCustomProductPageVersions: Hashable, Codable, RawRepresentable { - case appCustomProductPage - case appCustomProductPageLocalizations - case state - case version - case unknown(String) + public struct AppCustomProductPageVersions: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var appCustomProductPage: Self { + .init(rawValue: "appCustomProductPage") + } - public var rawValue: String { - switch self { - case .appCustomProductPage: return "appCustomProductPage" - case .appCustomProductPageLocalizations: return "appCustomProductPageLocalizations" - case .state: return "state" - case .version: return "version" - case .unknown(let rawValue): return rawValue - } + public static var appCustomProductPageLocalizations: Self { + .init(rawValue: "appCustomProductPageLocalizations") } + public static var deepLink: Self { + .init(rawValue: "deepLink") + } + + public static var state: Self { + .init(rawValue: "state") + } + + public static var version: Self { + .init(rawValue: "version") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "appCustomProductPage": self = .appCustomProductPage - case "appCustomProductPageLocalizations": self = .appCustomProductPageLocalizations - case "state": self = .state - case "version": self = .version - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } @@ -171,25 +184,23 @@ extension V1.AppCustomProductPageVersions.ById.GET { } } - public enum Include: Hashable, Codable, RawRepresentable { - case appCustomProductPage - case appCustomProductPageLocalizations - case unknown(String) + public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var appCustomProductPage: Self { + .init(rawValue: "appCustomProductPage") + } - public var rawValue: String { - switch self { - case .appCustomProductPage: return "appCustomProductPage" - case .appCustomProductPageLocalizations: return "appCustomProductPageLocalizations" - case .unknown(let rawValue): return rawValue - } + public static var appCustomProductPageLocalizations: Self { + .init(rawValue: "appCustomProductPageLocalizations") } + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "appCustomProductPage": self = .appCustomProductPage - case "appCustomProductPageLocalizations": self = .appCustomProductPageLocalizations - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppCustomProductPageVersions/ById/AppCustomProductPageVersionsById.PATCH.0840b44.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppCustomProductPageVersions/ById/AppCustomProductPageVersionsById.PATCH.0840b44.generated.swift new file mode 100644 index 00000000..dcf7fc19 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppCustomProductPageVersions/ById/AppCustomProductPageVersionsById.PATCH.0840b44.generated.swift @@ -0,0 +1,95 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.AppCustomProductPageVersions.ById { + public struct PATCH: Endpoint { + public typealias Parameters = AppCustomProductPageVersionUpdateRequest + public typealias Response = AppCustomProductPageVersionResponse + + public var path: String { + "/v1/appCustomProductPageVersions/\(id)" + } + + /// the id of the requested resource + public var id: String + + /// AppCustomProductPageVersion representation + public var parameters: Parameters + + public init( + id: String, + parameters: Parameters + ) { + self.id = id + self.parameters = parameters + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "PATCH" + + var jsonEncoder: JSONEncoder { + let encoder = JSONEncoder() + return encoder + } + + urlRequest?.httpBody = try jsonEncoder.encode(parameters) + urlRequest?.setValue("application/json", forHTTPHeaderField: "Content-Type") + return urlRequest + } + + /// - Returns: **200**, Single AppCustomProductPageVersion as `AppCustomProductPageVersionResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **422**, Unprocessable request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(AppCustomProductPageVersionResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 409: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 422: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppCustomProductPageVersions/ById/Relationships/AppCustomProductPageLocalizations/AppCustomProductPageVersionsByIdRelationshipsAppCustomProductPageLocalizations.GET.f65ae9f.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppCustomProductPageVersions/ById/Relationships/AppCustomProductPageLocalizations/AppCustomProductPageVersionsByIdRelationshipsAppCustomProductPageLocalizations.GET.f65ae9f.generated.swift new file mode 100644 index 00000000..f5bcd558 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppCustomProductPageVersions/ById/Relationships/AppCustomProductPageLocalizations/AppCustomProductPageVersionsByIdRelationshipsAppCustomProductPageLocalizations.GET.f65ae9f.generated.swift @@ -0,0 +1,88 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.AppCustomProductPageVersions.ById.Relationships.AppCustomProductPageLocalizations { + public struct GET: Endpoint { + public typealias Response = AppCustomProductPageVersionAppCustomProductPageLocalizationsLinkagesResponse + + public var path: String { + "/v1/appCustomProductPageVersions/\(id)/relationships/appCustomProductPageLocalizations" + } + + /// the id of the requested resource + public var id: String + + public var parameters: Parameters = Parameters() + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + components?.queryItems = [ + URLQueryItem(name: "limit", + value: parameters.limit.map { "\($0)" }) + ].filter { $0.value != nil } + if components?.queryItems?.isEmpty ?? false { + components?.queryItems = nil + } + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "GET" + return urlRequest + } + + /// - Returns: **200**, List of related linkages as `AppCustomProductPageVersionAppCustomProductPageLocalizationsLinkagesResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(AppCustomProductPageVersionAppCustomProductPageLocalizationsLinkagesResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +extension V1.AppCustomProductPageVersions.ById.Relationships.AppCustomProductPageLocalizations.GET { + public struct Parameters: Hashable { + /// maximum resources per page + public var limit: Int? + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppCustomProductPages/AppCustomProductPages.POST.707e21d.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppCustomProductPages/AppCustomProductPages.POST.707e21d.generated.swift index 7170989f..da18cac9 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppCustomProductPages/AppCustomProductPages.POST.707e21d.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppCustomProductPages/AppCustomProductPages.POST.707e21d.generated.swift @@ -41,8 +41,11 @@ extension V1.AppCustomProductPages { /// - Returns: **201**, Single AppCustomProductPage as `AppCustomProductPageResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **422**, Unprocessable request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -56,12 +59,21 @@ extension V1.AppCustomProductPages { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 409: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 422: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppCustomProductPages/ById/AppCustomProductPageVersions/AppCustomProductPagesByIdAppCustomProductPageVersions.GET.03c24a8.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppCustomProductPages/ById/AppCustomProductPageVersions/AppCustomProductPagesByIdAppCustomProductPageVersions.GET.03c24a8.generated.swift index 5e89e411..0d67931c 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppCustomProductPages/ById/AppCustomProductPageVersions/AppCustomProductPagesByIdAppCustomProductPageVersions.GET.03c24a8.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppCustomProductPages/ById/AppCustomProductPageVersions/AppCustomProductPagesByIdAppCustomProductPageVersions.GET.03c24a8.generated.swift @@ -54,8 +54,10 @@ extension V1.AppCustomProductPages.ById.AppCustomProductPageVersions { /// - Returns: **200**, List of AppCustomProductPageVersions as `AppCustomProductPageVersionsResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -69,12 +71,18 @@ extension V1.AppCustomProductPages.ById.AppCustomProductPageVersions { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 404: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -102,99 +110,99 @@ extension V1.AppCustomProductPages.ById.AppCustomProductPageVersions.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum AppCustomProductPageLocalizations: Hashable, Codable, RawRepresentable { - case appCustomProductPageVersion - case appPreviewSets - case appScreenshotSets - case locale - case promotionalText - case unknown(String) - - public var rawValue: String { - switch self { - case .appCustomProductPageVersion: return "appCustomProductPageVersion" - case .appPreviewSets: return "appPreviewSets" - case .appScreenshotSets: return "appScreenshotSets" - case .locale: return "locale" - case .promotionalText: return "promotionalText" - case .unknown(let rawValue): return rawValue - } + public struct AppCustomProductPageLocalizations: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var appCustomProductPageVersion: Self { + .init(rawValue: "appCustomProductPageVersion") + } + + public static var appPreviewSets: Self { + .init(rawValue: "appPreviewSets") + } + + public static var appScreenshotSets: Self { + .init(rawValue: "appScreenshotSets") } + public static var locale: Self { + .init(rawValue: "locale") + } + + public static var promotionalText: Self { + .init(rawValue: "promotionalText") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "appCustomProductPageVersion": self = .appCustomProductPageVersion - case "appPreviewSets": self = .appPreviewSets - case "appScreenshotSets": self = .appScreenshotSets - case "locale": self = .locale - case "promotionalText": self = .promotionalText - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum AppCustomProductPageVersions: Hashable, Codable, RawRepresentable { - case appCustomProductPage - case appCustomProductPageLocalizations - case state - case version - case unknown(String) + public struct AppCustomProductPageVersions: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var appCustomProductPage: Self { + .init(rawValue: "appCustomProductPage") + } + + public static var appCustomProductPageLocalizations: Self { + .init(rawValue: "appCustomProductPageLocalizations") + } + + public static var deepLink: Self { + .init(rawValue: "deepLink") + } + + public static var state: Self { + .init(rawValue: "state") + } - public var rawValue: String { - switch self { - case .appCustomProductPage: return "appCustomProductPage" - case .appCustomProductPageLocalizations: return "appCustomProductPageLocalizations" - case .state: return "state" - case .version: return "version" - case .unknown(let rawValue): return rawValue - } + public static var version: Self { + .init(rawValue: "version") } + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "appCustomProductPage": self = .appCustomProductPage - case "appCustomProductPageLocalizations": self = .appCustomProductPageLocalizations - case "state": self = .state - case "version": self = .version - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum AppCustomProductPages: Hashable, Codable, RawRepresentable { - case app - case appCustomProductPageVersions - case appStoreVersionTemplate - case customProductPageTemplate - case name - case url - case visible - case unknown(String) - - public var rawValue: String { - switch self { - case .app: return "app" - case .appCustomProductPageVersions: return "appCustomProductPageVersions" - case .appStoreVersionTemplate: return "appStoreVersionTemplate" - case .customProductPageTemplate: return "customProductPageTemplate" - case .name: return "name" - case .url: return "url" - case .visible: return "visible" - case .unknown(let rawValue): return rawValue - } + public struct AppCustomProductPages: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var app: Self { + .init(rawValue: "app") + } + + public static var appCustomProductPageVersions: Self { + .init(rawValue: "appCustomProductPageVersions") } + public static var name: Self { + .init(rawValue: "name") + } + + public static var url: Self { + .init(rawValue: "url") + } + + public static var visible: Self { + .init(rawValue: "visible") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "app": self = .app - case "appCustomProductPageVersions": self = .appCustomProductPageVersions - case "appStoreVersionTemplate": self = .appStoreVersionTemplate - case "customProductPageTemplate": self = .customProductPageTemplate - case "name": self = .name - case "url": self = .url - case "visible": self = .visible - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } @@ -230,43 +238,47 @@ extension V1.AppCustomProductPages.ById.AppCustomProductPageVersions.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum State: Hashable, Codable, RawRepresentable { - case accepted - case approved - case inReview - case prepareForSubmission - case readyForReview - case rejected - case replacedWithNewVersion - case waitingForReview - case unknown(String) - - public var rawValue: String { - switch self { - case .accepted: return "ACCEPTED" - case .approved: return "APPROVED" - case .inReview: return "IN_REVIEW" - case .prepareForSubmission: return "PREPARE_FOR_SUBMISSION" - case .readyForReview: return "READY_FOR_REVIEW" - case .rejected: return "REJECTED" - case .replacedWithNewVersion: return "REPLACED_WITH_NEW_VERSION" - case .waitingForReview: return "WAITING_FOR_REVIEW" - case .unknown(let rawValue): return rawValue - } + public struct State: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var accepted: Self { + .init(rawValue: "ACCEPTED") + } + + public static var approved: Self { + .init(rawValue: "APPROVED") } + public static var inReview: Self { + .init(rawValue: "IN_REVIEW") + } + + public static var prepareForSubmission: Self { + .init(rawValue: "PREPARE_FOR_SUBMISSION") + } + + public static var readyForReview: Self { + .init(rawValue: "READY_FOR_REVIEW") + } + + public static var rejected: Self { + .init(rawValue: "REJECTED") + } + + public static var replacedWithNewVersion: Self { + .init(rawValue: "REPLACED_WITH_NEW_VERSION") + } + + public static var waitingForReview: Self { + .init(rawValue: "WAITING_FOR_REVIEW") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "ACCEPTED": self = .accepted - case "APPROVED": self = .approved - case "IN_REVIEW": self = .inReview - case "PREPARE_FOR_SUBMISSION": self = .prepareForSubmission - case "READY_FOR_REVIEW": self = .readyForReview - case "REJECTED": self = .rejected - case "REPLACED_WITH_NEW_VERSION": self = .replacedWithNewVersion - case "WAITING_FOR_REVIEW": self = .waitingForReview - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } @@ -284,25 +296,23 @@ extension V1.AppCustomProductPages.ById.AppCustomProductPageVersions.GET { } } - public enum Include: Hashable, Codable, RawRepresentable { - case appCustomProductPage - case appCustomProductPageLocalizations - case unknown(String) + public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var appCustomProductPage: Self { + .init(rawValue: "appCustomProductPage") + } - public var rawValue: String { - switch self { - case .appCustomProductPage: return "appCustomProductPage" - case .appCustomProductPageLocalizations: return "appCustomProductPageLocalizations" - case .unknown(let rawValue): return rawValue - } + public static var appCustomProductPageLocalizations: Self { + .init(rawValue: "appCustomProductPageLocalizations") } + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "appCustomProductPage": self = .appCustomProductPage - case "appCustomProductPageLocalizations": self = .appCustomProductPageLocalizations - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppCustomProductPages/ById/AppCustomProductPagesById.DELETE.fd7ab83.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppCustomProductPages/ById/AppCustomProductPagesById.DELETE.fd7ab83.generated.swift index b008e5c3..b8adfcbb 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppCustomProductPages/ById/AppCustomProductPagesById.DELETE.fd7ab83.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppCustomProductPages/ById/AppCustomProductPagesById.DELETE.fd7ab83.generated.swift @@ -31,11 +31,12 @@ extension V1.AppCustomProductPages.ById { return urlRequest } - /// - Returns: **204**, Success (no content) /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -43,12 +44,12 @@ extension V1.AppCustomProductPages.ById { } switch urlResponse.statusCode { - case 204: - return - case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) @@ -58,6 +59,9 @@ extension V1.AppCustomProductPages.ById { case 409: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppCustomProductPages/ById/AppCustomProductPagesById.GET.fd7ab83.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppCustomProductPages/ById/AppCustomProductPagesById.GET.fd7ab83.generated.swift index acc88428..7d6d8db7 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppCustomProductPages/ById/AppCustomProductPagesById.GET.fd7ab83.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppCustomProductPages/ById/AppCustomProductPagesById.GET.fd7ab83.generated.swift @@ -48,8 +48,10 @@ extension V1.AppCustomProductPages.ById { /// - Returns: **200**, Single AppCustomProductPage as `AppCustomProductPageResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -63,12 +65,18 @@ extension V1.AppCustomProductPages.ById { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 404: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -93,68 +101,67 @@ extension V1.AppCustomProductPages.ById.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum AppCustomProductPageVersions: Hashable, Codable, RawRepresentable { - case appCustomProductPage - case appCustomProductPageLocalizations - case state - case version - case unknown(String) + public struct AppCustomProductPageVersions: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var appCustomProductPage: Self { + .init(rawValue: "appCustomProductPage") + } + + public static var appCustomProductPageLocalizations: Self { + .init(rawValue: "appCustomProductPageLocalizations") + } + + public static var deepLink: Self { + .init(rawValue: "deepLink") + } + + public static var state: Self { + .init(rawValue: "state") + } + + public static var version: Self { + .init(rawValue: "version") + } - public var rawValue: String { - switch self { - case .appCustomProductPage: return "appCustomProductPage" - case .appCustomProductPageLocalizations: return "appCustomProductPageLocalizations" - case .state: return "state" - case .version: return "version" - case .unknown(let rawValue): return rawValue - } + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "appCustomProductPage": self = .appCustomProductPage - case "appCustomProductPageLocalizations": self = .appCustomProductPageLocalizations - case "state": self = .state - case "version": self = .version - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum AppCustomProductPages: Hashable, Codable, RawRepresentable { - case app - case appCustomProductPageVersions - case appStoreVersionTemplate - case customProductPageTemplate - case name - case url - case visible - case unknown(String) - - public var rawValue: String { - switch self { - case .app: return "app" - case .appCustomProductPageVersions: return "appCustomProductPageVersions" - case .appStoreVersionTemplate: return "appStoreVersionTemplate" - case .customProductPageTemplate: return "customProductPageTemplate" - case .name: return "name" - case .url: return "url" - case .visible: return "visible" - case .unknown(let rawValue): return rawValue - } + public struct AppCustomProductPages: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var app: Self { + .init(rawValue: "app") + } + + public static var appCustomProductPageVersions: Self { + .init(rawValue: "appCustomProductPageVersions") } + public static var name: Self { + .init(rawValue: "name") + } + + public static var url: Self { + .init(rawValue: "url") + } + + public static var visible: Self { + .init(rawValue: "visible") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "app": self = .app - case "appCustomProductPageVersions": self = .appCustomProductPageVersions - case "appStoreVersionTemplate": self = .appStoreVersionTemplate - case "customProductPageTemplate": self = .customProductPageTemplate - case "name": self = .name - case "url": self = .url - case "visible": self = .visible - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } @@ -177,25 +184,23 @@ extension V1.AppCustomProductPages.ById.GET { } } - public enum Include: Hashable, Codable, RawRepresentable { - case app - case appCustomProductPageVersions - case unknown(String) + public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var app: Self { + .init(rawValue: "app") + } - public var rawValue: String { - switch self { - case .app: return "app" - case .appCustomProductPageVersions: return "appCustomProductPageVersions" - case .unknown(let rawValue): return rawValue - } + public static var appCustomProductPageVersions: Self { + .init(rawValue: "appCustomProductPageVersions") } + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "app": self = .app - case "appCustomProductPageVersions": self = .appCustomProductPageVersions - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppCustomProductPages/ById/AppCustomProductPagesById.PATCH.fd7ab83.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppCustomProductPages/ById/AppCustomProductPagesById.PATCH.fd7ab83.generated.swift index 9b45358a..2b4af4cb 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppCustomProductPages/ById/AppCustomProductPagesById.PATCH.fd7ab83.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppCustomProductPages/ById/AppCustomProductPagesById.PATCH.fd7ab83.generated.swift @@ -48,9 +48,12 @@ extension V1.AppCustomProductPages.ById { /// - Returns: **200**, Single AppCustomProductPage as `AppCustomProductPageResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **422**, Unprocessable request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -64,6 +67,9 @@ extension V1.AppCustomProductPages.ById { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) @@ -73,6 +79,12 @@ extension V1.AppCustomProductPages.ById { case 409: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 422: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppCustomProductPages/ById/Relationships/AppCustomProductPageVersions/AppCustomProductPagesByIdRelationshipsAppCustomProductPageVersions.GET.59c6a85.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppCustomProductPages/ById/Relationships/AppCustomProductPageVersions/AppCustomProductPagesByIdRelationshipsAppCustomProductPageVersions.GET.59c6a85.generated.swift new file mode 100644 index 00000000..9e2b8617 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppCustomProductPages/ById/Relationships/AppCustomProductPageVersions/AppCustomProductPagesByIdRelationshipsAppCustomProductPageVersions.GET.59c6a85.generated.swift @@ -0,0 +1,88 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.AppCustomProductPages.ById.Relationships.AppCustomProductPageVersions { + public struct GET: Endpoint { + public typealias Response = AppCustomProductPageAppCustomProductPageVersionsLinkagesResponse + + public var path: String { + "/v1/appCustomProductPages/\(id)/relationships/appCustomProductPageVersions" + } + + /// the id of the requested resource + public var id: String + + public var parameters: Parameters = Parameters() + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + components?.queryItems = [ + URLQueryItem(name: "limit", + value: parameters.limit.map { "\($0)" }) + ].filter { $0.value != nil } + if components?.queryItems?.isEmpty ?? false { + components?.queryItems = nil + } + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "GET" + return urlRequest + } + + /// - Returns: **200**, List of related linkages as `AppCustomProductPageAppCustomProductPageVersionsLinkagesResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(AppCustomProductPageAppCustomProductPageVersionsLinkagesResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +extension V1.AppCustomProductPages.ById.Relationships.AppCustomProductPageVersions.GET { + public struct Parameters: Hashable { + /// maximum resources per page + public var limit: Int? + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppEncryptionDeclarationDocuments/AppEncryptionDeclarationDocuments.POST.7e9619f.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppEncryptionDeclarationDocuments/AppEncryptionDeclarationDocuments.POST.7e9619f.generated.swift index a8c8632f..cb457568 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppEncryptionDeclarationDocuments/AppEncryptionDeclarationDocuments.POST.7e9619f.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppEncryptionDeclarationDocuments/AppEncryptionDeclarationDocuments.POST.7e9619f.generated.swift @@ -41,8 +41,11 @@ extension V1.AppEncryptionDeclarationDocuments { /// - Returns: **201**, Single AppEncryptionDeclarationDocument as `AppEncryptionDeclarationDocumentResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **422**, Unprocessable request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -56,12 +59,21 @@ extension V1.AppEncryptionDeclarationDocuments { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 409: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 422: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppEncryptionDeclarationDocuments/ById/AppEncryptionDeclarationDocumentsById.GET.73613c9.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppEncryptionDeclarationDocuments/ById/AppEncryptionDeclarationDocumentsById.GET.73613c9.generated.swift index 261acb9f..ad97eee8 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppEncryptionDeclarationDocuments/ById/AppEncryptionDeclarationDocumentsById.GET.73613c9.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppEncryptionDeclarationDocuments/ById/AppEncryptionDeclarationDocumentsById.GET.73613c9.generated.swift @@ -42,8 +42,10 @@ extension V1.AppEncryptionDeclarationDocuments.ById { /// - Returns: **200**, Single AppEncryptionDeclarationDocument as `AppEncryptionDeclarationDocumentResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -57,12 +59,18 @@ extension V1.AppEncryptionDeclarationDocuments.ById { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 404: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -82,46 +90,43 @@ extension V1.AppEncryptionDeclarationDocuments.ById.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum AppEncryptionDeclarationDocuments: Hashable, Codable, RawRepresentable { - case appEncryptionDeclaration - case assetDeliveryState - case assetToken - case downloadUrl - case fileName - case fileSize - case sourceFileChecksum - case uploadOperations - case uploaded - case unknown(String) - - public var rawValue: String { - switch self { - case .appEncryptionDeclaration: return "appEncryptionDeclaration" - case .assetDeliveryState: return "assetDeliveryState" - case .assetToken: return "assetToken" - case .downloadUrl: return "downloadUrl" - case .fileName: return "fileName" - case .fileSize: return "fileSize" - case .sourceFileChecksum: return "sourceFileChecksum" - case .uploadOperations: return "uploadOperations" - case .uploaded: return "uploaded" - case .unknown(let rawValue): return rawValue - } + public struct AppEncryptionDeclarationDocuments: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var assetDeliveryState: Self { + .init(rawValue: "assetDeliveryState") + } + + public static var assetToken: Self { + .init(rawValue: "assetToken") + } + + public static var downloadUrl: Self { + .init(rawValue: "downloadUrl") + } + + public static var fileName: Self { + .init(rawValue: "fileName") } + public static var fileSize: Self { + .init(rawValue: "fileSize") + } + + public static var sourceFileChecksum: Self { + .init(rawValue: "sourceFileChecksum") + } + + public static var uploadOperations: Self { + .init(rawValue: "uploadOperations") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "appEncryptionDeclaration": self = .appEncryptionDeclaration - case "assetDeliveryState": self = .assetDeliveryState - case "assetToken": self = .assetToken - case "downloadUrl": self = .downloadUrl - case "fileName": self = .fileName - case "fileSize": self = .fileSize - case "sourceFileChecksum": self = .sourceFileChecksum - case "uploadOperations": self = .uploadOperations - case "uploaded": self = .uploaded - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppEncryptionDeclarationDocuments/ById/AppEncryptionDeclarationDocumentsById.PATCH.73613c9.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppEncryptionDeclarationDocuments/ById/AppEncryptionDeclarationDocumentsById.PATCH.73613c9.generated.swift index e71e681a..f1625761 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppEncryptionDeclarationDocuments/ById/AppEncryptionDeclarationDocumentsById.PATCH.73613c9.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppEncryptionDeclarationDocuments/ById/AppEncryptionDeclarationDocumentsById.PATCH.73613c9.generated.swift @@ -48,9 +48,12 @@ extension V1.AppEncryptionDeclarationDocuments.ById { /// - Returns: **200**, Single AppEncryptionDeclarationDocument as `AppEncryptionDeclarationDocumentResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **422**, Unprocessable request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -64,6 +67,9 @@ extension V1.AppEncryptionDeclarationDocuments.ById { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) @@ -73,6 +79,12 @@ extension V1.AppEncryptionDeclarationDocuments.ById { case 409: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 422: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppEncryptionDeclarations/AppEncryptionDeclarations.GET.dc4b248.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppEncryptionDeclarations/AppEncryptionDeclarations.GET.dc4b248.generated.swift index 153f62d1..7b8a7683 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppEncryptionDeclarations/AppEncryptionDeclarations.GET.dc4b248.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppEncryptionDeclarations/AppEncryptionDeclarations.GET.dc4b248.generated.swift @@ -55,7 +55,9 @@ extension V1.AppEncryptionDeclarations { /// - Returns: **200**, List of AppEncryptionDeclarations as `AppEncryptionDeclarationsResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -69,9 +71,15 @@ extension V1.AppEncryptionDeclarations { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -99,261 +107,335 @@ extension V1.AppEncryptionDeclarations.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum AppEncryptionDeclarationDocuments: Hashable, Codable, RawRepresentable { - case appEncryptionDeclaration - case assetDeliveryState - case assetToken - case downloadUrl - case fileName - case fileSize - case sourceFileChecksum - case uploadOperations - case uploaded - case unknown(String) - - public var rawValue: String { - switch self { - case .appEncryptionDeclaration: return "appEncryptionDeclaration" - case .assetDeliveryState: return "assetDeliveryState" - case .assetToken: return "assetToken" - case .downloadUrl: return "downloadUrl" - case .fileName: return "fileName" - case .fileSize: return "fileSize" - case .sourceFileChecksum: return "sourceFileChecksum" - case .uploadOperations: return "uploadOperations" - case .uploaded: return "uploaded" - case .unknown(let rawValue): return rawValue - } + public struct AppEncryptionDeclarationDocuments: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var assetDeliveryState: Self { + .init(rawValue: "assetDeliveryState") + } + + public static var assetToken: Self { + .init(rawValue: "assetToken") + } + + public static var downloadUrl: Self { + .init(rawValue: "downloadUrl") + } + + public static var fileName: Self { + .init(rawValue: "fileName") + } + + public static var fileSize: Self { + .init(rawValue: "fileSize") + } + + public static var sourceFileChecksum: Self { + .init(rawValue: "sourceFileChecksum") } + public static var uploadOperations: Self { + .init(rawValue: "uploadOperations") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "appEncryptionDeclaration": self = .appEncryptionDeclaration - case "assetDeliveryState": self = .assetDeliveryState - case "assetToken": self = .assetToken - case "downloadUrl": self = .downloadUrl - case "fileName": self = .fileName - case "fileSize": self = .fileSize - case "sourceFileChecksum": self = .sourceFileChecksum - case "uploadOperations": self = .uploadOperations - case "uploaded": self = .uploaded - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum AppEncryptionDeclarations: Hashable, Codable, RawRepresentable { - case app - case appDescription - case appEncryptionDeclarationDocument - case appEncryptionDeclarationState - case availableOnFrenchStore - case builds - case codeValue - case containsProprietaryCryptography - case containsThirdPartyCryptography - case createdDate - case documentName - case documentType - case documentUrl - case exempt - case platform - case uploadedDate - case usesEncryption - case unknown(String) - - public var rawValue: String { - switch self { - case .app: return "app" - case .appDescription: return "appDescription" - case .appEncryptionDeclarationDocument: return "appEncryptionDeclarationDocument" - case .appEncryptionDeclarationState: return "appEncryptionDeclarationState" - case .availableOnFrenchStore: return "availableOnFrenchStore" - case .builds: return "builds" - case .codeValue: return "codeValue" - case .containsProprietaryCryptography: return "containsProprietaryCryptography" - case .containsThirdPartyCryptography: return "containsThirdPartyCryptography" - case .createdDate: return "createdDate" - case .documentName: return "documentName" - case .documentType: return "documentType" - case .documentUrl: return "documentUrl" - case .exempt: return "exempt" - case .platform: return "platform" - case .uploadedDate: return "uploadedDate" - case .usesEncryption: return "usesEncryption" - case .unknown(let rawValue): return rawValue - } + public struct AppEncryptionDeclarations: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var app: Self { + .init(rawValue: "app") + } + + public static var appDescription: Self { + .init(rawValue: "appDescription") + } + + public static var appEncryptionDeclarationDocument: Self { + .init(rawValue: "appEncryptionDeclarationDocument") + } + + public static var appEncryptionDeclarationState: Self { + .init(rawValue: "appEncryptionDeclarationState") + } + + public static var availableOnFrenchStore: Self { + .init(rawValue: "availableOnFrenchStore") + } + + public static var builds: Self { + .init(rawValue: "builds") + } + + public static var codeValue: Self { + .init(rawValue: "codeValue") + } + + public static var containsProprietaryCryptography: Self { + .init(rawValue: "containsProprietaryCryptography") + } + + public static var containsThirdPartyCryptography: Self { + .init(rawValue: "containsThirdPartyCryptography") + } + + public static var createdDate: Self { + .init(rawValue: "createdDate") + } + + public static var documentName: Self { + .init(rawValue: "documentName") + } + + public static var documentType: Self { + .init(rawValue: "documentType") + } + + public static var documentUrl: Self { + .init(rawValue: "documentUrl") } + public static var exempt: Self { + .init(rawValue: "exempt") + } + + public static var platform: Self { + .init(rawValue: "platform") + } + + public static var uploadedDate: Self { + .init(rawValue: "uploadedDate") + } + + public static var usesEncryption: Self { + .init(rawValue: "usesEncryption") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "app": self = .app - case "appDescription": self = .appDescription - case "appEncryptionDeclarationDocument": self = .appEncryptionDeclarationDocument - case "appEncryptionDeclarationState": self = .appEncryptionDeclarationState - case "availableOnFrenchStore": self = .availableOnFrenchStore - case "builds": self = .builds - case "codeValue": self = .codeValue - case "containsProprietaryCryptography": self = .containsProprietaryCryptography - case "containsThirdPartyCryptography": self = .containsThirdPartyCryptography - case "createdDate": self = .createdDate - case "documentName": self = .documentName - case "documentType": self = .documentType - case "documentUrl": self = .documentUrl - case "exempt": self = .exempt - case "platform": self = .platform - case "uploadedDate": self = .uploadedDate - case "usesEncryption": self = .usesEncryption - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum Apps: Hashable, Codable, RawRepresentable { - case appAvailability - case appClips - case appCustomProductPages - case appEncryptionDeclarations - case appEvents - case appInfos - case appPricePoints - case appPriceSchedule - case appStoreVersionExperimentsV2 - case appStoreVersions - case availableInNewTerritories - case availableTerritories - case betaAppLocalizations - case betaAppReviewDetail - case betaGroups - case betaLicenseAgreement - case betaTesters - case builds - case bundleId - case ciProduct - case contentRightsDeclaration - case customerReviews - case endUserLicenseAgreement - case gameCenterDetail - case gameCenterEnabledVersions - case inAppPurchases - case inAppPurchasesV2 - case isOrEverWasMadeForKids - case name - case perfPowerMetrics - case preOrder - case preReleaseVersions - case pricePoints - case prices - case primaryLocale - case promotedPurchases - case reviewSubmissions - case sku - case subscriptionGracePeriod - case subscriptionGroups - case subscriptionStatusUrl - case subscriptionStatusUrlForSandbox - case subscriptionStatusUrlVersion - case subscriptionStatusUrlVersionForSandbox - case unknown(String) - - public var rawValue: String { - switch self { - case .appAvailability: return "appAvailability" - case .appClips: return "appClips" - case .appCustomProductPages: return "appCustomProductPages" - case .appEncryptionDeclarations: return "appEncryptionDeclarations" - case .appEvents: return "appEvents" - case .appInfos: return "appInfos" - case .appPricePoints: return "appPricePoints" - case .appPriceSchedule: return "appPriceSchedule" - case .appStoreVersionExperimentsV2: return "appStoreVersionExperimentsV2" - case .appStoreVersions: return "appStoreVersions" - case .availableInNewTerritories: return "availableInNewTerritories" - case .availableTerritories: return "availableTerritories" - case .betaAppLocalizations: return "betaAppLocalizations" - case .betaAppReviewDetail: return "betaAppReviewDetail" - case .betaGroups: return "betaGroups" - case .betaLicenseAgreement: return "betaLicenseAgreement" - case .betaTesters: return "betaTesters" - case .builds: return "builds" - case .bundleId: return "bundleId" - case .ciProduct: return "ciProduct" - case .contentRightsDeclaration: return "contentRightsDeclaration" - case .customerReviews: return "customerReviews" - case .endUserLicenseAgreement: return "endUserLicenseAgreement" - case .gameCenterDetail: return "gameCenterDetail" - case .gameCenterEnabledVersions: return "gameCenterEnabledVersions" - case .inAppPurchases: return "inAppPurchases" - case .inAppPurchasesV2: return "inAppPurchasesV2" - case .isOrEverWasMadeForKids: return "isOrEverWasMadeForKids" - case .name: return "name" - case .perfPowerMetrics: return "perfPowerMetrics" - case .preOrder: return "preOrder" - case .preReleaseVersions: return "preReleaseVersions" - case .pricePoints: return "pricePoints" - case .prices: return "prices" - case .primaryLocale: return "primaryLocale" - case .promotedPurchases: return "promotedPurchases" - case .reviewSubmissions: return "reviewSubmissions" - case .sku: return "sku" - case .subscriptionGracePeriod: return "subscriptionGracePeriod" - case .subscriptionGroups: return "subscriptionGroups" - case .subscriptionStatusUrl: return "subscriptionStatusUrl" - case .subscriptionStatusUrlForSandbox: return "subscriptionStatusUrlForSandbox" - case .subscriptionStatusUrlVersion: return "subscriptionStatusUrlVersion" - case .subscriptionStatusUrlVersionForSandbox: return "subscriptionStatusUrlVersionForSandbox" - case .unknown(let rawValue): return rawValue - } + public struct Apps: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var accessibilityDeclarations: Self { + .init(rawValue: "accessibilityDeclarations") + } + + public static var accessibilityUrl: Self { + .init(rawValue: "accessibilityUrl") + } + + public static var alternativeDistributionKey: Self { + .init(rawValue: "alternativeDistributionKey") + } + + public static var analyticsReportRequests: Self { + .init(rawValue: "analyticsReportRequests") + } + + public static var appAvailabilityV2: Self { + .init(rawValue: "appAvailabilityV2") + } + + public static var appClips: Self { + .init(rawValue: "appClips") + } + + public static var appCustomProductPages: Self { + .init(rawValue: "appCustomProductPages") + } + + public static var appEncryptionDeclarations: Self { + .init(rawValue: "appEncryptionDeclarations") + } + + public static var appEvents: Self { + .init(rawValue: "appEvents") + } + + public static var appInfos: Self { + .init(rawValue: "appInfos") + } + + public static var appPricePoints: Self { + .init(rawValue: "appPricePoints") + } + + public static var appPriceSchedule: Self { + .init(rawValue: "appPriceSchedule") + } + + public static var appStoreVersionExperimentsV2: Self { + .init(rawValue: "appStoreVersionExperimentsV2") + } + + public static var appStoreVersions: Self { + .init(rawValue: "appStoreVersions") + } + + public static var backgroundAssets: Self { + .init(rawValue: "backgroundAssets") + } + + public static var betaAppLocalizations: Self { + .init(rawValue: "betaAppLocalizations") + } + + public static var betaAppReviewDetail: Self { + .init(rawValue: "betaAppReviewDetail") } + public static var betaFeedbackCrashSubmissions: Self { + .init(rawValue: "betaFeedbackCrashSubmissions") + } + + public static var betaFeedbackScreenshotSubmissions: Self { + .init(rawValue: "betaFeedbackScreenshotSubmissions") + } + + public static var betaGroups: Self { + .init(rawValue: "betaGroups") + } + + public static var betaLicenseAgreement: Self { + .init(rawValue: "betaLicenseAgreement") + } + + public static var betaTesters: Self { + .init(rawValue: "betaTesters") + } + + public static var builds: Self { + .init(rawValue: "builds") + } + + public static var bundleId: Self { + .init(rawValue: "bundleId") + } + + public static var ciProduct: Self { + .init(rawValue: "ciProduct") + } + + public static var contentRightsDeclaration: Self { + .init(rawValue: "contentRightsDeclaration") + } + + public static var customerReviewSummarizations: Self { + .init(rawValue: "customerReviewSummarizations") + } + + public static var customerReviews: Self { + .init(rawValue: "customerReviews") + } + + public static var endUserLicenseAgreement: Self { + .init(rawValue: "endUserLicenseAgreement") + } + + public static var gameCenterDetail: Self { + .init(rawValue: "gameCenterDetail") + } + + public static var gameCenterEnabledVersions: Self { + .init(rawValue: "gameCenterEnabledVersions") + } + + public static var inAppPurchases: Self { + .init(rawValue: "inAppPurchases") + } + + public static var inAppPurchasesV2: Self { + .init(rawValue: "inAppPurchasesV2") + } + + public static var isOrEverWasMadeForKids: Self { + .init(rawValue: "isOrEverWasMadeForKids") + } + + public static var marketplaceSearchDetail: Self { + .init(rawValue: "marketplaceSearchDetail") + } + + public static var name: Self { + .init(rawValue: "name") + } + + public static var perfPowerMetrics: Self { + .init(rawValue: "perfPowerMetrics") + } + + public static var preReleaseVersions: Self { + .init(rawValue: "preReleaseVersions") + } + + public static var primaryLocale: Self { + .init(rawValue: "primaryLocale") + } + + public static var promotedPurchases: Self { + .init(rawValue: "promotedPurchases") + } + + public static var reviewSubmissions: Self { + .init(rawValue: "reviewSubmissions") + } + + public static var sku: Self { + .init(rawValue: "sku") + } + + public static var streamlinedPurchasingEnabled: Self { + .init(rawValue: "streamlinedPurchasingEnabled") + } + + public static var subscriptionGracePeriod: Self { + .init(rawValue: "subscriptionGracePeriod") + } + + public static var subscriptionGroups: Self { + .init(rawValue: "subscriptionGroups") + } + + public static var subscriptionStatusUrl: Self { + .init(rawValue: "subscriptionStatusUrl") + } + + public static var subscriptionStatusUrlForSandbox: Self { + .init(rawValue: "subscriptionStatusUrlForSandbox") + } + + public static var subscriptionStatusUrlVersion: Self { + .init(rawValue: "subscriptionStatusUrlVersion") + } + + public static var subscriptionStatusUrlVersionForSandbox: Self { + .init(rawValue: "subscriptionStatusUrlVersionForSandbox") + } + + public static var webhooks: Self { + .init(rawValue: "webhooks") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "appAvailability": self = .appAvailability - case "appClips": self = .appClips - case "appCustomProductPages": self = .appCustomProductPages - case "appEncryptionDeclarations": self = .appEncryptionDeclarations - case "appEvents": self = .appEvents - case "appInfos": self = .appInfos - case "appPricePoints": self = .appPricePoints - case "appPriceSchedule": self = .appPriceSchedule - case "appStoreVersionExperimentsV2": self = .appStoreVersionExperimentsV2 - case "appStoreVersions": self = .appStoreVersions - case "availableInNewTerritories": self = .availableInNewTerritories - case "availableTerritories": self = .availableTerritories - case "betaAppLocalizations": self = .betaAppLocalizations - case "betaAppReviewDetail": self = .betaAppReviewDetail - case "betaGroups": self = .betaGroups - case "betaLicenseAgreement": self = .betaLicenseAgreement - case "betaTesters": self = .betaTesters - case "builds": self = .builds - case "bundleId": self = .bundleId - case "ciProduct": self = .ciProduct - case "contentRightsDeclaration": self = .contentRightsDeclaration - case "customerReviews": self = .customerReviews - case "endUserLicenseAgreement": self = .endUserLicenseAgreement - case "gameCenterDetail": self = .gameCenterDetail - case "gameCenterEnabledVersions": self = .gameCenterEnabledVersions - case "inAppPurchases": self = .inAppPurchases - case "inAppPurchasesV2": self = .inAppPurchasesV2 - case "isOrEverWasMadeForKids": self = .isOrEverWasMadeForKids - case "name": self = .name - case "perfPowerMetrics": self = .perfPowerMetrics - case "preOrder": self = .preOrder - case "preReleaseVersions": self = .preReleaseVersions - case "pricePoints": self = .pricePoints - case "prices": self = .prices - case "primaryLocale": self = .primaryLocale - case "promotedPurchases": self = .promotedPurchases - case "reviewSubmissions": self = .reviewSubmissions - case "sku": self = .sku - case "subscriptionGracePeriod": self = .subscriptionGracePeriod - case "subscriptionGroups": self = .subscriptionGroups - case "subscriptionStatusUrl": self = .subscriptionStatusUrl - case "subscriptionStatusUrlForSandbox": self = .subscriptionStatusUrlForSandbox - case "subscriptionStatusUrlVersion": self = .subscriptionStatusUrlVersion - case "subscriptionStatusUrlVersionForSandbox": self = .subscriptionStatusUrlVersionForSandbox - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } @@ -389,28 +471,31 @@ extension V1.AppEncryptionDeclarations.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum Platform: Hashable, Codable, RawRepresentable { - case iOS - case macOS - case tvOS - case unknown(String) + public struct Platform: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var iOS: Self { + .init(rawValue: "IOS") + } - public var rawValue: String { - switch self { - case .iOS: return "IOS" - case .macOS: return "MAC_OS" - case .tvOS: return "TV_OS" - case .unknown(let rawValue): return rawValue - } + public static var macOS: Self { + .init(rawValue: "MAC_OS") } + public static var tvOS: Self { + .init(rawValue: "TV_OS") + } + + public static var visionOS: Self { + .init(rawValue: "VISION_OS") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "IOS": self = .iOS - case "MAC_OS": self = .macOS - case "TV_OS": self = .tvOS - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } @@ -438,28 +523,27 @@ extension V1.AppEncryptionDeclarations.GET { } } - public enum Include: Hashable, Codable, RawRepresentable { - case app - case appEncryptionDeclarationDocument - case builds - case unknown(String) + public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var app: Self { + .init(rawValue: "app") + } - public var rawValue: String { - switch self { - case .app: return "app" - case .appEncryptionDeclarationDocument: return "appEncryptionDeclarationDocument" - case .builds: return "builds" - case .unknown(let rawValue): return rawValue - } + public static var appEncryptionDeclarationDocument: Self { + .init(rawValue: "appEncryptionDeclarationDocument") + } + + public static var builds: Self { + .init(rawValue: "builds") + } + + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "app": self = .app - case "appEncryptionDeclarationDocument": self = .appEncryptionDeclarationDocument - case "builds": self = .builds - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppEncryptionDeclarations/AppEncryptionDeclarations.POST.dc4b248.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppEncryptionDeclarations/AppEncryptionDeclarations.POST.dc4b248.generated.swift new file mode 100644 index 00000000..247a1f83 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppEncryptionDeclarations/AppEncryptionDeclarations.POST.dc4b248.generated.swift @@ -0,0 +1,84 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.AppEncryptionDeclarations { + public struct POST: Endpoint { + public typealias Parameters = AppEncryptionDeclarationCreateRequest + public typealias Response = AppEncryptionDeclarationResponse + + public var path: String { + "/v1/appEncryptionDeclarations" + } + + /// AppEncryptionDeclaration representation + public var parameters: Parameters + + public init(parameters: Parameters) { + self.parameters = parameters + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "POST" + + var jsonEncoder: JSONEncoder { + let encoder = JSONEncoder() + return encoder + } + + urlRequest?.httpBody = try jsonEncoder.encode(parameters) + urlRequest?.setValue("application/json", forHTTPHeaderField: "Content-Type") + return urlRequest + } + + /// - Returns: **201**, Single AppEncryptionDeclaration as `AppEncryptionDeclarationResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **422**, Unprocessable request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 201: + return try jsonDecoder.decode(AppEncryptionDeclarationResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 409: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 422: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppEncryptionDeclarations/ById/App/AppEncryptionDeclarationsByIdApp.GET.2323707.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppEncryptionDeclarations/ById/App/AppEncryptionDeclarationsByIdApp.GET.2323707.generated.swift index b5fb2e63..328e4a66 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppEncryptionDeclarations/ById/App/AppEncryptionDeclarationsByIdApp.GET.2323707.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppEncryptionDeclarations/ById/App/AppEncryptionDeclarationsByIdApp.GET.2323707.generated.swift @@ -7,6 +7,7 @@ import FoundationNetworking #endif extension V1.AppEncryptionDeclarations.ById.App { + @available(*, deprecated) public struct GET: Endpoint { public typealias Response = AppWithoutIncludesResponse @@ -42,8 +43,10 @@ extension V1.AppEncryptionDeclarations.ById.App { /// - Returns: **200**, Single App with get as `AppWithoutIncludesResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -57,12 +60,18 @@ extension V1.AppEncryptionDeclarations.ById.App { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 404: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -82,151 +91,215 @@ extension V1.AppEncryptionDeclarations.ById.App.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum Apps: Hashable, Codable, RawRepresentable { - case appAvailability - case appClips - case appCustomProductPages - case appEncryptionDeclarations - case appEvents - case appInfos - case appPricePoints - case appPriceSchedule - case appStoreVersionExperimentsV2 - case appStoreVersions - case availableInNewTerritories - case availableTerritories - case betaAppLocalizations - case betaAppReviewDetail - case betaGroups - case betaLicenseAgreement - case betaTesters - case builds - case bundleId - case ciProduct - case contentRightsDeclaration - case customerReviews - case endUserLicenseAgreement - case gameCenterDetail - case gameCenterEnabledVersions - case inAppPurchases - case inAppPurchasesV2 - case isOrEverWasMadeForKids - case name - case perfPowerMetrics - case preOrder - case preReleaseVersions - case pricePoints - case prices - case primaryLocale - case promotedPurchases - case reviewSubmissions - case sku - case subscriptionGracePeriod - case subscriptionGroups - case subscriptionStatusUrl - case subscriptionStatusUrlForSandbox - case subscriptionStatusUrlVersion - case subscriptionStatusUrlVersionForSandbox - case unknown(String) - - public var rawValue: String { - switch self { - case .appAvailability: return "appAvailability" - case .appClips: return "appClips" - case .appCustomProductPages: return "appCustomProductPages" - case .appEncryptionDeclarations: return "appEncryptionDeclarations" - case .appEvents: return "appEvents" - case .appInfos: return "appInfos" - case .appPricePoints: return "appPricePoints" - case .appPriceSchedule: return "appPriceSchedule" - case .appStoreVersionExperimentsV2: return "appStoreVersionExperimentsV2" - case .appStoreVersions: return "appStoreVersions" - case .availableInNewTerritories: return "availableInNewTerritories" - case .availableTerritories: return "availableTerritories" - case .betaAppLocalizations: return "betaAppLocalizations" - case .betaAppReviewDetail: return "betaAppReviewDetail" - case .betaGroups: return "betaGroups" - case .betaLicenseAgreement: return "betaLicenseAgreement" - case .betaTesters: return "betaTesters" - case .builds: return "builds" - case .bundleId: return "bundleId" - case .ciProduct: return "ciProduct" - case .contentRightsDeclaration: return "contentRightsDeclaration" - case .customerReviews: return "customerReviews" - case .endUserLicenseAgreement: return "endUserLicenseAgreement" - case .gameCenterDetail: return "gameCenterDetail" - case .gameCenterEnabledVersions: return "gameCenterEnabledVersions" - case .inAppPurchases: return "inAppPurchases" - case .inAppPurchasesV2: return "inAppPurchasesV2" - case .isOrEverWasMadeForKids: return "isOrEverWasMadeForKids" - case .name: return "name" - case .perfPowerMetrics: return "perfPowerMetrics" - case .preOrder: return "preOrder" - case .preReleaseVersions: return "preReleaseVersions" - case .pricePoints: return "pricePoints" - case .prices: return "prices" - case .primaryLocale: return "primaryLocale" - case .promotedPurchases: return "promotedPurchases" - case .reviewSubmissions: return "reviewSubmissions" - case .sku: return "sku" - case .subscriptionGracePeriod: return "subscriptionGracePeriod" - case .subscriptionGroups: return "subscriptionGroups" - case .subscriptionStatusUrl: return "subscriptionStatusUrl" - case .subscriptionStatusUrlForSandbox: return "subscriptionStatusUrlForSandbox" - case .subscriptionStatusUrlVersion: return "subscriptionStatusUrlVersion" - case .subscriptionStatusUrlVersionForSandbox: return "subscriptionStatusUrlVersionForSandbox" - case .unknown(let rawValue): return rawValue - } + public struct Apps: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var accessibilityDeclarations: Self { + .init(rawValue: "accessibilityDeclarations") + } + + public static var accessibilityUrl: Self { + .init(rawValue: "accessibilityUrl") + } + + public static var alternativeDistributionKey: Self { + .init(rawValue: "alternativeDistributionKey") + } + + public static var analyticsReportRequests: Self { + .init(rawValue: "analyticsReportRequests") + } + + public static var appAvailabilityV2: Self { + .init(rawValue: "appAvailabilityV2") + } + + public static var appClips: Self { + .init(rawValue: "appClips") } + public static var appCustomProductPages: Self { + .init(rawValue: "appCustomProductPages") + } + + public static var appEncryptionDeclarations: Self { + .init(rawValue: "appEncryptionDeclarations") + } + + public static var appEvents: Self { + .init(rawValue: "appEvents") + } + + public static var appInfos: Self { + .init(rawValue: "appInfos") + } + + public static var appPricePoints: Self { + .init(rawValue: "appPricePoints") + } + + public static var appPriceSchedule: Self { + .init(rawValue: "appPriceSchedule") + } + + public static var appStoreVersionExperimentsV2: Self { + .init(rawValue: "appStoreVersionExperimentsV2") + } + + public static var appStoreVersions: Self { + .init(rawValue: "appStoreVersions") + } + + public static var backgroundAssets: Self { + .init(rawValue: "backgroundAssets") + } + + public static var betaAppLocalizations: Self { + .init(rawValue: "betaAppLocalizations") + } + + public static var betaAppReviewDetail: Self { + .init(rawValue: "betaAppReviewDetail") + } + + public static var betaFeedbackCrashSubmissions: Self { + .init(rawValue: "betaFeedbackCrashSubmissions") + } + + public static var betaFeedbackScreenshotSubmissions: Self { + .init(rawValue: "betaFeedbackScreenshotSubmissions") + } + + public static var betaGroups: Self { + .init(rawValue: "betaGroups") + } + + public static var betaLicenseAgreement: Self { + .init(rawValue: "betaLicenseAgreement") + } + + public static var betaTesters: Self { + .init(rawValue: "betaTesters") + } + + public static var builds: Self { + .init(rawValue: "builds") + } + + public static var bundleId: Self { + .init(rawValue: "bundleId") + } + + public static var ciProduct: Self { + .init(rawValue: "ciProduct") + } + + public static var contentRightsDeclaration: Self { + .init(rawValue: "contentRightsDeclaration") + } + + public static var customerReviewSummarizations: Self { + .init(rawValue: "customerReviewSummarizations") + } + + public static var customerReviews: Self { + .init(rawValue: "customerReviews") + } + + public static var endUserLicenseAgreement: Self { + .init(rawValue: "endUserLicenseAgreement") + } + + public static var gameCenterDetail: Self { + .init(rawValue: "gameCenterDetail") + } + + public static var gameCenterEnabledVersions: Self { + .init(rawValue: "gameCenterEnabledVersions") + } + + public static var inAppPurchases: Self { + .init(rawValue: "inAppPurchases") + } + + public static var inAppPurchasesV2: Self { + .init(rawValue: "inAppPurchasesV2") + } + + public static var isOrEverWasMadeForKids: Self { + .init(rawValue: "isOrEverWasMadeForKids") + } + + public static var marketplaceSearchDetail: Self { + .init(rawValue: "marketplaceSearchDetail") + } + + public static var name: Self { + .init(rawValue: "name") + } + + public static var perfPowerMetrics: Self { + .init(rawValue: "perfPowerMetrics") + } + + public static var preReleaseVersions: Self { + .init(rawValue: "preReleaseVersions") + } + + public static var primaryLocale: Self { + .init(rawValue: "primaryLocale") + } + + public static var promotedPurchases: Self { + .init(rawValue: "promotedPurchases") + } + + public static var reviewSubmissions: Self { + .init(rawValue: "reviewSubmissions") + } + + public static var sku: Self { + .init(rawValue: "sku") + } + + public static var streamlinedPurchasingEnabled: Self { + .init(rawValue: "streamlinedPurchasingEnabled") + } + + public static var subscriptionGracePeriod: Self { + .init(rawValue: "subscriptionGracePeriod") + } + + public static var subscriptionGroups: Self { + .init(rawValue: "subscriptionGroups") + } + + public static var subscriptionStatusUrl: Self { + .init(rawValue: "subscriptionStatusUrl") + } + + public static var subscriptionStatusUrlForSandbox: Self { + .init(rawValue: "subscriptionStatusUrlForSandbox") + } + + public static var subscriptionStatusUrlVersion: Self { + .init(rawValue: "subscriptionStatusUrlVersion") + } + + public static var subscriptionStatusUrlVersionForSandbox: Self { + .init(rawValue: "subscriptionStatusUrlVersionForSandbox") + } + + public static var webhooks: Self { + .init(rawValue: "webhooks") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "appAvailability": self = .appAvailability - case "appClips": self = .appClips - case "appCustomProductPages": self = .appCustomProductPages - case "appEncryptionDeclarations": self = .appEncryptionDeclarations - case "appEvents": self = .appEvents - case "appInfos": self = .appInfos - case "appPricePoints": self = .appPricePoints - case "appPriceSchedule": self = .appPriceSchedule - case "appStoreVersionExperimentsV2": self = .appStoreVersionExperimentsV2 - case "appStoreVersions": self = .appStoreVersions - case "availableInNewTerritories": self = .availableInNewTerritories - case "availableTerritories": self = .availableTerritories - case "betaAppLocalizations": self = .betaAppLocalizations - case "betaAppReviewDetail": self = .betaAppReviewDetail - case "betaGroups": self = .betaGroups - case "betaLicenseAgreement": self = .betaLicenseAgreement - case "betaTesters": self = .betaTesters - case "builds": self = .builds - case "bundleId": self = .bundleId - case "ciProduct": self = .ciProduct - case "contentRightsDeclaration": self = .contentRightsDeclaration - case "customerReviews": self = .customerReviews - case "endUserLicenseAgreement": self = .endUserLicenseAgreement - case "gameCenterDetail": self = .gameCenterDetail - case "gameCenterEnabledVersions": self = .gameCenterEnabledVersions - case "inAppPurchases": self = .inAppPurchases - case "inAppPurchasesV2": self = .inAppPurchasesV2 - case "isOrEverWasMadeForKids": self = .isOrEverWasMadeForKids - case "name": self = .name - case "perfPowerMetrics": self = .perfPowerMetrics - case "preOrder": self = .preOrder - case "preReleaseVersions": self = .preReleaseVersions - case "pricePoints": self = .pricePoints - case "prices": self = .prices - case "primaryLocale": self = .primaryLocale - case "promotedPurchases": self = .promotedPurchases - case "reviewSubmissions": self = .reviewSubmissions - case "sku": self = .sku - case "subscriptionGracePeriod": self = .subscriptionGracePeriod - case "subscriptionGroups": self = .subscriptionGroups - case "subscriptionStatusUrl": self = .subscriptionStatusUrl - case "subscriptionStatusUrlForSandbox": self = .subscriptionStatusUrlForSandbox - case "subscriptionStatusUrlVersion": self = .subscriptionStatusUrlVersion - case "subscriptionStatusUrlVersionForSandbox": self = .subscriptionStatusUrlVersionForSandbox - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppEncryptionDeclarations/ById/AppEncryptionDeclarationDocument/AppEncryptionDeclarationsByIdAppEncryptionDeclarationDocument.GET.edf2ed6.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppEncryptionDeclarations/ById/AppEncryptionDeclarationDocument/AppEncryptionDeclarationsByIdAppEncryptionDeclarationDocument.GET.edf2ed6.generated.swift index ec10582e..d4bdc171 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppEncryptionDeclarations/ById/AppEncryptionDeclarationDocument/AppEncryptionDeclarationsByIdAppEncryptionDeclarationDocument.GET.edf2ed6.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppEncryptionDeclarations/ById/AppEncryptionDeclarationDocument/AppEncryptionDeclarationsByIdAppEncryptionDeclarationDocument.GET.edf2ed6.generated.swift @@ -42,8 +42,10 @@ extension V1.AppEncryptionDeclarations.ById.AppEncryptionDeclarationDocument { /// - Returns: **200**, Single AppEncryptionDeclarationDocument as `AppEncryptionDeclarationDocumentResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -57,12 +59,18 @@ extension V1.AppEncryptionDeclarations.ById.AppEncryptionDeclarationDocument { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 404: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -82,46 +90,43 @@ extension V1.AppEncryptionDeclarations.ById.AppEncryptionDeclarationDocument.GET private var values: [AnyHashable: AnyHashable] = [:] - public enum AppEncryptionDeclarationDocuments: Hashable, Codable, RawRepresentable { - case appEncryptionDeclaration - case assetDeliveryState - case assetToken - case downloadUrl - case fileName - case fileSize - case sourceFileChecksum - case uploadOperations - case uploaded - case unknown(String) - - public var rawValue: String { - switch self { - case .appEncryptionDeclaration: return "appEncryptionDeclaration" - case .assetDeliveryState: return "assetDeliveryState" - case .assetToken: return "assetToken" - case .downloadUrl: return "downloadUrl" - case .fileName: return "fileName" - case .fileSize: return "fileSize" - case .sourceFileChecksum: return "sourceFileChecksum" - case .uploadOperations: return "uploadOperations" - case .uploaded: return "uploaded" - case .unknown(let rawValue): return rawValue - } + public struct AppEncryptionDeclarationDocuments: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var assetDeliveryState: Self { + .init(rawValue: "assetDeliveryState") + } + + public static var assetToken: Self { + .init(rawValue: "assetToken") + } + + public static var downloadUrl: Self { + .init(rawValue: "downloadUrl") + } + + public static var fileName: Self { + .init(rawValue: "fileName") } + public static var fileSize: Self { + .init(rawValue: "fileSize") + } + + public static var sourceFileChecksum: Self { + .init(rawValue: "sourceFileChecksum") + } + + public static var uploadOperations: Self { + .init(rawValue: "uploadOperations") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "appEncryptionDeclaration": self = .appEncryptionDeclaration - case "assetDeliveryState": self = .assetDeliveryState - case "assetToken": self = .assetToken - case "downloadUrl": self = .downloadUrl - case "fileName": self = .fileName - case "fileSize": self = .fileSize - case "sourceFileChecksum": self = .sourceFileChecksum - case "uploadOperations": self = .uploadOperations - case "uploaded": self = .uploaded - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppEncryptionDeclarations/ById/AppEncryptionDeclarationsById.GET.2657e05.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppEncryptionDeclarations/ById/AppEncryptionDeclarationsById.GET.2657e05.generated.swift index 42ce9ae7..315d5993 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppEncryptionDeclarations/ById/AppEncryptionDeclarationsById.GET.2657e05.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppEncryptionDeclarations/ById/AppEncryptionDeclarationsById.GET.2657e05.generated.swift @@ -50,8 +50,10 @@ extension V1.AppEncryptionDeclarations.ById { /// - Returns: **200**, Single AppEncryptionDeclaration as `AppEncryptionDeclarationResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -65,12 +67,18 @@ extension V1.AppEncryptionDeclarations.ById { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 404: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -95,261 +103,335 @@ extension V1.AppEncryptionDeclarations.ById.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum AppEncryptionDeclarationDocuments: Hashable, Codable, RawRepresentable { - case appEncryptionDeclaration - case assetDeliveryState - case assetToken - case downloadUrl - case fileName - case fileSize - case sourceFileChecksum - case uploadOperations - case uploaded - case unknown(String) - - public var rawValue: String { - switch self { - case .appEncryptionDeclaration: return "appEncryptionDeclaration" - case .assetDeliveryState: return "assetDeliveryState" - case .assetToken: return "assetToken" - case .downloadUrl: return "downloadUrl" - case .fileName: return "fileName" - case .fileSize: return "fileSize" - case .sourceFileChecksum: return "sourceFileChecksum" - case .uploadOperations: return "uploadOperations" - case .uploaded: return "uploaded" - case .unknown(let rawValue): return rawValue - } + public struct AppEncryptionDeclarationDocuments: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var assetDeliveryState: Self { + .init(rawValue: "assetDeliveryState") + } + + public static var assetToken: Self { + .init(rawValue: "assetToken") } + public static var downloadUrl: Self { + .init(rawValue: "downloadUrl") + } + + public static var fileName: Self { + .init(rawValue: "fileName") + } + + public static var fileSize: Self { + .init(rawValue: "fileSize") + } + + public static var sourceFileChecksum: Self { + .init(rawValue: "sourceFileChecksum") + } + + public static var uploadOperations: Self { + .init(rawValue: "uploadOperations") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "appEncryptionDeclaration": self = .appEncryptionDeclaration - case "assetDeliveryState": self = .assetDeliveryState - case "assetToken": self = .assetToken - case "downloadUrl": self = .downloadUrl - case "fileName": self = .fileName - case "fileSize": self = .fileSize - case "sourceFileChecksum": self = .sourceFileChecksum - case "uploadOperations": self = .uploadOperations - case "uploaded": self = .uploaded - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum AppEncryptionDeclarations: Hashable, Codable, RawRepresentable { - case app - case appDescription - case appEncryptionDeclarationDocument - case appEncryptionDeclarationState - case availableOnFrenchStore - case builds - case codeValue - case containsProprietaryCryptography - case containsThirdPartyCryptography - case createdDate - case documentName - case documentType - case documentUrl - case exempt - case platform - case uploadedDate - case usesEncryption - case unknown(String) - - public var rawValue: String { - switch self { - case .app: return "app" - case .appDescription: return "appDescription" - case .appEncryptionDeclarationDocument: return "appEncryptionDeclarationDocument" - case .appEncryptionDeclarationState: return "appEncryptionDeclarationState" - case .availableOnFrenchStore: return "availableOnFrenchStore" - case .builds: return "builds" - case .codeValue: return "codeValue" - case .containsProprietaryCryptography: return "containsProprietaryCryptography" - case .containsThirdPartyCryptography: return "containsThirdPartyCryptography" - case .createdDate: return "createdDate" - case .documentName: return "documentName" - case .documentType: return "documentType" - case .documentUrl: return "documentUrl" - case .exempt: return "exempt" - case .platform: return "platform" - case .uploadedDate: return "uploadedDate" - case .usesEncryption: return "usesEncryption" - case .unknown(let rawValue): return rawValue - } + public struct AppEncryptionDeclarations: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var app: Self { + .init(rawValue: "app") + } + + public static var appDescription: Self { + .init(rawValue: "appDescription") + } + + public static var appEncryptionDeclarationDocument: Self { + .init(rawValue: "appEncryptionDeclarationDocument") + } + + public static var appEncryptionDeclarationState: Self { + .init(rawValue: "appEncryptionDeclarationState") + } + + public static var availableOnFrenchStore: Self { + .init(rawValue: "availableOnFrenchStore") + } + + public static var builds: Self { + .init(rawValue: "builds") + } + + public static var codeValue: Self { + .init(rawValue: "codeValue") + } + + public static var containsProprietaryCryptography: Self { + .init(rawValue: "containsProprietaryCryptography") + } + + public static var containsThirdPartyCryptography: Self { + .init(rawValue: "containsThirdPartyCryptography") + } + + public static var createdDate: Self { + .init(rawValue: "createdDate") + } + + public static var documentName: Self { + .init(rawValue: "documentName") + } + + public static var documentType: Self { + .init(rawValue: "documentType") } + public static var documentUrl: Self { + .init(rawValue: "documentUrl") + } + + public static var exempt: Self { + .init(rawValue: "exempt") + } + + public static var platform: Self { + .init(rawValue: "platform") + } + + public static var uploadedDate: Self { + .init(rawValue: "uploadedDate") + } + + public static var usesEncryption: Self { + .init(rawValue: "usesEncryption") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "app": self = .app - case "appDescription": self = .appDescription - case "appEncryptionDeclarationDocument": self = .appEncryptionDeclarationDocument - case "appEncryptionDeclarationState": self = .appEncryptionDeclarationState - case "availableOnFrenchStore": self = .availableOnFrenchStore - case "builds": self = .builds - case "codeValue": self = .codeValue - case "containsProprietaryCryptography": self = .containsProprietaryCryptography - case "containsThirdPartyCryptography": self = .containsThirdPartyCryptography - case "createdDate": self = .createdDate - case "documentName": self = .documentName - case "documentType": self = .documentType - case "documentUrl": self = .documentUrl - case "exempt": self = .exempt - case "platform": self = .platform - case "uploadedDate": self = .uploadedDate - case "usesEncryption": self = .usesEncryption - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum Apps: Hashable, Codable, RawRepresentable { - case appAvailability - case appClips - case appCustomProductPages - case appEncryptionDeclarations - case appEvents - case appInfos - case appPricePoints - case appPriceSchedule - case appStoreVersionExperimentsV2 - case appStoreVersions - case availableInNewTerritories - case availableTerritories - case betaAppLocalizations - case betaAppReviewDetail - case betaGroups - case betaLicenseAgreement - case betaTesters - case builds - case bundleId - case ciProduct - case contentRightsDeclaration - case customerReviews - case endUserLicenseAgreement - case gameCenterDetail - case gameCenterEnabledVersions - case inAppPurchases - case inAppPurchasesV2 - case isOrEverWasMadeForKids - case name - case perfPowerMetrics - case preOrder - case preReleaseVersions - case pricePoints - case prices - case primaryLocale - case promotedPurchases - case reviewSubmissions - case sku - case subscriptionGracePeriod - case subscriptionGroups - case subscriptionStatusUrl - case subscriptionStatusUrlForSandbox - case subscriptionStatusUrlVersion - case subscriptionStatusUrlVersionForSandbox - case unknown(String) - - public var rawValue: String { - switch self { - case .appAvailability: return "appAvailability" - case .appClips: return "appClips" - case .appCustomProductPages: return "appCustomProductPages" - case .appEncryptionDeclarations: return "appEncryptionDeclarations" - case .appEvents: return "appEvents" - case .appInfos: return "appInfos" - case .appPricePoints: return "appPricePoints" - case .appPriceSchedule: return "appPriceSchedule" - case .appStoreVersionExperimentsV2: return "appStoreVersionExperimentsV2" - case .appStoreVersions: return "appStoreVersions" - case .availableInNewTerritories: return "availableInNewTerritories" - case .availableTerritories: return "availableTerritories" - case .betaAppLocalizations: return "betaAppLocalizations" - case .betaAppReviewDetail: return "betaAppReviewDetail" - case .betaGroups: return "betaGroups" - case .betaLicenseAgreement: return "betaLicenseAgreement" - case .betaTesters: return "betaTesters" - case .builds: return "builds" - case .bundleId: return "bundleId" - case .ciProduct: return "ciProduct" - case .contentRightsDeclaration: return "contentRightsDeclaration" - case .customerReviews: return "customerReviews" - case .endUserLicenseAgreement: return "endUserLicenseAgreement" - case .gameCenterDetail: return "gameCenterDetail" - case .gameCenterEnabledVersions: return "gameCenterEnabledVersions" - case .inAppPurchases: return "inAppPurchases" - case .inAppPurchasesV2: return "inAppPurchasesV2" - case .isOrEverWasMadeForKids: return "isOrEverWasMadeForKids" - case .name: return "name" - case .perfPowerMetrics: return "perfPowerMetrics" - case .preOrder: return "preOrder" - case .preReleaseVersions: return "preReleaseVersions" - case .pricePoints: return "pricePoints" - case .prices: return "prices" - case .primaryLocale: return "primaryLocale" - case .promotedPurchases: return "promotedPurchases" - case .reviewSubmissions: return "reviewSubmissions" - case .sku: return "sku" - case .subscriptionGracePeriod: return "subscriptionGracePeriod" - case .subscriptionGroups: return "subscriptionGroups" - case .subscriptionStatusUrl: return "subscriptionStatusUrl" - case .subscriptionStatusUrlForSandbox: return "subscriptionStatusUrlForSandbox" - case .subscriptionStatusUrlVersion: return "subscriptionStatusUrlVersion" - case .subscriptionStatusUrlVersionForSandbox: return "subscriptionStatusUrlVersionForSandbox" - case .unknown(let rawValue): return rawValue - } + public struct Apps: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var accessibilityDeclarations: Self { + .init(rawValue: "accessibilityDeclarations") + } + + public static var accessibilityUrl: Self { + .init(rawValue: "accessibilityUrl") + } + + public static var alternativeDistributionKey: Self { + .init(rawValue: "alternativeDistributionKey") + } + + public static var analyticsReportRequests: Self { + .init(rawValue: "analyticsReportRequests") + } + + public static var appAvailabilityV2: Self { + .init(rawValue: "appAvailabilityV2") + } + + public static var appClips: Self { + .init(rawValue: "appClips") + } + + public static var appCustomProductPages: Self { + .init(rawValue: "appCustomProductPages") + } + + public static var appEncryptionDeclarations: Self { + .init(rawValue: "appEncryptionDeclarations") + } + + public static var appEvents: Self { + .init(rawValue: "appEvents") + } + + public static var appInfos: Self { + .init(rawValue: "appInfos") + } + + public static var appPricePoints: Self { + .init(rawValue: "appPricePoints") + } + + public static var appPriceSchedule: Self { + .init(rawValue: "appPriceSchedule") + } + + public static var appStoreVersionExperimentsV2: Self { + .init(rawValue: "appStoreVersionExperimentsV2") + } + + public static var appStoreVersions: Self { + .init(rawValue: "appStoreVersions") + } + + public static var backgroundAssets: Self { + .init(rawValue: "backgroundAssets") } + public static var betaAppLocalizations: Self { + .init(rawValue: "betaAppLocalizations") + } + + public static var betaAppReviewDetail: Self { + .init(rawValue: "betaAppReviewDetail") + } + + public static var betaFeedbackCrashSubmissions: Self { + .init(rawValue: "betaFeedbackCrashSubmissions") + } + + public static var betaFeedbackScreenshotSubmissions: Self { + .init(rawValue: "betaFeedbackScreenshotSubmissions") + } + + public static var betaGroups: Self { + .init(rawValue: "betaGroups") + } + + public static var betaLicenseAgreement: Self { + .init(rawValue: "betaLicenseAgreement") + } + + public static var betaTesters: Self { + .init(rawValue: "betaTesters") + } + + public static var builds: Self { + .init(rawValue: "builds") + } + + public static var bundleId: Self { + .init(rawValue: "bundleId") + } + + public static var ciProduct: Self { + .init(rawValue: "ciProduct") + } + + public static var contentRightsDeclaration: Self { + .init(rawValue: "contentRightsDeclaration") + } + + public static var customerReviewSummarizations: Self { + .init(rawValue: "customerReviewSummarizations") + } + + public static var customerReviews: Self { + .init(rawValue: "customerReviews") + } + + public static var endUserLicenseAgreement: Self { + .init(rawValue: "endUserLicenseAgreement") + } + + public static var gameCenterDetail: Self { + .init(rawValue: "gameCenterDetail") + } + + public static var gameCenterEnabledVersions: Self { + .init(rawValue: "gameCenterEnabledVersions") + } + + public static var inAppPurchases: Self { + .init(rawValue: "inAppPurchases") + } + + public static var inAppPurchasesV2: Self { + .init(rawValue: "inAppPurchasesV2") + } + + public static var isOrEverWasMadeForKids: Self { + .init(rawValue: "isOrEverWasMadeForKids") + } + + public static var marketplaceSearchDetail: Self { + .init(rawValue: "marketplaceSearchDetail") + } + + public static var name: Self { + .init(rawValue: "name") + } + + public static var perfPowerMetrics: Self { + .init(rawValue: "perfPowerMetrics") + } + + public static var preReleaseVersions: Self { + .init(rawValue: "preReleaseVersions") + } + + public static var primaryLocale: Self { + .init(rawValue: "primaryLocale") + } + + public static var promotedPurchases: Self { + .init(rawValue: "promotedPurchases") + } + + public static var reviewSubmissions: Self { + .init(rawValue: "reviewSubmissions") + } + + public static var sku: Self { + .init(rawValue: "sku") + } + + public static var streamlinedPurchasingEnabled: Self { + .init(rawValue: "streamlinedPurchasingEnabled") + } + + public static var subscriptionGracePeriod: Self { + .init(rawValue: "subscriptionGracePeriod") + } + + public static var subscriptionGroups: Self { + .init(rawValue: "subscriptionGroups") + } + + public static var subscriptionStatusUrl: Self { + .init(rawValue: "subscriptionStatusUrl") + } + + public static var subscriptionStatusUrlForSandbox: Self { + .init(rawValue: "subscriptionStatusUrlForSandbox") + } + + public static var subscriptionStatusUrlVersion: Self { + .init(rawValue: "subscriptionStatusUrlVersion") + } + + public static var subscriptionStatusUrlVersionForSandbox: Self { + .init(rawValue: "subscriptionStatusUrlVersionForSandbox") + } + + public static var webhooks: Self { + .init(rawValue: "webhooks") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "appAvailability": self = .appAvailability - case "appClips": self = .appClips - case "appCustomProductPages": self = .appCustomProductPages - case "appEncryptionDeclarations": self = .appEncryptionDeclarations - case "appEvents": self = .appEvents - case "appInfos": self = .appInfos - case "appPricePoints": self = .appPricePoints - case "appPriceSchedule": self = .appPriceSchedule - case "appStoreVersionExperimentsV2": self = .appStoreVersionExperimentsV2 - case "appStoreVersions": self = .appStoreVersions - case "availableInNewTerritories": self = .availableInNewTerritories - case "availableTerritories": self = .availableTerritories - case "betaAppLocalizations": self = .betaAppLocalizations - case "betaAppReviewDetail": self = .betaAppReviewDetail - case "betaGroups": self = .betaGroups - case "betaLicenseAgreement": self = .betaLicenseAgreement - case "betaTesters": self = .betaTesters - case "builds": self = .builds - case "bundleId": self = .bundleId - case "ciProduct": self = .ciProduct - case "contentRightsDeclaration": self = .contentRightsDeclaration - case "customerReviews": self = .customerReviews - case "endUserLicenseAgreement": self = .endUserLicenseAgreement - case "gameCenterDetail": self = .gameCenterDetail - case "gameCenterEnabledVersions": self = .gameCenterEnabledVersions - case "inAppPurchases": self = .inAppPurchases - case "inAppPurchasesV2": self = .inAppPurchasesV2 - case "isOrEverWasMadeForKids": self = .isOrEverWasMadeForKids - case "name": self = .name - case "perfPowerMetrics": self = .perfPowerMetrics - case "preOrder": self = .preOrder - case "preReleaseVersions": self = .preReleaseVersions - case "pricePoints": self = .pricePoints - case "prices": self = .prices - case "primaryLocale": self = .primaryLocale - case "promotedPurchases": self = .promotedPurchases - case "reviewSubmissions": self = .reviewSubmissions - case "sku": self = .sku - case "subscriptionGracePeriod": self = .subscriptionGracePeriod - case "subscriptionGroups": self = .subscriptionGroups - case "subscriptionStatusUrl": self = .subscriptionStatusUrl - case "subscriptionStatusUrlForSandbox": self = .subscriptionStatusUrlForSandbox - case "subscriptionStatusUrlVersion": self = .subscriptionStatusUrlVersion - case "subscriptionStatusUrlVersionForSandbox": self = .subscriptionStatusUrlVersionForSandbox - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } @@ -377,28 +459,27 @@ extension V1.AppEncryptionDeclarations.ById.GET { } } - public enum Include: Hashable, Codable, RawRepresentable { - case app - case appEncryptionDeclarationDocument - case builds - case unknown(String) + public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var app: Self { + .init(rawValue: "app") + } - public var rawValue: String { - switch self { - case .app: return "app" - case .appEncryptionDeclarationDocument: return "appEncryptionDeclarationDocument" - case .builds: return "builds" - case .unknown(let rawValue): return rawValue - } + public static var appEncryptionDeclarationDocument: Self { + .init(rawValue: "appEncryptionDeclarationDocument") + } + + public static var builds: Self { + .init(rawValue: "builds") + } + + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "app": self = .app - case "appEncryptionDeclarationDocument": self = .appEncryptionDeclarationDocument - case "builds": self = .builds - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppEncryptionDeclarations/ById/Relationships/App/AppEncryptionDeclarationsByIdRelationshipsApp.GET.fb7cd83.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppEncryptionDeclarations/ById/Relationships/App/AppEncryptionDeclarationsByIdRelationshipsApp.GET.fb7cd83.generated.swift new file mode 100644 index 00000000..f731cec1 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppEncryptionDeclarations/ById/Relationships/App/AppEncryptionDeclarationsByIdRelationshipsApp.GET.fb7cd83.generated.swift @@ -0,0 +1,87 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.AppEncryptionDeclarations.ById.Relationships.App { + @available(*, deprecated) + public struct GET: Endpoint { + public typealias Response = AppEncryptionDeclarationAppLinkageResponse + + public var path: String { + "/v1/appEncryptionDeclarations/\(id)/relationships/app" + } + + /// the id of the requested resource + public var id: String + + public var parameters: Parameters = Parameters() + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + components?.queryItems = [ + + ].filter { $0.value != nil } + if components?.queryItems?.isEmpty ?? false { + components?.queryItems = nil + } + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "GET" + return urlRequest + } + + /// - Returns: **200**, Related linkage as `AppEncryptionDeclarationAppLinkageResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(AppEncryptionDeclarationAppLinkageResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +extension V1.AppEncryptionDeclarations.ById.Relationships.App.GET { + public struct Parameters: Hashable { + + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppEncryptionDeclarations/ById/Relationships/AppEncryptionDeclarationDocument/AppEncryptionDeclarationsByIdRelationshipsAppEncryptionDeclarationDocument.GET.626b24d.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppEncryptionDeclarations/ById/Relationships/AppEncryptionDeclarationDocument/AppEncryptionDeclarationsByIdRelationshipsAppEncryptionDeclarationDocument.GET.626b24d.generated.swift new file mode 100644 index 00000000..a13ca42c --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppEncryptionDeclarations/ById/Relationships/AppEncryptionDeclarationDocument/AppEncryptionDeclarationsByIdRelationshipsAppEncryptionDeclarationDocument.GET.626b24d.generated.swift @@ -0,0 +1,86 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.AppEncryptionDeclarations.ById.Relationships.AppEncryptionDeclarationDocument { + public struct GET: Endpoint { + public typealias Response = AppEncryptionDeclarationAppEncryptionDeclarationDocumentLinkageResponse + + public var path: String { + "/v1/appEncryptionDeclarations/\(id)/relationships/appEncryptionDeclarationDocument" + } + + /// the id of the requested resource + public var id: String + + public var parameters: Parameters = Parameters() + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + components?.queryItems = [ + + ].filter { $0.value != nil } + if components?.queryItems?.isEmpty ?? false { + components?.queryItems = nil + } + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "GET" + return urlRequest + } + + /// - Returns: **200**, Related linkage as `AppEncryptionDeclarationAppEncryptionDeclarationDocumentLinkageResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(AppEncryptionDeclarationAppEncryptionDeclarationDocumentLinkageResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +extension V1.AppEncryptionDeclarations.ById.Relationships.AppEncryptionDeclarationDocument.GET { + public struct Parameters: Hashable { + + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppEncryptionDeclarations/ById/Relationships/Builds/AppEncryptionDeclarationsByIdRelationshipsBuilds.POST.6eef119.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppEncryptionDeclarations/ById/Relationships/Builds/AppEncryptionDeclarationsByIdRelationshipsBuilds.POST.6eef119.generated.swift index aef19783..e13859e3 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppEncryptionDeclarations/ById/Relationships/Builds/AppEncryptionDeclarationsByIdRelationshipsBuilds.POST.6eef119.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppEncryptionDeclarations/ById/Relationships/Builds/AppEncryptionDeclarationsByIdRelationshipsBuilds.POST.6eef119.generated.swift @@ -47,10 +47,12 @@ extension V1.AppEncryptionDeclarations.ById.Relationships.Builds { return urlRequest } - /// - Returns: **204**, Success (no content) + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **422**, Unprocessable request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -58,8 +60,8 @@ extension V1.AppEncryptionDeclarations.ById.Relationships.Builds { } switch urlResponse.statusCode { - case 204: - return + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) @@ -70,6 +72,12 @@ extension V1.AppEncryptionDeclarations.ById.Relationships.Builds { case 409: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 422: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppEventLocalizations/AppEventLocalizations.POST.6091753.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppEventLocalizations/AppEventLocalizations.POST.6091753.generated.swift index f34d1333..d4406951 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppEventLocalizations/AppEventLocalizations.POST.6091753.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppEventLocalizations/AppEventLocalizations.POST.6091753.generated.swift @@ -41,8 +41,11 @@ extension V1.AppEventLocalizations { /// - Returns: **201**, Single AppEventLocalization as `AppEventLocalizationResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **422**, Unprocessable request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -56,12 +59,21 @@ extension V1.AppEventLocalizations { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 409: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 422: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppEventLocalizations/ById/AppEventLocalizationsById.DELETE.756638b.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppEventLocalizations/ById/AppEventLocalizationsById.DELETE.756638b.generated.swift index 855b028b..5be181e0 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppEventLocalizations/ById/AppEventLocalizationsById.DELETE.756638b.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppEventLocalizations/ById/AppEventLocalizationsById.DELETE.756638b.generated.swift @@ -31,11 +31,12 @@ extension V1.AppEventLocalizations.ById { return urlRequest } - /// - Returns: **204**, Success (no content) /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -43,12 +44,12 @@ extension V1.AppEventLocalizations.ById { } switch urlResponse.statusCode { - case 204: - return - case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) @@ -58,6 +59,9 @@ extension V1.AppEventLocalizations.ById { case 409: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppEventLocalizations/ById/AppEventLocalizationsById.GET.756638b.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppEventLocalizations/ById/AppEventLocalizationsById.GET.756638b.generated.swift index 7f78e414..23c59932 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppEventLocalizations/ById/AppEventLocalizationsById.GET.756638b.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppEventLocalizations/ById/AppEventLocalizationsById.GET.756638b.generated.swift @@ -52,8 +52,10 @@ extension V1.AppEventLocalizations.ById { /// - Returns: **200**, Single AppEventLocalization as `AppEventLocalizationResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -67,12 +69,18 @@ extension V1.AppEventLocalizations.ById { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 404: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -97,129 +105,143 @@ extension V1.AppEventLocalizations.ById.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum AppEventLocalizations: Hashable, Codable, RawRepresentable { - case appEvent - case appEventScreenshots - case appEventVideoClips - case locale - case longDescription - case name - case shortDescription - case unknown(String) - - public var rawValue: String { - switch self { - case .appEvent: return "appEvent" - case .appEventScreenshots: return "appEventScreenshots" - case .appEventVideoClips: return "appEventVideoClips" - case .locale: return "locale" - case .longDescription: return "longDescription" - case .name: return "name" - case .shortDescription: return "shortDescription" - case .unknown(let rawValue): return rawValue - } + public struct AppEventLocalizations: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var appEvent: Self { + .init(rawValue: "appEvent") + } + + public static var appEventScreenshots: Self { + .init(rawValue: "appEventScreenshots") + } + + public static var appEventVideoClips: Self { + .init(rawValue: "appEventVideoClips") + } + + public static var locale: Self { + .init(rawValue: "locale") + } + + public static var longDescription: Self { + .init(rawValue: "longDescription") + } + + public static var name: Self { + .init(rawValue: "name") + } + + public static var shortDescription: Self { + .init(rawValue: "shortDescription") + } + + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "appEvent": self = .appEvent - case "appEventScreenshots": self = .appEventScreenshots - case "appEventVideoClips": self = .appEventVideoClips - case "locale": self = .locale - case "longDescription": self = .longDescription - case "name": self = .name - case "shortDescription": self = .shortDescription - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum AppEventScreenshots: Hashable, Codable, RawRepresentable { - case appEventAssetType - case appEventLocalization - case assetDeliveryState - case assetToken - case fileName - case fileSize - case imageAsset - case uploadOperations - case uploaded - case unknown(String) - - public var rawValue: String { - switch self { - case .appEventAssetType: return "appEventAssetType" - case .appEventLocalization: return "appEventLocalization" - case .assetDeliveryState: return "assetDeliveryState" - case .assetToken: return "assetToken" - case .fileName: return "fileName" - case .fileSize: return "fileSize" - case .imageAsset: return "imageAsset" - case .uploadOperations: return "uploadOperations" - case .uploaded: return "uploaded" - case .unknown(let rawValue): return rawValue - } + public struct AppEventScreenshots: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var appEventAssetType: Self { + .init(rawValue: "appEventAssetType") } + public static var appEventLocalization: Self { + .init(rawValue: "appEventLocalization") + } + + public static var assetDeliveryState: Self { + .init(rawValue: "assetDeliveryState") + } + + public static var assetToken: Self { + .init(rawValue: "assetToken") + } + + public static var fileName: Self { + .init(rawValue: "fileName") + } + + public static var fileSize: Self { + .init(rawValue: "fileSize") + } + + public static var imageAsset: Self { + .init(rawValue: "imageAsset") + } + + public static var uploadOperations: Self { + .init(rawValue: "uploadOperations") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "appEventAssetType": self = .appEventAssetType - case "appEventLocalization": self = .appEventLocalization - case "assetDeliveryState": self = .assetDeliveryState - case "assetToken": self = .assetToken - case "fileName": self = .fileName - case "fileSize": self = .fileSize - case "imageAsset": self = .imageAsset - case "uploadOperations": self = .uploadOperations - case "uploaded": self = .uploaded - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum AppEventVideoClips: Hashable, Codable, RawRepresentable { - case appEventAssetType - case appEventLocalization - case assetDeliveryState - case fileName - case fileSize - case previewFrameTimeCode - case previewImage - case uploadOperations - case uploaded - case videoUrl - case unknown(String) - - public var rawValue: String { - switch self { - case .appEventAssetType: return "appEventAssetType" - case .appEventLocalization: return "appEventLocalization" - case .assetDeliveryState: return "assetDeliveryState" - case .fileName: return "fileName" - case .fileSize: return "fileSize" - case .previewFrameTimeCode: return "previewFrameTimeCode" - case .previewImage: return "previewImage" - case .uploadOperations: return "uploadOperations" - case .uploaded: return "uploaded" - case .videoUrl: return "videoUrl" - case .unknown(let rawValue): return rawValue - } + public struct AppEventVideoClips: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var appEventAssetType: Self { + .init(rawValue: "appEventAssetType") } + public static var appEventLocalization: Self { + .init(rawValue: "appEventLocalization") + } + + public static var assetDeliveryState: Self { + .init(rawValue: "assetDeliveryState") + } + + public static var fileName: Self { + .init(rawValue: "fileName") + } + + public static var fileSize: Self { + .init(rawValue: "fileSize") + } + + public static var previewFrameImage: Self { + .init(rawValue: "previewFrameImage") + } + + public static var previewFrameTimeCode: Self { + .init(rawValue: "previewFrameTimeCode") + } + + public static var previewImage: Self { + .init(rawValue: "previewImage") + } + + public static var uploadOperations: Self { + .init(rawValue: "uploadOperations") + } + + public static var videoDeliveryState: Self { + .init(rawValue: "videoDeliveryState") + } + + public static var videoUrl: Self { + .init(rawValue: "videoUrl") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "appEventAssetType": self = .appEventAssetType - case "appEventLocalization": self = .appEventLocalization - case "assetDeliveryState": self = .assetDeliveryState - case "fileName": self = .fileName - case "fileSize": self = .fileSize - case "previewFrameTimeCode": self = .previewFrameTimeCode - case "previewImage": self = .previewImage - case "uploadOperations": self = .uploadOperations - case "uploaded": self = .uploaded - case "videoUrl": self = .videoUrl - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } @@ -247,28 +269,27 @@ extension V1.AppEventLocalizations.ById.GET { } } - public enum Include: Hashable, Codable, RawRepresentable { - case appEvent - case appEventScreenshots - case appEventVideoClips - case unknown(String) + public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var appEvent: Self { + .init(rawValue: "appEvent") + } - public var rawValue: String { - switch self { - case .appEvent: return "appEvent" - case .appEventScreenshots: return "appEventScreenshots" - case .appEventVideoClips: return "appEventVideoClips" - case .unknown(let rawValue): return rawValue - } + public static var appEventScreenshots: Self { + .init(rawValue: "appEventScreenshots") + } + + public static var appEventVideoClips: Self { + .init(rawValue: "appEventVideoClips") } + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "appEvent": self = .appEvent - case "appEventScreenshots": self = .appEventScreenshots - case "appEventVideoClips": self = .appEventVideoClips - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppEventLocalizations/ById/AppEventLocalizationsById.PATCH.756638b.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppEventLocalizations/ById/AppEventLocalizationsById.PATCH.756638b.generated.swift index aba10a53..4b1a255e 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppEventLocalizations/ById/AppEventLocalizationsById.PATCH.756638b.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppEventLocalizations/ById/AppEventLocalizationsById.PATCH.756638b.generated.swift @@ -48,9 +48,12 @@ extension V1.AppEventLocalizations.ById { /// - Returns: **200**, Single AppEventLocalization as `AppEventLocalizationResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **422**, Unprocessable request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -64,6 +67,9 @@ extension V1.AppEventLocalizations.ById { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) @@ -73,6 +79,12 @@ extension V1.AppEventLocalizations.ById { case 409: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 422: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppEventLocalizations/ById/AppEventScreenshots/AppEventLocalizationsByIdAppEventScreenshots.GET.47c3a0e.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppEventLocalizations/ById/AppEventScreenshots/AppEventLocalizationsByIdAppEventScreenshots.GET.47c3a0e.generated.swift index 6588d741..a99dad9b 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppEventLocalizations/ById/AppEventScreenshots/AppEventLocalizationsByIdAppEventScreenshots.GET.47c3a0e.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppEventLocalizations/ById/AppEventScreenshots/AppEventLocalizationsByIdAppEventScreenshots.GET.47c3a0e.generated.swift @@ -48,8 +48,10 @@ extension V1.AppEventLocalizations.ById.AppEventScreenshots { /// - Returns: **200**, List of AppEventScreenshots as `AppEventScreenshotsResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -63,12 +65,18 @@ extension V1.AppEventLocalizations.ById.AppEventScreenshots { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 404: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -94,83 +102,87 @@ extension V1.AppEventLocalizations.ById.AppEventScreenshots.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum AppEventLocalizations: Hashable, Codable, RawRepresentable { - case appEvent - case appEventScreenshots - case appEventVideoClips - case locale - case longDescription - case name - case shortDescription - case unknown(String) - - public var rawValue: String { - switch self { - case .appEvent: return "appEvent" - case .appEventScreenshots: return "appEventScreenshots" - case .appEventVideoClips: return "appEventVideoClips" - case .locale: return "locale" - case .longDescription: return "longDescription" - case .name: return "name" - case .shortDescription: return "shortDescription" - case .unknown(let rawValue): return rawValue - } + public struct AppEventLocalizations: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var appEvent: Self { + .init(rawValue: "appEvent") + } + + public static var appEventScreenshots: Self { + .init(rawValue: "appEventScreenshots") + } + + public static var appEventVideoClips: Self { + .init(rawValue: "appEventVideoClips") + } + + public static var locale: Self { + .init(rawValue: "locale") } + public static var longDescription: Self { + .init(rawValue: "longDescription") + } + + public static var name: Self { + .init(rawValue: "name") + } + + public static var shortDescription: Self { + .init(rawValue: "shortDescription") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "appEvent": self = .appEvent - case "appEventScreenshots": self = .appEventScreenshots - case "appEventVideoClips": self = .appEventVideoClips - case "locale": self = .locale - case "longDescription": self = .longDescription - case "name": self = .name - case "shortDescription": self = .shortDescription - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum AppEventScreenshots: Hashable, Codable, RawRepresentable { - case appEventAssetType - case appEventLocalization - case assetDeliveryState - case assetToken - case fileName - case fileSize - case imageAsset - case uploadOperations - case uploaded - case unknown(String) - - public var rawValue: String { - switch self { - case .appEventAssetType: return "appEventAssetType" - case .appEventLocalization: return "appEventLocalization" - case .assetDeliveryState: return "assetDeliveryState" - case .assetToken: return "assetToken" - case .fileName: return "fileName" - case .fileSize: return "fileSize" - case .imageAsset: return "imageAsset" - case .uploadOperations: return "uploadOperations" - case .uploaded: return "uploaded" - case .unknown(let rawValue): return rawValue - } + public struct AppEventScreenshots: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var appEventAssetType: Self { + .init(rawValue: "appEventAssetType") + } + + public static var appEventLocalization: Self { + .init(rawValue: "appEventLocalization") + } + + public static var assetDeliveryState: Self { + .init(rawValue: "assetDeliveryState") + } + + public static var assetToken: Self { + .init(rawValue: "assetToken") + } + + public static var fileName: Self { + .init(rawValue: "fileName") + } + + public static var fileSize: Self { + .init(rawValue: "fileSize") + } + + public static var imageAsset: Self { + .init(rawValue: "imageAsset") + } + + public static var uploadOperations: Self { + .init(rawValue: "uploadOperations") + } + + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "appEventAssetType": self = .appEventAssetType - case "appEventLocalization": self = .appEventLocalization - case "assetDeliveryState": self = .assetDeliveryState - case "assetToken": self = .assetToken - case "fileName": self = .fileName - case "fileSize": self = .fileSize - case "imageAsset": self = .imageAsset - case "uploadOperations": self = .uploadOperations - case "uploaded": self = .uploaded - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } @@ -193,22 +205,19 @@ extension V1.AppEventLocalizations.ById.AppEventScreenshots.GET { } } - public enum Include: Hashable, Codable, RawRepresentable { - case appEventLocalization - case unknown(String) + public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var appEventLocalization: Self { + .init(rawValue: "appEventLocalization") + } - public var rawValue: String { - switch self { - case .appEventLocalization: return "appEventLocalization" - case .unknown(let rawValue): return rawValue - } + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "appEventLocalization": self = .appEventLocalization - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppEventLocalizations/ById/AppEventVideoClips/AppEventLocalizationsByIdAppEventVideoClips.GET.891b5ab.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppEventLocalizations/ById/AppEventVideoClips/AppEventLocalizationsByIdAppEventVideoClips.GET.891b5ab.generated.swift index 147a2a0c..824a9a0c 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppEventLocalizations/ById/AppEventVideoClips/AppEventLocalizationsByIdAppEventVideoClips.GET.891b5ab.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppEventLocalizations/ById/AppEventVideoClips/AppEventLocalizationsByIdAppEventVideoClips.GET.891b5ab.generated.swift @@ -48,8 +48,10 @@ extension V1.AppEventLocalizations.ById.AppEventVideoClips { /// - Returns: **200**, List of AppEventVideoClips as `AppEventVideoClipsResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -63,12 +65,18 @@ extension V1.AppEventLocalizations.ById.AppEventVideoClips { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 404: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -94,86 +102,99 @@ extension V1.AppEventLocalizations.ById.AppEventVideoClips.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum AppEventLocalizations: Hashable, Codable, RawRepresentable { - case appEvent - case appEventScreenshots - case appEventVideoClips - case locale - case longDescription - case name - case shortDescription - case unknown(String) - - public var rawValue: String { - switch self { - case .appEvent: return "appEvent" - case .appEventScreenshots: return "appEventScreenshots" - case .appEventVideoClips: return "appEventVideoClips" - case .locale: return "locale" - case .longDescription: return "longDescription" - case .name: return "name" - case .shortDescription: return "shortDescription" - case .unknown(let rawValue): return rawValue - } + public struct AppEventLocalizations: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var appEvent: Self { + .init(rawValue: "appEvent") + } + + public static var appEventScreenshots: Self { + .init(rawValue: "appEventScreenshots") + } + + public static var appEventVideoClips: Self { + .init(rawValue: "appEventVideoClips") + } + + public static var locale: Self { + .init(rawValue: "locale") + } + + public static var longDescription: Self { + .init(rawValue: "longDescription") } + public static var name: Self { + .init(rawValue: "name") + } + + public static var shortDescription: Self { + .init(rawValue: "shortDescription") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "appEvent": self = .appEvent - case "appEventScreenshots": self = .appEventScreenshots - case "appEventVideoClips": self = .appEventVideoClips - case "locale": self = .locale - case "longDescription": self = .longDescription - case "name": self = .name - case "shortDescription": self = .shortDescription - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum AppEventVideoClips: Hashable, Codable, RawRepresentable { - case appEventAssetType - case appEventLocalization - case assetDeliveryState - case fileName - case fileSize - case previewFrameTimeCode - case previewImage - case uploadOperations - case uploaded - case videoUrl - case unknown(String) - - public var rawValue: String { - switch self { - case .appEventAssetType: return "appEventAssetType" - case .appEventLocalization: return "appEventLocalization" - case .assetDeliveryState: return "assetDeliveryState" - case .fileName: return "fileName" - case .fileSize: return "fileSize" - case .previewFrameTimeCode: return "previewFrameTimeCode" - case .previewImage: return "previewImage" - case .uploadOperations: return "uploadOperations" - case .uploaded: return "uploaded" - case .videoUrl: return "videoUrl" - case .unknown(let rawValue): return rawValue - } + public struct AppEventVideoClips: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var appEventAssetType: Self { + .init(rawValue: "appEventAssetType") + } + + public static var appEventLocalization: Self { + .init(rawValue: "appEventLocalization") + } + + public static var assetDeliveryState: Self { + .init(rawValue: "assetDeliveryState") } + public static var fileName: Self { + .init(rawValue: "fileName") + } + + public static var fileSize: Self { + .init(rawValue: "fileSize") + } + + public static var previewFrameImage: Self { + .init(rawValue: "previewFrameImage") + } + + public static var previewFrameTimeCode: Self { + .init(rawValue: "previewFrameTimeCode") + } + + public static var previewImage: Self { + .init(rawValue: "previewImage") + } + + public static var uploadOperations: Self { + .init(rawValue: "uploadOperations") + } + + public static var videoDeliveryState: Self { + .init(rawValue: "videoDeliveryState") + } + + public static var videoUrl: Self { + .init(rawValue: "videoUrl") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "appEventAssetType": self = .appEventAssetType - case "appEventLocalization": self = .appEventLocalization - case "assetDeliveryState": self = .assetDeliveryState - case "fileName": self = .fileName - case "fileSize": self = .fileSize - case "previewFrameTimeCode": self = .previewFrameTimeCode - case "previewImage": self = .previewImage - case "uploadOperations": self = .uploadOperations - case "uploaded": self = .uploaded - case "videoUrl": self = .videoUrl - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } @@ -196,22 +217,19 @@ extension V1.AppEventLocalizations.ById.AppEventVideoClips.GET { } } - public enum Include: Hashable, Codable, RawRepresentable { - case appEventLocalization - case unknown(String) + public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var appEventLocalization: Self { + .init(rawValue: "appEventLocalization") + } - public var rawValue: String { - switch self { - case .appEventLocalization: return "appEventLocalization" - case .unknown(let rawValue): return rawValue - } + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "appEventLocalization": self = .appEventLocalization - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppEventLocalizations/ById/Relationships/AppEventScreenshots/AppEventLocalizationsByIdRelationshipsAppEventScreenshots.GET.f37c852.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppEventLocalizations/ById/Relationships/AppEventScreenshots/AppEventLocalizationsByIdRelationshipsAppEventScreenshots.GET.f37c852.generated.swift new file mode 100644 index 00000000..9700ec6e --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppEventLocalizations/ById/Relationships/AppEventScreenshots/AppEventLocalizationsByIdRelationshipsAppEventScreenshots.GET.f37c852.generated.swift @@ -0,0 +1,88 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.AppEventLocalizations.ById.Relationships.AppEventScreenshots { + public struct GET: Endpoint { + public typealias Response = AppEventLocalizationAppEventScreenshotsLinkagesResponse + + public var path: String { + "/v1/appEventLocalizations/\(id)/relationships/appEventScreenshots" + } + + /// the id of the requested resource + public var id: String + + public var parameters: Parameters = Parameters() + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + components?.queryItems = [ + URLQueryItem(name: "limit", + value: parameters.limit.map { "\($0)" }) + ].filter { $0.value != nil } + if components?.queryItems?.isEmpty ?? false { + components?.queryItems = nil + } + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "GET" + return urlRequest + } + + /// - Returns: **200**, List of related linkages as `AppEventLocalizationAppEventScreenshotsLinkagesResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(AppEventLocalizationAppEventScreenshotsLinkagesResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +extension V1.AppEventLocalizations.ById.Relationships.AppEventScreenshots.GET { + public struct Parameters: Hashable { + /// maximum resources per page + public var limit: Int? + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppEventLocalizations/ById/Relationships/AppEventVideoClips/AppEventLocalizationsByIdRelationshipsAppEventVideoClips.GET.5a78ae1.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppEventLocalizations/ById/Relationships/AppEventVideoClips/AppEventLocalizationsByIdRelationshipsAppEventVideoClips.GET.5a78ae1.generated.swift new file mode 100644 index 00000000..a6762d7a --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppEventLocalizations/ById/Relationships/AppEventVideoClips/AppEventLocalizationsByIdRelationshipsAppEventVideoClips.GET.5a78ae1.generated.swift @@ -0,0 +1,88 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.AppEventLocalizations.ById.Relationships.AppEventVideoClips { + public struct GET: Endpoint { + public typealias Response = AppEventLocalizationAppEventVideoClipsLinkagesResponse + + public var path: String { + "/v1/appEventLocalizations/\(id)/relationships/appEventVideoClips" + } + + /// the id of the requested resource + public var id: String + + public var parameters: Parameters = Parameters() + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + components?.queryItems = [ + URLQueryItem(name: "limit", + value: parameters.limit.map { "\($0)" }) + ].filter { $0.value != nil } + if components?.queryItems?.isEmpty ?? false { + components?.queryItems = nil + } + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "GET" + return urlRequest + } + + /// - Returns: **200**, List of related linkages as `AppEventLocalizationAppEventVideoClipsLinkagesResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(AppEventLocalizationAppEventVideoClipsLinkagesResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +extension V1.AppEventLocalizations.ById.Relationships.AppEventVideoClips.GET { + public struct Parameters: Hashable { + /// maximum resources per page + public var limit: Int? + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppEventScreenshots/AppEventScreenshots.POST.e315a5e.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppEventScreenshots/AppEventScreenshots.POST.e315a5e.generated.swift index d12c9d0b..7ee34411 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppEventScreenshots/AppEventScreenshots.POST.e315a5e.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppEventScreenshots/AppEventScreenshots.POST.e315a5e.generated.swift @@ -41,8 +41,11 @@ extension V1.AppEventScreenshots { /// - Returns: **201**, Single AppEventScreenshot as `AppEventScreenshotResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **422**, Unprocessable request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -56,12 +59,21 @@ extension V1.AppEventScreenshots { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 409: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 422: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppEventScreenshots/ById/AppEventScreenshotsById.DELETE.468aec9.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppEventScreenshots/ById/AppEventScreenshotsById.DELETE.468aec9.generated.swift index a5409d0f..4bce8966 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppEventScreenshots/ById/AppEventScreenshotsById.DELETE.468aec9.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppEventScreenshots/ById/AppEventScreenshotsById.DELETE.468aec9.generated.swift @@ -31,11 +31,12 @@ extension V1.AppEventScreenshots.ById { return urlRequest } - /// - Returns: **204**, Success (no content) /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -43,12 +44,12 @@ extension V1.AppEventScreenshots.ById { } switch urlResponse.statusCode { - case 204: - return - case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) @@ -58,6 +59,9 @@ extension V1.AppEventScreenshots.ById { case 409: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppEventScreenshots/ById/AppEventScreenshotsById.GET.468aec9.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppEventScreenshots/ById/AppEventScreenshotsById.GET.468aec9.generated.swift index ebacd5ac..4e8f5949 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppEventScreenshots/ById/AppEventScreenshotsById.GET.468aec9.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppEventScreenshots/ById/AppEventScreenshotsById.GET.468aec9.generated.swift @@ -44,8 +44,10 @@ extension V1.AppEventScreenshots.ById { /// - Returns: **200**, Single AppEventScreenshot as `AppEventScreenshotResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -59,12 +61,18 @@ extension V1.AppEventScreenshots.ById { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 404: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -87,46 +95,47 @@ extension V1.AppEventScreenshots.ById.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum AppEventScreenshots: Hashable, Codable, RawRepresentable { - case appEventAssetType - case appEventLocalization - case assetDeliveryState - case assetToken - case fileName - case fileSize - case imageAsset - case uploadOperations - case uploaded - case unknown(String) - - public var rawValue: String { - switch self { - case .appEventAssetType: return "appEventAssetType" - case .appEventLocalization: return "appEventLocalization" - case .assetDeliveryState: return "assetDeliveryState" - case .assetToken: return "assetToken" - case .fileName: return "fileName" - case .fileSize: return "fileSize" - case .imageAsset: return "imageAsset" - case .uploadOperations: return "uploadOperations" - case .uploaded: return "uploaded" - case .unknown(let rawValue): return rawValue - } + public struct AppEventScreenshots: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var appEventAssetType: Self { + .init(rawValue: "appEventAssetType") } + public static var appEventLocalization: Self { + .init(rawValue: "appEventLocalization") + } + + public static var assetDeliveryState: Self { + .init(rawValue: "assetDeliveryState") + } + + public static var assetToken: Self { + .init(rawValue: "assetToken") + } + + public static var fileName: Self { + .init(rawValue: "fileName") + } + + public static var fileSize: Self { + .init(rawValue: "fileSize") + } + + public static var imageAsset: Self { + .init(rawValue: "imageAsset") + } + + public static var uploadOperations: Self { + .init(rawValue: "uploadOperations") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "appEventAssetType": self = .appEventAssetType - case "appEventLocalization": self = .appEventLocalization - case "assetDeliveryState": self = .assetDeliveryState - case "assetToken": self = .assetToken - case "fileName": self = .fileName - case "fileSize": self = .fileSize - case "imageAsset": self = .imageAsset - case "uploadOperations": self = .uploadOperations - case "uploaded": self = .uploaded - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } @@ -144,22 +153,19 @@ extension V1.AppEventScreenshots.ById.GET { } } - public enum Include: Hashable, Codable, RawRepresentable { - case appEventLocalization - case unknown(String) + public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var appEventLocalization: Self { + .init(rawValue: "appEventLocalization") + } - public var rawValue: String { - switch self { - case .appEventLocalization: return "appEventLocalization" - case .unknown(let rawValue): return rawValue - } + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "appEventLocalization": self = .appEventLocalization - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppEventScreenshots/ById/AppEventScreenshotsById.PATCH.468aec9.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppEventScreenshots/ById/AppEventScreenshotsById.PATCH.468aec9.generated.swift index acd87805..74d5769d 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppEventScreenshots/ById/AppEventScreenshotsById.PATCH.468aec9.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppEventScreenshots/ById/AppEventScreenshotsById.PATCH.468aec9.generated.swift @@ -48,9 +48,12 @@ extension V1.AppEventScreenshots.ById { /// - Returns: **200**, Single AppEventScreenshot as `AppEventScreenshotResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **422**, Unprocessable request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -64,6 +67,9 @@ extension V1.AppEventScreenshots.ById { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) @@ -73,6 +79,12 @@ extension V1.AppEventScreenshots.ById { case 409: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 422: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppEventVideoClips/AppEventVideoClips.POST.da99af1.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppEventVideoClips/AppEventVideoClips.POST.da99af1.generated.swift index 0b109a95..f6f6b9b7 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppEventVideoClips/AppEventVideoClips.POST.da99af1.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppEventVideoClips/AppEventVideoClips.POST.da99af1.generated.swift @@ -41,8 +41,11 @@ extension V1.AppEventVideoClips { /// - Returns: **201**, Single AppEventVideoClip as `AppEventVideoClipResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **422**, Unprocessable request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -56,12 +59,21 @@ extension V1.AppEventVideoClips { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 409: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 422: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppEventVideoClips/ById/AppEventVideoClipsById.DELETE.ed0e879.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppEventVideoClips/ById/AppEventVideoClipsById.DELETE.ed0e879.generated.swift index c2575e4b..dd692612 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppEventVideoClips/ById/AppEventVideoClipsById.DELETE.ed0e879.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppEventVideoClips/ById/AppEventVideoClipsById.DELETE.ed0e879.generated.swift @@ -31,11 +31,12 @@ extension V1.AppEventVideoClips.ById { return urlRequest } - /// - Returns: **204**, Success (no content) /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -43,12 +44,12 @@ extension V1.AppEventVideoClips.ById { } switch urlResponse.statusCode { - case 204: - return - case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) @@ -58,6 +59,9 @@ extension V1.AppEventVideoClips.ById { case 409: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppEventVideoClips/ById/AppEventVideoClipsById.GET.ed0e879.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppEventVideoClips/ById/AppEventVideoClipsById.GET.ed0e879.generated.swift index d025e16c..4a3b50b1 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppEventVideoClips/ById/AppEventVideoClipsById.GET.ed0e879.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppEventVideoClips/ById/AppEventVideoClipsById.GET.ed0e879.generated.swift @@ -44,8 +44,10 @@ extension V1.AppEventVideoClips.ById { /// - Returns: **200**, Single AppEventVideoClip as `AppEventVideoClipResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -59,12 +61,18 @@ extension V1.AppEventVideoClips.ById { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 404: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -87,49 +95,59 @@ extension V1.AppEventVideoClips.ById.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum AppEventVideoClips: Hashable, Codable, RawRepresentable { - case appEventAssetType - case appEventLocalization - case assetDeliveryState - case fileName - case fileSize - case previewFrameTimeCode - case previewImage - case uploadOperations - case uploaded - case videoUrl - case unknown(String) - - public var rawValue: String { - switch self { - case .appEventAssetType: return "appEventAssetType" - case .appEventLocalization: return "appEventLocalization" - case .assetDeliveryState: return "assetDeliveryState" - case .fileName: return "fileName" - case .fileSize: return "fileSize" - case .previewFrameTimeCode: return "previewFrameTimeCode" - case .previewImage: return "previewImage" - case .uploadOperations: return "uploadOperations" - case .uploaded: return "uploaded" - case .videoUrl: return "videoUrl" - case .unknown(let rawValue): return rawValue - } + public struct AppEventVideoClips: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var appEventAssetType: Self { + .init(rawValue: "appEventAssetType") + } + + public static var appEventLocalization: Self { + .init(rawValue: "appEventLocalization") + } + + public static var assetDeliveryState: Self { + .init(rawValue: "assetDeliveryState") + } + + public static var fileName: Self { + .init(rawValue: "fileName") + } + + public static var fileSize: Self { + .init(rawValue: "fileSize") + } + + public static var previewFrameImage: Self { + .init(rawValue: "previewFrameImage") + } + + public static var previewFrameTimeCode: Self { + .init(rawValue: "previewFrameTimeCode") } + public static var previewImage: Self { + .init(rawValue: "previewImage") + } + + public static var uploadOperations: Self { + .init(rawValue: "uploadOperations") + } + + public static var videoDeliveryState: Self { + .init(rawValue: "videoDeliveryState") + } + + public static var videoUrl: Self { + .init(rawValue: "videoUrl") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "appEventAssetType": self = .appEventAssetType - case "appEventLocalization": self = .appEventLocalization - case "assetDeliveryState": self = .assetDeliveryState - case "fileName": self = .fileName - case "fileSize": self = .fileSize - case "previewFrameTimeCode": self = .previewFrameTimeCode - case "previewImage": self = .previewImage - case "uploadOperations": self = .uploadOperations - case "uploaded": self = .uploaded - case "videoUrl": self = .videoUrl - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } @@ -147,22 +165,19 @@ extension V1.AppEventVideoClips.ById.GET { } } - public enum Include: Hashable, Codable, RawRepresentable { - case appEventLocalization - case unknown(String) + public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var appEventLocalization: Self { + .init(rawValue: "appEventLocalization") + } - public var rawValue: String { - switch self { - case .appEventLocalization: return "appEventLocalization" - case .unknown(let rawValue): return rawValue - } + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "appEventLocalization": self = .appEventLocalization - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppEventVideoClips/ById/AppEventVideoClipsById.PATCH.ed0e879.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppEventVideoClips/ById/AppEventVideoClipsById.PATCH.ed0e879.generated.swift index 3fb841dd..f4af36e8 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppEventVideoClips/ById/AppEventVideoClipsById.PATCH.ed0e879.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppEventVideoClips/ById/AppEventVideoClipsById.PATCH.ed0e879.generated.swift @@ -48,9 +48,12 @@ extension V1.AppEventVideoClips.ById { /// - Returns: **200**, Single AppEventVideoClip as `AppEventVideoClipResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **422**, Unprocessable request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -64,6 +67,9 @@ extension V1.AppEventVideoClips.ById { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) @@ -73,6 +79,12 @@ extension V1.AppEventVideoClips.ById { case 409: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 422: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppEvents/AppEvents.POST.bc3723c.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppEvents/AppEvents.POST.bc3723c.generated.swift index 49dd5654..043d54bb 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppEvents/AppEvents.POST.bc3723c.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppEvents/AppEvents.POST.bc3723c.generated.swift @@ -41,8 +41,11 @@ extension V1.AppEvents { /// - Returns: **201**, Single AppEvent as `AppEventResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **422**, Unprocessable request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -56,12 +59,21 @@ extension V1.AppEvents { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 409: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 422: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppEvents/ById/AppEventsById.DELETE.d4ad439.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppEvents/ById/AppEventsById.DELETE.d4ad439.generated.swift index b891cbea..45c6f20e 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppEvents/ById/AppEventsById.DELETE.d4ad439.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppEvents/ById/AppEventsById.DELETE.d4ad439.generated.swift @@ -31,11 +31,12 @@ extension V1.AppEvents.ById { return urlRequest } - /// - Returns: **204**, Success (no content) /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -43,12 +44,12 @@ extension V1.AppEvents.ById { } switch urlResponse.statusCode { - case 204: - return - case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) @@ -58,6 +59,9 @@ extension V1.AppEvents.ById { case 409: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppEvents/ById/AppEventsById.GET.d4ad439.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppEvents/ById/AppEventsById.GET.d4ad439.generated.swift index c27e0854..cf8ceda8 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppEvents/ById/AppEventsById.GET.d4ad439.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppEvents/ById/AppEventsById.GET.d4ad439.generated.swift @@ -48,8 +48,10 @@ extension V1.AppEvents.ById { /// - Returns: **200**, Single AppEvent as `AppEventResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -63,12 +65,18 @@ extension V1.AppEvents.ById { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 404: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -93,92 +101,99 @@ extension V1.AppEvents.ById.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum AppEventLocalizations: Hashable, Codable, RawRepresentable { - case appEvent - case appEventScreenshots - case appEventVideoClips - case locale - case longDescription - case name - case shortDescription - case unknown(String) - - public var rawValue: String { - switch self { - case .appEvent: return "appEvent" - case .appEventScreenshots: return "appEventScreenshots" - case .appEventVideoClips: return "appEventVideoClips" - case .locale: return "locale" - case .longDescription: return "longDescription" - case .name: return "name" - case .shortDescription: return "shortDescription" - case .unknown(let rawValue): return rawValue - } + public struct AppEventLocalizations: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var appEvent: Self { + .init(rawValue: "appEvent") + } + + public static var appEventScreenshots: Self { + .init(rawValue: "appEventScreenshots") + } + + public static var appEventVideoClips: Self { + .init(rawValue: "appEventVideoClips") + } + + public static var locale: Self { + .init(rawValue: "locale") + } + + public static var longDescription: Self { + .init(rawValue: "longDescription") } + public static var name: Self { + .init(rawValue: "name") + } + + public static var shortDescription: Self { + .init(rawValue: "shortDescription") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "appEvent": self = .appEvent - case "appEventScreenshots": self = .appEventScreenshots - case "appEventVideoClips": self = .appEventVideoClips - case "locale": self = .locale - case "longDescription": self = .longDescription - case "name": self = .name - case "shortDescription": self = .shortDescription - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum AppEvents: Hashable, Codable, RawRepresentable { - case app - case archivedTerritorySchedules - case badge - case deepLink - case eventState - case localizations - case primaryLocale - case priority - case purchaseRequirement - case purpose - case referenceName - case territorySchedules - case unknown(String) - - public var rawValue: String { - switch self { - case .app: return "app" - case .archivedTerritorySchedules: return "archivedTerritorySchedules" - case .badge: return "badge" - case .deepLink: return "deepLink" - case .eventState: return "eventState" - case .localizations: return "localizations" - case .primaryLocale: return "primaryLocale" - case .priority: return "priority" - case .purchaseRequirement: return "purchaseRequirement" - case .purpose: return "purpose" - case .referenceName: return "referenceName" - case .territorySchedules: return "territorySchedules" - case .unknown(let rawValue): return rawValue - } + public struct AppEvents: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var archivedTerritorySchedules: Self { + .init(rawValue: "archivedTerritorySchedules") + } + + public static var badge: Self { + .init(rawValue: "badge") + } + + public static var deepLink: Self { + .init(rawValue: "deepLink") } + public static var eventState: Self { + .init(rawValue: "eventState") + } + + public static var localizations: Self { + .init(rawValue: "localizations") + } + + public static var primaryLocale: Self { + .init(rawValue: "primaryLocale") + } + + public static var priority: Self { + .init(rawValue: "priority") + } + + public static var purchaseRequirement: Self { + .init(rawValue: "purchaseRequirement") + } + + public static var purpose: Self { + .init(rawValue: "purpose") + } + + public static var referenceName: Self { + .init(rawValue: "referenceName") + } + + public static var territorySchedules: Self { + .init(rawValue: "territorySchedules") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "app": self = .app - case "archivedTerritorySchedules": self = .archivedTerritorySchedules - case "badge": self = .badge - case "deepLink": self = .deepLink - case "eventState": self = .eventState - case "localizations": self = .localizations - case "primaryLocale": self = .primaryLocale - case "priority": self = .priority - case "purchaseRequirement": self = .purchaseRequirement - case "purpose": self = .purpose - case "referenceName": self = .referenceName - case "territorySchedules": self = .territorySchedules - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } @@ -201,22 +216,19 @@ extension V1.AppEvents.ById.GET { } } - public enum Include: Hashable, Codable, RawRepresentable { - case localizations - case unknown(String) + public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var localizations: Self { + .init(rawValue: "localizations") + } - public var rawValue: String { - switch self { - case .localizations: return "localizations" - case .unknown(let rawValue): return rawValue - } + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "localizations": self = .localizations - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppEvents/ById/AppEventsById.PATCH.d4ad439.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppEvents/ById/AppEventsById.PATCH.d4ad439.generated.swift index d93e0ae7..47328e34 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppEvents/ById/AppEventsById.PATCH.d4ad439.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppEvents/ById/AppEventsById.PATCH.d4ad439.generated.swift @@ -48,9 +48,12 @@ extension V1.AppEvents.ById { /// - Returns: **200**, Single AppEvent as `AppEventResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **422**, Unprocessable request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -64,6 +67,9 @@ extension V1.AppEvents.ById { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) @@ -73,6 +79,12 @@ extension V1.AppEvents.ById { case 409: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 422: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppEvents/ById/Localizations/AppEventsByIdLocalizations.GET.59e9e3e.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppEvents/ById/Localizations/AppEventsByIdLocalizations.GET.59e9e3e.generated.swift index 1d1f1e97..437d71b6 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppEvents/ById/Localizations/AppEventsByIdLocalizations.GET.59e9e3e.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppEvents/ById/Localizations/AppEventsByIdLocalizations.GET.59e9e3e.generated.swift @@ -56,8 +56,10 @@ extension V1.AppEvents.ById.Localizations { /// - Returns: **200**, List of AppEventLocalizations as `AppEventLocalizationsResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -71,12 +73,18 @@ extension V1.AppEvents.ById.Localizations { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 404: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -102,181 +110,199 @@ extension V1.AppEvents.ById.Localizations.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum AppEventLocalizations: Hashable, Codable, RawRepresentable { - case appEvent - case appEventScreenshots - case appEventVideoClips - case locale - case longDescription - case name - case shortDescription - case unknown(String) - - public var rawValue: String { - switch self { - case .appEvent: return "appEvent" - case .appEventScreenshots: return "appEventScreenshots" - case .appEventVideoClips: return "appEventVideoClips" - case .locale: return "locale" - case .longDescription: return "longDescription" - case .name: return "name" - case .shortDescription: return "shortDescription" - case .unknown(let rawValue): return rawValue - } + public struct AppEventLocalizations: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var appEvent: Self { + .init(rawValue: "appEvent") + } + + public static var appEventScreenshots: Self { + .init(rawValue: "appEventScreenshots") + } + + public static var appEventVideoClips: Self { + .init(rawValue: "appEventVideoClips") + } + + public static var locale: Self { + .init(rawValue: "locale") + } + + public static var longDescription: Self { + .init(rawValue: "longDescription") } + public static var name: Self { + .init(rawValue: "name") + } + + public static var shortDescription: Self { + .init(rawValue: "shortDescription") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "appEvent": self = .appEvent - case "appEventScreenshots": self = .appEventScreenshots - case "appEventVideoClips": self = .appEventVideoClips - case "locale": self = .locale - case "longDescription": self = .longDescription - case "name": self = .name - case "shortDescription": self = .shortDescription - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum AppEventScreenshots: Hashable, Codable, RawRepresentable { - case appEventAssetType - case appEventLocalization - case assetDeliveryState - case assetToken - case fileName - case fileSize - case imageAsset - case uploadOperations - case uploaded - case unknown(String) - - public var rawValue: String { - switch self { - case .appEventAssetType: return "appEventAssetType" - case .appEventLocalization: return "appEventLocalization" - case .assetDeliveryState: return "assetDeliveryState" - case .assetToken: return "assetToken" - case .fileName: return "fileName" - case .fileSize: return "fileSize" - case .imageAsset: return "imageAsset" - case .uploadOperations: return "uploadOperations" - case .uploaded: return "uploaded" - case .unknown(let rawValue): return rawValue - } + public struct AppEventScreenshots: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var appEventAssetType: Self { + .init(rawValue: "appEventAssetType") + } + + public static var appEventLocalization: Self { + .init(rawValue: "appEventLocalization") + } + + public static var assetDeliveryState: Self { + .init(rawValue: "assetDeliveryState") } + public static var assetToken: Self { + .init(rawValue: "assetToken") + } + + public static var fileName: Self { + .init(rawValue: "fileName") + } + + public static var fileSize: Self { + .init(rawValue: "fileSize") + } + + public static var imageAsset: Self { + .init(rawValue: "imageAsset") + } + + public static var uploadOperations: Self { + .init(rawValue: "uploadOperations") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "appEventAssetType": self = .appEventAssetType - case "appEventLocalization": self = .appEventLocalization - case "assetDeliveryState": self = .assetDeliveryState - case "assetToken": self = .assetToken - case "fileName": self = .fileName - case "fileSize": self = .fileSize - case "imageAsset": self = .imageAsset - case "uploadOperations": self = .uploadOperations - case "uploaded": self = .uploaded - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum AppEventVideoClips: Hashable, Codable, RawRepresentable { - case appEventAssetType - case appEventLocalization - case assetDeliveryState - case fileName - case fileSize - case previewFrameTimeCode - case previewImage - case uploadOperations - case uploaded - case videoUrl - case unknown(String) - - public var rawValue: String { - switch self { - case .appEventAssetType: return "appEventAssetType" - case .appEventLocalization: return "appEventLocalization" - case .assetDeliveryState: return "assetDeliveryState" - case .fileName: return "fileName" - case .fileSize: return "fileSize" - case .previewFrameTimeCode: return "previewFrameTimeCode" - case .previewImage: return "previewImage" - case .uploadOperations: return "uploadOperations" - case .uploaded: return "uploaded" - case .videoUrl: return "videoUrl" - case .unknown(let rawValue): return rawValue - } + public struct AppEventVideoClips: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var appEventAssetType: Self { + .init(rawValue: "appEventAssetType") + } + + public static var appEventLocalization: Self { + .init(rawValue: "appEventLocalization") + } + + public static var assetDeliveryState: Self { + .init(rawValue: "assetDeliveryState") + } + + public static var fileName: Self { + .init(rawValue: "fileName") + } + + public static var fileSize: Self { + .init(rawValue: "fileSize") + } + + public static var previewFrameImage: Self { + .init(rawValue: "previewFrameImage") + } + + public static var previewFrameTimeCode: Self { + .init(rawValue: "previewFrameTimeCode") + } + + public static var previewImage: Self { + .init(rawValue: "previewImage") + } + + public static var uploadOperations: Self { + .init(rawValue: "uploadOperations") + } + + public static var videoDeliveryState: Self { + .init(rawValue: "videoDeliveryState") } + public static var videoUrl: Self { + .init(rawValue: "videoUrl") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "appEventAssetType": self = .appEventAssetType - case "appEventLocalization": self = .appEventLocalization - case "assetDeliveryState": self = .assetDeliveryState - case "fileName": self = .fileName - case "fileSize": self = .fileSize - case "previewFrameTimeCode": self = .previewFrameTimeCode - case "previewImage": self = .previewImage - case "uploadOperations": self = .uploadOperations - case "uploaded": self = .uploaded - case "videoUrl": self = .videoUrl - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum AppEvents: Hashable, Codable, RawRepresentable { - case app - case archivedTerritorySchedules - case badge - case deepLink - case eventState - case localizations - case primaryLocale - case priority - case purchaseRequirement - case purpose - case referenceName - case territorySchedules - case unknown(String) - - public var rawValue: String { - switch self { - case .app: return "app" - case .archivedTerritorySchedules: return "archivedTerritorySchedules" - case .badge: return "badge" - case .deepLink: return "deepLink" - case .eventState: return "eventState" - case .localizations: return "localizations" - case .primaryLocale: return "primaryLocale" - case .priority: return "priority" - case .purchaseRequirement: return "purchaseRequirement" - case .purpose: return "purpose" - case .referenceName: return "referenceName" - case .territorySchedules: return "territorySchedules" - case .unknown(let rawValue): return rawValue - } + public struct AppEvents: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var archivedTerritorySchedules: Self { + .init(rawValue: "archivedTerritorySchedules") + } + + public static var badge: Self { + .init(rawValue: "badge") + } + + public static var deepLink: Self { + .init(rawValue: "deepLink") } + public static var eventState: Self { + .init(rawValue: "eventState") + } + + public static var localizations: Self { + .init(rawValue: "localizations") + } + + public static var primaryLocale: Self { + .init(rawValue: "primaryLocale") + } + + public static var priority: Self { + .init(rawValue: "priority") + } + + public static var purchaseRequirement: Self { + .init(rawValue: "purchaseRequirement") + } + + public static var purpose: Self { + .init(rawValue: "purpose") + } + + public static var referenceName: Self { + .init(rawValue: "referenceName") + } + + public static var territorySchedules: Self { + .init(rawValue: "territorySchedules") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "app": self = .app - case "archivedTerritorySchedules": self = .archivedTerritorySchedules - case "badge": self = .badge - case "deepLink": self = .deepLink - case "eventState": self = .eventState - case "localizations": self = .localizations - case "primaryLocale": self = .primaryLocale - case "priority": self = .priority - case "purchaseRequirement": self = .purchaseRequirement - case "purpose": self = .purpose - case "referenceName": self = .referenceName - case "territorySchedules": self = .territorySchedules - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } @@ -309,28 +335,27 @@ extension V1.AppEvents.ById.Localizations.GET { } } - public enum Include: Hashable, Codable, RawRepresentable { - case appEvent - case appEventScreenshots - case appEventVideoClips - case unknown(String) + public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var appEvent: Self { + .init(rawValue: "appEvent") + } - public var rawValue: String { - switch self { - case .appEvent: return "appEvent" - case .appEventScreenshots: return "appEventScreenshots" - case .appEventVideoClips: return "appEventVideoClips" - case .unknown(let rawValue): return rawValue - } + public static var appEventScreenshots: Self { + .init(rawValue: "appEventScreenshots") } + public static var appEventVideoClips: Self { + .init(rawValue: "appEventVideoClips") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "appEvent": self = .appEvent - case "appEventScreenshots": self = .appEventScreenshots - case "appEventVideoClips": self = .appEventVideoClips - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppEvents/ById/Relationships/Localizations/AppEventsByIdRelationshipsLocalizations.GET.963e26a.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppEvents/ById/Relationships/Localizations/AppEventsByIdRelationshipsLocalizations.GET.963e26a.generated.swift new file mode 100644 index 00000000..95bd66df --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppEvents/ById/Relationships/Localizations/AppEventsByIdRelationshipsLocalizations.GET.963e26a.generated.swift @@ -0,0 +1,88 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.AppEvents.ById.Relationships.Localizations { + public struct GET: Endpoint { + public typealias Response = AppEventLocalizationsLinkagesResponse + + public var path: String { + "/v1/appEvents/\(id)/relationships/localizations" + } + + /// the id of the requested resource + public var id: String + + public var parameters: Parameters = Parameters() + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + components?.queryItems = [ + URLQueryItem(name: "limit", + value: parameters.limit.map { "\($0)" }) + ].filter { $0.value != nil } + if components?.queryItems?.isEmpty ?? false { + components?.queryItems = nil + } + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "GET" + return urlRequest + } + + /// - Returns: **200**, List of related linkages as `AppEventLocalizationsLinkagesResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(AppEventLocalizationsLinkagesResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +extension V1.AppEvents.ById.Relationships.Localizations.GET { + public struct Parameters: Hashable { + /// maximum resources per page + public var limit: Int? + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppInfoLocalizations/AppInfoLocalizations.POST.8a04fdc.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppInfoLocalizations/AppInfoLocalizations.POST.8a04fdc.generated.swift index 73398300..46a8f857 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppInfoLocalizations/AppInfoLocalizations.POST.8a04fdc.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppInfoLocalizations/AppInfoLocalizations.POST.8a04fdc.generated.swift @@ -41,8 +41,11 @@ extension V1.AppInfoLocalizations { /// - Returns: **201**, Single AppInfoLocalization as `AppInfoLocalizationResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **422**, Unprocessable request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -56,12 +59,21 @@ extension V1.AppInfoLocalizations { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 409: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 422: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppInfoLocalizations/ById/AppInfoLocalizationsById.DELETE.0b83534.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppInfoLocalizations/ById/AppInfoLocalizationsById.DELETE.0b83534.generated.swift index cf774840..867ff003 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppInfoLocalizations/ById/AppInfoLocalizationsById.DELETE.0b83534.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppInfoLocalizations/ById/AppInfoLocalizationsById.DELETE.0b83534.generated.swift @@ -31,11 +31,12 @@ extension V1.AppInfoLocalizations.ById { return urlRequest } - /// - Returns: **204**, Success (no content) /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -43,12 +44,12 @@ extension V1.AppInfoLocalizations.ById { } switch urlResponse.statusCode { - case 204: - return - case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) @@ -58,6 +59,9 @@ extension V1.AppInfoLocalizations.ById { case 409: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppInfoLocalizations/ById/AppInfoLocalizationsById.GET.0b83534.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppInfoLocalizations/ById/AppInfoLocalizationsById.GET.0b83534.generated.swift index e296ff53..bedf80f5 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppInfoLocalizations/ById/AppInfoLocalizationsById.GET.0b83534.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppInfoLocalizations/ById/AppInfoLocalizationsById.GET.0b83534.generated.swift @@ -44,8 +44,10 @@ extension V1.AppInfoLocalizations.ById { /// - Returns: **200**, Single AppInfoLocalization as `AppInfoLocalizationResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -59,12 +61,18 @@ extension V1.AppInfoLocalizations.ById { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 404: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -87,40 +95,43 @@ extension V1.AppInfoLocalizations.ById.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum AppInfoLocalizations: Hashable, Codable, RawRepresentable { - case appInfo - case locale - case name - case privacyChoicesUrl - case privacyPolicyText - case privacyPolicyUrl - case subtitle - case unknown(String) - - public var rawValue: String { - switch self { - case .appInfo: return "appInfo" - case .locale: return "locale" - case .name: return "name" - case .privacyChoicesUrl: return "privacyChoicesUrl" - case .privacyPolicyText: return "privacyPolicyText" - case .privacyPolicyUrl: return "privacyPolicyUrl" - case .subtitle: return "subtitle" - case .unknown(let rawValue): return rawValue - } + public struct AppInfoLocalizations: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var appInfo: Self { + .init(rawValue: "appInfo") + } + + public static var locale: Self { + .init(rawValue: "locale") + } + + public static var name: Self { + .init(rawValue: "name") + } + + public static var privacyChoicesUrl: Self { + .init(rawValue: "privacyChoicesUrl") + } + + public static var privacyPolicyText: Self { + .init(rawValue: "privacyPolicyText") } + public static var privacyPolicyUrl: Self { + .init(rawValue: "privacyPolicyUrl") + } + + public static var subtitle: Self { + .init(rawValue: "subtitle") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "appInfo": self = .appInfo - case "locale": self = .locale - case "name": self = .name - case "privacyChoicesUrl": self = .privacyChoicesUrl - case "privacyPolicyText": self = .privacyPolicyText - case "privacyPolicyUrl": self = .privacyPolicyUrl - case "subtitle": self = .subtitle - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } @@ -138,22 +149,19 @@ extension V1.AppInfoLocalizations.ById.GET { } } - public enum Include: Hashable, Codable, RawRepresentable { - case appInfo - case unknown(String) + public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var appInfo: Self { + .init(rawValue: "appInfo") + } - public var rawValue: String { - switch self { - case .appInfo: return "appInfo" - case .unknown(let rawValue): return rawValue - } + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "appInfo": self = .appInfo - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppInfoLocalizations/ById/AppInfoLocalizationsById.PATCH.0b83534.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppInfoLocalizations/ById/AppInfoLocalizationsById.PATCH.0b83534.generated.swift index 2109704d..27c3dd56 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppInfoLocalizations/ById/AppInfoLocalizationsById.PATCH.0b83534.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppInfoLocalizations/ById/AppInfoLocalizationsById.PATCH.0b83534.generated.swift @@ -48,9 +48,12 @@ extension V1.AppInfoLocalizations.ById { /// - Returns: **200**, Single AppInfoLocalization as `AppInfoLocalizationResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **422**, Unprocessable request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -64,6 +67,9 @@ extension V1.AppInfoLocalizations.ById { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) @@ -73,6 +79,12 @@ extension V1.AppInfoLocalizations.ById { case 409: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 422: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppInfos/ById/AgeRatingDeclaration/AppInfosByIdAgeRatingDeclaration.GET.1dcaca2.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppInfos/ById/AgeRatingDeclaration/AppInfosByIdAgeRatingDeclaration.GET.1dcaca2.generated.swift index ef9c69ac..fc47ab1c 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppInfos/ById/AgeRatingDeclaration/AppInfosByIdAgeRatingDeclaration.GET.1dcaca2.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppInfos/ById/AgeRatingDeclaration/AppInfosByIdAgeRatingDeclaration.GET.1dcaca2.generated.swift @@ -42,8 +42,10 @@ extension V1.AppInfos.ById.AgeRatingDeclaration { /// - Returns: **200**, Single AgeRatingDeclaration as `AgeRatingDeclarationResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -57,12 +59,18 @@ extension V1.AppInfos.ById.AgeRatingDeclaration { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 404: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -82,70 +90,83 @@ extension V1.AppInfos.ById.AgeRatingDeclaration.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum AgeRatingDeclarations: Hashable, Codable, RawRepresentable { - case alcoholTobaccoOrDrugUseOrReferences - case contests - case gambling - case gamblingAndContests - case gamblingSimulated - case horrorOrFearThemes - case kidsAgeBand - case matureOrSuggestiveThemes - case medicalOrTreatmentInformation - case profanityOrCrudeHumor - case seventeenPlus - case sexualContentGraphicAndNudity - case sexualContentOrNudity - case unrestrictedWebAccess - case violenceCartoonOrFantasy - case violenceRealistic - case violenceRealisticProlongedGraphicOrSadistic - case unknown(String) - - public var rawValue: String { - switch self { - case .alcoholTobaccoOrDrugUseOrReferences: return "alcoholTobaccoOrDrugUseOrReferences" - case .contests: return "contests" - case .gambling: return "gambling" - case .gamblingAndContests: return "gamblingAndContests" - case .gamblingSimulated: return "gamblingSimulated" - case .horrorOrFearThemes: return "horrorOrFearThemes" - case .kidsAgeBand: return "kidsAgeBand" - case .matureOrSuggestiveThemes: return "matureOrSuggestiveThemes" - case .medicalOrTreatmentInformation: return "medicalOrTreatmentInformation" - case .profanityOrCrudeHumor: return "profanityOrCrudeHumor" - case .seventeenPlus: return "seventeenPlus" - case .sexualContentGraphicAndNudity: return "sexualContentGraphicAndNudity" - case .sexualContentOrNudity: return "sexualContentOrNudity" - case .unrestrictedWebAccess: return "unrestrictedWebAccess" - case .violenceCartoonOrFantasy: return "violenceCartoonOrFantasy" - case .violenceRealistic: return "violenceRealistic" - case .violenceRealisticProlongedGraphicOrSadistic: return "violenceRealisticProlongedGraphicOrSadistic" - case .unknown(let rawValue): return rawValue - } + public struct AgeRatingDeclarations: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var alcoholTobaccoOrDrugUseOrReferences: Self { + .init(rawValue: "alcoholTobaccoOrDrugUseOrReferences") + } + + public static var contests: Self { + .init(rawValue: "contests") + } + + public static var gambling: Self { + .init(rawValue: "gambling") + } + + public static var gamblingSimulated: Self { + .init(rawValue: "gamblingSimulated") + } + + public static var horrorOrFearThemes: Self { + .init(rawValue: "horrorOrFearThemes") + } + + public static var kidsAgeBand: Self { + .init(rawValue: "kidsAgeBand") + } + + public static var koreaAgeRatingOverride: Self { + .init(rawValue: "koreaAgeRatingOverride") + } + + public static var lootBox: Self { + .init(rawValue: "lootBox") + } + + public static var matureOrSuggestiveThemes: Self { + .init(rawValue: "matureOrSuggestiveThemes") } + public static var medicalOrTreatmentInformation: Self { + .init(rawValue: "medicalOrTreatmentInformation") + } + + public static var profanityOrCrudeHumor: Self { + .init(rawValue: "profanityOrCrudeHumor") + } + + public static var sexualContentGraphicAndNudity: Self { + .init(rawValue: "sexualContentGraphicAndNudity") + } + + public static var sexualContentOrNudity: Self { + .init(rawValue: "sexualContentOrNudity") + } + + public static var unrestrictedWebAccess: Self { + .init(rawValue: "unrestrictedWebAccess") + } + + public static var violenceCartoonOrFantasy: Self { + .init(rawValue: "violenceCartoonOrFantasy") + } + + public static var violenceRealistic: Self { + .init(rawValue: "violenceRealistic") + } + + public static var violenceRealisticProlongedGraphicOrSadistic: Self { + .init(rawValue: "violenceRealisticProlongedGraphicOrSadistic") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "alcoholTobaccoOrDrugUseOrReferences": self = .alcoholTobaccoOrDrugUseOrReferences - case "contests": self = .contests - case "gambling": self = .gambling - case "gamblingAndContests": self = .gamblingAndContests - case "gamblingSimulated": self = .gamblingSimulated - case "horrorOrFearThemes": self = .horrorOrFearThemes - case "kidsAgeBand": self = .kidsAgeBand - case "matureOrSuggestiveThemes": self = .matureOrSuggestiveThemes - case "medicalOrTreatmentInformation": self = .medicalOrTreatmentInformation - case "profanityOrCrudeHumor": self = .profanityOrCrudeHumor - case "seventeenPlus": self = .seventeenPlus - case "sexualContentGraphicAndNudity": self = .sexualContentGraphicAndNudity - case "sexualContentOrNudity": self = .sexualContentOrNudity - case "unrestrictedWebAccess": self = .unrestrictedWebAccess - case "violenceCartoonOrFantasy": self = .violenceCartoonOrFantasy - case "violenceRealistic": self = .violenceRealistic - case "violenceRealisticProlongedGraphicOrSadistic": self = .violenceRealisticProlongedGraphicOrSadistic - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppInfos/ById/AppInfoLocalizations/AppInfosByIdAppInfoLocalizations.GET.3d8ecb5.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppInfos/ById/AppInfoLocalizations/AppInfosByIdAppInfoLocalizations.GET.3d8ecb5.generated.swift index db94b48a..b3c41745 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppInfos/ById/AppInfoLocalizations/AppInfosByIdAppInfoLocalizations.GET.3d8ecb5.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppInfos/ById/AppInfoLocalizations/AppInfosByIdAppInfoLocalizations.GET.3d8ecb5.generated.swift @@ -50,8 +50,10 @@ extension V1.AppInfos.ById.AppInfoLocalizations { /// - Returns: **200**, List of AppInfoLocalizations as `AppInfoLocalizationsResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -65,12 +67,18 @@ extension V1.AppInfos.ById.AppInfoLocalizations { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 404: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -98,98 +106,127 @@ extension V1.AppInfos.ById.AppInfoLocalizations.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum AppInfoLocalizations: Hashable, Codable, RawRepresentable { - case appInfo - case locale - case name - case privacyChoicesUrl - case privacyPolicyText - case privacyPolicyUrl - case subtitle - case unknown(String) - - public var rawValue: String { - switch self { - case .appInfo: return "appInfo" - case .locale: return "locale" - case .name: return "name" - case .privacyChoicesUrl: return "privacyChoicesUrl" - case .privacyPolicyText: return "privacyPolicyText" - case .privacyPolicyUrl: return "privacyPolicyUrl" - case .subtitle: return "subtitle" - case .unknown(let rawValue): return rawValue - } + public struct AppInfoLocalizations: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var appInfo: Self { + .init(rawValue: "appInfo") + } + + public static var locale: Self { + .init(rawValue: "locale") + } + + public static var name: Self { + .init(rawValue: "name") + } + + public static var privacyChoicesUrl: Self { + .init(rawValue: "privacyChoicesUrl") + } + + public static var privacyPolicyText: Self { + .init(rawValue: "privacyPolicyText") + } + + public static var privacyPolicyUrl: Self { + .init(rawValue: "privacyPolicyUrl") + } + + public static var subtitle: Self { + .init(rawValue: "subtitle") + } + + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "appInfo": self = .appInfo - case "locale": self = .locale - case "name": self = .name - case "privacyChoicesUrl": self = .privacyChoicesUrl - case "privacyPolicyText": self = .privacyPolicyText - case "privacyPolicyUrl": self = .privacyPolicyUrl - case "subtitle": self = .subtitle - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum AppInfos: Hashable, Codable, RawRepresentable { - case ageRatingDeclaration - case app - case appInfoLocalizations - case appStoreAgeRating - case appStoreState - case brazilAgeRating - case brazilAgeRatingV2 - case kidsAgeBand - case primaryCategory - case primarySubcategoryOne - case primarySubcategoryTwo - case secondaryCategory - case secondarySubcategoryOne - case secondarySubcategoryTwo - case unknown(String) - - public var rawValue: String { - switch self { - case .ageRatingDeclaration: return "ageRatingDeclaration" - case .app: return "app" - case .appInfoLocalizations: return "appInfoLocalizations" - case .appStoreAgeRating: return "appStoreAgeRating" - case .appStoreState: return "appStoreState" - case .brazilAgeRating: return "brazilAgeRating" - case .brazilAgeRatingV2: return "brazilAgeRatingV2" - case .kidsAgeBand: return "kidsAgeBand" - case .primaryCategory: return "primaryCategory" - case .primarySubcategoryOne: return "primarySubcategoryOne" - case .primarySubcategoryTwo: return "primarySubcategoryTwo" - case .secondaryCategory: return "secondaryCategory" - case .secondarySubcategoryOne: return "secondarySubcategoryOne" - case .secondarySubcategoryTwo: return "secondarySubcategoryTwo" - case .unknown(let rawValue): return rawValue - } + public struct AppInfos: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var ageRatingDeclaration: Self { + .init(rawValue: "ageRatingDeclaration") + } + + public static var app: Self { + .init(rawValue: "app") + } + + public static var appInfoLocalizations: Self { + .init(rawValue: "appInfoLocalizations") + } + + public static var appStoreAgeRating: Self { + .init(rawValue: "appStoreAgeRating") + } + + public static var appStoreState: Self { + .init(rawValue: "appStoreState") + } + + public static var australiaAgeRating: Self { + .init(rawValue: "australiaAgeRating") + } + + public static var brazilAgeRating: Self { + .init(rawValue: "brazilAgeRating") + } + + public static var brazilAgeRatingV2: Self { + .init(rawValue: "brazilAgeRatingV2") + } + + public static var franceAgeRating: Self { + .init(rawValue: "franceAgeRating") + } + + public static var kidsAgeBand: Self { + .init(rawValue: "kidsAgeBand") + } + + public static var koreaAgeRating: Self { + .init(rawValue: "koreaAgeRating") + } + + public static var primaryCategory: Self { + .init(rawValue: "primaryCategory") + } + + public static var primarySubcategoryOne: Self { + .init(rawValue: "primarySubcategoryOne") + } + + public static var primarySubcategoryTwo: Self { + .init(rawValue: "primarySubcategoryTwo") } + public static var secondaryCategory: Self { + .init(rawValue: "secondaryCategory") + } + + public static var secondarySubcategoryOne: Self { + .init(rawValue: "secondarySubcategoryOne") + } + + public static var secondarySubcategoryTwo: Self { + .init(rawValue: "secondarySubcategoryTwo") + } + + public static var state: Self { + .init(rawValue: "state") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "ageRatingDeclaration": self = .ageRatingDeclaration - case "app": self = .app - case "appInfoLocalizations": self = .appInfoLocalizations - case "appStoreAgeRating": self = .appStoreAgeRating - case "appStoreState": self = .appStoreState - case "brazilAgeRating": self = .brazilAgeRating - case "brazilAgeRatingV2": self = .brazilAgeRatingV2 - case "kidsAgeBand": self = .kidsAgeBand - case "primaryCategory": self = .primaryCategory - case "primarySubcategoryOne": self = .primarySubcategoryOne - case "primarySubcategoryTwo": self = .primarySubcategoryTwo - case "secondaryCategory": self = .secondaryCategory - case "secondarySubcategoryOne": self = .secondarySubcategoryOne - case "secondarySubcategoryTwo": self = .secondarySubcategoryTwo - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } @@ -234,22 +271,19 @@ extension V1.AppInfos.ById.AppInfoLocalizations.GET { } } - public enum Include: Hashable, Codable, RawRepresentable { - case appInfo - case unknown(String) + public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var appInfo: Self { + .init(rawValue: "appInfo") + } - public var rawValue: String { - switch self { - case .appInfo: return "appInfo" - case .unknown(let rawValue): return rawValue - } + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "appInfo": self = .appInfo - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppInfos/ById/AppInfosById.GET.f5390de.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppInfos/ById/AppInfosById.GET.f5390de.generated.swift index 18af276c..5ead5dd6 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppInfos/ById/AppInfosById.GET.f5390de.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppInfos/ById/AppInfosById.GET.f5390de.generated.swift @@ -52,8 +52,10 @@ extension V1.AppInfos.ById { /// - Returns: **200**, Single AppInfo as `AppInfoResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -67,12 +69,18 @@ extension V1.AppInfos.ById { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 404: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -97,190 +105,231 @@ extension V1.AppInfos.ById.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum AgeRatingDeclarations: Hashable, Codable, RawRepresentable { - case alcoholTobaccoOrDrugUseOrReferences - case contests - case gambling - case gamblingAndContests - case gamblingSimulated - case horrorOrFearThemes - case kidsAgeBand - case matureOrSuggestiveThemes - case medicalOrTreatmentInformation - case profanityOrCrudeHumor - case seventeenPlus - case sexualContentGraphicAndNudity - case sexualContentOrNudity - case unrestrictedWebAccess - case violenceCartoonOrFantasy - case violenceRealistic - case violenceRealisticProlongedGraphicOrSadistic - case unknown(String) - - public var rawValue: String { - switch self { - case .alcoholTobaccoOrDrugUseOrReferences: return "alcoholTobaccoOrDrugUseOrReferences" - case .contests: return "contests" - case .gambling: return "gambling" - case .gamblingAndContests: return "gamblingAndContests" - case .gamblingSimulated: return "gamblingSimulated" - case .horrorOrFearThemes: return "horrorOrFearThemes" - case .kidsAgeBand: return "kidsAgeBand" - case .matureOrSuggestiveThemes: return "matureOrSuggestiveThemes" - case .medicalOrTreatmentInformation: return "medicalOrTreatmentInformation" - case .profanityOrCrudeHumor: return "profanityOrCrudeHumor" - case .seventeenPlus: return "seventeenPlus" - case .sexualContentGraphicAndNudity: return "sexualContentGraphicAndNudity" - case .sexualContentOrNudity: return "sexualContentOrNudity" - case .unrestrictedWebAccess: return "unrestrictedWebAccess" - case .violenceCartoonOrFantasy: return "violenceCartoonOrFantasy" - case .violenceRealistic: return "violenceRealistic" - case .violenceRealisticProlongedGraphicOrSadistic: return "violenceRealisticProlongedGraphicOrSadistic" - case .unknown(let rawValue): return rawValue - } + public struct AgeRatingDeclarations: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var alcoholTobaccoOrDrugUseOrReferences: Self { + .init(rawValue: "alcoholTobaccoOrDrugUseOrReferences") + } + + public static var contests: Self { + .init(rawValue: "contests") + } + + public static var gambling: Self { + .init(rawValue: "gambling") + } + + public static var gamblingSimulated: Self { + .init(rawValue: "gamblingSimulated") + } + + public static var horrorOrFearThemes: Self { + .init(rawValue: "horrorOrFearThemes") + } + + public static var kidsAgeBand: Self { + .init(rawValue: "kidsAgeBand") + } + + public static var koreaAgeRatingOverride: Self { + .init(rawValue: "koreaAgeRatingOverride") + } + + public static var lootBox: Self { + .init(rawValue: "lootBox") + } + + public static var matureOrSuggestiveThemes: Self { + .init(rawValue: "matureOrSuggestiveThemes") + } + + public static var medicalOrTreatmentInformation: Self { + .init(rawValue: "medicalOrTreatmentInformation") + } + + public static var profanityOrCrudeHumor: Self { + .init(rawValue: "profanityOrCrudeHumor") + } + + public static var sexualContentGraphicAndNudity: Self { + .init(rawValue: "sexualContentGraphicAndNudity") + } + + public static var sexualContentOrNudity: Self { + .init(rawValue: "sexualContentOrNudity") + } + + public static var unrestrictedWebAccess: Self { + .init(rawValue: "unrestrictedWebAccess") } + public static var violenceCartoonOrFantasy: Self { + .init(rawValue: "violenceCartoonOrFantasy") + } + + public static var violenceRealistic: Self { + .init(rawValue: "violenceRealistic") + } + + public static var violenceRealisticProlongedGraphicOrSadistic: Self { + .init(rawValue: "violenceRealisticProlongedGraphicOrSadistic") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "alcoholTobaccoOrDrugUseOrReferences": self = .alcoholTobaccoOrDrugUseOrReferences - case "contests": self = .contests - case "gambling": self = .gambling - case "gamblingAndContests": self = .gamblingAndContests - case "gamblingSimulated": self = .gamblingSimulated - case "horrorOrFearThemes": self = .horrorOrFearThemes - case "kidsAgeBand": self = .kidsAgeBand - case "matureOrSuggestiveThemes": self = .matureOrSuggestiveThemes - case "medicalOrTreatmentInformation": self = .medicalOrTreatmentInformation - case "profanityOrCrudeHumor": self = .profanityOrCrudeHumor - case "seventeenPlus": self = .seventeenPlus - case "sexualContentGraphicAndNudity": self = .sexualContentGraphicAndNudity - case "sexualContentOrNudity": self = .sexualContentOrNudity - case "unrestrictedWebAccess": self = .unrestrictedWebAccess - case "violenceCartoonOrFantasy": self = .violenceCartoonOrFantasy - case "violenceRealistic": self = .violenceRealistic - case "violenceRealisticProlongedGraphicOrSadistic": self = .violenceRealisticProlongedGraphicOrSadistic - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum AppCategories: Hashable, Codable, RawRepresentable { - case parent - case platforms - case subcategories - case unknown(String) + public struct AppCategories: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var parent: Self { + .init(rawValue: "parent") + } + + public static var platforms: Self { + .init(rawValue: "platforms") + } - public var rawValue: String { - switch self { - case .parent: return "parent" - case .platforms: return "platforms" - case .subcategories: return "subcategories" - case .unknown(let rawValue): return rawValue - } + public static var subcategories: Self { + .init(rawValue: "subcategories") } + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "parent": self = .parent - case "platforms": self = .platforms - case "subcategories": self = .subcategories - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum AppInfoLocalizations: Hashable, Codable, RawRepresentable { - case appInfo - case locale - case name - case privacyChoicesUrl - case privacyPolicyText - case privacyPolicyUrl - case subtitle - case unknown(String) - - public var rawValue: String { - switch self { - case .appInfo: return "appInfo" - case .locale: return "locale" - case .name: return "name" - case .privacyChoicesUrl: return "privacyChoicesUrl" - case .privacyPolicyText: return "privacyPolicyText" - case .privacyPolicyUrl: return "privacyPolicyUrl" - case .subtitle: return "subtitle" - case .unknown(let rawValue): return rawValue - } + public struct AppInfoLocalizations: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var appInfo: Self { + .init(rawValue: "appInfo") + } + + public static var locale: Self { + .init(rawValue: "locale") + } + + public static var name: Self { + .init(rawValue: "name") + } + + public static var privacyChoicesUrl: Self { + .init(rawValue: "privacyChoicesUrl") + } + + public static var privacyPolicyText: Self { + .init(rawValue: "privacyPolicyText") + } + + public static var privacyPolicyUrl: Self { + .init(rawValue: "privacyPolicyUrl") + } + + public static var subtitle: Self { + .init(rawValue: "subtitle") + } + + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "appInfo": self = .appInfo - case "locale": self = .locale - case "name": self = .name - case "privacyChoicesUrl": self = .privacyChoicesUrl - case "privacyPolicyText": self = .privacyPolicyText - case "privacyPolicyUrl": self = .privacyPolicyUrl - case "subtitle": self = .subtitle - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum AppInfos: Hashable, Codable, RawRepresentable { - case ageRatingDeclaration - case app - case appInfoLocalizations - case appStoreAgeRating - case appStoreState - case brazilAgeRating - case brazilAgeRatingV2 - case kidsAgeBand - case primaryCategory - case primarySubcategoryOne - case primarySubcategoryTwo - case secondaryCategory - case secondarySubcategoryOne - case secondarySubcategoryTwo - case unknown(String) - - public var rawValue: String { - switch self { - case .ageRatingDeclaration: return "ageRatingDeclaration" - case .app: return "app" - case .appInfoLocalizations: return "appInfoLocalizations" - case .appStoreAgeRating: return "appStoreAgeRating" - case .appStoreState: return "appStoreState" - case .brazilAgeRating: return "brazilAgeRating" - case .brazilAgeRatingV2: return "brazilAgeRatingV2" - case .kidsAgeBand: return "kidsAgeBand" - case .primaryCategory: return "primaryCategory" - case .primarySubcategoryOne: return "primarySubcategoryOne" - case .primarySubcategoryTwo: return "primarySubcategoryTwo" - case .secondaryCategory: return "secondaryCategory" - case .secondarySubcategoryOne: return "secondarySubcategoryOne" - case .secondarySubcategoryTwo: return "secondarySubcategoryTwo" - case .unknown(let rawValue): return rawValue - } + public struct AppInfos: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var ageRatingDeclaration: Self { + .init(rawValue: "ageRatingDeclaration") + } + + public static var app: Self { + .init(rawValue: "app") + } + + public static var appInfoLocalizations: Self { + .init(rawValue: "appInfoLocalizations") + } + + public static var appStoreAgeRating: Self { + .init(rawValue: "appStoreAgeRating") + } + + public static var appStoreState: Self { + .init(rawValue: "appStoreState") + } + + public static var australiaAgeRating: Self { + .init(rawValue: "australiaAgeRating") + } + + public static var brazilAgeRating: Self { + .init(rawValue: "brazilAgeRating") + } + + public static var brazilAgeRatingV2: Self { + .init(rawValue: "brazilAgeRatingV2") } + public static var franceAgeRating: Self { + .init(rawValue: "franceAgeRating") + } + + public static var kidsAgeBand: Self { + .init(rawValue: "kidsAgeBand") + } + + public static var koreaAgeRating: Self { + .init(rawValue: "koreaAgeRating") + } + + public static var primaryCategory: Self { + .init(rawValue: "primaryCategory") + } + + public static var primarySubcategoryOne: Self { + .init(rawValue: "primarySubcategoryOne") + } + + public static var primarySubcategoryTwo: Self { + .init(rawValue: "primarySubcategoryTwo") + } + + public static var secondaryCategory: Self { + .init(rawValue: "secondaryCategory") + } + + public static var secondarySubcategoryOne: Self { + .init(rawValue: "secondarySubcategoryOne") + } + + public static var secondarySubcategoryTwo: Self { + .init(rawValue: "secondarySubcategoryTwo") + } + + public static var state: Self { + .init(rawValue: "state") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "ageRatingDeclaration": self = .ageRatingDeclaration - case "app": self = .app - case "appInfoLocalizations": self = .appInfoLocalizations - case "appStoreAgeRating": self = .appStoreAgeRating - case "appStoreState": self = .appStoreState - case "brazilAgeRating": self = .brazilAgeRating - case "brazilAgeRatingV2": self = .brazilAgeRatingV2 - case "kidsAgeBand": self = .kidsAgeBand - case "primaryCategory": self = .primaryCategory - case "primarySubcategoryOne": self = .primarySubcategoryOne - case "primarySubcategoryTwo": self = .primarySubcategoryTwo - case "secondaryCategory": self = .secondaryCategory - case "secondarySubcategoryOne": self = .secondarySubcategoryOne - case "secondarySubcategoryTwo": self = .secondarySubcategoryTwo - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } @@ -313,46 +362,51 @@ extension V1.AppInfos.ById.GET { } } - public enum Include: Hashable, Codable, RawRepresentable { - case ageRatingDeclaration - case app - case appInfoLocalizations - case primaryCategory - case primarySubcategoryOne - case primarySubcategoryTwo - case secondaryCategory - case secondarySubcategoryOne - case secondarySubcategoryTwo - case unknown(String) - - public var rawValue: String { - switch self { - case .ageRatingDeclaration: return "ageRatingDeclaration" - case .app: return "app" - case .appInfoLocalizations: return "appInfoLocalizations" - case .primaryCategory: return "primaryCategory" - case .primarySubcategoryOne: return "primarySubcategoryOne" - case .primarySubcategoryTwo: return "primarySubcategoryTwo" - case .secondaryCategory: return "secondaryCategory" - case .secondarySubcategoryOne: return "secondarySubcategoryOne" - case .secondarySubcategoryTwo: return "secondarySubcategoryTwo" - case .unknown(let rawValue): return rawValue - } + public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var ageRatingDeclaration: Self { + .init(rawValue: "ageRatingDeclaration") + } + + public static var app: Self { + .init(rawValue: "app") + } + + public static var appInfoLocalizations: Self { + .init(rawValue: "appInfoLocalizations") + } + + public static var primaryCategory: Self { + .init(rawValue: "primaryCategory") } + public static var primarySubcategoryOne: Self { + .init(rawValue: "primarySubcategoryOne") + } + + public static var primarySubcategoryTwo: Self { + .init(rawValue: "primarySubcategoryTwo") + } + + public static var secondaryCategory: Self { + .init(rawValue: "secondaryCategory") + } + + public static var secondarySubcategoryOne: Self { + .init(rawValue: "secondarySubcategoryOne") + } + + public static var secondarySubcategoryTwo: Self { + .init(rawValue: "secondarySubcategoryTwo") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "ageRatingDeclaration": self = .ageRatingDeclaration - case "app": self = .app - case "appInfoLocalizations": self = .appInfoLocalizations - case "primaryCategory": self = .primaryCategory - case "primarySubcategoryOne": self = .primarySubcategoryOne - case "primarySubcategoryTwo": self = .primarySubcategoryTwo - case "secondaryCategory": self = .secondaryCategory - case "secondarySubcategoryOne": self = .secondarySubcategoryOne - case "secondarySubcategoryTwo": self = .secondarySubcategoryTwo - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppInfos/ById/AppInfosById.PATCH.f5390de.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppInfos/ById/AppInfosById.PATCH.f5390de.generated.swift index 0106a79a..a38e89db 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppInfos/ById/AppInfosById.PATCH.f5390de.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppInfos/ById/AppInfosById.PATCH.f5390de.generated.swift @@ -48,9 +48,12 @@ extension V1.AppInfos.ById { /// - Returns: **200**, Single AppInfo as `AppInfoResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **422**, Unprocessable request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -64,6 +67,9 @@ extension V1.AppInfos.ById { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) @@ -73,6 +79,12 @@ extension V1.AppInfos.ById { case 409: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 422: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppInfos/ById/PrimaryCategory/AppInfosByIdPrimaryCategory.GET.04e5301.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppInfos/ById/PrimaryCategory/AppInfosByIdPrimaryCategory.GET.04e5301.generated.swift index 7dfd13c4..53903389 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppInfos/ById/PrimaryCategory/AppInfosByIdPrimaryCategory.GET.04e5301.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppInfos/ById/PrimaryCategory/AppInfosByIdPrimaryCategory.GET.04e5301.generated.swift @@ -46,8 +46,10 @@ extension V1.AppInfos.ById.PrimaryCategory { /// - Returns: **200**, Single AppCategory as `AppCategoryResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -61,12 +63,18 @@ extension V1.AppInfos.ById.PrimaryCategory { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 404: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -91,28 +99,27 @@ extension V1.AppInfos.ById.PrimaryCategory.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum AppCategories: Hashable, Codable, RawRepresentable { - case parent - case platforms - case subcategories - case unknown(String) - - public var rawValue: String { - switch self { - case .parent: return "parent" - case .platforms: return "platforms" - case .subcategories: return "subcategories" - case .unknown(let rawValue): return rawValue - } + public struct AppCategories: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var parent: Self { + .init(rawValue: "parent") } + public static var platforms: Self { + .init(rawValue: "platforms") + } + + public static var subcategories: Self { + .init(rawValue: "subcategories") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "parent": self = .parent - case "platforms": self = .platforms - case "subcategories": self = .subcategories - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } @@ -130,25 +137,23 @@ extension V1.AppInfos.ById.PrimaryCategory.GET { } } - public enum Include: Hashable, Codable, RawRepresentable { - case parent - case subcategories - case unknown(String) + public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var parent: Self { + .init(rawValue: "parent") + } - public var rawValue: String { - switch self { - case .parent: return "parent" - case .subcategories: return "subcategories" - case .unknown(let rawValue): return rawValue - } + public static var subcategories: Self { + .init(rawValue: "subcategories") } + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "parent": self = .parent - case "subcategories": self = .subcategories - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppInfos/ById/PrimarySubcategoryOne/AppInfosByIdPrimarySubcategoryOne.GET.da6e89b.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppInfos/ById/PrimarySubcategoryOne/AppInfosByIdPrimarySubcategoryOne.GET.da6e89b.generated.swift index cd5c6351..d8a1b55a 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppInfos/ById/PrimarySubcategoryOne/AppInfosByIdPrimarySubcategoryOne.GET.da6e89b.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppInfos/ById/PrimarySubcategoryOne/AppInfosByIdPrimarySubcategoryOne.GET.da6e89b.generated.swift @@ -46,8 +46,10 @@ extension V1.AppInfos.ById.PrimarySubcategoryOne { /// - Returns: **200**, Single AppCategory as `AppCategoryResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -61,12 +63,18 @@ extension V1.AppInfos.ById.PrimarySubcategoryOne { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 404: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -91,28 +99,27 @@ extension V1.AppInfos.ById.PrimarySubcategoryOne.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum AppCategories: Hashable, Codable, RawRepresentable { - case parent - case platforms - case subcategories - case unknown(String) - - public var rawValue: String { - switch self { - case .parent: return "parent" - case .platforms: return "platforms" - case .subcategories: return "subcategories" - case .unknown(let rawValue): return rawValue - } + public struct AppCategories: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var parent: Self { + .init(rawValue: "parent") } + public static var platforms: Self { + .init(rawValue: "platforms") + } + + public static var subcategories: Self { + .init(rawValue: "subcategories") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "parent": self = .parent - case "platforms": self = .platforms - case "subcategories": self = .subcategories - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } @@ -130,25 +137,23 @@ extension V1.AppInfos.ById.PrimarySubcategoryOne.GET { } } - public enum Include: Hashable, Codable, RawRepresentable { - case parent - case subcategories - case unknown(String) + public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var parent: Self { + .init(rawValue: "parent") + } - public var rawValue: String { - switch self { - case .parent: return "parent" - case .subcategories: return "subcategories" - case .unknown(let rawValue): return rawValue - } + public static var subcategories: Self { + .init(rawValue: "subcategories") } + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "parent": self = .parent - case "subcategories": self = .subcategories - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppInfos/ById/PrimarySubcategoryTwo/AppInfosByIdPrimarySubcategoryTwo.GET.7dd937c.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppInfos/ById/PrimarySubcategoryTwo/AppInfosByIdPrimarySubcategoryTwo.GET.7dd937c.generated.swift index 2077bb19..c03a22be 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppInfos/ById/PrimarySubcategoryTwo/AppInfosByIdPrimarySubcategoryTwo.GET.7dd937c.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppInfos/ById/PrimarySubcategoryTwo/AppInfosByIdPrimarySubcategoryTwo.GET.7dd937c.generated.swift @@ -46,8 +46,10 @@ extension V1.AppInfos.ById.PrimarySubcategoryTwo { /// - Returns: **200**, Single AppCategory as `AppCategoryResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -61,12 +63,18 @@ extension V1.AppInfos.ById.PrimarySubcategoryTwo { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 404: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -91,28 +99,27 @@ extension V1.AppInfos.ById.PrimarySubcategoryTwo.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum AppCategories: Hashable, Codable, RawRepresentable { - case parent - case platforms - case subcategories - case unknown(String) - - public var rawValue: String { - switch self { - case .parent: return "parent" - case .platforms: return "platforms" - case .subcategories: return "subcategories" - case .unknown(let rawValue): return rawValue - } + public struct AppCategories: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var parent: Self { + .init(rawValue: "parent") } + public static var platforms: Self { + .init(rawValue: "platforms") + } + + public static var subcategories: Self { + .init(rawValue: "subcategories") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "parent": self = .parent - case "platforms": self = .platforms - case "subcategories": self = .subcategories - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } @@ -130,25 +137,23 @@ extension V1.AppInfos.ById.PrimarySubcategoryTwo.GET { } } - public enum Include: Hashable, Codable, RawRepresentable { - case parent - case subcategories - case unknown(String) + public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var parent: Self { + .init(rawValue: "parent") + } - public var rawValue: String { - switch self { - case .parent: return "parent" - case .subcategories: return "subcategories" - case .unknown(let rawValue): return rawValue - } + public static var subcategories: Self { + .init(rawValue: "subcategories") } + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "parent": self = .parent - case "subcategories": self = .subcategories - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppInfos/ById/Relationships/AgeRatingDeclaration/AppInfosByIdRelationshipsAgeRatingDeclaration.GET.3bee647.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppInfos/ById/Relationships/AgeRatingDeclaration/AppInfosByIdRelationshipsAgeRatingDeclaration.GET.3bee647.generated.swift new file mode 100644 index 00000000..80a50eb7 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppInfos/ById/Relationships/AgeRatingDeclaration/AppInfosByIdRelationshipsAgeRatingDeclaration.GET.3bee647.generated.swift @@ -0,0 +1,86 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.AppInfos.ById.Relationships.AgeRatingDeclaration { + public struct GET: Endpoint { + public typealias Response = AppInfoAgeRatingDeclarationLinkageResponse + + public var path: String { + "/v1/appInfos/\(id)/relationships/ageRatingDeclaration" + } + + /// the id of the requested resource + public var id: String + + public var parameters: Parameters = Parameters() + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + components?.queryItems = [ + + ].filter { $0.value != nil } + if components?.queryItems?.isEmpty ?? false { + components?.queryItems = nil + } + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "GET" + return urlRequest + } + + /// - Returns: **200**, Related linkage as `AppInfoAgeRatingDeclarationLinkageResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(AppInfoAgeRatingDeclarationLinkageResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +extension V1.AppInfos.ById.Relationships.AgeRatingDeclaration.GET { + public struct Parameters: Hashable { + + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppInfos/ById/Relationships/AppInfoLocalizations/AppInfosByIdRelationshipsAppInfoLocalizations.GET.df39862.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppInfos/ById/Relationships/AppInfoLocalizations/AppInfosByIdRelationshipsAppInfoLocalizations.GET.df39862.generated.swift new file mode 100644 index 00000000..29a37fd8 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppInfos/ById/Relationships/AppInfoLocalizations/AppInfosByIdRelationshipsAppInfoLocalizations.GET.df39862.generated.swift @@ -0,0 +1,88 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.AppInfos.ById.Relationships.AppInfoLocalizations { + public struct GET: Endpoint { + public typealias Response = AppInfoAppInfoLocalizationsLinkagesResponse + + public var path: String { + "/v1/appInfos/\(id)/relationships/appInfoLocalizations" + } + + /// the id of the requested resource + public var id: String + + public var parameters: Parameters = Parameters() + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + components?.queryItems = [ + URLQueryItem(name: "limit", + value: parameters.limit.map { "\($0)" }) + ].filter { $0.value != nil } + if components?.queryItems?.isEmpty ?? false { + components?.queryItems = nil + } + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "GET" + return urlRequest + } + + /// - Returns: **200**, List of related linkages as `AppInfoAppInfoLocalizationsLinkagesResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(AppInfoAppInfoLocalizationsLinkagesResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +extension V1.AppInfos.ById.Relationships.AppInfoLocalizations.GET { + public struct Parameters: Hashable { + /// maximum resources per page + public var limit: Int? + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppInfos/ById/Relationships/PrimaryCategory/AppInfosByIdRelationshipsPrimaryCategory.GET.37f3439.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppInfos/ById/Relationships/PrimaryCategory/AppInfosByIdRelationshipsPrimaryCategory.GET.37f3439.generated.swift new file mode 100644 index 00000000..b7f2bb22 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppInfos/ById/Relationships/PrimaryCategory/AppInfosByIdRelationshipsPrimaryCategory.GET.37f3439.generated.swift @@ -0,0 +1,86 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.AppInfos.ById.Relationships.PrimaryCategory { + public struct GET: Endpoint { + public typealias Response = AppInfoPrimaryCategoryLinkageResponse + + public var path: String { + "/v1/appInfos/\(id)/relationships/primaryCategory" + } + + /// the id of the requested resource + public var id: String + + public var parameters: Parameters = Parameters() + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + components?.queryItems = [ + + ].filter { $0.value != nil } + if components?.queryItems?.isEmpty ?? false { + components?.queryItems = nil + } + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "GET" + return urlRequest + } + + /// - Returns: **200**, Related linkage as `AppInfoPrimaryCategoryLinkageResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(AppInfoPrimaryCategoryLinkageResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +extension V1.AppInfos.ById.Relationships.PrimaryCategory.GET { + public struct Parameters: Hashable { + + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppInfos/ById/Relationships/PrimarySubcategoryOne/AppInfosByIdRelationshipsPrimarySubcategoryOne.GET.fdef18f.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppInfos/ById/Relationships/PrimarySubcategoryOne/AppInfosByIdRelationshipsPrimarySubcategoryOne.GET.fdef18f.generated.swift new file mode 100644 index 00000000..64bf31fe --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppInfos/ById/Relationships/PrimarySubcategoryOne/AppInfosByIdRelationshipsPrimarySubcategoryOne.GET.fdef18f.generated.swift @@ -0,0 +1,86 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.AppInfos.ById.Relationships.PrimarySubcategoryOne { + public struct GET: Endpoint { + public typealias Response = AppInfoPrimarySubcategoryOneLinkageResponse + + public var path: String { + "/v1/appInfos/\(id)/relationships/primarySubcategoryOne" + } + + /// the id of the requested resource + public var id: String + + public var parameters: Parameters = Parameters() + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + components?.queryItems = [ + + ].filter { $0.value != nil } + if components?.queryItems?.isEmpty ?? false { + components?.queryItems = nil + } + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "GET" + return urlRequest + } + + /// - Returns: **200**, Related linkage as `AppInfoPrimarySubcategoryOneLinkageResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(AppInfoPrimarySubcategoryOneLinkageResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +extension V1.AppInfos.ById.Relationships.PrimarySubcategoryOne.GET { + public struct Parameters: Hashable { + + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppInfos/ById/Relationships/PrimarySubcategoryTwo/AppInfosByIdRelationshipsPrimarySubcategoryTwo.GET.9f64d06.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppInfos/ById/Relationships/PrimarySubcategoryTwo/AppInfosByIdRelationshipsPrimarySubcategoryTwo.GET.9f64d06.generated.swift new file mode 100644 index 00000000..34ffcb24 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppInfos/ById/Relationships/PrimarySubcategoryTwo/AppInfosByIdRelationshipsPrimarySubcategoryTwo.GET.9f64d06.generated.swift @@ -0,0 +1,86 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.AppInfos.ById.Relationships.PrimarySubcategoryTwo { + public struct GET: Endpoint { + public typealias Response = AppInfoPrimarySubcategoryTwoLinkageResponse + + public var path: String { + "/v1/appInfos/\(id)/relationships/primarySubcategoryTwo" + } + + /// the id of the requested resource + public var id: String + + public var parameters: Parameters = Parameters() + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + components?.queryItems = [ + + ].filter { $0.value != nil } + if components?.queryItems?.isEmpty ?? false { + components?.queryItems = nil + } + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "GET" + return urlRequest + } + + /// - Returns: **200**, Related linkage as `AppInfoPrimarySubcategoryTwoLinkageResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(AppInfoPrimarySubcategoryTwoLinkageResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +extension V1.AppInfos.ById.Relationships.PrimarySubcategoryTwo.GET { + public struct Parameters: Hashable { + + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppInfos/ById/Relationships/SecondaryCategory/AppInfosByIdRelationshipsSecondaryCategory.GET.05de6d7.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppInfos/ById/Relationships/SecondaryCategory/AppInfosByIdRelationshipsSecondaryCategory.GET.05de6d7.generated.swift new file mode 100644 index 00000000..94c83c61 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppInfos/ById/Relationships/SecondaryCategory/AppInfosByIdRelationshipsSecondaryCategory.GET.05de6d7.generated.swift @@ -0,0 +1,86 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.AppInfos.ById.Relationships.SecondaryCategory { + public struct GET: Endpoint { + public typealias Response = AppInfoSecondaryCategoryLinkageResponse + + public var path: String { + "/v1/appInfos/\(id)/relationships/secondaryCategory" + } + + /// the id of the requested resource + public var id: String + + public var parameters: Parameters = Parameters() + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + components?.queryItems = [ + + ].filter { $0.value != nil } + if components?.queryItems?.isEmpty ?? false { + components?.queryItems = nil + } + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "GET" + return urlRequest + } + + /// - Returns: **200**, Related linkage as `AppInfoSecondaryCategoryLinkageResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(AppInfoSecondaryCategoryLinkageResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +extension V1.AppInfos.ById.Relationships.SecondaryCategory.GET { + public struct Parameters: Hashable { + + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppInfos/ById/Relationships/SecondarySubcategoryOne/AppInfosByIdRelationshipsSecondarySubcategoryOne.GET.280da7b.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppInfos/ById/Relationships/SecondarySubcategoryOne/AppInfosByIdRelationshipsSecondarySubcategoryOne.GET.280da7b.generated.swift new file mode 100644 index 00000000..af328f86 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppInfos/ById/Relationships/SecondarySubcategoryOne/AppInfosByIdRelationshipsSecondarySubcategoryOne.GET.280da7b.generated.swift @@ -0,0 +1,86 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.AppInfos.ById.Relationships.SecondarySubcategoryOne { + public struct GET: Endpoint { + public typealias Response = AppInfoSecondarySubcategoryOneLinkageResponse + + public var path: String { + "/v1/appInfos/\(id)/relationships/secondarySubcategoryOne" + } + + /// the id of the requested resource + public var id: String + + public var parameters: Parameters = Parameters() + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + components?.queryItems = [ + + ].filter { $0.value != nil } + if components?.queryItems?.isEmpty ?? false { + components?.queryItems = nil + } + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "GET" + return urlRequest + } + + /// - Returns: **200**, Related linkage as `AppInfoSecondarySubcategoryOneLinkageResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(AppInfoSecondarySubcategoryOneLinkageResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +extension V1.AppInfos.ById.Relationships.SecondarySubcategoryOne.GET { + public struct Parameters: Hashable { + + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppInfos/ById/Relationships/SecondarySubcategoryTwo/AppInfosByIdRelationshipsSecondarySubcategoryTwo.GET.31c4a44.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppInfos/ById/Relationships/SecondarySubcategoryTwo/AppInfosByIdRelationshipsSecondarySubcategoryTwo.GET.31c4a44.generated.swift new file mode 100644 index 00000000..894990b0 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppInfos/ById/Relationships/SecondarySubcategoryTwo/AppInfosByIdRelationshipsSecondarySubcategoryTwo.GET.31c4a44.generated.swift @@ -0,0 +1,86 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.AppInfos.ById.Relationships.SecondarySubcategoryTwo { + public struct GET: Endpoint { + public typealias Response = AppInfoSecondarySubcategoryTwoLinkageResponse + + public var path: String { + "/v1/appInfos/\(id)/relationships/secondarySubcategoryTwo" + } + + /// the id of the requested resource + public var id: String + + public var parameters: Parameters = Parameters() + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + components?.queryItems = [ + + ].filter { $0.value != nil } + if components?.queryItems?.isEmpty ?? false { + components?.queryItems = nil + } + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "GET" + return urlRequest + } + + /// - Returns: **200**, Related linkage as `AppInfoSecondarySubcategoryTwoLinkageResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(AppInfoSecondarySubcategoryTwoLinkageResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +extension V1.AppInfos.ById.Relationships.SecondarySubcategoryTwo.GET { + public struct Parameters: Hashable { + + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppInfos/ById/SecondaryCategory/AppInfosByIdSecondaryCategory.GET.f94b3ff.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppInfos/ById/SecondaryCategory/AppInfosByIdSecondaryCategory.GET.f94b3ff.generated.swift index 56ae6b74..d06989e1 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppInfos/ById/SecondaryCategory/AppInfosByIdSecondaryCategory.GET.f94b3ff.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppInfos/ById/SecondaryCategory/AppInfosByIdSecondaryCategory.GET.f94b3ff.generated.swift @@ -46,8 +46,10 @@ extension V1.AppInfos.ById.SecondaryCategory { /// - Returns: **200**, Single AppCategory as `AppCategoryResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -61,12 +63,18 @@ extension V1.AppInfos.ById.SecondaryCategory { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 404: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -91,28 +99,27 @@ extension V1.AppInfos.ById.SecondaryCategory.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum AppCategories: Hashable, Codable, RawRepresentable { - case parent - case platforms - case subcategories - case unknown(String) - - public var rawValue: String { - switch self { - case .parent: return "parent" - case .platforms: return "platforms" - case .subcategories: return "subcategories" - case .unknown(let rawValue): return rawValue - } + public struct AppCategories: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var parent: Self { + .init(rawValue: "parent") } + public static var platforms: Self { + .init(rawValue: "platforms") + } + + public static var subcategories: Self { + .init(rawValue: "subcategories") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "parent": self = .parent - case "platforms": self = .platforms - case "subcategories": self = .subcategories - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } @@ -130,25 +137,23 @@ extension V1.AppInfos.ById.SecondaryCategory.GET { } } - public enum Include: Hashable, Codable, RawRepresentable { - case parent - case subcategories - case unknown(String) + public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var parent: Self { + .init(rawValue: "parent") + } - public var rawValue: String { - switch self { - case .parent: return "parent" - case .subcategories: return "subcategories" - case .unknown(let rawValue): return rawValue - } + public static var subcategories: Self { + .init(rawValue: "subcategories") } + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "parent": self = .parent - case "subcategories": self = .subcategories - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppInfos/ById/SecondarySubcategoryOne/AppInfosByIdSecondarySubcategoryOne.GET.28e28b6.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppInfos/ById/SecondarySubcategoryOne/AppInfosByIdSecondarySubcategoryOne.GET.28e28b6.generated.swift index 0c55370e..422c2669 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppInfos/ById/SecondarySubcategoryOne/AppInfosByIdSecondarySubcategoryOne.GET.28e28b6.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppInfos/ById/SecondarySubcategoryOne/AppInfosByIdSecondarySubcategoryOne.GET.28e28b6.generated.swift @@ -46,8 +46,10 @@ extension V1.AppInfos.ById.SecondarySubcategoryOne { /// - Returns: **200**, Single AppCategory as `AppCategoryResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -61,12 +63,18 @@ extension V1.AppInfos.ById.SecondarySubcategoryOne { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 404: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -91,28 +99,27 @@ extension V1.AppInfos.ById.SecondarySubcategoryOne.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum AppCategories: Hashable, Codable, RawRepresentable { - case parent - case platforms - case subcategories - case unknown(String) - - public var rawValue: String { - switch self { - case .parent: return "parent" - case .platforms: return "platforms" - case .subcategories: return "subcategories" - case .unknown(let rawValue): return rawValue - } + public struct AppCategories: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var parent: Self { + .init(rawValue: "parent") } + public static var platforms: Self { + .init(rawValue: "platforms") + } + + public static var subcategories: Self { + .init(rawValue: "subcategories") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "parent": self = .parent - case "platforms": self = .platforms - case "subcategories": self = .subcategories - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } @@ -130,25 +137,23 @@ extension V1.AppInfos.ById.SecondarySubcategoryOne.GET { } } - public enum Include: Hashable, Codable, RawRepresentable { - case parent - case subcategories - case unknown(String) + public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var parent: Self { + .init(rawValue: "parent") + } - public var rawValue: String { - switch self { - case .parent: return "parent" - case .subcategories: return "subcategories" - case .unknown(let rawValue): return rawValue - } + public static var subcategories: Self { + .init(rawValue: "subcategories") } + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "parent": self = .parent - case "subcategories": self = .subcategories - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppInfos/ById/SecondarySubcategoryTwo/AppInfosByIdSecondarySubcategoryTwo.GET.4c3495c.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppInfos/ById/SecondarySubcategoryTwo/AppInfosByIdSecondarySubcategoryTwo.GET.4c3495c.generated.swift index c3ecc316..d7d5d239 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppInfos/ById/SecondarySubcategoryTwo/AppInfosByIdSecondarySubcategoryTwo.GET.4c3495c.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppInfos/ById/SecondarySubcategoryTwo/AppInfosByIdSecondarySubcategoryTwo.GET.4c3495c.generated.swift @@ -46,8 +46,10 @@ extension V1.AppInfos.ById.SecondarySubcategoryTwo { /// - Returns: **200**, Single AppCategory as `AppCategoryResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -61,12 +63,18 @@ extension V1.AppInfos.ById.SecondarySubcategoryTwo { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 404: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -91,28 +99,27 @@ extension V1.AppInfos.ById.SecondarySubcategoryTwo.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum AppCategories: Hashable, Codable, RawRepresentable { - case parent - case platforms - case subcategories - case unknown(String) - - public var rawValue: String { - switch self { - case .parent: return "parent" - case .platforms: return "platforms" - case .subcategories: return "subcategories" - case .unknown(let rawValue): return rawValue - } + public struct AppCategories: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var parent: Self { + .init(rawValue: "parent") } + public static var platforms: Self { + .init(rawValue: "platforms") + } + + public static var subcategories: Self { + .init(rawValue: "subcategories") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "parent": self = .parent - case "platforms": self = .platforms - case "subcategories": self = .subcategories - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } @@ -130,25 +137,23 @@ extension V1.AppInfos.ById.SecondarySubcategoryTwo.GET { } } - public enum Include: Hashable, Codable, RawRepresentable { - case parent - case subcategories - case unknown(String) + public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var parent: Self { + .init(rawValue: "parent") + } - public var rawValue: String { - switch self { - case .parent: return "parent" - case .subcategories: return "subcategories" - case .unknown(let rawValue): return rawValue - } + public static var subcategories: Self { + .init(rawValue: "subcategories") } + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "parent": self = .parent - case "subcategories": self = .subcategories - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppPreviewSets/AppPreviewSets.POST.704590c.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppPreviewSets/AppPreviewSets.POST.704590c.generated.swift index ccbe8329..4814ba67 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppPreviewSets/AppPreviewSets.POST.704590c.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppPreviewSets/AppPreviewSets.POST.704590c.generated.swift @@ -41,8 +41,11 @@ extension V1.AppPreviewSets { /// - Returns: **201**, Single AppPreviewSet as `AppPreviewSetResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **422**, Unprocessable request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -56,12 +59,21 @@ extension V1.AppPreviewSets { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 409: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 422: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppPreviewSets/ById/AppPreviewSetsById.DELETE.fc798bf.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppPreviewSets/ById/AppPreviewSetsById.DELETE.fc798bf.generated.swift index b0075cc6..96cb7fa8 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppPreviewSets/ById/AppPreviewSetsById.DELETE.fc798bf.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppPreviewSets/ById/AppPreviewSetsById.DELETE.fc798bf.generated.swift @@ -31,11 +31,12 @@ extension V1.AppPreviewSets.ById { return urlRequest } - /// - Returns: **204**, Success (no content) /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -43,12 +44,12 @@ extension V1.AppPreviewSets.ById { } switch urlResponse.statusCode { - case 204: - return - case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) @@ -58,6 +59,9 @@ extension V1.AppPreviewSets.ById { case 409: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppPreviewSets/ById/AppPreviewSetsById.GET.fc798bf.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppPreviewSets/ById/AppPreviewSetsById.GET.fc798bf.generated.swift index 0a3ee738..92757c8a 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppPreviewSets/ById/AppPreviewSetsById.GET.fc798bf.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppPreviewSets/ById/AppPreviewSetsById.GET.fc798bf.generated.swift @@ -48,8 +48,10 @@ extension V1.AppPreviewSets.ById { /// - Returns: **200**, Single AppPreviewSet as `AppPreviewSetResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -63,12 +65,18 @@ extension V1.AppPreviewSets.ById { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 404: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -93,83 +101,95 @@ extension V1.AppPreviewSets.ById.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum AppPreviewSets: Hashable, Codable, RawRepresentable { - case appCustomProductPageLocalization - case appPreviews - case appStoreVersionExperimentTreatmentLocalization - case appStoreVersionLocalization - case previewType - case unknown(String) - - public var rawValue: String { - switch self { - case .appCustomProductPageLocalization: return "appCustomProductPageLocalization" - case .appPreviews: return "appPreviews" - case .appStoreVersionExperimentTreatmentLocalization: return "appStoreVersionExperimentTreatmentLocalization" - case .appStoreVersionLocalization: return "appStoreVersionLocalization" - case .previewType: return "previewType" - case .unknown(let rawValue): return rawValue - } + public struct AppPreviewSets: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var appCustomProductPageLocalization: Self { + .init(rawValue: "appCustomProductPageLocalization") + } + + public static var appPreviews: Self { + .init(rawValue: "appPreviews") + } + + public static var appStoreVersionExperimentTreatmentLocalization: Self { + .init(rawValue: "appStoreVersionExperimentTreatmentLocalization") + } + + public static var appStoreVersionLocalization: Self { + .init(rawValue: "appStoreVersionLocalization") + } + + public static var previewType: Self { + .init(rawValue: "previewType") + } + + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "appCustomProductPageLocalization": self = .appCustomProductPageLocalization - case "appPreviews": self = .appPreviews - case "appStoreVersionExperimentTreatmentLocalization": self = .appStoreVersionExperimentTreatmentLocalization - case "appStoreVersionLocalization": self = .appStoreVersionLocalization - case "previewType": self = .previewType - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum AppPreviews: Hashable, Codable, RawRepresentable { - case appPreviewSet - case assetDeliveryState - case fileName - case fileSize - case mimeType - case previewFrameTimeCode - case previewImage - case sourceFileChecksum - case uploadOperations - case uploaded - case videoUrl - case unknown(String) - - public var rawValue: String { - switch self { - case .appPreviewSet: return "appPreviewSet" - case .assetDeliveryState: return "assetDeliveryState" - case .fileName: return "fileName" - case .fileSize: return "fileSize" - case .mimeType: return "mimeType" - case .previewFrameTimeCode: return "previewFrameTimeCode" - case .previewImage: return "previewImage" - case .sourceFileChecksum: return "sourceFileChecksum" - case .uploadOperations: return "uploadOperations" - case .uploaded: return "uploaded" - case .videoUrl: return "videoUrl" - case .unknown(let rawValue): return rawValue - } + public struct AppPreviews: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var appPreviewSet: Self { + .init(rawValue: "appPreviewSet") + } + + public static var assetDeliveryState: Self { + .init(rawValue: "assetDeliveryState") } + public static var fileName: Self { + .init(rawValue: "fileName") + } + + public static var fileSize: Self { + .init(rawValue: "fileSize") + } + + public static var mimeType: Self { + .init(rawValue: "mimeType") + } + + public static var previewFrameImage: Self { + .init(rawValue: "previewFrameImage") + } + + public static var previewFrameTimeCode: Self { + .init(rawValue: "previewFrameTimeCode") + } + + public static var previewImage: Self { + .init(rawValue: "previewImage") + } + + public static var sourceFileChecksum: Self { + .init(rawValue: "sourceFileChecksum") + } + + public static var uploadOperations: Self { + .init(rawValue: "uploadOperations") + } + + public static var videoDeliveryState: Self { + .init(rawValue: "videoDeliveryState") + } + + public static var videoUrl: Self { + .init(rawValue: "videoUrl") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "appPreviewSet": self = .appPreviewSet - case "assetDeliveryState": self = .assetDeliveryState - case "fileName": self = .fileName - case "fileSize": self = .fileSize - case "mimeType": self = .mimeType - case "previewFrameTimeCode": self = .previewFrameTimeCode - case "previewImage": self = .previewImage - case "sourceFileChecksum": self = .sourceFileChecksum - case "uploadOperations": self = .uploadOperations - case "uploaded": self = .uploaded - case "videoUrl": self = .videoUrl - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } @@ -192,31 +212,31 @@ extension V1.AppPreviewSets.ById.GET { } } - public enum Include: Hashable, Codable, RawRepresentable { - case appCustomProductPageLocalization - case appPreviews - case appStoreVersionExperimentTreatmentLocalization - case appStoreVersionLocalization - case unknown(String) - - public var rawValue: String { - switch self { - case .appCustomProductPageLocalization: return "appCustomProductPageLocalization" - case .appPreviews: return "appPreviews" - case .appStoreVersionExperimentTreatmentLocalization: return "appStoreVersionExperimentTreatmentLocalization" - case .appStoreVersionLocalization: return "appStoreVersionLocalization" - case .unknown(let rawValue): return rawValue - } + public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var appCustomProductPageLocalization: Self { + .init(rawValue: "appCustomProductPageLocalization") + } + + public static var appPreviews: Self { + .init(rawValue: "appPreviews") + } + + public static var appStoreVersionExperimentTreatmentLocalization: Self { + .init(rawValue: "appStoreVersionExperimentTreatmentLocalization") } + public static var appStoreVersionLocalization: Self { + .init(rawValue: "appStoreVersionLocalization") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "appCustomProductPageLocalization": self = .appCustomProductPageLocalization - case "appPreviews": self = .appPreviews - case "appStoreVersionExperimentTreatmentLocalization": self = .appStoreVersionExperimentTreatmentLocalization - case "appStoreVersionLocalization": self = .appStoreVersionLocalization - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppPreviewSets/ById/AppPreviews/AppPreviewSetsByIdAppPreviews.GET.a3d2673.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppPreviewSets/ById/AppPreviews/AppPreviewSetsByIdAppPreviews.GET.a3d2673.generated.swift index 88019eb0..c9bd2fa6 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppPreviewSets/ById/AppPreviews/AppPreviewSetsByIdAppPreviews.GET.a3d2673.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppPreviewSets/ById/AppPreviews/AppPreviewSetsByIdAppPreviews.GET.a3d2673.generated.swift @@ -48,8 +48,10 @@ extension V1.AppPreviewSets.ById.AppPreviews { /// - Returns: **200**, List of AppPreviews as `AppPreviewsResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -63,12 +65,18 @@ extension V1.AppPreviewSets.ById.AppPreviews { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 404: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -94,83 +102,95 @@ extension V1.AppPreviewSets.ById.AppPreviews.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum AppPreviewSets: Hashable, Codable, RawRepresentable { - case appCustomProductPageLocalization - case appPreviews - case appStoreVersionExperimentTreatmentLocalization - case appStoreVersionLocalization - case previewType - case unknown(String) - - public var rawValue: String { - switch self { - case .appCustomProductPageLocalization: return "appCustomProductPageLocalization" - case .appPreviews: return "appPreviews" - case .appStoreVersionExperimentTreatmentLocalization: return "appStoreVersionExperimentTreatmentLocalization" - case .appStoreVersionLocalization: return "appStoreVersionLocalization" - case .previewType: return "previewType" - case .unknown(let rawValue): return rawValue - } + public struct AppPreviewSets: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var appCustomProductPageLocalization: Self { + .init(rawValue: "appCustomProductPageLocalization") + } + + public static var appPreviews: Self { + .init(rawValue: "appPreviews") + } + + public static var appStoreVersionExperimentTreatmentLocalization: Self { + .init(rawValue: "appStoreVersionExperimentTreatmentLocalization") + } + + public static var appStoreVersionLocalization: Self { + .init(rawValue: "appStoreVersionLocalization") + } + + public static var previewType: Self { + .init(rawValue: "previewType") + } + + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "appCustomProductPageLocalization": self = .appCustomProductPageLocalization - case "appPreviews": self = .appPreviews - case "appStoreVersionExperimentTreatmentLocalization": self = .appStoreVersionExperimentTreatmentLocalization - case "appStoreVersionLocalization": self = .appStoreVersionLocalization - case "previewType": self = .previewType - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum AppPreviews: Hashable, Codable, RawRepresentable { - case appPreviewSet - case assetDeliveryState - case fileName - case fileSize - case mimeType - case previewFrameTimeCode - case previewImage - case sourceFileChecksum - case uploadOperations - case uploaded - case videoUrl - case unknown(String) - - public var rawValue: String { - switch self { - case .appPreviewSet: return "appPreviewSet" - case .assetDeliveryState: return "assetDeliveryState" - case .fileName: return "fileName" - case .fileSize: return "fileSize" - case .mimeType: return "mimeType" - case .previewFrameTimeCode: return "previewFrameTimeCode" - case .previewImage: return "previewImage" - case .sourceFileChecksum: return "sourceFileChecksum" - case .uploadOperations: return "uploadOperations" - case .uploaded: return "uploaded" - case .videoUrl: return "videoUrl" - case .unknown(let rawValue): return rawValue - } + public struct AppPreviews: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var appPreviewSet: Self { + .init(rawValue: "appPreviewSet") + } + + public static var assetDeliveryState: Self { + .init(rawValue: "assetDeliveryState") + } + + public static var fileName: Self { + .init(rawValue: "fileName") + } + + public static var fileSize: Self { + .init(rawValue: "fileSize") + } + + public static var mimeType: Self { + .init(rawValue: "mimeType") + } + + public static var previewFrameImage: Self { + .init(rawValue: "previewFrameImage") + } + + public static var previewFrameTimeCode: Self { + .init(rawValue: "previewFrameTimeCode") + } + + public static var previewImage: Self { + .init(rawValue: "previewImage") + } + + public static var sourceFileChecksum: Self { + .init(rawValue: "sourceFileChecksum") + } + + public static var uploadOperations: Self { + .init(rawValue: "uploadOperations") } + public static var videoDeliveryState: Self { + .init(rawValue: "videoDeliveryState") + } + + public static var videoUrl: Self { + .init(rawValue: "videoUrl") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "appPreviewSet": self = .appPreviewSet - case "assetDeliveryState": self = .assetDeliveryState - case "fileName": self = .fileName - case "fileSize": self = .fileSize - case "mimeType": self = .mimeType - case "previewFrameTimeCode": self = .previewFrameTimeCode - case "previewImage": self = .previewImage - case "sourceFileChecksum": self = .sourceFileChecksum - case "uploadOperations": self = .uploadOperations - case "uploaded": self = .uploaded - case "videoUrl": self = .videoUrl - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } @@ -193,22 +213,19 @@ extension V1.AppPreviewSets.ById.AppPreviews.GET { } } - public enum Include: Hashable, Codable, RawRepresentable { - case appPreviewSet - case unknown(String) + public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var appPreviewSet: Self { + .init(rawValue: "appPreviewSet") + } - public var rawValue: String { - switch self { - case .appPreviewSet: return "appPreviewSet" - case .unknown(let rawValue): return rawValue - } + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "appPreviewSet": self = .appPreviewSet - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppPreviewSets/ById/Relationships/AppPreviews/AppPreviewSetsByIdRelationshipsAppPreviews.GET.7ca8051.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppPreviewSets/ById/Relationships/AppPreviews/AppPreviewSetsByIdRelationshipsAppPreviews.GET.7ca8051.generated.swift index 1e7640d6..fdbac137 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppPreviewSets/ById/Relationships/AppPreviews/AppPreviewSetsByIdRelationshipsAppPreviews.GET.7ca8051.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppPreviewSets/ById/Relationships/AppPreviews/AppPreviewSetsByIdRelationshipsAppPreviews.GET.7ca8051.generated.swift @@ -42,8 +42,10 @@ extension V1.AppPreviewSets.ById.Relationships.AppPreviews { /// - Returns: **200**, List of related linkages as `AppPreviewSetAppPreviewsLinkagesResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -57,12 +59,18 @@ extension V1.AppPreviewSets.ById.Relationships.AppPreviews { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 404: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppPreviewSets/ById/Relationships/AppPreviews/AppPreviewSetsByIdRelationshipsAppPreviews.PATCH.7ca8051.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppPreviewSets/ById/Relationships/AppPreviews/AppPreviewSetsByIdRelationshipsAppPreviews.PATCH.7ca8051.generated.swift index 4df2af04..37df5c62 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppPreviewSets/ById/Relationships/AppPreviews/AppPreviewSetsByIdRelationshipsAppPreviews.PATCH.7ca8051.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppPreviewSets/ById/Relationships/AppPreviews/AppPreviewSetsByIdRelationshipsAppPreviews.PATCH.7ca8051.generated.swift @@ -46,10 +46,12 @@ extension V1.AppPreviewSets.ById.Relationships.AppPreviews { return urlRequest } - /// - Returns: **204**, Success (no content) + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **422**, Unprocessable request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -57,8 +59,8 @@ extension V1.AppPreviewSets.ById.Relationships.AppPreviews { } switch urlResponse.statusCode { - case 204: - return + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) @@ -69,6 +71,12 @@ extension V1.AppPreviewSets.ById.Relationships.AppPreviews { case 409: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 422: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppPreviews/AppPreviews.POST.177bb39.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppPreviews/AppPreviews.POST.177bb39.generated.swift index b0b876d6..13411ccc 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppPreviews/AppPreviews.POST.177bb39.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppPreviews/AppPreviews.POST.177bb39.generated.swift @@ -41,8 +41,11 @@ extension V1.AppPreviews { /// - Returns: **201**, Single AppPreview as `AppPreviewResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **422**, Unprocessable request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -56,12 +59,21 @@ extension V1.AppPreviews { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 409: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 422: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppPreviews/ById/AppPreviewsById.DELETE.9a43a28.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppPreviews/ById/AppPreviewsById.DELETE.9a43a28.generated.swift index c15e35ae..65cef007 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppPreviews/ById/AppPreviewsById.DELETE.9a43a28.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppPreviews/ById/AppPreviewsById.DELETE.9a43a28.generated.swift @@ -31,11 +31,12 @@ extension V1.AppPreviews.ById { return urlRequest } - /// - Returns: **204**, Success (no content) /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -43,12 +44,12 @@ extension V1.AppPreviews.ById { } switch urlResponse.statusCode { - case 204: - return - case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) @@ -58,6 +59,9 @@ extension V1.AppPreviews.ById { case 409: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppPreviews/ById/AppPreviewsById.GET.9a43a28.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppPreviews/ById/AppPreviewsById.GET.9a43a28.generated.swift index 5301c0b3..e4e3892b 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppPreviews/ById/AppPreviewsById.GET.9a43a28.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppPreviews/ById/AppPreviewsById.GET.9a43a28.generated.swift @@ -44,8 +44,10 @@ extension V1.AppPreviews.ById { /// - Returns: **200**, Single AppPreview as `AppPreviewResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -59,12 +61,18 @@ extension V1.AppPreviews.ById { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 404: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -87,52 +95,63 @@ extension V1.AppPreviews.ById.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum AppPreviews: Hashable, Codable, RawRepresentable { - case appPreviewSet - case assetDeliveryState - case fileName - case fileSize - case mimeType - case previewFrameTimeCode - case previewImage - case sourceFileChecksum - case uploadOperations - case uploaded - case videoUrl - case unknown(String) - - public var rawValue: String { - switch self { - case .appPreviewSet: return "appPreviewSet" - case .assetDeliveryState: return "assetDeliveryState" - case .fileName: return "fileName" - case .fileSize: return "fileSize" - case .mimeType: return "mimeType" - case .previewFrameTimeCode: return "previewFrameTimeCode" - case .previewImage: return "previewImage" - case .sourceFileChecksum: return "sourceFileChecksum" - case .uploadOperations: return "uploadOperations" - case .uploaded: return "uploaded" - case .videoUrl: return "videoUrl" - case .unknown(let rawValue): return rawValue - } + public struct AppPreviews: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var appPreviewSet: Self { + .init(rawValue: "appPreviewSet") } + public static var assetDeliveryState: Self { + .init(rawValue: "assetDeliveryState") + } + + public static var fileName: Self { + .init(rawValue: "fileName") + } + + public static var fileSize: Self { + .init(rawValue: "fileSize") + } + + public static var mimeType: Self { + .init(rawValue: "mimeType") + } + + public static var previewFrameImage: Self { + .init(rawValue: "previewFrameImage") + } + + public static var previewFrameTimeCode: Self { + .init(rawValue: "previewFrameTimeCode") + } + + public static var previewImage: Self { + .init(rawValue: "previewImage") + } + + public static var sourceFileChecksum: Self { + .init(rawValue: "sourceFileChecksum") + } + + public static var uploadOperations: Self { + .init(rawValue: "uploadOperations") + } + + public static var videoDeliveryState: Self { + .init(rawValue: "videoDeliveryState") + } + + public static var videoUrl: Self { + .init(rawValue: "videoUrl") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "appPreviewSet": self = .appPreviewSet - case "assetDeliveryState": self = .assetDeliveryState - case "fileName": self = .fileName - case "fileSize": self = .fileSize - case "mimeType": self = .mimeType - case "previewFrameTimeCode": self = .previewFrameTimeCode - case "previewImage": self = .previewImage - case "sourceFileChecksum": self = .sourceFileChecksum - case "uploadOperations": self = .uploadOperations - case "uploaded": self = .uploaded - case "videoUrl": self = .videoUrl - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } @@ -150,22 +169,19 @@ extension V1.AppPreviews.ById.GET { } } - public enum Include: Hashable, Codable, RawRepresentable { - case appPreviewSet - case unknown(String) + public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var appPreviewSet: Self { + .init(rawValue: "appPreviewSet") + } - public var rawValue: String { - switch self { - case .appPreviewSet: return "appPreviewSet" - case .unknown(let rawValue): return rawValue - } + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "appPreviewSet": self = .appPreviewSet - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppPreviews/ById/AppPreviewsById.PATCH.9a43a28.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppPreviews/ById/AppPreviewsById.PATCH.9a43a28.generated.swift index 98625481..117af40e 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppPreviews/ById/AppPreviewsById.PATCH.9a43a28.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppPreviews/ById/AppPreviewsById.PATCH.9a43a28.generated.swift @@ -48,9 +48,12 @@ extension V1.AppPreviews.ById { /// - Returns: **200**, Single AppPreview as `AppPreviewResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **422**, Unprocessable request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -64,6 +67,9 @@ extension V1.AppPreviews.ById { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) @@ -73,6 +79,12 @@ extension V1.AppPreviews.ById { case 409: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 422: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppPriceSchedules/AppPriceSchedules.POST.fa8f58f.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppPriceSchedules/AppPriceSchedules.POST.fa8f58f.generated.swift index 7326e031..1d69f4b5 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppPriceSchedules/AppPriceSchedules.POST.fa8f58f.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppPriceSchedules/AppPriceSchedules.POST.fa8f58f.generated.swift @@ -41,8 +41,11 @@ extension V1.AppPriceSchedules { /// - Returns: **201**, Single AppPriceSchedule as `AppPriceScheduleResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **422**, Unprocessable request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -56,12 +59,21 @@ extension V1.AppPriceSchedules { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 409: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 422: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppPriceSchedules/ById/AppPriceSchedulesById.GET.de4a989.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppPriceSchedules/ById/AppPriceSchedulesById.GET.de4a989.generated.swift index 94fa67c5..eec8cd1c 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppPriceSchedules/ById/AppPriceSchedulesById.GET.de4a989.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppPriceSchedules/ById/AppPriceSchedulesById.GET.de4a989.generated.swift @@ -52,8 +52,10 @@ extension V1.AppPriceSchedules.ById { /// - Returns: **200**, Single AppPriceSchedule as `AppPriceScheduleResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -67,12 +69,18 @@ extension V1.AppPriceSchedules.ById { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 404: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -97,81 +105,79 @@ extension V1.AppPriceSchedules.ById.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum AppPriceSchedules: Hashable, Codable, RawRepresentable { - case app - case automaticPrices - case baseTerritory - case manualPrices - case unknown(String) - - public var rawValue: String { - switch self { - case .app: return "app" - case .automaticPrices: return "automaticPrices" - case .baseTerritory: return "baseTerritory" - case .manualPrices: return "manualPrices" - case .unknown(let rawValue): return rawValue - } + public struct AppPriceSchedules: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var app: Self { + .init(rawValue: "app") + } + + public static var automaticPrices: Self { + .init(rawValue: "automaticPrices") + } + + public static var baseTerritory: Self { + .init(rawValue: "baseTerritory") + } + + public static var manualPrices: Self { + .init(rawValue: "manualPrices") } + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "app": self = .app - case "automaticPrices": self = .automaticPrices - case "baseTerritory": self = .baseTerritory - case "manualPrices": self = .manualPrices - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum AppPrices: Hashable, Codable, RawRepresentable { - case appPricePoint - case endDate - case manual - case startDate - case territory - case unknown(String) - - public var rawValue: String { - switch self { - case .appPricePoint: return "appPricePoint" - case .endDate: return "endDate" - case .manual: return "manual" - case .startDate: return "startDate" - case .territory: return "territory" - case .unknown(let rawValue): return rawValue - } + public struct AppPrices: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var appPricePoint: Self { + .init(rawValue: "appPricePoint") + } + + public static var endDate: Self { + .init(rawValue: "endDate") + } + + public static var manual: Self { + .init(rawValue: "manual") + } + + public static var startDate: Self { + .init(rawValue: "startDate") } + public static var territory: Self { + .init(rawValue: "territory") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "appPricePoint": self = .appPricePoint - case "endDate": self = .endDate - case "manual": self = .manual - case "startDate": self = .startDate - case "territory": self = .territory - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum Territories: Hashable, Codable, RawRepresentable { - case currency - case unknown(String) + public struct Territories: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var currency: Self { + .init(rawValue: "currency") + } - public var rawValue: String { - switch self { - case .currency: return "currency" - case .unknown(let rawValue): return rawValue - } + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "currency": self = .currency - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } @@ -199,31 +205,31 @@ extension V1.AppPriceSchedules.ById.GET { } } - public enum Include: Hashable, Codable, RawRepresentable { - case app - case automaticPrices - case baseTerritory - case manualPrices - case unknown(String) - - public var rawValue: String { - switch self { - case .app: return "app" - case .automaticPrices: return "automaticPrices" - case .baseTerritory: return "baseTerritory" - case .manualPrices: return "manualPrices" - case .unknown(let rawValue): return rawValue - } + public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var app: Self { + .init(rawValue: "app") + } + + public static var automaticPrices: Self { + .init(rawValue: "automaticPrices") + } + + public static var baseTerritory: Self { + .init(rawValue: "baseTerritory") + } + + public static var manualPrices: Self { + .init(rawValue: "manualPrices") } + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "app": self = .app - case "automaticPrices": self = .automaticPrices - case "baseTerritory": self = .baseTerritory - case "manualPrices": self = .manualPrices - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppPriceSchedules/ById/AutomaticPrices/AppPriceSchedulesByIdAutomaticPrices.GET.e73fde7.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppPriceSchedules/ById/AutomaticPrices/AppPriceSchedulesByIdAutomaticPrices.GET.e73fde7.generated.swift index 24f82b6f..dac9a509 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppPriceSchedules/ById/AutomaticPrices/AppPriceSchedulesByIdAutomaticPrices.GET.e73fde7.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppPriceSchedules/ById/AutomaticPrices/AppPriceSchedulesByIdAutomaticPrices.GET.e73fde7.generated.swift @@ -56,8 +56,10 @@ extension V1.AppPriceSchedules.ById.AutomaticPrices { /// - Returns: **200**, List of AppPrices as `AppPricesV2Response` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -71,12 +73,18 @@ extension V1.AppPriceSchedules.ById.AutomaticPrices { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 404: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -104,84 +112,83 @@ extension V1.AppPriceSchedules.ById.AutomaticPrices.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum AppPricePoints: Hashable, Codable, RawRepresentable { - case app - case customerPrice - case equalizations - case proceeds - case territory - case unknown(String) - - public var rawValue: String { - switch self { - case .app: return "app" - case .customerPrice: return "customerPrice" - case .equalizations: return "equalizations" - case .proceeds: return "proceeds" - case .territory: return "territory" - case .unknown(let rawValue): return rawValue - } + public struct AppPricePoints: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var app: Self { + .init(rawValue: "app") } + public static var customerPrice: Self { + .init(rawValue: "customerPrice") + } + + public static var equalizations: Self { + .init(rawValue: "equalizations") + } + + public static var proceeds: Self { + .init(rawValue: "proceeds") + } + + public static var territory: Self { + .init(rawValue: "territory") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "app": self = .app - case "customerPrice": self = .customerPrice - case "equalizations": self = .equalizations - case "proceeds": self = .proceeds - case "territory": self = .territory - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum AppPrices: Hashable, Codable, RawRepresentable { - case appPricePoint - case endDate - case manual - case startDate - case territory - case unknown(String) - - public var rawValue: String { - switch self { - case .appPricePoint: return "appPricePoint" - case .endDate: return "endDate" - case .manual: return "manual" - case .startDate: return "startDate" - case .territory: return "territory" - case .unknown(let rawValue): return rawValue - } + public struct AppPrices: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var appPricePoint: Self { + .init(rawValue: "appPricePoint") + } + + public static var endDate: Self { + .init(rawValue: "endDate") } + public static var manual: Self { + .init(rawValue: "manual") + } + + public static var startDate: Self { + .init(rawValue: "startDate") + } + + public static var territory: Self { + .init(rawValue: "territory") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "appPricePoint": self = .appPricePoint - case "endDate": self = .endDate - case "manual": self = .manual - case "startDate": self = .startDate - case "territory": self = .territory - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum Territories: Hashable, Codable, RawRepresentable { - case currency - case unknown(String) + public struct Territories: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var currency: Self { + .init(rawValue: "currency") + } - public var rawValue: String { - switch self { - case .currency: return "currency" - case .unknown(let rawValue): return rawValue - } + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "currency": self = .currency - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } @@ -241,25 +248,23 @@ extension V1.AppPriceSchedules.ById.AutomaticPrices.GET { } } - public enum Include: Hashable, Codable, RawRepresentable { - case appPricePoint - case territory - case unknown(String) + public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var appPricePoint: Self { + .init(rawValue: "appPricePoint") + } - public var rawValue: String { - switch self { - case .appPricePoint: return "appPricePoint" - case .territory: return "territory" - case .unknown(let rawValue): return rawValue - } + public static var territory: Self { + .init(rawValue: "territory") } + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "appPricePoint": self = .appPricePoint - case "territory": self = .territory - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppPriceSchedules/ById/BaseTerritory/AppPriceSchedulesByIdBaseTerritory.GET.fd833f1.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppPriceSchedules/ById/BaseTerritory/AppPriceSchedulesByIdBaseTerritory.GET.fd833f1.generated.swift index 0eb4a8d9..3d4d85e5 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppPriceSchedules/ById/BaseTerritory/AppPriceSchedulesByIdBaseTerritory.GET.fd833f1.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppPriceSchedules/ById/BaseTerritory/AppPriceSchedulesByIdBaseTerritory.GET.fd833f1.generated.swift @@ -42,8 +42,10 @@ extension V1.AppPriceSchedules.ById.BaseTerritory { /// - Returns: **200**, Single Territory as `TerritoryResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -57,12 +59,18 @@ extension V1.AppPriceSchedules.ById.BaseTerritory { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 404: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -82,22 +90,19 @@ extension V1.AppPriceSchedules.ById.BaseTerritory.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum Territories: Hashable, Codable, RawRepresentable { - case currency - case unknown(String) + public struct Territories: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var currency: Self { + .init(rawValue: "currency") + } - public var rawValue: String { - switch self { - case .currency: return "currency" - case .unknown(let rawValue): return rawValue - } + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "currency": self = .currency - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppPriceSchedules/ById/ManualPrices/AppPriceSchedulesByIdManualPrices.GET.ca8c204.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppPriceSchedules/ById/ManualPrices/AppPriceSchedulesByIdManualPrices.GET.ca8c204.generated.swift index 5845b9f0..9ec4d026 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppPriceSchedules/ById/ManualPrices/AppPriceSchedulesByIdManualPrices.GET.ca8c204.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppPriceSchedules/ById/ManualPrices/AppPriceSchedulesByIdManualPrices.GET.ca8c204.generated.swift @@ -56,8 +56,10 @@ extension V1.AppPriceSchedules.ById.ManualPrices { /// - Returns: **200**, List of AppPrices as `AppPricesV2Response` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -71,12 +73,18 @@ extension V1.AppPriceSchedules.ById.ManualPrices { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 404: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -104,84 +112,83 @@ extension V1.AppPriceSchedules.ById.ManualPrices.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum AppPricePoints: Hashable, Codable, RawRepresentable { - case app - case customerPrice - case equalizations - case proceeds - case territory - case unknown(String) - - public var rawValue: String { - switch self { - case .app: return "app" - case .customerPrice: return "customerPrice" - case .equalizations: return "equalizations" - case .proceeds: return "proceeds" - case .territory: return "territory" - case .unknown(let rawValue): return rawValue - } + public struct AppPricePoints: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var app: Self { + .init(rawValue: "app") } + public static var customerPrice: Self { + .init(rawValue: "customerPrice") + } + + public static var equalizations: Self { + .init(rawValue: "equalizations") + } + + public static var proceeds: Self { + .init(rawValue: "proceeds") + } + + public static var territory: Self { + .init(rawValue: "territory") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "app": self = .app - case "customerPrice": self = .customerPrice - case "equalizations": self = .equalizations - case "proceeds": self = .proceeds - case "territory": self = .territory - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum AppPrices: Hashable, Codable, RawRepresentable { - case appPricePoint - case endDate - case manual - case startDate - case territory - case unknown(String) - - public var rawValue: String { - switch self { - case .appPricePoint: return "appPricePoint" - case .endDate: return "endDate" - case .manual: return "manual" - case .startDate: return "startDate" - case .territory: return "territory" - case .unknown(let rawValue): return rawValue - } + public struct AppPrices: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var appPricePoint: Self { + .init(rawValue: "appPricePoint") + } + + public static var endDate: Self { + .init(rawValue: "endDate") } + public static var manual: Self { + .init(rawValue: "manual") + } + + public static var startDate: Self { + .init(rawValue: "startDate") + } + + public static var territory: Self { + .init(rawValue: "territory") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "appPricePoint": self = .appPricePoint - case "endDate": self = .endDate - case "manual": self = .manual - case "startDate": self = .startDate - case "territory": self = .territory - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum Territories: Hashable, Codable, RawRepresentable { - case currency - case unknown(String) + public struct Territories: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var currency: Self { + .init(rawValue: "currency") + } - public var rawValue: String { - switch self { - case .currency: return "currency" - case .unknown(let rawValue): return rawValue - } + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "currency": self = .currency - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } @@ -241,25 +248,23 @@ extension V1.AppPriceSchedules.ById.ManualPrices.GET { } } - public enum Include: Hashable, Codable, RawRepresentable { - case appPricePoint - case territory - case unknown(String) + public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var appPricePoint: Self { + .init(rawValue: "appPricePoint") + } - public var rawValue: String { - switch self { - case .appPricePoint: return "appPricePoint" - case .territory: return "territory" - case .unknown(let rawValue): return rawValue - } + public static var territory: Self { + .init(rawValue: "territory") } + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "appPricePoint": self = .appPricePoint - case "territory": self = .territory - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppPriceSchedules/ById/Relationships/AutomaticPrices/AppPriceSchedulesByIdRelationshipsAutomaticPrices.GET.5bfe9c0.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppPriceSchedules/ById/Relationships/AutomaticPrices/AppPriceSchedulesByIdRelationshipsAutomaticPrices.GET.5bfe9c0.generated.swift new file mode 100644 index 00000000..3c4492f7 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppPriceSchedules/ById/Relationships/AutomaticPrices/AppPriceSchedulesByIdRelationshipsAutomaticPrices.GET.5bfe9c0.generated.swift @@ -0,0 +1,88 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.AppPriceSchedules.ById.Relationships.AutomaticPrices { + public struct GET: Endpoint { + public typealias Response = AppPriceScheduleAutomaticPricesLinkagesResponse + + public var path: String { + "/v1/appPriceSchedules/\(id)/relationships/automaticPrices" + } + + /// the id of the requested resource + public var id: String + + public var parameters: Parameters = Parameters() + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + components?.queryItems = [ + URLQueryItem(name: "limit", + value: parameters.limit.map { "\($0)" }) + ].filter { $0.value != nil } + if components?.queryItems?.isEmpty ?? false { + components?.queryItems = nil + } + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "GET" + return urlRequest + } + + /// - Returns: **200**, List of related linkages as `AppPriceScheduleAutomaticPricesLinkagesResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(AppPriceScheduleAutomaticPricesLinkagesResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +extension V1.AppPriceSchedules.ById.Relationships.AutomaticPrices.GET { + public struct Parameters: Hashable { + /// maximum resources per page + public var limit: Int? + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppPriceSchedules/ById/Relationships/BaseTerritory/AppPriceSchedulesByIdRelationshipsBaseTerritory.GET.4c6bf42.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppPriceSchedules/ById/Relationships/BaseTerritory/AppPriceSchedulesByIdRelationshipsBaseTerritory.GET.4c6bf42.generated.swift new file mode 100644 index 00000000..ee4aa8da --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppPriceSchedules/ById/Relationships/BaseTerritory/AppPriceSchedulesByIdRelationshipsBaseTerritory.GET.4c6bf42.generated.swift @@ -0,0 +1,86 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.AppPriceSchedules.ById.Relationships.BaseTerritory { + public struct GET: Endpoint { + public typealias Response = AppPriceScheduleBaseTerritoryLinkageResponse + + public var path: String { + "/v1/appPriceSchedules/\(id)/relationships/baseTerritory" + } + + /// the id of the requested resource + public var id: String + + public var parameters: Parameters = Parameters() + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + components?.queryItems = [ + + ].filter { $0.value != nil } + if components?.queryItems?.isEmpty ?? false { + components?.queryItems = nil + } + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "GET" + return urlRequest + } + + /// - Returns: **200**, Related linkage as `AppPriceScheduleBaseTerritoryLinkageResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(AppPriceScheduleBaseTerritoryLinkageResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +extension V1.AppPriceSchedules.ById.Relationships.BaseTerritory.GET { + public struct Parameters: Hashable { + + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppPriceSchedules/ById/Relationships/ManualPrices/AppPriceSchedulesByIdRelationshipsManualPrices.GET.0d2a1d6.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppPriceSchedules/ById/Relationships/ManualPrices/AppPriceSchedulesByIdRelationshipsManualPrices.GET.0d2a1d6.generated.swift new file mode 100644 index 00000000..b2f12140 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppPriceSchedules/ById/Relationships/ManualPrices/AppPriceSchedulesByIdRelationshipsManualPrices.GET.0d2a1d6.generated.swift @@ -0,0 +1,88 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.AppPriceSchedules.ById.Relationships.ManualPrices { + public struct GET: Endpoint { + public typealias Response = AppPriceScheduleManualPricesLinkagesResponse + + public var path: String { + "/v1/appPriceSchedules/\(id)/relationships/manualPrices" + } + + /// the id of the requested resource + public var id: String + + public var parameters: Parameters = Parameters() + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + components?.queryItems = [ + URLQueryItem(name: "limit", + value: parameters.limit.map { "\($0)" }) + ].filter { $0.value != nil } + if components?.queryItems?.isEmpty ?? false { + components?.queryItems = nil + } + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "GET" + return urlRequest + } + + /// - Returns: **200**, List of related linkages as `AppPriceScheduleManualPricesLinkagesResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(AppPriceScheduleManualPricesLinkagesResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +extension V1.AppPriceSchedules.ById.Relationships.ManualPrices.GET { + public struct Parameters: Hashable { + /// maximum resources per page + public var limit: Int? + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppPriceTiers/AppPriceTiers.GET.73f69af.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppPriceTiers/AppPriceTiers.GET.73f69af.generated.swift deleted file mode 100644 index cc5ab17b..00000000 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppPriceTiers/AppPriceTiers.GET.73f69af.generated.swift +++ /dev/null @@ -1,233 +0,0 @@ -// autogenerated - -// swiftlint:disable all -import Foundation -#if canImport(FoundationNetworking) -import FoundationNetworking -#endif - -extension V1.AppPriceTiers { - @available(*, deprecated) - public struct GET: Endpoint { - public typealias Response = AppPriceTiersResponse - - public var path: String { - "/v1/appPriceTiers" - } - - public var parameters: Parameters = Parameters() - - public init() { - - } - - public func request(with baseURL: URL) throws -> URLRequest? { - var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) - components?.path = path - - components?.queryItems = [ - URLQueryItem(name: "fields[appPricePoints]", - value: parameters.fields[.appPricePoints]?.map { "\($0)" }.joined(separator: ",")), - URLQueryItem(name: "fields[appPriceTiers]", - value: parameters.fields[.appPriceTiers]?.map { "\($0)" }.joined(separator: ",")), - URLQueryItem(name: "filter[id]", - value: parameters.filter[.id]?.map { "\($0)" }.joined(separator: ",")), - URLQueryItem(name: "include", - value: parameters.include?.map { "\($0)" }.joined(separator: ",")), - URLQueryItem(name: "limit[pricePoints]", - value: parameters.limit[.pricePoints].map { "\($0)" }), - URLQueryItem(name: "limit", - value: parameters.limit[].map { "\($0)" }) - ].filter { $0.value != nil } - if components?.queryItems?.isEmpty ?? false { - components?.queryItems = nil - } - - var urlRequest = components?.url.map { URLRequest(url: $0) } - urlRequest?.httpMethod = "GET" - return urlRequest - } - - /// - Returns: **200**, List of AppPriceTiers as `AppPriceTiersResponse` - /// - Throws: **400**, Parameter error(s) as `ErrorResponse` - /// - Throws: **403**, Forbidden error as `ErrorResponse` - public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { - var jsonDecoder: JSONDecoder { - let decoder = JSONDecoder() - return decoder - } - - switch urlResponse.statusCode { - case 200: - return try jsonDecoder.decode(AppPriceTiersResponse.self, from: data) - - case 400: - throw try jsonDecoder.decode(ErrorResponse.self, from: data) - - case 403: - throw try jsonDecoder.decode(ErrorResponse.self, from: data) - - default: - throw try jsonDecoder.decode(ErrorResponse.self, from: data) - } - } - } -} - -extension V1.AppPriceTiers.GET { - public struct Parameters: Hashable { - public var fields: Fields = Fields() - - public var filter: Filter = Filter() - - /// comma-separated list of relationships to include - public var include: [Include]? - - /// maximum resources per page - public var limit: Limit = Limit() - - public struct Fields: Hashable { - public subscript (_ relation: Relation) -> T { - get { values[relation]?.base as! T } - set { values[relation] = AnyHashable(newValue) } - } - - private var values: [AnyHashable: AnyHashable] = [:] - - public enum AppPricePoints: Hashable, Codable, RawRepresentable { - case customerPrice - case priceTier - case proceeds - case territory - case unknown(String) - - public var rawValue: String { - switch self { - case .customerPrice: return "customerPrice" - case .priceTier: return "priceTier" - case .proceeds: return "proceeds" - case .territory: return "territory" - case .unknown(let rawValue): return rawValue - } - } - - public init(rawValue: String) { - switch rawValue { - case "customerPrice": self = .customerPrice - case "priceTier": self = .priceTier - case "proceeds": self = .proceeds - case "territory": self = .territory - default: self = .unknown(rawValue) - } - } - } - - public enum AppPriceTiers: Hashable, Codable, RawRepresentable { - case pricePoints - case unknown(String) - - public var rawValue: String { - switch self { - case .pricePoints: return "pricePoints" - case .unknown(let rawValue): return rawValue - } - } - - public init(rawValue: String) { - switch rawValue { - case "pricePoints": self = .pricePoints - default: self = .unknown(rawValue) - } - } - } - - public struct Relation: Hashable { - /// the fields to include for returned resources of type appPricePoints - public static var appPricePoints: Relation<[AppPricePoints]?> { - .init(key: "fields[appPricePoints]") - } - - /// the fields to include for returned resources of type appPriceTiers - public static var appPriceTiers: Relation<[AppPriceTiers]?> { - .init(key: "fields[appPriceTiers]") - } - - internal let key: String - - public func hash(into hasher: inout Hasher) { - hasher.combine(key) - } - } - } - - public struct Filter: Hashable { - public subscript (_ relation: Relation) -> T { - get { values[relation]?.base as! T } - set { values[relation] = AnyHashable(newValue) } - } - - private var values: [AnyHashable: AnyHashable] = [:] - - public struct Relation: Hashable { - /// filter by id(s) - public static var id: Relation<[String]?> { - .init(key: "filter[id]") - } - - internal let key: String - - public func hash(into hasher: inout Hasher) { - hasher.combine(key) - } - } - } - - public enum Include: Hashable, Codable, RawRepresentable { - case pricePoints - case unknown(String) - - public var rawValue: String { - switch self { - case .pricePoints: return "pricePoints" - case .unknown(let rawValue): return rawValue - } - } - - public init(rawValue: String) { - switch rawValue { - case "pricePoints": self = .pricePoints - default: self = .unknown(rawValue) - } - } - } - - public struct Limit: Hashable { - public subscript () -> Int? { - get { self[Relation(key: "limit")] } - set { self[Relation(key: "limit")] = newValue } - } - - public subscript (_ relation: Relation) -> T { - get { values[relation]?.base as! T } - set { values[relation] = AnyHashable(newValue) } - } - - private var values: [AnyHashable: AnyHashable] = [:] - - public struct Relation: Hashable { - /// maximum number of related pricePoints returned (when they are included) - public static var pricePoints: Relation { - .init(key: "limit[pricePoints]") - } - - internal let key: String - - public func hash(into hasher: inout Hasher) { - hasher.combine(key) - } - } - } - } -} - -// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppScreenshotSets/AppScreenshotSets.POST.31b308a.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppScreenshotSets/AppScreenshotSets.POST.31b308a.generated.swift index 52dff0bb..14c6a80e 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppScreenshotSets/AppScreenshotSets.POST.31b308a.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppScreenshotSets/AppScreenshotSets.POST.31b308a.generated.swift @@ -41,8 +41,11 @@ extension V1.AppScreenshotSets { /// - Returns: **201**, Single AppScreenshotSet as `AppScreenshotSetResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **422**, Unprocessable request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -56,12 +59,21 @@ extension V1.AppScreenshotSets { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 409: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 422: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppScreenshotSets/ById/AppScreenshotSetsById.DELETE.0b8968b.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppScreenshotSets/ById/AppScreenshotSetsById.DELETE.0b8968b.generated.swift index 4f4cc7c2..c06e2d81 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppScreenshotSets/ById/AppScreenshotSetsById.DELETE.0b8968b.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppScreenshotSets/ById/AppScreenshotSetsById.DELETE.0b8968b.generated.swift @@ -31,11 +31,12 @@ extension V1.AppScreenshotSets.ById { return urlRequest } - /// - Returns: **204**, Success (no content) /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -43,12 +44,12 @@ extension V1.AppScreenshotSets.ById { } switch urlResponse.statusCode { - case 204: - return - case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) @@ -58,6 +59,9 @@ extension V1.AppScreenshotSets.ById { case 409: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppScreenshotSets/ById/AppScreenshotSetsById.GET.0b8968b.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppScreenshotSets/ById/AppScreenshotSetsById.GET.0b8968b.generated.swift index 47e5f00c..99135c8d 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppScreenshotSets/ById/AppScreenshotSetsById.GET.0b8968b.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppScreenshotSets/ById/AppScreenshotSetsById.GET.0b8968b.generated.swift @@ -48,8 +48,10 @@ extension V1.AppScreenshotSets.ById { /// - Returns: **200**, Single AppScreenshotSet as `AppScreenshotSetResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -63,12 +65,18 @@ extension V1.AppScreenshotSets.ById { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 404: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -93,80 +101,83 @@ extension V1.AppScreenshotSets.ById.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum AppScreenshotSets: Hashable, Codable, RawRepresentable { - case appCustomProductPageLocalization - case appScreenshots - case appStoreVersionExperimentTreatmentLocalization - case appStoreVersionLocalization - case screenshotDisplayType - case unknown(String) - - public var rawValue: String { - switch self { - case .appCustomProductPageLocalization: return "appCustomProductPageLocalization" - case .appScreenshots: return "appScreenshots" - case .appStoreVersionExperimentTreatmentLocalization: return "appStoreVersionExperimentTreatmentLocalization" - case .appStoreVersionLocalization: return "appStoreVersionLocalization" - case .screenshotDisplayType: return "screenshotDisplayType" - case .unknown(let rawValue): return rawValue - } + public struct AppScreenshotSets: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var appCustomProductPageLocalization: Self { + .init(rawValue: "appCustomProductPageLocalization") + } + + public static var appScreenshots: Self { + .init(rawValue: "appScreenshots") + } + + public static var appStoreVersionExperimentTreatmentLocalization: Self { + .init(rawValue: "appStoreVersionExperimentTreatmentLocalization") + } + + public static var appStoreVersionLocalization: Self { + .init(rawValue: "appStoreVersionLocalization") + } + + public static var screenshotDisplayType: Self { + .init(rawValue: "screenshotDisplayType") } + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "appCustomProductPageLocalization": self = .appCustomProductPageLocalization - case "appScreenshots": self = .appScreenshots - case "appStoreVersionExperimentTreatmentLocalization": self = .appStoreVersionExperimentTreatmentLocalization - case "appStoreVersionLocalization": self = .appStoreVersionLocalization - case "screenshotDisplayType": self = .screenshotDisplayType - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum AppScreenshots: Hashable, Codable, RawRepresentable { - case appScreenshotSet - case assetDeliveryState - case assetToken - case assetType - case fileName - case fileSize - case imageAsset - case sourceFileChecksum - case uploadOperations - case uploaded - case unknown(String) - - public var rawValue: String { - switch self { - case .appScreenshotSet: return "appScreenshotSet" - case .assetDeliveryState: return "assetDeliveryState" - case .assetToken: return "assetToken" - case .assetType: return "assetType" - case .fileName: return "fileName" - case .fileSize: return "fileSize" - case .imageAsset: return "imageAsset" - case .sourceFileChecksum: return "sourceFileChecksum" - case .uploadOperations: return "uploadOperations" - case .uploaded: return "uploaded" - case .unknown(let rawValue): return rawValue - } + public struct AppScreenshots: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var appScreenshotSet: Self { + .init(rawValue: "appScreenshotSet") + } + + public static var assetDeliveryState: Self { + .init(rawValue: "assetDeliveryState") + } + + public static var assetToken: Self { + .init(rawValue: "assetToken") + } + + public static var assetType: Self { + .init(rawValue: "assetType") + } + + public static var fileName: Self { + .init(rawValue: "fileName") } + public static var fileSize: Self { + .init(rawValue: "fileSize") + } + + public static var imageAsset: Self { + .init(rawValue: "imageAsset") + } + + public static var sourceFileChecksum: Self { + .init(rawValue: "sourceFileChecksum") + } + + public static var uploadOperations: Self { + .init(rawValue: "uploadOperations") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "appScreenshotSet": self = .appScreenshotSet - case "assetDeliveryState": self = .assetDeliveryState - case "assetToken": self = .assetToken - case "assetType": self = .assetType - case "fileName": self = .fileName - case "fileSize": self = .fileSize - case "imageAsset": self = .imageAsset - case "sourceFileChecksum": self = .sourceFileChecksum - case "uploadOperations": self = .uploadOperations - case "uploaded": self = .uploaded - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } @@ -189,31 +200,31 @@ extension V1.AppScreenshotSets.ById.GET { } } - public enum Include: Hashable, Codable, RawRepresentable { - case appCustomProductPageLocalization - case appScreenshots - case appStoreVersionExperimentTreatmentLocalization - case appStoreVersionLocalization - case unknown(String) - - public var rawValue: String { - switch self { - case .appCustomProductPageLocalization: return "appCustomProductPageLocalization" - case .appScreenshots: return "appScreenshots" - case .appStoreVersionExperimentTreatmentLocalization: return "appStoreVersionExperimentTreatmentLocalization" - case .appStoreVersionLocalization: return "appStoreVersionLocalization" - case .unknown(let rawValue): return rawValue - } + public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var appCustomProductPageLocalization: Self { + .init(rawValue: "appCustomProductPageLocalization") + } + + public static var appScreenshots: Self { + .init(rawValue: "appScreenshots") } + public static var appStoreVersionExperimentTreatmentLocalization: Self { + .init(rawValue: "appStoreVersionExperimentTreatmentLocalization") + } + + public static var appStoreVersionLocalization: Self { + .init(rawValue: "appStoreVersionLocalization") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "appCustomProductPageLocalization": self = .appCustomProductPageLocalization - case "appScreenshots": self = .appScreenshots - case "appStoreVersionExperimentTreatmentLocalization": self = .appStoreVersionExperimentTreatmentLocalization - case "appStoreVersionLocalization": self = .appStoreVersionLocalization - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppScreenshotSets/ById/AppScreenshots/AppScreenshotSetsByIdAppScreenshots.GET.e7ccee6.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppScreenshotSets/ById/AppScreenshots/AppScreenshotSetsByIdAppScreenshots.GET.e7ccee6.generated.swift index 873fffde..5d5bc40d 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppScreenshotSets/ById/AppScreenshots/AppScreenshotSetsByIdAppScreenshots.GET.e7ccee6.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppScreenshotSets/ById/AppScreenshots/AppScreenshotSetsByIdAppScreenshots.GET.e7ccee6.generated.swift @@ -48,8 +48,10 @@ extension V1.AppScreenshotSets.ById.AppScreenshots { /// - Returns: **200**, List of AppScreenshots as `AppScreenshotsResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -63,12 +65,18 @@ extension V1.AppScreenshotSets.ById.AppScreenshots { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 404: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -94,80 +102,83 @@ extension V1.AppScreenshotSets.ById.AppScreenshots.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum AppScreenshotSets: Hashable, Codable, RawRepresentable { - case appCustomProductPageLocalization - case appScreenshots - case appStoreVersionExperimentTreatmentLocalization - case appStoreVersionLocalization - case screenshotDisplayType - case unknown(String) - - public var rawValue: String { - switch self { - case .appCustomProductPageLocalization: return "appCustomProductPageLocalization" - case .appScreenshots: return "appScreenshots" - case .appStoreVersionExperimentTreatmentLocalization: return "appStoreVersionExperimentTreatmentLocalization" - case .appStoreVersionLocalization: return "appStoreVersionLocalization" - case .screenshotDisplayType: return "screenshotDisplayType" - case .unknown(let rawValue): return rawValue - } + public struct AppScreenshotSets: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var appCustomProductPageLocalization: Self { + .init(rawValue: "appCustomProductPageLocalization") + } + + public static var appScreenshots: Self { + .init(rawValue: "appScreenshots") + } + + public static var appStoreVersionExperimentTreatmentLocalization: Self { + .init(rawValue: "appStoreVersionExperimentTreatmentLocalization") + } + + public static var appStoreVersionLocalization: Self { + .init(rawValue: "appStoreVersionLocalization") } + public static var screenshotDisplayType: Self { + .init(rawValue: "screenshotDisplayType") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "appCustomProductPageLocalization": self = .appCustomProductPageLocalization - case "appScreenshots": self = .appScreenshots - case "appStoreVersionExperimentTreatmentLocalization": self = .appStoreVersionExperimentTreatmentLocalization - case "appStoreVersionLocalization": self = .appStoreVersionLocalization - case "screenshotDisplayType": self = .screenshotDisplayType - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum AppScreenshots: Hashable, Codable, RawRepresentable { - case appScreenshotSet - case assetDeliveryState - case assetToken - case assetType - case fileName - case fileSize - case imageAsset - case sourceFileChecksum - case uploadOperations - case uploaded - case unknown(String) - - public var rawValue: String { - switch self { - case .appScreenshotSet: return "appScreenshotSet" - case .assetDeliveryState: return "assetDeliveryState" - case .assetToken: return "assetToken" - case .assetType: return "assetType" - case .fileName: return "fileName" - case .fileSize: return "fileSize" - case .imageAsset: return "imageAsset" - case .sourceFileChecksum: return "sourceFileChecksum" - case .uploadOperations: return "uploadOperations" - case .uploaded: return "uploaded" - case .unknown(let rawValue): return rawValue - } + public struct AppScreenshots: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var appScreenshotSet: Self { + .init(rawValue: "appScreenshotSet") + } + + public static var assetDeliveryState: Self { + .init(rawValue: "assetDeliveryState") + } + + public static var assetToken: Self { + .init(rawValue: "assetToken") } + public static var assetType: Self { + .init(rawValue: "assetType") + } + + public static var fileName: Self { + .init(rawValue: "fileName") + } + + public static var fileSize: Self { + .init(rawValue: "fileSize") + } + + public static var imageAsset: Self { + .init(rawValue: "imageAsset") + } + + public static var sourceFileChecksum: Self { + .init(rawValue: "sourceFileChecksum") + } + + public static var uploadOperations: Self { + .init(rawValue: "uploadOperations") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "appScreenshotSet": self = .appScreenshotSet - case "assetDeliveryState": self = .assetDeliveryState - case "assetToken": self = .assetToken - case "assetType": self = .assetType - case "fileName": self = .fileName - case "fileSize": self = .fileSize - case "imageAsset": self = .imageAsset - case "sourceFileChecksum": self = .sourceFileChecksum - case "uploadOperations": self = .uploadOperations - case "uploaded": self = .uploaded - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } @@ -190,22 +201,19 @@ extension V1.AppScreenshotSets.ById.AppScreenshots.GET { } } - public enum Include: Hashable, Codable, RawRepresentable { - case appScreenshotSet - case unknown(String) + public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var appScreenshotSet: Self { + .init(rawValue: "appScreenshotSet") + } - public var rawValue: String { - switch self { - case .appScreenshotSet: return "appScreenshotSet" - case .unknown(let rawValue): return rawValue - } + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "appScreenshotSet": self = .appScreenshotSet - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppScreenshotSets/ById/Relationships/AppScreenshots/AppScreenshotSetsByIdRelationshipsAppScreenshots.GET.a264720.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppScreenshotSets/ById/Relationships/AppScreenshots/AppScreenshotSetsByIdRelationshipsAppScreenshots.GET.a264720.generated.swift index 3584782c..8db919e7 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppScreenshotSets/ById/Relationships/AppScreenshots/AppScreenshotSetsByIdRelationshipsAppScreenshots.GET.a264720.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppScreenshotSets/ById/Relationships/AppScreenshots/AppScreenshotSetsByIdRelationshipsAppScreenshots.GET.a264720.generated.swift @@ -42,8 +42,10 @@ extension V1.AppScreenshotSets.ById.Relationships.AppScreenshots { /// - Returns: **200**, List of related linkages as `AppScreenshotSetAppScreenshotsLinkagesResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -57,12 +59,18 @@ extension V1.AppScreenshotSets.ById.Relationships.AppScreenshots { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 404: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppScreenshotSets/ById/Relationships/AppScreenshots/AppScreenshotSetsByIdRelationshipsAppScreenshots.PATCH.a264720.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppScreenshotSets/ById/Relationships/AppScreenshots/AppScreenshotSetsByIdRelationshipsAppScreenshots.PATCH.a264720.generated.swift index c3ab5e72..aa9527d8 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppScreenshotSets/ById/Relationships/AppScreenshots/AppScreenshotSetsByIdRelationshipsAppScreenshots.PATCH.a264720.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppScreenshotSets/ById/Relationships/AppScreenshots/AppScreenshotSetsByIdRelationshipsAppScreenshots.PATCH.a264720.generated.swift @@ -46,10 +46,12 @@ extension V1.AppScreenshotSets.ById.Relationships.AppScreenshots { return urlRequest } - /// - Returns: **204**, Success (no content) + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **422**, Unprocessable request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -57,8 +59,8 @@ extension V1.AppScreenshotSets.ById.Relationships.AppScreenshots { } switch urlResponse.statusCode { - case 204: - return + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) @@ -69,6 +71,12 @@ extension V1.AppScreenshotSets.ById.Relationships.AppScreenshots { case 409: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 422: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppScreenshots/AppScreenshots.POST.2f0287f.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppScreenshots/AppScreenshots.POST.2f0287f.generated.swift index 123c264e..d3644e68 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppScreenshots/AppScreenshots.POST.2f0287f.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppScreenshots/AppScreenshots.POST.2f0287f.generated.swift @@ -41,8 +41,11 @@ extension V1.AppScreenshots { /// - Returns: **201**, Single AppScreenshot as `AppScreenshotResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **422**, Unprocessable request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -56,12 +59,21 @@ extension V1.AppScreenshots { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 409: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 422: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppScreenshots/ById/AppScreenshotsById.DELETE.1a453d6.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppScreenshots/ById/AppScreenshotsById.DELETE.1a453d6.generated.swift index d8cbcf6d..654b4e90 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppScreenshots/ById/AppScreenshotsById.DELETE.1a453d6.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppScreenshots/ById/AppScreenshotsById.DELETE.1a453d6.generated.swift @@ -31,11 +31,12 @@ extension V1.AppScreenshots.ById { return urlRequest } - /// - Returns: **204**, Success (no content) /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -43,12 +44,12 @@ extension V1.AppScreenshots.ById { } switch urlResponse.statusCode { - case 204: - return - case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) @@ -58,6 +59,9 @@ extension V1.AppScreenshots.ById { case 409: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppScreenshots/ById/AppScreenshotsById.GET.1a453d6.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppScreenshots/ById/AppScreenshotsById.GET.1a453d6.generated.swift index 425252c3..b22f355e 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppScreenshots/ById/AppScreenshotsById.GET.1a453d6.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppScreenshots/ById/AppScreenshotsById.GET.1a453d6.generated.swift @@ -44,8 +44,10 @@ extension V1.AppScreenshots.ById { /// - Returns: **200**, Single AppScreenshot as `AppScreenshotResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -59,12 +61,18 @@ extension V1.AppScreenshots.ById { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 404: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -87,49 +95,51 @@ extension V1.AppScreenshots.ById.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum AppScreenshots: Hashable, Codable, RawRepresentable { - case appScreenshotSet - case assetDeliveryState - case assetToken - case assetType - case fileName - case fileSize - case imageAsset - case sourceFileChecksum - case uploadOperations - case uploaded - case unknown(String) - - public var rawValue: String { - switch self { - case .appScreenshotSet: return "appScreenshotSet" - case .assetDeliveryState: return "assetDeliveryState" - case .assetToken: return "assetToken" - case .assetType: return "assetType" - case .fileName: return "fileName" - case .fileSize: return "fileSize" - case .imageAsset: return "imageAsset" - case .sourceFileChecksum: return "sourceFileChecksum" - case .uploadOperations: return "uploadOperations" - case .uploaded: return "uploaded" - case .unknown(let rawValue): return rawValue - } + public struct AppScreenshots: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var appScreenshotSet: Self { + .init(rawValue: "appScreenshotSet") + } + + public static var assetDeliveryState: Self { + .init(rawValue: "assetDeliveryState") + } + + public static var assetToken: Self { + .init(rawValue: "assetToken") + } + + public static var assetType: Self { + .init(rawValue: "assetType") + } + + public static var fileName: Self { + .init(rawValue: "fileName") + } + + public static var fileSize: Self { + .init(rawValue: "fileSize") } + public static var imageAsset: Self { + .init(rawValue: "imageAsset") + } + + public static var sourceFileChecksum: Self { + .init(rawValue: "sourceFileChecksum") + } + + public static var uploadOperations: Self { + .init(rawValue: "uploadOperations") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "appScreenshotSet": self = .appScreenshotSet - case "assetDeliveryState": self = .assetDeliveryState - case "assetToken": self = .assetToken - case "assetType": self = .assetType - case "fileName": self = .fileName - case "fileSize": self = .fileSize - case "imageAsset": self = .imageAsset - case "sourceFileChecksum": self = .sourceFileChecksum - case "uploadOperations": self = .uploadOperations - case "uploaded": self = .uploaded - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } @@ -147,22 +157,19 @@ extension V1.AppScreenshots.ById.GET { } } - public enum Include: Hashable, Codable, RawRepresentable { - case appScreenshotSet - case unknown(String) + public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var appScreenshotSet: Self { + .init(rawValue: "appScreenshotSet") + } - public var rawValue: String { - switch self { - case .appScreenshotSet: return "appScreenshotSet" - case .unknown(let rawValue): return rawValue - } + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "appScreenshotSet": self = .appScreenshotSet - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppScreenshots/ById/AppScreenshotsById.PATCH.1a453d6.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppScreenshots/ById/AppScreenshotsById.PATCH.1a453d6.generated.swift index f81afe31..965ba412 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppScreenshots/ById/AppScreenshotsById.PATCH.1a453d6.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppScreenshots/ById/AppScreenshotsById.PATCH.1a453d6.generated.swift @@ -48,9 +48,12 @@ extension V1.AppScreenshots.ById { /// - Returns: **200**, Single AppScreenshot as `AppScreenshotResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **422**, Unprocessable request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -64,6 +67,9 @@ extension V1.AppScreenshots.ById { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) @@ -73,6 +79,12 @@ extension V1.AppScreenshots.ById { case 409: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 422: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppStoreReviewAttachments/AppStoreReviewAttachments.POST.c08e869.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppStoreReviewAttachments/AppStoreReviewAttachments.POST.c08e869.generated.swift index 48aa00ad..b3bf263e 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppStoreReviewAttachments/AppStoreReviewAttachments.POST.c08e869.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppStoreReviewAttachments/AppStoreReviewAttachments.POST.c08e869.generated.swift @@ -41,8 +41,11 @@ extension V1.AppStoreReviewAttachments { /// - Returns: **201**, Single AppStoreReviewAttachment as `AppStoreReviewAttachmentResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **422**, Unprocessable request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -56,12 +59,21 @@ extension V1.AppStoreReviewAttachments { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 409: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 422: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppStoreReviewAttachments/ById/AppStoreReviewAttachmentsById.DELETE.f1889f3.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppStoreReviewAttachments/ById/AppStoreReviewAttachmentsById.DELETE.f1889f3.generated.swift index bce078cb..d3ebb5a1 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppStoreReviewAttachments/ById/AppStoreReviewAttachmentsById.DELETE.f1889f3.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppStoreReviewAttachments/ById/AppStoreReviewAttachmentsById.DELETE.f1889f3.generated.swift @@ -31,11 +31,12 @@ extension V1.AppStoreReviewAttachments.ById { return urlRequest } - /// - Returns: **204**, Success (no content) /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -43,12 +44,12 @@ extension V1.AppStoreReviewAttachments.ById { } switch urlResponse.statusCode { - case 204: - return - case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) @@ -58,6 +59,9 @@ extension V1.AppStoreReviewAttachments.ById { case 409: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppStoreReviewAttachments/ById/AppStoreReviewAttachmentsById.GET.f1889f3.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppStoreReviewAttachments/ById/AppStoreReviewAttachmentsById.GET.f1889f3.generated.swift index c611ff46..789f63b6 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppStoreReviewAttachments/ById/AppStoreReviewAttachmentsById.GET.f1889f3.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppStoreReviewAttachments/ById/AppStoreReviewAttachmentsById.GET.f1889f3.generated.swift @@ -44,8 +44,10 @@ extension V1.AppStoreReviewAttachments.ById { /// - Returns: **200**, Single AppStoreReviewAttachment as `AppStoreReviewAttachmentResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -59,12 +61,18 @@ extension V1.AppStoreReviewAttachments.ById { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 404: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -87,40 +95,39 @@ extension V1.AppStoreReviewAttachments.ById.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum AppStoreReviewAttachments: Hashable, Codable, RawRepresentable { - case appStoreReviewDetail - case assetDeliveryState - case fileName - case fileSize - case sourceFileChecksum - case uploadOperations - case uploaded - case unknown(String) - - public var rawValue: String { - switch self { - case .appStoreReviewDetail: return "appStoreReviewDetail" - case .assetDeliveryState: return "assetDeliveryState" - case .fileName: return "fileName" - case .fileSize: return "fileSize" - case .sourceFileChecksum: return "sourceFileChecksum" - case .uploadOperations: return "uploadOperations" - case .uploaded: return "uploaded" - case .unknown(let rawValue): return rawValue - } + public struct AppStoreReviewAttachments: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var appStoreReviewDetail: Self { + .init(rawValue: "appStoreReviewDetail") + } + + public static var assetDeliveryState: Self { + .init(rawValue: "assetDeliveryState") } + public static var fileName: Self { + .init(rawValue: "fileName") + } + + public static var fileSize: Self { + .init(rawValue: "fileSize") + } + + public static var sourceFileChecksum: Self { + .init(rawValue: "sourceFileChecksum") + } + + public static var uploadOperations: Self { + .init(rawValue: "uploadOperations") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "appStoreReviewDetail": self = .appStoreReviewDetail - case "assetDeliveryState": self = .assetDeliveryState - case "fileName": self = .fileName - case "fileSize": self = .fileSize - case "sourceFileChecksum": self = .sourceFileChecksum - case "uploadOperations": self = .uploadOperations - case "uploaded": self = .uploaded - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } @@ -138,22 +145,19 @@ extension V1.AppStoreReviewAttachments.ById.GET { } } - public enum Include: Hashable, Codable, RawRepresentable { - case appStoreReviewDetail - case unknown(String) + public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var appStoreReviewDetail: Self { + .init(rawValue: "appStoreReviewDetail") + } - public var rawValue: String { - switch self { - case .appStoreReviewDetail: return "appStoreReviewDetail" - case .unknown(let rawValue): return rawValue - } + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "appStoreReviewDetail": self = .appStoreReviewDetail - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppStoreReviewAttachments/ById/AppStoreReviewAttachmentsById.PATCH.f1889f3.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppStoreReviewAttachments/ById/AppStoreReviewAttachmentsById.PATCH.f1889f3.generated.swift index de6da3d0..48b52958 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppStoreReviewAttachments/ById/AppStoreReviewAttachmentsById.PATCH.f1889f3.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppStoreReviewAttachments/ById/AppStoreReviewAttachmentsById.PATCH.f1889f3.generated.swift @@ -48,9 +48,12 @@ extension V1.AppStoreReviewAttachments.ById { /// - Returns: **200**, Single AppStoreReviewAttachment as `AppStoreReviewAttachmentResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **422**, Unprocessable request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -64,6 +67,9 @@ extension V1.AppStoreReviewAttachments.ById { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) @@ -73,6 +79,12 @@ extension V1.AppStoreReviewAttachments.ById { case 409: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 422: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppStoreReviewDetails/AppStoreReviewDetails.POST.e9d2b0b.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppStoreReviewDetails/AppStoreReviewDetails.POST.e9d2b0b.generated.swift index c5b36a5d..0546802c 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppStoreReviewDetails/AppStoreReviewDetails.POST.e9d2b0b.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppStoreReviewDetails/AppStoreReviewDetails.POST.e9d2b0b.generated.swift @@ -41,8 +41,11 @@ extension V1.AppStoreReviewDetails { /// - Returns: **201**, Single AppStoreReviewDetail as `AppStoreReviewDetailResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **422**, Unprocessable request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -56,12 +59,21 @@ extension V1.AppStoreReviewDetails { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 409: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 422: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppStoreReviewDetails/ById/AppStoreReviewAttachments/AppStoreReviewDetailsByIdAppStoreReviewAttachments.GET.5161e3c.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppStoreReviewDetails/ById/AppStoreReviewAttachments/AppStoreReviewDetailsByIdAppStoreReviewAttachments.GET.5161e3c.generated.swift index 12eac6fe..2e51d358 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppStoreReviewDetails/ById/AppStoreReviewAttachments/AppStoreReviewDetailsByIdAppStoreReviewAttachments.GET.5161e3c.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppStoreReviewDetails/ById/AppStoreReviewAttachments/AppStoreReviewDetailsByIdAppStoreReviewAttachments.GET.5161e3c.generated.swift @@ -48,8 +48,10 @@ extension V1.AppStoreReviewDetails.ById.AppStoreReviewAttachments { /// - Returns: **200**, List of AppStoreReviewAttachments as `AppStoreReviewAttachmentsResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -63,12 +65,18 @@ extension V1.AppStoreReviewDetails.ById.AppStoreReviewAttachments { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 404: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -94,86 +102,91 @@ extension V1.AppStoreReviewDetails.ById.AppStoreReviewAttachments.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum AppStoreReviewAttachments: Hashable, Codable, RawRepresentable { - case appStoreReviewDetail - case assetDeliveryState - case fileName - case fileSize - case sourceFileChecksum - case uploadOperations - case uploaded - case unknown(String) - - public var rawValue: String { - switch self { - case .appStoreReviewDetail: return "appStoreReviewDetail" - case .assetDeliveryState: return "assetDeliveryState" - case .fileName: return "fileName" - case .fileSize: return "fileSize" - case .sourceFileChecksum: return "sourceFileChecksum" - case .uploadOperations: return "uploadOperations" - case .uploaded: return "uploaded" - case .unknown(let rawValue): return rawValue - } + public struct AppStoreReviewAttachments: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var appStoreReviewDetail: Self { + .init(rawValue: "appStoreReviewDetail") + } + + public static var assetDeliveryState: Self { + .init(rawValue: "assetDeliveryState") } + public static var fileName: Self { + .init(rawValue: "fileName") + } + + public static var fileSize: Self { + .init(rawValue: "fileSize") + } + + public static var sourceFileChecksum: Self { + .init(rawValue: "sourceFileChecksum") + } + + public static var uploadOperations: Self { + .init(rawValue: "uploadOperations") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "appStoreReviewDetail": self = .appStoreReviewDetail - case "assetDeliveryState": self = .assetDeliveryState - case "fileName": self = .fileName - case "fileSize": self = .fileSize - case "sourceFileChecksum": self = .sourceFileChecksum - case "uploadOperations": self = .uploadOperations - case "uploaded": self = .uploaded - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum AppStoreReviewDetails: Hashable, Codable, RawRepresentable { - case appStoreReviewAttachments - case appStoreVersion - case contactEmail - case contactFirstName - case contactLastName - case contactPhone - case demoAccountName - case demoAccountPassword - case demoAccountRequired - case notes - case unknown(String) - - public var rawValue: String { - switch self { - case .appStoreReviewAttachments: return "appStoreReviewAttachments" - case .appStoreVersion: return "appStoreVersion" - case .contactEmail: return "contactEmail" - case .contactFirstName: return "contactFirstName" - case .contactLastName: return "contactLastName" - case .contactPhone: return "contactPhone" - case .demoAccountName: return "demoAccountName" - case .demoAccountPassword: return "demoAccountPassword" - case .demoAccountRequired: return "demoAccountRequired" - case .notes: return "notes" - case .unknown(let rawValue): return rawValue - } + public struct AppStoreReviewDetails: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var appStoreReviewAttachments: Self { + .init(rawValue: "appStoreReviewAttachments") + } + + public static var appStoreVersion: Self { + .init(rawValue: "appStoreVersion") + } + + public static var contactEmail: Self { + .init(rawValue: "contactEmail") } + public static var contactFirstName: Self { + .init(rawValue: "contactFirstName") + } + + public static var contactLastName: Self { + .init(rawValue: "contactLastName") + } + + public static var contactPhone: Self { + .init(rawValue: "contactPhone") + } + + public static var demoAccountName: Self { + .init(rawValue: "demoAccountName") + } + + public static var demoAccountPassword: Self { + .init(rawValue: "demoAccountPassword") + } + + public static var demoAccountRequired: Self { + .init(rawValue: "demoAccountRequired") + } + + public static var notes: Self { + .init(rawValue: "notes") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "appStoreReviewAttachments": self = .appStoreReviewAttachments - case "appStoreVersion": self = .appStoreVersion - case "contactEmail": self = .contactEmail - case "contactFirstName": self = .contactFirstName - case "contactLastName": self = .contactLastName - case "contactPhone": self = .contactPhone - case "demoAccountName": self = .demoAccountName - case "demoAccountPassword": self = .demoAccountPassword - case "demoAccountRequired": self = .demoAccountRequired - case "notes": self = .notes - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } @@ -196,22 +209,19 @@ extension V1.AppStoreReviewDetails.ById.AppStoreReviewAttachments.GET { } } - public enum Include: Hashable, Codable, RawRepresentable { - case appStoreReviewDetail - case unknown(String) + public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var appStoreReviewDetail: Self { + .init(rawValue: "appStoreReviewDetail") + } - public var rawValue: String { - switch self { - case .appStoreReviewDetail: return "appStoreReviewDetail" - case .unknown(let rawValue): return rawValue - } + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "appStoreReviewDetail": self = .appStoreReviewDetail - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppStoreReviewDetails/ById/AppStoreReviewDetailsById.GET.680b6d4.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppStoreReviewDetails/ById/AppStoreReviewDetailsById.GET.680b6d4.generated.swift index 2dc9d6db..3d2736e0 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppStoreReviewDetails/ById/AppStoreReviewDetailsById.GET.680b6d4.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppStoreReviewDetails/ById/AppStoreReviewDetailsById.GET.680b6d4.generated.swift @@ -48,8 +48,10 @@ extension V1.AppStoreReviewDetails.ById { /// - Returns: **200**, Single AppStoreReviewDetail as `AppStoreReviewDetailResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -63,12 +65,18 @@ extension V1.AppStoreReviewDetails.ById { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 404: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -93,86 +101,91 @@ extension V1.AppStoreReviewDetails.ById.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum AppStoreReviewAttachments: Hashable, Codable, RawRepresentable { - case appStoreReviewDetail - case assetDeliveryState - case fileName - case fileSize - case sourceFileChecksum - case uploadOperations - case uploaded - case unknown(String) - - public var rawValue: String { - switch self { - case .appStoreReviewDetail: return "appStoreReviewDetail" - case .assetDeliveryState: return "assetDeliveryState" - case .fileName: return "fileName" - case .fileSize: return "fileSize" - case .sourceFileChecksum: return "sourceFileChecksum" - case .uploadOperations: return "uploadOperations" - case .uploaded: return "uploaded" - case .unknown(let rawValue): return rawValue - } + public struct AppStoreReviewAttachments: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var appStoreReviewDetail: Self { + .init(rawValue: "appStoreReviewDetail") + } + + public static var assetDeliveryState: Self { + .init(rawValue: "assetDeliveryState") + } + + public static var fileName: Self { + .init(rawValue: "fileName") + } + + public static var fileSize: Self { + .init(rawValue: "fileSize") + } + + public static var sourceFileChecksum: Self { + .init(rawValue: "sourceFileChecksum") + } + + public static var uploadOperations: Self { + .init(rawValue: "uploadOperations") } + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "appStoreReviewDetail": self = .appStoreReviewDetail - case "assetDeliveryState": self = .assetDeliveryState - case "fileName": self = .fileName - case "fileSize": self = .fileSize - case "sourceFileChecksum": self = .sourceFileChecksum - case "uploadOperations": self = .uploadOperations - case "uploaded": self = .uploaded - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum AppStoreReviewDetails: Hashable, Codable, RawRepresentable { - case appStoreReviewAttachments - case appStoreVersion - case contactEmail - case contactFirstName - case contactLastName - case contactPhone - case demoAccountName - case demoAccountPassword - case demoAccountRequired - case notes - case unknown(String) - - public var rawValue: String { - switch self { - case .appStoreReviewAttachments: return "appStoreReviewAttachments" - case .appStoreVersion: return "appStoreVersion" - case .contactEmail: return "contactEmail" - case .contactFirstName: return "contactFirstName" - case .contactLastName: return "contactLastName" - case .contactPhone: return "contactPhone" - case .demoAccountName: return "demoAccountName" - case .demoAccountPassword: return "demoAccountPassword" - case .demoAccountRequired: return "demoAccountRequired" - case .notes: return "notes" - case .unknown(let rawValue): return rawValue - } + public struct AppStoreReviewDetails: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var appStoreReviewAttachments: Self { + .init(rawValue: "appStoreReviewAttachments") + } + + public static var appStoreVersion: Self { + .init(rawValue: "appStoreVersion") + } + + public static var contactEmail: Self { + .init(rawValue: "contactEmail") + } + + public static var contactFirstName: Self { + .init(rawValue: "contactFirstName") + } + + public static var contactLastName: Self { + .init(rawValue: "contactLastName") + } + + public static var contactPhone: Self { + .init(rawValue: "contactPhone") + } + + public static var demoAccountName: Self { + .init(rawValue: "demoAccountName") + } + + public static var demoAccountPassword: Self { + .init(rawValue: "demoAccountPassword") + } + + public static var demoAccountRequired: Self { + .init(rawValue: "demoAccountRequired") } + public static var notes: Self { + .init(rawValue: "notes") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "appStoreReviewAttachments": self = .appStoreReviewAttachments - case "appStoreVersion": self = .appStoreVersion - case "contactEmail": self = .contactEmail - case "contactFirstName": self = .contactFirstName - case "contactLastName": self = .contactLastName - case "contactPhone": self = .contactPhone - case "demoAccountName": self = .demoAccountName - case "demoAccountPassword": self = .demoAccountPassword - case "demoAccountRequired": self = .demoAccountRequired - case "notes": self = .notes - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } @@ -195,25 +208,23 @@ extension V1.AppStoreReviewDetails.ById.GET { } } - public enum Include: Hashable, Codable, RawRepresentable { - case appStoreReviewAttachments - case appStoreVersion - case unknown(String) + public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var appStoreReviewAttachments: Self { + .init(rawValue: "appStoreReviewAttachments") + } - public var rawValue: String { - switch self { - case .appStoreReviewAttachments: return "appStoreReviewAttachments" - case .appStoreVersion: return "appStoreVersion" - case .unknown(let rawValue): return rawValue - } + public static var appStoreVersion: Self { + .init(rawValue: "appStoreVersion") + } + + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "appStoreReviewAttachments": self = .appStoreReviewAttachments - case "appStoreVersion": self = .appStoreVersion - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppStoreReviewDetails/ById/AppStoreReviewDetailsById.PATCH.680b6d4.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppStoreReviewDetails/ById/AppStoreReviewDetailsById.PATCH.680b6d4.generated.swift index 07eaa441..514beaac 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppStoreReviewDetails/ById/AppStoreReviewDetailsById.PATCH.680b6d4.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppStoreReviewDetails/ById/AppStoreReviewDetailsById.PATCH.680b6d4.generated.swift @@ -48,9 +48,12 @@ extension V1.AppStoreReviewDetails.ById { /// - Returns: **200**, Single AppStoreReviewDetail as `AppStoreReviewDetailResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **422**, Unprocessable request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -64,6 +67,9 @@ extension V1.AppStoreReviewDetails.ById { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) @@ -73,6 +79,12 @@ extension V1.AppStoreReviewDetails.ById { case 409: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 422: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppStoreReviewDetails/ById/Relationships/AppStoreReviewAttachments/AppStoreReviewDetailsByIdRelationshipsAppStoreReviewAttachments.GET.49653b4.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppStoreReviewDetails/ById/Relationships/AppStoreReviewAttachments/AppStoreReviewDetailsByIdRelationshipsAppStoreReviewAttachments.GET.49653b4.generated.swift new file mode 100644 index 00000000..5d69b77a --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppStoreReviewDetails/ById/Relationships/AppStoreReviewAttachments/AppStoreReviewDetailsByIdRelationshipsAppStoreReviewAttachments.GET.49653b4.generated.swift @@ -0,0 +1,88 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.AppStoreReviewDetails.ById.Relationships.AppStoreReviewAttachments { + public struct GET: Endpoint { + public typealias Response = AppStoreReviewDetailAppStoreReviewAttachmentsLinkagesResponse + + public var path: String { + "/v1/appStoreReviewDetails/\(id)/relationships/appStoreReviewAttachments" + } + + /// the id of the requested resource + public var id: String + + public var parameters: Parameters = Parameters() + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + components?.queryItems = [ + URLQueryItem(name: "limit", + value: parameters.limit.map { "\($0)" }) + ].filter { $0.value != nil } + if components?.queryItems?.isEmpty ?? false { + components?.queryItems = nil + } + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "GET" + return urlRequest + } + + /// - Returns: **200**, List of related linkages as `AppStoreReviewDetailAppStoreReviewAttachmentsLinkagesResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(AppStoreReviewDetailAppStoreReviewAttachmentsLinkagesResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +extension V1.AppStoreReviewDetails.ById.Relationships.AppStoreReviewAttachments.GET { + public struct Parameters: Hashable { + /// maximum resources per page + public var limit: Int? + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppStoreVersionExperimentTreatmentLocalizations/AppStoreVersionExperimentTreatmentLocalizations.POST.733fb9f.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppStoreVersionExperimentTreatmentLocalizations/AppStoreVersionExperimentTreatmentLocalizations.POST.733fb9f.generated.swift index 10234706..466cc3c9 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppStoreVersionExperimentTreatmentLocalizations/AppStoreVersionExperimentTreatmentLocalizations.POST.733fb9f.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppStoreVersionExperimentTreatmentLocalizations/AppStoreVersionExperimentTreatmentLocalizations.POST.733fb9f.generated.swift @@ -41,8 +41,11 @@ extension V1.AppStoreVersionExperimentTreatmentLocalizations { /// - Returns: **201**, Single AppStoreVersionExperimentTreatmentLocalization as `AppStoreVersionExperimentTreatmentLocalizationResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **422**, Unprocessable request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -56,12 +59,21 @@ extension V1.AppStoreVersionExperimentTreatmentLocalizations { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 409: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 422: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppStoreVersionExperimentTreatmentLocalizations/ById/AppPreviewSets/AppStoreVersionExperimentTreatmentLocalizationsByIdAppPreviewSets.GET.7672523.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppStoreVersionExperimentTreatmentLocalizations/ById/AppPreviewSets/AppStoreVersionExperimentTreatmentLocalizationsByIdAppPreviewSets.GET.7672523.generated.swift index 60d26073..cf826411 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppStoreVersionExperimentTreatmentLocalizations/ById/AppPreviewSets/AppStoreVersionExperimentTreatmentLocalizationsByIdAppPreviewSets.GET.7672523.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppStoreVersionExperimentTreatmentLocalizations/ById/AppPreviewSets/AppStoreVersionExperimentTreatmentLocalizationsByIdAppPreviewSets.GET.7672523.generated.swift @@ -62,8 +62,10 @@ extension V1.AppStoreVersionExperimentTreatmentLocalizations.ById.AppPreviewSets /// - Returns: **200**, List of AppPreviewSets as `AppPreviewSetsResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -77,12 +79,18 @@ extension V1.AppStoreVersionExperimentTreatmentLocalizations.ById.AppPreviewSets case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 404: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -110,188 +118,207 @@ extension V1.AppStoreVersionExperimentTreatmentLocalizations.ById.AppPreviewSets private var values: [AnyHashable: AnyHashable] = [:] - public enum AppCustomProductPageLocalizations: Hashable, Codable, RawRepresentable { - case appCustomProductPageVersion - case appPreviewSets - case appScreenshotSets - case locale - case promotionalText - case unknown(String) - - public var rawValue: String { - switch self { - case .appCustomProductPageVersion: return "appCustomProductPageVersion" - case .appPreviewSets: return "appPreviewSets" - case .appScreenshotSets: return "appScreenshotSets" - case .locale: return "locale" - case .promotionalText: return "promotionalText" - case .unknown(let rawValue): return rawValue - } + public struct AppCustomProductPageLocalizations: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var appCustomProductPageVersion: Self { + .init(rawValue: "appCustomProductPageVersion") + } + + public static var appPreviewSets: Self { + .init(rawValue: "appPreviewSets") + } + + public static var appScreenshotSets: Self { + .init(rawValue: "appScreenshotSets") } + public static var locale: Self { + .init(rawValue: "locale") + } + + public static var promotionalText: Self { + .init(rawValue: "promotionalText") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "appCustomProductPageVersion": self = .appCustomProductPageVersion - case "appPreviewSets": self = .appPreviewSets - case "appScreenshotSets": self = .appScreenshotSets - case "locale": self = .locale - case "promotionalText": self = .promotionalText - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum AppPreviewSets: Hashable, Codable, RawRepresentable { - case appCustomProductPageLocalization - case appPreviews - case appStoreVersionExperimentTreatmentLocalization - case appStoreVersionLocalization - case previewType - case unknown(String) - - public var rawValue: String { - switch self { - case .appCustomProductPageLocalization: return "appCustomProductPageLocalization" - case .appPreviews: return "appPreviews" - case .appStoreVersionExperimentTreatmentLocalization: return "appStoreVersionExperimentTreatmentLocalization" - case .appStoreVersionLocalization: return "appStoreVersionLocalization" - case .previewType: return "previewType" - case .unknown(let rawValue): return rawValue - } + public struct AppPreviewSets: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var appCustomProductPageLocalization: Self { + .init(rawValue: "appCustomProductPageLocalization") } + public static var appPreviews: Self { + .init(rawValue: "appPreviews") + } + + public static var appStoreVersionExperimentTreatmentLocalization: Self { + .init(rawValue: "appStoreVersionExperimentTreatmentLocalization") + } + + public static var appStoreVersionLocalization: Self { + .init(rawValue: "appStoreVersionLocalization") + } + + public static var previewType: Self { + .init(rawValue: "previewType") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "appCustomProductPageLocalization": self = .appCustomProductPageLocalization - case "appPreviews": self = .appPreviews - case "appStoreVersionExperimentTreatmentLocalization": self = .appStoreVersionExperimentTreatmentLocalization - case "appStoreVersionLocalization": self = .appStoreVersionLocalization - case "previewType": self = .previewType - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum AppPreviews: Hashable, Codable, RawRepresentable { - case appPreviewSet - case assetDeliveryState - case fileName - case fileSize - case mimeType - case previewFrameTimeCode - case previewImage - case sourceFileChecksum - case uploadOperations - case uploaded - case videoUrl - case unknown(String) - - public var rawValue: String { - switch self { - case .appPreviewSet: return "appPreviewSet" - case .assetDeliveryState: return "assetDeliveryState" - case .fileName: return "fileName" - case .fileSize: return "fileSize" - case .mimeType: return "mimeType" - case .previewFrameTimeCode: return "previewFrameTimeCode" - case .previewImage: return "previewImage" - case .sourceFileChecksum: return "sourceFileChecksum" - case .uploadOperations: return "uploadOperations" - case .uploaded: return "uploaded" - case .videoUrl: return "videoUrl" - case .unknown(let rawValue): return rawValue - } + public struct AppPreviews: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var appPreviewSet: Self { + .init(rawValue: "appPreviewSet") + } + + public static var assetDeliveryState: Self { + .init(rawValue: "assetDeliveryState") + } + + public static var fileName: Self { + .init(rawValue: "fileName") + } + + public static var fileSize: Self { + .init(rawValue: "fileSize") + } + + public static var mimeType: Self { + .init(rawValue: "mimeType") + } + + public static var previewFrameImage: Self { + .init(rawValue: "previewFrameImage") + } + + public static var previewFrameTimeCode: Self { + .init(rawValue: "previewFrameTimeCode") + } + + public static var previewImage: Self { + .init(rawValue: "previewImage") + } + + public static var sourceFileChecksum: Self { + .init(rawValue: "sourceFileChecksum") + } + + public static var uploadOperations: Self { + .init(rawValue: "uploadOperations") + } + + public static var videoDeliveryState: Self { + .init(rawValue: "videoDeliveryState") } + public static var videoUrl: Self { + .init(rawValue: "videoUrl") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "appPreviewSet": self = .appPreviewSet - case "assetDeliveryState": self = .assetDeliveryState - case "fileName": self = .fileName - case "fileSize": self = .fileSize - case "mimeType": self = .mimeType - case "previewFrameTimeCode": self = .previewFrameTimeCode - case "previewImage": self = .previewImage - case "sourceFileChecksum": self = .sourceFileChecksum - case "uploadOperations": self = .uploadOperations - case "uploaded": self = .uploaded - case "videoUrl": self = .videoUrl - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum AppStoreVersionExperimentTreatmentLocalizations: Hashable, Codable, RawRepresentable { - case appPreviewSets - case appScreenshotSets - case appStoreVersionExperimentTreatment - case locale - case unknown(String) + public struct AppStoreVersionExperimentTreatmentLocalizations: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var appPreviewSets: Self { + .init(rawValue: "appPreviewSets") + } + + public static var appScreenshotSets: Self { + .init(rawValue: "appScreenshotSets") + } - public var rawValue: String { - switch self { - case .appPreviewSets: return "appPreviewSets" - case .appScreenshotSets: return "appScreenshotSets" - case .appStoreVersionExperimentTreatment: return "appStoreVersionExperimentTreatment" - case .locale: return "locale" - case .unknown(let rawValue): return rawValue - } + public static var appStoreVersionExperimentTreatment: Self { + .init(rawValue: "appStoreVersionExperimentTreatment") } + public static var locale: Self { + .init(rawValue: "locale") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "appPreviewSets": self = .appPreviewSets - case "appScreenshotSets": self = .appScreenshotSets - case "appStoreVersionExperimentTreatment": self = .appStoreVersionExperimentTreatment - case "locale": self = .locale - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum AppStoreVersionLocalizations: Hashable, Codable, RawRepresentable { - case appPreviewSets - case appScreenshotSets - case appStoreVersion - case description - case keywords - case locale - case marketingUrl - case promotionalText - case supportUrl - case whatsNew - case unknown(String) - - public var rawValue: String { - switch self { - case .appPreviewSets: return "appPreviewSets" - case .appScreenshotSets: return "appScreenshotSets" - case .appStoreVersion: return "appStoreVersion" - case .description: return "description" - case .keywords: return "keywords" - case .locale: return "locale" - case .marketingUrl: return "marketingUrl" - case .promotionalText: return "promotionalText" - case .supportUrl: return "supportUrl" - case .whatsNew: return "whatsNew" - case .unknown(let rawValue): return rawValue - } + public struct AppStoreVersionLocalizations: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var appPreviewSets: Self { + .init(rawValue: "appPreviewSets") + } + + public static var appScreenshotSets: Self { + .init(rawValue: "appScreenshotSets") + } + + public static var appStoreVersion: Self { + .init(rawValue: "appStoreVersion") + } + + public static var description: Self { + .init(rawValue: "description") + } + + public static var keywords: Self { + .init(rawValue: "keywords") + } + + public static var locale: Self { + .init(rawValue: "locale") + } + + public static var marketingUrl: Self { + .init(rawValue: "marketingUrl") + } + + public static var promotionalText: Self { + .init(rawValue: "promotionalText") + } + + public static var supportUrl: Self { + .init(rawValue: "supportUrl") + } + + public static var whatsNew: Self { + .init(rawValue: "whatsNew") } + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "appPreviewSets": self = .appPreviewSets - case "appScreenshotSets": self = .appScreenshotSets - case "appStoreVersion": self = .appStoreVersion - case "description": self = .description - case "keywords": self = .keywords - case "locale": self = .locale - case "marketingUrl": self = .marketingUrl - case "promotionalText": self = .promotionalText - case "supportUrl": self = .supportUrl - case "whatsNew": self = .whatsNew - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } @@ -337,64 +364,79 @@ extension V1.AppStoreVersionExperimentTreatmentLocalizations.ById.AppPreviewSets private var values: [AnyHashable: AnyHashable] = [:] - public enum PreviewType: Hashable, Codable, RawRepresentable { - case appleTv - case desktop - case ipad105 - case ipad97 - case ipadPro129 - case ipadPro3Gen11 - case ipadPro3Gen129 - case iphone35 - case iphone40 - case iphone47 - case iphone55 - case iphone58 - case iphone61 - case iphone65 - case iphone67 - case unknown(String) - - public var rawValue: String { - switch self { - case .appleTv: return "APPLE_TV" - case .desktop: return "DESKTOP" - case .ipad105: return "IPAD_105" - case .ipad97: return "IPAD_97" - case .ipadPro129: return "IPAD_PRO_129" - case .ipadPro3Gen11: return "IPAD_PRO_3GEN_11" - case .ipadPro3Gen129: return "IPAD_PRO_3GEN_129" - case .iphone35: return "IPHONE_35" - case .iphone40: return "IPHONE_40" - case .iphone47: return "IPHONE_47" - case .iphone55: return "IPHONE_55" - case .iphone58: return "IPHONE_58" - case .iphone61: return "IPHONE_61" - case .iphone65: return "IPHONE_65" - case .iphone67: return "IPHONE_67" - case .unknown(let rawValue): return rawValue - } + public struct PreviewType: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var appleTv: Self { + .init(rawValue: "APPLE_TV") + } + + public static var appleVisionPro: Self { + .init(rawValue: "APPLE_VISION_PRO") + } + + public static var desktop: Self { + .init(rawValue: "DESKTOP") + } + + public static var ipad105: Self { + .init(rawValue: "IPAD_105") + } + + public static var ipad97: Self { + .init(rawValue: "IPAD_97") + } + + public static var ipadPro129: Self { + .init(rawValue: "IPAD_PRO_129") + } + + public static var ipadPro3Gen11: Self { + .init(rawValue: "IPAD_PRO_3GEN_11") + } + + public static var ipadPro3Gen129: Self { + .init(rawValue: "IPAD_PRO_3GEN_129") + } + + public static var iphone35: Self { + .init(rawValue: "IPHONE_35") + } + + public static var iphone40: Self { + .init(rawValue: "IPHONE_40") + } + + public static var iphone47: Self { + .init(rawValue: "IPHONE_47") + } + + public static var iphone55: Self { + .init(rawValue: "IPHONE_55") + } + + public static var iphone58: Self { + .init(rawValue: "IPHONE_58") + } + + public static var iphone61: Self { + .init(rawValue: "IPHONE_61") + } + + public static var iphone65: Self { + .init(rawValue: "IPHONE_65") } + public static var iphone67: Self { + .init(rawValue: "IPHONE_67") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "APPLE_TV": self = .appleTv - case "DESKTOP": self = .desktop - case "IPAD_105": self = .ipad105 - case "IPAD_97": self = .ipad97 - case "IPAD_PRO_129": self = .ipadPro129 - case "IPAD_PRO_3GEN_11": self = .ipadPro3Gen11 - case "IPAD_PRO_3GEN_129": self = .ipadPro3Gen129 - case "IPHONE_35": self = .iphone35 - case "IPHONE_40": self = .iphone40 - case "IPHONE_47": self = .iphone47 - case "IPHONE_55": self = .iphone55 - case "IPHONE_58": self = .iphone58 - case "IPHONE_61": self = .iphone61 - case "IPHONE_65": self = .iphone65 - case "IPHONE_67": self = .iphone67 - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } @@ -422,31 +464,31 @@ extension V1.AppStoreVersionExperimentTreatmentLocalizations.ById.AppPreviewSets } } - public enum Include: Hashable, Codable, RawRepresentable { - case appCustomProductPageLocalization - case appPreviews - case appStoreVersionExperimentTreatmentLocalization - case appStoreVersionLocalization - case unknown(String) - - public var rawValue: String { - switch self { - case .appCustomProductPageLocalization: return "appCustomProductPageLocalization" - case .appPreviews: return "appPreviews" - case .appStoreVersionExperimentTreatmentLocalization: return "appStoreVersionExperimentTreatmentLocalization" - case .appStoreVersionLocalization: return "appStoreVersionLocalization" - case .unknown(let rawValue): return rawValue - } + public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var appCustomProductPageLocalization: Self { + .init(rawValue: "appCustomProductPageLocalization") + } + + public static var appPreviews: Self { + .init(rawValue: "appPreviews") } + public static var appStoreVersionExperimentTreatmentLocalization: Self { + .init(rawValue: "appStoreVersionExperimentTreatmentLocalization") + } + + public static var appStoreVersionLocalization: Self { + .init(rawValue: "appStoreVersionLocalization") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "appCustomProductPageLocalization": self = .appCustomProductPageLocalization - case "appPreviews": self = .appPreviews - case "appStoreVersionExperimentTreatmentLocalization": self = .appStoreVersionExperimentTreatmentLocalization - case "appStoreVersionLocalization": self = .appStoreVersionLocalization - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppStoreVersionExperimentTreatmentLocalizations/ById/AppScreenshotSets/AppStoreVersionExperimentTreatmentLocalizationsByIdAppScreenshotSets.GET.52e9ae2.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppStoreVersionExperimentTreatmentLocalizations/ById/AppScreenshotSets/AppStoreVersionExperimentTreatmentLocalizationsByIdAppScreenshotSets.GET.52e9ae2.generated.swift index 8b339e3f..d5554bbd 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppStoreVersionExperimentTreatmentLocalizations/ById/AppScreenshotSets/AppStoreVersionExperimentTreatmentLocalizationsByIdAppScreenshotSets.GET.52e9ae2.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppStoreVersionExperimentTreatmentLocalizations/ById/AppScreenshotSets/AppStoreVersionExperimentTreatmentLocalizationsByIdAppScreenshotSets.GET.52e9ae2.generated.swift @@ -62,8 +62,10 @@ extension V1.AppStoreVersionExperimentTreatmentLocalizations.ById.AppScreenshotS /// - Returns: **200**, List of AppScreenshotSets as `AppScreenshotSetsResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -77,12 +79,18 @@ extension V1.AppStoreVersionExperimentTreatmentLocalizations.ById.AppScreenshotS case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 404: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -110,185 +118,195 @@ extension V1.AppStoreVersionExperimentTreatmentLocalizations.ById.AppScreenshotS private var values: [AnyHashable: AnyHashable] = [:] - public enum AppCustomProductPageLocalizations: Hashable, Codable, RawRepresentable { - case appCustomProductPageVersion - case appPreviewSets - case appScreenshotSets - case locale - case promotionalText - case unknown(String) - - public var rawValue: String { - switch self { - case .appCustomProductPageVersion: return "appCustomProductPageVersion" - case .appPreviewSets: return "appPreviewSets" - case .appScreenshotSets: return "appScreenshotSets" - case .locale: return "locale" - case .promotionalText: return "promotionalText" - case .unknown(let rawValue): return rawValue - } + public struct AppCustomProductPageLocalizations: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var appCustomProductPageVersion: Self { + .init(rawValue: "appCustomProductPageVersion") + } + + public static var appPreviewSets: Self { + .init(rawValue: "appPreviewSets") + } + + public static var appScreenshotSets: Self { + .init(rawValue: "appScreenshotSets") + } + + public static var locale: Self { + .init(rawValue: "locale") } + public static var promotionalText: Self { + .init(rawValue: "promotionalText") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "appCustomProductPageVersion": self = .appCustomProductPageVersion - case "appPreviewSets": self = .appPreviewSets - case "appScreenshotSets": self = .appScreenshotSets - case "locale": self = .locale - case "promotionalText": self = .promotionalText - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum AppScreenshotSets: Hashable, Codable, RawRepresentable { - case appCustomProductPageLocalization - case appScreenshots - case appStoreVersionExperimentTreatmentLocalization - case appStoreVersionLocalization - case screenshotDisplayType - case unknown(String) - - public var rawValue: String { - switch self { - case .appCustomProductPageLocalization: return "appCustomProductPageLocalization" - case .appScreenshots: return "appScreenshots" - case .appStoreVersionExperimentTreatmentLocalization: return "appStoreVersionExperimentTreatmentLocalization" - case .appStoreVersionLocalization: return "appStoreVersionLocalization" - case .screenshotDisplayType: return "screenshotDisplayType" - case .unknown(let rawValue): return rawValue - } + public struct AppScreenshotSets: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var appCustomProductPageLocalization: Self { + .init(rawValue: "appCustomProductPageLocalization") + } + + public static var appScreenshots: Self { + .init(rawValue: "appScreenshots") + } + + public static var appStoreVersionExperimentTreatmentLocalization: Self { + .init(rawValue: "appStoreVersionExperimentTreatmentLocalization") } + public static var appStoreVersionLocalization: Self { + .init(rawValue: "appStoreVersionLocalization") + } + + public static var screenshotDisplayType: Self { + .init(rawValue: "screenshotDisplayType") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "appCustomProductPageLocalization": self = .appCustomProductPageLocalization - case "appScreenshots": self = .appScreenshots - case "appStoreVersionExperimentTreatmentLocalization": self = .appStoreVersionExperimentTreatmentLocalization - case "appStoreVersionLocalization": self = .appStoreVersionLocalization - case "screenshotDisplayType": self = .screenshotDisplayType - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum AppScreenshots: Hashable, Codable, RawRepresentable { - case appScreenshotSet - case assetDeliveryState - case assetToken - case assetType - case fileName - case fileSize - case imageAsset - case sourceFileChecksum - case uploadOperations - case uploaded - case unknown(String) - - public var rawValue: String { - switch self { - case .appScreenshotSet: return "appScreenshotSet" - case .assetDeliveryState: return "assetDeliveryState" - case .assetToken: return "assetToken" - case .assetType: return "assetType" - case .fileName: return "fileName" - case .fileSize: return "fileSize" - case .imageAsset: return "imageAsset" - case .sourceFileChecksum: return "sourceFileChecksum" - case .uploadOperations: return "uploadOperations" - case .uploaded: return "uploaded" - case .unknown(let rawValue): return rawValue - } + public struct AppScreenshots: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var appScreenshotSet: Self { + .init(rawValue: "appScreenshotSet") + } + + public static var assetDeliveryState: Self { + .init(rawValue: "assetDeliveryState") + } + + public static var assetToken: Self { + .init(rawValue: "assetToken") + } + + public static var assetType: Self { + .init(rawValue: "assetType") + } + + public static var fileName: Self { + .init(rawValue: "fileName") + } + + public static var fileSize: Self { + .init(rawValue: "fileSize") + } + + public static var imageAsset: Self { + .init(rawValue: "imageAsset") } + public static var sourceFileChecksum: Self { + .init(rawValue: "sourceFileChecksum") + } + + public static var uploadOperations: Self { + .init(rawValue: "uploadOperations") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "appScreenshotSet": self = .appScreenshotSet - case "assetDeliveryState": self = .assetDeliveryState - case "assetToken": self = .assetToken - case "assetType": self = .assetType - case "fileName": self = .fileName - case "fileSize": self = .fileSize - case "imageAsset": self = .imageAsset - case "sourceFileChecksum": self = .sourceFileChecksum - case "uploadOperations": self = .uploadOperations - case "uploaded": self = .uploaded - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum AppStoreVersionExperimentTreatmentLocalizations: Hashable, Codable, RawRepresentable { - case appPreviewSets - case appScreenshotSets - case appStoreVersionExperimentTreatment - case locale - case unknown(String) + public struct AppStoreVersionExperimentTreatmentLocalizations: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var appPreviewSets: Self { + .init(rawValue: "appPreviewSets") + } + + public static var appScreenshotSets: Self { + .init(rawValue: "appScreenshotSets") + } - public var rawValue: String { - switch self { - case .appPreviewSets: return "appPreviewSets" - case .appScreenshotSets: return "appScreenshotSets" - case .appStoreVersionExperimentTreatment: return "appStoreVersionExperimentTreatment" - case .locale: return "locale" - case .unknown(let rawValue): return rawValue - } + public static var appStoreVersionExperimentTreatment: Self { + .init(rawValue: "appStoreVersionExperimentTreatment") } + public static var locale: Self { + .init(rawValue: "locale") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "appPreviewSets": self = .appPreviewSets - case "appScreenshotSets": self = .appScreenshotSets - case "appStoreVersionExperimentTreatment": self = .appStoreVersionExperimentTreatment - case "locale": self = .locale - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum AppStoreVersionLocalizations: Hashable, Codable, RawRepresentable { - case appPreviewSets - case appScreenshotSets - case appStoreVersion - case description - case keywords - case locale - case marketingUrl - case promotionalText - case supportUrl - case whatsNew - case unknown(String) - - public var rawValue: String { - switch self { - case .appPreviewSets: return "appPreviewSets" - case .appScreenshotSets: return "appScreenshotSets" - case .appStoreVersion: return "appStoreVersion" - case .description: return "description" - case .keywords: return "keywords" - case .locale: return "locale" - case .marketingUrl: return "marketingUrl" - case .promotionalText: return "promotionalText" - case .supportUrl: return "supportUrl" - case .whatsNew: return "whatsNew" - case .unknown(let rawValue): return rawValue - } + public struct AppStoreVersionLocalizations: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var appPreviewSets: Self { + .init(rawValue: "appPreviewSets") + } + + public static var appScreenshotSets: Self { + .init(rawValue: "appScreenshotSets") + } + + public static var appStoreVersion: Self { + .init(rawValue: "appStoreVersion") } + public static var description: Self { + .init(rawValue: "description") + } + + public static var keywords: Self { + .init(rawValue: "keywords") + } + + public static var locale: Self { + .init(rawValue: "locale") + } + + public static var marketingUrl: Self { + .init(rawValue: "marketingUrl") + } + + public static var promotionalText: Self { + .init(rawValue: "promotionalText") + } + + public static var supportUrl: Self { + .init(rawValue: "supportUrl") + } + + public static var whatsNew: Self { + .init(rawValue: "whatsNew") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "appPreviewSets": self = .appPreviewSets - case "appScreenshotSets": self = .appScreenshotSets - case "appStoreVersion": self = .appStoreVersion - case "description": self = .description - case "keywords": self = .keywords - case "locale": self = .locale - case "marketingUrl": self = .marketingUrl - case "promotionalText": self = .promotionalText - case "supportUrl": self = .supportUrl - case "whatsNew": self = .whatsNew - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } @@ -334,112 +352,147 @@ extension V1.AppStoreVersionExperimentTreatmentLocalizations.ById.AppScreenshotS private var values: [AnyHashable: AnyHashable] = [:] - public enum ScreenshotDisplayType: Hashable, Codable, RawRepresentable { - case appAppleTv - case appDesktop - case appIpad105 - case appIpad97 - case appIpadPro129 - case appIpadPro3Gen11 - case appIpadPro3Gen129 - case appIphone35 - case appIphone40 - case appIphone47 - case appIphone55 - case appIphone58 - case appIphone61 - case appIphone65 - case appIphone67 - case appWatchSeries3 - case appWatchSeries4 - case appWatchSeries7 - case appWatchUltra - case imessageAppIpad105 - case imessageAppIpad97 - case imessageAppIpadPro129 - case imessageAppIpadPro3Gen11 - case imessageAppIpadPro3Gen129 - case imessageAppIphone40 - case imessageAppIphone47 - case imessageAppIphone55 - case imessageAppIphone58 - case imessageAppIphone61 - case imessageAppIphone65 - case imessageAppIphone67 - case unknown(String) - - public var rawValue: String { - switch self { - case .appAppleTv: return "APP_APPLE_TV" - case .appDesktop: return "APP_DESKTOP" - case .appIpad105: return "APP_IPAD_105" - case .appIpad97: return "APP_IPAD_97" - case .appIpadPro129: return "APP_IPAD_PRO_129" - case .appIpadPro3Gen11: return "APP_IPAD_PRO_3GEN_11" - case .appIpadPro3Gen129: return "APP_IPAD_PRO_3GEN_129" - case .appIphone35: return "APP_IPHONE_35" - case .appIphone40: return "APP_IPHONE_40" - case .appIphone47: return "APP_IPHONE_47" - case .appIphone55: return "APP_IPHONE_55" - case .appIphone58: return "APP_IPHONE_58" - case .appIphone61: return "APP_IPHONE_61" - case .appIphone65: return "APP_IPHONE_65" - case .appIphone67: return "APP_IPHONE_67" - case .appWatchSeries3: return "APP_WATCH_SERIES_3" - case .appWatchSeries4: return "APP_WATCH_SERIES_4" - case .appWatchSeries7: return "APP_WATCH_SERIES_7" - case .appWatchUltra: return "APP_WATCH_ULTRA" - case .imessageAppIpad105: return "IMESSAGE_APP_IPAD_105" - case .imessageAppIpad97: return "IMESSAGE_APP_IPAD_97" - case .imessageAppIpadPro129: return "IMESSAGE_APP_IPAD_PRO_129" - case .imessageAppIpadPro3Gen11: return "IMESSAGE_APP_IPAD_PRO_3GEN_11" - case .imessageAppIpadPro3Gen129: return "IMESSAGE_APP_IPAD_PRO_3GEN_129" - case .imessageAppIphone40: return "IMESSAGE_APP_IPHONE_40" - case .imessageAppIphone47: return "IMESSAGE_APP_IPHONE_47" - case .imessageAppIphone55: return "IMESSAGE_APP_IPHONE_55" - case .imessageAppIphone58: return "IMESSAGE_APP_IPHONE_58" - case .imessageAppIphone61: return "IMESSAGE_APP_IPHONE_61" - case .imessageAppIphone65: return "IMESSAGE_APP_IPHONE_65" - case .imessageAppIphone67: return "IMESSAGE_APP_IPHONE_67" - case .unknown(let rawValue): return rawValue - } + public struct ScreenshotDisplayType: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var appAppleTv: Self { + .init(rawValue: "APP_APPLE_TV") + } + + public static var appAppleVisionPro: Self { + .init(rawValue: "APP_APPLE_VISION_PRO") } + public static var appDesktop: Self { + .init(rawValue: "APP_DESKTOP") + } + + public static var appIpad105: Self { + .init(rawValue: "APP_IPAD_105") + } + + public static var appIpad97: Self { + .init(rawValue: "APP_IPAD_97") + } + + public static var appIpadPro129: Self { + .init(rawValue: "APP_IPAD_PRO_129") + } + + public static var appIpadPro3Gen11: Self { + .init(rawValue: "APP_IPAD_PRO_3GEN_11") + } + + public static var appIpadPro3Gen129: Self { + .init(rawValue: "APP_IPAD_PRO_3GEN_129") + } + + public static var appIphone35: Self { + .init(rawValue: "APP_IPHONE_35") + } + + public static var appIphone40: Self { + .init(rawValue: "APP_IPHONE_40") + } + + public static var appIphone47: Self { + .init(rawValue: "APP_IPHONE_47") + } + + public static var appIphone55: Self { + .init(rawValue: "APP_IPHONE_55") + } + + public static var appIphone58: Self { + .init(rawValue: "APP_IPHONE_58") + } + + public static var appIphone61: Self { + .init(rawValue: "APP_IPHONE_61") + } + + public static var appIphone65: Self { + .init(rawValue: "APP_IPHONE_65") + } + + public static var appIphone67: Self { + .init(rawValue: "APP_IPHONE_67") + } + + public static var appWatchSeries10: Self { + .init(rawValue: "APP_WATCH_SERIES_10") + } + + public static var appWatchSeries3: Self { + .init(rawValue: "APP_WATCH_SERIES_3") + } + + public static var appWatchSeries4: Self { + .init(rawValue: "APP_WATCH_SERIES_4") + } + + public static var appWatchSeries7: Self { + .init(rawValue: "APP_WATCH_SERIES_7") + } + + public static var appWatchUltra: Self { + .init(rawValue: "APP_WATCH_ULTRA") + } + + public static var imessageAppIpad105: Self { + .init(rawValue: "IMESSAGE_APP_IPAD_105") + } + + public static var imessageAppIpad97: Self { + .init(rawValue: "IMESSAGE_APP_IPAD_97") + } + + public static var imessageAppIpadPro129: Self { + .init(rawValue: "IMESSAGE_APP_IPAD_PRO_129") + } + + public static var imessageAppIpadPro3Gen11: Self { + .init(rawValue: "IMESSAGE_APP_IPAD_PRO_3GEN_11") + } + + public static var imessageAppIpadPro3Gen129: Self { + .init(rawValue: "IMESSAGE_APP_IPAD_PRO_3GEN_129") + } + + public static var imessageAppIphone40: Self { + .init(rawValue: "IMESSAGE_APP_IPHONE_40") + } + + public static var imessageAppIphone47: Self { + .init(rawValue: "IMESSAGE_APP_IPHONE_47") + } + + public static var imessageAppIphone55: Self { + .init(rawValue: "IMESSAGE_APP_IPHONE_55") + } + + public static var imessageAppIphone58: Self { + .init(rawValue: "IMESSAGE_APP_IPHONE_58") + } + + public static var imessageAppIphone61: Self { + .init(rawValue: "IMESSAGE_APP_IPHONE_61") + } + + public static var imessageAppIphone65: Self { + .init(rawValue: "IMESSAGE_APP_IPHONE_65") + } + + public static var imessageAppIphone67: Self { + .init(rawValue: "IMESSAGE_APP_IPHONE_67") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "APP_APPLE_TV": self = .appAppleTv - case "APP_DESKTOP": self = .appDesktop - case "APP_IPAD_105": self = .appIpad105 - case "APP_IPAD_97": self = .appIpad97 - case "APP_IPAD_PRO_129": self = .appIpadPro129 - case "APP_IPAD_PRO_3GEN_11": self = .appIpadPro3Gen11 - case "APP_IPAD_PRO_3GEN_129": self = .appIpadPro3Gen129 - case "APP_IPHONE_35": self = .appIphone35 - case "APP_IPHONE_40": self = .appIphone40 - case "APP_IPHONE_47": self = .appIphone47 - case "APP_IPHONE_55": self = .appIphone55 - case "APP_IPHONE_58": self = .appIphone58 - case "APP_IPHONE_61": self = .appIphone61 - case "APP_IPHONE_65": self = .appIphone65 - case "APP_IPHONE_67": self = .appIphone67 - case "APP_WATCH_SERIES_3": self = .appWatchSeries3 - case "APP_WATCH_SERIES_4": self = .appWatchSeries4 - case "APP_WATCH_SERIES_7": self = .appWatchSeries7 - case "APP_WATCH_ULTRA": self = .appWatchUltra - case "IMESSAGE_APP_IPAD_105": self = .imessageAppIpad105 - case "IMESSAGE_APP_IPAD_97": self = .imessageAppIpad97 - case "IMESSAGE_APP_IPAD_PRO_129": self = .imessageAppIpadPro129 - case "IMESSAGE_APP_IPAD_PRO_3GEN_11": self = .imessageAppIpadPro3Gen11 - case "IMESSAGE_APP_IPAD_PRO_3GEN_129": self = .imessageAppIpadPro3Gen129 - case "IMESSAGE_APP_IPHONE_40": self = .imessageAppIphone40 - case "IMESSAGE_APP_IPHONE_47": self = .imessageAppIphone47 - case "IMESSAGE_APP_IPHONE_55": self = .imessageAppIphone55 - case "IMESSAGE_APP_IPHONE_58": self = .imessageAppIphone58 - case "IMESSAGE_APP_IPHONE_61": self = .imessageAppIphone61 - case "IMESSAGE_APP_IPHONE_65": self = .imessageAppIphone65 - case "IMESSAGE_APP_IPHONE_67": self = .imessageAppIphone67 - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } @@ -467,31 +520,31 @@ extension V1.AppStoreVersionExperimentTreatmentLocalizations.ById.AppScreenshotS } } - public enum Include: Hashable, Codable, RawRepresentable { - case appCustomProductPageLocalization - case appScreenshots - case appStoreVersionExperimentTreatmentLocalization - case appStoreVersionLocalization - case unknown(String) - - public var rawValue: String { - switch self { - case .appCustomProductPageLocalization: return "appCustomProductPageLocalization" - case .appScreenshots: return "appScreenshots" - case .appStoreVersionExperimentTreatmentLocalization: return "appStoreVersionExperimentTreatmentLocalization" - case .appStoreVersionLocalization: return "appStoreVersionLocalization" - case .unknown(let rawValue): return rawValue - } + public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var appCustomProductPageLocalization: Self { + .init(rawValue: "appCustomProductPageLocalization") } + public static var appScreenshots: Self { + .init(rawValue: "appScreenshots") + } + + public static var appStoreVersionExperimentTreatmentLocalization: Self { + .init(rawValue: "appStoreVersionExperimentTreatmentLocalization") + } + + public static var appStoreVersionLocalization: Self { + .init(rawValue: "appStoreVersionLocalization") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "appCustomProductPageLocalization": self = .appCustomProductPageLocalization - case "appScreenshots": self = .appScreenshots - case "appStoreVersionExperimentTreatmentLocalization": self = .appStoreVersionExperimentTreatmentLocalization - case "appStoreVersionLocalization": self = .appStoreVersionLocalization - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppStoreVersionExperimentTreatmentLocalizations/ById/AppStoreVersionExperimentTreatmentLocalizationsById.DELETE.fa4aca6.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppStoreVersionExperimentTreatmentLocalizations/ById/AppStoreVersionExperimentTreatmentLocalizationsById.DELETE.fa4aca6.generated.swift index 64526bbf..817366d8 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppStoreVersionExperimentTreatmentLocalizations/ById/AppStoreVersionExperimentTreatmentLocalizationsById.DELETE.fa4aca6.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppStoreVersionExperimentTreatmentLocalizations/ById/AppStoreVersionExperimentTreatmentLocalizationsById.DELETE.fa4aca6.generated.swift @@ -31,11 +31,12 @@ extension V1.AppStoreVersionExperimentTreatmentLocalizations.ById { return urlRequest } - /// - Returns: **204**, Success (no content) /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -43,12 +44,12 @@ extension V1.AppStoreVersionExperimentTreatmentLocalizations.ById { } switch urlResponse.statusCode { - case 204: - return - case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) @@ -58,6 +59,9 @@ extension V1.AppStoreVersionExperimentTreatmentLocalizations.ById { case 409: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppStoreVersionExperimentTreatmentLocalizations/ById/AppStoreVersionExperimentTreatmentLocalizationsById.GET.fa4aca6.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppStoreVersionExperimentTreatmentLocalizations/ById/AppStoreVersionExperimentTreatmentLocalizationsById.GET.fa4aca6.generated.swift index e1a66650..21942e48 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppStoreVersionExperimentTreatmentLocalizations/ById/AppStoreVersionExperimentTreatmentLocalizationsById.GET.fa4aca6.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppStoreVersionExperimentTreatmentLocalizations/ById/AppStoreVersionExperimentTreatmentLocalizationsById.GET.fa4aca6.generated.swift @@ -52,8 +52,10 @@ extension V1.AppStoreVersionExperimentTreatmentLocalizations.ById { /// - Returns: **200**, Single AppStoreVersionExperimentTreatmentLocalization as `AppStoreVersionExperimentTreatmentLocalizationResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -67,12 +69,18 @@ extension V1.AppStoreVersionExperimentTreatmentLocalizations.ById { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 404: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -97,93 +105,95 @@ extension V1.AppStoreVersionExperimentTreatmentLocalizations.ById.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum AppPreviewSets: Hashable, Codable, RawRepresentable { - case appCustomProductPageLocalization - case appPreviews - case appStoreVersionExperimentTreatmentLocalization - case appStoreVersionLocalization - case previewType - case unknown(String) - - public var rawValue: String { - switch self { - case .appCustomProductPageLocalization: return "appCustomProductPageLocalization" - case .appPreviews: return "appPreviews" - case .appStoreVersionExperimentTreatmentLocalization: return "appStoreVersionExperimentTreatmentLocalization" - case .appStoreVersionLocalization: return "appStoreVersionLocalization" - case .previewType: return "previewType" - case .unknown(let rawValue): return rawValue - } + public struct AppPreviewSets: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var appCustomProductPageLocalization: Self { + .init(rawValue: "appCustomProductPageLocalization") + } + + public static var appPreviews: Self { + .init(rawValue: "appPreviews") + } + + public static var appStoreVersionExperimentTreatmentLocalization: Self { + .init(rawValue: "appStoreVersionExperimentTreatmentLocalization") + } + + public static var appStoreVersionLocalization: Self { + .init(rawValue: "appStoreVersionLocalization") + } + + public static var previewType: Self { + .init(rawValue: "previewType") + } + + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "appCustomProductPageLocalization": self = .appCustomProductPageLocalization - case "appPreviews": self = .appPreviews - case "appStoreVersionExperimentTreatmentLocalization": self = .appStoreVersionExperimentTreatmentLocalization - case "appStoreVersionLocalization": self = .appStoreVersionLocalization - case "previewType": self = .previewType - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum AppScreenshotSets: Hashable, Codable, RawRepresentable { - case appCustomProductPageLocalization - case appScreenshots - case appStoreVersionExperimentTreatmentLocalization - case appStoreVersionLocalization - case screenshotDisplayType - case unknown(String) - - public var rawValue: String { - switch self { - case .appCustomProductPageLocalization: return "appCustomProductPageLocalization" - case .appScreenshots: return "appScreenshots" - case .appStoreVersionExperimentTreatmentLocalization: return "appStoreVersionExperimentTreatmentLocalization" - case .appStoreVersionLocalization: return "appStoreVersionLocalization" - case .screenshotDisplayType: return "screenshotDisplayType" - case .unknown(let rawValue): return rawValue - } + public struct AppScreenshotSets: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var appCustomProductPageLocalization: Self { + .init(rawValue: "appCustomProductPageLocalization") + } + + public static var appScreenshots: Self { + .init(rawValue: "appScreenshots") + } + + public static var appStoreVersionExperimentTreatmentLocalization: Self { + .init(rawValue: "appStoreVersionExperimentTreatmentLocalization") + } + + public static var appStoreVersionLocalization: Self { + .init(rawValue: "appStoreVersionLocalization") + } + + public static var screenshotDisplayType: Self { + .init(rawValue: "screenshotDisplayType") + } + + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "appCustomProductPageLocalization": self = .appCustomProductPageLocalization - case "appScreenshots": self = .appScreenshots - case "appStoreVersionExperimentTreatmentLocalization": self = .appStoreVersionExperimentTreatmentLocalization - case "appStoreVersionLocalization": self = .appStoreVersionLocalization - case "screenshotDisplayType": self = .screenshotDisplayType - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum AppStoreVersionExperimentTreatmentLocalizations: Hashable, Codable, RawRepresentable { - case appPreviewSets - case appScreenshotSets - case appStoreVersionExperimentTreatment - case locale - case unknown(String) - - public var rawValue: String { - switch self { - case .appPreviewSets: return "appPreviewSets" - case .appScreenshotSets: return "appScreenshotSets" - case .appStoreVersionExperimentTreatment: return "appStoreVersionExperimentTreatment" - case .locale: return "locale" - case .unknown(let rawValue): return rawValue - } + public struct AppStoreVersionExperimentTreatmentLocalizations: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var appPreviewSets: Self { + .init(rawValue: "appPreviewSets") + } + + public static var appScreenshotSets: Self { + .init(rawValue: "appScreenshotSets") + } + + public static var appStoreVersionExperimentTreatment: Self { + .init(rawValue: "appStoreVersionExperimentTreatment") + } + + public static var locale: Self { + .init(rawValue: "locale") + } + + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "appPreviewSets": self = .appPreviewSets - case "appScreenshotSets": self = .appScreenshotSets - case "appStoreVersionExperimentTreatment": self = .appStoreVersionExperimentTreatment - case "locale": self = .locale - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } @@ -211,28 +221,27 @@ extension V1.AppStoreVersionExperimentTreatmentLocalizations.ById.GET { } } - public enum Include: Hashable, Codable, RawRepresentable { - case appPreviewSets - case appScreenshotSets - case appStoreVersionExperimentTreatment - case unknown(String) - - public var rawValue: String { - switch self { - case .appPreviewSets: return "appPreviewSets" - case .appScreenshotSets: return "appScreenshotSets" - case .appStoreVersionExperimentTreatment: return "appStoreVersionExperimentTreatment" - case .unknown(let rawValue): return rawValue - } + public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var appPreviewSets: Self { + .init(rawValue: "appPreviewSets") } + public static var appScreenshotSets: Self { + .init(rawValue: "appScreenshotSets") + } + + public static var appStoreVersionExperimentTreatment: Self { + .init(rawValue: "appStoreVersionExperimentTreatment") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "appPreviewSets": self = .appPreviewSets - case "appScreenshotSets": self = .appScreenshotSets - case "appStoreVersionExperimentTreatment": self = .appStoreVersionExperimentTreatment - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppStoreVersionExperimentTreatmentLocalizations/ById/Relationships/AppPreviewSets/AppStoreVersionExperimentTreatmentLocalizationsByIdRelationshipsAppPreviewSets.GET.f714c7c.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppStoreVersionExperimentTreatmentLocalizations/ById/Relationships/AppPreviewSets/AppStoreVersionExperimentTreatmentLocalizationsByIdRelationshipsAppPreviewSets.GET.f714c7c.generated.swift new file mode 100644 index 00000000..43ff186f --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppStoreVersionExperimentTreatmentLocalizations/ById/Relationships/AppPreviewSets/AppStoreVersionExperimentTreatmentLocalizationsByIdRelationshipsAppPreviewSets.GET.f714c7c.generated.swift @@ -0,0 +1,88 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.AppStoreVersionExperimentTreatmentLocalizations.ById.Relationships.AppPreviewSets { + public struct GET: Endpoint { + public typealias Response = AppStoreVersionExperimentTreatmentLocalizationAppPreviewSetsLinkagesResponse + + public var path: String { + "/v1/appStoreVersionExperimentTreatmentLocalizations/\(id)/relationships/appPreviewSets" + } + + /// the id of the requested resource + public var id: String + + public var parameters: Parameters = Parameters() + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + components?.queryItems = [ + URLQueryItem(name: "limit", + value: parameters.limit.map { "\($0)" }) + ].filter { $0.value != nil } + if components?.queryItems?.isEmpty ?? false { + components?.queryItems = nil + } + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "GET" + return urlRequest + } + + /// - Returns: **200**, List of related linkages as `AppStoreVersionExperimentTreatmentLocalizationAppPreviewSetsLinkagesResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(AppStoreVersionExperimentTreatmentLocalizationAppPreviewSetsLinkagesResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +extension V1.AppStoreVersionExperimentTreatmentLocalizations.ById.Relationships.AppPreviewSets.GET { + public struct Parameters: Hashable { + /// maximum resources per page + public var limit: Int? + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppStoreVersionExperimentTreatmentLocalizations/ById/Relationships/AppScreenshotSets/AppStoreVersionExperimentTreatmentLocalizationsByIdRelationshipsAppScreenshotSets.GET.04df64b.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppStoreVersionExperimentTreatmentLocalizations/ById/Relationships/AppScreenshotSets/AppStoreVersionExperimentTreatmentLocalizationsByIdRelationshipsAppScreenshotSets.GET.04df64b.generated.swift new file mode 100644 index 00000000..6b0ba5dc --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppStoreVersionExperimentTreatmentLocalizations/ById/Relationships/AppScreenshotSets/AppStoreVersionExperimentTreatmentLocalizationsByIdRelationshipsAppScreenshotSets.GET.04df64b.generated.swift @@ -0,0 +1,88 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.AppStoreVersionExperimentTreatmentLocalizations.ById.Relationships.AppScreenshotSets { + public struct GET: Endpoint { + public typealias Response = AppStoreVersionExperimentTreatmentLocalizationAppScreenshotSetsLinkagesResponse + + public var path: String { + "/v1/appStoreVersionExperimentTreatmentLocalizations/\(id)/relationships/appScreenshotSets" + } + + /// the id of the requested resource + public var id: String + + public var parameters: Parameters = Parameters() + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + components?.queryItems = [ + URLQueryItem(name: "limit", + value: parameters.limit.map { "\($0)" }) + ].filter { $0.value != nil } + if components?.queryItems?.isEmpty ?? false { + components?.queryItems = nil + } + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "GET" + return urlRequest + } + + /// - Returns: **200**, List of related linkages as `AppStoreVersionExperimentTreatmentLocalizationAppScreenshotSetsLinkagesResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(AppStoreVersionExperimentTreatmentLocalizationAppScreenshotSetsLinkagesResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +extension V1.AppStoreVersionExperimentTreatmentLocalizations.ById.Relationships.AppScreenshotSets.GET { + public struct Parameters: Hashable { + /// maximum resources per page + public var limit: Int? + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppStoreVersionExperimentTreatments/AppStoreVersionExperimentTreatments.POST.7683017.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppStoreVersionExperimentTreatments/AppStoreVersionExperimentTreatments.POST.7683017.generated.swift index d4c388a9..188946fb 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppStoreVersionExperimentTreatments/AppStoreVersionExperimentTreatments.POST.7683017.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppStoreVersionExperimentTreatments/AppStoreVersionExperimentTreatments.POST.7683017.generated.swift @@ -41,8 +41,11 @@ extension V1.AppStoreVersionExperimentTreatments { /// - Returns: **201**, Single AppStoreVersionExperimentTreatment as `AppStoreVersionExperimentTreatmentResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **422**, Unprocessable request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -56,12 +59,21 @@ extension V1.AppStoreVersionExperimentTreatments { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 409: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 422: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppStoreVersionExperimentTreatments/ById/AppStoreVersionExperimentTreatmentLocalizations/AppStoreVersionExperimentTreatmentsByIdAppStoreVersionExperimentTreatmentLocalizations.GET.368e9bf.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppStoreVersionExperimentTreatments/ById/AppStoreVersionExperimentTreatmentLocalizations/AppStoreVersionExperimentTreatmentsByIdAppStoreVersionExperimentTreatmentLocalizations.GET.368e9bf.generated.swift index 90aef195..d16730f5 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppStoreVersionExperimentTreatments/ById/AppStoreVersionExperimentTreatmentLocalizations/AppStoreVersionExperimentTreatmentsByIdAppStoreVersionExperimentTreatmentLocalizations.GET.368e9bf.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppStoreVersionExperimentTreatments/ById/AppStoreVersionExperimentTreatmentLocalizations/AppStoreVersionExperimentTreatmentsByIdAppStoreVersionExperimentTreatmentLocalizations.GET.368e9bf.generated.swift @@ -58,8 +58,10 @@ extension V1.AppStoreVersionExperimentTreatments.ById.AppStoreVersionExperimentT /// - Returns: **200**, List of AppStoreVersionExperimentTreatmentLocalizations as `AppStoreVersionExperimentTreatmentLocalizationsResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -73,12 +75,18 @@ extension V1.AppStoreVersionExperimentTreatments.ById.AppStoreVersionExperimentT case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 404: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -106,130 +114,135 @@ extension V1.AppStoreVersionExperimentTreatments.ById.AppStoreVersionExperimentT private var values: [AnyHashable: AnyHashable] = [:] - public enum AppPreviewSets: Hashable, Codable, RawRepresentable { - case appCustomProductPageLocalization - case appPreviews - case appStoreVersionExperimentTreatmentLocalization - case appStoreVersionLocalization - case previewType - case unknown(String) - - public var rawValue: String { - switch self { - case .appCustomProductPageLocalization: return "appCustomProductPageLocalization" - case .appPreviews: return "appPreviews" - case .appStoreVersionExperimentTreatmentLocalization: return "appStoreVersionExperimentTreatmentLocalization" - case .appStoreVersionLocalization: return "appStoreVersionLocalization" - case .previewType: return "previewType" - case .unknown(let rawValue): return rawValue - } + public struct AppPreviewSets: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var appCustomProductPageLocalization: Self { + .init(rawValue: "appCustomProductPageLocalization") + } + + public static var appPreviews: Self { + .init(rawValue: "appPreviews") + } + + public static var appStoreVersionExperimentTreatmentLocalization: Self { + .init(rawValue: "appStoreVersionExperimentTreatmentLocalization") } + public static var appStoreVersionLocalization: Self { + .init(rawValue: "appStoreVersionLocalization") + } + + public static var previewType: Self { + .init(rawValue: "previewType") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "appCustomProductPageLocalization": self = .appCustomProductPageLocalization - case "appPreviews": self = .appPreviews - case "appStoreVersionExperimentTreatmentLocalization": self = .appStoreVersionExperimentTreatmentLocalization - case "appStoreVersionLocalization": self = .appStoreVersionLocalization - case "previewType": self = .previewType - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum AppScreenshotSets: Hashable, Codable, RawRepresentable { - case appCustomProductPageLocalization - case appScreenshots - case appStoreVersionExperimentTreatmentLocalization - case appStoreVersionLocalization - case screenshotDisplayType - case unknown(String) - - public var rawValue: String { - switch self { - case .appCustomProductPageLocalization: return "appCustomProductPageLocalization" - case .appScreenshots: return "appScreenshots" - case .appStoreVersionExperimentTreatmentLocalization: return "appStoreVersionExperimentTreatmentLocalization" - case .appStoreVersionLocalization: return "appStoreVersionLocalization" - case .screenshotDisplayType: return "screenshotDisplayType" - case .unknown(let rawValue): return rawValue - } + public struct AppScreenshotSets: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var appCustomProductPageLocalization: Self { + .init(rawValue: "appCustomProductPageLocalization") } + public static var appScreenshots: Self { + .init(rawValue: "appScreenshots") + } + + public static var appStoreVersionExperimentTreatmentLocalization: Self { + .init(rawValue: "appStoreVersionExperimentTreatmentLocalization") + } + + public static var appStoreVersionLocalization: Self { + .init(rawValue: "appStoreVersionLocalization") + } + + public static var screenshotDisplayType: Self { + .init(rawValue: "screenshotDisplayType") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "appCustomProductPageLocalization": self = .appCustomProductPageLocalization - case "appScreenshots": self = .appScreenshots - case "appStoreVersionExperimentTreatmentLocalization": self = .appStoreVersionExperimentTreatmentLocalization - case "appStoreVersionLocalization": self = .appStoreVersionLocalization - case "screenshotDisplayType": self = .screenshotDisplayType - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum AppStoreVersionExperimentTreatmentLocalizations: Hashable, Codable, RawRepresentable { - case appPreviewSets - case appScreenshotSets - case appStoreVersionExperimentTreatment - case locale - case unknown(String) + public struct AppStoreVersionExperimentTreatmentLocalizations: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var appPreviewSets: Self { + .init(rawValue: "appPreviewSets") + } + + public static var appScreenshotSets: Self { + .init(rawValue: "appScreenshotSets") + } - public var rawValue: String { - switch self { - case .appPreviewSets: return "appPreviewSets" - case .appScreenshotSets: return "appScreenshotSets" - case .appStoreVersionExperimentTreatment: return "appStoreVersionExperimentTreatment" - case .locale: return "locale" - case .unknown(let rawValue): return rawValue - } + public static var appStoreVersionExperimentTreatment: Self { + .init(rawValue: "appStoreVersionExperimentTreatment") } + public static var locale: Self { + .init(rawValue: "locale") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "appPreviewSets": self = .appPreviewSets - case "appScreenshotSets": self = .appScreenshotSets - case "appStoreVersionExperimentTreatment": self = .appStoreVersionExperimentTreatment - case "locale": self = .locale - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum AppStoreVersionExperimentTreatments: Hashable, Codable, RawRepresentable { - case appIcon - case appIconName - case appStoreVersionExperiment - case appStoreVersionExperimentTreatmentLocalizations - case appStoreVersionExperimentV2 - case name - case promotedDate - case unknown(String) - - public var rawValue: String { - switch self { - case .appIcon: return "appIcon" - case .appIconName: return "appIconName" - case .appStoreVersionExperiment: return "appStoreVersionExperiment" - case .appStoreVersionExperimentTreatmentLocalizations: return "appStoreVersionExperimentTreatmentLocalizations" - case .appStoreVersionExperimentV2: return "appStoreVersionExperimentV2" - case .name: return "name" - case .promotedDate: return "promotedDate" - case .unknown(let rawValue): return rawValue - } + public struct AppStoreVersionExperimentTreatments: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var appIcon: Self { + .init(rawValue: "appIcon") + } + + public static var appIconName: Self { + .init(rawValue: "appIconName") + } + + public static var appStoreVersionExperiment: Self { + .init(rawValue: "appStoreVersionExperiment") + } + + public static var appStoreVersionExperimentTreatmentLocalizations: Self { + .init(rawValue: "appStoreVersionExperimentTreatmentLocalizations") + } + + public static var appStoreVersionExperimentV2: Self { + .init(rawValue: "appStoreVersionExperimentV2") + } + + public static var name: Self { + .init(rawValue: "name") + } + + public static var promotedDate: Self { + .init(rawValue: "promotedDate") } + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "appIcon": self = .appIcon - case "appIconName": self = .appIconName - case "appStoreVersionExperiment": self = .appStoreVersionExperiment - case "appStoreVersionExperimentTreatmentLocalizations": self = .appStoreVersionExperimentTreatmentLocalizations - case "appStoreVersionExperimentV2": self = .appStoreVersionExperimentV2 - case "name": self = .name - case "promotedDate": self = .promotedDate - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } @@ -284,28 +297,27 @@ extension V1.AppStoreVersionExperimentTreatments.ById.AppStoreVersionExperimentT } } - public enum Include: Hashable, Codable, RawRepresentable { - case appPreviewSets - case appScreenshotSets - case appStoreVersionExperimentTreatment - case unknown(String) + public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var appPreviewSets: Self { + .init(rawValue: "appPreviewSets") + } + + public static var appScreenshotSets: Self { + .init(rawValue: "appScreenshotSets") + } - public var rawValue: String { - switch self { - case .appPreviewSets: return "appPreviewSets" - case .appScreenshotSets: return "appScreenshotSets" - case .appStoreVersionExperimentTreatment: return "appStoreVersionExperimentTreatment" - case .unknown(let rawValue): return rawValue - } + public static var appStoreVersionExperimentTreatment: Self { + .init(rawValue: "appStoreVersionExperimentTreatment") } + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "appPreviewSets": self = .appPreviewSets - case "appScreenshotSets": self = .appScreenshotSets - case "appStoreVersionExperimentTreatment": self = .appStoreVersionExperimentTreatment - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppStoreVersionExperimentTreatments/ById/AppStoreVersionExperimentTreatmentsById.DELETE.5d1c48f.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppStoreVersionExperimentTreatments/ById/AppStoreVersionExperimentTreatmentsById.DELETE.5d1c48f.generated.swift index ee6b6dc2..61408561 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppStoreVersionExperimentTreatments/ById/AppStoreVersionExperimentTreatmentsById.DELETE.5d1c48f.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppStoreVersionExperimentTreatments/ById/AppStoreVersionExperimentTreatmentsById.DELETE.5d1c48f.generated.swift @@ -31,11 +31,12 @@ extension V1.AppStoreVersionExperimentTreatments.ById { return urlRequest } - /// - Returns: **204**, Success (no content) /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -43,12 +44,12 @@ extension V1.AppStoreVersionExperimentTreatments.ById { } switch urlResponse.statusCode { - case 204: - return - case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) @@ -58,6 +59,9 @@ extension V1.AppStoreVersionExperimentTreatments.ById { case 409: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppStoreVersionExperimentTreatments/ById/AppStoreVersionExperimentTreatmentsById.GET.5d1c48f.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppStoreVersionExperimentTreatments/ById/AppStoreVersionExperimentTreatmentsById.GET.5d1c48f.generated.swift index 4a137fe5..09cf3e24 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppStoreVersionExperimentTreatments/ById/AppStoreVersionExperimentTreatmentsById.GET.5d1c48f.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppStoreVersionExperimentTreatments/ById/AppStoreVersionExperimentTreatmentsById.GET.5d1c48f.generated.swift @@ -48,8 +48,10 @@ extension V1.AppStoreVersionExperimentTreatments.ById { /// - Returns: **200**, Single AppStoreVersionExperimentTreatment as `AppStoreVersionExperimentTreatmentResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -63,12 +65,18 @@ extension V1.AppStoreVersionExperimentTreatments.ById { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 404: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -93,68 +101,71 @@ extension V1.AppStoreVersionExperimentTreatments.ById.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum AppStoreVersionExperimentTreatmentLocalizations: Hashable, Codable, RawRepresentable { - case appPreviewSets - case appScreenshotSets - case appStoreVersionExperimentTreatment - case locale - case unknown(String) + public struct AppStoreVersionExperimentTreatmentLocalizations: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var appPreviewSets: Self { + .init(rawValue: "appPreviewSets") + } + + public static var appScreenshotSets: Self { + .init(rawValue: "appScreenshotSets") + } + + public static var appStoreVersionExperimentTreatment: Self { + .init(rawValue: "appStoreVersionExperimentTreatment") + } + + public static var locale: Self { + .init(rawValue: "locale") + } - public var rawValue: String { - switch self { - case .appPreviewSets: return "appPreviewSets" - case .appScreenshotSets: return "appScreenshotSets" - case .appStoreVersionExperimentTreatment: return "appStoreVersionExperimentTreatment" - case .locale: return "locale" - case .unknown(let rawValue): return rawValue - } + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "appPreviewSets": self = .appPreviewSets - case "appScreenshotSets": self = .appScreenshotSets - case "appStoreVersionExperimentTreatment": self = .appStoreVersionExperimentTreatment - case "locale": self = .locale - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum AppStoreVersionExperimentTreatments: Hashable, Codable, RawRepresentable { - case appIcon - case appIconName - case appStoreVersionExperiment - case appStoreVersionExperimentTreatmentLocalizations - case appStoreVersionExperimentV2 - case name - case promotedDate - case unknown(String) - - public var rawValue: String { - switch self { - case .appIcon: return "appIcon" - case .appIconName: return "appIconName" - case .appStoreVersionExperiment: return "appStoreVersionExperiment" - case .appStoreVersionExperimentTreatmentLocalizations: return "appStoreVersionExperimentTreatmentLocalizations" - case .appStoreVersionExperimentV2: return "appStoreVersionExperimentV2" - case .name: return "name" - case .promotedDate: return "promotedDate" - case .unknown(let rawValue): return rawValue - } + public struct AppStoreVersionExperimentTreatments: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var appIcon: Self { + .init(rawValue: "appIcon") + } + + public static var appIconName: Self { + .init(rawValue: "appIconName") + } + + public static var appStoreVersionExperiment: Self { + .init(rawValue: "appStoreVersionExperiment") + } + + public static var appStoreVersionExperimentTreatmentLocalizations: Self { + .init(rawValue: "appStoreVersionExperimentTreatmentLocalizations") } + public static var appStoreVersionExperimentV2: Self { + .init(rawValue: "appStoreVersionExperimentV2") + } + + public static var name: Self { + .init(rawValue: "name") + } + + public static var promotedDate: Self { + .init(rawValue: "promotedDate") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "appIcon": self = .appIcon - case "appIconName": self = .appIconName - case "appStoreVersionExperiment": self = .appStoreVersionExperiment - case "appStoreVersionExperimentTreatmentLocalizations": self = .appStoreVersionExperimentTreatmentLocalizations - case "appStoreVersionExperimentV2": self = .appStoreVersionExperimentV2 - case "name": self = .name - case "promotedDate": self = .promotedDate - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } @@ -177,28 +188,27 @@ extension V1.AppStoreVersionExperimentTreatments.ById.GET { } } - public enum Include: Hashable, Codable, RawRepresentable { - case appStoreVersionExperiment - case appStoreVersionExperimentTreatmentLocalizations - case appStoreVersionExperimentV2 - case unknown(String) + public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var appStoreVersionExperiment: Self { + .init(rawValue: "appStoreVersionExperiment") + } - public var rawValue: String { - switch self { - case .appStoreVersionExperiment: return "appStoreVersionExperiment" - case .appStoreVersionExperimentTreatmentLocalizations: return "appStoreVersionExperimentTreatmentLocalizations" - case .appStoreVersionExperimentV2: return "appStoreVersionExperimentV2" - case .unknown(let rawValue): return rawValue - } + public static var appStoreVersionExperimentTreatmentLocalizations: Self { + .init(rawValue: "appStoreVersionExperimentTreatmentLocalizations") + } + + public static var appStoreVersionExperimentV2: Self { + .init(rawValue: "appStoreVersionExperimentV2") } + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "appStoreVersionExperiment": self = .appStoreVersionExperiment - case "appStoreVersionExperimentTreatmentLocalizations": self = .appStoreVersionExperimentTreatmentLocalizations - case "appStoreVersionExperimentV2": self = .appStoreVersionExperimentV2 - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppStoreVersionExperimentTreatments/ById/AppStoreVersionExperimentTreatmentsById.PATCH.5d1c48f.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppStoreVersionExperimentTreatments/ById/AppStoreVersionExperimentTreatmentsById.PATCH.5d1c48f.generated.swift index 90246864..845e583c 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppStoreVersionExperimentTreatments/ById/AppStoreVersionExperimentTreatmentsById.PATCH.5d1c48f.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppStoreVersionExperimentTreatments/ById/AppStoreVersionExperimentTreatmentsById.PATCH.5d1c48f.generated.swift @@ -48,9 +48,12 @@ extension V1.AppStoreVersionExperimentTreatments.ById { /// - Returns: **200**, Single AppStoreVersionExperimentTreatment as `AppStoreVersionExperimentTreatmentResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **422**, Unprocessable request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -64,6 +67,9 @@ extension V1.AppStoreVersionExperimentTreatments.ById { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) @@ -73,6 +79,12 @@ extension V1.AppStoreVersionExperimentTreatments.ById { case 409: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 422: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppStoreVersionExperimentTreatments/ById/Relationships/AppStoreVersionExperimentTreatmentLocalizations/AppStoreVersionExperimentTreatmentsByIdRelationshipsAppStoreVersionExperimentTreatmentLocalizations.GET.0ef2c13.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppStoreVersionExperimentTreatments/ById/Relationships/AppStoreVersionExperimentTreatmentLocalizations/AppStoreVersionExperimentTreatmentsByIdRelationshipsAppStoreVersionExperimentTreatmentLocalizations.GET.0ef2c13.generated.swift new file mode 100644 index 00000000..f92fd5ac --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppStoreVersionExperimentTreatments/ById/Relationships/AppStoreVersionExperimentTreatmentLocalizations/AppStoreVersionExperimentTreatmentsByIdRelationshipsAppStoreVersionExperimentTreatmentLocalizations.GET.0ef2c13.generated.swift @@ -0,0 +1,88 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.AppStoreVersionExperimentTreatments.ById.Relationships.AppStoreVersionExperimentTreatmentLocalizations { + public struct GET: Endpoint { + public typealias Response = AppStoreVersionExperimentTreatmentAppStoreVersionExperimentTreatmentLocalizationsLinkagesResponse + + public var path: String { + "/v1/appStoreVersionExperimentTreatments/\(id)/relationships/appStoreVersionExperimentTreatmentLocalizations" + } + + /// the id of the requested resource + public var id: String + + public var parameters: Parameters = Parameters() + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + components?.queryItems = [ + URLQueryItem(name: "limit", + value: parameters.limit.map { "\($0)" }) + ].filter { $0.value != nil } + if components?.queryItems?.isEmpty ?? false { + components?.queryItems = nil + } + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "GET" + return urlRequest + } + + /// - Returns: **200**, List of related linkages as `AppStoreVersionExperimentTreatmentAppStoreVersionExperimentTreatmentLocalizationsLinkagesResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(AppStoreVersionExperimentTreatmentAppStoreVersionExperimentTreatmentLocalizationsLinkagesResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +extension V1.AppStoreVersionExperimentTreatments.ById.Relationships.AppStoreVersionExperimentTreatmentLocalizations.GET { + public struct Parameters: Hashable { + /// maximum resources per page + public var limit: Int? + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppStoreVersionExperiments/AppStoreVersionExperiments.POST.3804a5f.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppStoreVersionExperiments/AppStoreVersionExperiments.POST.3804a5f.generated.swift index ab45dc6c..fe5b0e32 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppStoreVersionExperiments/AppStoreVersionExperiments.POST.3804a5f.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppStoreVersionExperiments/AppStoreVersionExperiments.POST.3804a5f.generated.swift @@ -42,8 +42,11 @@ extension V1.AppStoreVersionExperiments { /// - Returns: **201**, Single AppStoreVersionExperiment as `AppStoreVersionExperimentResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **422**, Unprocessable request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -57,12 +60,21 @@ extension V1.AppStoreVersionExperiments { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 409: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 422: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppStoreVersionExperiments/ById/AppStoreVersionExperimentTreatments/AppStoreVersionExperimentsByIdAppStoreVersionExperimentTreatments.GET.7c47f84.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppStoreVersionExperiments/ById/AppStoreVersionExperimentTreatments/AppStoreVersionExperimentsByIdAppStoreVersionExperimentTreatments.GET.7c47f84.generated.swift index 730b7c4e..3ce5e2e9 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppStoreVersionExperiments/ById/AppStoreVersionExperimentTreatments/AppStoreVersionExperimentsByIdAppStoreVersionExperimentTreatments.GET.7c47f84.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppStoreVersionExperiments/ById/AppStoreVersionExperimentTreatments/AppStoreVersionExperimentsByIdAppStoreVersionExperimentTreatments.GET.7c47f84.generated.swift @@ -53,8 +53,10 @@ extension V1.AppStoreVersionExperiments.ById.AppStoreVersionExperimentTreatments /// - Returns: **200**, List of AppStoreVersionExperimentTreatments as `AppStoreVersionExperimentTreatmentsResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -68,12 +70,18 @@ extension V1.AppStoreVersionExperiments.ById.AppStoreVersionExperimentTreatments case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 404: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -99,123 +107,131 @@ extension V1.AppStoreVersionExperiments.ById.AppStoreVersionExperimentTreatments private var values: [AnyHashable: AnyHashable] = [:] - public enum AppStoreVersionExperimentTreatmentLocalizations: Hashable, Codable, RawRepresentable { - case appPreviewSets - case appScreenshotSets - case appStoreVersionExperimentTreatment - case locale - case unknown(String) + public struct AppStoreVersionExperimentTreatmentLocalizations: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var appPreviewSets: Self { + .init(rawValue: "appPreviewSets") + } + + public static var appScreenshotSets: Self { + .init(rawValue: "appScreenshotSets") + } - public var rawValue: String { - switch self { - case .appPreviewSets: return "appPreviewSets" - case .appScreenshotSets: return "appScreenshotSets" - case .appStoreVersionExperimentTreatment: return "appStoreVersionExperimentTreatment" - case .locale: return "locale" - case .unknown(let rawValue): return rawValue - } + public static var appStoreVersionExperimentTreatment: Self { + .init(rawValue: "appStoreVersionExperimentTreatment") } + public static var locale: Self { + .init(rawValue: "locale") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "appPreviewSets": self = .appPreviewSets - case "appScreenshotSets": self = .appScreenshotSets - case "appStoreVersionExperimentTreatment": self = .appStoreVersionExperimentTreatment - case "locale": self = .locale - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum AppStoreVersionExperimentTreatments: Hashable, Codable, RawRepresentable { - case appIcon - case appIconName - case appStoreVersionExperiment - case appStoreVersionExperimentTreatmentLocalizations - case appStoreVersionExperimentV2 - case name - case promotedDate - case unknown(String) - - public var rawValue: String { - switch self { - case .appIcon: return "appIcon" - case .appIconName: return "appIconName" - case .appStoreVersionExperiment: return "appStoreVersionExperiment" - case .appStoreVersionExperimentTreatmentLocalizations: return "appStoreVersionExperimentTreatmentLocalizations" - case .appStoreVersionExperimentV2: return "appStoreVersionExperimentV2" - case .name: return "name" - case .promotedDate: return "promotedDate" - case .unknown(let rawValue): return rawValue - } + public struct AppStoreVersionExperimentTreatments: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var appIcon: Self { + .init(rawValue: "appIcon") + } + + public static var appIconName: Self { + .init(rawValue: "appIconName") + } + + public static var appStoreVersionExperiment: Self { + .init(rawValue: "appStoreVersionExperiment") + } + + public static var appStoreVersionExperimentTreatmentLocalizations: Self { + .init(rawValue: "appStoreVersionExperimentTreatmentLocalizations") + } + + public static var appStoreVersionExperimentV2: Self { + .init(rawValue: "appStoreVersionExperimentV2") + } + + public static var name: Self { + .init(rawValue: "name") } + public static var promotedDate: Self { + .init(rawValue: "promotedDate") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "appIcon": self = .appIcon - case "appIconName": self = .appIconName - case "appStoreVersionExperiment": self = .appStoreVersionExperiment - case "appStoreVersionExperimentTreatmentLocalizations": self = .appStoreVersionExperimentTreatmentLocalizations - case "appStoreVersionExperimentV2": self = .appStoreVersionExperimentV2 - case "name": self = .name - case "promotedDate": self = .promotedDate - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum AppStoreVersionExperiments: Hashable, Codable, RawRepresentable { - case app - case appStoreVersion - case appStoreVersionExperimentTreatments - case controlVersions - case endDate - case latestControlVersion - case name - case platform - case reviewRequired - case startDate - case started - case state - case trafficProportion - case unknown(String) - - public var rawValue: String { - switch self { - case .app: return "app" - case .appStoreVersion: return "appStoreVersion" - case .appStoreVersionExperimentTreatments: return "appStoreVersionExperimentTreatments" - case .controlVersions: return "controlVersions" - case .endDate: return "endDate" - case .latestControlVersion: return "latestControlVersion" - case .name: return "name" - case .platform: return "platform" - case .reviewRequired: return "reviewRequired" - case .startDate: return "startDate" - case .started: return "started" - case .state: return "state" - case .trafficProportion: return "trafficProportion" - case .unknown(let rawValue): return rawValue - } + public struct AppStoreVersionExperiments: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var app: Self { + .init(rawValue: "app") + } + + public static var appStoreVersion: Self { + .init(rawValue: "appStoreVersion") + } + + public static var appStoreVersionExperimentTreatments: Self { + .init(rawValue: "appStoreVersionExperimentTreatments") + } + + public static var controlVersions: Self { + .init(rawValue: "controlVersions") + } + + public static var endDate: Self { + .init(rawValue: "endDate") + } + + public static var latestControlVersion: Self { + .init(rawValue: "latestControlVersion") + } + + public static var name: Self { + .init(rawValue: "name") + } + + public static var platform: Self { + .init(rawValue: "platform") + } + + public static var reviewRequired: Self { + .init(rawValue: "reviewRequired") + } + + public static var startDate: Self { + .init(rawValue: "startDate") } + public static var state: Self { + .init(rawValue: "state") + } + + public static var trafficProportion: Self { + .init(rawValue: "trafficProportion") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "app": self = .app - case "appStoreVersion": self = .appStoreVersion - case "appStoreVersionExperimentTreatments": self = .appStoreVersionExperimentTreatments - case "controlVersions": self = .controlVersions - case "endDate": self = .endDate - case "latestControlVersion": self = .latestControlVersion - case "name": self = .name - case "platform": self = .platform - case "reviewRequired": self = .reviewRequired - case "startDate": self = .startDate - case "started": self = .started - case "state": self = .state - case "trafficProportion": self = .trafficProportion - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } @@ -243,28 +259,27 @@ extension V1.AppStoreVersionExperiments.ById.AppStoreVersionExperimentTreatments } } - public enum Include: Hashable, Codable, RawRepresentable { - case appStoreVersionExperiment - case appStoreVersionExperimentTreatmentLocalizations - case appStoreVersionExperimentV2 - case unknown(String) + public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var appStoreVersionExperiment: Self { + .init(rawValue: "appStoreVersionExperiment") + } - public var rawValue: String { - switch self { - case .appStoreVersionExperiment: return "appStoreVersionExperiment" - case .appStoreVersionExperimentTreatmentLocalizations: return "appStoreVersionExperimentTreatmentLocalizations" - case .appStoreVersionExperimentV2: return "appStoreVersionExperimentV2" - case .unknown(let rawValue): return rawValue - } + public static var appStoreVersionExperimentTreatmentLocalizations: Self { + .init(rawValue: "appStoreVersionExperimentTreatmentLocalizations") + } + + public static var appStoreVersionExperimentV2: Self { + .init(rawValue: "appStoreVersionExperimentV2") } + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "appStoreVersionExperiment": self = .appStoreVersionExperiment - case "appStoreVersionExperimentTreatmentLocalizations": self = .appStoreVersionExperimentTreatmentLocalizations - case "appStoreVersionExperimentV2": self = .appStoreVersionExperimentV2 - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppStoreVersionExperiments/ById/AppStoreVersionExperimentsById.DELETE.1b9917e.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppStoreVersionExperiments/ById/AppStoreVersionExperimentsById.DELETE.1b9917e.generated.swift index b82dfbf1..dc020b2c 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppStoreVersionExperiments/ById/AppStoreVersionExperimentsById.DELETE.1b9917e.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppStoreVersionExperiments/ById/AppStoreVersionExperimentsById.DELETE.1b9917e.generated.swift @@ -32,11 +32,12 @@ extension V1.AppStoreVersionExperiments.ById { return urlRequest } - /// - Returns: **204**, Success (no content) /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -44,12 +45,12 @@ extension V1.AppStoreVersionExperiments.ById { } switch urlResponse.statusCode { - case 204: - return - case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) @@ -59,6 +60,9 @@ extension V1.AppStoreVersionExperiments.ById { case 409: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppStoreVersionExperiments/ById/AppStoreVersionExperimentsById.GET.1b9917e.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppStoreVersionExperiments/ById/AppStoreVersionExperimentsById.GET.1b9917e.generated.swift index c490cbd9..f0fae8b7 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppStoreVersionExperiments/ById/AppStoreVersionExperimentsById.GET.1b9917e.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppStoreVersionExperiments/ById/AppStoreVersionExperimentsById.GET.1b9917e.generated.swift @@ -49,8 +49,10 @@ extension V1.AppStoreVersionExperiments.ById { /// - Returns: **200**, Single AppStoreVersionExperiment as `AppStoreVersionExperimentResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -64,12 +66,18 @@ extension V1.AppStoreVersionExperiments.ById { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 404: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -94,83 +102,87 @@ extension V1.AppStoreVersionExperiments.ById.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum AppStoreVersionExperimentTreatments: Hashable, Codable, RawRepresentable { - case appIcon - case appIconName - case appStoreVersionExperiment - case appStoreVersionExperimentTreatmentLocalizations - case appStoreVersionExperimentV2 - case name - case promotedDate - case unknown(String) - - public var rawValue: String { - switch self { - case .appIcon: return "appIcon" - case .appIconName: return "appIconName" - case .appStoreVersionExperiment: return "appStoreVersionExperiment" - case .appStoreVersionExperimentTreatmentLocalizations: return "appStoreVersionExperimentTreatmentLocalizations" - case .appStoreVersionExperimentV2: return "appStoreVersionExperimentV2" - case .name: return "name" - case .promotedDate: return "promotedDate" - case .unknown(let rawValue): return rawValue - } + public struct AppStoreVersionExperimentTreatments: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var appIcon: Self { + .init(rawValue: "appIcon") + } + + public static var appIconName: Self { + .init(rawValue: "appIconName") } + public static var appStoreVersionExperiment: Self { + .init(rawValue: "appStoreVersionExperiment") + } + + public static var appStoreVersionExperimentTreatmentLocalizations: Self { + .init(rawValue: "appStoreVersionExperimentTreatmentLocalizations") + } + + public static var appStoreVersionExperimentV2: Self { + .init(rawValue: "appStoreVersionExperimentV2") + } + + public static var name: Self { + .init(rawValue: "name") + } + + public static var promotedDate: Self { + .init(rawValue: "promotedDate") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "appIcon": self = .appIcon - case "appIconName": self = .appIconName - case "appStoreVersionExperiment": self = .appStoreVersionExperiment - case "appStoreVersionExperimentTreatmentLocalizations": self = .appStoreVersionExperimentTreatmentLocalizations - case "appStoreVersionExperimentV2": self = .appStoreVersionExperimentV2 - case "name": self = .name - case "promotedDate": self = .promotedDate - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum AppStoreVersionExperiments: Hashable, Codable, RawRepresentable { - case appStoreVersion - case appStoreVersionExperimentTreatments - case endDate - case name - case reviewRequired - case startDate - case started - case state - case trafficProportion - case unknown(String) - - public var rawValue: String { - switch self { - case .appStoreVersion: return "appStoreVersion" - case .appStoreVersionExperimentTreatments: return "appStoreVersionExperimentTreatments" - case .endDate: return "endDate" - case .name: return "name" - case .reviewRequired: return "reviewRequired" - case .startDate: return "startDate" - case .started: return "started" - case .state: return "state" - case .trafficProportion: return "trafficProportion" - case .unknown(let rawValue): return rawValue - } + public struct AppStoreVersionExperiments: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var appStoreVersion: Self { + .init(rawValue: "appStoreVersion") + } + + public static var appStoreVersionExperimentTreatments: Self { + .init(rawValue: "appStoreVersionExperimentTreatments") } + public static var endDate: Self { + .init(rawValue: "endDate") + } + + public static var name: Self { + .init(rawValue: "name") + } + + public static var reviewRequired: Self { + .init(rawValue: "reviewRequired") + } + + public static var startDate: Self { + .init(rawValue: "startDate") + } + + public static var state: Self { + .init(rawValue: "state") + } + + public static var trafficProportion: Self { + .init(rawValue: "trafficProportion") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "appStoreVersion": self = .appStoreVersion - case "appStoreVersionExperimentTreatments": self = .appStoreVersionExperimentTreatments - case "endDate": self = .endDate - case "name": self = .name - case "reviewRequired": self = .reviewRequired - case "startDate": self = .startDate - case "started": self = .started - case "state": self = .state - case "trafficProportion": self = .trafficProportion - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } @@ -193,25 +205,23 @@ extension V1.AppStoreVersionExperiments.ById.GET { } } - public enum Include: Hashable, Codable, RawRepresentable { - case appStoreVersion - case appStoreVersionExperimentTreatments - case unknown(String) + public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var appStoreVersion: Self { + .init(rawValue: "appStoreVersion") + } + + public static var appStoreVersionExperimentTreatments: Self { + .init(rawValue: "appStoreVersionExperimentTreatments") + } - public var rawValue: String { - switch self { - case .appStoreVersion: return "appStoreVersion" - case .appStoreVersionExperimentTreatments: return "appStoreVersionExperimentTreatments" - case .unknown(let rawValue): return rawValue - } + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "appStoreVersion": self = .appStoreVersion - case "appStoreVersionExperimentTreatments": self = .appStoreVersionExperimentTreatments - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppStoreVersionExperiments/ById/AppStoreVersionExperimentsById.PATCH.1b9917e.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppStoreVersionExperiments/ById/AppStoreVersionExperimentsById.PATCH.1b9917e.generated.swift index 8cc0891f..16393586 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppStoreVersionExperiments/ById/AppStoreVersionExperimentsById.PATCH.1b9917e.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppStoreVersionExperiments/ById/AppStoreVersionExperimentsById.PATCH.1b9917e.generated.swift @@ -49,9 +49,12 @@ extension V1.AppStoreVersionExperiments.ById { /// - Returns: **200**, Single AppStoreVersionExperiment as `AppStoreVersionExperimentResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **422**, Unprocessable request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -65,6 +68,9 @@ extension V1.AppStoreVersionExperiments.ById { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) @@ -74,6 +80,12 @@ extension V1.AppStoreVersionExperiments.ById { case 409: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 422: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppStoreVersionExperiments/ById/Relationships/AppStoreVersionExperimentTreatments/AppStoreVersionExperimentsByIdRelationshipsAppStoreVersionExperimentTreatments.GET.5ffc3b8.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppStoreVersionExperiments/ById/Relationships/AppStoreVersionExperimentTreatments/AppStoreVersionExperimentsByIdRelationshipsAppStoreVersionExperimentTreatments.GET.5ffc3b8.generated.swift new file mode 100644 index 00000000..afa277ba --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppStoreVersionExperiments/ById/Relationships/AppStoreVersionExperimentTreatments/AppStoreVersionExperimentsByIdRelationshipsAppStoreVersionExperimentTreatments.GET.5ffc3b8.generated.swift @@ -0,0 +1,89 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.AppStoreVersionExperiments.ById.Relationships.AppStoreVersionExperimentTreatments { + @available(*, deprecated) + public struct GET: Endpoint { + public typealias Response = AppStoreVersionExperimentAppStoreVersionExperimentTreatmentsLinkagesResponse + + public var path: String { + "/v1/appStoreVersionExperiments/\(id)/relationships/appStoreVersionExperimentTreatments" + } + + /// the id of the requested resource + public var id: String + + public var parameters: Parameters = Parameters() + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + components?.queryItems = [ + URLQueryItem(name: "limit", + value: parameters.limit.map { "\($0)" }) + ].filter { $0.value != nil } + if components?.queryItems?.isEmpty ?? false { + components?.queryItems = nil + } + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "GET" + return urlRequest + } + + /// - Returns: **200**, List of related linkages as `AppStoreVersionExperimentAppStoreVersionExperimentTreatmentsLinkagesResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(AppStoreVersionExperimentAppStoreVersionExperimentTreatmentsLinkagesResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +extension V1.AppStoreVersionExperiments.ById.Relationships.AppStoreVersionExperimentTreatments.GET { + public struct Parameters: Hashable { + /// maximum resources per page + public var limit: Int? + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppStoreVersionLocalizations/AppStoreVersionLocalizations.POST.ea9eac7.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppStoreVersionLocalizations/AppStoreVersionLocalizations.POST.ea9eac7.generated.swift index 800799c7..eddca1a5 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppStoreVersionLocalizations/AppStoreVersionLocalizations.POST.ea9eac7.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppStoreVersionLocalizations/AppStoreVersionLocalizations.POST.ea9eac7.generated.swift @@ -41,8 +41,11 @@ extension V1.AppStoreVersionLocalizations { /// - Returns: **201**, Single AppStoreVersionLocalization as `AppStoreVersionLocalizationResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **422**, Unprocessable request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -56,12 +59,21 @@ extension V1.AppStoreVersionLocalizations { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 409: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 422: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppStoreVersionLocalizations/ById/AppPreviewSets/AppStoreVersionLocalizationsByIdAppPreviewSets.GET.9dc3d45.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppStoreVersionLocalizations/ById/AppPreviewSets/AppStoreVersionLocalizationsByIdAppPreviewSets.GET.9dc3d45.generated.swift index 113386fe..219474c1 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppStoreVersionLocalizations/ById/AppPreviewSets/AppStoreVersionLocalizationsByIdAppPreviewSets.GET.9dc3d45.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppStoreVersionLocalizations/ById/AppPreviewSets/AppStoreVersionLocalizationsByIdAppPreviewSets.GET.9dc3d45.generated.swift @@ -62,8 +62,10 @@ extension V1.AppStoreVersionLocalizations.ById.AppPreviewSets { /// - Returns: **200**, List of AppPreviewSets as `AppPreviewSetsResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -77,12 +79,18 @@ extension V1.AppStoreVersionLocalizations.ById.AppPreviewSets { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 404: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -110,188 +118,207 @@ extension V1.AppStoreVersionLocalizations.ById.AppPreviewSets.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum AppCustomProductPageLocalizations: Hashable, Codable, RawRepresentable { - case appCustomProductPageVersion - case appPreviewSets - case appScreenshotSets - case locale - case promotionalText - case unknown(String) - - public var rawValue: String { - switch self { - case .appCustomProductPageVersion: return "appCustomProductPageVersion" - case .appPreviewSets: return "appPreviewSets" - case .appScreenshotSets: return "appScreenshotSets" - case .locale: return "locale" - case .promotionalText: return "promotionalText" - case .unknown(let rawValue): return rawValue - } + public struct AppCustomProductPageLocalizations: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var appCustomProductPageVersion: Self { + .init(rawValue: "appCustomProductPageVersion") + } + + public static var appPreviewSets: Self { + .init(rawValue: "appPreviewSets") + } + + public static var appScreenshotSets: Self { + .init(rawValue: "appScreenshotSets") } + public static var locale: Self { + .init(rawValue: "locale") + } + + public static var promotionalText: Self { + .init(rawValue: "promotionalText") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "appCustomProductPageVersion": self = .appCustomProductPageVersion - case "appPreviewSets": self = .appPreviewSets - case "appScreenshotSets": self = .appScreenshotSets - case "locale": self = .locale - case "promotionalText": self = .promotionalText - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum AppPreviewSets: Hashable, Codable, RawRepresentable { - case appCustomProductPageLocalization - case appPreviews - case appStoreVersionExperimentTreatmentLocalization - case appStoreVersionLocalization - case previewType - case unknown(String) - - public var rawValue: String { - switch self { - case .appCustomProductPageLocalization: return "appCustomProductPageLocalization" - case .appPreviews: return "appPreviews" - case .appStoreVersionExperimentTreatmentLocalization: return "appStoreVersionExperimentTreatmentLocalization" - case .appStoreVersionLocalization: return "appStoreVersionLocalization" - case .previewType: return "previewType" - case .unknown(let rawValue): return rawValue - } + public struct AppPreviewSets: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var appCustomProductPageLocalization: Self { + .init(rawValue: "appCustomProductPageLocalization") } + public static var appPreviews: Self { + .init(rawValue: "appPreviews") + } + + public static var appStoreVersionExperimentTreatmentLocalization: Self { + .init(rawValue: "appStoreVersionExperimentTreatmentLocalization") + } + + public static var appStoreVersionLocalization: Self { + .init(rawValue: "appStoreVersionLocalization") + } + + public static var previewType: Self { + .init(rawValue: "previewType") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "appCustomProductPageLocalization": self = .appCustomProductPageLocalization - case "appPreviews": self = .appPreviews - case "appStoreVersionExperimentTreatmentLocalization": self = .appStoreVersionExperimentTreatmentLocalization - case "appStoreVersionLocalization": self = .appStoreVersionLocalization - case "previewType": self = .previewType - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum AppPreviews: Hashable, Codable, RawRepresentable { - case appPreviewSet - case assetDeliveryState - case fileName - case fileSize - case mimeType - case previewFrameTimeCode - case previewImage - case sourceFileChecksum - case uploadOperations - case uploaded - case videoUrl - case unknown(String) - - public var rawValue: String { - switch self { - case .appPreviewSet: return "appPreviewSet" - case .assetDeliveryState: return "assetDeliveryState" - case .fileName: return "fileName" - case .fileSize: return "fileSize" - case .mimeType: return "mimeType" - case .previewFrameTimeCode: return "previewFrameTimeCode" - case .previewImage: return "previewImage" - case .sourceFileChecksum: return "sourceFileChecksum" - case .uploadOperations: return "uploadOperations" - case .uploaded: return "uploaded" - case .videoUrl: return "videoUrl" - case .unknown(let rawValue): return rawValue - } + public struct AppPreviews: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var appPreviewSet: Self { + .init(rawValue: "appPreviewSet") + } + + public static var assetDeliveryState: Self { + .init(rawValue: "assetDeliveryState") + } + + public static var fileName: Self { + .init(rawValue: "fileName") + } + + public static var fileSize: Self { + .init(rawValue: "fileSize") + } + + public static var mimeType: Self { + .init(rawValue: "mimeType") + } + + public static var previewFrameImage: Self { + .init(rawValue: "previewFrameImage") + } + + public static var previewFrameTimeCode: Self { + .init(rawValue: "previewFrameTimeCode") + } + + public static var previewImage: Self { + .init(rawValue: "previewImage") + } + + public static var sourceFileChecksum: Self { + .init(rawValue: "sourceFileChecksum") + } + + public static var uploadOperations: Self { + .init(rawValue: "uploadOperations") + } + + public static var videoDeliveryState: Self { + .init(rawValue: "videoDeliveryState") } + public static var videoUrl: Self { + .init(rawValue: "videoUrl") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "appPreviewSet": self = .appPreviewSet - case "assetDeliveryState": self = .assetDeliveryState - case "fileName": self = .fileName - case "fileSize": self = .fileSize - case "mimeType": self = .mimeType - case "previewFrameTimeCode": self = .previewFrameTimeCode - case "previewImage": self = .previewImage - case "sourceFileChecksum": self = .sourceFileChecksum - case "uploadOperations": self = .uploadOperations - case "uploaded": self = .uploaded - case "videoUrl": self = .videoUrl - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum AppStoreVersionExperimentTreatmentLocalizations: Hashable, Codable, RawRepresentable { - case appPreviewSets - case appScreenshotSets - case appStoreVersionExperimentTreatment - case locale - case unknown(String) + public struct AppStoreVersionExperimentTreatmentLocalizations: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var appPreviewSets: Self { + .init(rawValue: "appPreviewSets") + } + + public static var appScreenshotSets: Self { + .init(rawValue: "appScreenshotSets") + } - public var rawValue: String { - switch self { - case .appPreviewSets: return "appPreviewSets" - case .appScreenshotSets: return "appScreenshotSets" - case .appStoreVersionExperimentTreatment: return "appStoreVersionExperimentTreatment" - case .locale: return "locale" - case .unknown(let rawValue): return rawValue - } + public static var appStoreVersionExperimentTreatment: Self { + .init(rawValue: "appStoreVersionExperimentTreatment") } + public static var locale: Self { + .init(rawValue: "locale") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "appPreviewSets": self = .appPreviewSets - case "appScreenshotSets": self = .appScreenshotSets - case "appStoreVersionExperimentTreatment": self = .appStoreVersionExperimentTreatment - case "locale": self = .locale - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum AppStoreVersionLocalizations: Hashable, Codable, RawRepresentable { - case appPreviewSets - case appScreenshotSets - case appStoreVersion - case description - case keywords - case locale - case marketingUrl - case promotionalText - case supportUrl - case whatsNew - case unknown(String) - - public var rawValue: String { - switch self { - case .appPreviewSets: return "appPreviewSets" - case .appScreenshotSets: return "appScreenshotSets" - case .appStoreVersion: return "appStoreVersion" - case .description: return "description" - case .keywords: return "keywords" - case .locale: return "locale" - case .marketingUrl: return "marketingUrl" - case .promotionalText: return "promotionalText" - case .supportUrl: return "supportUrl" - case .whatsNew: return "whatsNew" - case .unknown(let rawValue): return rawValue - } + public struct AppStoreVersionLocalizations: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var appPreviewSets: Self { + .init(rawValue: "appPreviewSets") + } + + public static var appScreenshotSets: Self { + .init(rawValue: "appScreenshotSets") + } + + public static var appStoreVersion: Self { + .init(rawValue: "appStoreVersion") + } + + public static var description: Self { + .init(rawValue: "description") + } + + public static var keywords: Self { + .init(rawValue: "keywords") + } + + public static var locale: Self { + .init(rawValue: "locale") + } + + public static var marketingUrl: Self { + .init(rawValue: "marketingUrl") + } + + public static var promotionalText: Self { + .init(rawValue: "promotionalText") + } + + public static var supportUrl: Self { + .init(rawValue: "supportUrl") + } + + public static var whatsNew: Self { + .init(rawValue: "whatsNew") } + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "appPreviewSets": self = .appPreviewSets - case "appScreenshotSets": self = .appScreenshotSets - case "appStoreVersion": self = .appStoreVersion - case "description": self = .description - case "keywords": self = .keywords - case "locale": self = .locale - case "marketingUrl": self = .marketingUrl - case "promotionalText": self = .promotionalText - case "supportUrl": self = .supportUrl - case "whatsNew": self = .whatsNew - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } @@ -337,64 +364,79 @@ extension V1.AppStoreVersionLocalizations.ById.AppPreviewSets.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum PreviewType: Hashable, Codable, RawRepresentable { - case appleTv - case desktop - case ipad105 - case ipad97 - case ipadPro129 - case ipadPro3Gen11 - case ipadPro3Gen129 - case iphone35 - case iphone40 - case iphone47 - case iphone55 - case iphone58 - case iphone61 - case iphone65 - case iphone67 - case unknown(String) - - public var rawValue: String { - switch self { - case .appleTv: return "APPLE_TV" - case .desktop: return "DESKTOP" - case .ipad105: return "IPAD_105" - case .ipad97: return "IPAD_97" - case .ipadPro129: return "IPAD_PRO_129" - case .ipadPro3Gen11: return "IPAD_PRO_3GEN_11" - case .ipadPro3Gen129: return "IPAD_PRO_3GEN_129" - case .iphone35: return "IPHONE_35" - case .iphone40: return "IPHONE_40" - case .iphone47: return "IPHONE_47" - case .iphone55: return "IPHONE_55" - case .iphone58: return "IPHONE_58" - case .iphone61: return "IPHONE_61" - case .iphone65: return "IPHONE_65" - case .iphone67: return "IPHONE_67" - case .unknown(let rawValue): return rawValue - } + public struct PreviewType: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var appleTv: Self { + .init(rawValue: "APPLE_TV") + } + + public static var appleVisionPro: Self { + .init(rawValue: "APPLE_VISION_PRO") + } + + public static var desktop: Self { + .init(rawValue: "DESKTOP") + } + + public static var ipad105: Self { + .init(rawValue: "IPAD_105") + } + + public static var ipad97: Self { + .init(rawValue: "IPAD_97") + } + + public static var ipadPro129: Self { + .init(rawValue: "IPAD_PRO_129") + } + + public static var ipadPro3Gen11: Self { + .init(rawValue: "IPAD_PRO_3GEN_11") + } + + public static var ipadPro3Gen129: Self { + .init(rawValue: "IPAD_PRO_3GEN_129") + } + + public static var iphone35: Self { + .init(rawValue: "IPHONE_35") + } + + public static var iphone40: Self { + .init(rawValue: "IPHONE_40") + } + + public static var iphone47: Self { + .init(rawValue: "IPHONE_47") + } + + public static var iphone55: Self { + .init(rawValue: "IPHONE_55") + } + + public static var iphone58: Self { + .init(rawValue: "IPHONE_58") + } + + public static var iphone61: Self { + .init(rawValue: "IPHONE_61") + } + + public static var iphone65: Self { + .init(rawValue: "IPHONE_65") } + public static var iphone67: Self { + .init(rawValue: "IPHONE_67") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "APPLE_TV": self = .appleTv - case "DESKTOP": self = .desktop - case "IPAD_105": self = .ipad105 - case "IPAD_97": self = .ipad97 - case "IPAD_PRO_129": self = .ipadPro129 - case "IPAD_PRO_3GEN_11": self = .ipadPro3Gen11 - case "IPAD_PRO_3GEN_129": self = .ipadPro3Gen129 - case "IPHONE_35": self = .iphone35 - case "IPHONE_40": self = .iphone40 - case "IPHONE_47": self = .iphone47 - case "IPHONE_55": self = .iphone55 - case "IPHONE_58": self = .iphone58 - case "IPHONE_61": self = .iphone61 - case "IPHONE_65": self = .iphone65 - case "IPHONE_67": self = .iphone67 - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } @@ -422,31 +464,31 @@ extension V1.AppStoreVersionLocalizations.ById.AppPreviewSets.GET { } } - public enum Include: Hashable, Codable, RawRepresentable { - case appCustomProductPageLocalization - case appPreviews - case appStoreVersionExperimentTreatmentLocalization - case appStoreVersionLocalization - case unknown(String) - - public var rawValue: String { - switch self { - case .appCustomProductPageLocalization: return "appCustomProductPageLocalization" - case .appPreviews: return "appPreviews" - case .appStoreVersionExperimentTreatmentLocalization: return "appStoreVersionExperimentTreatmentLocalization" - case .appStoreVersionLocalization: return "appStoreVersionLocalization" - case .unknown(let rawValue): return rawValue - } + public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var appCustomProductPageLocalization: Self { + .init(rawValue: "appCustomProductPageLocalization") + } + + public static var appPreviews: Self { + .init(rawValue: "appPreviews") } + public static var appStoreVersionExperimentTreatmentLocalization: Self { + .init(rawValue: "appStoreVersionExperimentTreatmentLocalization") + } + + public static var appStoreVersionLocalization: Self { + .init(rawValue: "appStoreVersionLocalization") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "appCustomProductPageLocalization": self = .appCustomProductPageLocalization - case "appPreviews": self = .appPreviews - case "appStoreVersionExperimentTreatmentLocalization": self = .appStoreVersionExperimentTreatmentLocalization - case "appStoreVersionLocalization": self = .appStoreVersionLocalization - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppStoreVersionLocalizations/ById/AppScreenshotSets/AppStoreVersionLocalizationsByIdAppScreenshotSets.GET.468d156.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppStoreVersionLocalizations/ById/AppScreenshotSets/AppStoreVersionLocalizationsByIdAppScreenshotSets.GET.468d156.generated.swift index 64e7eb74..07dc4568 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppStoreVersionLocalizations/ById/AppScreenshotSets/AppStoreVersionLocalizationsByIdAppScreenshotSets.GET.468d156.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppStoreVersionLocalizations/ById/AppScreenshotSets/AppStoreVersionLocalizationsByIdAppScreenshotSets.GET.468d156.generated.swift @@ -62,8 +62,10 @@ extension V1.AppStoreVersionLocalizations.ById.AppScreenshotSets { /// - Returns: **200**, List of AppScreenshotSets as `AppScreenshotSetsResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -77,12 +79,18 @@ extension V1.AppStoreVersionLocalizations.ById.AppScreenshotSets { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 404: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -110,185 +118,195 @@ extension V1.AppStoreVersionLocalizations.ById.AppScreenshotSets.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum AppCustomProductPageLocalizations: Hashable, Codable, RawRepresentable { - case appCustomProductPageVersion - case appPreviewSets - case appScreenshotSets - case locale - case promotionalText - case unknown(String) - - public var rawValue: String { - switch self { - case .appCustomProductPageVersion: return "appCustomProductPageVersion" - case .appPreviewSets: return "appPreviewSets" - case .appScreenshotSets: return "appScreenshotSets" - case .locale: return "locale" - case .promotionalText: return "promotionalText" - case .unknown(let rawValue): return rawValue - } + public struct AppCustomProductPageLocalizations: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var appCustomProductPageVersion: Self { + .init(rawValue: "appCustomProductPageVersion") + } + + public static var appPreviewSets: Self { + .init(rawValue: "appPreviewSets") + } + + public static var appScreenshotSets: Self { + .init(rawValue: "appScreenshotSets") + } + + public static var locale: Self { + .init(rawValue: "locale") } + public static var promotionalText: Self { + .init(rawValue: "promotionalText") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "appCustomProductPageVersion": self = .appCustomProductPageVersion - case "appPreviewSets": self = .appPreviewSets - case "appScreenshotSets": self = .appScreenshotSets - case "locale": self = .locale - case "promotionalText": self = .promotionalText - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum AppScreenshotSets: Hashable, Codable, RawRepresentable { - case appCustomProductPageLocalization - case appScreenshots - case appStoreVersionExperimentTreatmentLocalization - case appStoreVersionLocalization - case screenshotDisplayType - case unknown(String) - - public var rawValue: String { - switch self { - case .appCustomProductPageLocalization: return "appCustomProductPageLocalization" - case .appScreenshots: return "appScreenshots" - case .appStoreVersionExperimentTreatmentLocalization: return "appStoreVersionExperimentTreatmentLocalization" - case .appStoreVersionLocalization: return "appStoreVersionLocalization" - case .screenshotDisplayType: return "screenshotDisplayType" - case .unknown(let rawValue): return rawValue - } + public struct AppScreenshotSets: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var appCustomProductPageLocalization: Self { + .init(rawValue: "appCustomProductPageLocalization") + } + + public static var appScreenshots: Self { + .init(rawValue: "appScreenshots") + } + + public static var appStoreVersionExperimentTreatmentLocalization: Self { + .init(rawValue: "appStoreVersionExperimentTreatmentLocalization") } + public static var appStoreVersionLocalization: Self { + .init(rawValue: "appStoreVersionLocalization") + } + + public static var screenshotDisplayType: Self { + .init(rawValue: "screenshotDisplayType") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "appCustomProductPageLocalization": self = .appCustomProductPageLocalization - case "appScreenshots": self = .appScreenshots - case "appStoreVersionExperimentTreatmentLocalization": self = .appStoreVersionExperimentTreatmentLocalization - case "appStoreVersionLocalization": self = .appStoreVersionLocalization - case "screenshotDisplayType": self = .screenshotDisplayType - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum AppScreenshots: Hashable, Codable, RawRepresentable { - case appScreenshotSet - case assetDeliveryState - case assetToken - case assetType - case fileName - case fileSize - case imageAsset - case sourceFileChecksum - case uploadOperations - case uploaded - case unknown(String) - - public var rawValue: String { - switch self { - case .appScreenshotSet: return "appScreenshotSet" - case .assetDeliveryState: return "assetDeliveryState" - case .assetToken: return "assetToken" - case .assetType: return "assetType" - case .fileName: return "fileName" - case .fileSize: return "fileSize" - case .imageAsset: return "imageAsset" - case .sourceFileChecksum: return "sourceFileChecksum" - case .uploadOperations: return "uploadOperations" - case .uploaded: return "uploaded" - case .unknown(let rawValue): return rawValue - } + public struct AppScreenshots: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var appScreenshotSet: Self { + .init(rawValue: "appScreenshotSet") + } + + public static var assetDeliveryState: Self { + .init(rawValue: "assetDeliveryState") + } + + public static var assetToken: Self { + .init(rawValue: "assetToken") + } + + public static var assetType: Self { + .init(rawValue: "assetType") + } + + public static var fileName: Self { + .init(rawValue: "fileName") + } + + public static var fileSize: Self { + .init(rawValue: "fileSize") + } + + public static var imageAsset: Self { + .init(rawValue: "imageAsset") } + public static var sourceFileChecksum: Self { + .init(rawValue: "sourceFileChecksum") + } + + public static var uploadOperations: Self { + .init(rawValue: "uploadOperations") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "appScreenshotSet": self = .appScreenshotSet - case "assetDeliveryState": self = .assetDeliveryState - case "assetToken": self = .assetToken - case "assetType": self = .assetType - case "fileName": self = .fileName - case "fileSize": self = .fileSize - case "imageAsset": self = .imageAsset - case "sourceFileChecksum": self = .sourceFileChecksum - case "uploadOperations": self = .uploadOperations - case "uploaded": self = .uploaded - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum AppStoreVersionExperimentTreatmentLocalizations: Hashable, Codable, RawRepresentable { - case appPreviewSets - case appScreenshotSets - case appStoreVersionExperimentTreatment - case locale - case unknown(String) + public struct AppStoreVersionExperimentTreatmentLocalizations: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var appPreviewSets: Self { + .init(rawValue: "appPreviewSets") + } + + public static var appScreenshotSets: Self { + .init(rawValue: "appScreenshotSets") + } - public var rawValue: String { - switch self { - case .appPreviewSets: return "appPreviewSets" - case .appScreenshotSets: return "appScreenshotSets" - case .appStoreVersionExperimentTreatment: return "appStoreVersionExperimentTreatment" - case .locale: return "locale" - case .unknown(let rawValue): return rawValue - } + public static var appStoreVersionExperimentTreatment: Self { + .init(rawValue: "appStoreVersionExperimentTreatment") } + public static var locale: Self { + .init(rawValue: "locale") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "appPreviewSets": self = .appPreviewSets - case "appScreenshotSets": self = .appScreenshotSets - case "appStoreVersionExperimentTreatment": self = .appStoreVersionExperimentTreatment - case "locale": self = .locale - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum AppStoreVersionLocalizations: Hashable, Codable, RawRepresentable { - case appPreviewSets - case appScreenshotSets - case appStoreVersion - case description - case keywords - case locale - case marketingUrl - case promotionalText - case supportUrl - case whatsNew - case unknown(String) - - public var rawValue: String { - switch self { - case .appPreviewSets: return "appPreviewSets" - case .appScreenshotSets: return "appScreenshotSets" - case .appStoreVersion: return "appStoreVersion" - case .description: return "description" - case .keywords: return "keywords" - case .locale: return "locale" - case .marketingUrl: return "marketingUrl" - case .promotionalText: return "promotionalText" - case .supportUrl: return "supportUrl" - case .whatsNew: return "whatsNew" - case .unknown(let rawValue): return rawValue - } + public struct AppStoreVersionLocalizations: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var appPreviewSets: Self { + .init(rawValue: "appPreviewSets") + } + + public static var appScreenshotSets: Self { + .init(rawValue: "appScreenshotSets") + } + + public static var appStoreVersion: Self { + .init(rawValue: "appStoreVersion") } + public static var description: Self { + .init(rawValue: "description") + } + + public static var keywords: Self { + .init(rawValue: "keywords") + } + + public static var locale: Self { + .init(rawValue: "locale") + } + + public static var marketingUrl: Self { + .init(rawValue: "marketingUrl") + } + + public static var promotionalText: Self { + .init(rawValue: "promotionalText") + } + + public static var supportUrl: Self { + .init(rawValue: "supportUrl") + } + + public static var whatsNew: Self { + .init(rawValue: "whatsNew") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "appPreviewSets": self = .appPreviewSets - case "appScreenshotSets": self = .appScreenshotSets - case "appStoreVersion": self = .appStoreVersion - case "description": self = .description - case "keywords": self = .keywords - case "locale": self = .locale - case "marketingUrl": self = .marketingUrl - case "promotionalText": self = .promotionalText - case "supportUrl": self = .supportUrl - case "whatsNew": self = .whatsNew - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } @@ -334,112 +352,147 @@ extension V1.AppStoreVersionLocalizations.ById.AppScreenshotSets.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum ScreenshotDisplayType: Hashable, Codable, RawRepresentable { - case appAppleTv - case appDesktop - case appIpad105 - case appIpad97 - case appIpadPro129 - case appIpadPro3Gen11 - case appIpadPro3Gen129 - case appIphone35 - case appIphone40 - case appIphone47 - case appIphone55 - case appIphone58 - case appIphone61 - case appIphone65 - case appIphone67 - case appWatchSeries3 - case appWatchSeries4 - case appWatchSeries7 - case appWatchUltra - case imessageAppIpad105 - case imessageAppIpad97 - case imessageAppIpadPro129 - case imessageAppIpadPro3Gen11 - case imessageAppIpadPro3Gen129 - case imessageAppIphone40 - case imessageAppIphone47 - case imessageAppIphone55 - case imessageAppIphone58 - case imessageAppIphone61 - case imessageAppIphone65 - case imessageAppIphone67 - case unknown(String) - - public var rawValue: String { - switch self { - case .appAppleTv: return "APP_APPLE_TV" - case .appDesktop: return "APP_DESKTOP" - case .appIpad105: return "APP_IPAD_105" - case .appIpad97: return "APP_IPAD_97" - case .appIpadPro129: return "APP_IPAD_PRO_129" - case .appIpadPro3Gen11: return "APP_IPAD_PRO_3GEN_11" - case .appIpadPro3Gen129: return "APP_IPAD_PRO_3GEN_129" - case .appIphone35: return "APP_IPHONE_35" - case .appIphone40: return "APP_IPHONE_40" - case .appIphone47: return "APP_IPHONE_47" - case .appIphone55: return "APP_IPHONE_55" - case .appIphone58: return "APP_IPHONE_58" - case .appIphone61: return "APP_IPHONE_61" - case .appIphone65: return "APP_IPHONE_65" - case .appIphone67: return "APP_IPHONE_67" - case .appWatchSeries3: return "APP_WATCH_SERIES_3" - case .appWatchSeries4: return "APP_WATCH_SERIES_4" - case .appWatchSeries7: return "APP_WATCH_SERIES_7" - case .appWatchUltra: return "APP_WATCH_ULTRA" - case .imessageAppIpad105: return "IMESSAGE_APP_IPAD_105" - case .imessageAppIpad97: return "IMESSAGE_APP_IPAD_97" - case .imessageAppIpadPro129: return "IMESSAGE_APP_IPAD_PRO_129" - case .imessageAppIpadPro3Gen11: return "IMESSAGE_APP_IPAD_PRO_3GEN_11" - case .imessageAppIpadPro3Gen129: return "IMESSAGE_APP_IPAD_PRO_3GEN_129" - case .imessageAppIphone40: return "IMESSAGE_APP_IPHONE_40" - case .imessageAppIphone47: return "IMESSAGE_APP_IPHONE_47" - case .imessageAppIphone55: return "IMESSAGE_APP_IPHONE_55" - case .imessageAppIphone58: return "IMESSAGE_APP_IPHONE_58" - case .imessageAppIphone61: return "IMESSAGE_APP_IPHONE_61" - case .imessageAppIphone65: return "IMESSAGE_APP_IPHONE_65" - case .imessageAppIphone67: return "IMESSAGE_APP_IPHONE_67" - case .unknown(let rawValue): return rawValue - } + public struct ScreenshotDisplayType: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var appAppleTv: Self { + .init(rawValue: "APP_APPLE_TV") + } + + public static var appAppleVisionPro: Self { + .init(rawValue: "APP_APPLE_VISION_PRO") } + public static var appDesktop: Self { + .init(rawValue: "APP_DESKTOP") + } + + public static var appIpad105: Self { + .init(rawValue: "APP_IPAD_105") + } + + public static var appIpad97: Self { + .init(rawValue: "APP_IPAD_97") + } + + public static var appIpadPro129: Self { + .init(rawValue: "APP_IPAD_PRO_129") + } + + public static var appIpadPro3Gen11: Self { + .init(rawValue: "APP_IPAD_PRO_3GEN_11") + } + + public static var appIpadPro3Gen129: Self { + .init(rawValue: "APP_IPAD_PRO_3GEN_129") + } + + public static var appIphone35: Self { + .init(rawValue: "APP_IPHONE_35") + } + + public static var appIphone40: Self { + .init(rawValue: "APP_IPHONE_40") + } + + public static var appIphone47: Self { + .init(rawValue: "APP_IPHONE_47") + } + + public static var appIphone55: Self { + .init(rawValue: "APP_IPHONE_55") + } + + public static var appIphone58: Self { + .init(rawValue: "APP_IPHONE_58") + } + + public static var appIphone61: Self { + .init(rawValue: "APP_IPHONE_61") + } + + public static var appIphone65: Self { + .init(rawValue: "APP_IPHONE_65") + } + + public static var appIphone67: Self { + .init(rawValue: "APP_IPHONE_67") + } + + public static var appWatchSeries10: Self { + .init(rawValue: "APP_WATCH_SERIES_10") + } + + public static var appWatchSeries3: Self { + .init(rawValue: "APP_WATCH_SERIES_3") + } + + public static var appWatchSeries4: Self { + .init(rawValue: "APP_WATCH_SERIES_4") + } + + public static var appWatchSeries7: Self { + .init(rawValue: "APP_WATCH_SERIES_7") + } + + public static var appWatchUltra: Self { + .init(rawValue: "APP_WATCH_ULTRA") + } + + public static var imessageAppIpad105: Self { + .init(rawValue: "IMESSAGE_APP_IPAD_105") + } + + public static var imessageAppIpad97: Self { + .init(rawValue: "IMESSAGE_APP_IPAD_97") + } + + public static var imessageAppIpadPro129: Self { + .init(rawValue: "IMESSAGE_APP_IPAD_PRO_129") + } + + public static var imessageAppIpadPro3Gen11: Self { + .init(rawValue: "IMESSAGE_APP_IPAD_PRO_3GEN_11") + } + + public static var imessageAppIpadPro3Gen129: Self { + .init(rawValue: "IMESSAGE_APP_IPAD_PRO_3GEN_129") + } + + public static var imessageAppIphone40: Self { + .init(rawValue: "IMESSAGE_APP_IPHONE_40") + } + + public static var imessageAppIphone47: Self { + .init(rawValue: "IMESSAGE_APP_IPHONE_47") + } + + public static var imessageAppIphone55: Self { + .init(rawValue: "IMESSAGE_APP_IPHONE_55") + } + + public static var imessageAppIphone58: Self { + .init(rawValue: "IMESSAGE_APP_IPHONE_58") + } + + public static var imessageAppIphone61: Self { + .init(rawValue: "IMESSAGE_APP_IPHONE_61") + } + + public static var imessageAppIphone65: Self { + .init(rawValue: "IMESSAGE_APP_IPHONE_65") + } + + public static var imessageAppIphone67: Self { + .init(rawValue: "IMESSAGE_APP_IPHONE_67") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "APP_APPLE_TV": self = .appAppleTv - case "APP_DESKTOP": self = .appDesktop - case "APP_IPAD_105": self = .appIpad105 - case "APP_IPAD_97": self = .appIpad97 - case "APP_IPAD_PRO_129": self = .appIpadPro129 - case "APP_IPAD_PRO_3GEN_11": self = .appIpadPro3Gen11 - case "APP_IPAD_PRO_3GEN_129": self = .appIpadPro3Gen129 - case "APP_IPHONE_35": self = .appIphone35 - case "APP_IPHONE_40": self = .appIphone40 - case "APP_IPHONE_47": self = .appIphone47 - case "APP_IPHONE_55": self = .appIphone55 - case "APP_IPHONE_58": self = .appIphone58 - case "APP_IPHONE_61": self = .appIphone61 - case "APP_IPHONE_65": self = .appIphone65 - case "APP_IPHONE_67": self = .appIphone67 - case "APP_WATCH_SERIES_3": self = .appWatchSeries3 - case "APP_WATCH_SERIES_4": self = .appWatchSeries4 - case "APP_WATCH_SERIES_7": self = .appWatchSeries7 - case "APP_WATCH_ULTRA": self = .appWatchUltra - case "IMESSAGE_APP_IPAD_105": self = .imessageAppIpad105 - case "IMESSAGE_APP_IPAD_97": self = .imessageAppIpad97 - case "IMESSAGE_APP_IPAD_PRO_129": self = .imessageAppIpadPro129 - case "IMESSAGE_APP_IPAD_PRO_3GEN_11": self = .imessageAppIpadPro3Gen11 - case "IMESSAGE_APP_IPAD_PRO_3GEN_129": self = .imessageAppIpadPro3Gen129 - case "IMESSAGE_APP_IPHONE_40": self = .imessageAppIphone40 - case "IMESSAGE_APP_IPHONE_47": self = .imessageAppIphone47 - case "IMESSAGE_APP_IPHONE_55": self = .imessageAppIphone55 - case "IMESSAGE_APP_IPHONE_58": self = .imessageAppIphone58 - case "IMESSAGE_APP_IPHONE_61": self = .imessageAppIphone61 - case "IMESSAGE_APP_IPHONE_65": self = .imessageAppIphone65 - case "IMESSAGE_APP_IPHONE_67": self = .imessageAppIphone67 - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } @@ -467,31 +520,31 @@ extension V1.AppStoreVersionLocalizations.ById.AppScreenshotSets.GET { } } - public enum Include: Hashable, Codable, RawRepresentable { - case appCustomProductPageLocalization - case appScreenshots - case appStoreVersionExperimentTreatmentLocalization - case appStoreVersionLocalization - case unknown(String) - - public var rawValue: String { - switch self { - case .appCustomProductPageLocalization: return "appCustomProductPageLocalization" - case .appScreenshots: return "appScreenshots" - case .appStoreVersionExperimentTreatmentLocalization: return "appStoreVersionExperimentTreatmentLocalization" - case .appStoreVersionLocalization: return "appStoreVersionLocalization" - case .unknown(let rawValue): return rawValue - } + public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var appCustomProductPageLocalization: Self { + .init(rawValue: "appCustomProductPageLocalization") } + public static var appScreenshots: Self { + .init(rawValue: "appScreenshots") + } + + public static var appStoreVersionExperimentTreatmentLocalization: Self { + .init(rawValue: "appStoreVersionExperimentTreatmentLocalization") + } + + public static var appStoreVersionLocalization: Self { + .init(rawValue: "appStoreVersionLocalization") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "appCustomProductPageLocalization": self = .appCustomProductPageLocalization - case "appScreenshots": self = .appScreenshots - case "appStoreVersionExperimentTreatmentLocalization": self = .appStoreVersionExperimentTreatmentLocalization - case "appStoreVersionLocalization": self = .appStoreVersionLocalization - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppStoreVersionLocalizations/ById/AppStoreVersionLocalizationsById.DELETE.90f82c6.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppStoreVersionLocalizations/ById/AppStoreVersionLocalizationsById.DELETE.90f82c6.generated.swift index 4deba20e..078e2dd8 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppStoreVersionLocalizations/ById/AppStoreVersionLocalizationsById.DELETE.90f82c6.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppStoreVersionLocalizations/ById/AppStoreVersionLocalizationsById.DELETE.90f82c6.generated.swift @@ -31,11 +31,12 @@ extension V1.AppStoreVersionLocalizations.ById { return urlRequest } - /// - Returns: **204**, Success (no content) /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -43,12 +44,12 @@ extension V1.AppStoreVersionLocalizations.ById { } switch urlResponse.statusCode { - case 204: - return - case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) @@ -58,6 +59,9 @@ extension V1.AppStoreVersionLocalizations.ById { case 409: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppStoreVersionLocalizations/ById/AppStoreVersionLocalizationsById.GET.90f82c6.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppStoreVersionLocalizations/ById/AppStoreVersionLocalizationsById.GET.90f82c6.generated.swift index 6f642b16..23cfe123 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppStoreVersionLocalizations/ById/AppStoreVersionLocalizationsById.GET.90f82c6.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppStoreVersionLocalizations/ById/AppStoreVersionLocalizationsById.GET.90f82c6.generated.swift @@ -52,8 +52,10 @@ extension V1.AppStoreVersionLocalizations.ById { /// - Returns: **200**, Single AppStoreVersionLocalization as `AppStoreVersionLocalizationResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -67,12 +69,18 @@ extension V1.AppStoreVersionLocalizations.ById { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 404: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -97,111 +105,119 @@ extension V1.AppStoreVersionLocalizations.ById.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum AppPreviewSets: Hashable, Codable, RawRepresentable { - case appCustomProductPageLocalization - case appPreviews - case appStoreVersionExperimentTreatmentLocalization - case appStoreVersionLocalization - case previewType - case unknown(String) - - public var rawValue: String { - switch self { - case .appCustomProductPageLocalization: return "appCustomProductPageLocalization" - case .appPreviews: return "appPreviews" - case .appStoreVersionExperimentTreatmentLocalization: return "appStoreVersionExperimentTreatmentLocalization" - case .appStoreVersionLocalization: return "appStoreVersionLocalization" - case .previewType: return "previewType" - case .unknown(let rawValue): return rawValue - } + public struct AppPreviewSets: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var appCustomProductPageLocalization: Self { + .init(rawValue: "appCustomProductPageLocalization") + } + + public static var appPreviews: Self { + .init(rawValue: "appPreviews") + } + + public static var appStoreVersionExperimentTreatmentLocalization: Self { + .init(rawValue: "appStoreVersionExperimentTreatmentLocalization") + } + + public static var appStoreVersionLocalization: Self { + .init(rawValue: "appStoreVersionLocalization") + } + + public static var previewType: Self { + .init(rawValue: "previewType") + } + + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "appCustomProductPageLocalization": self = .appCustomProductPageLocalization - case "appPreviews": self = .appPreviews - case "appStoreVersionExperimentTreatmentLocalization": self = .appStoreVersionExperimentTreatmentLocalization - case "appStoreVersionLocalization": self = .appStoreVersionLocalization - case "previewType": self = .previewType - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum AppScreenshotSets: Hashable, Codable, RawRepresentable { - case appCustomProductPageLocalization - case appScreenshots - case appStoreVersionExperimentTreatmentLocalization - case appStoreVersionLocalization - case screenshotDisplayType - case unknown(String) - - public var rawValue: String { - switch self { - case .appCustomProductPageLocalization: return "appCustomProductPageLocalization" - case .appScreenshots: return "appScreenshots" - case .appStoreVersionExperimentTreatmentLocalization: return "appStoreVersionExperimentTreatmentLocalization" - case .appStoreVersionLocalization: return "appStoreVersionLocalization" - case .screenshotDisplayType: return "screenshotDisplayType" - case .unknown(let rawValue): return rawValue - } + public struct AppScreenshotSets: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var appCustomProductPageLocalization: Self { + .init(rawValue: "appCustomProductPageLocalization") + } + + public static var appScreenshots: Self { + .init(rawValue: "appScreenshots") + } + + public static var appStoreVersionExperimentTreatmentLocalization: Self { + .init(rawValue: "appStoreVersionExperimentTreatmentLocalization") + } + + public static var appStoreVersionLocalization: Self { + .init(rawValue: "appStoreVersionLocalization") } + public static var screenshotDisplayType: Self { + .init(rawValue: "screenshotDisplayType") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "appCustomProductPageLocalization": self = .appCustomProductPageLocalization - case "appScreenshots": self = .appScreenshots - case "appStoreVersionExperimentTreatmentLocalization": self = .appStoreVersionExperimentTreatmentLocalization - case "appStoreVersionLocalization": self = .appStoreVersionLocalization - case "screenshotDisplayType": self = .screenshotDisplayType - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum AppStoreVersionLocalizations: Hashable, Codable, RawRepresentable { - case appPreviewSets - case appScreenshotSets - case appStoreVersion - case description - case keywords - case locale - case marketingUrl - case promotionalText - case supportUrl - case whatsNew - case unknown(String) - - public var rawValue: String { - switch self { - case .appPreviewSets: return "appPreviewSets" - case .appScreenshotSets: return "appScreenshotSets" - case .appStoreVersion: return "appStoreVersion" - case .description: return "description" - case .keywords: return "keywords" - case .locale: return "locale" - case .marketingUrl: return "marketingUrl" - case .promotionalText: return "promotionalText" - case .supportUrl: return "supportUrl" - case .whatsNew: return "whatsNew" - case .unknown(let rawValue): return rawValue - } + public struct AppStoreVersionLocalizations: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var appPreviewSets: Self { + .init(rawValue: "appPreviewSets") + } + + public static var appScreenshotSets: Self { + .init(rawValue: "appScreenshotSets") } + public static var appStoreVersion: Self { + .init(rawValue: "appStoreVersion") + } + + public static var description: Self { + .init(rawValue: "description") + } + + public static var keywords: Self { + .init(rawValue: "keywords") + } + + public static var locale: Self { + .init(rawValue: "locale") + } + + public static var marketingUrl: Self { + .init(rawValue: "marketingUrl") + } + + public static var promotionalText: Self { + .init(rawValue: "promotionalText") + } + + public static var supportUrl: Self { + .init(rawValue: "supportUrl") + } + + public static var whatsNew: Self { + .init(rawValue: "whatsNew") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "appPreviewSets": self = .appPreviewSets - case "appScreenshotSets": self = .appScreenshotSets - case "appStoreVersion": self = .appStoreVersion - case "description": self = .description - case "keywords": self = .keywords - case "locale": self = .locale - case "marketingUrl": self = .marketingUrl - case "promotionalText": self = .promotionalText - case "supportUrl": self = .supportUrl - case "whatsNew": self = .whatsNew - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } @@ -229,28 +245,27 @@ extension V1.AppStoreVersionLocalizations.ById.GET { } } - public enum Include: Hashable, Codable, RawRepresentable { - case appPreviewSets - case appScreenshotSets - case appStoreVersion - case unknown(String) + public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var appPreviewSets: Self { + .init(rawValue: "appPreviewSets") + } - public var rawValue: String { - switch self { - case .appPreviewSets: return "appPreviewSets" - case .appScreenshotSets: return "appScreenshotSets" - case .appStoreVersion: return "appStoreVersion" - case .unknown(let rawValue): return rawValue - } + public static var appScreenshotSets: Self { + .init(rawValue: "appScreenshotSets") } + public static var appStoreVersion: Self { + .init(rawValue: "appStoreVersion") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "appPreviewSets": self = .appPreviewSets - case "appScreenshotSets": self = .appScreenshotSets - case "appStoreVersion": self = .appStoreVersion - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppStoreVersionLocalizations/ById/AppStoreVersionLocalizationsById.PATCH.90f82c6.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppStoreVersionLocalizations/ById/AppStoreVersionLocalizationsById.PATCH.90f82c6.generated.swift index 4b25bad0..a0f8c072 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppStoreVersionLocalizations/ById/AppStoreVersionLocalizationsById.PATCH.90f82c6.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppStoreVersionLocalizations/ById/AppStoreVersionLocalizationsById.PATCH.90f82c6.generated.swift @@ -48,9 +48,12 @@ extension V1.AppStoreVersionLocalizations.ById { /// - Returns: **200**, Single AppStoreVersionLocalization as `AppStoreVersionLocalizationResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **422**, Unprocessable request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -64,6 +67,9 @@ extension V1.AppStoreVersionLocalizations.ById { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) @@ -73,6 +79,12 @@ extension V1.AppStoreVersionLocalizations.ById { case 409: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 422: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppStoreVersionLocalizations/ById/Relationships/AppPreviewSets/AppStoreVersionLocalizationsByIdRelationshipsAppPreviewSets.GET.829b8c5.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppStoreVersionLocalizations/ById/Relationships/AppPreviewSets/AppStoreVersionLocalizationsByIdRelationshipsAppPreviewSets.GET.829b8c5.generated.swift new file mode 100644 index 00000000..dba3498f --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppStoreVersionLocalizations/ById/Relationships/AppPreviewSets/AppStoreVersionLocalizationsByIdRelationshipsAppPreviewSets.GET.829b8c5.generated.swift @@ -0,0 +1,88 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.AppStoreVersionLocalizations.ById.Relationships.AppPreviewSets { + public struct GET: Endpoint { + public typealias Response = AppStoreVersionLocalizationAppPreviewSetsLinkagesResponse + + public var path: String { + "/v1/appStoreVersionLocalizations/\(id)/relationships/appPreviewSets" + } + + /// the id of the requested resource + public var id: String + + public var parameters: Parameters = Parameters() + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + components?.queryItems = [ + URLQueryItem(name: "limit", + value: parameters.limit.map { "\($0)" }) + ].filter { $0.value != nil } + if components?.queryItems?.isEmpty ?? false { + components?.queryItems = nil + } + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "GET" + return urlRequest + } + + /// - Returns: **200**, List of related linkages as `AppStoreVersionLocalizationAppPreviewSetsLinkagesResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(AppStoreVersionLocalizationAppPreviewSetsLinkagesResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +extension V1.AppStoreVersionLocalizations.ById.Relationships.AppPreviewSets.GET { + public struct Parameters: Hashable { + /// maximum resources per page + public var limit: Int? + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppStoreVersionLocalizations/ById/Relationships/AppScreenshotSets/AppStoreVersionLocalizationsByIdRelationshipsAppScreenshotSets.GET.fa3030d.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppStoreVersionLocalizations/ById/Relationships/AppScreenshotSets/AppStoreVersionLocalizationsByIdRelationshipsAppScreenshotSets.GET.fa3030d.generated.swift new file mode 100644 index 00000000..c1de74fb --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppStoreVersionLocalizations/ById/Relationships/AppScreenshotSets/AppStoreVersionLocalizationsByIdRelationshipsAppScreenshotSets.GET.fa3030d.generated.swift @@ -0,0 +1,88 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.AppStoreVersionLocalizations.ById.Relationships.AppScreenshotSets { + public struct GET: Endpoint { + public typealias Response = AppStoreVersionLocalizationAppScreenshotSetsLinkagesResponse + + public var path: String { + "/v1/appStoreVersionLocalizations/\(id)/relationships/appScreenshotSets" + } + + /// the id of the requested resource + public var id: String + + public var parameters: Parameters = Parameters() + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + components?.queryItems = [ + URLQueryItem(name: "limit", + value: parameters.limit.map { "\($0)" }) + ].filter { $0.value != nil } + if components?.queryItems?.isEmpty ?? false { + components?.queryItems = nil + } + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "GET" + return urlRequest + } + + /// - Returns: **200**, List of related linkages as `AppStoreVersionLocalizationAppScreenshotSetsLinkagesResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(AppStoreVersionLocalizationAppScreenshotSetsLinkagesResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +extension V1.AppStoreVersionLocalizations.ById.Relationships.AppScreenshotSets.GET { + public struct Parameters: Hashable { + /// maximum resources per page + public var limit: Int? + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppStoreVersionPhasedReleases/AppStoreVersionPhasedReleases.POST.8bf10f1.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppStoreVersionPhasedReleases/AppStoreVersionPhasedReleases.POST.8bf10f1.generated.swift index a5531a77..f3a7f20d 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppStoreVersionPhasedReleases/AppStoreVersionPhasedReleases.POST.8bf10f1.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppStoreVersionPhasedReleases/AppStoreVersionPhasedReleases.POST.8bf10f1.generated.swift @@ -41,8 +41,11 @@ extension V1.AppStoreVersionPhasedReleases { /// - Returns: **201**, Single AppStoreVersionPhasedRelease as `AppStoreVersionPhasedReleaseResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **422**, Unprocessable request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -56,12 +59,21 @@ extension V1.AppStoreVersionPhasedReleases { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 409: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 422: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppStoreVersionPhasedReleases/ById/AppStoreVersionPhasedReleasesById.DELETE.1456d86.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppStoreVersionPhasedReleases/ById/AppStoreVersionPhasedReleasesById.DELETE.1456d86.generated.swift index 53b78528..01a19187 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppStoreVersionPhasedReleases/ById/AppStoreVersionPhasedReleasesById.DELETE.1456d86.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppStoreVersionPhasedReleases/ById/AppStoreVersionPhasedReleasesById.DELETE.1456d86.generated.swift @@ -31,11 +31,12 @@ extension V1.AppStoreVersionPhasedReleases.ById { return urlRequest } - /// - Returns: **204**, Success (no content) /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -43,12 +44,12 @@ extension V1.AppStoreVersionPhasedReleases.ById { } switch urlResponse.statusCode { - case 204: - return - case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) @@ -58,6 +59,9 @@ extension V1.AppStoreVersionPhasedReleases.ById { case 409: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppStoreVersionPhasedReleases/ById/AppStoreVersionPhasedReleasesById.PATCH.1456d86.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppStoreVersionPhasedReleases/ById/AppStoreVersionPhasedReleasesById.PATCH.1456d86.generated.swift index 519ac785..7da1da37 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppStoreVersionPhasedReleases/ById/AppStoreVersionPhasedReleasesById.PATCH.1456d86.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppStoreVersionPhasedReleases/ById/AppStoreVersionPhasedReleasesById.PATCH.1456d86.generated.swift @@ -48,9 +48,12 @@ extension V1.AppStoreVersionPhasedReleases.ById { /// - Returns: **200**, Single AppStoreVersionPhasedRelease as `AppStoreVersionPhasedReleaseResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **422**, Unprocessable request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -64,6 +67,9 @@ extension V1.AppStoreVersionPhasedReleases.ById { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) @@ -73,6 +79,12 @@ extension V1.AppStoreVersionPhasedReleases.ById { case 409: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 422: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppStoreVersionPromotions/AppStoreVersionPromotions.POST.6463381.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppStoreVersionPromotions/AppStoreVersionPromotions.POST.6463381.generated.swift index 19643964..d1c427e6 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppStoreVersionPromotions/AppStoreVersionPromotions.POST.6463381.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppStoreVersionPromotions/AppStoreVersionPromotions.POST.6463381.generated.swift @@ -41,8 +41,11 @@ extension V1.AppStoreVersionPromotions { /// - Returns: **201**, Single AppStoreVersionPromotion as `AppStoreVersionPromotionResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **422**, Unprocessable request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -56,12 +59,21 @@ extension V1.AppStoreVersionPromotions { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 409: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 422: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppStoreVersionReleaseRequests/AppStoreVersionReleaseRequests.POST.baf494e.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppStoreVersionReleaseRequests/AppStoreVersionReleaseRequests.POST.baf494e.generated.swift index ebdcac58..5d83d2ab 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppStoreVersionReleaseRequests/AppStoreVersionReleaseRequests.POST.baf494e.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppStoreVersionReleaseRequests/AppStoreVersionReleaseRequests.POST.baf494e.generated.swift @@ -41,8 +41,11 @@ extension V1.AppStoreVersionReleaseRequests { /// - Returns: **201**, Single AppStoreVersionReleaseRequest as `AppStoreVersionReleaseRequestResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **422**, Unprocessable request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -56,12 +59,21 @@ extension V1.AppStoreVersionReleaseRequests { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 409: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 422: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppStoreVersionSubmissions/ById/AppStoreVersionSubmissionsById.DELETE.6b3fe31.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppStoreVersionSubmissions/ById/AppStoreVersionSubmissionsById.DELETE.6b3fe31.generated.swift index ccb0df45..67d84fa0 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppStoreVersionSubmissions/ById/AppStoreVersionSubmissionsById.DELETE.6b3fe31.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppStoreVersionSubmissions/ById/AppStoreVersionSubmissionsById.DELETE.6b3fe31.generated.swift @@ -32,11 +32,12 @@ extension V1.AppStoreVersionSubmissions.ById { return urlRequest } - /// - Returns: **204**, Success (no content) /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -44,12 +45,12 @@ extension V1.AppStoreVersionSubmissions.ById { } switch urlResponse.statusCode { - case 204: - return - case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) @@ -59,6 +60,9 @@ extension V1.AppStoreVersionSubmissions.ById { case 409: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppStoreVersions/AppStoreVersions.POST.ca5c114.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppStoreVersions/AppStoreVersions.POST.ca5c114.generated.swift index c5313bbf..6b3ddfbb 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppStoreVersions/AppStoreVersions.POST.ca5c114.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppStoreVersions/AppStoreVersions.POST.ca5c114.generated.swift @@ -41,8 +41,11 @@ extension V1.AppStoreVersions { /// - Returns: **201**, Single AppStoreVersion as `AppStoreVersionResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **422**, Unprocessable request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -56,12 +59,21 @@ extension V1.AppStoreVersions { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 409: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 422: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppStoreVersions/ById/AgeRatingDeclaration/AppStoreVersionsByIdAgeRatingDeclaration.GET.3f2b7d4.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppStoreVersions/ById/AgeRatingDeclaration/AppStoreVersionsByIdAgeRatingDeclaration.GET.3f2b7d4.generated.swift index 54eba3ee..caa42394 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppStoreVersions/ById/AgeRatingDeclaration/AppStoreVersionsByIdAgeRatingDeclaration.GET.3f2b7d4.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppStoreVersions/ById/AgeRatingDeclaration/AppStoreVersionsByIdAgeRatingDeclaration.GET.3f2b7d4.generated.swift @@ -43,8 +43,10 @@ extension V1.AppStoreVersions.ById.AgeRatingDeclaration { /// - Returns: **200**, Single AgeRatingDeclaration with get as `AgeRatingDeclarationWithoutIncludesResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -58,12 +60,18 @@ extension V1.AppStoreVersions.ById.AgeRatingDeclaration { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 404: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -83,70 +91,83 @@ extension V1.AppStoreVersions.ById.AgeRatingDeclaration.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum AgeRatingDeclarations: Hashable, Codable, RawRepresentable { - case alcoholTobaccoOrDrugUseOrReferences - case contests - case gambling - case gamblingAndContests - case gamblingSimulated - case horrorOrFearThemes - case kidsAgeBand - case matureOrSuggestiveThemes - case medicalOrTreatmentInformation - case profanityOrCrudeHumor - case seventeenPlus - case sexualContentGraphicAndNudity - case sexualContentOrNudity - case unrestrictedWebAccess - case violenceCartoonOrFantasy - case violenceRealistic - case violenceRealisticProlongedGraphicOrSadistic - case unknown(String) - - public var rawValue: String { - switch self { - case .alcoholTobaccoOrDrugUseOrReferences: return "alcoholTobaccoOrDrugUseOrReferences" - case .contests: return "contests" - case .gambling: return "gambling" - case .gamblingAndContests: return "gamblingAndContests" - case .gamblingSimulated: return "gamblingSimulated" - case .horrorOrFearThemes: return "horrorOrFearThemes" - case .kidsAgeBand: return "kidsAgeBand" - case .matureOrSuggestiveThemes: return "matureOrSuggestiveThemes" - case .medicalOrTreatmentInformation: return "medicalOrTreatmentInformation" - case .profanityOrCrudeHumor: return "profanityOrCrudeHumor" - case .seventeenPlus: return "seventeenPlus" - case .sexualContentGraphicAndNudity: return "sexualContentGraphicAndNudity" - case .sexualContentOrNudity: return "sexualContentOrNudity" - case .unrestrictedWebAccess: return "unrestrictedWebAccess" - case .violenceCartoonOrFantasy: return "violenceCartoonOrFantasy" - case .violenceRealistic: return "violenceRealistic" - case .violenceRealisticProlongedGraphicOrSadistic: return "violenceRealisticProlongedGraphicOrSadistic" - case .unknown(let rawValue): return rawValue - } + public struct AgeRatingDeclarations: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var alcoholTobaccoOrDrugUseOrReferences: Self { + .init(rawValue: "alcoholTobaccoOrDrugUseOrReferences") + } + + public static var contests: Self { + .init(rawValue: "contests") + } + + public static var gambling: Self { + .init(rawValue: "gambling") + } + + public static var gamblingSimulated: Self { + .init(rawValue: "gamblingSimulated") + } + + public static var horrorOrFearThemes: Self { + .init(rawValue: "horrorOrFearThemes") + } + + public static var kidsAgeBand: Self { + .init(rawValue: "kidsAgeBand") + } + + public static var koreaAgeRatingOverride: Self { + .init(rawValue: "koreaAgeRatingOverride") + } + + public static var lootBox: Self { + .init(rawValue: "lootBox") + } + + public static var matureOrSuggestiveThemes: Self { + .init(rawValue: "matureOrSuggestiveThemes") } + public static var medicalOrTreatmentInformation: Self { + .init(rawValue: "medicalOrTreatmentInformation") + } + + public static var profanityOrCrudeHumor: Self { + .init(rawValue: "profanityOrCrudeHumor") + } + + public static var sexualContentGraphicAndNudity: Self { + .init(rawValue: "sexualContentGraphicAndNudity") + } + + public static var sexualContentOrNudity: Self { + .init(rawValue: "sexualContentOrNudity") + } + + public static var unrestrictedWebAccess: Self { + .init(rawValue: "unrestrictedWebAccess") + } + + public static var violenceCartoonOrFantasy: Self { + .init(rawValue: "violenceCartoonOrFantasy") + } + + public static var violenceRealistic: Self { + .init(rawValue: "violenceRealistic") + } + + public static var violenceRealisticProlongedGraphicOrSadistic: Self { + .init(rawValue: "violenceRealisticProlongedGraphicOrSadistic") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "alcoholTobaccoOrDrugUseOrReferences": self = .alcoholTobaccoOrDrugUseOrReferences - case "contests": self = .contests - case "gambling": self = .gambling - case "gamblingAndContests": self = .gamblingAndContests - case "gamblingSimulated": self = .gamblingSimulated - case "horrorOrFearThemes": self = .horrorOrFearThemes - case "kidsAgeBand": self = .kidsAgeBand - case "matureOrSuggestiveThemes": self = .matureOrSuggestiveThemes - case "medicalOrTreatmentInformation": self = .medicalOrTreatmentInformation - case "profanityOrCrudeHumor": self = .profanityOrCrudeHumor - case "seventeenPlus": self = .seventeenPlus - case "sexualContentGraphicAndNudity": self = .sexualContentGraphicAndNudity - case "sexualContentOrNudity": self = .sexualContentOrNudity - case "unrestrictedWebAccess": self = .unrestrictedWebAccess - case "violenceCartoonOrFantasy": self = .violenceCartoonOrFantasy - case "violenceRealistic": self = .violenceRealistic - case "violenceRealisticProlongedGraphicOrSadistic": self = .violenceRealisticProlongedGraphicOrSadistic - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppStoreVersions/ById/AlternativeDistributionPackage/AppStoreVersionsByIdAlternativeDistributionPackage.GET.5412e83.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppStoreVersions/ById/AlternativeDistributionPackage/AppStoreVersionsByIdAlternativeDistributionPackage.GET.5412e83.generated.swift new file mode 100644 index 00000000..d67e814b --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppStoreVersions/ById/AlternativeDistributionPackage/AppStoreVersionsByIdAlternativeDistributionPackage.GET.5412e83.generated.swift @@ -0,0 +1,223 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.AppStoreVersions.ById.AlternativeDistributionPackage { + public struct GET: Endpoint { + public typealias Response = AlternativeDistributionPackageResponse + + public var path: String { + "/v1/appStoreVersions/\(id)/alternativeDistributionPackage" + } + + /// the id of the requested resource + public var id: String + + public var parameters: Parameters = Parameters() + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + components?.queryItems = [ + URLQueryItem(name: "fields[alternativeDistributionPackageVersions]", + value: parameters.fields[.alternativeDistributionPackageVersions]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "fields[alternativeDistributionPackages]", + value: parameters.fields[.alternativeDistributionPackages]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "include", + value: parameters.include?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "limit[versions]", + value: parameters.limit[.versions].map { "\($0)" }) + ].filter { $0.value != nil } + if components?.queryItems?.isEmpty ?? false { + components?.queryItems = nil + } + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "GET" + return urlRequest + } + + /// - Returns: **200**, Single AlternativeDistributionPackage as `AlternativeDistributionPackageResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(AlternativeDistributionPackageResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +extension V1.AppStoreVersions.ById.AlternativeDistributionPackage.GET { + public struct Parameters: Hashable { + public var fields: Fields = Fields() + + /// comma-separated list of relationships to include + public var include: [Include]? + + public var limit: Limit = Limit() + + public struct Fields: Hashable { + public subscript (_ relation: Relation) -> T { + get { values[relation]?.base as! T } + set { values[relation] = AnyHashable(newValue) } + } + + private var values: [AnyHashable: AnyHashable] = [:] + + public struct AlternativeDistributionPackageVersions: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var alternativeDistributionPackage: Self { + .init(rawValue: "alternativeDistributionPackage") + } + + public static var deltas: Self { + .init(rawValue: "deltas") + } + + public static var fileChecksum: Self { + .init(rawValue: "fileChecksum") + } + + public static var state: Self { + .init(rawValue: "state") + } + + public static var url: Self { + .init(rawValue: "url") + } + + public static var urlExpirationDate: Self { + .init(rawValue: "urlExpirationDate") + } + + public static var variants: Self { + .init(rawValue: "variants") + } + + public static var version: Self { + .init(rawValue: "version") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct AlternativeDistributionPackages: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var versions: Self { + .init(rawValue: "versions") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct Relation: Hashable { + /// the fields to include for returned resources of type alternativeDistributionPackageVersions + public static var alternativeDistributionPackageVersions: Relation<[AlternativeDistributionPackageVersions]?> { + .init(key: "fields[alternativeDistributionPackageVersions]") + } + + /// the fields to include for returned resources of type alternativeDistributionPackages + public static var alternativeDistributionPackages: Relation<[AlternativeDistributionPackages]?> { + .init(key: "fields[alternativeDistributionPackages]") + } + + internal let key: String + + public func hash(into hasher: inout Hasher) { + hasher.combine(key) + } + } + } + + public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var versions: Self { + .init(rawValue: "versions") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct Limit: Hashable { + public subscript (_ relation: Relation) -> T { + get { values[relation]?.base as! T } + set { values[relation] = AnyHashable(newValue) } + } + + private var values: [AnyHashable: AnyHashable] = [:] + + public struct Relation: Hashable { + /// maximum number of related versions returned (when they are included) + public static var versions: Relation { + .init(key: "limit[versions]") + } + + internal let key: String + + public func hash(into hasher: inout Hasher) { + hasher.combine(key) + } + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppStoreVersions/ById/AppClipDefaultExperience/AppStoreVersionsByIdAppClipDefaultExperience.GET.b1d9f94.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppStoreVersions/ById/AppClipDefaultExperience/AppStoreVersionsByIdAppClipDefaultExperience.GET.b1d9f94.generated.swift index 174dcce6..c7b0f994 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppStoreVersions/ById/AppClipDefaultExperience/AppStoreVersionsByIdAppClipDefaultExperience.GET.b1d9f94.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppStoreVersions/ById/AppClipDefaultExperience/AppStoreVersionsByIdAppClipDefaultExperience.GET.b1d9f94.generated.swift @@ -54,8 +54,10 @@ extension V1.AppStoreVersions.ById.AppClipDefaultExperience { /// - Returns: **200**, Single AppClipDefaultExperience as `AppClipDefaultExperienceResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -69,12 +71,18 @@ extension V1.AppStoreVersions.ById.AppClipDefaultExperience { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 404: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -99,191 +107,223 @@ extension V1.AppStoreVersions.ById.AppClipDefaultExperience.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum AppClipAppStoreReviewDetails: Hashable, Codable, RawRepresentable { - case appClipDefaultExperience - case invocationUrls - case unknown(String) + public struct AppClipAppStoreReviewDetails: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var appClipDefaultExperience: Self { + .init(rawValue: "appClipDefaultExperience") + } + + public static var invocationUrls: Self { + .init(rawValue: "invocationUrls") + } - public var rawValue: String { - switch self { - case .appClipDefaultExperience: return "appClipDefaultExperience" - case .invocationUrls: return "invocationUrls" - case .unknown(let rawValue): return rawValue - } + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "appClipDefaultExperience": self = .appClipDefaultExperience - case "invocationUrls": self = .invocationUrls - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum AppClipDefaultExperienceLocalizations: Hashable, Codable, RawRepresentable { - case appClipDefaultExperience - case appClipHeaderImage - case locale - case subtitle - case unknown(String) + public struct AppClipDefaultExperienceLocalizations: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var appClipDefaultExperience: Self { + .init(rawValue: "appClipDefaultExperience") + } + + public static var appClipHeaderImage: Self { + .init(rawValue: "appClipHeaderImage") + } + + public static var locale: Self { + .init(rawValue: "locale") + } - public var rawValue: String { - switch self { - case .appClipDefaultExperience: return "appClipDefaultExperience" - case .appClipHeaderImage: return "appClipHeaderImage" - case .locale: return "locale" - case .subtitle: return "subtitle" - case .unknown(let rawValue): return rawValue - } + public static var subtitle: Self { + .init(rawValue: "subtitle") } + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "appClipDefaultExperience": self = .appClipDefaultExperience - case "appClipHeaderImage": self = .appClipHeaderImage - case "locale": self = .locale - case "subtitle": self = .subtitle - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum AppClipDefaultExperiences: Hashable, Codable, RawRepresentable { - case action - case appClip - case appClipAppStoreReviewDetail - case appClipDefaultExperienceLocalizations - case appClipDefaultExperienceTemplate - case releaseWithAppStoreVersion - case unknown(String) - - public var rawValue: String { - switch self { - case .action: return "action" - case .appClip: return "appClip" - case .appClipAppStoreReviewDetail: return "appClipAppStoreReviewDetail" - case .appClipDefaultExperienceLocalizations: return "appClipDefaultExperienceLocalizations" - case .appClipDefaultExperienceTemplate: return "appClipDefaultExperienceTemplate" - case .releaseWithAppStoreVersion: return "releaseWithAppStoreVersion" - case .unknown(let rawValue): return rawValue - } + public struct AppClipDefaultExperiences: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var action: Self { + .init(rawValue: "action") + } + + public static var appClip: Self { + .init(rawValue: "appClip") + } + + public static var appClipAppStoreReviewDetail: Self { + .init(rawValue: "appClipAppStoreReviewDetail") + } + + public static var appClipDefaultExperienceLocalizations: Self { + .init(rawValue: "appClipDefaultExperienceLocalizations") } + public static var releaseWithAppStoreVersion: Self { + .init(rawValue: "releaseWithAppStoreVersion") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "action": self = .action - case "appClip": self = .appClip - case "appClipAppStoreReviewDetail": self = .appClipAppStoreReviewDetail - case "appClipDefaultExperienceLocalizations": self = .appClipDefaultExperienceLocalizations - case "appClipDefaultExperienceTemplate": self = .appClipDefaultExperienceTemplate - case "releaseWithAppStoreVersion": self = .releaseWithAppStoreVersion - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum AppClips: Hashable, Codable, RawRepresentable { - case app - case appClipAdvancedExperiences - case appClipDefaultExperiences - case bundleId - case unknown(String) + public struct AppClips: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var app: Self { + .init(rawValue: "app") + } + + public static var appClipAdvancedExperiences: Self { + .init(rawValue: "appClipAdvancedExperiences") + } + + public static var appClipDefaultExperiences: Self { + .init(rawValue: "appClipDefaultExperiences") + } + + public static var bundleId: Self { + .init(rawValue: "bundleId") + } - public var rawValue: String { - switch self { - case .app: return "app" - case .appClipAdvancedExperiences: return "appClipAdvancedExperiences" - case .appClipDefaultExperiences: return "appClipDefaultExperiences" - case .bundleId: return "bundleId" - case .unknown(let rawValue): return rawValue - } + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "app": self = .app - case "appClipAdvancedExperiences": self = .appClipAdvancedExperiences - case "appClipDefaultExperiences": self = .appClipDefaultExperiences - case "bundleId": self = .bundleId - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum AppStoreVersions: Hashable, Codable, RawRepresentable { - case ageRatingDeclaration - case app - case appClipDefaultExperience - case appStoreReviewDetail - case appStoreState - case appStoreVersionExperiments - case appStoreVersionExperimentsV2 - case appStoreVersionLocalizations - case appStoreVersionPhasedRelease - case appStoreVersionSubmission - case build - case copyright - case createdDate - case customerReviews - case downloadable - case earliestReleaseDate - case platform - case releaseType - case routingAppCoverage - case versionString - case unknown(String) - - public var rawValue: String { - switch self { - case .ageRatingDeclaration: return "ageRatingDeclaration" - case .app: return "app" - case .appClipDefaultExperience: return "appClipDefaultExperience" - case .appStoreReviewDetail: return "appStoreReviewDetail" - case .appStoreState: return "appStoreState" - case .appStoreVersionExperiments: return "appStoreVersionExperiments" - case .appStoreVersionExperimentsV2: return "appStoreVersionExperimentsV2" - case .appStoreVersionLocalizations: return "appStoreVersionLocalizations" - case .appStoreVersionPhasedRelease: return "appStoreVersionPhasedRelease" - case .appStoreVersionSubmission: return "appStoreVersionSubmission" - case .build: return "build" - case .copyright: return "copyright" - case .createdDate: return "createdDate" - case .customerReviews: return "customerReviews" - case .downloadable: return "downloadable" - case .earliestReleaseDate: return "earliestReleaseDate" - case .platform: return "platform" - case .releaseType: return "releaseType" - case .routingAppCoverage: return "routingAppCoverage" - case .versionString: return "versionString" - case .unknown(let rawValue): return rawValue - } + public struct AppStoreVersions: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var ageRatingDeclaration: Self { + .init(rawValue: "ageRatingDeclaration") + } + + public static var alternativeDistributionPackage: Self { + .init(rawValue: "alternativeDistributionPackage") + } + + public static var app: Self { + .init(rawValue: "app") + } + + public static var appClipDefaultExperience: Self { + .init(rawValue: "appClipDefaultExperience") + } + + public static var appStoreReviewDetail: Self { + .init(rawValue: "appStoreReviewDetail") + } + + public static var appStoreState: Self { + .init(rawValue: "appStoreState") + } + + public static var appStoreVersionExperiments: Self { + .init(rawValue: "appStoreVersionExperiments") + } + + public static var appStoreVersionExperimentsV2: Self { + .init(rawValue: "appStoreVersionExperimentsV2") } + public static var appStoreVersionLocalizations: Self { + .init(rawValue: "appStoreVersionLocalizations") + } + + public static var appStoreVersionPhasedRelease: Self { + .init(rawValue: "appStoreVersionPhasedRelease") + } + + public static var appStoreVersionSubmission: Self { + .init(rawValue: "appStoreVersionSubmission") + } + + public static var appVersionState: Self { + .init(rawValue: "appVersionState") + } + + public static var build: Self { + .init(rawValue: "build") + } + + public static var copyright: Self { + .init(rawValue: "copyright") + } + + public static var createdDate: Self { + .init(rawValue: "createdDate") + } + + public static var customerReviews: Self { + .init(rawValue: "customerReviews") + } + + public static var downloadable: Self { + .init(rawValue: "downloadable") + } + + public static var earliestReleaseDate: Self { + .init(rawValue: "earliestReleaseDate") + } + + public static var gameCenterAppVersion: Self { + .init(rawValue: "gameCenterAppVersion") + } + + public static var platform: Self { + .init(rawValue: "platform") + } + + public static var releaseType: Self { + .init(rawValue: "releaseType") + } + + public static var reviewType: Self { + .init(rawValue: "reviewType") + } + + public static var routingAppCoverage: Self { + .init(rawValue: "routingAppCoverage") + } + + public static var usesIdfa: Self { + .init(rawValue: "usesIdfa") + } + + public static var versionString: Self { + .init(rawValue: "versionString") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "ageRatingDeclaration": self = .ageRatingDeclaration - case "app": self = .app - case "appClipDefaultExperience": self = .appClipDefaultExperience - case "appStoreReviewDetail": self = .appStoreReviewDetail - case "appStoreState": self = .appStoreState - case "appStoreVersionExperiments": self = .appStoreVersionExperiments - case "appStoreVersionExperimentsV2": self = .appStoreVersionExperimentsV2 - case "appStoreVersionLocalizations": self = .appStoreVersionLocalizations - case "appStoreVersionPhasedRelease": self = .appStoreVersionPhasedRelease - case "appStoreVersionSubmission": self = .appStoreVersionSubmission - case "build": self = .build - case "copyright": self = .copyright - case "createdDate": self = .createdDate - case "customerReviews": self = .customerReviews - case "downloadable": self = .downloadable - case "earliestReleaseDate": self = .earliestReleaseDate - case "platform": self = .platform - case "releaseType": self = .releaseType - case "routingAppCoverage": self = .routingAppCoverage - case "versionString": self = .versionString - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } @@ -321,31 +361,31 @@ extension V1.AppStoreVersions.ById.AppClipDefaultExperience.GET { } } - public enum Include: Hashable, Codable, RawRepresentable { - case appClip - case appClipAppStoreReviewDetail - case appClipDefaultExperienceLocalizations - case releaseWithAppStoreVersion - case unknown(String) - - public var rawValue: String { - switch self { - case .appClip: return "appClip" - case .appClipAppStoreReviewDetail: return "appClipAppStoreReviewDetail" - case .appClipDefaultExperienceLocalizations: return "appClipDefaultExperienceLocalizations" - case .releaseWithAppStoreVersion: return "releaseWithAppStoreVersion" - case .unknown(let rawValue): return rawValue - } + public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var appClip: Self { + .init(rawValue: "appClip") + } + + public static var appClipAppStoreReviewDetail: Self { + .init(rawValue: "appClipAppStoreReviewDetail") + } + + public static var appClipDefaultExperienceLocalizations: Self { + .init(rawValue: "appClipDefaultExperienceLocalizations") } + public static var releaseWithAppStoreVersion: Self { + .init(rawValue: "releaseWithAppStoreVersion") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "appClip": self = .appClip - case "appClipAppStoreReviewDetail": self = .appClipAppStoreReviewDetail - case "appClipDefaultExperienceLocalizations": self = .appClipDefaultExperienceLocalizations - case "releaseWithAppStoreVersion": self = .releaseWithAppStoreVersion - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppStoreVersions/ById/AppStoreReviewDetail/AppStoreVersionsByIdAppStoreReviewDetail.GET.929876e.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppStoreVersions/ById/AppStoreReviewDetail/AppStoreVersionsByIdAppStoreReviewDetail.GET.929876e.generated.swift index d41c4251..76bf2b66 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppStoreVersions/ById/AppStoreReviewDetail/AppStoreVersionsByIdAppStoreReviewDetail.GET.929876e.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppStoreVersions/ById/AppStoreReviewDetail/AppStoreVersionsByIdAppStoreReviewDetail.GET.929876e.generated.swift @@ -50,8 +50,10 @@ extension V1.AppStoreVersions.ById.AppStoreReviewDetail { /// - Returns: **200**, Single AppStoreReviewDetail as `AppStoreReviewDetailResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -65,12 +67,18 @@ extension V1.AppStoreVersions.ById.AppStoreReviewDetail { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 404: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -95,162 +103,203 @@ extension V1.AppStoreVersions.ById.AppStoreReviewDetail.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum AppStoreReviewAttachments: Hashable, Codable, RawRepresentable { - case appStoreReviewDetail - case assetDeliveryState - case fileName - case fileSize - case sourceFileChecksum - case uploadOperations - case uploaded - case unknown(String) - - public var rawValue: String { - switch self { - case .appStoreReviewDetail: return "appStoreReviewDetail" - case .assetDeliveryState: return "assetDeliveryState" - case .fileName: return "fileName" - case .fileSize: return "fileSize" - case .sourceFileChecksum: return "sourceFileChecksum" - case .uploadOperations: return "uploadOperations" - case .uploaded: return "uploaded" - case .unknown(let rawValue): return rawValue - } + public struct AppStoreReviewAttachments: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var appStoreReviewDetail: Self { + .init(rawValue: "appStoreReviewDetail") + } + + public static var assetDeliveryState: Self { + .init(rawValue: "assetDeliveryState") + } + + public static var fileName: Self { + .init(rawValue: "fileName") + } + + public static var fileSize: Self { + .init(rawValue: "fileSize") + } + + public static var sourceFileChecksum: Self { + .init(rawValue: "sourceFileChecksum") } + public static var uploadOperations: Self { + .init(rawValue: "uploadOperations") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "appStoreReviewDetail": self = .appStoreReviewDetail - case "assetDeliveryState": self = .assetDeliveryState - case "fileName": self = .fileName - case "fileSize": self = .fileSize - case "sourceFileChecksum": self = .sourceFileChecksum - case "uploadOperations": self = .uploadOperations - case "uploaded": self = .uploaded - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum AppStoreReviewDetails: Hashable, Codable, RawRepresentable { - case appStoreReviewAttachments - case appStoreVersion - case contactEmail - case contactFirstName - case contactLastName - case contactPhone - case demoAccountName - case demoAccountPassword - case demoAccountRequired - case notes - case unknown(String) - - public var rawValue: String { - switch self { - case .appStoreReviewAttachments: return "appStoreReviewAttachments" - case .appStoreVersion: return "appStoreVersion" - case .contactEmail: return "contactEmail" - case .contactFirstName: return "contactFirstName" - case .contactLastName: return "contactLastName" - case .contactPhone: return "contactPhone" - case .demoAccountName: return "demoAccountName" - case .demoAccountPassword: return "demoAccountPassword" - case .demoAccountRequired: return "demoAccountRequired" - case .notes: return "notes" - case .unknown(let rawValue): return rawValue - } + public struct AppStoreReviewDetails: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var appStoreReviewAttachments: Self { + .init(rawValue: "appStoreReviewAttachments") + } + + public static var appStoreVersion: Self { + .init(rawValue: "appStoreVersion") + } + + public static var contactEmail: Self { + .init(rawValue: "contactEmail") + } + + public static var contactFirstName: Self { + .init(rawValue: "contactFirstName") + } + + public static var contactLastName: Self { + .init(rawValue: "contactLastName") + } + + public static var contactPhone: Self { + .init(rawValue: "contactPhone") + } + + public static var demoAccountName: Self { + .init(rawValue: "demoAccountName") + } + + public static var demoAccountPassword: Self { + .init(rawValue: "demoAccountPassword") + } + + public static var demoAccountRequired: Self { + .init(rawValue: "demoAccountRequired") + } + + public static var notes: Self { + .init(rawValue: "notes") + } + + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "appStoreReviewAttachments": self = .appStoreReviewAttachments - case "appStoreVersion": self = .appStoreVersion - case "contactEmail": self = .contactEmail - case "contactFirstName": self = .contactFirstName - case "contactLastName": self = .contactLastName - case "contactPhone": self = .contactPhone - case "demoAccountName": self = .demoAccountName - case "demoAccountPassword": self = .demoAccountPassword - case "demoAccountRequired": self = .demoAccountRequired - case "notes": self = .notes - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum AppStoreVersions: Hashable, Codable, RawRepresentable { - case ageRatingDeclaration - case app - case appClipDefaultExperience - case appStoreReviewDetail - case appStoreState - case appStoreVersionExperiments - case appStoreVersionExperimentsV2 - case appStoreVersionLocalizations - case appStoreVersionPhasedRelease - case appStoreVersionSubmission - case build - case copyright - case createdDate - case customerReviews - case downloadable - case earliestReleaseDate - case platform - case releaseType - case routingAppCoverage - case versionString - case unknown(String) - - public var rawValue: String { - switch self { - case .ageRatingDeclaration: return "ageRatingDeclaration" - case .app: return "app" - case .appClipDefaultExperience: return "appClipDefaultExperience" - case .appStoreReviewDetail: return "appStoreReviewDetail" - case .appStoreState: return "appStoreState" - case .appStoreVersionExperiments: return "appStoreVersionExperiments" - case .appStoreVersionExperimentsV2: return "appStoreVersionExperimentsV2" - case .appStoreVersionLocalizations: return "appStoreVersionLocalizations" - case .appStoreVersionPhasedRelease: return "appStoreVersionPhasedRelease" - case .appStoreVersionSubmission: return "appStoreVersionSubmission" - case .build: return "build" - case .copyright: return "copyright" - case .createdDate: return "createdDate" - case .customerReviews: return "customerReviews" - case .downloadable: return "downloadable" - case .earliestReleaseDate: return "earliestReleaseDate" - case .platform: return "platform" - case .releaseType: return "releaseType" - case .routingAppCoverage: return "routingAppCoverage" - case .versionString: return "versionString" - case .unknown(let rawValue): return rawValue - } + public struct AppStoreVersions: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var ageRatingDeclaration: Self { + .init(rawValue: "ageRatingDeclaration") + } + + public static var alternativeDistributionPackage: Self { + .init(rawValue: "alternativeDistributionPackage") + } + + public static var app: Self { + .init(rawValue: "app") + } + + public static var appClipDefaultExperience: Self { + .init(rawValue: "appClipDefaultExperience") + } + + public static var appStoreReviewDetail: Self { + .init(rawValue: "appStoreReviewDetail") + } + + public static var appStoreState: Self { + .init(rawValue: "appStoreState") } + public static var appStoreVersionExperiments: Self { + .init(rawValue: "appStoreVersionExperiments") + } + + public static var appStoreVersionExperimentsV2: Self { + .init(rawValue: "appStoreVersionExperimentsV2") + } + + public static var appStoreVersionLocalizations: Self { + .init(rawValue: "appStoreVersionLocalizations") + } + + public static var appStoreVersionPhasedRelease: Self { + .init(rawValue: "appStoreVersionPhasedRelease") + } + + public static var appStoreVersionSubmission: Self { + .init(rawValue: "appStoreVersionSubmission") + } + + public static var appVersionState: Self { + .init(rawValue: "appVersionState") + } + + public static var build: Self { + .init(rawValue: "build") + } + + public static var copyright: Self { + .init(rawValue: "copyright") + } + + public static var createdDate: Self { + .init(rawValue: "createdDate") + } + + public static var customerReviews: Self { + .init(rawValue: "customerReviews") + } + + public static var downloadable: Self { + .init(rawValue: "downloadable") + } + + public static var earliestReleaseDate: Self { + .init(rawValue: "earliestReleaseDate") + } + + public static var gameCenterAppVersion: Self { + .init(rawValue: "gameCenterAppVersion") + } + + public static var platform: Self { + .init(rawValue: "platform") + } + + public static var releaseType: Self { + .init(rawValue: "releaseType") + } + + public static var reviewType: Self { + .init(rawValue: "reviewType") + } + + public static var routingAppCoverage: Self { + .init(rawValue: "routingAppCoverage") + } + + public static var usesIdfa: Self { + .init(rawValue: "usesIdfa") + } + + public static var versionString: Self { + .init(rawValue: "versionString") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "ageRatingDeclaration": self = .ageRatingDeclaration - case "app": self = .app - case "appClipDefaultExperience": self = .appClipDefaultExperience - case "appStoreReviewDetail": self = .appStoreReviewDetail - case "appStoreState": self = .appStoreState - case "appStoreVersionExperiments": self = .appStoreVersionExperiments - case "appStoreVersionExperimentsV2": self = .appStoreVersionExperimentsV2 - case "appStoreVersionLocalizations": self = .appStoreVersionLocalizations - case "appStoreVersionPhasedRelease": self = .appStoreVersionPhasedRelease - case "appStoreVersionSubmission": self = .appStoreVersionSubmission - case "build": self = .build - case "copyright": self = .copyright - case "createdDate": self = .createdDate - case "customerReviews": self = .customerReviews - case "downloadable": self = .downloadable - case "earliestReleaseDate": self = .earliestReleaseDate - case "platform": self = .platform - case "releaseType": self = .releaseType - case "routingAppCoverage": self = .routingAppCoverage - case "versionString": self = .versionString - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } @@ -278,25 +327,23 @@ extension V1.AppStoreVersions.ById.AppStoreReviewDetail.GET { } } - public enum Include: Hashable, Codable, RawRepresentable { - case appStoreReviewAttachments - case appStoreVersion - case unknown(String) + public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var appStoreReviewAttachments: Self { + .init(rawValue: "appStoreReviewAttachments") + } - public var rawValue: String { - switch self { - case .appStoreReviewAttachments: return "appStoreReviewAttachments" - case .appStoreVersion: return "appStoreVersion" - case .unknown(let rawValue): return rawValue - } + public static var appStoreVersion: Self { + .init(rawValue: "appStoreVersion") + } + + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "appStoreReviewAttachments": self = .appStoreReviewAttachments - case "appStoreVersion": self = .appStoreVersion - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppStoreVersions/ById/AppStoreVersionExperiments/AppStoreVersionsByIdAppStoreVersionExperiments.GET.88c084b.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppStoreVersions/ById/AppStoreVersionExperiments/AppStoreVersionsByIdAppStoreVersionExperiments.GET.88c084b.generated.swift index 80e0d135..0ccb36bc 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppStoreVersions/ById/AppStoreVersionExperiments/AppStoreVersionsByIdAppStoreVersionExperiments.GET.88c084b.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppStoreVersions/ById/AppStoreVersionExperiments/AppStoreVersionsByIdAppStoreVersionExperiments.GET.88c084b.generated.swift @@ -55,8 +55,10 @@ extension V1.AppStoreVersions.ById.AppStoreVersionExperiments { /// - Returns: **200**, List of AppStoreVersionExperiments as `AppStoreVersionExperimentsResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -70,12 +72,18 @@ extension V1.AppStoreVersions.ById.AppStoreVersionExperiments { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 404: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -103,159 +111,199 @@ extension V1.AppStoreVersions.ById.AppStoreVersionExperiments.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum AppStoreVersionExperimentTreatments: Hashable, Codable, RawRepresentable { - case appIcon - case appIconName - case appStoreVersionExperiment - case appStoreVersionExperimentTreatmentLocalizations - case appStoreVersionExperimentV2 - case name - case promotedDate - case unknown(String) - - public var rawValue: String { - switch self { - case .appIcon: return "appIcon" - case .appIconName: return "appIconName" - case .appStoreVersionExperiment: return "appStoreVersionExperiment" - case .appStoreVersionExperimentTreatmentLocalizations: return "appStoreVersionExperimentTreatmentLocalizations" - case .appStoreVersionExperimentV2: return "appStoreVersionExperimentV2" - case .name: return "name" - case .promotedDate: return "promotedDate" - case .unknown(let rawValue): return rawValue - } + public struct AppStoreVersionExperimentTreatments: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var appIcon: Self { + .init(rawValue: "appIcon") + } + + public static var appIconName: Self { + .init(rawValue: "appIconName") + } + + public static var appStoreVersionExperiment: Self { + .init(rawValue: "appStoreVersionExperiment") + } + + public static var appStoreVersionExperimentTreatmentLocalizations: Self { + .init(rawValue: "appStoreVersionExperimentTreatmentLocalizations") + } + + public static var appStoreVersionExperimentV2: Self { + .init(rawValue: "appStoreVersionExperimentV2") + } + + public static var name: Self { + .init(rawValue: "name") } + public static var promotedDate: Self { + .init(rawValue: "promotedDate") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "appIcon": self = .appIcon - case "appIconName": self = .appIconName - case "appStoreVersionExperiment": self = .appStoreVersionExperiment - case "appStoreVersionExperimentTreatmentLocalizations": self = .appStoreVersionExperimentTreatmentLocalizations - case "appStoreVersionExperimentV2": self = .appStoreVersionExperimentV2 - case "name": self = .name - case "promotedDate": self = .promotedDate - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum AppStoreVersionExperiments: Hashable, Codable, RawRepresentable { - case appStoreVersion - case appStoreVersionExperimentTreatments - case endDate - case name - case reviewRequired - case startDate - case started - case state - case trafficProportion - case unknown(String) - - public var rawValue: String { - switch self { - case .appStoreVersion: return "appStoreVersion" - case .appStoreVersionExperimentTreatments: return "appStoreVersionExperimentTreatments" - case .endDate: return "endDate" - case .name: return "name" - case .reviewRequired: return "reviewRequired" - case .startDate: return "startDate" - case .started: return "started" - case .state: return "state" - case .trafficProportion: return "trafficProportion" - case .unknown(let rawValue): return rawValue - } + public struct AppStoreVersionExperiments: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var appStoreVersion: Self { + .init(rawValue: "appStoreVersion") + } + + public static var appStoreVersionExperimentTreatments: Self { + .init(rawValue: "appStoreVersionExperimentTreatments") + } + + public static var endDate: Self { + .init(rawValue: "endDate") + } + + public static var name: Self { + .init(rawValue: "name") + } + + public static var reviewRequired: Self { + .init(rawValue: "reviewRequired") + } + + public static var startDate: Self { + .init(rawValue: "startDate") + } + + public static var state: Self { + .init(rawValue: "state") + } + + public static var trafficProportion: Self { + .init(rawValue: "trafficProportion") + } + + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "appStoreVersion": self = .appStoreVersion - case "appStoreVersionExperimentTreatments": self = .appStoreVersionExperimentTreatments - case "endDate": self = .endDate - case "name": self = .name - case "reviewRequired": self = .reviewRequired - case "startDate": self = .startDate - case "started": self = .started - case "state": self = .state - case "trafficProportion": self = .trafficProportion - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum AppStoreVersions: Hashable, Codable, RawRepresentable { - case ageRatingDeclaration - case app - case appClipDefaultExperience - case appStoreReviewDetail - case appStoreState - case appStoreVersionExperiments - case appStoreVersionExperimentsV2 - case appStoreVersionLocalizations - case appStoreVersionPhasedRelease - case appStoreVersionSubmission - case build - case copyright - case createdDate - case customerReviews - case downloadable - case earliestReleaseDate - case platform - case releaseType - case routingAppCoverage - case versionString - case unknown(String) - - public var rawValue: String { - switch self { - case .ageRatingDeclaration: return "ageRatingDeclaration" - case .app: return "app" - case .appClipDefaultExperience: return "appClipDefaultExperience" - case .appStoreReviewDetail: return "appStoreReviewDetail" - case .appStoreState: return "appStoreState" - case .appStoreVersionExperiments: return "appStoreVersionExperiments" - case .appStoreVersionExperimentsV2: return "appStoreVersionExperimentsV2" - case .appStoreVersionLocalizations: return "appStoreVersionLocalizations" - case .appStoreVersionPhasedRelease: return "appStoreVersionPhasedRelease" - case .appStoreVersionSubmission: return "appStoreVersionSubmission" - case .build: return "build" - case .copyright: return "copyright" - case .createdDate: return "createdDate" - case .customerReviews: return "customerReviews" - case .downloadable: return "downloadable" - case .earliestReleaseDate: return "earliestReleaseDate" - case .platform: return "platform" - case .releaseType: return "releaseType" - case .routingAppCoverage: return "routingAppCoverage" - case .versionString: return "versionString" - case .unknown(let rawValue): return rawValue - } + public struct AppStoreVersions: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var ageRatingDeclaration: Self { + .init(rawValue: "ageRatingDeclaration") + } + + public static var alternativeDistributionPackage: Self { + .init(rawValue: "alternativeDistributionPackage") + } + + public static var app: Self { + .init(rawValue: "app") + } + + public static var appClipDefaultExperience: Self { + .init(rawValue: "appClipDefaultExperience") + } + + public static var appStoreReviewDetail: Self { + .init(rawValue: "appStoreReviewDetail") + } + + public static var appStoreState: Self { + .init(rawValue: "appStoreState") + } + + public static var appStoreVersionExperiments: Self { + .init(rawValue: "appStoreVersionExperiments") + } + + public static var appStoreVersionExperimentsV2: Self { + .init(rawValue: "appStoreVersionExperimentsV2") + } + + public static var appStoreVersionLocalizations: Self { + .init(rawValue: "appStoreVersionLocalizations") + } + + public static var appStoreVersionPhasedRelease: Self { + .init(rawValue: "appStoreVersionPhasedRelease") + } + + public static var appStoreVersionSubmission: Self { + .init(rawValue: "appStoreVersionSubmission") } + public static var appVersionState: Self { + .init(rawValue: "appVersionState") + } + + public static var build: Self { + .init(rawValue: "build") + } + + public static var copyright: Self { + .init(rawValue: "copyright") + } + + public static var createdDate: Self { + .init(rawValue: "createdDate") + } + + public static var customerReviews: Self { + .init(rawValue: "customerReviews") + } + + public static var downloadable: Self { + .init(rawValue: "downloadable") + } + + public static var earliestReleaseDate: Self { + .init(rawValue: "earliestReleaseDate") + } + + public static var gameCenterAppVersion: Self { + .init(rawValue: "gameCenterAppVersion") + } + + public static var platform: Self { + .init(rawValue: "platform") + } + + public static var releaseType: Self { + .init(rawValue: "releaseType") + } + + public static var reviewType: Self { + .init(rawValue: "reviewType") + } + + public static var routingAppCoverage: Self { + .init(rawValue: "routingAppCoverage") + } + + public static var usesIdfa: Self { + .init(rawValue: "usesIdfa") + } + + public static var versionString: Self { + .init(rawValue: "versionString") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "ageRatingDeclaration": self = .ageRatingDeclaration - case "app": self = .app - case "appClipDefaultExperience": self = .appClipDefaultExperience - case "appStoreReviewDetail": self = .appStoreReviewDetail - case "appStoreState": self = .appStoreState - case "appStoreVersionExperiments": self = .appStoreVersionExperiments - case "appStoreVersionExperimentsV2": self = .appStoreVersionExperimentsV2 - case "appStoreVersionLocalizations": self = .appStoreVersionLocalizations - case "appStoreVersionPhasedRelease": self = .appStoreVersionPhasedRelease - case "appStoreVersionSubmission": self = .appStoreVersionSubmission - case "build": self = .build - case "copyright": self = .copyright - case "createdDate": self = .createdDate - case "customerReviews": self = .customerReviews - case "downloadable": self = .downloadable - case "earliestReleaseDate": self = .earliestReleaseDate - case "platform": self = .platform - case "releaseType": self = .releaseType - case "routingAppCoverage": self = .routingAppCoverage - case "versionString": self = .versionString - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } @@ -291,46 +339,51 @@ extension V1.AppStoreVersions.ById.AppStoreVersionExperiments.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum State: Hashable, Codable, RawRepresentable { - case accepted - case approved - case completed - case inReview - case prepareForSubmission - case readyForReview - case rejected - case stopped - case waitingForReview - case unknown(String) - - public var rawValue: String { - switch self { - case .accepted: return "ACCEPTED" - case .approved: return "APPROVED" - case .completed: return "COMPLETED" - case .inReview: return "IN_REVIEW" - case .prepareForSubmission: return "PREPARE_FOR_SUBMISSION" - case .readyForReview: return "READY_FOR_REVIEW" - case .rejected: return "REJECTED" - case .stopped: return "STOPPED" - case .waitingForReview: return "WAITING_FOR_REVIEW" - case .unknown(let rawValue): return rawValue - } + public struct State: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var accepted: Self { + .init(rawValue: "ACCEPTED") + } + + public static var approved: Self { + .init(rawValue: "APPROVED") + } + + public static var completed: Self { + .init(rawValue: "COMPLETED") + } + + public static var inReview: Self { + .init(rawValue: "IN_REVIEW") + } + + public static var prepareForSubmission: Self { + .init(rawValue: "PREPARE_FOR_SUBMISSION") + } + + public static var readyForReview: Self { + .init(rawValue: "READY_FOR_REVIEW") + } + + public static var rejected: Self { + .init(rawValue: "REJECTED") + } + + public static var stopped: Self { + .init(rawValue: "STOPPED") + } + + public static var waitingForReview: Self { + .init(rawValue: "WAITING_FOR_REVIEW") + } + + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "ACCEPTED": self = .accepted - case "APPROVED": self = .approved - case "COMPLETED": self = .completed - case "IN_REVIEW": self = .inReview - case "PREPARE_FOR_SUBMISSION": self = .prepareForSubmission - case "READY_FOR_REVIEW": self = .readyForReview - case "REJECTED": self = .rejected - case "STOPPED": self = .stopped - case "WAITING_FOR_REVIEW": self = .waitingForReview - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } @@ -348,25 +401,23 @@ extension V1.AppStoreVersions.ById.AppStoreVersionExperiments.GET { } } - public enum Include: Hashable, Codable, RawRepresentable { - case appStoreVersion - case appStoreVersionExperimentTreatments - case unknown(String) + public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var appStoreVersion: Self { + .init(rawValue: "appStoreVersion") + } - public var rawValue: String { - switch self { - case .appStoreVersion: return "appStoreVersion" - case .appStoreVersionExperimentTreatments: return "appStoreVersionExperimentTreatments" - case .unknown(let rawValue): return rawValue - } + public static var appStoreVersionExperimentTreatments: Self { + .init(rawValue: "appStoreVersionExperimentTreatments") } + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "appStoreVersion": self = .appStoreVersion - case "appStoreVersionExperimentTreatments": self = .appStoreVersionExperimentTreatments - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppStoreVersions/ById/AppStoreVersionExperimentsV2/AppStoreVersionsByIdAppStoreVersionExperimentsV2.GET.0ffe859.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppStoreVersions/ById/AppStoreVersionExperimentsV2/AppStoreVersionsByIdAppStoreVersionExperimentsV2.GET.0ffe859.generated.swift index 4ad19212..187833bc 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppStoreVersions/ById/AppStoreVersionExperimentsV2/AppStoreVersionsByIdAppStoreVersionExperimentsV2.GET.0ffe859.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppStoreVersions/ById/AppStoreVersionExperimentsV2/AppStoreVersionsByIdAppStoreVersionExperimentsV2.GET.0ffe859.generated.swift @@ -58,8 +58,10 @@ extension V1.AppStoreVersions.ById.AppStoreVersionExperimentsV2 { /// - Returns: **200**, List of AppStoreVersionExperiments as `AppStoreVersionExperimentsV2Response` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -73,12 +75,18 @@ extension V1.AppStoreVersions.ById.AppStoreVersionExperimentsV2 { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 404: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -106,316 +114,423 @@ extension V1.AppStoreVersions.ById.AppStoreVersionExperimentsV2.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum AppStoreVersionExperimentTreatments: Hashable, Codable, RawRepresentable { - case appIcon - case appIconName - case appStoreVersionExperiment - case appStoreVersionExperimentTreatmentLocalizations - case appStoreVersionExperimentV2 - case name - case promotedDate - case unknown(String) - - public var rawValue: String { - switch self { - case .appIcon: return "appIcon" - case .appIconName: return "appIconName" - case .appStoreVersionExperiment: return "appStoreVersionExperiment" - case .appStoreVersionExperimentTreatmentLocalizations: return "appStoreVersionExperimentTreatmentLocalizations" - case .appStoreVersionExperimentV2: return "appStoreVersionExperimentV2" - case .name: return "name" - case .promotedDate: return "promotedDate" - case .unknown(let rawValue): return rawValue - } + public struct AppStoreVersionExperimentTreatments: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var appIcon: Self { + .init(rawValue: "appIcon") + } + + public static var appIconName: Self { + .init(rawValue: "appIconName") + } + + public static var appStoreVersionExperiment: Self { + .init(rawValue: "appStoreVersionExperiment") + } + + public static var appStoreVersionExperimentTreatmentLocalizations: Self { + .init(rawValue: "appStoreVersionExperimentTreatmentLocalizations") + } + + public static var appStoreVersionExperimentV2: Self { + .init(rawValue: "appStoreVersionExperimentV2") + } + + public static var name: Self { + .init(rawValue: "name") } + public static var promotedDate: Self { + .init(rawValue: "promotedDate") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "appIcon": self = .appIcon - case "appIconName": self = .appIconName - case "appStoreVersionExperiment": self = .appStoreVersionExperiment - case "appStoreVersionExperimentTreatmentLocalizations": self = .appStoreVersionExperimentTreatmentLocalizations - case "appStoreVersionExperimentV2": self = .appStoreVersionExperimentV2 - case "name": self = .name - case "promotedDate": self = .promotedDate - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum AppStoreVersionExperiments: Hashable, Codable, RawRepresentable { - case app - case appStoreVersionExperimentTreatments - case controlVersions - case endDate - case latestControlVersion - case name - case platform - case reviewRequired - case startDate - case started - case state - case trafficProportion - case unknown(String) - - public var rawValue: String { - switch self { - case .app: return "app" - case .appStoreVersionExperimentTreatments: return "appStoreVersionExperimentTreatments" - case .controlVersions: return "controlVersions" - case .endDate: return "endDate" - case .latestControlVersion: return "latestControlVersion" - case .name: return "name" - case .platform: return "platform" - case .reviewRequired: return "reviewRequired" - case .startDate: return "startDate" - case .started: return "started" - case .state: return "state" - case .trafficProportion: return "trafficProportion" - case .unknown(let rawValue): return rawValue - } + public struct AppStoreVersionExperiments: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var app: Self { + .init(rawValue: "app") + } + + public static var appStoreVersionExperimentTreatments: Self { + .init(rawValue: "appStoreVersionExperimentTreatments") + } + + public static var controlVersions: Self { + .init(rawValue: "controlVersions") + } + + public static var endDate: Self { + .init(rawValue: "endDate") + } + + public static var latestControlVersion: Self { + .init(rawValue: "latestControlVersion") + } + + public static var name: Self { + .init(rawValue: "name") + } + + public static var platform: Self { + .init(rawValue: "platform") + } + + public static var reviewRequired: Self { + .init(rawValue: "reviewRequired") + } + + public static var startDate: Self { + .init(rawValue: "startDate") } + public static var state: Self { + .init(rawValue: "state") + } + + public static var trafficProportion: Self { + .init(rawValue: "trafficProportion") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "app": self = .app - case "appStoreVersionExperimentTreatments": self = .appStoreVersionExperimentTreatments - case "controlVersions": self = .controlVersions - case "endDate": self = .endDate - case "latestControlVersion": self = .latestControlVersion - case "name": self = .name - case "platform": self = .platform - case "reviewRequired": self = .reviewRequired - case "startDate": self = .startDate - case "started": self = .started - case "state": self = .state - case "trafficProportion": self = .trafficProportion - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum AppStoreVersions: Hashable, Codable, RawRepresentable { - case ageRatingDeclaration - case app - case appClipDefaultExperience - case appStoreReviewDetail - case appStoreState - case appStoreVersionExperiments - case appStoreVersionExperimentsV2 - case appStoreVersionLocalizations - case appStoreVersionPhasedRelease - case appStoreVersionSubmission - case build - case copyright - case createdDate - case customerReviews - case downloadable - case earliestReleaseDate - case platform - case releaseType - case routingAppCoverage - case versionString - case unknown(String) - - public var rawValue: String { - switch self { - case .ageRatingDeclaration: return "ageRatingDeclaration" - case .app: return "app" - case .appClipDefaultExperience: return "appClipDefaultExperience" - case .appStoreReviewDetail: return "appStoreReviewDetail" - case .appStoreState: return "appStoreState" - case .appStoreVersionExperiments: return "appStoreVersionExperiments" - case .appStoreVersionExperimentsV2: return "appStoreVersionExperimentsV2" - case .appStoreVersionLocalizations: return "appStoreVersionLocalizations" - case .appStoreVersionPhasedRelease: return "appStoreVersionPhasedRelease" - case .appStoreVersionSubmission: return "appStoreVersionSubmission" - case .build: return "build" - case .copyright: return "copyright" - case .createdDate: return "createdDate" - case .customerReviews: return "customerReviews" - case .downloadable: return "downloadable" - case .earliestReleaseDate: return "earliestReleaseDate" - case .platform: return "platform" - case .releaseType: return "releaseType" - case .routingAppCoverage: return "routingAppCoverage" - case .versionString: return "versionString" - case .unknown(let rawValue): return rawValue - } + public struct AppStoreVersions: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var ageRatingDeclaration: Self { + .init(rawValue: "ageRatingDeclaration") + } + + public static var alternativeDistributionPackage: Self { + .init(rawValue: "alternativeDistributionPackage") + } + + public static var app: Self { + .init(rawValue: "app") + } + + public static var appClipDefaultExperience: Self { + .init(rawValue: "appClipDefaultExperience") + } + + public static var appStoreReviewDetail: Self { + .init(rawValue: "appStoreReviewDetail") + } + + public static var appStoreState: Self { + .init(rawValue: "appStoreState") + } + + public static var appStoreVersionExperiments: Self { + .init(rawValue: "appStoreVersionExperiments") + } + + public static var appStoreVersionExperimentsV2: Self { + .init(rawValue: "appStoreVersionExperimentsV2") } + public static var appStoreVersionLocalizations: Self { + .init(rawValue: "appStoreVersionLocalizations") + } + + public static var appStoreVersionPhasedRelease: Self { + .init(rawValue: "appStoreVersionPhasedRelease") + } + + public static var appStoreVersionSubmission: Self { + .init(rawValue: "appStoreVersionSubmission") + } + + public static var appVersionState: Self { + .init(rawValue: "appVersionState") + } + + public static var build: Self { + .init(rawValue: "build") + } + + public static var copyright: Self { + .init(rawValue: "copyright") + } + + public static var createdDate: Self { + .init(rawValue: "createdDate") + } + + public static var customerReviews: Self { + .init(rawValue: "customerReviews") + } + + public static var downloadable: Self { + .init(rawValue: "downloadable") + } + + public static var earliestReleaseDate: Self { + .init(rawValue: "earliestReleaseDate") + } + + public static var gameCenterAppVersion: Self { + .init(rawValue: "gameCenterAppVersion") + } + + public static var platform: Self { + .init(rawValue: "platform") + } + + public static var releaseType: Self { + .init(rawValue: "releaseType") + } + + public static var reviewType: Self { + .init(rawValue: "reviewType") + } + + public static var routingAppCoverage: Self { + .init(rawValue: "routingAppCoverage") + } + + public static var usesIdfa: Self { + .init(rawValue: "usesIdfa") + } + + public static var versionString: Self { + .init(rawValue: "versionString") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "ageRatingDeclaration": self = .ageRatingDeclaration - case "app": self = .app - case "appClipDefaultExperience": self = .appClipDefaultExperience - case "appStoreReviewDetail": self = .appStoreReviewDetail - case "appStoreState": self = .appStoreState - case "appStoreVersionExperiments": self = .appStoreVersionExperiments - case "appStoreVersionExperimentsV2": self = .appStoreVersionExperimentsV2 - case "appStoreVersionLocalizations": self = .appStoreVersionLocalizations - case "appStoreVersionPhasedRelease": self = .appStoreVersionPhasedRelease - case "appStoreVersionSubmission": self = .appStoreVersionSubmission - case "build": self = .build - case "copyright": self = .copyright - case "createdDate": self = .createdDate - case "customerReviews": self = .customerReviews - case "downloadable": self = .downloadable - case "earliestReleaseDate": self = .earliestReleaseDate - case "platform": self = .platform - case "releaseType": self = .releaseType - case "routingAppCoverage": self = .routingAppCoverage - case "versionString": self = .versionString - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum Apps: Hashable, Codable, RawRepresentable { - case appAvailability - case appClips - case appCustomProductPages - case appEncryptionDeclarations - case appEvents - case appInfos - case appPricePoints - case appPriceSchedule - case appStoreVersionExperimentsV2 - case appStoreVersions - case availableInNewTerritories - case availableTerritories - case betaAppLocalizations - case betaAppReviewDetail - case betaGroups - case betaLicenseAgreement - case betaTesters - case builds - case bundleId - case ciProduct - case contentRightsDeclaration - case customerReviews - case endUserLicenseAgreement - case gameCenterDetail - case gameCenterEnabledVersions - case inAppPurchases - case inAppPurchasesV2 - case isOrEverWasMadeForKids - case name - case perfPowerMetrics - case preOrder - case preReleaseVersions - case pricePoints - case prices - case primaryLocale - case promotedPurchases - case reviewSubmissions - case sku - case subscriptionGracePeriod - case subscriptionGroups - case subscriptionStatusUrl - case subscriptionStatusUrlForSandbox - case subscriptionStatusUrlVersion - case subscriptionStatusUrlVersionForSandbox - case unknown(String) - - public var rawValue: String { - switch self { - case .appAvailability: return "appAvailability" - case .appClips: return "appClips" - case .appCustomProductPages: return "appCustomProductPages" - case .appEncryptionDeclarations: return "appEncryptionDeclarations" - case .appEvents: return "appEvents" - case .appInfos: return "appInfos" - case .appPricePoints: return "appPricePoints" - case .appPriceSchedule: return "appPriceSchedule" - case .appStoreVersionExperimentsV2: return "appStoreVersionExperimentsV2" - case .appStoreVersions: return "appStoreVersions" - case .availableInNewTerritories: return "availableInNewTerritories" - case .availableTerritories: return "availableTerritories" - case .betaAppLocalizations: return "betaAppLocalizations" - case .betaAppReviewDetail: return "betaAppReviewDetail" - case .betaGroups: return "betaGroups" - case .betaLicenseAgreement: return "betaLicenseAgreement" - case .betaTesters: return "betaTesters" - case .builds: return "builds" - case .bundleId: return "bundleId" - case .ciProduct: return "ciProduct" - case .contentRightsDeclaration: return "contentRightsDeclaration" - case .customerReviews: return "customerReviews" - case .endUserLicenseAgreement: return "endUserLicenseAgreement" - case .gameCenterDetail: return "gameCenterDetail" - case .gameCenterEnabledVersions: return "gameCenterEnabledVersions" - case .inAppPurchases: return "inAppPurchases" - case .inAppPurchasesV2: return "inAppPurchasesV2" - case .isOrEverWasMadeForKids: return "isOrEverWasMadeForKids" - case .name: return "name" - case .perfPowerMetrics: return "perfPowerMetrics" - case .preOrder: return "preOrder" - case .preReleaseVersions: return "preReleaseVersions" - case .pricePoints: return "pricePoints" - case .prices: return "prices" - case .primaryLocale: return "primaryLocale" - case .promotedPurchases: return "promotedPurchases" - case .reviewSubmissions: return "reviewSubmissions" - case .sku: return "sku" - case .subscriptionGracePeriod: return "subscriptionGracePeriod" - case .subscriptionGroups: return "subscriptionGroups" - case .subscriptionStatusUrl: return "subscriptionStatusUrl" - case .subscriptionStatusUrlForSandbox: return "subscriptionStatusUrlForSandbox" - case .subscriptionStatusUrlVersion: return "subscriptionStatusUrlVersion" - case .subscriptionStatusUrlVersionForSandbox: return "subscriptionStatusUrlVersionForSandbox" - case .unknown(let rawValue): return rawValue - } + public struct Apps: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var accessibilityDeclarations: Self { + .init(rawValue: "accessibilityDeclarations") + } + + public static var accessibilityUrl: Self { + .init(rawValue: "accessibilityUrl") + } + + public static var alternativeDistributionKey: Self { + .init(rawValue: "alternativeDistributionKey") + } + + public static var analyticsReportRequests: Self { + .init(rawValue: "analyticsReportRequests") + } + + public static var appAvailabilityV2: Self { + .init(rawValue: "appAvailabilityV2") + } + + public static var appClips: Self { + .init(rawValue: "appClips") + } + + public static var appCustomProductPages: Self { + .init(rawValue: "appCustomProductPages") + } + + public static var appEncryptionDeclarations: Self { + .init(rawValue: "appEncryptionDeclarations") + } + + public static var appEvents: Self { + .init(rawValue: "appEvents") + } + + public static var appInfos: Self { + .init(rawValue: "appInfos") + } + + public static var appPricePoints: Self { + .init(rawValue: "appPricePoints") + } + + public static var appPriceSchedule: Self { + .init(rawValue: "appPriceSchedule") + } + + public static var appStoreVersionExperimentsV2: Self { + .init(rawValue: "appStoreVersionExperimentsV2") + } + + public static var appStoreVersions: Self { + .init(rawValue: "appStoreVersions") + } + + public static var backgroundAssets: Self { + .init(rawValue: "backgroundAssets") + } + + public static var betaAppLocalizations: Self { + .init(rawValue: "betaAppLocalizations") + } + + public static var betaAppReviewDetail: Self { + .init(rawValue: "betaAppReviewDetail") + } + + public static var betaFeedbackCrashSubmissions: Self { + .init(rawValue: "betaFeedbackCrashSubmissions") + } + + public static var betaFeedbackScreenshotSubmissions: Self { + .init(rawValue: "betaFeedbackScreenshotSubmissions") + } + + public static var betaGroups: Self { + .init(rawValue: "betaGroups") + } + + public static var betaLicenseAgreement: Self { + .init(rawValue: "betaLicenseAgreement") + } + + public static var betaTesters: Self { + .init(rawValue: "betaTesters") + } + + public static var builds: Self { + .init(rawValue: "builds") + } + + public static var bundleId: Self { + .init(rawValue: "bundleId") + } + + public static var ciProduct: Self { + .init(rawValue: "ciProduct") + } + + public static var contentRightsDeclaration: Self { + .init(rawValue: "contentRightsDeclaration") + } + + public static var customerReviewSummarizations: Self { + .init(rawValue: "customerReviewSummarizations") + } + + public static var customerReviews: Self { + .init(rawValue: "customerReviews") + } + + public static var endUserLicenseAgreement: Self { + .init(rawValue: "endUserLicenseAgreement") + } + + public static var gameCenterDetail: Self { + .init(rawValue: "gameCenterDetail") + } + + public static var gameCenterEnabledVersions: Self { + .init(rawValue: "gameCenterEnabledVersions") + } + + public static var inAppPurchases: Self { + .init(rawValue: "inAppPurchases") + } + + public static var inAppPurchasesV2: Self { + .init(rawValue: "inAppPurchasesV2") + } + + public static var isOrEverWasMadeForKids: Self { + .init(rawValue: "isOrEverWasMadeForKids") + } + + public static var marketplaceSearchDetail: Self { + .init(rawValue: "marketplaceSearchDetail") + } + + public static var name: Self { + .init(rawValue: "name") + } + + public static var perfPowerMetrics: Self { + .init(rawValue: "perfPowerMetrics") + } + + public static var preReleaseVersions: Self { + .init(rawValue: "preReleaseVersions") + } + + public static var primaryLocale: Self { + .init(rawValue: "primaryLocale") + } + + public static var promotedPurchases: Self { + .init(rawValue: "promotedPurchases") + } + + public static var reviewSubmissions: Self { + .init(rawValue: "reviewSubmissions") + } + + public static var sku: Self { + .init(rawValue: "sku") + } + + public static var streamlinedPurchasingEnabled: Self { + .init(rawValue: "streamlinedPurchasingEnabled") + } + + public static var subscriptionGracePeriod: Self { + .init(rawValue: "subscriptionGracePeriod") + } + + public static var subscriptionGroups: Self { + .init(rawValue: "subscriptionGroups") + } + + public static var subscriptionStatusUrl: Self { + .init(rawValue: "subscriptionStatusUrl") + } + + public static var subscriptionStatusUrlForSandbox: Self { + .init(rawValue: "subscriptionStatusUrlForSandbox") + } + + public static var subscriptionStatusUrlVersion: Self { + .init(rawValue: "subscriptionStatusUrlVersion") + } + + public static var subscriptionStatusUrlVersionForSandbox: Self { + .init(rawValue: "subscriptionStatusUrlVersionForSandbox") } + public static var webhooks: Self { + .init(rawValue: "webhooks") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "appAvailability": self = .appAvailability - case "appClips": self = .appClips - case "appCustomProductPages": self = .appCustomProductPages - case "appEncryptionDeclarations": self = .appEncryptionDeclarations - case "appEvents": self = .appEvents - case "appInfos": self = .appInfos - case "appPricePoints": self = .appPricePoints - case "appPriceSchedule": self = .appPriceSchedule - case "appStoreVersionExperimentsV2": self = .appStoreVersionExperimentsV2 - case "appStoreVersions": self = .appStoreVersions - case "availableInNewTerritories": self = .availableInNewTerritories - case "availableTerritories": self = .availableTerritories - case "betaAppLocalizations": self = .betaAppLocalizations - case "betaAppReviewDetail": self = .betaAppReviewDetail - case "betaGroups": self = .betaGroups - case "betaLicenseAgreement": self = .betaLicenseAgreement - case "betaTesters": self = .betaTesters - case "builds": self = .builds - case "bundleId": self = .bundleId - case "ciProduct": self = .ciProduct - case "contentRightsDeclaration": self = .contentRightsDeclaration - case "customerReviews": self = .customerReviews - case "endUserLicenseAgreement": self = .endUserLicenseAgreement - case "gameCenterDetail": self = .gameCenterDetail - case "gameCenterEnabledVersions": self = .gameCenterEnabledVersions - case "inAppPurchases": self = .inAppPurchases - case "inAppPurchasesV2": self = .inAppPurchasesV2 - case "isOrEverWasMadeForKids": self = .isOrEverWasMadeForKids - case "name": self = .name - case "perfPowerMetrics": self = .perfPowerMetrics - case "preOrder": self = .preOrder - case "preReleaseVersions": self = .preReleaseVersions - case "pricePoints": self = .pricePoints - case "prices": self = .prices - case "primaryLocale": self = .primaryLocale - case "promotedPurchases": self = .promotedPurchases - case "reviewSubmissions": self = .reviewSubmissions - case "sku": self = .sku - case "subscriptionGracePeriod": self = .subscriptionGracePeriod - case "subscriptionGroups": self = .subscriptionGroups - case "subscriptionStatusUrl": self = .subscriptionStatusUrl - case "subscriptionStatusUrlForSandbox": self = .subscriptionStatusUrlForSandbox - case "subscriptionStatusUrlVersion": self = .subscriptionStatusUrlVersion - case "subscriptionStatusUrlVersionForSandbox": self = .subscriptionStatusUrlVersionForSandbox - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } @@ -456,46 +571,51 @@ extension V1.AppStoreVersions.ById.AppStoreVersionExperimentsV2.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum State: Hashable, Codable, RawRepresentable { - case accepted - case approved - case completed - case inReview - case prepareForSubmission - case readyForReview - case rejected - case stopped - case waitingForReview - case unknown(String) - - public var rawValue: String { - switch self { - case .accepted: return "ACCEPTED" - case .approved: return "APPROVED" - case .completed: return "COMPLETED" - case .inReview: return "IN_REVIEW" - case .prepareForSubmission: return "PREPARE_FOR_SUBMISSION" - case .readyForReview: return "READY_FOR_REVIEW" - case .rejected: return "REJECTED" - case .stopped: return "STOPPED" - case .waitingForReview: return "WAITING_FOR_REVIEW" - case .unknown(let rawValue): return rawValue - } + public struct State: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var accepted: Self { + .init(rawValue: "ACCEPTED") + } + + public static var approved: Self { + .init(rawValue: "APPROVED") } + public static var completed: Self { + .init(rawValue: "COMPLETED") + } + + public static var inReview: Self { + .init(rawValue: "IN_REVIEW") + } + + public static var prepareForSubmission: Self { + .init(rawValue: "PREPARE_FOR_SUBMISSION") + } + + public static var readyForReview: Self { + .init(rawValue: "READY_FOR_REVIEW") + } + + public static var rejected: Self { + .init(rawValue: "REJECTED") + } + + public static var stopped: Self { + .init(rawValue: "STOPPED") + } + + public static var waitingForReview: Self { + .init(rawValue: "WAITING_FOR_REVIEW") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "ACCEPTED": self = .accepted - case "APPROVED": self = .approved - case "COMPLETED": self = .completed - case "IN_REVIEW": self = .inReview - case "PREPARE_FOR_SUBMISSION": self = .prepareForSubmission - case "READY_FOR_REVIEW": self = .readyForReview - case "REJECTED": self = .rejected - case "STOPPED": self = .stopped - case "WAITING_FOR_REVIEW": self = .waitingForReview - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } @@ -513,31 +633,31 @@ extension V1.AppStoreVersions.ById.AppStoreVersionExperimentsV2.GET { } } - public enum Include: Hashable, Codable, RawRepresentable { - case app - case appStoreVersionExperimentTreatments - case controlVersions - case latestControlVersion - case unknown(String) - - public var rawValue: String { - switch self { - case .app: return "app" - case .appStoreVersionExperimentTreatments: return "appStoreVersionExperimentTreatments" - case .controlVersions: return "controlVersions" - case .latestControlVersion: return "latestControlVersion" - case .unknown(let rawValue): return rawValue - } + public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var app: Self { + .init(rawValue: "app") + } + + public static var appStoreVersionExperimentTreatments: Self { + .init(rawValue: "appStoreVersionExperimentTreatments") + } + + public static var controlVersions: Self { + .init(rawValue: "controlVersions") + } + + public static var latestControlVersion: Self { + .init(rawValue: "latestControlVersion") } + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "app": self = .app - case "appStoreVersionExperimentTreatments": self = .appStoreVersionExperimentTreatments - case "controlVersions": self = .controlVersions - case "latestControlVersion": self = .latestControlVersion - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppStoreVersions/ById/AppStoreVersionLocalizations/AppStoreVersionsByIdAppStoreVersionLocalizations.GET.4eb815e.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppStoreVersions/ById/AppStoreVersionLocalizations/AppStoreVersionsByIdAppStoreVersionLocalizations.GET.4eb815e.generated.swift index 90c0793f..21dc6648 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppStoreVersions/ById/AppStoreVersionLocalizations/AppStoreVersionsByIdAppStoreVersionLocalizations.GET.4eb815e.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppStoreVersions/ById/AppStoreVersionLocalizations/AppStoreVersionsByIdAppStoreVersionLocalizations.GET.4eb815e.generated.swift @@ -8,7 +8,7 @@ import FoundationNetworking extension V1.AppStoreVersions.ById.AppStoreVersionLocalizations { public struct GET: Endpoint { - public typealias Response = AppStoreVersionLocalizationsWithoutIncludesResponse + public typealias Response = AppStoreVersionLocalizationsResponse public var path: String { "/v1/appStoreVersions/\(id)/appStoreVersionLocalizations" @@ -28,10 +28,24 @@ extension V1.AppStoreVersions.ById.AppStoreVersionLocalizations { components?.path = path components?.queryItems = [ + URLQueryItem(name: "fields[appPreviewSets]", + value: parameters.fields[.appPreviewSets]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "fields[appScreenshotSets]", + value: parameters.fields[.appScreenshotSets]?.map { "\($0)" }.joined(separator: ",")), URLQueryItem(name: "fields[appStoreVersionLocalizations]", value: parameters.fields[.appStoreVersionLocalizations]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "fields[appStoreVersions]", + value: parameters.fields[.appStoreVersions]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "filter[locale]", + value: parameters.filter[.locale]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "include", + value: parameters.include?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "limit[appPreviewSets]", + value: parameters.limit[.appPreviewSets].map { "\($0)" }), + URLQueryItem(name: "limit[appScreenshotSets]", + value: parameters.limit[.appScreenshotSets].map { "\($0)" }), URLQueryItem(name: "limit", - value: parameters.limit.map { "\($0)" }) + value: parameters.limit[].map { "\($0)" }) ].filter { $0.value != nil } if components?.queryItems?.isEmpty ?? false { components?.queryItems = nil @@ -42,10 +56,12 @@ extension V1.AppStoreVersions.ById.AppStoreVersionLocalizations { return urlRequest } - /// - Returns: **200**, List of AppStoreVersionLocalizations with get as `AppStoreVersionLocalizationsWithoutIncludesResponse` + /// - Returns: **200**, List of AppStoreVersionLocalizations as `AppStoreVersionLocalizationsResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -54,17 +70,23 @@ extension V1.AppStoreVersions.ById.AppStoreVersionLocalizations { switch urlResponse.statusCode { case 200: - return try jsonDecoder.decode(AppStoreVersionLocalizationsWithoutIncludesResponse.self, from: data) + return try jsonDecoder.decode(AppStoreVersionLocalizationsResponse.self, from: data) case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 404: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -76,8 +98,13 @@ extension V1.AppStoreVersions.ById.AppStoreVersionLocalizations.GET { public struct Parameters: Hashable { public var fields: Fields = Fields() + public var filter: Filter = Filter() + + /// comma-separated list of relationships to include + public var include: [Include]? + /// maximum resources per page - public var limit: Int? + public var limit: Limit = Limit() public struct Fields: Hashable { public subscript (_ relation: Relation) -> T { @@ -87,58 +114,333 @@ extension V1.AppStoreVersions.ById.AppStoreVersionLocalizations.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum AppStoreVersionLocalizations: Hashable, Codable, RawRepresentable { - case appPreviewSets - case appScreenshotSets - case appStoreVersion - case description - case keywords - case locale - case marketingUrl - case promotionalText - case supportUrl - case whatsNew - case unknown(String) - - public var rawValue: String { - switch self { - case .appPreviewSets: return "appPreviewSets" - case .appScreenshotSets: return "appScreenshotSets" - case .appStoreVersion: return "appStoreVersion" - case .description: return "description" - case .keywords: return "keywords" - case .locale: return "locale" - case .marketingUrl: return "marketingUrl" - case .promotionalText: return "promotionalText" - case .supportUrl: return "supportUrl" - case .whatsNew: return "whatsNew" - case .unknown(let rawValue): return rawValue - } + public struct AppPreviewSets: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var appCustomProductPageLocalization: Self { + .init(rawValue: "appCustomProductPageLocalization") + } + + public static var appPreviews: Self { + .init(rawValue: "appPreviews") + } + + public static var appStoreVersionExperimentTreatmentLocalization: Self { + .init(rawValue: "appStoreVersionExperimentTreatmentLocalization") + } + + public static var appStoreVersionLocalization: Self { + .init(rawValue: "appStoreVersionLocalization") + } + + public static var previewType: Self { + .init(rawValue: "previewType") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct AppScreenshotSets: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var appCustomProductPageLocalization: Self { + .init(rawValue: "appCustomProductPageLocalization") + } + + public static var appScreenshots: Self { + .init(rawValue: "appScreenshots") + } + + public static var appStoreVersionExperimentTreatmentLocalization: Self { + .init(rawValue: "appStoreVersionExperimentTreatmentLocalization") + } + + public static var appStoreVersionLocalization: Self { + .init(rawValue: "appStoreVersionLocalization") + } + + public static var screenshotDisplayType: Self { + .init(rawValue: "screenshotDisplayType") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct AppStoreVersionLocalizations: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var appPreviewSets: Self { + .init(rawValue: "appPreviewSets") + } + + public static var appScreenshotSets: Self { + .init(rawValue: "appScreenshotSets") + } + + public static var appStoreVersion: Self { + .init(rawValue: "appStoreVersion") + } + + public static var description: Self { + .init(rawValue: "description") + } + + public static var keywords: Self { + .init(rawValue: "keywords") + } + + public static var locale: Self { + .init(rawValue: "locale") + } + + public static var marketingUrl: Self { + .init(rawValue: "marketingUrl") + } + + public static var promotionalText: Self { + .init(rawValue: "promotionalText") + } + + public static var supportUrl: Self { + .init(rawValue: "supportUrl") + } + + public static var whatsNew: Self { + .init(rawValue: "whatsNew") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct AppStoreVersions: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var ageRatingDeclaration: Self { + .init(rawValue: "ageRatingDeclaration") + } + + public static var alternativeDistributionPackage: Self { + .init(rawValue: "alternativeDistributionPackage") + } + + public static var app: Self { + .init(rawValue: "app") + } + + public static var appClipDefaultExperience: Self { + .init(rawValue: "appClipDefaultExperience") + } + + public static var appStoreReviewDetail: Self { + .init(rawValue: "appStoreReviewDetail") + } + + public static var appStoreState: Self { + .init(rawValue: "appStoreState") + } + + public static var appStoreVersionExperiments: Self { + .init(rawValue: "appStoreVersionExperiments") + } + + public static var appStoreVersionExperimentsV2: Self { + .init(rawValue: "appStoreVersionExperimentsV2") + } + + public static var appStoreVersionLocalizations: Self { + .init(rawValue: "appStoreVersionLocalizations") + } + + public static var appStoreVersionPhasedRelease: Self { + .init(rawValue: "appStoreVersionPhasedRelease") + } + + public static var appStoreVersionSubmission: Self { + .init(rawValue: "appStoreVersionSubmission") + } + + public static var appVersionState: Self { + .init(rawValue: "appVersionState") + } + + public static var build: Self { + .init(rawValue: "build") + } + + public static var copyright: Self { + .init(rawValue: "copyright") + } + + public static var createdDate: Self { + .init(rawValue: "createdDate") + } + + public static var customerReviews: Self { + .init(rawValue: "customerReviews") + } + + public static var downloadable: Self { + .init(rawValue: "downloadable") + } + + public static var earliestReleaseDate: Self { + .init(rawValue: "earliestReleaseDate") + } + + public static var gameCenterAppVersion: Self { + .init(rawValue: "gameCenterAppVersion") + } + + public static var platform: Self { + .init(rawValue: "platform") + } + + public static var releaseType: Self { + .init(rawValue: "releaseType") + } + + public static var reviewType: Self { + .init(rawValue: "reviewType") + } + + public static var routingAppCoverage: Self { + .init(rawValue: "routingAppCoverage") + } + + public static var usesIdfa: Self { + .init(rawValue: "usesIdfa") } + public static var versionString: Self { + .init(rawValue: "versionString") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "appPreviewSets": self = .appPreviewSets - case "appScreenshotSets": self = .appScreenshotSets - case "appStoreVersion": self = .appStoreVersion - case "description": self = .description - case "keywords": self = .keywords - case "locale": self = .locale - case "marketingUrl": self = .marketingUrl - case "promotionalText": self = .promotionalText - case "supportUrl": self = .supportUrl - case "whatsNew": self = .whatsNew - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } public struct Relation: Hashable { + /// the fields to include for returned resources of type appPreviewSets + public static var appPreviewSets: Relation<[AppPreviewSets]?> { + .init(key: "fields[appPreviewSets]") + } + + /// the fields to include for returned resources of type appScreenshotSets + public static var appScreenshotSets: Relation<[AppScreenshotSets]?> { + .init(key: "fields[appScreenshotSets]") + } + /// the fields to include for returned resources of type appStoreVersionLocalizations public static var appStoreVersionLocalizations: Relation<[AppStoreVersionLocalizations]?> { .init(key: "fields[appStoreVersionLocalizations]") } + /// the fields to include for returned resources of type appStoreVersions + public static var appStoreVersions: Relation<[AppStoreVersions]?> { + .init(key: "fields[appStoreVersions]") + } + + internal let key: String + + public func hash(into hasher: inout Hasher) { + hasher.combine(key) + } + } + } + + public struct Filter: Hashable { + public subscript (_ relation: Relation) -> T { + get { values[relation]?.base as! T } + set { values[relation] = AnyHashable(newValue) } + } + + private var values: [AnyHashable: AnyHashable] = [:] + + public struct Relation: Hashable { + /// filter by attribute 'locale' + public static var locale: Relation<[String]?> { + .init(key: "filter[locale]") + } + + internal let key: String + + public func hash(into hasher: inout Hasher) { + hasher.combine(key) + } + } + } + + public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var appPreviewSets: Self { + .init(rawValue: "appPreviewSets") + } + + public static var appScreenshotSets: Self { + .init(rawValue: "appScreenshotSets") + } + + public static var appStoreVersion: Self { + .init(rawValue: "appStoreVersion") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct Limit: Hashable { + public subscript () -> Int? { + get { self[Relation(key: "limit")] } + set { self[Relation(key: "limit")] = newValue } + } + + public subscript (_ relation: Relation) -> T { + get { values[relation]?.base as! T } + set { values[relation] = AnyHashable(newValue) } + } + + private var values: [AnyHashable: AnyHashable] = [:] + + public struct Relation: Hashable { + /// maximum number of related appPreviewSets returned (when they are included) + public static var appPreviewSets: Relation { + .init(key: "limit[appPreviewSets]") + } + + /// maximum number of related appScreenshotSets returned (when they are included) + public static var appScreenshotSets: Relation { + .init(key: "limit[appScreenshotSets]") + } + internal let key: String public func hash(into hasher: inout Hasher) { diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppStoreVersions/ById/AppStoreVersionPhasedRelease/AppStoreVersionsByIdAppStoreVersionPhasedRelease.GET.9c7237a.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppStoreVersions/ById/AppStoreVersionPhasedRelease/AppStoreVersionsByIdAppStoreVersionPhasedRelease.GET.9c7237a.generated.swift index 17428687..54e2da45 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppStoreVersions/ById/AppStoreVersionPhasedRelease/AppStoreVersionsByIdAppStoreVersionPhasedRelease.GET.9c7237a.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppStoreVersions/ById/AppStoreVersionPhasedRelease/AppStoreVersionsByIdAppStoreVersionPhasedRelease.GET.9c7237a.generated.swift @@ -42,8 +42,10 @@ extension V1.AppStoreVersions.ById.AppStoreVersionPhasedRelease { /// - Returns: **200**, Single AppStoreVersionPhasedRelease with get as `AppStoreVersionPhasedReleaseWithoutIncludesResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -57,12 +59,18 @@ extension V1.AppStoreVersions.ById.AppStoreVersionPhasedRelease { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 404: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -82,34 +90,31 @@ extension V1.AppStoreVersions.ById.AppStoreVersionPhasedRelease.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum AppStoreVersionPhasedReleases: Hashable, Codable, RawRepresentable { - case appStoreVersion - case currentDayNumber - case phasedReleaseState - case startDate - case totalPauseDuration - case unknown(String) - - public var rawValue: String { - switch self { - case .appStoreVersion: return "appStoreVersion" - case .currentDayNumber: return "currentDayNumber" - case .phasedReleaseState: return "phasedReleaseState" - case .startDate: return "startDate" - case .totalPauseDuration: return "totalPauseDuration" - case .unknown(let rawValue): return rawValue - } + public struct AppStoreVersionPhasedReleases: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var currentDayNumber: Self { + .init(rawValue: "currentDayNumber") } + public static var phasedReleaseState: Self { + .init(rawValue: "phasedReleaseState") + } + + public static var startDate: Self { + .init(rawValue: "startDate") + } + + public static var totalPauseDuration: Self { + .init(rawValue: "totalPauseDuration") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "appStoreVersion": self = .appStoreVersion - case "currentDayNumber": self = .currentDayNumber - case "phasedReleaseState": self = .phasedReleaseState - case "startDate": self = .startDate - case "totalPauseDuration": self = .totalPauseDuration - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppStoreVersions/ById/AppStoreVersionSubmission/AppStoreVersionsByIdAppStoreVersionSubmission.GET.656f393.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppStoreVersions/ById/AppStoreVersionSubmission/AppStoreVersionsByIdAppStoreVersionSubmission.GET.656f393.generated.swift index 26e28436..29a775c7 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppStoreVersions/ById/AppStoreVersionSubmission/AppStoreVersionsByIdAppStoreVersionSubmission.GET.656f393.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppStoreVersions/ById/AppStoreVersionSubmission/AppStoreVersionsByIdAppStoreVersionSubmission.GET.656f393.generated.swift @@ -47,8 +47,10 @@ extension V1.AppStoreVersions.ById.AppStoreVersionSubmission { /// - Returns: **200**, Single AppStoreVersionSubmission as `AppStoreVersionSubmissionResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -62,12 +64,18 @@ extension V1.AppStoreVersions.ById.AppStoreVersionSubmission { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 404: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -90,98 +98,131 @@ extension V1.AppStoreVersions.ById.AppStoreVersionSubmission.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum AppStoreVersionSubmissions: Hashable, Codable, RawRepresentable { - case appStoreVersion - case unknown(String) + public struct AppStoreVersionSubmissions: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var appStoreVersion: Self { + .init(rawValue: "appStoreVersion") + } - public var rawValue: String { - switch self { - case .appStoreVersion: return "appStoreVersion" - case .unknown(let rawValue): return rawValue - } + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "appStoreVersion": self = .appStoreVersion - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum AppStoreVersions: Hashable, Codable, RawRepresentable { - case ageRatingDeclaration - case app - case appClipDefaultExperience - case appStoreReviewDetail - case appStoreState - case appStoreVersionExperiments - case appStoreVersionExperimentsV2 - case appStoreVersionLocalizations - case appStoreVersionPhasedRelease - case appStoreVersionSubmission - case build - case copyright - case createdDate - case customerReviews - case downloadable - case earliestReleaseDate - case platform - case releaseType - case routingAppCoverage - case versionString - case unknown(String) - - public var rawValue: String { - switch self { - case .ageRatingDeclaration: return "ageRatingDeclaration" - case .app: return "app" - case .appClipDefaultExperience: return "appClipDefaultExperience" - case .appStoreReviewDetail: return "appStoreReviewDetail" - case .appStoreState: return "appStoreState" - case .appStoreVersionExperiments: return "appStoreVersionExperiments" - case .appStoreVersionExperimentsV2: return "appStoreVersionExperimentsV2" - case .appStoreVersionLocalizations: return "appStoreVersionLocalizations" - case .appStoreVersionPhasedRelease: return "appStoreVersionPhasedRelease" - case .appStoreVersionSubmission: return "appStoreVersionSubmission" - case .build: return "build" - case .copyright: return "copyright" - case .createdDate: return "createdDate" - case .customerReviews: return "customerReviews" - case .downloadable: return "downloadable" - case .earliestReleaseDate: return "earliestReleaseDate" - case .platform: return "platform" - case .releaseType: return "releaseType" - case .routingAppCoverage: return "routingAppCoverage" - case .versionString: return "versionString" - case .unknown(let rawValue): return rawValue - } + public struct AppStoreVersions: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var ageRatingDeclaration: Self { + .init(rawValue: "ageRatingDeclaration") + } + + public static var alternativeDistributionPackage: Self { + .init(rawValue: "alternativeDistributionPackage") + } + + public static var app: Self { + .init(rawValue: "app") + } + + public static var appClipDefaultExperience: Self { + .init(rawValue: "appClipDefaultExperience") + } + + public static var appStoreReviewDetail: Self { + .init(rawValue: "appStoreReviewDetail") + } + + public static var appStoreState: Self { + .init(rawValue: "appStoreState") } + public static var appStoreVersionExperiments: Self { + .init(rawValue: "appStoreVersionExperiments") + } + + public static var appStoreVersionExperimentsV2: Self { + .init(rawValue: "appStoreVersionExperimentsV2") + } + + public static var appStoreVersionLocalizations: Self { + .init(rawValue: "appStoreVersionLocalizations") + } + + public static var appStoreVersionPhasedRelease: Self { + .init(rawValue: "appStoreVersionPhasedRelease") + } + + public static var appStoreVersionSubmission: Self { + .init(rawValue: "appStoreVersionSubmission") + } + + public static var appVersionState: Self { + .init(rawValue: "appVersionState") + } + + public static var build: Self { + .init(rawValue: "build") + } + + public static var copyright: Self { + .init(rawValue: "copyright") + } + + public static var createdDate: Self { + .init(rawValue: "createdDate") + } + + public static var customerReviews: Self { + .init(rawValue: "customerReviews") + } + + public static var downloadable: Self { + .init(rawValue: "downloadable") + } + + public static var earliestReleaseDate: Self { + .init(rawValue: "earliestReleaseDate") + } + + public static var gameCenterAppVersion: Self { + .init(rawValue: "gameCenterAppVersion") + } + + public static var platform: Self { + .init(rawValue: "platform") + } + + public static var releaseType: Self { + .init(rawValue: "releaseType") + } + + public static var reviewType: Self { + .init(rawValue: "reviewType") + } + + public static var routingAppCoverage: Self { + .init(rawValue: "routingAppCoverage") + } + + public static var usesIdfa: Self { + .init(rawValue: "usesIdfa") + } + + public static var versionString: Self { + .init(rawValue: "versionString") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "ageRatingDeclaration": self = .ageRatingDeclaration - case "app": self = .app - case "appClipDefaultExperience": self = .appClipDefaultExperience - case "appStoreReviewDetail": self = .appStoreReviewDetail - case "appStoreState": self = .appStoreState - case "appStoreVersionExperiments": self = .appStoreVersionExperiments - case "appStoreVersionExperimentsV2": self = .appStoreVersionExperimentsV2 - case "appStoreVersionLocalizations": self = .appStoreVersionLocalizations - case "appStoreVersionPhasedRelease": self = .appStoreVersionPhasedRelease - case "appStoreVersionSubmission": self = .appStoreVersionSubmission - case "build": self = .build - case "copyright": self = .copyright - case "createdDate": self = .createdDate - case "customerReviews": self = .customerReviews - case "downloadable": self = .downloadable - case "earliestReleaseDate": self = .earliestReleaseDate - case "platform": self = .platform - case "releaseType": self = .releaseType - case "routingAppCoverage": self = .routingAppCoverage - case "versionString": self = .versionString - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } @@ -204,22 +245,19 @@ extension V1.AppStoreVersions.ById.AppStoreVersionSubmission.GET { } } - public enum Include: Hashable, Codable, RawRepresentable { - case appStoreVersion - case unknown(String) + public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var appStoreVersion: Self { + .init(rawValue: "appStoreVersion") + } - public var rawValue: String { - switch self { - case .appStoreVersion: return "appStoreVersion" - case .unknown(let rawValue): return rawValue - } + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "appStoreVersion": self = .appStoreVersion - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppStoreVersions/ById/AppStoreVersionsById.DELETE.60ca87e.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppStoreVersions/ById/AppStoreVersionsById.DELETE.60ca87e.generated.swift index 89980669..74d5586f 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppStoreVersions/ById/AppStoreVersionsById.DELETE.60ca87e.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppStoreVersions/ById/AppStoreVersionsById.DELETE.60ca87e.generated.swift @@ -31,11 +31,12 @@ extension V1.AppStoreVersions.ById { return urlRequest } - /// - Returns: **204**, Success (no content) /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -43,12 +44,12 @@ extension V1.AppStoreVersions.ById { } switch urlResponse.statusCode { - case 204: - return - case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) @@ -58,6 +59,9 @@ extension V1.AppStoreVersions.ById { case 409: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppStoreVersions/ById/AppStoreVersionsById.GET.60ca87e.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppStoreVersions/ById/AppStoreVersionsById.GET.60ca87e.generated.swift index 13d07d45..e0e99a67 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppStoreVersions/ById/AppStoreVersionsById.GET.60ca87e.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppStoreVersions/ById/AppStoreVersionsById.GET.60ca87e.generated.swift @@ -30,6 +30,8 @@ extension V1.AppStoreVersions.ById { components?.queryItems = [ URLQueryItem(name: "fields[ageRatingDeclarations]", value: parameters.fields[.ageRatingDeclarations]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "fields[alternativeDistributionPackages]", + value: parameters.fields[.alternativeDistributionPackages]?.map { "\($0)" }.joined(separator: ",")), URLQueryItem(name: "fields[appClipDefaultExperiences]", value: parameters.fields[.appClipDefaultExperiences]?.map { "\($0)" }.joined(separator: ",")), URLQueryItem(name: "fields[appStoreReviewDetails]", @@ -46,8 +48,8 @@ extension V1.AppStoreVersions.ById { value: parameters.fields[.appStoreVersions]?.map { "\($0)" }.joined(separator: ",")), URLQueryItem(name: "fields[builds]", value: parameters.fields[.builds]?.map { "\($0)" }.joined(separator: ",")), - URLQueryItem(name: "fields[customerReviews]", - value: parameters.fields[.customerReviews]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "fields[gameCenterAppVersions]", + value: parameters.fields[.gameCenterAppVersions]?.map { "\($0)" }.joined(separator: ",")), URLQueryItem(name: "fields[routingAppCoverages]", value: parameters.fields[.routingAppCoverages]?.map { "\($0)" }.joined(separator: ",")), URLQueryItem(name: "include", @@ -70,8 +72,10 @@ extension V1.AppStoreVersions.ById { /// - Returns: **200**, Single AppStoreVersion as `AppStoreVersionResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -85,12 +89,18 @@ extension V1.AppStoreVersions.ById { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 404: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -115,539 +125,623 @@ extension V1.AppStoreVersions.ById.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum AgeRatingDeclarations: Hashable, Codable, RawRepresentable { - case alcoholTobaccoOrDrugUseOrReferences - case contests - case gambling - case gamblingAndContests - case gamblingSimulated - case horrorOrFearThemes - case kidsAgeBand - case matureOrSuggestiveThemes - case medicalOrTreatmentInformation - case profanityOrCrudeHumor - case seventeenPlus - case sexualContentGraphicAndNudity - case sexualContentOrNudity - case unrestrictedWebAccess - case violenceCartoonOrFantasy - case violenceRealistic - case violenceRealisticProlongedGraphicOrSadistic - case unknown(String) - - public var rawValue: String { - switch self { - case .alcoholTobaccoOrDrugUseOrReferences: return "alcoholTobaccoOrDrugUseOrReferences" - case .contests: return "contests" - case .gambling: return "gambling" - case .gamblingAndContests: return "gamblingAndContests" - case .gamblingSimulated: return "gamblingSimulated" - case .horrorOrFearThemes: return "horrorOrFearThemes" - case .kidsAgeBand: return "kidsAgeBand" - case .matureOrSuggestiveThemes: return "matureOrSuggestiveThemes" - case .medicalOrTreatmentInformation: return "medicalOrTreatmentInformation" - case .profanityOrCrudeHumor: return "profanityOrCrudeHumor" - case .seventeenPlus: return "seventeenPlus" - case .sexualContentGraphicAndNudity: return "sexualContentGraphicAndNudity" - case .sexualContentOrNudity: return "sexualContentOrNudity" - case .unrestrictedWebAccess: return "unrestrictedWebAccess" - case .violenceCartoonOrFantasy: return "violenceCartoonOrFantasy" - case .violenceRealistic: return "violenceRealistic" - case .violenceRealisticProlongedGraphicOrSadistic: return "violenceRealisticProlongedGraphicOrSadistic" - case .unknown(let rawValue): return rawValue - } + public struct AgeRatingDeclarations: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var alcoholTobaccoOrDrugUseOrReferences: Self { + .init(rawValue: "alcoholTobaccoOrDrugUseOrReferences") + } + + public static var contests: Self { + .init(rawValue: "contests") + } + + public static var gambling: Self { + .init(rawValue: "gambling") + } + + public static var gamblingSimulated: Self { + .init(rawValue: "gamblingSimulated") + } + + public static var horrorOrFearThemes: Self { + .init(rawValue: "horrorOrFearThemes") + } + + public static var kidsAgeBand: Self { + .init(rawValue: "kidsAgeBand") + } + + public static var koreaAgeRatingOverride: Self { + .init(rawValue: "koreaAgeRatingOverride") + } + + public static var lootBox: Self { + .init(rawValue: "lootBox") + } + + public static var matureOrSuggestiveThemes: Self { + .init(rawValue: "matureOrSuggestiveThemes") } + public static var medicalOrTreatmentInformation: Self { + .init(rawValue: "medicalOrTreatmentInformation") + } + + public static var profanityOrCrudeHumor: Self { + .init(rawValue: "profanityOrCrudeHumor") + } + + public static var sexualContentGraphicAndNudity: Self { + .init(rawValue: "sexualContentGraphicAndNudity") + } + + public static var sexualContentOrNudity: Self { + .init(rawValue: "sexualContentOrNudity") + } + + public static var unrestrictedWebAccess: Self { + .init(rawValue: "unrestrictedWebAccess") + } + + public static var violenceCartoonOrFantasy: Self { + .init(rawValue: "violenceCartoonOrFantasy") + } + + public static var violenceRealistic: Self { + .init(rawValue: "violenceRealistic") + } + + public static var violenceRealisticProlongedGraphicOrSadistic: Self { + .init(rawValue: "violenceRealisticProlongedGraphicOrSadistic") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "alcoholTobaccoOrDrugUseOrReferences": self = .alcoholTobaccoOrDrugUseOrReferences - case "contests": self = .contests - case "gambling": self = .gambling - case "gamblingAndContests": self = .gamblingAndContests - case "gamblingSimulated": self = .gamblingSimulated - case "horrorOrFearThemes": self = .horrorOrFearThemes - case "kidsAgeBand": self = .kidsAgeBand - case "matureOrSuggestiveThemes": self = .matureOrSuggestiveThemes - case "medicalOrTreatmentInformation": self = .medicalOrTreatmentInformation - case "profanityOrCrudeHumor": self = .profanityOrCrudeHumor - case "seventeenPlus": self = .seventeenPlus - case "sexualContentGraphicAndNudity": self = .sexualContentGraphicAndNudity - case "sexualContentOrNudity": self = .sexualContentOrNudity - case "unrestrictedWebAccess": self = .unrestrictedWebAccess - case "violenceCartoonOrFantasy": self = .violenceCartoonOrFantasy - case "violenceRealistic": self = .violenceRealistic - case "violenceRealisticProlongedGraphicOrSadistic": self = .violenceRealisticProlongedGraphicOrSadistic - default: self = .unknown(rawValue) - } - } - } - - public enum AppClipDefaultExperiences: Hashable, Codable, RawRepresentable { - case action - case appClip - case appClipAppStoreReviewDetail - case appClipDefaultExperienceLocalizations - case appClipDefaultExperienceTemplate - case releaseWithAppStoreVersion - case unknown(String) - - public var rawValue: String { - switch self { - case .action: return "action" - case .appClip: return "appClip" - case .appClipAppStoreReviewDetail: return "appClipAppStoreReviewDetail" - case .appClipDefaultExperienceLocalizations: return "appClipDefaultExperienceLocalizations" - case .appClipDefaultExperienceTemplate: return "appClipDefaultExperienceTemplate" - case .releaseWithAppStoreVersion: return "releaseWithAppStoreVersion" - case .unknown(let rawValue): return rawValue - } + self.rawValue = rawValue + } + } + + public struct AlternativeDistributionPackages: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var versions: Self { + .init(rawValue: "versions") } + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "action": self = .action - case "appClip": self = .appClip - case "appClipAppStoreReviewDetail": self = .appClipAppStoreReviewDetail - case "appClipDefaultExperienceLocalizations": self = .appClipDefaultExperienceLocalizations - case "appClipDefaultExperienceTemplate": self = .appClipDefaultExperienceTemplate - case "releaseWithAppStoreVersion": self = .releaseWithAppStoreVersion - default: self = .unknown(rawValue) - } - } - } - - public enum AppStoreReviewDetails: Hashable, Codable, RawRepresentable { - case appStoreReviewAttachments - case appStoreVersion - case contactEmail - case contactFirstName - case contactLastName - case contactPhone - case demoAccountName - case demoAccountPassword - case demoAccountRequired - case notes - case unknown(String) - - public var rawValue: String { - switch self { - case .appStoreReviewAttachments: return "appStoreReviewAttachments" - case .appStoreVersion: return "appStoreVersion" - case .contactEmail: return "contactEmail" - case .contactFirstName: return "contactFirstName" - case .contactLastName: return "contactLastName" - case .contactPhone: return "contactPhone" - case .demoAccountName: return "demoAccountName" - case .demoAccountPassword: return "demoAccountPassword" - case .demoAccountRequired: return "demoAccountRequired" - case .notes: return "notes" - case .unknown(let rawValue): return rawValue - } + self.rawValue = rawValue + } + } + + public struct AppClipDefaultExperiences: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var action: Self { + .init(rawValue: "action") + } + + public static var appClip: Self { + .init(rawValue: "appClip") } + public static var appClipAppStoreReviewDetail: Self { + .init(rawValue: "appClipAppStoreReviewDetail") + } + + public static var appClipDefaultExperienceLocalizations: Self { + .init(rawValue: "appClipDefaultExperienceLocalizations") + } + + public static var releaseWithAppStoreVersion: Self { + .init(rawValue: "releaseWithAppStoreVersion") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "appStoreReviewAttachments": self = .appStoreReviewAttachments - case "appStoreVersion": self = .appStoreVersion - case "contactEmail": self = .contactEmail - case "contactFirstName": self = .contactFirstName - case "contactLastName": self = .contactLastName - case "contactPhone": self = .contactPhone - case "demoAccountName": self = .demoAccountName - case "demoAccountPassword": self = .demoAccountPassword - case "demoAccountRequired": self = .demoAccountRequired - case "notes": self = .notes - default: self = .unknown(rawValue) - } - } - } - - public enum AppStoreVersionExperiments: Hashable, Codable, RawRepresentable { - case app - case appStoreVersion - case appStoreVersionExperimentTreatments - case controlVersions - case endDate - case latestControlVersion - case name - case platform - case reviewRequired - case startDate - case started - case state - case trafficProportion - case unknown(String) - - public var rawValue: String { - switch self { - case .app: return "app" - case .appStoreVersion: return "appStoreVersion" - case .appStoreVersionExperimentTreatments: return "appStoreVersionExperimentTreatments" - case .controlVersions: return "controlVersions" - case .endDate: return "endDate" - case .latestControlVersion: return "latestControlVersion" - case .name: return "name" - case .platform: return "platform" - case .reviewRequired: return "reviewRequired" - case .startDate: return "startDate" - case .started: return "started" - case .state: return "state" - case .trafficProportion: return "trafficProportion" - case .unknown(let rawValue): return rawValue - } + self.rawValue = rawValue + } + } + + public struct AppStoreReviewDetails: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var appStoreReviewAttachments: Self { + .init(rawValue: "appStoreReviewAttachments") + } + + public static var appStoreVersion: Self { + .init(rawValue: "appStoreVersion") + } + + public static var contactEmail: Self { + .init(rawValue: "contactEmail") + } + + public static var contactFirstName: Self { + .init(rawValue: "contactFirstName") + } + + public static var contactLastName: Self { + .init(rawValue: "contactLastName") + } + + public static var contactPhone: Self { + .init(rawValue: "contactPhone") + } + + public static var demoAccountName: Self { + .init(rawValue: "demoAccountName") + } + + public static var demoAccountPassword: Self { + .init(rawValue: "demoAccountPassword") + } + + public static var demoAccountRequired: Self { + .init(rawValue: "demoAccountRequired") + } + + public static var notes: Self { + .init(rawValue: "notes") } + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "app": self = .app - case "appStoreVersion": self = .appStoreVersion - case "appStoreVersionExperimentTreatments": self = .appStoreVersionExperimentTreatments - case "controlVersions": self = .controlVersions - case "endDate": self = .endDate - case "latestControlVersion": self = .latestControlVersion - case "name": self = .name - case "platform": self = .platform - case "reviewRequired": self = .reviewRequired - case "startDate": self = .startDate - case "started": self = .started - case "state": self = .state - case "trafficProportion": self = .trafficProportion - default: self = .unknown(rawValue) - } - } - } - - public enum AppStoreVersionLocalizations: Hashable, Codable, RawRepresentable { - case appPreviewSets - case appScreenshotSets - case appStoreVersion - case description - case keywords - case locale - case marketingUrl - case promotionalText - case supportUrl - case whatsNew - case unknown(String) - - public var rawValue: String { - switch self { - case .appPreviewSets: return "appPreviewSets" - case .appScreenshotSets: return "appScreenshotSets" - case .appStoreVersion: return "appStoreVersion" - case .description: return "description" - case .keywords: return "keywords" - case .locale: return "locale" - case .marketingUrl: return "marketingUrl" - case .promotionalText: return "promotionalText" - case .supportUrl: return "supportUrl" - case .whatsNew: return "whatsNew" - case .unknown(let rawValue): return rawValue - } + self.rawValue = rawValue + } + } + + public struct AppStoreVersionExperiments: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var app: Self { + .init(rawValue: "app") + } + + public static var appStoreVersion: Self { + .init(rawValue: "appStoreVersion") + } + + public static var appStoreVersionExperimentTreatments: Self { + .init(rawValue: "appStoreVersionExperimentTreatments") + } + + public static var controlVersions: Self { + .init(rawValue: "controlVersions") + } + + public static var endDate: Self { + .init(rawValue: "endDate") + } + + public static var latestControlVersion: Self { + .init(rawValue: "latestControlVersion") + } + + public static var name: Self { + .init(rawValue: "name") + } + + public static var platform: Self { + .init(rawValue: "platform") } + public static var reviewRequired: Self { + .init(rawValue: "reviewRequired") + } + + public static var startDate: Self { + .init(rawValue: "startDate") + } + + public static var state: Self { + .init(rawValue: "state") + } + + public static var trafficProportion: Self { + .init(rawValue: "trafficProportion") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "appPreviewSets": self = .appPreviewSets - case "appScreenshotSets": self = .appScreenshotSets - case "appStoreVersion": self = .appStoreVersion - case "description": self = .description - case "keywords": self = .keywords - case "locale": self = .locale - case "marketingUrl": self = .marketingUrl - case "promotionalText": self = .promotionalText - case "supportUrl": self = .supportUrl - case "whatsNew": self = .whatsNew - default: self = .unknown(rawValue) - } - } - } - - public enum AppStoreVersionPhasedReleases: Hashable, Codable, RawRepresentable { - case appStoreVersion - case currentDayNumber - case phasedReleaseState - case startDate - case totalPauseDuration - case unknown(String) - - public var rawValue: String { - switch self { - case .appStoreVersion: return "appStoreVersion" - case .currentDayNumber: return "currentDayNumber" - case .phasedReleaseState: return "phasedReleaseState" - case .startDate: return "startDate" - case .totalPauseDuration: return "totalPauseDuration" - case .unknown(let rawValue): return rawValue - } + self.rawValue = rawValue + } + } + + public struct AppStoreVersionLocalizations: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var appPreviewSets: Self { + .init(rawValue: "appPreviewSets") + } + + public static var appScreenshotSets: Self { + .init(rawValue: "appScreenshotSets") + } + + public static var appStoreVersion: Self { + .init(rawValue: "appStoreVersion") + } + + public static var description: Self { + .init(rawValue: "description") } + public static var keywords: Self { + .init(rawValue: "keywords") + } + + public static var locale: Self { + .init(rawValue: "locale") + } + + public static var marketingUrl: Self { + .init(rawValue: "marketingUrl") + } + + public static var promotionalText: Self { + .init(rawValue: "promotionalText") + } + + public static var supportUrl: Self { + .init(rawValue: "supportUrl") + } + + public static var whatsNew: Self { + .init(rawValue: "whatsNew") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "appStoreVersion": self = .appStoreVersion - case "currentDayNumber": self = .currentDayNumber - case "phasedReleaseState": self = .phasedReleaseState - case "startDate": self = .startDate - case "totalPauseDuration": self = .totalPauseDuration - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum AppStoreVersionSubmissions: Hashable, Codable, RawRepresentable { - case appStoreVersion - case unknown(String) + public struct AppStoreVersionPhasedReleases: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var currentDayNumber: Self { + .init(rawValue: "currentDayNumber") + } + + public static var phasedReleaseState: Self { + .init(rawValue: "phasedReleaseState") + } + + public static var startDate: Self { + .init(rawValue: "startDate") + } - public var rawValue: String { - switch self { - case .appStoreVersion: return "appStoreVersion" - case .unknown(let rawValue): return rawValue - } + public static var totalPauseDuration: Self { + .init(rawValue: "totalPauseDuration") } + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "appStoreVersion": self = .appStoreVersion - default: self = .unknown(rawValue) - } - } - } - - public enum AppStoreVersions: Hashable, Codable, RawRepresentable { - case ageRatingDeclaration - case app - case appClipDefaultExperience - case appStoreReviewDetail - case appStoreState - case appStoreVersionExperiments - case appStoreVersionExperimentsV2 - case appStoreVersionLocalizations - case appStoreVersionPhasedRelease - case appStoreVersionSubmission - case build - case copyright - case createdDate - case customerReviews - case downloadable - case earliestReleaseDate - case platform - case releaseType - case routingAppCoverage - case versionString - case unknown(String) - - public var rawValue: String { - switch self { - case .ageRatingDeclaration: return "ageRatingDeclaration" - case .app: return "app" - case .appClipDefaultExperience: return "appClipDefaultExperience" - case .appStoreReviewDetail: return "appStoreReviewDetail" - case .appStoreState: return "appStoreState" - case .appStoreVersionExperiments: return "appStoreVersionExperiments" - case .appStoreVersionExperimentsV2: return "appStoreVersionExperimentsV2" - case .appStoreVersionLocalizations: return "appStoreVersionLocalizations" - case .appStoreVersionPhasedRelease: return "appStoreVersionPhasedRelease" - case .appStoreVersionSubmission: return "appStoreVersionSubmission" - case .build: return "build" - case .copyright: return "copyright" - case .createdDate: return "createdDate" - case .customerReviews: return "customerReviews" - case .downloadable: return "downloadable" - case .earliestReleaseDate: return "earliestReleaseDate" - case .platform: return "platform" - case .releaseType: return "releaseType" - case .routingAppCoverage: return "routingAppCoverage" - case .versionString: return "versionString" - case .unknown(let rawValue): return rawValue - } + self.rawValue = rawValue + } + } + + public struct AppStoreVersionSubmissions: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var appStoreVersion: Self { + .init(rawValue: "appStoreVersion") + } + + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "ageRatingDeclaration": self = .ageRatingDeclaration - case "app": self = .app - case "appClipDefaultExperience": self = .appClipDefaultExperience - case "appStoreReviewDetail": self = .appStoreReviewDetail - case "appStoreState": self = .appStoreState - case "appStoreVersionExperiments": self = .appStoreVersionExperiments - case "appStoreVersionExperimentsV2": self = .appStoreVersionExperimentsV2 - case "appStoreVersionLocalizations": self = .appStoreVersionLocalizations - case "appStoreVersionPhasedRelease": self = .appStoreVersionPhasedRelease - case "appStoreVersionSubmission": self = .appStoreVersionSubmission - case "build": self = .build - case "copyright": self = .copyright - case "createdDate": self = .createdDate - case "customerReviews": self = .customerReviews - case "downloadable": self = .downloadable - case "earliestReleaseDate": self = .earliestReleaseDate - case "platform": self = .platform - case "releaseType": self = .releaseType - case "routingAppCoverage": self = .routingAppCoverage - case "versionString": self = .versionString - default: self = .unknown(rawValue) - } - } - } - - public enum Builds: Hashable, Codable, RawRepresentable { - case app - case appEncryptionDeclaration - case appStoreVersion - case betaAppReviewSubmission - case betaBuildLocalizations - case betaGroups - case buildAudienceType - case buildBetaDetail - case buildBundles - case computedMinMacOsVersion - case diagnosticSignatures - case expirationDate - case expired - case iconAssetToken - case icons - case individualTesters - case lsMinimumSystemVersion - case minOsVersion - case perfPowerMetrics - case preReleaseVersion - case processingState - case uploadedDate - case usesNonExemptEncryption - case version - case unknown(String) - - public var rawValue: String { - switch self { - case .app: return "app" - case .appEncryptionDeclaration: return "appEncryptionDeclaration" - case .appStoreVersion: return "appStoreVersion" - case .betaAppReviewSubmission: return "betaAppReviewSubmission" - case .betaBuildLocalizations: return "betaBuildLocalizations" - case .betaGroups: return "betaGroups" - case .buildAudienceType: return "buildAudienceType" - case .buildBetaDetail: return "buildBetaDetail" - case .buildBundles: return "buildBundles" - case .computedMinMacOsVersion: return "computedMinMacOsVersion" - case .diagnosticSignatures: return "diagnosticSignatures" - case .expirationDate: return "expirationDate" - case .expired: return "expired" - case .iconAssetToken: return "iconAssetToken" - case .icons: return "icons" - case .individualTesters: return "individualTesters" - case .lsMinimumSystemVersion: return "lsMinimumSystemVersion" - case .minOsVersion: return "minOsVersion" - case .perfPowerMetrics: return "perfPowerMetrics" - case .preReleaseVersion: return "preReleaseVersion" - case .processingState: return "processingState" - case .uploadedDate: return "uploadedDate" - case .usesNonExemptEncryption: return "usesNonExemptEncryption" - case .version: return "version" - case .unknown(let rawValue): return rawValue - } + self.rawValue = rawValue } + } + + public struct AppStoreVersions: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var ageRatingDeclaration: Self { + .init(rawValue: "ageRatingDeclaration") + } + + public static var alternativeDistributionPackage: Self { + .init(rawValue: "alternativeDistributionPackage") + } + + public static var app: Self { + .init(rawValue: "app") + } + + public static var appClipDefaultExperience: Self { + .init(rawValue: "appClipDefaultExperience") + } + + public static var appStoreReviewDetail: Self { + .init(rawValue: "appStoreReviewDetail") + } + + public static var appStoreState: Self { + .init(rawValue: "appStoreState") + } + + public static var appStoreVersionExperiments: Self { + .init(rawValue: "appStoreVersionExperiments") + } + + public static var appStoreVersionExperimentsV2: Self { + .init(rawValue: "appStoreVersionExperimentsV2") + } + + public static var appStoreVersionLocalizations: Self { + .init(rawValue: "appStoreVersionLocalizations") + } + + public static var appStoreVersionPhasedRelease: Self { + .init(rawValue: "appStoreVersionPhasedRelease") + } + + public static var appStoreVersionSubmission: Self { + .init(rawValue: "appStoreVersionSubmission") + } + + public static var appVersionState: Self { + .init(rawValue: "appVersionState") + } + + public static var build: Self { + .init(rawValue: "build") + } + + public static var copyright: Self { + .init(rawValue: "copyright") + } + + public static var createdDate: Self { + .init(rawValue: "createdDate") + } + + public static var customerReviews: Self { + .init(rawValue: "customerReviews") + } + + public static var downloadable: Self { + .init(rawValue: "downloadable") + } + + public static var earliestReleaseDate: Self { + .init(rawValue: "earliestReleaseDate") + } + + public static var gameCenterAppVersion: Self { + .init(rawValue: "gameCenterAppVersion") + } + + public static var platform: Self { + .init(rawValue: "platform") + } + + public static var releaseType: Self { + .init(rawValue: "releaseType") + } + + public static var reviewType: Self { + .init(rawValue: "reviewType") + } + + public static var routingAppCoverage: Self { + .init(rawValue: "routingAppCoverage") + } + + public static var usesIdfa: Self { + .init(rawValue: "usesIdfa") + } + + public static var versionString: Self { + .init(rawValue: "versionString") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct Builds: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var app: Self { + .init(rawValue: "app") + } + + public static var appEncryptionDeclaration: Self { + .init(rawValue: "appEncryptionDeclaration") + } + + public static var appStoreVersion: Self { + .init(rawValue: "appStoreVersion") + } + + public static var betaAppReviewSubmission: Self { + .init(rawValue: "betaAppReviewSubmission") + } + + public static var betaBuildLocalizations: Self { + .init(rawValue: "betaBuildLocalizations") + } + + public static var betaGroups: Self { + .init(rawValue: "betaGroups") + } + + public static var buildAudienceType: Self { + .init(rawValue: "buildAudienceType") + } + + public static var buildBetaDetail: Self { + .init(rawValue: "buildBetaDetail") + } + + public static var buildBundles: Self { + .init(rawValue: "buildBundles") + } + + public static var computedMinMacOsVersion: Self { + .init(rawValue: "computedMinMacOsVersion") + } + + public static var computedMinVisionOsVersion: Self { + .init(rawValue: "computedMinVisionOsVersion") + } + + public static var diagnosticSignatures: Self { + .init(rawValue: "diagnosticSignatures") + } + + public static var expirationDate: Self { + .init(rawValue: "expirationDate") + } + + public static var expired: Self { + .init(rawValue: "expired") + } + + public static var iconAssetToken: Self { + .init(rawValue: "iconAssetToken") + } + + public static var icons: Self { + .init(rawValue: "icons") + } + + public static var individualTesters: Self { + .init(rawValue: "individualTesters") + } + + public static var lsMinimumSystemVersion: Self { + .init(rawValue: "lsMinimumSystemVersion") + } + + public static var minOsVersion: Self { + .init(rawValue: "minOsVersion") + } + + public static var perfPowerMetrics: Self { + .init(rawValue: "perfPowerMetrics") + } + + public static var preReleaseVersion: Self { + .init(rawValue: "preReleaseVersion") + } + + public static var processingState: Self { + .init(rawValue: "processingState") + } + + public static var uploadedDate: Self { + .init(rawValue: "uploadedDate") + } + + public static var usesNonExemptEncryption: Self { + .init(rawValue: "usesNonExemptEncryption") + } + + public static var version: Self { + .init(rawValue: "version") + } + + public var description: String { + rawValue + } + + public var rawValue: String public init(rawValue: String) { - switch rawValue { - case "app": self = .app - case "appEncryptionDeclaration": self = .appEncryptionDeclaration - case "appStoreVersion": self = .appStoreVersion - case "betaAppReviewSubmission": self = .betaAppReviewSubmission - case "betaBuildLocalizations": self = .betaBuildLocalizations - case "betaGroups": self = .betaGroups - case "buildAudienceType": self = .buildAudienceType - case "buildBetaDetail": self = .buildBetaDetail - case "buildBundles": self = .buildBundles - case "computedMinMacOsVersion": self = .computedMinMacOsVersion - case "diagnosticSignatures": self = .diagnosticSignatures - case "expirationDate": self = .expirationDate - case "expired": self = .expired - case "iconAssetToken": self = .iconAssetToken - case "icons": self = .icons - case "individualTesters": self = .individualTesters - case "lsMinimumSystemVersion": self = .lsMinimumSystemVersion - case "minOsVersion": self = .minOsVersion - case "perfPowerMetrics": self = .perfPowerMetrics - case "preReleaseVersion": self = .preReleaseVersion - case "processingState": self = .processingState - case "uploadedDate": self = .uploadedDate - case "usesNonExemptEncryption": self = .usesNonExemptEncryption - case "version": self = .version - default: self = .unknown(rawValue) - } - } - } - - public enum CustomerReviews: Hashable, Codable, RawRepresentable { - case body - case createdDate - case rating - case response - case reviewerNickname - case territory - case title - case unknown(String) - - public var rawValue: String { - switch self { - case .body: return "body" - case .createdDate: return "createdDate" - case .rating: return "rating" - case .response: return "response" - case .reviewerNickname: return "reviewerNickname" - case .territory: return "territory" - case .title: return "title" - case .unknown(let rawValue): return rawValue - } + self.rawValue = rawValue + } + } + + public struct GameCenterAppVersions: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var appStoreVersion: Self { + .init(rawValue: "appStoreVersion") + } + + public static var compatibilityVersions: Self { + .init(rawValue: "compatibilityVersions") + } + + public static var enabled: Self { + .init(rawValue: "enabled") + } + + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "body": self = .body - case "createdDate": self = .createdDate - case "rating": self = .rating - case "response": self = .response - case "reviewerNickname": self = .reviewerNickname - case "territory": self = .territory - case "title": self = .title - default: self = .unknown(rawValue) - } - } - } - - public enum RoutingAppCoverages: Hashable, Codable, RawRepresentable { - case appStoreVersion - case assetDeliveryState - case fileName - case fileSize - case sourceFileChecksum - case uploadOperations - case uploaded - case unknown(String) - - public var rawValue: String { - switch self { - case .appStoreVersion: return "appStoreVersion" - case .assetDeliveryState: return "assetDeliveryState" - case .fileName: return "fileName" - case .fileSize: return "fileSize" - case .sourceFileChecksum: return "sourceFileChecksum" - case .uploadOperations: return "uploadOperations" - case .uploaded: return "uploaded" - case .unknown(let rawValue): return rawValue - } + self.rawValue = rawValue + } + } + + public struct RoutingAppCoverages: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var appStoreVersion: Self { + .init(rawValue: "appStoreVersion") } + public static var assetDeliveryState: Self { + .init(rawValue: "assetDeliveryState") + } + + public static var fileName: Self { + .init(rawValue: "fileName") + } + + public static var fileSize: Self { + .init(rawValue: "fileSize") + } + + public static var sourceFileChecksum: Self { + .init(rawValue: "sourceFileChecksum") + } + + public static var uploadOperations: Self { + .init(rawValue: "uploadOperations") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "appStoreVersion": self = .appStoreVersion - case "assetDeliveryState": self = .assetDeliveryState - case "fileName": self = .fileName - case "fileSize": self = .fileSize - case "sourceFileChecksum": self = .sourceFileChecksum - case "uploadOperations": self = .uploadOperations - case "uploaded": self = .uploaded - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } @@ -657,6 +751,11 @@ extension V1.AppStoreVersions.ById.GET { .init(key: "fields[ageRatingDeclarations]") } + /// the fields to include for returned resources of type alternativeDistributionPackages + public static var alternativeDistributionPackages: Relation<[AlternativeDistributionPackages]?> { + .init(key: "fields[alternativeDistributionPackages]") + } + /// the fields to include for returned resources of type appClipDefaultExperiences public static var appClipDefaultExperiences: Relation<[AppClipDefaultExperiences]?> { .init(key: "fields[appClipDefaultExperiences]") @@ -697,9 +796,9 @@ extension V1.AppStoreVersions.ById.GET { .init(key: "fields[builds]") } - /// the fields to include for returned resources of type customerReviews - public static var customerReviews: Relation<[CustomerReviews]?> { - .init(key: "fields[customerReviews]") + /// the fields to include for returned resources of type gameCenterAppVersions + public static var gameCenterAppVersions: Relation<[GameCenterAppVersions]?> { + .init(key: "fields[gameCenterAppVersions]") } /// the fields to include for returned resources of type routingAppCoverages @@ -715,52 +814,67 @@ extension V1.AppStoreVersions.ById.GET { } } - public enum Include: Hashable, Codable, RawRepresentable { - case ageRatingDeclaration - case app - case appClipDefaultExperience - case appStoreReviewDetail - case appStoreVersionExperiments - case appStoreVersionExperimentsV2 - case appStoreVersionLocalizations - case appStoreVersionPhasedRelease - case appStoreVersionSubmission - case build - case routingAppCoverage - case unknown(String) - - public var rawValue: String { - switch self { - case .ageRatingDeclaration: return "ageRatingDeclaration" - case .app: return "app" - case .appClipDefaultExperience: return "appClipDefaultExperience" - case .appStoreReviewDetail: return "appStoreReviewDetail" - case .appStoreVersionExperiments: return "appStoreVersionExperiments" - case .appStoreVersionExperimentsV2: return "appStoreVersionExperimentsV2" - case .appStoreVersionLocalizations: return "appStoreVersionLocalizations" - case .appStoreVersionPhasedRelease: return "appStoreVersionPhasedRelease" - case .appStoreVersionSubmission: return "appStoreVersionSubmission" - case .build: return "build" - case .routingAppCoverage: return "routingAppCoverage" - case .unknown(let rawValue): return rawValue - } + public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var ageRatingDeclaration: Self { + .init(rawValue: "ageRatingDeclaration") + } + + public static var alternativeDistributionPackage: Self { + .init(rawValue: "alternativeDistributionPackage") + } + + public static var app: Self { + .init(rawValue: "app") } + public static var appClipDefaultExperience: Self { + .init(rawValue: "appClipDefaultExperience") + } + + public static var appStoreReviewDetail: Self { + .init(rawValue: "appStoreReviewDetail") + } + + public static var appStoreVersionExperiments: Self { + .init(rawValue: "appStoreVersionExperiments") + } + + public static var appStoreVersionExperimentsV2: Self { + .init(rawValue: "appStoreVersionExperimentsV2") + } + + public static var appStoreVersionLocalizations: Self { + .init(rawValue: "appStoreVersionLocalizations") + } + + public static var appStoreVersionPhasedRelease: Self { + .init(rawValue: "appStoreVersionPhasedRelease") + } + + public static var appStoreVersionSubmission: Self { + .init(rawValue: "appStoreVersionSubmission") + } + + public static var build: Self { + .init(rawValue: "build") + } + + public static var gameCenterAppVersion: Self { + .init(rawValue: "gameCenterAppVersion") + } + + public static var routingAppCoverage: Self { + .init(rawValue: "routingAppCoverage") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "ageRatingDeclaration": self = .ageRatingDeclaration - case "app": self = .app - case "appClipDefaultExperience": self = .appClipDefaultExperience - case "appStoreReviewDetail": self = .appStoreReviewDetail - case "appStoreVersionExperiments": self = .appStoreVersionExperiments - case "appStoreVersionExperimentsV2": self = .appStoreVersionExperimentsV2 - case "appStoreVersionLocalizations": self = .appStoreVersionLocalizations - case "appStoreVersionPhasedRelease": self = .appStoreVersionPhasedRelease - case "appStoreVersionSubmission": self = .appStoreVersionSubmission - case "build": self = .build - case "routingAppCoverage": self = .routingAppCoverage - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppStoreVersions/ById/AppStoreVersionsById.PATCH.60ca87e.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppStoreVersions/ById/AppStoreVersionsById.PATCH.60ca87e.generated.swift index ffecf4b6..9b782574 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppStoreVersions/ById/AppStoreVersionsById.PATCH.60ca87e.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppStoreVersions/ById/AppStoreVersionsById.PATCH.60ca87e.generated.swift @@ -48,9 +48,12 @@ extension V1.AppStoreVersions.ById { /// - Returns: **200**, Single AppStoreVersion as `AppStoreVersionResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **422**, Unprocessable request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -64,6 +67,9 @@ extension V1.AppStoreVersions.ById { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) @@ -73,6 +79,12 @@ extension V1.AppStoreVersions.ById { case 409: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 422: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppStoreVersions/ById/CustomerReviews/AppStoreVersionsByIdCustomerReviews.GET.17f4f93.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppStoreVersions/ById/CustomerReviews/AppStoreVersionsByIdCustomerReviews.GET.17f4f93.generated.swift index 03ba65c6..ed18baf5 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppStoreVersions/ById/CustomerReviews/AppStoreVersionsByIdCustomerReviews.GET.17f4f93.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppStoreVersions/ById/CustomerReviews/AppStoreVersionsByIdCustomerReviews.GET.17f4f93.generated.swift @@ -56,8 +56,10 @@ extension V1.AppStoreVersions.ById.CustomerReviews { /// - Returns: **200**, List of CustomerReviews as `CustomerReviewsResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -71,12 +73,18 @@ extension V1.AppStoreVersions.ById.CustomerReviews { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 404: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -131,68 +139,71 @@ extension V1.AppStoreVersions.ById.CustomerReviews.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum CustomerReviewResponses: Hashable, Codable, RawRepresentable { - case lastModifiedDate - case responseBody - case review - case state - case unknown(String) + public struct CustomerReviewResponses: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var lastModifiedDate: Self { + .init(rawValue: "lastModifiedDate") + } + + public static var responseBody: Self { + .init(rawValue: "responseBody") + } + + public static var review: Self { + .init(rawValue: "review") + } + + public static var state: Self { + .init(rawValue: "state") + } - public var rawValue: String { - switch self { - case .lastModifiedDate: return "lastModifiedDate" - case .responseBody: return "responseBody" - case .review: return "review" - case .state: return "state" - case .unknown(let rawValue): return rawValue - } + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "lastModifiedDate": self = .lastModifiedDate - case "responseBody": self = .responseBody - case "review": self = .review - case "state": self = .state - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum CustomerReviews: Hashable, Codable, RawRepresentable { - case body - case createdDate - case rating - case response - case reviewerNickname - case territory - case title - case unknown(String) - - public var rawValue: String { - switch self { - case .body: return "body" - case .createdDate: return "createdDate" - case .rating: return "rating" - case .response: return "response" - case .reviewerNickname: return "reviewerNickname" - case .territory: return "territory" - case .title: return "title" - case .unknown(let rawValue): return rawValue - } + public struct CustomerReviews: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var body: Self { + .init(rawValue: "body") + } + + public static var createdDate: Self { + .init(rawValue: "createdDate") + } + + public static var rating: Self { + .init(rawValue: "rating") } + public static var response: Self { + .init(rawValue: "response") + } + + public static var reviewerNickname: Self { + .init(rawValue: "reviewerNickname") + } + + public static var territory: Self { + .init(rawValue: "territory") + } + + public static var title: Self { + .init(rawValue: "title") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "body": self = .body - case "createdDate": self = .createdDate - case "rating": self = .rating - case "response": self = .response - case "reviewerNickname": self = .reviewerNickname - case "territory": self = .territory - case "title": self = .title - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } @@ -223,715 +234,943 @@ extension V1.AppStoreVersions.ById.CustomerReviews.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum Territory: Hashable, Codable, RawRepresentable { - case abw - case afg - case ago - case aia - case alb - case and - case ant - case are - case arg - case arm - case asm - case atg - case aus - case aut - case aze - case bdi - case bel - case ben - case bes - case bfa - case bgd - case bgr - case bhr - case bhs - case bih - case blr - case blz - case bmu - case bol - case bra - case brb - case brn - case btn - case bwa - case caf - case can - case che - case chl - case chn - case civ - case cmr - case cod - case cog - case cok - case col - case com - case cpv - case cri - case cub - case cuw - case cxr - case cym - case cyp - case cze - case deu - case dji - case dma - case dnk - case dom - case dza - case ecu - case egy - case eri - case esp - case est - case eth - case fin - case fji - case flk - case fra - case fro - case fsm - case gab - case gbr - case geo - case ggy - case gha - case gib - case gin - case glp - case gmb - case gnb - case gnq - case grc - case grd - case grl - case gtm - case guf - case gum - case guy - case hkg - case hnd - case hrv - case hti - case hun - case idn - case imn - case ind - case irl - case irq - case isl - case isr - case ita - case jam - case jey - case jor - case jpn - case kaz - case ken - case kgz - case khm - case kir - case kna - case kor - case kwt - case lao - case lbn - case lbr - case lby - case lca - case lie - case lka - case lso - case ltu - case lux - case lva - case mac - case mar - case mco - case mda - case mdg - case mdv - case mex - case mhl - case mkd - case mli - case mlt - case mmr - case mne - case mng - case mnp - case moz - case mrt - case msr - case mtq - case mus - case mwi - case mys - case myt - case nam - case ncl - case ner - case nfk - case nga - case nic - case niu - case nld - case nor - case npl - case nru - case nzl - case omn - case pak - case pan - case per - case phl - case plw - case png - case pol - case pri - case prt - case pry - case pse - case pyf - case qat - case reu - case rou - case rus - case rwa - case sau - case sen - case sgp - case shn - case slb - case sle - case slv - case smr - case som - case spm - case srb - case ssd - case stp - case sur - case svk - case svn - case swe - case swz - case sxm - case syc - case tca - case tcd - case tgo - case tha - case tjk - case tkm - case tls - case ton - case tto - case tun - case tur - case tuv - case twn - case tza - case uga - case ukr - case umi - case ury - case usa - case uzb - case vat - case vct - case ven - case vgb - case vir - case vnm - case vut - case wlf - case wsm - case yem - case zaf - case zmb - case zwe - case unknown(String) - - public var rawValue: String { - switch self { - case .abw: return "ABW" - case .afg: return "AFG" - case .ago: return "AGO" - case .aia: return "AIA" - case .alb: return "ALB" - case .and: return "AND" - case .ant: return "ANT" - case .are: return "ARE" - case .arg: return "ARG" - case .arm: return "ARM" - case .asm: return "ASM" - case .atg: return "ATG" - case .aus: return "AUS" - case .aut: return "AUT" - case .aze: return "AZE" - case .bdi: return "BDI" - case .bel: return "BEL" - case .ben: return "BEN" - case .bes: return "BES" - case .bfa: return "BFA" - case .bgd: return "BGD" - case .bgr: return "BGR" - case .bhr: return "BHR" - case .bhs: return "BHS" - case .bih: return "BIH" - case .blr: return "BLR" - case .blz: return "BLZ" - case .bmu: return "BMU" - case .bol: return "BOL" - case .bra: return "BRA" - case .brb: return "BRB" - case .brn: return "BRN" - case .btn: return "BTN" - case .bwa: return "BWA" - case .caf: return "CAF" - case .can: return "CAN" - case .che: return "CHE" - case .chl: return "CHL" - case .chn: return "CHN" - case .civ: return "CIV" - case .cmr: return "CMR" - case .cod: return "COD" - case .cog: return "COG" - case .cok: return "COK" - case .col: return "COL" - case .com: return "COM" - case .cpv: return "CPV" - case .cri: return "CRI" - case .cub: return "CUB" - case .cuw: return "CUW" - case .cxr: return "CXR" - case .cym: return "CYM" - case .cyp: return "CYP" - case .cze: return "CZE" - case .deu: return "DEU" - case .dji: return "DJI" - case .dma: return "DMA" - case .dnk: return "DNK" - case .dom: return "DOM" - case .dza: return "DZA" - case .ecu: return "ECU" - case .egy: return "EGY" - case .eri: return "ERI" - case .esp: return "ESP" - case .est: return "EST" - case .eth: return "ETH" - case .fin: return "FIN" - case .fji: return "FJI" - case .flk: return "FLK" - case .fra: return "FRA" - case .fro: return "FRO" - case .fsm: return "FSM" - case .gab: return "GAB" - case .gbr: return "GBR" - case .geo: return "GEO" - case .ggy: return "GGY" - case .gha: return "GHA" - case .gib: return "GIB" - case .gin: return "GIN" - case .glp: return "GLP" - case .gmb: return "GMB" - case .gnb: return "GNB" - case .gnq: return "GNQ" - case .grc: return "GRC" - case .grd: return "GRD" - case .grl: return "GRL" - case .gtm: return "GTM" - case .guf: return "GUF" - case .gum: return "GUM" - case .guy: return "GUY" - case .hkg: return "HKG" - case .hnd: return "HND" - case .hrv: return "HRV" - case .hti: return "HTI" - case .hun: return "HUN" - case .idn: return "IDN" - case .imn: return "IMN" - case .ind: return "IND" - case .irl: return "IRL" - case .irq: return "IRQ" - case .isl: return "ISL" - case .isr: return "ISR" - case .ita: return "ITA" - case .jam: return "JAM" - case .jey: return "JEY" - case .jor: return "JOR" - case .jpn: return "JPN" - case .kaz: return "KAZ" - case .ken: return "KEN" - case .kgz: return "KGZ" - case .khm: return "KHM" - case .kir: return "KIR" - case .kna: return "KNA" - case .kor: return "KOR" - case .kwt: return "KWT" - case .lao: return "LAO" - case .lbn: return "LBN" - case .lbr: return "LBR" - case .lby: return "LBY" - case .lca: return "LCA" - case .lie: return "LIE" - case .lka: return "LKA" - case .lso: return "LSO" - case .ltu: return "LTU" - case .lux: return "LUX" - case .lva: return "LVA" - case .mac: return "MAC" - case .mar: return "MAR" - case .mco: return "MCO" - case .mda: return "MDA" - case .mdg: return "MDG" - case .mdv: return "MDV" - case .mex: return "MEX" - case .mhl: return "MHL" - case .mkd: return "MKD" - case .mli: return "MLI" - case .mlt: return "MLT" - case .mmr: return "MMR" - case .mne: return "MNE" - case .mng: return "MNG" - case .mnp: return "MNP" - case .moz: return "MOZ" - case .mrt: return "MRT" - case .msr: return "MSR" - case .mtq: return "MTQ" - case .mus: return "MUS" - case .mwi: return "MWI" - case .mys: return "MYS" - case .myt: return "MYT" - case .nam: return "NAM" - case .ncl: return "NCL" - case .ner: return "NER" - case .nfk: return "NFK" - case .nga: return "NGA" - case .nic: return "NIC" - case .niu: return "NIU" - case .nld: return "NLD" - case .nor: return "NOR" - case .npl: return "NPL" - case .nru: return "NRU" - case .nzl: return "NZL" - case .omn: return "OMN" - case .pak: return "PAK" - case .pan: return "PAN" - case .per: return "PER" - case .phl: return "PHL" - case .plw: return "PLW" - case .png: return "PNG" - case .pol: return "POL" - case .pri: return "PRI" - case .prt: return "PRT" - case .pry: return "PRY" - case .pse: return "PSE" - case .pyf: return "PYF" - case .qat: return "QAT" - case .reu: return "REU" - case .rou: return "ROU" - case .rus: return "RUS" - case .rwa: return "RWA" - case .sau: return "SAU" - case .sen: return "SEN" - case .sgp: return "SGP" - case .shn: return "SHN" - case .slb: return "SLB" - case .sle: return "SLE" - case .slv: return "SLV" - case .smr: return "SMR" - case .som: return "SOM" - case .spm: return "SPM" - case .srb: return "SRB" - case .ssd: return "SSD" - case .stp: return "STP" - case .sur: return "SUR" - case .svk: return "SVK" - case .svn: return "SVN" - case .swe: return "SWE" - case .swz: return "SWZ" - case .sxm: return "SXM" - case .syc: return "SYC" - case .tca: return "TCA" - case .tcd: return "TCD" - case .tgo: return "TGO" - case .tha: return "THA" - case .tjk: return "TJK" - case .tkm: return "TKM" - case .tls: return "TLS" - case .ton: return "TON" - case .tto: return "TTO" - case .tun: return "TUN" - case .tur: return "TUR" - case .tuv: return "TUV" - case .twn: return "TWN" - case .tza: return "TZA" - case .uga: return "UGA" - case .ukr: return "UKR" - case .umi: return "UMI" - case .ury: return "URY" - case .usa: return "USA" - case .uzb: return "UZB" - case .vat: return "VAT" - case .vct: return "VCT" - case .ven: return "VEN" - case .vgb: return "VGB" - case .vir: return "VIR" - case .vnm: return "VNM" - case .vut: return "VUT" - case .wlf: return "WLF" - case .wsm: return "WSM" - case .yem: return "YEM" - case .zaf: return "ZAF" - case .zmb: return "ZMB" - case .zwe: return "ZWE" - case .unknown(let rawValue): return rawValue - } + public struct Territory: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var abw: Self { + .init(rawValue: "ABW") + } + + public static var afg: Self { + .init(rawValue: "AFG") + } + + public static var ago: Self { + .init(rawValue: "AGO") + } + + public static var aia: Self { + .init(rawValue: "AIA") + } + + public static var alb: Self { + .init(rawValue: "ALB") + } + + public static var and: Self { + .init(rawValue: "AND") + } + + public static var ant: Self { + .init(rawValue: "ANT") + } + + public static var are: Self { + .init(rawValue: "ARE") + } + + public static var arg: Self { + .init(rawValue: "ARG") + } + + public static var arm: Self { + .init(rawValue: "ARM") + } + + public static var asm: Self { + .init(rawValue: "ASM") + } + + public static var atg: Self { + .init(rawValue: "ATG") + } + + public static var aus: Self { + .init(rawValue: "AUS") + } + + public static var aut: Self { + .init(rawValue: "AUT") + } + + public static var aze: Self { + .init(rawValue: "AZE") + } + + public static var bdi: Self { + .init(rawValue: "BDI") + } + + public static var bel: Self { + .init(rawValue: "BEL") + } + + public static var ben: Self { + .init(rawValue: "BEN") + } + + public static var bes: Self { + .init(rawValue: "BES") + } + + public static var bfa: Self { + .init(rawValue: "BFA") + } + + public static var bgd: Self { + .init(rawValue: "BGD") + } + + public static var bgr: Self { + .init(rawValue: "BGR") + } + + public static var bhr: Self { + .init(rawValue: "BHR") + } + + public static var bhs: Self { + .init(rawValue: "BHS") + } + + public static var bih: Self { + .init(rawValue: "BIH") + } + + public static var blr: Self { + .init(rawValue: "BLR") + } + + public static var blz: Self { + .init(rawValue: "BLZ") + } + + public static var bmu: Self { + .init(rawValue: "BMU") + } + + public static var bol: Self { + .init(rawValue: "BOL") + } + + public static var bra: Self { + .init(rawValue: "BRA") + } + + public static var brb: Self { + .init(rawValue: "BRB") + } + + public static var brn: Self { + .init(rawValue: "BRN") + } + + public static var btn: Self { + .init(rawValue: "BTN") + } + + public static var bwa: Self { + .init(rawValue: "BWA") + } + + public static var caf: Self { + .init(rawValue: "CAF") + } + + public static var can: Self { + .init(rawValue: "CAN") + } + + public static var che: Self { + .init(rawValue: "CHE") + } + + public static var chl: Self { + .init(rawValue: "CHL") + } + + public static var chn: Self { + .init(rawValue: "CHN") + } + + public static var civ: Self { + .init(rawValue: "CIV") + } + + public static var cmr: Self { + .init(rawValue: "CMR") + } + + public static var cod: Self { + .init(rawValue: "COD") + } + + public static var cog: Self { + .init(rawValue: "COG") + } + + public static var cok: Self { + .init(rawValue: "COK") + } + + public static var col: Self { + .init(rawValue: "COL") + } + + public static var com: Self { + .init(rawValue: "COM") + } + + public static var cpv: Self { + .init(rawValue: "CPV") + } + + public static var cri: Self { + .init(rawValue: "CRI") + } + + public static var cub: Self { + .init(rawValue: "CUB") + } + + public static var cuw: Self { + .init(rawValue: "CUW") + } + + public static var cxr: Self { + .init(rawValue: "CXR") } + public static var cym: Self { + .init(rawValue: "CYM") + } + + public static var cyp: Self { + .init(rawValue: "CYP") + } + + public static var cze: Self { + .init(rawValue: "CZE") + } + + public static var deu: Self { + .init(rawValue: "DEU") + } + + public static var dji: Self { + .init(rawValue: "DJI") + } + + public static var dma: Self { + .init(rawValue: "DMA") + } + + public static var dnk: Self { + .init(rawValue: "DNK") + } + + public static var dom: Self { + .init(rawValue: "DOM") + } + + public static var dza: Self { + .init(rawValue: "DZA") + } + + public static var ecu: Self { + .init(rawValue: "ECU") + } + + public static var egy: Self { + .init(rawValue: "EGY") + } + + public static var eri: Self { + .init(rawValue: "ERI") + } + + public static var esp: Self { + .init(rawValue: "ESP") + } + + public static var est: Self { + .init(rawValue: "EST") + } + + public static var eth: Self { + .init(rawValue: "ETH") + } + + public static var fin: Self { + .init(rawValue: "FIN") + } + + public static var fji: Self { + .init(rawValue: "FJI") + } + + public static var flk: Self { + .init(rawValue: "FLK") + } + + public static var fra: Self { + .init(rawValue: "FRA") + } + + public static var fro: Self { + .init(rawValue: "FRO") + } + + public static var fsm: Self { + .init(rawValue: "FSM") + } + + public static var gab: Self { + .init(rawValue: "GAB") + } + + public static var gbr: Self { + .init(rawValue: "GBR") + } + + public static var geo: Self { + .init(rawValue: "GEO") + } + + public static var ggy: Self { + .init(rawValue: "GGY") + } + + public static var gha: Self { + .init(rawValue: "GHA") + } + + public static var gib: Self { + .init(rawValue: "GIB") + } + + public static var gin: Self { + .init(rawValue: "GIN") + } + + public static var glp: Self { + .init(rawValue: "GLP") + } + + public static var gmb: Self { + .init(rawValue: "GMB") + } + + public static var gnb: Self { + .init(rawValue: "GNB") + } + + public static var gnq: Self { + .init(rawValue: "GNQ") + } + + public static var grc: Self { + .init(rawValue: "GRC") + } + + public static var grd: Self { + .init(rawValue: "GRD") + } + + public static var grl: Self { + .init(rawValue: "GRL") + } + + public static var gtm: Self { + .init(rawValue: "GTM") + } + + public static var guf: Self { + .init(rawValue: "GUF") + } + + public static var gum: Self { + .init(rawValue: "GUM") + } + + public static var guy: Self { + .init(rawValue: "GUY") + } + + public static var hkg: Self { + .init(rawValue: "HKG") + } + + public static var hnd: Self { + .init(rawValue: "HND") + } + + public static var hrv: Self { + .init(rawValue: "HRV") + } + + public static var hti: Self { + .init(rawValue: "HTI") + } + + public static var hun: Self { + .init(rawValue: "HUN") + } + + public static var idn: Self { + .init(rawValue: "IDN") + } + + public static var imn: Self { + .init(rawValue: "IMN") + } + + public static var ind: Self { + .init(rawValue: "IND") + } + + public static var irl: Self { + .init(rawValue: "IRL") + } + + public static var irq: Self { + .init(rawValue: "IRQ") + } + + public static var isl: Self { + .init(rawValue: "ISL") + } + + public static var isr: Self { + .init(rawValue: "ISR") + } + + public static var ita: Self { + .init(rawValue: "ITA") + } + + public static var jam: Self { + .init(rawValue: "JAM") + } + + public static var jey: Self { + .init(rawValue: "JEY") + } + + public static var jor: Self { + .init(rawValue: "JOR") + } + + public static var jpn: Self { + .init(rawValue: "JPN") + } + + public static var kaz: Self { + .init(rawValue: "KAZ") + } + + public static var ken: Self { + .init(rawValue: "KEN") + } + + public static var kgz: Self { + .init(rawValue: "KGZ") + } + + public static var khm: Self { + .init(rawValue: "KHM") + } + + public static var kir: Self { + .init(rawValue: "KIR") + } + + public static var kna: Self { + .init(rawValue: "KNA") + } + + public static var kor: Self { + .init(rawValue: "KOR") + } + + public static var kwt: Self { + .init(rawValue: "KWT") + } + + public static var lao: Self { + .init(rawValue: "LAO") + } + + public static var lbn: Self { + .init(rawValue: "LBN") + } + + public static var lbr: Self { + .init(rawValue: "LBR") + } + + public static var lby: Self { + .init(rawValue: "LBY") + } + + public static var lca: Self { + .init(rawValue: "LCA") + } + + public static var lie: Self { + .init(rawValue: "LIE") + } + + public static var lka: Self { + .init(rawValue: "LKA") + } + + public static var lso: Self { + .init(rawValue: "LSO") + } + + public static var ltu: Self { + .init(rawValue: "LTU") + } + + public static var lux: Self { + .init(rawValue: "LUX") + } + + public static var lva: Self { + .init(rawValue: "LVA") + } + + public static var mac: Self { + .init(rawValue: "MAC") + } + + public static var mar: Self { + .init(rawValue: "MAR") + } + + public static var mco: Self { + .init(rawValue: "MCO") + } + + public static var mda: Self { + .init(rawValue: "MDA") + } + + public static var mdg: Self { + .init(rawValue: "MDG") + } + + public static var mdv: Self { + .init(rawValue: "MDV") + } + + public static var mex: Self { + .init(rawValue: "MEX") + } + + public static var mhl: Self { + .init(rawValue: "MHL") + } + + public static var mkd: Self { + .init(rawValue: "MKD") + } + + public static var mli: Self { + .init(rawValue: "MLI") + } + + public static var mlt: Self { + .init(rawValue: "MLT") + } + + public static var mmr: Self { + .init(rawValue: "MMR") + } + + public static var mne: Self { + .init(rawValue: "MNE") + } + + public static var mng: Self { + .init(rawValue: "MNG") + } + + public static var mnp: Self { + .init(rawValue: "MNP") + } + + public static var moz: Self { + .init(rawValue: "MOZ") + } + + public static var mrt: Self { + .init(rawValue: "MRT") + } + + public static var msr: Self { + .init(rawValue: "MSR") + } + + public static var mtq: Self { + .init(rawValue: "MTQ") + } + + public static var mus: Self { + .init(rawValue: "MUS") + } + + public static var mwi: Self { + .init(rawValue: "MWI") + } + + public static var mys: Self { + .init(rawValue: "MYS") + } + + public static var myt: Self { + .init(rawValue: "MYT") + } + + public static var nam: Self { + .init(rawValue: "NAM") + } + + public static var ncl: Self { + .init(rawValue: "NCL") + } + + public static var ner: Self { + .init(rawValue: "NER") + } + + public static var nfk: Self { + .init(rawValue: "NFK") + } + + public static var nga: Self { + .init(rawValue: "NGA") + } + + public static var nic: Self { + .init(rawValue: "NIC") + } + + public static var niu: Self { + .init(rawValue: "NIU") + } + + public static var nld: Self { + .init(rawValue: "NLD") + } + + public static var nor: Self { + .init(rawValue: "NOR") + } + + public static var npl: Self { + .init(rawValue: "NPL") + } + + public static var nru: Self { + .init(rawValue: "NRU") + } + + public static var nzl: Self { + .init(rawValue: "NZL") + } + + public static var omn: Self { + .init(rawValue: "OMN") + } + + public static var pak: Self { + .init(rawValue: "PAK") + } + + public static var pan: Self { + .init(rawValue: "PAN") + } + + public static var per: Self { + .init(rawValue: "PER") + } + + public static var phl: Self { + .init(rawValue: "PHL") + } + + public static var plw: Self { + .init(rawValue: "PLW") + } + + public static var png: Self { + .init(rawValue: "PNG") + } + + public static var pol: Self { + .init(rawValue: "POL") + } + + public static var pri: Self { + .init(rawValue: "PRI") + } + + public static var prt: Self { + .init(rawValue: "PRT") + } + + public static var pry: Self { + .init(rawValue: "PRY") + } + + public static var pse: Self { + .init(rawValue: "PSE") + } + + public static var pyf: Self { + .init(rawValue: "PYF") + } + + public static var qat: Self { + .init(rawValue: "QAT") + } + + public static var reu: Self { + .init(rawValue: "REU") + } + + public static var rou: Self { + .init(rawValue: "ROU") + } + + public static var rus: Self { + .init(rawValue: "RUS") + } + + public static var rwa: Self { + .init(rawValue: "RWA") + } + + public static var sau: Self { + .init(rawValue: "SAU") + } + + public static var sen: Self { + .init(rawValue: "SEN") + } + + public static var sgp: Self { + .init(rawValue: "SGP") + } + + public static var shn: Self { + .init(rawValue: "SHN") + } + + public static var slb: Self { + .init(rawValue: "SLB") + } + + public static var sle: Self { + .init(rawValue: "SLE") + } + + public static var slv: Self { + .init(rawValue: "SLV") + } + + public static var smr: Self { + .init(rawValue: "SMR") + } + + public static var som: Self { + .init(rawValue: "SOM") + } + + public static var spm: Self { + .init(rawValue: "SPM") + } + + public static var srb: Self { + .init(rawValue: "SRB") + } + + public static var ssd: Self { + .init(rawValue: "SSD") + } + + public static var stp: Self { + .init(rawValue: "STP") + } + + public static var sur: Self { + .init(rawValue: "SUR") + } + + public static var svk: Self { + .init(rawValue: "SVK") + } + + public static var svn: Self { + .init(rawValue: "SVN") + } + + public static var swe: Self { + .init(rawValue: "SWE") + } + + public static var swz: Self { + .init(rawValue: "SWZ") + } + + public static var sxm: Self { + .init(rawValue: "SXM") + } + + public static var syc: Self { + .init(rawValue: "SYC") + } + + public static var tca: Self { + .init(rawValue: "TCA") + } + + public static var tcd: Self { + .init(rawValue: "TCD") + } + + public static var tgo: Self { + .init(rawValue: "TGO") + } + + public static var tha: Self { + .init(rawValue: "THA") + } + + public static var tjk: Self { + .init(rawValue: "TJK") + } + + public static var tkm: Self { + .init(rawValue: "TKM") + } + + public static var tls: Self { + .init(rawValue: "TLS") + } + + public static var ton: Self { + .init(rawValue: "TON") + } + + public static var tto: Self { + .init(rawValue: "TTO") + } + + public static var tun: Self { + .init(rawValue: "TUN") + } + + public static var tur: Self { + .init(rawValue: "TUR") + } + + public static var tuv: Self { + .init(rawValue: "TUV") + } + + public static var twn: Self { + .init(rawValue: "TWN") + } + + public static var tza: Self { + .init(rawValue: "TZA") + } + + public static var uga: Self { + .init(rawValue: "UGA") + } + + public static var ukr: Self { + .init(rawValue: "UKR") + } + + public static var umi: Self { + .init(rawValue: "UMI") + } + + public static var ury: Self { + .init(rawValue: "URY") + } + + public static var usa: Self { + .init(rawValue: "USA") + } + + public static var uzb: Self { + .init(rawValue: "UZB") + } + + public static var vat: Self { + .init(rawValue: "VAT") + } + + public static var vct: Self { + .init(rawValue: "VCT") + } + + public static var ven: Self { + .init(rawValue: "VEN") + } + + public static var vgb: Self { + .init(rawValue: "VGB") + } + + public static var vir: Self { + .init(rawValue: "VIR") + } + + public static var vnm: Self { + .init(rawValue: "VNM") + } + + public static var vut: Self { + .init(rawValue: "VUT") + } + + public static var wlf: Self { + .init(rawValue: "WLF") + } + + public static var wsm: Self { + .init(rawValue: "WSM") + } + + public static var yem: Self { + .init(rawValue: "YEM") + } + + public static var zaf: Self { + .init(rawValue: "ZAF") + } + + public static var zmb: Self { + .init(rawValue: "ZMB") + } + + public static var zwe: Self { + .init(rawValue: "ZWE") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "ABW": self = .abw - case "AFG": self = .afg - case "AGO": self = .ago - case "AIA": self = .aia - case "ALB": self = .alb - case "AND": self = .and - case "ANT": self = .ant - case "ARE": self = .are - case "ARG": self = .arg - case "ARM": self = .arm - case "ASM": self = .asm - case "ATG": self = .atg - case "AUS": self = .aus - case "AUT": self = .aut - case "AZE": self = .aze - case "BDI": self = .bdi - case "BEL": self = .bel - case "BEN": self = .ben - case "BES": self = .bes - case "BFA": self = .bfa - case "BGD": self = .bgd - case "BGR": self = .bgr - case "BHR": self = .bhr - case "BHS": self = .bhs - case "BIH": self = .bih - case "BLR": self = .blr - case "BLZ": self = .blz - case "BMU": self = .bmu - case "BOL": self = .bol - case "BRA": self = .bra - case "BRB": self = .brb - case "BRN": self = .brn - case "BTN": self = .btn - case "BWA": self = .bwa - case "CAF": self = .caf - case "CAN": self = .can - case "CHE": self = .che - case "CHL": self = .chl - case "CHN": self = .chn - case "CIV": self = .civ - case "CMR": self = .cmr - case "COD": self = .cod - case "COG": self = .cog - case "COK": self = .cok - case "COL": self = .col - case "COM": self = .com - case "CPV": self = .cpv - case "CRI": self = .cri - case "CUB": self = .cub - case "CUW": self = .cuw - case "CXR": self = .cxr - case "CYM": self = .cym - case "CYP": self = .cyp - case "CZE": self = .cze - case "DEU": self = .deu - case "DJI": self = .dji - case "DMA": self = .dma - case "DNK": self = .dnk - case "DOM": self = .dom - case "DZA": self = .dza - case "ECU": self = .ecu - case "EGY": self = .egy - case "ERI": self = .eri - case "ESP": self = .esp - case "EST": self = .est - case "ETH": self = .eth - case "FIN": self = .fin - case "FJI": self = .fji - case "FLK": self = .flk - case "FRA": self = .fra - case "FRO": self = .fro - case "FSM": self = .fsm - case "GAB": self = .gab - case "GBR": self = .gbr - case "GEO": self = .geo - case "GGY": self = .ggy - case "GHA": self = .gha - case "GIB": self = .gib - case "GIN": self = .gin - case "GLP": self = .glp - case "GMB": self = .gmb - case "GNB": self = .gnb - case "GNQ": self = .gnq - case "GRC": self = .grc - case "GRD": self = .grd - case "GRL": self = .grl - case "GTM": self = .gtm - case "GUF": self = .guf - case "GUM": self = .gum - case "GUY": self = .guy - case "HKG": self = .hkg - case "HND": self = .hnd - case "HRV": self = .hrv - case "HTI": self = .hti - case "HUN": self = .hun - case "IDN": self = .idn - case "IMN": self = .imn - case "IND": self = .ind - case "IRL": self = .irl - case "IRQ": self = .irq - case "ISL": self = .isl - case "ISR": self = .isr - case "ITA": self = .ita - case "JAM": self = .jam - case "JEY": self = .jey - case "JOR": self = .jor - case "JPN": self = .jpn - case "KAZ": self = .kaz - case "KEN": self = .ken - case "KGZ": self = .kgz - case "KHM": self = .khm - case "KIR": self = .kir - case "KNA": self = .kna - case "KOR": self = .kor - case "KWT": self = .kwt - case "LAO": self = .lao - case "LBN": self = .lbn - case "LBR": self = .lbr - case "LBY": self = .lby - case "LCA": self = .lca - case "LIE": self = .lie - case "LKA": self = .lka - case "LSO": self = .lso - case "LTU": self = .ltu - case "LUX": self = .lux - case "LVA": self = .lva - case "MAC": self = .mac - case "MAR": self = .mar - case "MCO": self = .mco - case "MDA": self = .mda - case "MDG": self = .mdg - case "MDV": self = .mdv - case "MEX": self = .mex - case "MHL": self = .mhl - case "MKD": self = .mkd - case "MLI": self = .mli - case "MLT": self = .mlt - case "MMR": self = .mmr - case "MNE": self = .mne - case "MNG": self = .mng - case "MNP": self = .mnp - case "MOZ": self = .moz - case "MRT": self = .mrt - case "MSR": self = .msr - case "MTQ": self = .mtq - case "MUS": self = .mus - case "MWI": self = .mwi - case "MYS": self = .mys - case "MYT": self = .myt - case "NAM": self = .nam - case "NCL": self = .ncl - case "NER": self = .ner - case "NFK": self = .nfk - case "NGA": self = .nga - case "NIC": self = .nic - case "NIU": self = .niu - case "NLD": self = .nld - case "NOR": self = .nor - case "NPL": self = .npl - case "NRU": self = .nru - case "NZL": self = .nzl - case "OMN": self = .omn - case "PAK": self = .pak - case "PAN": self = .pan - case "PER": self = .per - case "PHL": self = .phl - case "PLW": self = .plw - case "PNG": self = .png - case "POL": self = .pol - case "PRI": self = .pri - case "PRT": self = .prt - case "PRY": self = .pry - case "PSE": self = .pse - case "PYF": self = .pyf - case "QAT": self = .qat - case "REU": self = .reu - case "ROU": self = .rou - case "RUS": self = .rus - case "RWA": self = .rwa - case "SAU": self = .sau - case "SEN": self = .sen - case "SGP": self = .sgp - case "SHN": self = .shn - case "SLB": self = .slb - case "SLE": self = .sle - case "SLV": self = .slv - case "SMR": self = .smr - case "SOM": self = .som - case "SPM": self = .spm - case "SRB": self = .srb - case "SSD": self = .ssd - case "STP": self = .stp - case "SUR": self = .sur - case "SVK": self = .svk - case "SVN": self = .svn - case "SWE": self = .swe - case "SWZ": self = .swz - case "SXM": self = .sxm - case "SYC": self = .syc - case "TCA": self = .tca - case "TCD": self = .tcd - case "TGO": self = .tgo - case "THA": self = .tha - case "TJK": self = .tjk - case "TKM": self = .tkm - case "TLS": self = .tls - case "TON": self = .ton - case "TTO": self = .tto - case "TUN": self = .tun - case "TUR": self = .tur - case "TUV": self = .tuv - case "TWN": self = .twn - case "TZA": self = .tza - case "UGA": self = .uga - case "UKR": self = .ukr - case "UMI": self = .umi - case "URY": self = .ury - case "USA": self = .usa - case "UZB": self = .uzb - case "VAT": self = .vat - case "VCT": self = .vct - case "VEN": self = .ven - case "VGB": self = .vgb - case "VIR": self = .vir - case "VNM": self = .vnm - case "VUT": self = .vut - case "WLF": self = .wlf - case "WSM": self = .wsm - case "YEM": self = .yem - case "ZAF": self = .zaf - case "ZMB": self = .zmb - case "ZWE": self = .zwe - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } @@ -954,50 +1193,47 @@ extension V1.AppStoreVersions.ById.CustomerReviews.GET { } } - public enum Include: Hashable, Codable, RawRepresentable { - case response - case unknown(String) + public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var response: Self { + .init(rawValue: "response") + } - public var rawValue: String { - switch self { - case .response: return "response" - case .unknown(let rawValue): return rawValue - } + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "response": self = .response - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum Sort: Hashable, Codable, RawRepresentable { - case createdDate - case createdDateDesc - case rating - case ratingDesc - case unknown(String) - - public var rawValue: String { - switch self { - case .createdDate: return "createdDate" - case .createdDateDesc: return "-createdDate" - case .rating: return "rating" - case .ratingDesc: return "-rating" - case .unknown(let rawValue): return rawValue - } + public struct Sort: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var createdDate: Self { + .init(rawValue: "createdDate") + } + + public static var createdDateDesc: Self { + .init(rawValue: "-createdDate") } + public static var rating: Self { + .init(rawValue: "rating") + } + + public static var ratingDesc: Self { + .init(rawValue: "-rating") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "createdDate": self = .createdDate - case "-createdDate": self = .createdDateDesc - case "rating": self = .rating - case "-rating": self = .ratingDesc - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppStoreVersions/ById/GameCenterAppVersion/AppStoreVersionsByIdGameCenterAppVersion.GET.08895ae.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppStoreVersions/ById/GameCenterAppVersion/AppStoreVersionsByIdGameCenterAppVersion.GET.08895ae.generated.swift new file mode 100644 index 00000000..2cb1f393 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppStoreVersions/ById/GameCenterAppVersion/AppStoreVersionsByIdGameCenterAppVersion.GET.08895ae.generated.swift @@ -0,0 +1,303 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.AppStoreVersions.ById.GameCenterAppVersion { + public struct GET: Endpoint { + public typealias Response = GameCenterAppVersionResponse + + public var path: String { + "/v1/appStoreVersions/\(id)/gameCenterAppVersion" + } + + /// the id of the requested resource + public var id: String + + public var parameters: Parameters = Parameters() + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + components?.queryItems = [ + URLQueryItem(name: "fields[appStoreVersions]", + value: parameters.fields[.appStoreVersions]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "fields[gameCenterAppVersions]", + value: parameters.fields[.gameCenterAppVersions]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "include", + value: parameters.include?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "limit[compatibilityVersions]", + value: parameters.limit[.compatibilityVersions].map { "\($0)" }) + ].filter { $0.value != nil } + if components?.queryItems?.isEmpty ?? false { + components?.queryItems = nil + } + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "GET" + return urlRequest + } + + /// - Returns: **200**, Single GameCenterAppVersion as `GameCenterAppVersionResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(GameCenterAppVersionResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +extension V1.AppStoreVersions.ById.GameCenterAppVersion.GET { + public struct Parameters: Hashable { + public var fields: Fields = Fields() + + /// comma-separated list of relationships to include + public var include: [Include]? + + public var limit: Limit = Limit() + + public struct Fields: Hashable { + public subscript (_ relation: Relation) -> T { + get { values[relation]?.base as! T } + set { values[relation] = AnyHashable(newValue) } + } + + private var values: [AnyHashable: AnyHashable] = [:] + + public struct AppStoreVersions: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var ageRatingDeclaration: Self { + .init(rawValue: "ageRatingDeclaration") + } + + public static var alternativeDistributionPackage: Self { + .init(rawValue: "alternativeDistributionPackage") + } + + public static var app: Self { + .init(rawValue: "app") + } + + public static var appClipDefaultExperience: Self { + .init(rawValue: "appClipDefaultExperience") + } + + public static var appStoreReviewDetail: Self { + .init(rawValue: "appStoreReviewDetail") + } + + public static var appStoreState: Self { + .init(rawValue: "appStoreState") + } + + public static var appStoreVersionExperiments: Self { + .init(rawValue: "appStoreVersionExperiments") + } + + public static var appStoreVersionExperimentsV2: Self { + .init(rawValue: "appStoreVersionExperimentsV2") + } + + public static var appStoreVersionLocalizations: Self { + .init(rawValue: "appStoreVersionLocalizations") + } + + public static var appStoreVersionPhasedRelease: Self { + .init(rawValue: "appStoreVersionPhasedRelease") + } + + public static var appStoreVersionSubmission: Self { + .init(rawValue: "appStoreVersionSubmission") + } + + public static var appVersionState: Self { + .init(rawValue: "appVersionState") + } + + public static var build: Self { + .init(rawValue: "build") + } + + public static var copyright: Self { + .init(rawValue: "copyright") + } + + public static var createdDate: Self { + .init(rawValue: "createdDate") + } + + public static var customerReviews: Self { + .init(rawValue: "customerReviews") + } + + public static var downloadable: Self { + .init(rawValue: "downloadable") + } + + public static var earliestReleaseDate: Self { + .init(rawValue: "earliestReleaseDate") + } + + public static var gameCenterAppVersion: Self { + .init(rawValue: "gameCenterAppVersion") + } + + public static var platform: Self { + .init(rawValue: "platform") + } + + public static var releaseType: Self { + .init(rawValue: "releaseType") + } + + public static var reviewType: Self { + .init(rawValue: "reviewType") + } + + public static var routingAppCoverage: Self { + .init(rawValue: "routingAppCoverage") + } + + public static var usesIdfa: Self { + .init(rawValue: "usesIdfa") + } + + public static var versionString: Self { + .init(rawValue: "versionString") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct GameCenterAppVersions: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var appStoreVersion: Self { + .init(rawValue: "appStoreVersion") + } + + public static var compatibilityVersions: Self { + .init(rawValue: "compatibilityVersions") + } + + public static var enabled: Self { + .init(rawValue: "enabled") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct Relation: Hashable { + /// the fields to include for returned resources of type appStoreVersions + public static var appStoreVersions: Relation<[AppStoreVersions]?> { + .init(key: "fields[appStoreVersions]") + } + + /// the fields to include for returned resources of type gameCenterAppVersions + public static var gameCenterAppVersions: Relation<[GameCenterAppVersions]?> { + .init(key: "fields[gameCenterAppVersions]") + } + + internal let key: String + + public func hash(into hasher: inout Hasher) { + hasher.combine(key) + } + } + } + + public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var appStoreVersion: Self { + .init(rawValue: "appStoreVersion") + } + + public static var compatibilityVersions: Self { + .init(rawValue: "compatibilityVersions") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct Limit: Hashable { + public subscript (_ relation: Relation) -> T { + get { values[relation]?.base as! T } + set { values[relation] = AnyHashable(newValue) } + } + + private var values: [AnyHashable: AnyHashable] = [:] + + public struct Relation: Hashable { + /// maximum number of related compatibilityVersions returned (when they are included) + public static var compatibilityVersions: Relation { + .init(key: "limit[compatibilityVersions]") + } + + internal let key: String + + public func hash(into hasher: inout Hasher) { + hasher.combine(key) + } + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppStoreVersions/ById/Relationships/AgeRatingDeclaration/AppStoreVersionsByIdRelationshipsAgeRatingDeclaration.GET.342e198.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppStoreVersions/ById/Relationships/AgeRatingDeclaration/AppStoreVersionsByIdRelationshipsAgeRatingDeclaration.GET.342e198.generated.swift new file mode 100644 index 00000000..8fa3839b --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppStoreVersions/ById/Relationships/AgeRatingDeclaration/AppStoreVersionsByIdRelationshipsAgeRatingDeclaration.GET.342e198.generated.swift @@ -0,0 +1,87 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.AppStoreVersions.ById.Relationships.AgeRatingDeclaration { + @available(*, deprecated) + public struct GET: Endpoint { + public typealias Response = AppStoreVersionAgeRatingDeclarationLinkageResponse + + public var path: String { + "/v1/appStoreVersions/\(id)/relationships/ageRatingDeclaration" + } + + /// the id of the requested resource + public var id: String + + public var parameters: Parameters = Parameters() + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + components?.queryItems = [ + + ].filter { $0.value != nil } + if components?.queryItems?.isEmpty ?? false { + components?.queryItems = nil + } + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "GET" + return urlRequest + } + + /// - Returns: **200**, Related linkage as `AppStoreVersionAgeRatingDeclarationLinkageResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(AppStoreVersionAgeRatingDeclarationLinkageResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +extension V1.AppStoreVersions.ById.Relationships.AgeRatingDeclaration.GET { + public struct Parameters: Hashable { + + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppStoreVersions/ById/Relationships/AlternativeDistributionPackage/AppStoreVersionsByIdRelationshipsAlternativeDistributionPackage.GET.2a7d286.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppStoreVersions/ById/Relationships/AlternativeDistributionPackage/AppStoreVersionsByIdRelationshipsAlternativeDistributionPackage.GET.2a7d286.generated.swift new file mode 100644 index 00000000..5e32bcbc --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppStoreVersions/ById/Relationships/AlternativeDistributionPackage/AppStoreVersionsByIdRelationshipsAlternativeDistributionPackage.GET.2a7d286.generated.swift @@ -0,0 +1,86 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.AppStoreVersions.ById.Relationships.AlternativeDistributionPackage { + public struct GET: Endpoint { + public typealias Response = AppStoreVersionAlternativeDistributionPackageLinkageResponse + + public var path: String { + "/v1/appStoreVersions/\(id)/relationships/alternativeDistributionPackage" + } + + /// the id of the requested resource + public var id: String + + public var parameters: Parameters = Parameters() + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + components?.queryItems = [ + + ].filter { $0.value != nil } + if components?.queryItems?.isEmpty ?? false { + components?.queryItems = nil + } + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "GET" + return urlRequest + } + + /// - Returns: **200**, Related linkage as `AppStoreVersionAlternativeDistributionPackageLinkageResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(AppStoreVersionAlternativeDistributionPackageLinkageResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +extension V1.AppStoreVersions.ById.Relationships.AlternativeDistributionPackage.GET { + public struct Parameters: Hashable { + + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppStoreVersions/ById/Relationships/AppClipDefaultExperience/AppStoreVersionsByIdRelationshipsAppClipDefaultExperience.GET.2723b06.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppStoreVersions/ById/Relationships/AppClipDefaultExperience/AppStoreVersionsByIdRelationshipsAppClipDefaultExperience.GET.2723b06.generated.swift index 53e89c3d..793346b1 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppStoreVersions/ById/Relationships/AppClipDefaultExperience/AppStoreVersionsByIdRelationshipsAppClipDefaultExperience.GET.2723b06.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppStoreVersions/ById/Relationships/AppClipDefaultExperience/AppStoreVersionsByIdRelationshipsAppClipDefaultExperience.GET.2723b06.generated.swift @@ -41,8 +41,10 @@ extension V1.AppStoreVersions.ById.Relationships.AppClipDefaultExperience { /// - Returns: **200**, Related linkage as `AppStoreVersionAppClipDefaultExperienceLinkageResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -56,12 +58,18 @@ extension V1.AppStoreVersions.ById.Relationships.AppClipDefaultExperience { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 404: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppStoreVersions/ById/Relationships/AppClipDefaultExperience/AppStoreVersionsByIdRelationshipsAppClipDefaultExperience.PATCH.2723b06.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppStoreVersions/ById/Relationships/AppClipDefaultExperience/AppStoreVersionsByIdRelationshipsAppClipDefaultExperience.PATCH.2723b06.generated.swift index 59050b62..4f4dea95 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppStoreVersions/ById/Relationships/AppClipDefaultExperience/AppStoreVersionsByIdRelationshipsAppClipDefaultExperience.PATCH.2723b06.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppStoreVersions/ById/Relationships/AppClipDefaultExperience/AppStoreVersionsByIdRelationshipsAppClipDefaultExperience.PATCH.2723b06.generated.swift @@ -46,10 +46,12 @@ extension V1.AppStoreVersions.ById.Relationships.AppClipDefaultExperience { return urlRequest } - /// - Returns: **204**, Success (no content) + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **422**, Unprocessable request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -57,8 +59,8 @@ extension V1.AppStoreVersions.ById.Relationships.AppClipDefaultExperience { } switch urlResponse.statusCode { - case 204: - return + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) @@ -69,6 +71,12 @@ extension V1.AppStoreVersions.ById.Relationships.AppClipDefaultExperience { case 409: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 422: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppStoreVersions/ById/Relationships/AppStoreReviewDetail/AppStoreVersionsByIdRelationshipsAppStoreReviewDetail.GET.9a54c13.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppStoreVersions/ById/Relationships/AppStoreReviewDetail/AppStoreVersionsByIdRelationshipsAppStoreReviewDetail.GET.9a54c13.generated.swift new file mode 100644 index 00000000..bea9afb0 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppStoreVersions/ById/Relationships/AppStoreReviewDetail/AppStoreVersionsByIdRelationshipsAppStoreReviewDetail.GET.9a54c13.generated.swift @@ -0,0 +1,86 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.AppStoreVersions.ById.Relationships.AppStoreReviewDetail { + public struct GET: Endpoint { + public typealias Response = AppStoreVersionAppStoreReviewDetailLinkageResponse + + public var path: String { + "/v1/appStoreVersions/\(id)/relationships/appStoreReviewDetail" + } + + /// the id of the requested resource + public var id: String + + public var parameters: Parameters = Parameters() + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + components?.queryItems = [ + + ].filter { $0.value != nil } + if components?.queryItems?.isEmpty ?? false { + components?.queryItems = nil + } + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "GET" + return urlRequest + } + + /// - Returns: **200**, Related linkage as `AppStoreVersionAppStoreReviewDetailLinkageResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(AppStoreVersionAppStoreReviewDetailLinkageResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +extension V1.AppStoreVersions.ById.Relationships.AppStoreReviewDetail.GET { + public struct Parameters: Hashable { + + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppStoreVersions/ById/Relationships/AppStoreVersionExperiments/AppStoreVersionsByIdRelationshipsAppStoreVersionExperiments.GET.53f31c3.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppStoreVersions/ById/Relationships/AppStoreVersionExperiments/AppStoreVersionsByIdRelationshipsAppStoreVersionExperiments.GET.53f31c3.generated.swift new file mode 100644 index 00000000..4d6cd8d6 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppStoreVersions/ById/Relationships/AppStoreVersionExperiments/AppStoreVersionsByIdRelationshipsAppStoreVersionExperiments.GET.53f31c3.generated.swift @@ -0,0 +1,89 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.AppStoreVersions.ById.Relationships.AppStoreVersionExperiments { + @available(*, deprecated) + public struct GET: Endpoint { + public typealias Response = AppStoreVersionAppStoreVersionExperimentsLinkagesResponse + + public var path: String { + "/v1/appStoreVersions/\(id)/relationships/appStoreVersionExperiments" + } + + /// the id of the requested resource + public var id: String + + public var parameters: Parameters = Parameters() + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + components?.queryItems = [ + URLQueryItem(name: "limit", + value: parameters.limit.map { "\($0)" }) + ].filter { $0.value != nil } + if components?.queryItems?.isEmpty ?? false { + components?.queryItems = nil + } + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "GET" + return urlRequest + } + + /// - Returns: **200**, List of related linkages as `AppStoreVersionAppStoreVersionExperimentsLinkagesResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(AppStoreVersionAppStoreVersionExperimentsLinkagesResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +extension V1.AppStoreVersions.ById.Relationships.AppStoreVersionExperiments.GET { + public struct Parameters: Hashable { + /// maximum resources per page + public var limit: Int? + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppStoreVersions/ById/Relationships/AppStoreVersionExperimentsV2/AppStoreVersionsByIdRelationshipsAppStoreVersionExperimentsV2.GET.e1ee67f.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppStoreVersions/ById/Relationships/AppStoreVersionExperimentsV2/AppStoreVersionsByIdRelationshipsAppStoreVersionExperimentsV2.GET.e1ee67f.generated.swift new file mode 100644 index 00000000..834eb999 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppStoreVersions/ById/Relationships/AppStoreVersionExperimentsV2/AppStoreVersionsByIdRelationshipsAppStoreVersionExperimentsV2.GET.e1ee67f.generated.swift @@ -0,0 +1,88 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.AppStoreVersions.ById.Relationships.AppStoreVersionExperimentsV2 { + public struct GET: Endpoint { + public typealias Response = AppStoreVersionAppStoreVersionExperimentsV2LinkagesResponse + + public var path: String { + "/v1/appStoreVersions/\(id)/relationships/appStoreVersionExperimentsV2" + } + + /// the id of the requested resource + public var id: String + + public var parameters: Parameters = Parameters() + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + components?.queryItems = [ + URLQueryItem(name: "limit", + value: parameters.limit.map { "\($0)" }) + ].filter { $0.value != nil } + if components?.queryItems?.isEmpty ?? false { + components?.queryItems = nil + } + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "GET" + return urlRequest + } + + /// - Returns: **200**, List of related linkages as `AppStoreVersionAppStoreVersionExperimentsV2LinkagesResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(AppStoreVersionAppStoreVersionExperimentsV2LinkagesResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +extension V1.AppStoreVersions.ById.Relationships.AppStoreVersionExperimentsV2.GET { + public struct Parameters: Hashable { + /// maximum resources per page + public var limit: Int? + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppStoreVersions/ById/Relationships/AppStoreVersionLocalizations/AppStoreVersionsByIdRelationshipsAppStoreVersionLocalizations.GET.864e6c5.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppStoreVersions/ById/Relationships/AppStoreVersionLocalizations/AppStoreVersionsByIdRelationshipsAppStoreVersionLocalizations.GET.864e6c5.generated.swift new file mode 100644 index 00000000..226e630e --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppStoreVersions/ById/Relationships/AppStoreVersionLocalizations/AppStoreVersionsByIdRelationshipsAppStoreVersionLocalizations.GET.864e6c5.generated.swift @@ -0,0 +1,88 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.AppStoreVersions.ById.Relationships.AppStoreVersionLocalizations { + public struct GET: Endpoint { + public typealias Response = AppStoreVersionAppStoreVersionLocalizationsLinkagesResponse + + public var path: String { + "/v1/appStoreVersions/\(id)/relationships/appStoreVersionLocalizations" + } + + /// the id of the requested resource + public var id: String + + public var parameters: Parameters = Parameters() + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + components?.queryItems = [ + URLQueryItem(name: "limit", + value: parameters.limit.map { "\($0)" }) + ].filter { $0.value != nil } + if components?.queryItems?.isEmpty ?? false { + components?.queryItems = nil + } + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "GET" + return urlRequest + } + + /// - Returns: **200**, List of related linkages as `AppStoreVersionAppStoreVersionLocalizationsLinkagesResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(AppStoreVersionAppStoreVersionLocalizationsLinkagesResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +extension V1.AppStoreVersions.ById.Relationships.AppStoreVersionLocalizations.GET { + public struct Parameters: Hashable { + /// maximum resources per page + public var limit: Int? + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppStoreVersions/ById/Relationships/AppStoreVersionPhasedRelease/AppStoreVersionsByIdRelationshipsAppStoreVersionPhasedRelease.GET.7873803.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppStoreVersions/ById/Relationships/AppStoreVersionPhasedRelease/AppStoreVersionsByIdRelationshipsAppStoreVersionPhasedRelease.GET.7873803.generated.swift new file mode 100644 index 00000000..bfc7d8d9 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppStoreVersions/ById/Relationships/AppStoreVersionPhasedRelease/AppStoreVersionsByIdRelationshipsAppStoreVersionPhasedRelease.GET.7873803.generated.swift @@ -0,0 +1,86 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.AppStoreVersions.ById.Relationships.AppStoreVersionPhasedRelease { + public struct GET: Endpoint { + public typealias Response = AppStoreVersionAppStoreVersionPhasedReleaseLinkageResponse + + public var path: String { + "/v1/appStoreVersions/\(id)/relationships/appStoreVersionPhasedRelease" + } + + /// the id of the requested resource + public var id: String + + public var parameters: Parameters = Parameters() + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + components?.queryItems = [ + + ].filter { $0.value != nil } + if components?.queryItems?.isEmpty ?? false { + components?.queryItems = nil + } + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "GET" + return urlRequest + } + + /// - Returns: **200**, Related linkage as `AppStoreVersionAppStoreVersionPhasedReleaseLinkageResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(AppStoreVersionAppStoreVersionPhasedReleaseLinkageResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +extension V1.AppStoreVersions.ById.Relationships.AppStoreVersionPhasedRelease.GET { + public struct Parameters: Hashable { + + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppStoreVersions/ById/Relationships/AppStoreVersionSubmission/AppStoreVersionsByIdRelationshipsAppStoreVersionSubmission.GET.e4c51a4.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppStoreVersions/ById/Relationships/AppStoreVersionSubmission/AppStoreVersionsByIdRelationshipsAppStoreVersionSubmission.GET.e4c51a4.generated.swift new file mode 100644 index 00000000..39cddac0 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppStoreVersions/ById/Relationships/AppStoreVersionSubmission/AppStoreVersionsByIdRelationshipsAppStoreVersionSubmission.GET.e4c51a4.generated.swift @@ -0,0 +1,87 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.AppStoreVersions.ById.Relationships.AppStoreVersionSubmission { + @available(*, deprecated) + public struct GET: Endpoint { + public typealias Response = AppStoreVersionAppStoreVersionSubmissionLinkageResponse + + public var path: String { + "/v1/appStoreVersions/\(id)/relationships/appStoreVersionSubmission" + } + + /// the id of the requested resource + public var id: String + + public var parameters: Parameters = Parameters() + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + components?.queryItems = [ + + ].filter { $0.value != nil } + if components?.queryItems?.isEmpty ?? false { + components?.queryItems = nil + } + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "GET" + return urlRequest + } + + /// - Returns: **200**, Related linkage as `AppStoreVersionAppStoreVersionSubmissionLinkageResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(AppStoreVersionAppStoreVersionSubmissionLinkageResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +extension V1.AppStoreVersions.ById.Relationships.AppStoreVersionSubmission.GET { + public struct Parameters: Hashable { + + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppStoreVersions/ById/Relationships/CustomerReviews/AppStoreVersionsByIdRelationshipsCustomerReviews.GET.6b84b95.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppStoreVersions/ById/Relationships/CustomerReviews/AppStoreVersionsByIdRelationshipsCustomerReviews.GET.6b84b95.generated.swift new file mode 100644 index 00000000..6431ebe0 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppStoreVersions/ById/Relationships/CustomerReviews/AppStoreVersionsByIdRelationshipsCustomerReviews.GET.6b84b95.generated.swift @@ -0,0 +1,88 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.AppStoreVersions.ById.Relationships.CustomerReviews { + public struct GET: Endpoint { + public typealias Response = AppStoreVersionCustomerReviewsLinkagesResponse + + public var path: String { + "/v1/appStoreVersions/\(id)/relationships/customerReviews" + } + + /// the id of the requested resource + public var id: String + + public var parameters: Parameters = Parameters() + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + components?.queryItems = [ + URLQueryItem(name: "limit", + value: parameters.limit.map { "\($0)" }) + ].filter { $0.value != nil } + if components?.queryItems?.isEmpty ?? false { + components?.queryItems = nil + } + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "GET" + return urlRequest + } + + /// - Returns: **200**, List of related linkages as `AppStoreVersionCustomerReviewsLinkagesResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(AppStoreVersionCustomerReviewsLinkagesResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +extension V1.AppStoreVersions.ById.Relationships.CustomerReviews.GET { + public struct Parameters: Hashable { + /// maximum resources per page + public var limit: Int? + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppStoreVersions/ById/Relationships/GameCenterAppVersion/AppStoreVersionsByIdRelationshipsGameCenterAppVersion.GET.de8c5bf.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppStoreVersions/ById/Relationships/GameCenterAppVersion/AppStoreVersionsByIdRelationshipsGameCenterAppVersion.GET.de8c5bf.generated.swift new file mode 100644 index 00000000..87110e7c --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppStoreVersions/ById/Relationships/GameCenterAppVersion/AppStoreVersionsByIdRelationshipsGameCenterAppVersion.GET.de8c5bf.generated.swift @@ -0,0 +1,86 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.AppStoreVersions.ById.Relationships.GameCenterAppVersion { + public struct GET: Endpoint { + public typealias Response = AppStoreVersionGameCenterAppVersionLinkageResponse + + public var path: String { + "/v1/appStoreVersions/\(id)/relationships/gameCenterAppVersion" + } + + /// the id of the requested resource + public var id: String + + public var parameters: Parameters = Parameters() + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + components?.queryItems = [ + + ].filter { $0.value != nil } + if components?.queryItems?.isEmpty ?? false { + components?.queryItems = nil + } + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "GET" + return urlRequest + } + + /// - Returns: **200**, Related linkage as `AppStoreVersionGameCenterAppVersionLinkageResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(AppStoreVersionGameCenterAppVersionLinkageResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +extension V1.AppStoreVersions.ById.Relationships.GameCenterAppVersion.GET { + public struct Parameters: Hashable { + + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppStoreVersions/ById/Relationships/RoutingAppCoverage/AppStoreVersionsByIdRelationshipsRoutingAppCoverage.GET.0784fd6.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppStoreVersions/ById/Relationships/RoutingAppCoverage/AppStoreVersionsByIdRelationshipsRoutingAppCoverage.GET.0784fd6.generated.swift new file mode 100644 index 00000000..75d09441 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppStoreVersions/ById/Relationships/RoutingAppCoverage/AppStoreVersionsByIdRelationshipsRoutingAppCoverage.GET.0784fd6.generated.swift @@ -0,0 +1,86 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.AppStoreVersions.ById.Relationships.RoutingAppCoverage { + public struct GET: Endpoint { + public typealias Response = AppStoreVersionRoutingAppCoverageLinkageResponse + + public var path: String { + "/v1/appStoreVersions/\(id)/relationships/routingAppCoverage" + } + + /// the id of the requested resource + public var id: String + + public var parameters: Parameters = Parameters() + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + components?.queryItems = [ + + ].filter { $0.value != nil } + if components?.queryItems?.isEmpty ?? false { + components?.queryItems = nil + } + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "GET" + return urlRequest + } + + /// - Returns: **200**, Related linkage as `AppStoreVersionRoutingAppCoverageLinkageResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(AppStoreVersionRoutingAppCoverageLinkageResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +extension V1.AppStoreVersions.ById.Relationships.RoutingAppCoverage.GET { + public struct Parameters: Hashable { + + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppStoreVersions/ById/RoutingAppCoverage/AppStoreVersionsByIdRoutingAppCoverage.GET.9100bd7.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppStoreVersions/ById/RoutingAppCoverage/AppStoreVersionsByIdRoutingAppCoverage.GET.9100bd7.generated.swift index c73f66cf..ad4c5935 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppStoreVersions/ById/RoutingAppCoverage/AppStoreVersionsByIdRoutingAppCoverage.GET.9100bd7.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppStoreVersions/ById/RoutingAppCoverage/AppStoreVersionsByIdRoutingAppCoverage.GET.9100bd7.generated.swift @@ -42,8 +42,10 @@ extension V1.AppStoreVersions.ById.RoutingAppCoverage { /// - Returns: **200**, Single RoutingAppCoverage with get as `RoutingAppCoverageWithoutIncludesResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -57,12 +59,18 @@ extension V1.AppStoreVersions.ById.RoutingAppCoverage { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 404: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -82,40 +90,39 @@ extension V1.AppStoreVersions.ById.RoutingAppCoverage.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum RoutingAppCoverages: Hashable, Codable, RawRepresentable { - case appStoreVersion - case assetDeliveryState - case fileName - case fileSize - case sourceFileChecksum - case uploadOperations - case uploaded - case unknown(String) - - public var rawValue: String { - switch self { - case .appStoreVersion: return "appStoreVersion" - case .assetDeliveryState: return "assetDeliveryState" - case .fileName: return "fileName" - case .fileSize: return "fileSize" - case .sourceFileChecksum: return "sourceFileChecksum" - case .uploadOperations: return "uploadOperations" - case .uploaded: return "uploaded" - case .unknown(let rawValue): return rawValue - } + public struct RoutingAppCoverages: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var appStoreVersion: Self { + .init(rawValue: "appStoreVersion") } + public static var assetDeliveryState: Self { + .init(rawValue: "assetDeliveryState") + } + + public static var fileName: Self { + .init(rawValue: "fileName") + } + + public static var fileSize: Self { + .init(rawValue: "fileSize") + } + + public static var sourceFileChecksum: Self { + .init(rawValue: "sourceFileChecksum") + } + + public static var uploadOperations: Self { + .init(rawValue: "uploadOperations") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "appStoreVersion": self = .appStoreVersion - case "assetDeliveryState": self = .assetDeliveryState - case "fileName": self = .fileName - case "fileSize": self = .fileSize - case "sourceFileChecksum": self = .sourceFileChecksum - case "uploadOperations": self = .uploadOperations - case "uploaded": self = .uploaded - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/Apps.GET.d3db1ee.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/Apps.GET.d3db1ee.generated.swift index c0c2fe93..9061ebf3 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/Apps.GET.d3db1ee.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/Apps.GET.d3db1ee.generated.swift @@ -27,8 +27,6 @@ extension V1.Apps { components?.queryItems = [ URLQueryItem(name: "exists[gameCenterEnabledVersions]", value: parameters.exists[.gameCenterEnabledVersions].map { "\($0)" }), - URLQueryItem(name: "fields[appAvailabilities]", - value: parameters.fields[.appAvailabilities]?.map { "\($0)" }.joined(separator: ",")), URLQueryItem(name: "fields[appClips]", value: parameters.fields[.appClips]?.map { "\($0)" }.joined(separator: ",")), URLQueryItem(name: "fields[appCustomProductPages]", @@ -39,14 +37,6 @@ extension V1.Apps { value: parameters.fields[.appEvents]?.map { "\($0)" }.joined(separator: ",")), URLQueryItem(name: "fields[appInfos]", value: parameters.fields[.appInfos]?.map { "\($0)" }.joined(separator: ",")), - URLQueryItem(name: "fields[appPreOrders]", - value: parameters.fields[.appPreOrders]?.map { "\($0)" }.joined(separator: ",")), - URLQueryItem(name: "fields[appPricePoints]", - value: parameters.fields[.appPricePoints]?.map { "\($0)" }.joined(separator: ",")), - URLQueryItem(name: "fields[appPriceSchedules]", - value: parameters.fields[.appPriceSchedules]?.map { "\($0)" }.joined(separator: ",")), - URLQueryItem(name: "fields[appPrices]", - value: parameters.fields[.appPrices]?.map { "\($0)" }.joined(separator: ",")), URLQueryItem(name: "fields[appStoreVersionExperiments]", value: parameters.fields[.appStoreVersionExperiments]?.map { "\($0)" }.joined(separator: ",")), URLQueryItem(name: "fields[appStoreVersions]", @@ -65,8 +55,6 @@ extension V1.Apps { value: parameters.fields[.builds]?.map { "\($0)" }.joined(separator: ",")), URLQueryItem(name: "fields[ciProducts]", value: parameters.fields[.ciProducts]?.map { "\($0)" }.joined(separator: ",")), - URLQueryItem(name: "fields[customerReviews]", - value: parameters.fields[.customerReviews]?.map { "\($0)" }.joined(separator: ",")), URLQueryItem(name: "fields[endUserLicenseAgreements]", value: parameters.fields[.endUserLicenseAgreements]?.map { "\($0)" }.joined(separator: ",")), URLQueryItem(name: "fields[gameCenterDetails]", @@ -75,8 +63,6 @@ extension V1.Apps { value: parameters.fields[.gameCenterEnabledVersions]?.map { "\($0)" }.joined(separator: ",")), URLQueryItem(name: "fields[inAppPurchases]", value: parameters.fields[.inAppPurchases]?.map { "\($0)" }.joined(separator: ",")), - URLQueryItem(name: "fields[perfPowerMetrics]", - value: parameters.fields[.perfPowerMetrics]?.map { "\($0)" }.joined(separator: ",")), URLQueryItem(name: "fields[preReleaseVersions]", value: parameters.fields[.preReleaseVersions]?.map { "\($0)" }.joined(separator: ",")), URLQueryItem(name: "fields[promotedPurchases]", @@ -87,10 +73,10 @@ extension V1.Apps { value: parameters.fields[.subscriptionGracePeriods]?.map { "\($0)" }.joined(separator: ",")), URLQueryItem(name: "fields[subscriptionGroups]", value: parameters.fields[.subscriptionGroups]?.map { "\($0)" }.joined(separator: ",")), - URLQueryItem(name: "fields[territories]", - value: parameters.fields[.territories]?.map { "\($0)" }.joined(separator: ",")), URLQueryItem(name: "filter[appStoreVersions.appStoreState]", value: parameters.filter[.appStoreVersionsAppStoreState]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "filter[appStoreVersions.appVersionState]", + value: parameters.filter[.appStoreVersionsAppVersionState]?.map { "\($0)" }.joined(separator: ",")), URLQueryItem(name: "filter[appStoreVersions.platform]", value: parameters.filter[.appStoreVersionsPlatform]?.map { "\($0)" }.joined(separator: ",")), URLQueryItem(name: "filter[appStoreVersions]", @@ -101,6 +87,10 @@ extension V1.Apps { value: parameters.filter[.id]?.map { "\($0)" }.joined(separator: ",")), URLQueryItem(name: "filter[name]", value: parameters.filter[.name]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "filter[reviewSubmissions.platform]", + value: parameters.filter[.reviewSubmissionsPlatform]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "filter[reviewSubmissions.state]", + value: parameters.filter[.reviewSubmissionsState]?.map { "\($0)" }.joined(separator: ",")), URLQueryItem(name: "filter[sku]", value: parameters.filter[.sku]?.map { "\($0)" }.joined(separator: ",")), URLQueryItem(name: "include", @@ -119,8 +109,6 @@ extension V1.Apps { value: parameters.limit[.appStoreVersionExperimentsV2].map { "\($0)" }), URLQueryItem(name: "limit[appStoreVersions]", value: parameters.limit[.appStoreVersions].map { "\($0)" }), - URLQueryItem(name: "limit[availableTerritories]", - value: parameters.limit[.availableTerritories].map { "\($0)" }), URLQueryItem(name: "limit[betaAppLocalizations]", value: parameters.limit[.betaAppLocalizations].map { "\($0)" }), URLQueryItem(name: "limit[betaGroups]", @@ -135,8 +123,6 @@ extension V1.Apps { value: parameters.limit[.inAppPurchases].map { "\($0)" }), URLQueryItem(name: "limit[preReleaseVersions]", value: parameters.limit[.preReleaseVersions].map { "\($0)" }), - URLQueryItem(name: "limit[prices]", - value: parameters.limit[.prices].map { "\($0)" }), URLQueryItem(name: "limit[promotedPurchases]", value: parameters.limit[.promotedPurchases].map { "\($0)" }), URLQueryItem(name: "limit[reviewSubmissions]", @@ -159,7 +145,9 @@ extension V1.Apps { /// - Returns: **200**, List of Apps as `AppsResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -173,9 +161,15 @@ extension V1.Apps { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -230,1384 +224,1391 @@ extension V1.Apps.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum AppAvailabilities: Hashable, Codable, RawRepresentable { - case app - case availableInNewTerritories - case availableTerritories - case unknown(String) + public struct AppClips: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var app: Self { + .init(rawValue: "app") + } + + public static var appClipAdvancedExperiences: Self { + .init(rawValue: "appClipAdvancedExperiences") + } + + public static var appClipDefaultExperiences: Self { + .init(rawValue: "appClipDefaultExperiences") + } + + public static var bundleId: Self { + .init(rawValue: "bundleId") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct AppCustomProductPages: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var app: Self { + .init(rawValue: "app") + } + + public static var appCustomProductPageVersions: Self { + .init(rawValue: "appCustomProductPageVersions") + } + + public static var name: Self { + .init(rawValue: "name") + } + + public static var url: Self { + .init(rawValue: "url") + } + + public static var visible: Self { + .init(rawValue: "visible") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct AppEncryptionDeclarations: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var app: Self { + .init(rawValue: "app") + } + + public static var appDescription: Self { + .init(rawValue: "appDescription") + } + + public static var appEncryptionDeclarationDocument: Self { + .init(rawValue: "appEncryptionDeclarationDocument") + } + + public static var appEncryptionDeclarationState: Self { + .init(rawValue: "appEncryptionDeclarationState") + } + + public static var availableOnFrenchStore: Self { + .init(rawValue: "availableOnFrenchStore") + } + + public static var builds: Self { + .init(rawValue: "builds") + } + + public static var codeValue: Self { + .init(rawValue: "codeValue") + } + + public static var containsProprietaryCryptography: Self { + .init(rawValue: "containsProprietaryCryptography") + } + + public static var containsThirdPartyCryptography: Self { + .init(rawValue: "containsThirdPartyCryptography") + } + + public static var createdDate: Self { + .init(rawValue: "createdDate") + } + + public static var documentName: Self { + .init(rawValue: "documentName") + } + + public static var documentType: Self { + .init(rawValue: "documentType") + } + + public static var documentUrl: Self { + .init(rawValue: "documentUrl") + } + + public static var exempt: Self { + .init(rawValue: "exempt") + } + + public static var platform: Self { + .init(rawValue: "platform") + } + + public static var uploadedDate: Self { + .init(rawValue: "uploadedDate") + } + + public static var usesEncryption: Self { + .init(rawValue: "usesEncryption") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct AppEvents: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var archivedTerritorySchedules: Self { + .init(rawValue: "archivedTerritorySchedules") + } + + public static var badge: Self { + .init(rawValue: "badge") + } + + public static var deepLink: Self { + .init(rawValue: "deepLink") + } + + public static var eventState: Self { + .init(rawValue: "eventState") + } + + public static var localizations: Self { + .init(rawValue: "localizations") + } + + public static var primaryLocale: Self { + .init(rawValue: "primaryLocale") + } + + public static var priority: Self { + .init(rawValue: "priority") + } + + public static var purchaseRequirement: Self { + .init(rawValue: "purchaseRequirement") + } + + public static var purpose: Self { + .init(rawValue: "purpose") + } + + public static var referenceName: Self { + .init(rawValue: "referenceName") + } + + public static var territorySchedules: Self { + .init(rawValue: "territorySchedules") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct AppInfos: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var ageRatingDeclaration: Self { + .init(rawValue: "ageRatingDeclaration") + } + + public static var app: Self { + .init(rawValue: "app") + } + + public static var appInfoLocalizations: Self { + .init(rawValue: "appInfoLocalizations") + } + + public static var appStoreAgeRating: Self { + .init(rawValue: "appStoreAgeRating") + } + + public static var appStoreState: Self { + .init(rawValue: "appStoreState") + } + + public static var australiaAgeRating: Self { + .init(rawValue: "australiaAgeRating") + } + + public static var brazilAgeRating: Self { + .init(rawValue: "brazilAgeRating") + } + + public static var brazilAgeRatingV2: Self { + .init(rawValue: "brazilAgeRatingV2") + } + + public static var franceAgeRating: Self { + .init(rawValue: "franceAgeRating") + } + + public static var kidsAgeBand: Self { + .init(rawValue: "kidsAgeBand") + } + + public static var koreaAgeRating: Self { + .init(rawValue: "koreaAgeRating") + } + + public static var primaryCategory: Self { + .init(rawValue: "primaryCategory") + } + + public static var primarySubcategoryOne: Self { + .init(rawValue: "primarySubcategoryOne") + } + + public static var primarySubcategoryTwo: Self { + .init(rawValue: "primarySubcategoryTwo") + } + + public static var secondaryCategory: Self { + .init(rawValue: "secondaryCategory") + } + + public static var secondarySubcategoryOne: Self { + .init(rawValue: "secondarySubcategoryOne") + } + + public static var secondarySubcategoryTwo: Self { + .init(rawValue: "secondarySubcategoryTwo") + } + + public static var state: Self { + .init(rawValue: "state") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct AppStoreVersionExperiments: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var app: Self { + .init(rawValue: "app") + } + + public static var appStoreVersionExperimentTreatments: Self { + .init(rawValue: "appStoreVersionExperimentTreatments") + } + + public static var controlVersions: Self { + .init(rawValue: "controlVersions") + } + + public static var endDate: Self { + .init(rawValue: "endDate") + } + + public static var latestControlVersion: Self { + .init(rawValue: "latestControlVersion") + } + + public static var name: Self { + .init(rawValue: "name") + } + + public static var platform: Self { + .init(rawValue: "platform") + } + + public static var reviewRequired: Self { + .init(rawValue: "reviewRequired") + } + + public static var startDate: Self { + .init(rawValue: "startDate") + } + + public static var state: Self { + .init(rawValue: "state") + } + + public static var trafficProportion: Self { + .init(rawValue: "trafficProportion") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct AppStoreVersions: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var ageRatingDeclaration: Self { + .init(rawValue: "ageRatingDeclaration") + } + + public static var alternativeDistributionPackage: Self { + .init(rawValue: "alternativeDistributionPackage") + } + + public static var app: Self { + .init(rawValue: "app") + } + + public static var appClipDefaultExperience: Self { + .init(rawValue: "appClipDefaultExperience") + } + + public static var appStoreReviewDetail: Self { + .init(rawValue: "appStoreReviewDetail") + } + + public static var appStoreState: Self { + .init(rawValue: "appStoreState") + } + + public static var appStoreVersionExperiments: Self { + .init(rawValue: "appStoreVersionExperiments") + } + + public static var appStoreVersionExperimentsV2: Self { + .init(rawValue: "appStoreVersionExperimentsV2") + } + + public static var appStoreVersionLocalizations: Self { + .init(rawValue: "appStoreVersionLocalizations") + } + + public static var appStoreVersionPhasedRelease: Self { + .init(rawValue: "appStoreVersionPhasedRelease") + } + + public static var appStoreVersionSubmission: Self { + .init(rawValue: "appStoreVersionSubmission") + } + + public static var appVersionState: Self { + .init(rawValue: "appVersionState") + } + + public static var build: Self { + .init(rawValue: "build") + } + + public static var copyright: Self { + .init(rawValue: "copyright") + } + + public static var createdDate: Self { + .init(rawValue: "createdDate") + } + + public static var customerReviews: Self { + .init(rawValue: "customerReviews") + } + + public static var downloadable: Self { + .init(rawValue: "downloadable") + } + + public static var earliestReleaseDate: Self { + .init(rawValue: "earliestReleaseDate") + } + + public static var gameCenterAppVersion: Self { + .init(rawValue: "gameCenterAppVersion") + } + + public static var platform: Self { + .init(rawValue: "platform") + } + + public static var releaseType: Self { + .init(rawValue: "releaseType") + } + + public static var reviewType: Self { + .init(rawValue: "reviewType") + } + + public static var routingAppCoverage: Self { + .init(rawValue: "routingAppCoverage") + } + + public static var usesIdfa: Self { + .init(rawValue: "usesIdfa") + } + + public static var versionString: Self { + .init(rawValue: "versionString") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct Apps: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var accessibilityDeclarations: Self { + .init(rawValue: "accessibilityDeclarations") + } + + public static var accessibilityUrl: Self { + .init(rawValue: "accessibilityUrl") + } + + public static var alternativeDistributionKey: Self { + .init(rawValue: "alternativeDistributionKey") + } + + public static var analyticsReportRequests: Self { + .init(rawValue: "analyticsReportRequests") + } + + public static var appAvailabilityV2: Self { + .init(rawValue: "appAvailabilityV2") + } + + public static var appClips: Self { + .init(rawValue: "appClips") + } + + public static var appCustomProductPages: Self { + .init(rawValue: "appCustomProductPages") + } + + public static var appEncryptionDeclarations: Self { + .init(rawValue: "appEncryptionDeclarations") + } + + public static var appEvents: Self { + .init(rawValue: "appEvents") + } + + public static var appInfos: Self { + .init(rawValue: "appInfos") + } + + public static var appPricePoints: Self { + .init(rawValue: "appPricePoints") + } + + public static var appPriceSchedule: Self { + .init(rawValue: "appPriceSchedule") + } + + public static var appStoreVersionExperimentsV2: Self { + .init(rawValue: "appStoreVersionExperimentsV2") + } + + public static var appStoreVersions: Self { + .init(rawValue: "appStoreVersions") + } + + public static var backgroundAssets: Self { + .init(rawValue: "backgroundAssets") + } + + public static var betaAppLocalizations: Self { + .init(rawValue: "betaAppLocalizations") + } + + public static var betaAppReviewDetail: Self { + .init(rawValue: "betaAppReviewDetail") + } + + public static var betaFeedbackCrashSubmissions: Self { + .init(rawValue: "betaFeedbackCrashSubmissions") + } + + public static var betaFeedbackScreenshotSubmissions: Self { + .init(rawValue: "betaFeedbackScreenshotSubmissions") + } + + public static var betaGroups: Self { + .init(rawValue: "betaGroups") + } + + public static var betaLicenseAgreement: Self { + .init(rawValue: "betaLicenseAgreement") + } + + public static var betaTesters: Self { + .init(rawValue: "betaTesters") + } + + public static var builds: Self { + .init(rawValue: "builds") + } + + public static var bundleId: Self { + .init(rawValue: "bundleId") + } + + public static var ciProduct: Self { + .init(rawValue: "ciProduct") + } + + public static var contentRightsDeclaration: Self { + .init(rawValue: "contentRightsDeclaration") + } + + public static var customerReviewSummarizations: Self { + .init(rawValue: "customerReviewSummarizations") + } + + public static var customerReviews: Self { + .init(rawValue: "customerReviews") + } + + public static var endUserLicenseAgreement: Self { + .init(rawValue: "endUserLicenseAgreement") + } + + public static var gameCenterDetail: Self { + .init(rawValue: "gameCenterDetail") + } + + public static var gameCenterEnabledVersions: Self { + .init(rawValue: "gameCenterEnabledVersions") + } + + public static var inAppPurchases: Self { + .init(rawValue: "inAppPurchases") + } + + public static var inAppPurchasesV2: Self { + .init(rawValue: "inAppPurchasesV2") + } + + public static var isOrEverWasMadeForKids: Self { + .init(rawValue: "isOrEverWasMadeForKids") + } + + public static var marketplaceSearchDetail: Self { + .init(rawValue: "marketplaceSearchDetail") + } + + public static var name: Self { + .init(rawValue: "name") + } + + public static var perfPowerMetrics: Self { + .init(rawValue: "perfPowerMetrics") + } + + public static var preReleaseVersions: Self { + .init(rawValue: "preReleaseVersions") + } + + public static var primaryLocale: Self { + .init(rawValue: "primaryLocale") + } + + public static var promotedPurchases: Self { + .init(rawValue: "promotedPurchases") + } + + public static var reviewSubmissions: Self { + .init(rawValue: "reviewSubmissions") + } + + public static var sku: Self { + .init(rawValue: "sku") + } + + public static var streamlinedPurchasingEnabled: Self { + .init(rawValue: "streamlinedPurchasingEnabled") + } + + public static var subscriptionGracePeriod: Self { + .init(rawValue: "subscriptionGracePeriod") + } + + public static var subscriptionGroups: Self { + .init(rawValue: "subscriptionGroups") + } + + public static var subscriptionStatusUrl: Self { + .init(rawValue: "subscriptionStatusUrl") + } + + public static var subscriptionStatusUrlForSandbox: Self { + .init(rawValue: "subscriptionStatusUrlForSandbox") + } + + public static var subscriptionStatusUrlVersion: Self { + .init(rawValue: "subscriptionStatusUrlVersion") + } + + public static var subscriptionStatusUrlVersionForSandbox: Self { + .init(rawValue: "subscriptionStatusUrlVersionForSandbox") + } + + public static var webhooks: Self { + .init(rawValue: "webhooks") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct BetaAppLocalizations: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var app: Self { + .init(rawValue: "app") + } + + public static var description: Self { + .init(rawValue: "description") + } + + public static var feedbackEmail: Self { + .init(rawValue: "feedbackEmail") + } + + public static var locale: Self { + .init(rawValue: "locale") + } + + public static var marketingUrl: Self { + .init(rawValue: "marketingUrl") + } + + public static var privacyPolicyUrl: Self { + .init(rawValue: "privacyPolicyUrl") + } + + public static var tvOsPrivacyPolicy: Self { + .init(rawValue: "tvOsPrivacyPolicy") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct BetaAppReviewDetails: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var app: Self { + .init(rawValue: "app") + } + + public static var contactEmail: Self { + .init(rawValue: "contactEmail") + } + + public static var contactFirstName: Self { + .init(rawValue: "contactFirstName") + } + + public static var contactLastName: Self { + .init(rawValue: "contactLastName") + } + + public static var contactPhone: Self { + .init(rawValue: "contactPhone") + } + + public static var demoAccountName: Self { + .init(rawValue: "demoAccountName") + } + + public static var demoAccountPassword: Self { + .init(rawValue: "demoAccountPassword") + } + + public static var demoAccountRequired: Self { + .init(rawValue: "demoAccountRequired") + } + + public static var notes: Self { + .init(rawValue: "notes") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct BetaGroups: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var app: Self { + .init(rawValue: "app") + } + + public static var betaRecruitmentCriteria: Self { + .init(rawValue: "betaRecruitmentCriteria") + } + + public static var betaRecruitmentCriterionCompatibleBuildCheck: Self { + .init(rawValue: "betaRecruitmentCriterionCompatibleBuildCheck") + } + + public static var betaTesters: Self { + .init(rawValue: "betaTesters") + } + + public static var builds: Self { + .init(rawValue: "builds") + } + + public static var createdDate: Self { + .init(rawValue: "createdDate") + } + + public static var feedbackEnabled: Self { + .init(rawValue: "feedbackEnabled") + } + + public static var hasAccessToAllBuilds: Self { + .init(rawValue: "hasAccessToAllBuilds") + } + + public static var iosBuildsAvailableForAppleSiliconMac: Self { + .init(rawValue: "iosBuildsAvailableForAppleSiliconMac") + } + + public static var iosBuildsAvailableForAppleVision: Self { + .init(rawValue: "iosBuildsAvailableForAppleVision") + } + + public static var isInternalGroup: Self { + .init(rawValue: "isInternalGroup") + } + + public static var name: Self { + .init(rawValue: "name") + } + + public static var publicLink: Self { + .init(rawValue: "publicLink") + } + + public static var publicLinkEnabled: Self { + .init(rawValue: "publicLinkEnabled") + } + + public static var publicLinkId: Self { + .init(rawValue: "publicLinkId") + } + + public static var publicLinkLimit: Self { + .init(rawValue: "publicLinkLimit") + } + + public static var publicLinkLimitEnabled: Self { + .init(rawValue: "publicLinkLimitEnabled") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct BetaLicenseAgreements: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var agreementText: Self { + .init(rawValue: "agreementText") + } + + public static var app: Self { + .init(rawValue: "app") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct Builds: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var app: Self { + .init(rawValue: "app") + } + + public static var appEncryptionDeclaration: Self { + .init(rawValue: "appEncryptionDeclaration") + } + + public static var appStoreVersion: Self { + .init(rawValue: "appStoreVersion") + } + + public static var betaAppReviewSubmission: Self { + .init(rawValue: "betaAppReviewSubmission") + } + + public static var betaBuildLocalizations: Self { + .init(rawValue: "betaBuildLocalizations") + } + + public static var betaGroups: Self { + .init(rawValue: "betaGroups") + } + + public static var buildAudienceType: Self { + .init(rawValue: "buildAudienceType") + } + + public static var buildBetaDetail: Self { + .init(rawValue: "buildBetaDetail") + } + + public static var buildBundles: Self { + .init(rawValue: "buildBundles") + } + + public static var computedMinMacOsVersion: Self { + .init(rawValue: "computedMinMacOsVersion") + } + + public static var computedMinVisionOsVersion: Self { + .init(rawValue: "computedMinVisionOsVersion") + } + + public static var diagnosticSignatures: Self { + .init(rawValue: "diagnosticSignatures") + } + + public static var expirationDate: Self { + .init(rawValue: "expirationDate") + } + + public static var expired: Self { + .init(rawValue: "expired") + } + + public static var iconAssetToken: Self { + .init(rawValue: "iconAssetToken") + } + + public static var icons: Self { + .init(rawValue: "icons") + } + + public static var individualTesters: Self { + .init(rawValue: "individualTesters") + } + + public static var lsMinimumSystemVersion: Self { + .init(rawValue: "lsMinimumSystemVersion") + } + + public static var minOsVersion: Self { + .init(rawValue: "minOsVersion") + } + + public static var perfPowerMetrics: Self { + .init(rawValue: "perfPowerMetrics") + } + + public static var preReleaseVersion: Self { + .init(rawValue: "preReleaseVersion") + } + + public static var processingState: Self { + .init(rawValue: "processingState") + } + + public static var uploadedDate: Self { + .init(rawValue: "uploadedDate") + } + + public static var usesNonExemptEncryption: Self { + .init(rawValue: "usesNonExemptEncryption") + } + + public static var version: Self { + .init(rawValue: "version") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct CiProducts: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var additionalRepositories: Self { + .init(rawValue: "additionalRepositories") + } + + public static var app: Self { + .init(rawValue: "app") + } + + public static var buildRuns: Self { + .init(rawValue: "buildRuns") + } + + public static var bundleId: Self { + .init(rawValue: "bundleId") + } + + public static var createdDate: Self { + .init(rawValue: "createdDate") + } + + public static var name: Self { + .init(rawValue: "name") + } + + public static var primaryRepositories: Self { + .init(rawValue: "primaryRepositories") + } + + public static var productType: Self { + .init(rawValue: "productType") + } + + public static var workflows: Self { + .init(rawValue: "workflows") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct EndUserLicenseAgreements: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var agreementText: Self { + .init(rawValue: "agreementText") + } + + public static var app: Self { + .init(rawValue: "app") + } + + public static var territories: Self { + .init(rawValue: "territories") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct GameCenterDetails: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var achievementReleases: Self { + .init(rawValue: "achievementReleases") + } + + public static var activityReleases: Self { + .init(rawValue: "activityReleases") + } + + public static var app: Self { + .init(rawValue: "app") + } + + public static var arcadeEnabled: Self { + .init(rawValue: "arcadeEnabled") + } + + public static var challengeEnabled: Self { + .init(rawValue: "challengeEnabled") + } + + public static var challengeReleases: Self { + .init(rawValue: "challengeReleases") + } + + public static var challengesMinimumPlatformVersions: Self { + .init(rawValue: "challengesMinimumPlatformVersions") + } + + public static var defaultGroupLeaderboard: Self { + .init(rawValue: "defaultGroupLeaderboard") + } + + public static var defaultLeaderboard: Self { + .init(rawValue: "defaultLeaderboard") + } + + public static var gameCenterAchievements: Self { + .init(rawValue: "gameCenterAchievements") + } + + public static var gameCenterActivities: Self { + .init(rawValue: "gameCenterActivities") + } + + public static var gameCenterAppVersions: Self { + .init(rawValue: "gameCenterAppVersions") + } + + public static var gameCenterChallenges: Self { + .init(rawValue: "gameCenterChallenges") + } + + public static var gameCenterGroup: Self { + .init(rawValue: "gameCenterGroup") + } + + public static var gameCenterLeaderboardSets: Self { + .init(rawValue: "gameCenterLeaderboardSets") + } + + public static var gameCenterLeaderboards: Self { + .init(rawValue: "gameCenterLeaderboards") + } + + public static var leaderboardReleases: Self { + .init(rawValue: "leaderboardReleases") + } + + public static var leaderboardSetReleases: Self { + .init(rawValue: "leaderboardSetReleases") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct GameCenterEnabledVersions: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var app: Self { + .init(rawValue: "app") + } + + public static var compatibleVersions: Self { + .init(rawValue: "compatibleVersions") + } + + public static var iconAsset: Self { + .init(rawValue: "iconAsset") + } + + public static var platform: Self { + .init(rawValue: "platform") + } + + public static var versionString: Self { + .init(rawValue: "versionString") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct InAppPurchases: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var appStoreReviewScreenshot: Self { + .init(rawValue: "appStoreReviewScreenshot") + } + + public static var apps: Self { + .init(rawValue: "apps") + } + + public static var content: Self { + .init(rawValue: "content") + } + + public static var contentHosting: Self { + .init(rawValue: "contentHosting") + } + + public static var familySharable: Self { + .init(rawValue: "familySharable") + } + + public static var iapPriceSchedule: Self { + .init(rawValue: "iapPriceSchedule") + } + + public static var images: Self { + .init(rawValue: "images") + } + + public static var inAppPurchaseAvailability: Self { + .init(rawValue: "inAppPurchaseAvailability") + } + + public static var inAppPurchaseLocalizations: Self { + .init(rawValue: "inAppPurchaseLocalizations") + } + + public static var inAppPurchaseType: Self { + .init(rawValue: "inAppPurchaseType") + } + + public static var name: Self { + .init(rawValue: "name") + } + + public static var pricePoints: Self { + .init(rawValue: "pricePoints") + } + + public static var productId: Self { + .init(rawValue: "productId") + } - public var rawValue: String { - switch self { - case .app: return "app" - case .availableInNewTerritories: return "availableInNewTerritories" - case .availableTerritories: return "availableTerritories" - case .unknown(let rawValue): return rawValue - } + public static var promotedPurchase: Self { + .init(rawValue: "promotedPurchase") } - public init(rawValue: String) { - switch rawValue { - case "app": self = .app - case "availableInNewTerritories": self = .availableInNewTerritories - case "availableTerritories": self = .availableTerritories - default: self = .unknown(rawValue) - } + public static var referenceName: Self { + .init(rawValue: "referenceName") } - } - public enum AppClips: Hashable, Codable, RawRepresentable { - case app - case appClipAdvancedExperiences - case appClipDefaultExperiences - case bundleId - case unknown(String) + public static var reviewNote: Self { + .init(rawValue: "reviewNote") + } - public var rawValue: String { - switch self { - case .app: return "app" - case .appClipAdvancedExperiences: return "appClipAdvancedExperiences" - case .appClipDefaultExperiences: return "appClipDefaultExperiences" - case .bundleId: return "bundleId" - case .unknown(let rawValue): return rawValue - } + public static var state: Self { + .init(rawValue: "state") } - public init(rawValue: String) { - switch rawValue { - case "app": self = .app - case "appClipAdvancedExperiences": self = .appClipAdvancedExperiences - case "appClipDefaultExperiences": self = .appClipDefaultExperiences - case "bundleId": self = .bundleId - default: self = .unknown(rawValue) - } - } - } - - public enum AppCustomProductPages: Hashable, Codable, RawRepresentable { - case app - case appCustomProductPageVersions - case appStoreVersionTemplate - case customProductPageTemplate - case name - case url - case visible - case unknown(String) - - public var rawValue: String { - switch self { - case .app: return "app" - case .appCustomProductPageVersions: return "appCustomProductPageVersions" - case .appStoreVersionTemplate: return "appStoreVersionTemplate" - case .customProductPageTemplate: return "customProductPageTemplate" - case .name: return "name" - case .url: return "url" - case .visible: return "visible" - case .unknown(let rawValue): return rawValue - } + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "app": self = .app - case "appCustomProductPageVersions": self = .appCustomProductPageVersions - case "appStoreVersionTemplate": self = .appStoreVersionTemplate - case "customProductPageTemplate": self = .customProductPageTemplate - case "name": self = .name - case "url": self = .url - case "visible": self = .visible - default: self = .unknown(rawValue) - } - } - } - - public enum AppEncryptionDeclarations: Hashable, Codable, RawRepresentable { - case app - case appDescription - case appEncryptionDeclarationDocument - case appEncryptionDeclarationState - case availableOnFrenchStore - case builds - case codeValue - case containsProprietaryCryptography - case containsThirdPartyCryptography - case createdDate - case documentName - case documentType - case documentUrl - case exempt - case platform - case uploadedDate - case usesEncryption - case unknown(String) - - public var rawValue: String { - switch self { - case .app: return "app" - case .appDescription: return "appDescription" - case .appEncryptionDeclarationDocument: return "appEncryptionDeclarationDocument" - case .appEncryptionDeclarationState: return "appEncryptionDeclarationState" - case .availableOnFrenchStore: return "availableOnFrenchStore" - case .builds: return "builds" - case .codeValue: return "codeValue" - case .containsProprietaryCryptography: return "containsProprietaryCryptography" - case .containsThirdPartyCryptography: return "containsThirdPartyCryptography" - case .createdDate: return "createdDate" - case .documentName: return "documentName" - case .documentType: return "documentType" - case .documentUrl: return "documentUrl" - case .exempt: return "exempt" - case .platform: return "platform" - case .uploadedDate: return "uploadedDate" - case .usesEncryption: return "usesEncryption" - case .unknown(let rawValue): return rawValue - } + self.rawValue = rawValue } + } - public init(rawValue: String) { - switch rawValue { - case "app": self = .app - case "appDescription": self = .appDescription - case "appEncryptionDeclarationDocument": self = .appEncryptionDeclarationDocument - case "appEncryptionDeclarationState": self = .appEncryptionDeclarationState - case "availableOnFrenchStore": self = .availableOnFrenchStore - case "builds": self = .builds - case "codeValue": self = .codeValue - case "containsProprietaryCryptography": self = .containsProprietaryCryptography - case "containsThirdPartyCryptography": self = .containsThirdPartyCryptography - case "createdDate": self = .createdDate - case "documentName": self = .documentName - case "documentType": self = .documentType - case "documentUrl": self = .documentUrl - case "exempt": self = .exempt - case "platform": self = .platform - case "uploadedDate": self = .uploadedDate - case "usesEncryption": self = .usesEncryption - default: self = .unknown(rawValue) - } - } - } - - public enum AppEvents: Hashable, Codable, RawRepresentable { - case app - case archivedTerritorySchedules - case badge - case deepLink - case eventState - case localizations - case primaryLocale - case priority - case purchaseRequirement - case purpose - case referenceName - case territorySchedules - case unknown(String) - - public var rawValue: String { - switch self { - case .app: return "app" - case .archivedTerritorySchedules: return "archivedTerritorySchedules" - case .badge: return "badge" - case .deepLink: return "deepLink" - case .eventState: return "eventState" - case .localizations: return "localizations" - case .primaryLocale: return "primaryLocale" - case .priority: return "priority" - case .purchaseRequirement: return "purchaseRequirement" - case .purpose: return "purpose" - case .referenceName: return "referenceName" - case .territorySchedules: return "territorySchedules" - case .unknown(let rawValue): return rawValue - } + public struct PreReleaseVersions: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var app: Self { + .init(rawValue: "app") } - public init(rawValue: String) { - switch rawValue { - case "app": self = .app - case "archivedTerritorySchedules": self = .archivedTerritorySchedules - case "badge": self = .badge - case "deepLink": self = .deepLink - case "eventState": self = .eventState - case "localizations": self = .localizations - case "primaryLocale": self = .primaryLocale - case "priority": self = .priority - case "purchaseRequirement": self = .purchaseRequirement - case "purpose": self = .purpose - case "referenceName": self = .referenceName - case "territorySchedules": self = .territorySchedules - default: self = .unknown(rawValue) - } - } - } - - public enum AppInfos: Hashable, Codable, RawRepresentable { - case ageRatingDeclaration - case app - case appInfoLocalizations - case appStoreAgeRating - case appStoreState - case brazilAgeRating - case brazilAgeRatingV2 - case kidsAgeBand - case primaryCategory - case primarySubcategoryOne - case primarySubcategoryTwo - case secondaryCategory - case secondarySubcategoryOne - case secondarySubcategoryTwo - case unknown(String) - - public var rawValue: String { - switch self { - case .ageRatingDeclaration: return "ageRatingDeclaration" - case .app: return "app" - case .appInfoLocalizations: return "appInfoLocalizations" - case .appStoreAgeRating: return "appStoreAgeRating" - case .appStoreState: return "appStoreState" - case .brazilAgeRating: return "brazilAgeRating" - case .brazilAgeRatingV2: return "brazilAgeRatingV2" - case .kidsAgeBand: return "kidsAgeBand" - case .primaryCategory: return "primaryCategory" - case .primarySubcategoryOne: return "primarySubcategoryOne" - case .primarySubcategoryTwo: return "primarySubcategoryTwo" - case .secondaryCategory: return "secondaryCategory" - case .secondarySubcategoryOne: return "secondarySubcategoryOne" - case .secondarySubcategoryTwo: return "secondarySubcategoryTwo" - case .unknown(let rawValue): return rawValue - } + public static var builds: Self { + .init(rawValue: "builds") } - public init(rawValue: String) { - switch rawValue { - case "ageRatingDeclaration": self = .ageRatingDeclaration - case "app": self = .app - case "appInfoLocalizations": self = .appInfoLocalizations - case "appStoreAgeRating": self = .appStoreAgeRating - case "appStoreState": self = .appStoreState - case "brazilAgeRating": self = .brazilAgeRating - case "brazilAgeRatingV2": self = .brazilAgeRatingV2 - case "kidsAgeBand": self = .kidsAgeBand - case "primaryCategory": self = .primaryCategory - case "primarySubcategoryOne": self = .primarySubcategoryOne - case "primarySubcategoryTwo": self = .primarySubcategoryTwo - case "secondaryCategory": self = .secondaryCategory - case "secondarySubcategoryOne": self = .secondarySubcategoryOne - case "secondarySubcategoryTwo": self = .secondarySubcategoryTwo - default: self = .unknown(rawValue) - } - } - } - - public enum AppPreOrders: Hashable, Codable, RawRepresentable { - case app - case appReleaseDate - case preOrderAvailableDate - case unknown(String) - - public var rawValue: String { - switch self { - case .app: return "app" - case .appReleaseDate: return "appReleaseDate" - case .preOrderAvailableDate: return "preOrderAvailableDate" - case .unknown(let rawValue): return rawValue - } + public static var platform: Self { + .init(rawValue: "platform") } - public init(rawValue: String) { - switch rawValue { - case "app": self = .app - case "appReleaseDate": self = .appReleaseDate - case "preOrderAvailableDate": self = .preOrderAvailableDate - default: self = .unknown(rawValue) - } - } - } - - public enum AppPricePoints: Hashable, Codable, RawRepresentable { - case app - case customerPrice - case equalizations - case priceTier - case proceeds - case territory - case unknown(String) - - public var rawValue: String { - switch self { - case .app: return "app" - case .customerPrice: return "customerPrice" - case .equalizations: return "equalizations" - case .priceTier: return "priceTier" - case .proceeds: return "proceeds" - case .territory: return "territory" - case .unknown(let rawValue): return rawValue - } + public static var version: Self { + .init(rawValue: "version") } - public init(rawValue: String) { - switch rawValue { - case "app": self = .app - case "customerPrice": self = .customerPrice - case "equalizations": self = .equalizations - case "priceTier": self = .priceTier - case "proceeds": self = .proceeds - case "territory": self = .territory - default: self = .unknown(rawValue) - } - } - } - - public enum AppPriceSchedules: Hashable, Codable, RawRepresentable { - case app - case automaticPrices - case baseTerritory - case manualPrices - case unknown(String) - - public var rawValue: String { - switch self { - case .app: return "app" - case .automaticPrices: return "automaticPrices" - case .baseTerritory: return "baseTerritory" - case .manualPrices: return "manualPrices" - case .unknown(let rawValue): return rawValue - } + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "app": self = .app - case "automaticPrices": self = .automaticPrices - case "baseTerritory": self = .baseTerritory - case "manualPrices": self = .manualPrices - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum AppPrices: Hashable, Codable, RawRepresentable { - case app - case priceTier - case unknown(String) - - public var rawValue: String { - switch self { - case .app: return "app" - case .priceTier: return "priceTier" - case .unknown(let rawValue): return rawValue - } + public struct PromotedPurchases: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var enabled: Self { + .init(rawValue: "enabled") } - public init(rawValue: String) { - switch rawValue { - case "app": self = .app - case "priceTier": self = .priceTier - default: self = .unknown(rawValue) - } - } - } - - public enum AppStoreVersionExperiments: Hashable, Codable, RawRepresentable { - case app - case appStoreVersionExperimentTreatments - case controlVersions - case endDate - case latestControlVersion - case name - case platform - case reviewRequired - case startDate - case started - case state - case trafficProportion - case unknown(String) - - public var rawValue: String { - switch self { - case .app: return "app" - case .appStoreVersionExperimentTreatments: return "appStoreVersionExperimentTreatments" - case .controlVersions: return "controlVersions" - case .endDate: return "endDate" - case .latestControlVersion: return "latestControlVersion" - case .name: return "name" - case .platform: return "platform" - case .reviewRequired: return "reviewRequired" - case .startDate: return "startDate" - case .started: return "started" - case .state: return "state" - case .trafficProportion: return "trafficProportion" - case .unknown(let rawValue): return rawValue - } + public static var inAppPurchaseV2: Self { + .init(rawValue: "inAppPurchaseV2") } - public init(rawValue: String) { - switch rawValue { - case "app": self = .app - case "appStoreVersionExperimentTreatments": self = .appStoreVersionExperimentTreatments - case "controlVersions": self = .controlVersions - case "endDate": self = .endDate - case "latestControlVersion": self = .latestControlVersion - case "name": self = .name - case "platform": self = .platform - case "reviewRequired": self = .reviewRequired - case "startDate": self = .startDate - case "started": self = .started - case "state": self = .state - case "trafficProportion": self = .trafficProportion - default: self = .unknown(rawValue) - } - } - } - - public enum AppStoreVersions: Hashable, Codable, RawRepresentable { - case ageRatingDeclaration - case app - case appClipDefaultExperience - case appStoreReviewDetail - case appStoreState - case appStoreVersionExperiments - case appStoreVersionExperimentsV2 - case appStoreVersionLocalizations - case appStoreVersionPhasedRelease - case appStoreVersionSubmission - case build - case copyright - case createdDate - case customerReviews - case downloadable - case earliestReleaseDate - case platform - case releaseType - case routingAppCoverage - case versionString - case unknown(String) - - public var rawValue: String { - switch self { - case .ageRatingDeclaration: return "ageRatingDeclaration" - case .app: return "app" - case .appClipDefaultExperience: return "appClipDefaultExperience" - case .appStoreReviewDetail: return "appStoreReviewDetail" - case .appStoreState: return "appStoreState" - case .appStoreVersionExperiments: return "appStoreVersionExperiments" - case .appStoreVersionExperimentsV2: return "appStoreVersionExperimentsV2" - case .appStoreVersionLocalizations: return "appStoreVersionLocalizations" - case .appStoreVersionPhasedRelease: return "appStoreVersionPhasedRelease" - case .appStoreVersionSubmission: return "appStoreVersionSubmission" - case .build: return "build" - case .copyright: return "copyright" - case .createdDate: return "createdDate" - case .customerReviews: return "customerReviews" - case .downloadable: return "downloadable" - case .earliestReleaseDate: return "earliestReleaseDate" - case .platform: return "platform" - case .releaseType: return "releaseType" - case .routingAppCoverage: return "routingAppCoverage" - case .versionString: return "versionString" - case .unknown(let rawValue): return rawValue - } + public static var state: Self { + .init(rawValue: "state") } - public init(rawValue: String) { - switch rawValue { - case "ageRatingDeclaration": self = .ageRatingDeclaration - case "app": self = .app - case "appClipDefaultExperience": self = .appClipDefaultExperience - case "appStoreReviewDetail": self = .appStoreReviewDetail - case "appStoreState": self = .appStoreState - case "appStoreVersionExperiments": self = .appStoreVersionExperiments - case "appStoreVersionExperimentsV2": self = .appStoreVersionExperimentsV2 - case "appStoreVersionLocalizations": self = .appStoreVersionLocalizations - case "appStoreVersionPhasedRelease": self = .appStoreVersionPhasedRelease - case "appStoreVersionSubmission": self = .appStoreVersionSubmission - case "build": self = .build - case "copyright": self = .copyright - case "createdDate": self = .createdDate - case "customerReviews": self = .customerReviews - case "downloadable": self = .downloadable - case "earliestReleaseDate": self = .earliestReleaseDate - case "platform": self = .platform - case "releaseType": self = .releaseType - case "routingAppCoverage": self = .routingAppCoverage - case "versionString": self = .versionString - default: self = .unknown(rawValue) - } - } - } - - public enum Apps: Hashable, Codable, RawRepresentable { - case appAvailability - case appClips - case appCustomProductPages - case appEncryptionDeclarations - case appEvents - case appInfos - case appPricePoints - case appPriceSchedule - case appStoreVersionExperimentsV2 - case appStoreVersions - case availableInNewTerritories - case availableTerritories - case betaAppLocalizations - case betaAppReviewDetail - case betaGroups - case betaLicenseAgreement - case betaTesters - case builds - case bundleId - case ciProduct - case contentRightsDeclaration - case customerReviews - case endUserLicenseAgreement - case gameCenterDetail - case gameCenterEnabledVersions - case inAppPurchases - case inAppPurchasesV2 - case isOrEverWasMadeForKids - case name - case perfPowerMetrics - case preOrder - case preReleaseVersions - case pricePoints - case prices - case primaryLocale - case promotedPurchases - case reviewSubmissions - case sku - case subscriptionGracePeriod - case subscriptionGroups - case subscriptionStatusUrl - case subscriptionStatusUrlForSandbox - case subscriptionStatusUrlVersion - case subscriptionStatusUrlVersionForSandbox - case unknown(String) - - public var rawValue: String { - switch self { - case .appAvailability: return "appAvailability" - case .appClips: return "appClips" - case .appCustomProductPages: return "appCustomProductPages" - case .appEncryptionDeclarations: return "appEncryptionDeclarations" - case .appEvents: return "appEvents" - case .appInfos: return "appInfos" - case .appPricePoints: return "appPricePoints" - case .appPriceSchedule: return "appPriceSchedule" - case .appStoreVersionExperimentsV2: return "appStoreVersionExperimentsV2" - case .appStoreVersions: return "appStoreVersions" - case .availableInNewTerritories: return "availableInNewTerritories" - case .availableTerritories: return "availableTerritories" - case .betaAppLocalizations: return "betaAppLocalizations" - case .betaAppReviewDetail: return "betaAppReviewDetail" - case .betaGroups: return "betaGroups" - case .betaLicenseAgreement: return "betaLicenseAgreement" - case .betaTesters: return "betaTesters" - case .builds: return "builds" - case .bundleId: return "bundleId" - case .ciProduct: return "ciProduct" - case .contentRightsDeclaration: return "contentRightsDeclaration" - case .customerReviews: return "customerReviews" - case .endUserLicenseAgreement: return "endUserLicenseAgreement" - case .gameCenterDetail: return "gameCenterDetail" - case .gameCenterEnabledVersions: return "gameCenterEnabledVersions" - case .inAppPurchases: return "inAppPurchases" - case .inAppPurchasesV2: return "inAppPurchasesV2" - case .isOrEverWasMadeForKids: return "isOrEverWasMadeForKids" - case .name: return "name" - case .perfPowerMetrics: return "perfPowerMetrics" - case .preOrder: return "preOrder" - case .preReleaseVersions: return "preReleaseVersions" - case .pricePoints: return "pricePoints" - case .prices: return "prices" - case .primaryLocale: return "primaryLocale" - case .promotedPurchases: return "promotedPurchases" - case .reviewSubmissions: return "reviewSubmissions" - case .sku: return "sku" - case .subscriptionGracePeriod: return "subscriptionGracePeriod" - case .subscriptionGroups: return "subscriptionGroups" - case .subscriptionStatusUrl: return "subscriptionStatusUrl" - case .subscriptionStatusUrlForSandbox: return "subscriptionStatusUrlForSandbox" - case .subscriptionStatusUrlVersion: return "subscriptionStatusUrlVersion" - case .subscriptionStatusUrlVersionForSandbox: return "subscriptionStatusUrlVersionForSandbox" - case .unknown(let rawValue): return rawValue - } + public static var subscription: Self { + .init(rawValue: "subscription") } - public init(rawValue: String) { - switch rawValue { - case "appAvailability": self = .appAvailability - case "appClips": self = .appClips - case "appCustomProductPages": self = .appCustomProductPages - case "appEncryptionDeclarations": self = .appEncryptionDeclarations - case "appEvents": self = .appEvents - case "appInfos": self = .appInfos - case "appPricePoints": self = .appPricePoints - case "appPriceSchedule": self = .appPriceSchedule - case "appStoreVersionExperimentsV2": self = .appStoreVersionExperimentsV2 - case "appStoreVersions": self = .appStoreVersions - case "availableInNewTerritories": self = .availableInNewTerritories - case "availableTerritories": self = .availableTerritories - case "betaAppLocalizations": self = .betaAppLocalizations - case "betaAppReviewDetail": self = .betaAppReviewDetail - case "betaGroups": self = .betaGroups - case "betaLicenseAgreement": self = .betaLicenseAgreement - case "betaTesters": self = .betaTesters - case "builds": self = .builds - case "bundleId": self = .bundleId - case "ciProduct": self = .ciProduct - case "contentRightsDeclaration": self = .contentRightsDeclaration - case "customerReviews": self = .customerReviews - case "endUserLicenseAgreement": self = .endUserLicenseAgreement - case "gameCenterDetail": self = .gameCenterDetail - case "gameCenterEnabledVersions": self = .gameCenterEnabledVersions - case "inAppPurchases": self = .inAppPurchases - case "inAppPurchasesV2": self = .inAppPurchasesV2 - case "isOrEverWasMadeForKids": self = .isOrEverWasMadeForKids - case "name": self = .name - case "perfPowerMetrics": self = .perfPowerMetrics - case "preOrder": self = .preOrder - case "preReleaseVersions": self = .preReleaseVersions - case "pricePoints": self = .pricePoints - case "prices": self = .prices - case "primaryLocale": self = .primaryLocale - case "promotedPurchases": self = .promotedPurchases - case "reviewSubmissions": self = .reviewSubmissions - case "sku": self = .sku - case "subscriptionGracePeriod": self = .subscriptionGracePeriod - case "subscriptionGroups": self = .subscriptionGroups - case "subscriptionStatusUrl": self = .subscriptionStatusUrl - case "subscriptionStatusUrlForSandbox": self = .subscriptionStatusUrlForSandbox - case "subscriptionStatusUrlVersion": self = .subscriptionStatusUrlVersion - case "subscriptionStatusUrlVersionForSandbox": self = .subscriptionStatusUrlVersionForSandbox - default: self = .unknown(rawValue) - } - } - } - - public enum BetaAppLocalizations: Hashable, Codable, RawRepresentable { - case app - case description - case feedbackEmail - case locale - case marketingUrl - case privacyPolicyUrl - case tvOsPrivacyPolicy - case unknown(String) - - public var rawValue: String { - switch self { - case .app: return "app" - case .description: return "description" - case .feedbackEmail: return "feedbackEmail" - case .locale: return "locale" - case .marketingUrl: return "marketingUrl" - case .privacyPolicyUrl: return "privacyPolicyUrl" - case .tvOsPrivacyPolicy: return "tvOsPrivacyPolicy" - case .unknown(let rawValue): return rawValue - } + public static var visibleForAllUsers: Self { + .init(rawValue: "visibleForAllUsers") } - public init(rawValue: String) { - switch rawValue { - case "app": self = .app - case "description": self = .description - case "feedbackEmail": self = .feedbackEmail - case "locale": self = .locale - case "marketingUrl": self = .marketingUrl - case "privacyPolicyUrl": self = .privacyPolicyUrl - case "tvOsPrivacyPolicy": self = .tvOsPrivacyPolicy - default: self = .unknown(rawValue) - } - } - } - - public enum BetaAppReviewDetails: Hashable, Codable, RawRepresentable { - case app - case contactEmail - case contactFirstName - case contactLastName - case contactPhone - case demoAccountName - case demoAccountPassword - case demoAccountRequired - case notes - case unknown(String) - - public var rawValue: String { - switch self { - case .app: return "app" - case .contactEmail: return "contactEmail" - case .contactFirstName: return "contactFirstName" - case .contactLastName: return "contactLastName" - case .contactPhone: return "contactPhone" - case .demoAccountName: return "demoAccountName" - case .demoAccountPassword: return "demoAccountPassword" - case .demoAccountRequired: return "demoAccountRequired" - case .notes: return "notes" - case .unknown(let rawValue): return rawValue - } + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "app": self = .app - case "contactEmail": self = .contactEmail - case "contactFirstName": self = .contactFirstName - case "contactLastName": self = .contactLastName - case "contactPhone": self = .contactPhone - case "demoAccountName": self = .demoAccountName - case "demoAccountPassword": self = .demoAccountPassword - case "demoAccountRequired": self = .demoAccountRequired - case "notes": self = .notes - default: self = .unknown(rawValue) - } - } - } - - public enum BetaGroups: Hashable, Codable, RawRepresentable { - case app - case betaTesters - case builds - case createdDate - case feedbackEnabled - case hasAccessToAllBuilds - case iosBuildsAvailableForAppleSiliconMac - case isInternalGroup - case name - case publicLink - case publicLinkEnabled - case publicLinkId - case publicLinkLimit - case publicLinkLimitEnabled - case unknown(String) - - public var rawValue: String { - switch self { - case .app: return "app" - case .betaTesters: return "betaTesters" - case .builds: return "builds" - case .createdDate: return "createdDate" - case .feedbackEnabled: return "feedbackEnabled" - case .hasAccessToAllBuilds: return "hasAccessToAllBuilds" - case .iosBuildsAvailableForAppleSiliconMac: return "iosBuildsAvailableForAppleSiliconMac" - case .isInternalGroup: return "isInternalGroup" - case .name: return "name" - case .publicLink: return "publicLink" - case .publicLinkEnabled: return "publicLinkEnabled" - case .publicLinkId: return "publicLinkId" - case .publicLinkLimit: return "publicLinkLimit" - case .publicLinkLimitEnabled: return "publicLinkLimitEnabled" - case .unknown(let rawValue): return rawValue - } + self.rawValue = rawValue } + } - public init(rawValue: String) { - switch rawValue { - case "app": self = .app - case "betaTesters": self = .betaTesters - case "builds": self = .builds - case "createdDate": self = .createdDate - case "feedbackEnabled": self = .feedbackEnabled - case "hasAccessToAllBuilds": self = .hasAccessToAllBuilds - case "iosBuildsAvailableForAppleSiliconMac": self = .iosBuildsAvailableForAppleSiliconMac - case "isInternalGroup": self = .isInternalGroup - case "name": self = .name - case "publicLink": self = .publicLink - case "publicLinkEnabled": self = .publicLinkEnabled - case "publicLinkId": self = .publicLinkId - case "publicLinkLimit": self = .publicLinkLimit - case "publicLinkLimitEnabled": self = .publicLinkLimitEnabled - default: self = .unknown(rawValue) - } - } - } - - public enum BetaLicenseAgreements: Hashable, Codable, RawRepresentable { - case agreementText - case app - case unknown(String) - - public var rawValue: String { - switch self { - case .agreementText: return "agreementText" - case .app: return "app" - case .unknown(let rawValue): return rawValue - } + public struct ReviewSubmissions: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var app: Self { + .init(rawValue: "app") } - public init(rawValue: String) { - switch rawValue { - case "agreementText": self = .agreementText - case "app": self = .app - default: self = .unknown(rawValue) - } - } - } - - public enum Builds: Hashable, Codable, RawRepresentable { - case app - case appEncryptionDeclaration - case appStoreVersion - case betaAppReviewSubmission - case betaBuildLocalizations - case betaGroups - case buildAudienceType - case buildBetaDetail - case buildBundles - case computedMinMacOsVersion - case diagnosticSignatures - case expirationDate - case expired - case iconAssetToken - case icons - case individualTesters - case lsMinimumSystemVersion - case minOsVersion - case perfPowerMetrics - case preReleaseVersion - case processingState - case uploadedDate - case usesNonExemptEncryption - case version - case unknown(String) - - public var rawValue: String { - switch self { - case .app: return "app" - case .appEncryptionDeclaration: return "appEncryptionDeclaration" - case .appStoreVersion: return "appStoreVersion" - case .betaAppReviewSubmission: return "betaAppReviewSubmission" - case .betaBuildLocalizations: return "betaBuildLocalizations" - case .betaGroups: return "betaGroups" - case .buildAudienceType: return "buildAudienceType" - case .buildBetaDetail: return "buildBetaDetail" - case .buildBundles: return "buildBundles" - case .computedMinMacOsVersion: return "computedMinMacOsVersion" - case .diagnosticSignatures: return "diagnosticSignatures" - case .expirationDate: return "expirationDate" - case .expired: return "expired" - case .iconAssetToken: return "iconAssetToken" - case .icons: return "icons" - case .individualTesters: return "individualTesters" - case .lsMinimumSystemVersion: return "lsMinimumSystemVersion" - case .minOsVersion: return "minOsVersion" - case .perfPowerMetrics: return "perfPowerMetrics" - case .preReleaseVersion: return "preReleaseVersion" - case .processingState: return "processingState" - case .uploadedDate: return "uploadedDate" - case .usesNonExemptEncryption: return "usesNonExemptEncryption" - case .version: return "version" - case .unknown(let rawValue): return rawValue - } + public static var appStoreVersionForReview: Self { + .init(rawValue: "appStoreVersionForReview") } - public init(rawValue: String) { - switch rawValue { - case "app": self = .app - case "appEncryptionDeclaration": self = .appEncryptionDeclaration - case "appStoreVersion": self = .appStoreVersion - case "betaAppReviewSubmission": self = .betaAppReviewSubmission - case "betaBuildLocalizations": self = .betaBuildLocalizations - case "betaGroups": self = .betaGroups - case "buildAudienceType": self = .buildAudienceType - case "buildBetaDetail": self = .buildBetaDetail - case "buildBundles": self = .buildBundles - case "computedMinMacOsVersion": self = .computedMinMacOsVersion - case "diagnosticSignatures": self = .diagnosticSignatures - case "expirationDate": self = .expirationDate - case "expired": self = .expired - case "iconAssetToken": self = .iconAssetToken - case "icons": self = .icons - case "individualTesters": self = .individualTesters - case "lsMinimumSystemVersion": self = .lsMinimumSystemVersion - case "minOsVersion": self = .minOsVersion - case "perfPowerMetrics": self = .perfPowerMetrics - case "preReleaseVersion": self = .preReleaseVersion - case "processingState": self = .processingState - case "uploadedDate": self = .uploadedDate - case "usesNonExemptEncryption": self = .usesNonExemptEncryption - case "version": self = .version - default: self = .unknown(rawValue) - } - } - } - - public enum CiProducts: Hashable, Codable, RawRepresentable { - case additionalRepositories - case app - case buildRuns - case bundleId - case createdDate - case name - case primaryRepositories - case productType - case workflows - case unknown(String) - - public var rawValue: String { - switch self { - case .additionalRepositories: return "additionalRepositories" - case .app: return "app" - case .buildRuns: return "buildRuns" - case .bundleId: return "bundleId" - case .createdDate: return "createdDate" - case .name: return "name" - case .primaryRepositories: return "primaryRepositories" - case .productType: return "productType" - case .workflows: return "workflows" - case .unknown(let rawValue): return rawValue - } + public static var items: Self { + .init(rawValue: "items") } - public init(rawValue: String) { - switch rawValue { - case "additionalRepositories": self = .additionalRepositories - case "app": self = .app - case "buildRuns": self = .buildRuns - case "bundleId": self = .bundleId - case "createdDate": self = .createdDate - case "name": self = .name - case "primaryRepositories": self = .primaryRepositories - case "productType": self = .productType - case "workflows": self = .workflows - default: self = .unknown(rawValue) - } - } - } - - public enum CustomerReviews: Hashable, Codable, RawRepresentable { - case body - case createdDate - case rating - case response - case reviewerNickname - case territory - case title - case unknown(String) - - public var rawValue: String { - switch self { - case .body: return "body" - case .createdDate: return "createdDate" - case .rating: return "rating" - case .response: return "response" - case .reviewerNickname: return "reviewerNickname" - case .territory: return "territory" - case .title: return "title" - case .unknown(let rawValue): return rawValue - } + public static var lastUpdatedByActor: Self { + .init(rawValue: "lastUpdatedByActor") } - public init(rawValue: String) { - switch rawValue { - case "body": self = .body - case "createdDate": self = .createdDate - case "rating": self = .rating - case "response": self = .response - case "reviewerNickname": self = .reviewerNickname - case "territory": self = .territory - case "title": self = .title - default: self = .unknown(rawValue) - } - } - } - - public enum EndUserLicenseAgreements: Hashable, Codable, RawRepresentable { - case agreementText - case app - case territories - case unknown(String) - - public var rawValue: String { - switch self { - case .agreementText: return "agreementText" - case .app: return "app" - case .territories: return "territories" - case .unknown(let rawValue): return rawValue - } + public static var platform: Self { + .init(rawValue: "platform") } - public init(rawValue: String) { - switch rawValue { - case "agreementText": self = .agreementText - case "app": self = .app - case "territories": self = .territories - default: self = .unknown(rawValue) - } - } - } - - public enum GameCenterDetails: Hashable, Codable, RawRepresentable { - case achievementReleases - case app - case arcadeEnabled - case challengeEnabled - case defaultGroupLeaderboard - case defaultLeaderboard - case gameCenterAchievements - case gameCenterAppVersions - case gameCenterGroup - case gameCenterLeaderboardSets - case gameCenterLeaderboards - case leaderboardReleases - case leaderboardSetReleases - case unknown(String) - - public var rawValue: String { - switch self { - case .achievementReleases: return "achievementReleases" - case .app: return "app" - case .arcadeEnabled: return "arcadeEnabled" - case .challengeEnabled: return "challengeEnabled" - case .defaultGroupLeaderboard: return "defaultGroupLeaderboard" - case .defaultLeaderboard: return "defaultLeaderboard" - case .gameCenterAchievements: return "gameCenterAchievements" - case .gameCenterAppVersions: return "gameCenterAppVersions" - case .gameCenterGroup: return "gameCenterGroup" - case .gameCenterLeaderboardSets: return "gameCenterLeaderboardSets" - case .gameCenterLeaderboards: return "gameCenterLeaderboards" - case .leaderboardReleases: return "leaderboardReleases" - case .leaderboardSetReleases: return "leaderboardSetReleases" - case .unknown(let rawValue): return rawValue - } + public static var state: Self { + .init(rawValue: "state") } - public init(rawValue: String) { - switch rawValue { - case "achievementReleases": self = .achievementReleases - case "app": self = .app - case "arcadeEnabled": self = .arcadeEnabled - case "challengeEnabled": self = .challengeEnabled - case "defaultGroupLeaderboard": self = .defaultGroupLeaderboard - case "defaultLeaderboard": self = .defaultLeaderboard - case "gameCenterAchievements": self = .gameCenterAchievements - case "gameCenterAppVersions": self = .gameCenterAppVersions - case "gameCenterGroup": self = .gameCenterGroup - case "gameCenterLeaderboardSets": self = .gameCenterLeaderboardSets - case "gameCenterLeaderboards": self = .gameCenterLeaderboards - case "leaderboardReleases": self = .leaderboardReleases - case "leaderboardSetReleases": self = .leaderboardSetReleases - default: self = .unknown(rawValue) - } - } - } - - public enum GameCenterEnabledVersions: Hashable, Codable, RawRepresentable { - case app - case compatibleVersions - case iconAsset - case platform - case versionString - case unknown(String) - - public var rawValue: String { - switch self { - case .app: return "app" - case .compatibleVersions: return "compatibleVersions" - case .iconAsset: return "iconAsset" - case .platform: return "platform" - case .versionString: return "versionString" - case .unknown(let rawValue): return rawValue - } + public static var submittedByActor: Self { + .init(rawValue: "submittedByActor") } - public init(rawValue: String) { - switch rawValue { - case "app": self = .app - case "compatibleVersions": self = .compatibleVersions - case "iconAsset": self = .iconAsset - case "platform": self = .platform - case "versionString": self = .versionString - default: self = .unknown(rawValue) - } - } - } - - public enum InAppPurchases: Hashable, Codable, RawRepresentable { - case app - case appStoreReviewScreenshot - case apps - case availableInAllTerritories - case content - case contentHosting - case familySharable - case iapPriceSchedule - case inAppPurchaseAvailability - case inAppPurchaseLocalizations - case inAppPurchaseType - case name - case pricePoints - case productId - case promotedPurchase - case referenceName - case reviewNote - case state - case unknown(String) - - public var rawValue: String { - switch self { - case .app: return "app" - case .appStoreReviewScreenshot: return "appStoreReviewScreenshot" - case .apps: return "apps" - case .availableInAllTerritories: return "availableInAllTerritories" - case .content: return "content" - case .contentHosting: return "contentHosting" - case .familySharable: return "familySharable" - case .iapPriceSchedule: return "iapPriceSchedule" - case .inAppPurchaseAvailability: return "inAppPurchaseAvailability" - case .inAppPurchaseLocalizations: return "inAppPurchaseLocalizations" - case .inAppPurchaseType: return "inAppPurchaseType" - case .name: return "name" - case .pricePoints: return "pricePoints" - case .productId: return "productId" - case .promotedPurchase: return "promotedPurchase" - case .referenceName: return "referenceName" - case .reviewNote: return "reviewNote" - case .state: return "state" - case .unknown(let rawValue): return rawValue - } + public static var submittedDate: Self { + .init(rawValue: "submittedDate") } - public init(rawValue: String) { - switch rawValue { - case "app": self = .app - case "appStoreReviewScreenshot": self = .appStoreReviewScreenshot - case "apps": self = .apps - case "availableInAllTerritories": self = .availableInAllTerritories - case "content": self = .content - case "contentHosting": self = .contentHosting - case "familySharable": self = .familySharable - case "iapPriceSchedule": self = .iapPriceSchedule - case "inAppPurchaseAvailability": self = .inAppPurchaseAvailability - case "inAppPurchaseLocalizations": self = .inAppPurchaseLocalizations - case "inAppPurchaseType": self = .inAppPurchaseType - case "name": self = .name - case "pricePoints": self = .pricePoints - case "productId": self = .productId - case "promotedPurchase": self = .promotedPurchase - case "referenceName": self = .referenceName - case "reviewNote": self = .reviewNote - case "state": self = .state - default: self = .unknown(rawValue) - } - } - } - - public enum PerfPowerMetrics: Hashable, Codable, RawRepresentable { - case deviceType - case metricType - case platform - case unknown(String) - - public var rawValue: String { - switch self { - case .deviceType: return "deviceType" - case .metricType: return "metricType" - case .platform: return "platform" - case .unknown(let rawValue): return rawValue - } + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "deviceType": self = .deviceType - case "metricType": self = .metricType - case "platform": self = .platform - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum PreReleaseVersions: Hashable, Codable, RawRepresentable { - case app - case builds - case platform - case version - case unknown(String) + public struct SubscriptionGracePeriods: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var duration: Self { + .init(rawValue: "duration") + } - public var rawValue: String { - switch self { - case .app: return "app" - case .builds: return "builds" - case .platform: return "platform" - case .version: return "version" - case .unknown(let rawValue): return rawValue - } + public static var optIn: Self { + .init(rawValue: "optIn") } - public init(rawValue: String) { - switch rawValue { - case "app": self = .app - case "builds": self = .builds - case "platform": self = .platform - case "version": self = .version - default: self = .unknown(rawValue) - } - } - } - - public enum PromotedPurchases: Hashable, Codable, RawRepresentable { - case app - case enabled - case inAppPurchaseV2 - case promotionImages - case state - case subscription - case visibleForAllUsers - case unknown(String) - - public var rawValue: String { - switch self { - case .app: return "app" - case .enabled: return "enabled" - case .inAppPurchaseV2: return "inAppPurchaseV2" - case .promotionImages: return "promotionImages" - case .state: return "state" - case .subscription: return "subscription" - case .visibleForAllUsers: return "visibleForAllUsers" - case .unknown(let rawValue): return rawValue - } + public static var renewalType: Self { + .init(rawValue: "renewalType") } - public init(rawValue: String) { - switch rawValue { - case "app": self = .app - case "enabled": self = .enabled - case "inAppPurchaseV2": self = .inAppPurchaseV2 - case "promotionImages": self = .promotionImages - case "state": self = .state - case "subscription": self = .subscription - case "visibleForAllUsers": self = .visibleForAllUsers - default: self = .unknown(rawValue) - } - } - } - - public enum ReviewSubmissions: Hashable, Codable, RawRepresentable { - case app - case appStoreVersionForReview - case canceled - case items - case lastUpdatedByActor - case platform - case state - case submitted - case submittedByActor - case submittedDate - case unknown(String) - - public var rawValue: String { - switch self { - case .app: return "app" - case .appStoreVersionForReview: return "appStoreVersionForReview" - case .canceled: return "canceled" - case .items: return "items" - case .lastUpdatedByActor: return "lastUpdatedByActor" - case .platform: return "platform" - case .state: return "state" - case .submitted: return "submitted" - case .submittedByActor: return "submittedByActor" - case .submittedDate: return "submittedDate" - case .unknown(let rawValue): return rawValue - } + public static var sandboxOptIn: Self { + .init(rawValue: "sandboxOptIn") } - public init(rawValue: String) { - switch rawValue { - case "app": self = .app - case "appStoreVersionForReview": self = .appStoreVersionForReview - case "canceled": self = .canceled - case "items": self = .items - case "lastUpdatedByActor": self = .lastUpdatedByActor - case "platform": self = .platform - case "state": self = .state - case "submitted": self = .submitted - case "submittedByActor": self = .submittedByActor - case "submittedDate": self = .submittedDate - default: self = .unknown(rawValue) - } - } - } - - public enum SubscriptionGracePeriods: Hashable, Codable, RawRepresentable { - case duration - case optIn - case renewalType - case sandboxOptIn - case unknown(String) - - public var rawValue: String { - switch self { - case .duration: return "duration" - case .optIn: return "optIn" - case .renewalType: return "renewalType" - case .sandboxOptIn: return "sandboxOptIn" - case .unknown(let rawValue): return rawValue - } + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "duration": self = .duration - case "optIn": self = .optIn - case "renewalType": self = .renewalType - case "sandboxOptIn": self = .sandboxOptIn - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum SubscriptionGroups: Hashable, Codable, RawRepresentable { - case app - case referenceName - case subscriptionGroupLocalizations - case subscriptions - case unknown(String) - - public var rawValue: String { - switch self { - case .app: return "app" - case .referenceName: return "referenceName" - case .subscriptionGroupLocalizations: return "subscriptionGroupLocalizations" - case .subscriptions: return "subscriptions" - case .unknown(let rawValue): return rawValue - } + public struct SubscriptionGroups: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var referenceName: Self { + .init(rawValue: "referenceName") } - public init(rawValue: String) { - switch rawValue { - case "app": self = .app - case "referenceName": self = .referenceName - case "subscriptionGroupLocalizations": self = .subscriptionGroupLocalizations - case "subscriptions": self = .subscriptions - default: self = .unknown(rawValue) - } + public static var subscriptionGroupLocalizations: Self { + .init(rawValue: "subscriptionGroupLocalizations") } - } - public enum Territories: Hashable, Codable, RawRepresentable { - case currency - case unknown(String) + public static var subscriptions: Self { + .init(rawValue: "subscriptions") + } - public var rawValue: String { - switch self { - case .currency: return "currency" - case .unknown(let rawValue): return rawValue - } + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "currency": self = .currency - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } public struct Relation: Hashable { - /// the fields to include for returned resources of type appAvailabilities - public static var appAvailabilities: Relation<[AppAvailabilities]?> { - .init(key: "fields[appAvailabilities]") - } - /// the fields to include for returned resources of type appClips public static var appClips: Relation<[AppClips]?> { .init(key: "fields[appClips]") @@ -1633,26 +1634,6 @@ extension V1.Apps.GET { .init(key: "fields[appInfos]") } - /// the fields to include for returned resources of type appPreOrders - public static var appPreOrders: Relation<[AppPreOrders]?> { - .init(key: "fields[appPreOrders]") - } - - /// the fields to include for returned resources of type appPricePoints - public static var appPricePoints: Relation<[AppPricePoints]?> { - .init(key: "fields[appPricePoints]") - } - - /// the fields to include for returned resources of type appPriceSchedules - public static var appPriceSchedules: Relation<[AppPriceSchedules]?> { - .init(key: "fields[appPriceSchedules]") - } - - /// the fields to include for returned resources of type appPrices - public static var appPrices: Relation<[AppPrices]?> { - .init(key: "fields[appPrices]") - } - /// the fields to include for returned resources of type appStoreVersionExperiments public static var appStoreVersionExperiments: Relation<[AppStoreVersionExperiments]?> { .init(key: "fields[appStoreVersionExperiments]") @@ -1698,11 +1679,6 @@ extension V1.Apps.GET { .init(key: "fields[ciProducts]") } - /// the fields to include for returned resources of type customerReviews - public static var customerReviews: Relation<[CustomerReviews]?> { - .init(key: "fields[customerReviews]") - } - /// the fields to include for returned resources of type endUserLicenseAgreements public static var endUserLicenseAgreements: Relation<[EndUserLicenseAgreements]?> { .init(key: "fields[endUserLicenseAgreements]") @@ -1723,11 +1699,6 @@ extension V1.Apps.GET { .init(key: "fields[inAppPurchases]") } - /// the fields to include for returned resources of type perfPowerMetrics - public static var perfPowerMetrics: Relation<[PerfPowerMetrics]?> { - .init(key: "fields[perfPowerMetrics]") - } - /// the fields to include for returned resources of type preReleaseVersions public static var preReleaseVersions: Relation<[PreReleaseVersions]?> { .init(key: "fields[preReleaseVersions]") @@ -1753,11 +1724,6 @@ extension V1.Apps.GET { .init(key: "fields[subscriptionGroups]") } - /// the fields to include for returned resources of type territories - public static var territories: Relation<[Territories]?> { - .init(key: "fields[territories]") - } - internal let key: String public func hash(into hasher: inout Hasher) { @@ -1774,101 +1740,263 @@ extension V1.Apps.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum AppStoreVersionsAppStoreState: Hashable, Codable, RawRepresentable { - case accepted - case developerRejected - case developerRemovedFromSale - case inReview - case invalidBinary - case metadataRejected - case pendingAppleRelease - case pendingContract - case pendingDeveloperRelease - case preorderReadyForSale - case prepareForSubmission - case processingForAppStore - case readyForReview - case readyForSale - case rejected - case removedFromSale - case replacedWithNewVersion - case waitingForExportCompliance - case waitingForReview - case unknown(String) - - public var rawValue: String { - switch self { - case .accepted: return "ACCEPTED" - case .developerRejected: return "DEVELOPER_REJECTED" - case .developerRemovedFromSale: return "DEVELOPER_REMOVED_FROM_SALE" - case .inReview: return "IN_REVIEW" - case .invalidBinary: return "INVALID_BINARY" - case .metadataRejected: return "METADATA_REJECTED" - case .pendingAppleRelease: return "PENDING_APPLE_RELEASE" - case .pendingContract: return "PENDING_CONTRACT" - case .pendingDeveloperRelease: return "PENDING_DEVELOPER_RELEASE" - case .preorderReadyForSale: return "PREORDER_READY_FOR_SALE" - case .prepareForSubmission: return "PREPARE_FOR_SUBMISSION" - case .processingForAppStore: return "PROCESSING_FOR_APP_STORE" - case .readyForReview: return "READY_FOR_REVIEW" - case .readyForSale: return "READY_FOR_SALE" - case .rejected: return "REJECTED" - case .removedFromSale: return "REMOVED_FROM_SALE" - case .replacedWithNewVersion: return "REPLACED_WITH_NEW_VERSION" - case .waitingForExportCompliance: return "WAITING_FOR_EXPORT_COMPLIANCE" - case .waitingForReview: return "WAITING_FOR_REVIEW" - case .unknown(let rawValue): return rawValue - } + public struct AppStoreVersionsAppStoreState: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var accepted: Self { + .init(rawValue: "ACCEPTED") + } + + public static var developerRejected: Self { + .init(rawValue: "DEVELOPER_REJECTED") + } + + public static var developerRemovedFromSale: Self { + .init(rawValue: "DEVELOPER_REMOVED_FROM_SALE") + } + + public static var inReview: Self { + .init(rawValue: "IN_REVIEW") + } + + public static var invalidBinary: Self { + .init(rawValue: "INVALID_BINARY") + } + + public static var metadataRejected: Self { + .init(rawValue: "METADATA_REJECTED") + } + + public static var notApplicable: Self { + .init(rawValue: "NOT_APPLICABLE") + } + + public static var pendingAppleRelease: Self { + .init(rawValue: "PENDING_APPLE_RELEASE") + } + + public static var pendingContract: Self { + .init(rawValue: "PENDING_CONTRACT") + } + + public static var pendingDeveloperRelease: Self { + .init(rawValue: "PENDING_DEVELOPER_RELEASE") + } + + public static var preorderReadyForSale: Self { + .init(rawValue: "PREORDER_READY_FOR_SALE") + } + + public static var prepareForSubmission: Self { + .init(rawValue: "PREPARE_FOR_SUBMISSION") + } + + public static var processingForAppStore: Self { + .init(rawValue: "PROCESSING_FOR_APP_STORE") + } + + public static var readyForReview: Self { + .init(rawValue: "READY_FOR_REVIEW") + } + + public static var readyForSale: Self { + .init(rawValue: "READY_FOR_SALE") + } + + public static var rejected: Self { + .init(rawValue: "REJECTED") + } + + public static var removedFromSale: Self { + .init(rawValue: "REMOVED_FROM_SALE") + } + + public static var replacedWithNewVersion: Self { + .init(rawValue: "REPLACED_WITH_NEW_VERSION") + } + + public static var waitingForExportCompliance: Self { + .init(rawValue: "WAITING_FOR_EXPORT_COMPLIANCE") + } + + public static var waitingForReview: Self { + .init(rawValue: "WAITING_FOR_REVIEW") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct AppStoreVersionsAppVersionState: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var accepted: Self { + .init(rawValue: "ACCEPTED") + } + + public static var developerRejected: Self { + .init(rawValue: "DEVELOPER_REJECTED") + } + + public static var inReview: Self { + .init(rawValue: "IN_REVIEW") + } + + public static var invalidBinary: Self { + .init(rawValue: "INVALID_BINARY") + } + + public static var metadataRejected: Self { + .init(rawValue: "METADATA_REJECTED") + } + + public static var pendingAppleRelease: Self { + .init(rawValue: "PENDING_APPLE_RELEASE") + } + + public static var pendingDeveloperRelease: Self { + .init(rawValue: "PENDING_DEVELOPER_RELEASE") + } + + public static var prepareForSubmission: Self { + .init(rawValue: "PREPARE_FOR_SUBMISSION") + } + + public static var processingForDistribution: Self { + .init(rawValue: "PROCESSING_FOR_DISTRIBUTION") + } + + public static var readyForDistribution: Self { + .init(rawValue: "READY_FOR_DISTRIBUTION") + } + + public static var readyForReview: Self { + .init(rawValue: "READY_FOR_REVIEW") + } + + public static var rejected: Self { + .init(rawValue: "REJECTED") + } + + public static var replacedWithNewVersion: Self { + .init(rawValue: "REPLACED_WITH_NEW_VERSION") } + public static var waitingForExportCompliance: Self { + .init(rawValue: "WAITING_FOR_EXPORT_COMPLIANCE") + } + + public static var waitingForReview: Self { + .init(rawValue: "WAITING_FOR_REVIEW") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct AppStoreVersionsPlatform: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var iOS: Self { + .init(rawValue: "IOS") + } + + public static var macOS: Self { + .init(rawValue: "MAC_OS") + } + + public static var tvOS: Self { + .init(rawValue: "TV_OS") + } + + public static var visionOS: Self { + .init(rawValue: "VISION_OS") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct ReviewSubmissionsPlatform: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var iOS: Self { + .init(rawValue: "IOS") + } + + public static var macOS: Self { + .init(rawValue: "MAC_OS") + } + + public static var tvOS: Self { + .init(rawValue: "TV_OS") + } + + public static var visionOS: Self { + .init(rawValue: "VISION_OS") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "ACCEPTED": self = .accepted - case "DEVELOPER_REJECTED": self = .developerRejected - case "DEVELOPER_REMOVED_FROM_SALE": self = .developerRemovedFromSale - case "IN_REVIEW": self = .inReview - case "INVALID_BINARY": self = .invalidBinary - case "METADATA_REJECTED": self = .metadataRejected - case "PENDING_APPLE_RELEASE": self = .pendingAppleRelease - case "PENDING_CONTRACT": self = .pendingContract - case "PENDING_DEVELOPER_RELEASE": self = .pendingDeveloperRelease - case "PREORDER_READY_FOR_SALE": self = .preorderReadyForSale - case "PREPARE_FOR_SUBMISSION": self = .prepareForSubmission - case "PROCESSING_FOR_APP_STORE": self = .processingForAppStore - case "READY_FOR_REVIEW": self = .readyForReview - case "READY_FOR_SALE": self = .readyForSale - case "REJECTED": self = .rejected - case "REMOVED_FROM_SALE": self = .removedFromSale - case "REPLACED_WITH_NEW_VERSION": self = .replacedWithNewVersion - case "WAITING_FOR_EXPORT_COMPLIANCE": self = .waitingForExportCompliance - case "WAITING_FOR_REVIEW": self = .waitingForReview - default: self = .unknown(rawValue) - } - } - } - - public enum AppStoreVersionsPlatform: Hashable, Codable, RawRepresentable { - case iOS - case macOS - case tvOS - case unknown(String) - - public var rawValue: String { - switch self { - case .iOS: return "IOS" - case .macOS: return "MAC_OS" - case .tvOS: return "TV_OS" - case .unknown(let rawValue): return rawValue - } + self.rawValue = rawValue + } + } + + public struct ReviewSubmissionsState: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var canceling: Self { + .init(rawValue: "CANCELING") + } + + public static var complete: Self { + .init(rawValue: "COMPLETE") + } + + public static var completing: Self { + .init(rawValue: "COMPLETING") + } + + public static var inReview: Self { + .init(rawValue: "IN_REVIEW") + } + + public static var readyForReview: Self { + .init(rawValue: "READY_FOR_REVIEW") } + public static var unresolvedIssues: Self { + .init(rawValue: "UNRESOLVED_ISSUES") + } + + public static var waitingForReview: Self { + .init(rawValue: "WAITING_FOR_REVIEW") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "IOS": self = .iOS - case "MAC_OS": self = .macOS - case "TV_OS": self = .tvOS - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } @@ -1878,6 +2006,11 @@ extension V1.Apps.GET { .init(key: "filter[appStoreVersions.appStoreState]") } + /// filter by attribute 'appStoreVersions.appVersionState' + public static var appStoreVersionsAppVersionState: Relation<[AppStoreVersionsAppVersionState]?> { + .init(key: "filter[appStoreVersions.appVersionState]") + } + /// filter by attribute 'appStoreVersions.platform' public static var appStoreVersionsPlatform: Relation<[AppStoreVersionsPlatform]?> { .init(key: "filter[appStoreVersions.platform]") @@ -1903,6 +2036,16 @@ extension V1.Apps.GET { .init(key: "filter[name]") } + /// filter by attribute 'reviewSubmissions.platform' + public static var reviewSubmissionsPlatform: Relation<[ReviewSubmissionsPlatform]?> { + .init(key: "filter[reviewSubmissions.platform]") + } + + /// filter by attribute 'reviewSubmissions.state' + public static var reviewSubmissionsState: Relation<[ReviewSubmissionsState]?> { + .init(key: "filter[reviewSubmissions.state]") + } + /// filter by attribute 'sku' public static var sku: Relation<[String]?> { .init(key: "filter[sku]") @@ -1916,97 +2059,107 @@ extension V1.Apps.GET { } } - public enum Include: Hashable, Codable, RawRepresentable { - case appClips - case appCustomProductPages - case appEncryptionDeclarations - case appEvents - case appInfos - case appStoreVersionExperimentsV2 - case appStoreVersions - case availableTerritories - case betaAppLocalizations - case betaAppReviewDetail - case betaGroups - case betaLicenseAgreement - case builds - case ciProduct - case endUserLicenseAgreement - case gameCenterDetail - case gameCenterEnabledVersions - case inAppPurchases - case inAppPurchasesV2 - case preOrder - case preReleaseVersions - case prices - case promotedPurchases - case reviewSubmissions - case subscriptionGracePeriod - case subscriptionGroups - case unknown(String) - - public var rawValue: String { - switch self { - case .appClips: return "appClips" - case .appCustomProductPages: return "appCustomProductPages" - case .appEncryptionDeclarations: return "appEncryptionDeclarations" - case .appEvents: return "appEvents" - case .appInfos: return "appInfos" - case .appStoreVersionExperimentsV2: return "appStoreVersionExperimentsV2" - case .appStoreVersions: return "appStoreVersions" - case .availableTerritories: return "availableTerritories" - case .betaAppLocalizations: return "betaAppLocalizations" - case .betaAppReviewDetail: return "betaAppReviewDetail" - case .betaGroups: return "betaGroups" - case .betaLicenseAgreement: return "betaLicenseAgreement" - case .builds: return "builds" - case .ciProduct: return "ciProduct" - case .endUserLicenseAgreement: return "endUserLicenseAgreement" - case .gameCenterDetail: return "gameCenterDetail" - case .gameCenterEnabledVersions: return "gameCenterEnabledVersions" - case .inAppPurchases: return "inAppPurchases" - case .inAppPurchasesV2: return "inAppPurchasesV2" - case .preOrder: return "preOrder" - case .preReleaseVersions: return "preReleaseVersions" - case .prices: return "prices" - case .promotedPurchases: return "promotedPurchases" - case .reviewSubmissions: return "reviewSubmissions" - case .subscriptionGracePeriod: return "subscriptionGracePeriod" - case .subscriptionGroups: return "subscriptionGroups" - case .unknown(let rawValue): return rawValue - } + public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var appClips: Self { + .init(rawValue: "appClips") + } + + public static var appCustomProductPages: Self { + .init(rawValue: "appCustomProductPages") } + public static var appEncryptionDeclarations: Self { + .init(rawValue: "appEncryptionDeclarations") + } + + public static var appEvents: Self { + .init(rawValue: "appEvents") + } + + public static var appInfos: Self { + .init(rawValue: "appInfos") + } + + public static var appStoreVersionExperimentsV2: Self { + .init(rawValue: "appStoreVersionExperimentsV2") + } + + public static var appStoreVersions: Self { + .init(rawValue: "appStoreVersions") + } + + public static var betaAppLocalizations: Self { + .init(rawValue: "betaAppLocalizations") + } + + public static var betaAppReviewDetail: Self { + .init(rawValue: "betaAppReviewDetail") + } + + public static var betaGroups: Self { + .init(rawValue: "betaGroups") + } + + public static var betaLicenseAgreement: Self { + .init(rawValue: "betaLicenseAgreement") + } + + public static var builds: Self { + .init(rawValue: "builds") + } + + public static var ciProduct: Self { + .init(rawValue: "ciProduct") + } + + public static var endUserLicenseAgreement: Self { + .init(rawValue: "endUserLicenseAgreement") + } + + public static var gameCenterDetail: Self { + .init(rawValue: "gameCenterDetail") + } + + public static var gameCenterEnabledVersions: Self { + .init(rawValue: "gameCenterEnabledVersions") + } + + public static var inAppPurchases: Self { + .init(rawValue: "inAppPurchases") + } + + public static var inAppPurchasesV2: Self { + .init(rawValue: "inAppPurchasesV2") + } + + public static var preReleaseVersions: Self { + .init(rawValue: "preReleaseVersions") + } + + public static var promotedPurchases: Self { + .init(rawValue: "promotedPurchases") + } + + public static var reviewSubmissions: Self { + .init(rawValue: "reviewSubmissions") + } + + public static var subscriptionGracePeriod: Self { + .init(rawValue: "subscriptionGracePeriod") + } + + public static var subscriptionGroups: Self { + .init(rawValue: "subscriptionGroups") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "appClips": self = .appClips - case "appCustomProductPages": self = .appCustomProductPages - case "appEncryptionDeclarations": self = .appEncryptionDeclarations - case "appEvents": self = .appEvents - case "appInfos": self = .appInfos - case "appStoreVersionExperimentsV2": self = .appStoreVersionExperimentsV2 - case "appStoreVersions": self = .appStoreVersions - case "availableTerritories": self = .availableTerritories - case "betaAppLocalizations": self = .betaAppLocalizations - case "betaAppReviewDetail": self = .betaAppReviewDetail - case "betaGroups": self = .betaGroups - case "betaLicenseAgreement": self = .betaLicenseAgreement - case "builds": self = .builds - case "ciProduct": self = .ciProduct - case "endUserLicenseAgreement": self = .endUserLicenseAgreement - case "gameCenterDetail": self = .gameCenterDetail - case "gameCenterEnabledVersions": self = .gameCenterEnabledVersions - case "inAppPurchases": self = .inAppPurchases - case "inAppPurchasesV2": self = .inAppPurchasesV2 - case "preOrder": self = .preOrder - case "preReleaseVersions": self = .preReleaseVersions - case "prices": self = .prices - case "promotedPurchases": self = .promotedPurchases - case "reviewSubmissions": self = .reviewSubmissions - case "subscriptionGracePeriod": self = .subscriptionGracePeriod - case "subscriptionGroups": self = .subscriptionGroups - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } @@ -2059,11 +2212,6 @@ extension V1.Apps.GET { .init(key: "limit[appStoreVersions]") } - /// maximum number of related availableTerritories returned (when they are included) - public static var availableTerritories: Relation { - .init(key: "limit[availableTerritories]") - } - /// maximum number of related betaAppLocalizations returned (when they are included) public static var betaAppLocalizations: Relation { .init(key: "limit[betaAppLocalizations]") @@ -2099,11 +2247,6 @@ extension V1.Apps.GET { .init(key: "limit[preReleaseVersions]") } - /// maximum number of related prices returned (when they are included) - public static var prices: Relation { - .init(key: "limit[prices]") - } - /// maximum number of related promotedPurchases returned (when they are included) public static var promotedPurchases: Relation { .init(key: "limit[promotedPurchases]") @@ -2127,37 +2270,39 @@ extension V1.Apps.GET { } } - public enum Sort: Hashable, Codable, RawRepresentable { - case bundleId - case bundleIdDesc - case name - case nameDesc - case sku - case skuDesc - case unknown(String) + public struct Sort: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var bundleId: Self { + .init(rawValue: "bundleId") + } - public var rawValue: String { - switch self { - case .bundleId: return "bundleId" - case .bundleIdDesc: return "-bundleId" - case .name: return "name" - case .nameDesc: return "-name" - case .sku: return "sku" - case .skuDesc: return "-sku" - case .unknown(let rawValue): return rawValue - } + public static var bundleIdDesc: Self { + .init(rawValue: "-bundleId") + } + + public static var name: Self { + .init(rawValue: "name") + } + + public static var nameDesc: Self { + .init(rawValue: "-name") } + public static var sku: Self { + .init(rawValue: "sku") + } + + public static var skuDesc: Self { + .init(rawValue: "-sku") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "bundleId": self = .bundleId - case "-bundleId": self = .bundleIdDesc - case "name": self = .name - case "-name": self = .nameDesc - case "sku": self = .sku - case "-sku": self = .skuDesc - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/AccessibilityDeclarations/AppsByIdAccessibilityDeclarations.GET.aeba05e.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/AccessibilityDeclarations/AppsByIdAccessibilityDeclarations.GET.aeba05e.generated.swift new file mode 100644 index 00000000..f8e80b44 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/AccessibilityDeclarations/AppsByIdAccessibilityDeclarations.GET.aeba05e.generated.swift @@ -0,0 +1,263 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.Apps.ById.AccessibilityDeclarations { + public struct GET: Endpoint { + public typealias Response = AccessibilityDeclarationsResponse + + public var path: String { + "/v1/apps/\(id)/accessibilityDeclarations" + } + + /// the id of the requested resource + public var id: String + + public var parameters: Parameters = Parameters() + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + components?.queryItems = [ + URLQueryItem(name: "fields[accessibilityDeclarations]", + value: parameters.fields[.accessibilityDeclarations]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "filter[deviceFamily]", + value: parameters.filter[.deviceFamily]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "filter[state]", + value: parameters.filter[.state]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "limit", + value: parameters.limit.map { "\($0)" }) + ].filter { $0.value != nil } + if components?.queryItems?.isEmpty ?? false { + components?.queryItems = nil + } + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "GET" + return urlRequest + } + + /// - Returns: **200**, List of AccessibilityDeclarations as `AccessibilityDeclarationsResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(AccessibilityDeclarationsResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +extension V1.Apps.ById.AccessibilityDeclarations.GET { + public struct Parameters: Hashable { + public var fields: Fields = Fields() + + public var filter: Filter = Filter() + + /// maximum resources per page + public var limit: Int? + + public struct Fields: Hashable { + public subscript (_ relation: Relation) -> T { + get { values[relation]?.base as! T } + set { values[relation] = AnyHashable(newValue) } + } + + private var values: [AnyHashable: AnyHashable] = [:] + + public struct AccessibilityDeclarations: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var deviceFamily: Self { + .init(rawValue: "deviceFamily") + } + + public static var state: Self { + .init(rawValue: "state") + } + + public static var supportsAudioDescriptions: Self { + .init(rawValue: "supportsAudioDescriptions") + } + + public static var supportsCaptions: Self { + .init(rawValue: "supportsCaptions") + } + + public static var supportsDarkInterface: Self { + .init(rawValue: "supportsDarkInterface") + } + + public static var supportsDifferentiateWithoutColorAlone: Self { + .init(rawValue: "supportsDifferentiateWithoutColorAlone") + } + + public static var supportsLargerText: Self { + .init(rawValue: "supportsLargerText") + } + + public static var supportsReducedMotion: Self { + .init(rawValue: "supportsReducedMotion") + } + + public static var supportsSufficientContrast: Self { + .init(rawValue: "supportsSufficientContrast") + } + + public static var supportsVoiceControl: Self { + .init(rawValue: "supportsVoiceControl") + } + + public static var supportsVoiceover: Self { + .init(rawValue: "supportsVoiceover") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct Relation: Hashable { + /// the fields to include for returned resources of type accessibilityDeclarations + public static var accessibilityDeclarations: Relation<[AccessibilityDeclarations]?> { + .init(key: "fields[accessibilityDeclarations]") + } + + internal let key: String + + public func hash(into hasher: inout Hasher) { + hasher.combine(key) + } + } + } + + public struct Filter: Hashable { + public subscript (_ relation: Relation) -> T { + get { values[relation]?.base as! T } + set { values[relation] = AnyHashable(newValue) } + } + + private var values: [AnyHashable: AnyHashable] = [:] + + public struct DeviceFamily: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var appleTv: Self { + .init(rawValue: "APPLE_TV") + } + + public static var appleWatch: Self { + .init(rawValue: "APPLE_WATCH") + } + + public static var ipad: Self { + .init(rawValue: "IPAD") + } + + public static var iphone: Self { + .init(rawValue: "IPHONE") + } + + public static var mac: Self { + .init(rawValue: "MAC") + } + + public static var vision: Self { + .init(rawValue: "VISION") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct State: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var draft: Self { + .init(rawValue: "DRAFT") + } + + public static var published: Self { + .init(rawValue: "PUBLISHED") + } + + public static var replaced: Self { + .init(rawValue: "REPLACED") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct Relation: Hashable { + /// filter by attribute 'deviceFamily' + public static var deviceFamily: Relation<[DeviceFamily]?> { + .init(key: "filter[deviceFamily]") + } + + /// filter by attribute 'state' + public static var state: Relation<[State]?> { + .init(key: "filter[state]") + } + + internal let key: String + + public func hash(into hasher: inout Hasher) { + hasher.combine(key) + } + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/AlternativeDistributionKey/AppsByIdAlternativeDistributionKey.GET.570aa20.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/AlternativeDistributionKey/AppsByIdAlternativeDistributionKey.GET.570aa20.generated.swift new file mode 100644 index 00000000..3e114e48 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/AlternativeDistributionKey/AppsByIdAlternativeDistributionKey.GET.570aa20.generated.swift @@ -0,0 +1,125 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.Apps.ById.AlternativeDistributionKey { + public struct GET: Endpoint { + public typealias Response = AlternativeDistributionKeyResponse + + public var path: String { + "/v1/apps/\(id)/alternativeDistributionKey" + } + + /// the id of the requested resource + public var id: String + + public var parameters: Parameters = Parameters() + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + components?.queryItems = [ + URLQueryItem(name: "fields[alternativeDistributionKeys]", + value: parameters.fields[.alternativeDistributionKeys]?.map { "\($0)" }.joined(separator: ",")) + ].filter { $0.value != nil } + if components?.queryItems?.isEmpty ?? false { + components?.queryItems = nil + } + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "GET" + return urlRequest + } + + /// - Returns: **200**, Single AlternativeDistributionKey as `AlternativeDistributionKeyResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(AlternativeDistributionKeyResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +extension V1.Apps.ById.AlternativeDistributionKey.GET { + public struct Parameters: Hashable { + public var fields: Fields = Fields() + + public struct Fields: Hashable { + public subscript (_ relation: Relation) -> T { + get { values[relation]?.base as! T } + set { values[relation] = AnyHashable(newValue) } + } + + private var values: [AnyHashable: AnyHashable] = [:] + + public struct AlternativeDistributionKeys: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var publicKey: Self { + .init(rawValue: "publicKey") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct Relation: Hashable { + /// the fields to include for returned resources of type alternativeDistributionKeys + public static var alternativeDistributionKeys: Relation<[AlternativeDistributionKeys]?> { + .init(key: "fields[alternativeDistributionKeys]") + } + + internal let key: String + + public func hash(into hasher: inout Hasher) { + hasher.combine(key) + } + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/AnalyticsReportRequests/AppsByIdAnalyticsReportRequests.GET.071994a.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/AnalyticsReportRequests/AppsByIdAnalyticsReportRequests.GET.071994a.generated.swift new file mode 100644 index 00000000..0540a470 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/AnalyticsReportRequests/AppsByIdAnalyticsReportRequests.GET.071994a.generated.swift @@ -0,0 +1,265 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.Apps.ById.AnalyticsReportRequests { + public struct GET: Endpoint { + public typealias Response = AnalyticsReportRequestsResponse + + public var path: String { + "/v1/apps/\(id)/analyticsReportRequests" + } + + /// the id of the requested resource + public var id: String + + public var parameters: Parameters = Parameters() + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + components?.queryItems = [ + URLQueryItem(name: "fields[analyticsReportRequests]", + value: parameters.fields[.analyticsReportRequests]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "fields[analyticsReports]", + value: parameters.fields[.analyticsReports]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "filter[accessType]", + value: parameters.filter[.accessType]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "include", + value: parameters.include?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "limit[reports]", + value: parameters.limit[.reports].map { "\($0)" }), + URLQueryItem(name: "limit", + value: parameters.limit[].map { "\($0)" }) + ].filter { $0.value != nil } + if components?.queryItems?.isEmpty ?? false { + components?.queryItems = nil + } + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "GET" + return urlRequest + } + + /// - Returns: **200**, List of AnalyticsReportRequests as `AnalyticsReportRequestsResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(AnalyticsReportRequestsResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +extension V1.Apps.ById.AnalyticsReportRequests.GET { + public struct Parameters: Hashable { + public var fields: Fields = Fields() + + public var filter: Filter = Filter() + + /// comma-separated list of relationships to include + public var include: [Include]? + + /// maximum resources per page + public var limit: Limit = Limit() + + public struct Fields: Hashable { + public subscript (_ relation: Relation) -> T { + get { values[relation]?.base as! T } + set { values[relation] = AnyHashable(newValue) } + } + + private var values: [AnyHashable: AnyHashable] = [:] + + public struct AnalyticsReportRequests: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var accessType: Self { + .init(rawValue: "accessType") + } + + public static var reports: Self { + .init(rawValue: "reports") + } + + public static var stoppedDueToInactivity: Self { + .init(rawValue: "stoppedDueToInactivity") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct AnalyticsReports: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var category: Self { + .init(rawValue: "category") + } + + public static var instances: Self { + .init(rawValue: "instances") + } + + public static var name: Self { + .init(rawValue: "name") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct Relation: Hashable { + /// the fields to include for returned resources of type analyticsReportRequests + public static var analyticsReportRequests: Relation<[AnalyticsReportRequests]?> { + .init(key: "fields[analyticsReportRequests]") + } + + /// the fields to include for returned resources of type analyticsReports + public static var analyticsReports: Relation<[AnalyticsReports]?> { + .init(key: "fields[analyticsReports]") + } + + internal let key: String + + public func hash(into hasher: inout Hasher) { + hasher.combine(key) + } + } + } + + public struct Filter: Hashable { + public subscript (_ relation: Relation) -> T { + get { values[relation]?.base as! T } + set { values[relation] = AnyHashable(newValue) } + } + + private var values: [AnyHashable: AnyHashable] = [:] + + public struct AccessType: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var oneTimeSnapshot: Self { + .init(rawValue: "ONE_TIME_SNAPSHOT") + } + + public static var ongoing: Self { + .init(rawValue: "ONGOING") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct Relation: Hashable { + /// filter by attribute 'accessType' + public static var accessType: Relation<[AccessType]?> { + .init(key: "filter[accessType]") + } + + internal let key: String + + public func hash(into hasher: inout Hasher) { + hasher.combine(key) + } + } + } + + public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var reports: Self { + .init(rawValue: "reports") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct Limit: Hashable { + public subscript () -> Int? { + get { self[Relation(key: "limit")] } + set { self[Relation(key: "limit")] = newValue } + } + + public subscript (_ relation: Relation) -> T { + get { values[relation]?.base as! T } + set { values[relation] = AnyHashable(newValue) } + } + + private var values: [AnyHashable: AnyHashable] = [:] + + public struct Relation: Hashable { + /// maximum number of related reports returned (when they are included) + public static var reports: Relation { + .init(key: "limit[reports]") + } + + internal let key: String + + public func hash(into hasher: inout Hasher) { + hasher.combine(key) + } + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/AppAvailability/AppsByIdAppAvailability.GET.f0965f3.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/AppAvailability/AppsByIdAppAvailability.GET.f0965f3.generated.swift deleted file mode 100644 index 179d7717..00000000 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/AppAvailability/AppsByIdAppAvailability.GET.f0965f3.generated.swift +++ /dev/null @@ -1,361 +0,0 @@ -// autogenerated - -// swiftlint:disable all -import Foundation -#if canImport(FoundationNetworking) -import FoundationNetworking -#endif - -extension V1.Apps.ById.AppAvailability { - @available(*, deprecated) - public struct GET: Endpoint { - public typealias Response = AppAvailabilityResponse - - public var path: String { - "/v1/apps/\(id)/appAvailability" - } - - /// the id of the requested resource - public var id: String - - public var parameters: Parameters = Parameters() - - public init(id: String) { - self.id = id - } - - public func request(with baseURL: URL) throws -> URLRequest? { - var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) - components?.path = path - - components?.queryItems = [ - URLQueryItem(name: "fields[appAvailabilities]", - value: parameters.fields[.appAvailabilities]?.map { "\($0)" }.joined(separator: ",")), - URLQueryItem(name: "fields[apps]", - value: parameters.fields[.apps]?.map { "\($0)" }.joined(separator: ",")), - URLQueryItem(name: "fields[territories]", - value: parameters.fields[.territories]?.map { "\($0)" }.joined(separator: ",")), - URLQueryItem(name: "include", - value: parameters.include?.map { "\($0)" }.joined(separator: ",")), - URLQueryItem(name: "limit[availableTerritories]", - value: parameters.limit[.availableTerritories].map { "\($0)" }) - ].filter { $0.value != nil } - if components?.queryItems?.isEmpty ?? false { - components?.queryItems = nil - } - - var urlRequest = components?.url.map { URLRequest(url: $0) } - urlRequest?.httpMethod = "GET" - return urlRequest - } - - /// - Returns: **200**, Single AppAvailability as `AppAvailabilityResponse` - /// - Throws: **400**, Parameter error(s) as `ErrorResponse` - /// - Throws: **403**, Forbidden error as `ErrorResponse` - /// - Throws: **404**, Not found error as `ErrorResponse` - public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { - var jsonDecoder: JSONDecoder { - let decoder = JSONDecoder() - return decoder - } - - switch urlResponse.statusCode { - case 200: - return try jsonDecoder.decode(AppAvailabilityResponse.self, from: data) - - case 400: - throw try jsonDecoder.decode(ErrorResponse.self, from: data) - - case 403: - throw try jsonDecoder.decode(ErrorResponse.self, from: data) - - case 404: - throw try jsonDecoder.decode(ErrorResponse.self, from: data) - - default: - throw try jsonDecoder.decode(ErrorResponse.self, from: data) - } - } - } -} - -extension V1.Apps.ById.AppAvailability.GET { - public struct Parameters: Hashable { - public var fields: Fields = Fields() - - /// comma-separated list of relationships to include - public var include: [Include]? - - public var limit: Limit = Limit() - - public struct Fields: Hashable { - public subscript (_ relation: Relation) -> T { - get { values[relation]?.base as! T } - set { values[relation] = AnyHashable(newValue) } - } - - private var values: [AnyHashable: AnyHashable] = [:] - - public enum AppAvailabilities: Hashable, Codable, RawRepresentable { - case app - case availableInNewTerritories - case availableTerritories - case unknown(String) - - public var rawValue: String { - switch self { - case .app: return "app" - case .availableInNewTerritories: return "availableInNewTerritories" - case .availableTerritories: return "availableTerritories" - case .unknown(let rawValue): return rawValue - } - } - - public init(rawValue: String) { - switch rawValue { - case "app": self = .app - case "availableInNewTerritories": self = .availableInNewTerritories - case "availableTerritories": self = .availableTerritories - default: self = .unknown(rawValue) - } - } - } - - public enum Apps: Hashable, Codable, RawRepresentable { - case appAvailability - case appClips - case appCustomProductPages - case appEncryptionDeclarations - case appEvents - case appInfos - case appPricePoints - case appPriceSchedule - case appStoreVersionExperimentsV2 - case appStoreVersions - case availableInNewTerritories - case availableTerritories - case betaAppLocalizations - case betaAppReviewDetail - case betaGroups - case betaLicenseAgreement - case betaTesters - case builds - case bundleId - case ciProduct - case contentRightsDeclaration - case customerReviews - case endUserLicenseAgreement - case gameCenterDetail - case gameCenterEnabledVersions - case inAppPurchases - case inAppPurchasesV2 - case isOrEverWasMadeForKids - case name - case perfPowerMetrics - case preOrder - case preReleaseVersions - case pricePoints - case prices - case primaryLocale - case promotedPurchases - case reviewSubmissions - case sku - case subscriptionGracePeriod - case subscriptionGroups - case subscriptionStatusUrl - case subscriptionStatusUrlForSandbox - case subscriptionStatusUrlVersion - case subscriptionStatusUrlVersionForSandbox - case unknown(String) - - public var rawValue: String { - switch self { - case .appAvailability: return "appAvailability" - case .appClips: return "appClips" - case .appCustomProductPages: return "appCustomProductPages" - case .appEncryptionDeclarations: return "appEncryptionDeclarations" - case .appEvents: return "appEvents" - case .appInfos: return "appInfos" - case .appPricePoints: return "appPricePoints" - case .appPriceSchedule: return "appPriceSchedule" - case .appStoreVersionExperimentsV2: return "appStoreVersionExperimentsV2" - case .appStoreVersions: return "appStoreVersions" - case .availableInNewTerritories: return "availableInNewTerritories" - case .availableTerritories: return "availableTerritories" - case .betaAppLocalizations: return "betaAppLocalizations" - case .betaAppReviewDetail: return "betaAppReviewDetail" - case .betaGroups: return "betaGroups" - case .betaLicenseAgreement: return "betaLicenseAgreement" - case .betaTesters: return "betaTesters" - case .builds: return "builds" - case .bundleId: return "bundleId" - case .ciProduct: return "ciProduct" - case .contentRightsDeclaration: return "contentRightsDeclaration" - case .customerReviews: return "customerReviews" - case .endUserLicenseAgreement: return "endUserLicenseAgreement" - case .gameCenterDetail: return "gameCenterDetail" - case .gameCenterEnabledVersions: return "gameCenterEnabledVersions" - case .inAppPurchases: return "inAppPurchases" - case .inAppPurchasesV2: return "inAppPurchasesV2" - case .isOrEverWasMadeForKids: return "isOrEverWasMadeForKids" - case .name: return "name" - case .perfPowerMetrics: return "perfPowerMetrics" - case .preOrder: return "preOrder" - case .preReleaseVersions: return "preReleaseVersions" - case .pricePoints: return "pricePoints" - case .prices: return "prices" - case .primaryLocale: return "primaryLocale" - case .promotedPurchases: return "promotedPurchases" - case .reviewSubmissions: return "reviewSubmissions" - case .sku: return "sku" - case .subscriptionGracePeriod: return "subscriptionGracePeriod" - case .subscriptionGroups: return "subscriptionGroups" - case .subscriptionStatusUrl: return "subscriptionStatusUrl" - case .subscriptionStatusUrlForSandbox: return "subscriptionStatusUrlForSandbox" - case .subscriptionStatusUrlVersion: return "subscriptionStatusUrlVersion" - case .subscriptionStatusUrlVersionForSandbox: return "subscriptionStatusUrlVersionForSandbox" - case .unknown(let rawValue): return rawValue - } - } - - public init(rawValue: String) { - switch rawValue { - case "appAvailability": self = .appAvailability - case "appClips": self = .appClips - case "appCustomProductPages": self = .appCustomProductPages - case "appEncryptionDeclarations": self = .appEncryptionDeclarations - case "appEvents": self = .appEvents - case "appInfos": self = .appInfos - case "appPricePoints": self = .appPricePoints - case "appPriceSchedule": self = .appPriceSchedule - case "appStoreVersionExperimentsV2": self = .appStoreVersionExperimentsV2 - case "appStoreVersions": self = .appStoreVersions - case "availableInNewTerritories": self = .availableInNewTerritories - case "availableTerritories": self = .availableTerritories - case "betaAppLocalizations": self = .betaAppLocalizations - case "betaAppReviewDetail": self = .betaAppReviewDetail - case "betaGroups": self = .betaGroups - case "betaLicenseAgreement": self = .betaLicenseAgreement - case "betaTesters": self = .betaTesters - case "builds": self = .builds - case "bundleId": self = .bundleId - case "ciProduct": self = .ciProduct - case "contentRightsDeclaration": self = .contentRightsDeclaration - case "customerReviews": self = .customerReviews - case "endUserLicenseAgreement": self = .endUserLicenseAgreement - case "gameCenterDetail": self = .gameCenterDetail - case "gameCenterEnabledVersions": self = .gameCenterEnabledVersions - case "inAppPurchases": self = .inAppPurchases - case "inAppPurchasesV2": self = .inAppPurchasesV2 - case "isOrEverWasMadeForKids": self = .isOrEverWasMadeForKids - case "name": self = .name - case "perfPowerMetrics": self = .perfPowerMetrics - case "preOrder": self = .preOrder - case "preReleaseVersions": self = .preReleaseVersions - case "pricePoints": self = .pricePoints - case "prices": self = .prices - case "primaryLocale": self = .primaryLocale - case "promotedPurchases": self = .promotedPurchases - case "reviewSubmissions": self = .reviewSubmissions - case "sku": self = .sku - case "subscriptionGracePeriod": self = .subscriptionGracePeriod - case "subscriptionGroups": self = .subscriptionGroups - case "subscriptionStatusUrl": self = .subscriptionStatusUrl - case "subscriptionStatusUrlForSandbox": self = .subscriptionStatusUrlForSandbox - case "subscriptionStatusUrlVersion": self = .subscriptionStatusUrlVersion - case "subscriptionStatusUrlVersionForSandbox": self = .subscriptionStatusUrlVersionForSandbox - default: self = .unknown(rawValue) - } - } - } - - public enum Territories: Hashable, Codable, RawRepresentable { - case currency - case unknown(String) - - public var rawValue: String { - switch self { - case .currency: return "currency" - case .unknown(let rawValue): return rawValue - } - } - - public init(rawValue: String) { - switch rawValue { - case "currency": self = .currency - default: self = .unknown(rawValue) - } - } - } - - public struct Relation: Hashable { - /// the fields to include for returned resources of type appAvailabilities - public static var appAvailabilities: Relation<[AppAvailabilities]?> { - .init(key: "fields[appAvailabilities]") - } - - /// the fields to include for returned resources of type apps - public static var apps: Relation<[Apps]?> { - .init(key: "fields[apps]") - } - - /// the fields to include for returned resources of type territories - public static var territories: Relation<[Territories]?> { - .init(key: "fields[territories]") - } - - internal let key: String - - public func hash(into hasher: inout Hasher) { - hasher.combine(key) - } - } - } - - public enum Include: Hashable, Codable, RawRepresentable { - case app - case availableTerritories - case unknown(String) - - public var rawValue: String { - switch self { - case .app: return "app" - case .availableTerritories: return "availableTerritories" - case .unknown(let rawValue): return rawValue - } - } - - public init(rawValue: String) { - switch rawValue { - case "app": self = .app - case "availableTerritories": self = .availableTerritories - default: self = .unknown(rawValue) - } - } - } - - public struct Limit: Hashable { - public subscript (_ relation: Relation) -> T { - get { values[relation]?.base as! T } - set { values[relation] = AnyHashable(newValue) } - } - - private var values: [AnyHashable: AnyHashable] = [:] - - public struct Relation: Hashable { - /// maximum number of related availableTerritories returned (when they are included) - public static var availableTerritories: Relation { - .init(key: "limit[availableTerritories]") - } - - internal let key: String - - public func hash(into hasher: inout Hasher) { - hasher.combine(key) - } - } - } - } -} - -// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppAvailabilities/ById/AppAvailabilitiesById.GET.cdab385.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/AppAvailabilityV2/AppsByIdAppAvailabilityV2.GET.c915a14.generated.swift similarity index 55% rename from Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppAvailabilities/ById/AppAvailabilitiesById.GET.cdab385.generated.swift rename to Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/AppAvailabilityV2/AppsByIdAppAvailabilityV2.GET.c915a14.generated.swift index 1cdb7519..ba80ca92 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppAvailabilities/ById/AppAvailabilitiesById.GET.cdab385.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/AppAvailabilityV2/AppsByIdAppAvailabilityV2.GET.c915a14.generated.swift @@ -6,13 +6,12 @@ import Foundation import FoundationNetworking #endif -extension V1.AppAvailabilities.ById { - @available(*, deprecated) +extension V1.Apps.ById.AppAvailabilityV2 { public struct GET: Endpoint { - public typealias Response = AppAvailabilityResponse + public typealias Response = AppAvailabilityV2Response public var path: String { - "/v1/appAvailabilities/\(id)" + "/v1/apps/\(id)/appAvailabilityV2" } /// the id of the requested resource @@ -31,12 +30,12 @@ extension V1.AppAvailabilities.ById { components?.queryItems = [ URLQueryItem(name: "fields[appAvailabilities]", value: parameters.fields[.appAvailabilities]?.map { "\($0)" }.joined(separator: ",")), - URLQueryItem(name: "fields[territories]", - value: parameters.fields[.territories]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "fields[territoryAvailabilities]", + value: parameters.fields[.territoryAvailabilities]?.map { "\($0)" }.joined(separator: ",")), URLQueryItem(name: "include", value: parameters.include?.map { "\($0)" }.joined(separator: ",")), - URLQueryItem(name: "limit[availableTerritories]", - value: parameters.limit[.availableTerritories].map { "\($0)" }) + URLQueryItem(name: "limit[territoryAvailabilities]", + value: parameters.limit[.territoryAvailabilities].map { "\($0)" }) ].filter { $0.value != nil } if components?.queryItems?.isEmpty ?? false { components?.queryItems = nil @@ -47,10 +46,12 @@ extension V1.AppAvailabilities.ById { return urlRequest } - /// - Returns: **200**, Single AppAvailability as `AppAvailabilityResponse` + /// - Returns: **200**, Single AppAvailability as `AppAvailabilityV2Response` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -59,17 +60,23 @@ extension V1.AppAvailabilities.ById { switch urlResponse.statusCode { case 200: - return try jsonDecoder.decode(AppAvailabilityResponse.self, from: data) + return try jsonDecoder.decode(AppAvailabilityV2Response.self, from: data) case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 404: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -77,7 +84,7 @@ extension V1.AppAvailabilities.ById { } } -extension V1.AppAvailabilities.ById.GET { +extension V1.Apps.ById.AppAvailabilityV2.GET { public struct Parameters: Hashable { public var fields: Fields = Fields() @@ -94,47 +101,59 @@ extension V1.AppAvailabilities.ById.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum AppAvailabilities: Hashable, Codable, RawRepresentable { - case app - case availableInNewTerritories - case availableTerritories - case unknown(String) + public struct AppAvailabilities: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var availableInNewTerritories: Self { + .init(rawValue: "availableInNewTerritories") + } + + public static var territoryAvailabilities: Self { + .init(rawValue: "territoryAvailabilities") + } - public var rawValue: String { - switch self { - case .app: return "app" - case .availableInNewTerritories: return "availableInNewTerritories" - case .availableTerritories: return "availableTerritories" - case .unknown(let rawValue): return rawValue - } + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "app": self = .app - case "availableInNewTerritories": self = .availableInNewTerritories - case "availableTerritories": self = .availableTerritories - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum Territories: Hashable, Codable, RawRepresentable { - case currency - case unknown(String) + public struct TerritoryAvailabilities: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var available: Self { + .init(rawValue: "available") + } + + public static var contentStatuses: Self { + .init(rawValue: "contentStatuses") + } + + public static var preOrderEnabled: Self { + .init(rawValue: "preOrderEnabled") + } + + public static var preOrderPublishDate: Self { + .init(rawValue: "preOrderPublishDate") + } + + public static var releaseDate: Self { + .init(rawValue: "releaseDate") + } + + public static var territory: Self { + .init(rawValue: "territory") + } - public var rawValue: String { - switch self { - case .currency: return "currency" - case .unknown(let rawValue): return rawValue - } + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "currency": self = .currency - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } @@ -144,9 +163,9 @@ extension V1.AppAvailabilities.ById.GET { .init(key: "fields[appAvailabilities]") } - /// the fields to include for returned resources of type territories - public static var territories: Relation<[Territories]?> { - .init(key: "fields[territories]") + /// the fields to include for returned resources of type territoryAvailabilities + public static var territoryAvailabilities: Relation<[TerritoryAvailabilities]?> { + .init(key: "fields[territoryAvailabilities]") } internal let key: String @@ -157,25 +176,19 @@ extension V1.AppAvailabilities.ById.GET { } } - public enum Include: Hashable, Codable, RawRepresentable { - case app - case availableTerritories - case unknown(String) + public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var territoryAvailabilities: Self { + .init(rawValue: "territoryAvailabilities") + } - public var rawValue: String { - switch self { - case .app: return "app" - case .availableTerritories: return "availableTerritories" - case .unknown(let rawValue): return rawValue - } + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "app": self = .app - case "availableTerritories": self = .availableTerritories - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } @@ -188,9 +201,9 @@ extension V1.AppAvailabilities.ById.GET { private var values: [AnyHashable: AnyHashable] = [:] public struct Relation: Hashable { - /// maximum number of related availableTerritories returned (when they are included) - public static var availableTerritories: Relation { - .init(key: "limit[availableTerritories]") + /// maximum number of related territoryAvailabilities returned (when they are included) + public static var territoryAvailabilities: Relation { + .init(key: "limit[territoryAvailabilities]") } internal let key: String diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/AppClips/AppsByIdAppClips.GET.4f64412.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/AppClips/AppsByIdAppClips.GET.4f64412.generated.swift index cb25989d..90b36143 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/AppClips/AppsByIdAppClips.GET.4f64412.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/AppClips/AppsByIdAppClips.GET.4f64412.generated.swift @@ -54,8 +54,10 @@ extension V1.Apps.ById.AppClips { /// - Returns: **200**, List of AppClips as `AppClipsResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -69,12 +71,18 @@ extension V1.Apps.ById.AppClips { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 404: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -102,213 +110,275 @@ extension V1.Apps.ById.AppClips.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum AppClipDefaultExperiences: Hashable, Codable, RawRepresentable { - case action - case appClip - case appClipAppStoreReviewDetail - case appClipDefaultExperienceLocalizations - case appClipDefaultExperienceTemplate - case releaseWithAppStoreVersion - case unknown(String) - - public var rawValue: String { - switch self { - case .action: return "action" - case .appClip: return "appClip" - case .appClipAppStoreReviewDetail: return "appClipAppStoreReviewDetail" - case .appClipDefaultExperienceLocalizations: return "appClipDefaultExperienceLocalizations" - case .appClipDefaultExperienceTemplate: return "appClipDefaultExperienceTemplate" - case .releaseWithAppStoreVersion: return "releaseWithAppStoreVersion" - case .unknown(let rawValue): return rawValue - } + public struct AppClipDefaultExperiences: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var action: Self { + .init(rawValue: "action") } + public static var appClip: Self { + .init(rawValue: "appClip") + } + + public static var appClipAppStoreReviewDetail: Self { + .init(rawValue: "appClipAppStoreReviewDetail") + } + + public static var appClipDefaultExperienceLocalizations: Self { + .init(rawValue: "appClipDefaultExperienceLocalizations") + } + + public static var releaseWithAppStoreVersion: Self { + .init(rawValue: "releaseWithAppStoreVersion") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "action": self = .action - case "appClip": self = .appClip - case "appClipAppStoreReviewDetail": self = .appClipAppStoreReviewDetail - case "appClipDefaultExperienceLocalizations": self = .appClipDefaultExperienceLocalizations - case "appClipDefaultExperienceTemplate": self = .appClipDefaultExperienceTemplate - case "releaseWithAppStoreVersion": self = .releaseWithAppStoreVersion - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum AppClips: Hashable, Codable, RawRepresentable { - case app - case appClipAdvancedExperiences - case appClipDefaultExperiences - case bundleId - case unknown(String) + public struct AppClips: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var app: Self { + .init(rawValue: "app") + } - public var rawValue: String { - switch self { - case .app: return "app" - case .appClipAdvancedExperiences: return "appClipAdvancedExperiences" - case .appClipDefaultExperiences: return "appClipDefaultExperiences" - case .bundleId: return "bundleId" - case .unknown(let rawValue): return rawValue - } + public static var appClipAdvancedExperiences: Self { + .init(rawValue: "appClipAdvancedExperiences") } + public static var appClipDefaultExperiences: Self { + .init(rawValue: "appClipDefaultExperiences") + } + + public static var bundleId: Self { + .init(rawValue: "bundleId") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "app": self = .app - case "appClipAdvancedExperiences": self = .appClipAdvancedExperiences - case "appClipDefaultExperiences": self = .appClipDefaultExperiences - case "bundleId": self = .bundleId - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum Apps: Hashable, Codable, RawRepresentable { - case appAvailability - case appClips - case appCustomProductPages - case appEncryptionDeclarations - case appEvents - case appInfos - case appPricePoints - case appPriceSchedule - case appStoreVersionExperimentsV2 - case appStoreVersions - case availableInNewTerritories - case availableTerritories - case betaAppLocalizations - case betaAppReviewDetail - case betaGroups - case betaLicenseAgreement - case betaTesters - case builds - case bundleId - case ciProduct - case contentRightsDeclaration - case customerReviews - case endUserLicenseAgreement - case gameCenterDetail - case gameCenterEnabledVersions - case inAppPurchases - case inAppPurchasesV2 - case isOrEverWasMadeForKids - case name - case perfPowerMetrics - case preOrder - case preReleaseVersions - case pricePoints - case prices - case primaryLocale - case promotedPurchases - case reviewSubmissions - case sku - case subscriptionGracePeriod - case subscriptionGroups - case subscriptionStatusUrl - case subscriptionStatusUrlForSandbox - case subscriptionStatusUrlVersion - case subscriptionStatusUrlVersionForSandbox - case unknown(String) - - public var rawValue: String { - switch self { - case .appAvailability: return "appAvailability" - case .appClips: return "appClips" - case .appCustomProductPages: return "appCustomProductPages" - case .appEncryptionDeclarations: return "appEncryptionDeclarations" - case .appEvents: return "appEvents" - case .appInfos: return "appInfos" - case .appPricePoints: return "appPricePoints" - case .appPriceSchedule: return "appPriceSchedule" - case .appStoreVersionExperimentsV2: return "appStoreVersionExperimentsV2" - case .appStoreVersions: return "appStoreVersions" - case .availableInNewTerritories: return "availableInNewTerritories" - case .availableTerritories: return "availableTerritories" - case .betaAppLocalizations: return "betaAppLocalizations" - case .betaAppReviewDetail: return "betaAppReviewDetail" - case .betaGroups: return "betaGroups" - case .betaLicenseAgreement: return "betaLicenseAgreement" - case .betaTesters: return "betaTesters" - case .builds: return "builds" - case .bundleId: return "bundleId" - case .ciProduct: return "ciProduct" - case .contentRightsDeclaration: return "contentRightsDeclaration" - case .customerReviews: return "customerReviews" - case .endUserLicenseAgreement: return "endUserLicenseAgreement" - case .gameCenterDetail: return "gameCenterDetail" - case .gameCenterEnabledVersions: return "gameCenterEnabledVersions" - case .inAppPurchases: return "inAppPurchases" - case .inAppPurchasesV2: return "inAppPurchasesV2" - case .isOrEverWasMadeForKids: return "isOrEverWasMadeForKids" - case .name: return "name" - case .perfPowerMetrics: return "perfPowerMetrics" - case .preOrder: return "preOrder" - case .preReleaseVersions: return "preReleaseVersions" - case .pricePoints: return "pricePoints" - case .prices: return "prices" - case .primaryLocale: return "primaryLocale" - case .promotedPurchases: return "promotedPurchases" - case .reviewSubmissions: return "reviewSubmissions" - case .sku: return "sku" - case .subscriptionGracePeriod: return "subscriptionGracePeriod" - case .subscriptionGroups: return "subscriptionGroups" - case .subscriptionStatusUrl: return "subscriptionStatusUrl" - case .subscriptionStatusUrlForSandbox: return "subscriptionStatusUrlForSandbox" - case .subscriptionStatusUrlVersion: return "subscriptionStatusUrlVersion" - case .subscriptionStatusUrlVersionForSandbox: return "subscriptionStatusUrlVersionForSandbox" - case .unknown(let rawValue): return rawValue - } + public struct Apps: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var accessibilityDeclarations: Self { + .init(rawValue: "accessibilityDeclarations") + } + + public static var accessibilityUrl: Self { + .init(rawValue: "accessibilityUrl") + } + + public static var alternativeDistributionKey: Self { + .init(rawValue: "alternativeDistributionKey") + } + + public static var analyticsReportRequests: Self { + .init(rawValue: "analyticsReportRequests") + } + + public static var appAvailabilityV2: Self { + .init(rawValue: "appAvailabilityV2") + } + + public static var appClips: Self { + .init(rawValue: "appClips") + } + + public static var appCustomProductPages: Self { + .init(rawValue: "appCustomProductPages") + } + + public static var appEncryptionDeclarations: Self { + .init(rawValue: "appEncryptionDeclarations") + } + + public static var appEvents: Self { + .init(rawValue: "appEvents") + } + + public static var appInfos: Self { + .init(rawValue: "appInfos") + } + + public static var appPricePoints: Self { + .init(rawValue: "appPricePoints") + } + + public static var appPriceSchedule: Self { + .init(rawValue: "appPriceSchedule") + } + + public static var appStoreVersionExperimentsV2: Self { + .init(rawValue: "appStoreVersionExperimentsV2") + } + + public static var appStoreVersions: Self { + .init(rawValue: "appStoreVersions") + } + + public static var backgroundAssets: Self { + .init(rawValue: "backgroundAssets") + } + + public static var betaAppLocalizations: Self { + .init(rawValue: "betaAppLocalizations") + } + + public static var betaAppReviewDetail: Self { + .init(rawValue: "betaAppReviewDetail") + } + + public static var betaFeedbackCrashSubmissions: Self { + .init(rawValue: "betaFeedbackCrashSubmissions") + } + + public static var betaFeedbackScreenshotSubmissions: Self { + .init(rawValue: "betaFeedbackScreenshotSubmissions") + } + + public static var betaGroups: Self { + .init(rawValue: "betaGroups") + } + + public static var betaLicenseAgreement: Self { + .init(rawValue: "betaLicenseAgreement") + } + + public static var betaTesters: Self { + .init(rawValue: "betaTesters") } + public static var builds: Self { + .init(rawValue: "builds") + } + + public static var bundleId: Self { + .init(rawValue: "bundleId") + } + + public static var ciProduct: Self { + .init(rawValue: "ciProduct") + } + + public static var contentRightsDeclaration: Self { + .init(rawValue: "contentRightsDeclaration") + } + + public static var customerReviewSummarizations: Self { + .init(rawValue: "customerReviewSummarizations") + } + + public static var customerReviews: Self { + .init(rawValue: "customerReviews") + } + + public static var endUserLicenseAgreement: Self { + .init(rawValue: "endUserLicenseAgreement") + } + + public static var gameCenterDetail: Self { + .init(rawValue: "gameCenterDetail") + } + + public static var gameCenterEnabledVersions: Self { + .init(rawValue: "gameCenterEnabledVersions") + } + + public static var inAppPurchases: Self { + .init(rawValue: "inAppPurchases") + } + + public static var inAppPurchasesV2: Self { + .init(rawValue: "inAppPurchasesV2") + } + + public static var isOrEverWasMadeForKids: Self { + .init(rawValue: "isOrEverWasMadeForKids") + } + + public static var marketplaceSearchDetail: Self { + .init(rawValue: "marketplaceSearchDetail") + } + + public static var name: Self { + .init(rawValue: "name") + } + + public static var perfPowerMetrics: Self { + .init(rawValue: "perfPowerMetrics") + } + + public static var preReleaseVersions: Self { + .init(rawValue: "preReleaseVersions") + } + + public static var primaryLocale: Self { + .init(rawValue: "primaryLocale") + } + + public static var promotedPurchases: Self { + .init(rawValue: "promotedPurchases") + } + + public static var reviewSubmissions: Self { + .init(rawValue: "reviewSubmissions") + } + + public static var sku: Self { + .init(rawValue: "sku") + } + + public static var streamlinedPurchasingEnabled: Self { + .init(rawValue: "streamlinedPurchasingEnabled") + } + + public static var subscriptionGracePeriod: Self { + .init(rawValue: "subscriptionGracePeriod") + } + + public static var subscriptionGroups: Self { + .init(rawValue: "subscriptionGroups") + } + + public static var subscriptionStatusUrl: Self { + .init(rawValue: "subscriptionStatusUrl") + } + + public static var subscriptionStatusUrlForSandbox: Self { + .init(rawValue: "subscriptionStatusUrlForSandbox") + } + + public static var subscriptionStatusUrlVersion: Self { + .init(rawValue: "subscriptionStatusUrlVersion") + } + + public static var subscriptionStatusUrlVersionForSandbox: Self { + .init(rawValue: "subscriptionStatusUrlVersionForSandbox") + } + + public static var webhooks: Self { + .init(rawValue: "webhooks") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "appAvailability": self = .appAvailability - case "appClips": self = .appClips - case "appCustomProductPages": self = .appCustomProductPages - case "appEncryptionDeclarations": self = .appEncryptionDeclarations - case "appEvents": self = .appEvents - case "appInfos": self = .appInfos - case "appPricePoints": self = .appPricePoints - case "appPriceSchedule": self = .appPriceSchedule - case "appStoreVersionExperimentsV2": self = .appStoreVersionExperimentsV2 - case "appStoreVersions": self = .appStoreVersions - case "availableInNewTerritories": self = .availableInNewTerritories - case "availableTerritories": self = .availableTerritories - case "betaAppLocalizations": self = .betaAppLocalizations - case "betaAppReviewDetail": self = .betaAppReviewDetail - case "betaGroups": self = .betaGroups - case "betaLicenseAgreement": self = .betaLicenseAgreement - case "betaTesters": self = .betaTesters - case "builds": self = .builds - case "bundleId": self = .bundleId - case "ciProduct": self = .ciProduct - case "contentRightsDeclaration": self = .contentRightsDeclaration - case "customerReviews": self = .customerReviews - case "endUserLicenseAgreement": self = .endUserLicenseAgreement - case "gameCenterDetail": self = .gameCenterDetail - case "gameCenterEnabledVersions": self = .gameCenterEnabledVersions - case "inAppPurchases": self = .inAppPurchases - case "inAppPurchasesV2": self = .inAppPurchasesV2 - case "isOrEverWasMadeForKids": self = .isOrEverWasMadeForKids - case "name": self = .name - case "perfPowerMetrics": self = .perfPowerMetrics - case "preOrder": self = .preOrder - case "preReleaseVersions": self = .preReleaseVersions - case "pricePoints": self = .pricePoints - case "prices": self = .prices - case "primaryLocale": self = .primaryLocale - case "promotedPurchases": self = .promotedPurchases - case "reviewSubmissions": self = .reviewSubmissions - case "sku": self = .sku - case "subscriptionGracePeriod": self = .subscriptionGracePeriod - case "subscriptionGroups": self = .subscriptionGroups - case "subscriptionStatusUrl": self = .subscriptionStatusUrl - case "subscriptionStatusUrlForSandbox": self = .subscriptionStatusUrlForSandbox - case "subscriptionStatusUrlVersion": self = .subscriptionStatusUrlVersion - case "subscriptionStatusUrlVersionForSandbox": self = .subscriptionStatusUrlVersionForSandbox - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } @@ -358,25 +428,23 @@ extension V1.Apps.ById.AppClips.GET { } } - public enum Include: Hashable, Codable, RawRepresentable { - case app - case appClipDefaultExperiences - case unknown(String) + public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var app: Self { + .init(rawValue: "app") + } - public var rawValue: String { - switch self { - case .app: return "app" - case .appClipDefaultExperiences: return "appClipDefaultExperiences" - case .unknown(let rawValue): return rawValue - } + public static var appClipDefaultExperiences: Self { + .init(rawValue: "appClipDefaultExperiences") } + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "app": self = .app - case "appClipDefaultExperiences": self = .appClipDefaultExperiences - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/AppCustomProductPages/AppsByIdAppCustomProductPages.GET.e48b834.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/AppCustomProductPages/AppsByIdAppCustomProductPages.GET.e48b834.generated.swift index 4d544bc2..d24f984e 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/AppCustomProductPages/AppsByIdAppCustomProductPages.GET.e48b834.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/AppCustomProductPages/AppsByIdAppCustomProductPages.GET.e48b834.generated.swift @@ -54,8 +54,10 @@ extension V1.Apps.ById.AppCustomProductPages { /// - Returns: **200**, List of AppCustomProductPages as `AppCustomProductPagesResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -69,12 +71,18 @@ extension V1.Apps.ById.AppCustomProductPages { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 404: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -102,216 +110,279 @@ extension V1.Apps.ById.AppCustomProductPages.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum AppCustomProductPageVersions: Hashable, Codable, RawRepresentable { - case appCustomProductPage - case appCustomProductPageLocalizations - case state - case version - case unknown(String) + public struct AppCustomProductPageVersions: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var appCustomProductPage: Self { + .init(rawValue: "appCustomProductPage") + } + + public static var appCustomProductPageLocalizations: Self { + .init(rawValue: "appCustomProductPageLocalizations") + } + + public static var deepLink: Self { + .init(rawValue: "deepLink") + } - public var rawValue: String { - switch self { - case .appCustomProductPage: return "appCustomProductPage" - case .appCustomProductPageLocalizations: return "appCustomProductPageLocalizations" - case .state: return "state" - case .version: return "version" - case .unknown(let rawValue): return rawValue - } + public static var state: Self { + .init(rawValue: "state") } + public static var version: Self { + .init(rawValue: "version") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "appCustomProductPage": self = .appCustomProductPage - case "appCustomProductPageLocalizations": self = .appCustomProductPageLocalizations - case "state": self = .state - case "version": self = .version - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum AppCustomProductPages: Hashable, Codable, RawRepresentable { - case app - case appCustomProductPageVersions - case appStoreVersionTemplate - case customProductPageTemplate - case name - case url - case visible - case unknown(String) - - public var rawValue: String { - switch self { - case .app: return "app" - case .appCustomProductPageVersions: return "appCustomProductPageVersions" - case .appStoreVersionTemplate: return "appStoreVersionTemplate" - case .customProductPageTemplate: return "customProductPageTemplate" - case .name: return "name" - case .url: return "url" - case .visible: return "visible" - case .unknown(let rawValue): return rawValue - } + public struct AppCustomProductPages: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var app: Self { + .init(rawValue: "app") + } + + public static var appCustomProductPageVersions: Self { + .init(rawValue: "appCustomProductPageVersions") } + public static var name: Self { + .init(rawValue: "name") + } + + public static var url: Self { + .init(rawValue: "url") + } + + public static var visible: Self { + .init(rawValue: "visible") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "app": self = .app - case "appCustomProductPageVersions": self = .appCustomProductPageVersions - case "appStoreVersionTemplate": self = .appStoreVersionTemplate - case "customProductPageTemplate": self = .customProductPageTemplate - case "name": self = .name - case "url": self = .url - case "visible": self = .visible - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum Apps: Hashable, Codable, RawRepresentable { - case appAvailability - case appClips - case appCustomProductPages - case appEncryptionDeclarations - case appEvents - case appInfos - case appPricePoints - case appPriceSchedule - case appStoreVersionExperimentsV2 - case appStoreVersions - case availableInNewTerritories - case availableTerritories - case betaAppLocalizations - case betaAppReviewDetail - case betaGroups - case betaLicenseAgreement - case betaTesters - case builds - case bundleId - case ciProduct - case contentRightsDeclaration - case customerReviews - case endUserLicenseAgreement - case gameCenterDetail - case gameCenterEnabledVersions - case inAppPurchases - case inAppPurchasesV2 - case isOrEverWasMadeForKids - case name - case perfPowerMetrics - case preOrder - case preReleaseVersions - case pricePoints - case prices - case primaryLocale - case promotedPurchases - case reviewSubmissions - case sku - case subscriptionGracePeriod - case subscriptionGroups - case subscriptionStatusUrl - case subscriptionStatusUrlForSandbox - case subscriptionStatusUrlVersion - case subscriptionStatusUrlVersionForSandbox - case unknown(String) - - public var rawValue: String { - switch self { - case .appAvailability: return "appAvailability" - case .appClips: return "appClips" - case .appCustomProductPages: return "appCustomProductPages" - case .appEncryptionDeclarations: return "appEncryptionDeclarations" - case .appEvents: return "appEvents" - case .appInfos: return "appInfos" - case .appPricePoints: return "appPricePoints" - case .appPriceSchedule: return "appPriceSchedule" - case .appStoreVersionExperimentsV2: return "appStoreVersionExperimentsV2" - case .appStoreVersions: return "appStoreVersions" - case .availableInNewTerritories: return "availableInNewTerritories" - case .availableTerritories: return "availableTerritories" - case .betaAppLocalizations: return "betaAppLocalizations" - case .betaAppReviewDetail: return "betaAppReviewDetail" - case .betaGroups: return "betaGroups" - case .betaLicenseAgreement: return "betaLicenseAgreement" - case .betaTesters: return "betaTesters" - case .builds: return "builds" - case .bundleId: return "bundleId" - case .ciProduct: return "ciProduct" - case .contentRightsDeclaration: return "contentRightsDeclaration" - case .customerReviews: return "customerReviews" - case .endUserLicenseAgreement: return "endUserLicenseAgreement" - case .gameCenterDetail: return "gameCenterDetail" - case .gameCenterEnabledVersions: return "gameCenterEnabledVersions" - case .inAppPurchases: return "inAppPurchases" - case .inAppPurchasesV2: return "inAppPurchasesV2" - case .isOrEverWasMadeForKids: return "isOrEverWasMadeForKids" - case .name: return "name" - case .perfPowerMetrics: return "perfPowerMetrics" - case .preOrder: return "preOrder" - case .preReleaseVersions: return "preReleaseVersions" - case .pricePoints: return "pricePoints" - case .prices: return "prices" - case .primaryLocale: return "primaryLocale" - case .promotedPurchases: return "promotedPurchases" - case .reviewSubmissions: return "reviewSubmissions" - case .sku: return "sku" - case .subscriptionGracePeriod: return "subscriptionGracePeriod" - case .subscriptionGroups: return "subscriptionGroups" - case .subscriptionStatusUrl: return "subscriptionStatusUrl" - case .subscriptionStatusUrlForSandbox: return "subscriptionStatusUrlForSandbox" - case .subscriptionStatusUrlVersion: return "subscriptionStatusUrlVersion" - case .subscriptionStatusUrlVersionForSandbox: return "subscriptionStatusUrlVersionForSandbox" - case .unknown(let rawValue): return rawValue - } + public struct Apps: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var accessibilityDeclarations: Self { + .init(rawValue: "accessibilityDeclarations") + } + + public static var accessibilityUrl: Self { + .init(rawValue: "accessibilityUrl") + } + + public static var alternativeDistributionKey: Self { + .init(rawValue: "alternativeDistributionKey") + } + + public static var analyticsReportRequests: Self { + .init(rawValue: "analyticsReportRequests") + } + + public static var appAvailabilityV2: Self { + .init(rawValue: "appAvailabilityV2") + } + + public static var appClips: Self { + .init(rawValue: "appClips") + } + + public static var appCustomProductPages: Self { + .init(rawValue: "appCustomProductPages") + } + + public static var appEncryptionDeclarations: Self { + .init(rawValue: "appEncryptionDeclarations") + } + + public static var appEvents: Self { + .init(rawValue: "appEvents") + } + + public static var appInfos: Self { + .init(rawValue: "appInfos") + } + + public static var appPricePoints: Self { + .init(rawValue: "appPricePoints") + } + + public static var appPriceSchedule: Self { + .init(rawValue: "appPriceSchedule") + } + + public static var appStoreVersionExperimentsV2: Self { + .init(rawValue: "appStoreVersionExperimentsV2") + } + + public static var appStoreVersions: Self { + .init(rawValue: "appStoreVersions") + } + + public static var backgroundAssets: Self { + .init(rawValue: "backgroundAssets") + } + + public static var betaAppLocalizations: Self { + .init(rawValue: "betaAppLocalizations") + } + + public static var betaAppReviewDetail: Self { + .init(rawValue: "betaAppReviewDetail") + } + + public static var betaFeedbackCrashSubmissions: Self { + .init(rawValue: "betaFeedbackCrashSubmissions") + } + + public static var betaFeedbackScreenshotSubmissions: Self { + .init(rawValue: "betaFeedbackScreenshotSubmissions") + } + + public static var betaGroups: Self { + .init(rawValue: "betaGroups") + } + + public static var betaLicenseAgreement: Self { + .init(rawValue: "betaLicenseAgreement") + } + + public static var betaTesters: Self { + .init(rawValue: "betaTesters") + } + + public static var builds: Self { + .init(rawValue: "builds") + } + + public static var bundleId: Self { + .init(rawValue: "bundleId") + } + + public static var ciProduct: Self { + .init(rawValue: "ciProduct") + } + + public static var contentRightsDeclaration: Self { + .init(rawValue: "contentRightsDeclaration") + } + + public static var customerReviewSummarizations: Self { + .init(rawValue: "customerReviewSummarizations") + } + + public static var customerReviews: Self { + .init(rawValue: "customerReviews") + } + + public static var endUserLicenseAgreement: Self { + .init(rawValue: "endUserLicenseAgreement") + } + + public static var gameCenterDetail: Self { + .init(rawValue: "gameCenterDetail") + } + + public static var gameCenterEnabledVersions: Self { + .init(rawValue: "gameCenterEnabledVersions") + } + + public static var inAppPurchases: Self { + .init(rawValue: "inAppPurchases") + } + + public static var inAppPurchasesV2: Self { + .init(rawValue: "inAppPurchasesV2") + } + + public static var isOrEverWasMadeForKids: Self { + .init(rawValue: "isOrEverWasMadeForKids") + } + + public static var marketplaceSearchDetail: Self { + .init(rawValue: "marketplaceSearchDetail") + } + + public static var name: Self { + .init(rawValue: "name") + } + + public static var perfPowerMetrics: Self { + .init(rawValue: "perfPowerMetrics") + } + + public static var preReleaseVersions: Self { + .init(rawValue: "preReleaseVersions") } + public static var primaryLocale: Self { + .init(rawValue: "primaryLocale") + } + + public static var promotedPurchases: Self { + .init(rawValue: "promotedPurchases") + } + + public static var reviewSubmissions: Self { + .init(rawValue: "reviewSubmissions") + } + + public static var sku: Self { + .init(rawValue: "sku") + } + + public static var streamlinedPurchasingEnabled: Self { + .init(rawValue: "streamlinedPurchasingEnabled") + } + + public static var subscriptionGracePeriod: Self { + .init(rawValue: "subscriptionGracePeriod") + } + + public static var subscriptionGroups: Self { + .init(rawValue: "subscriptionGroups") + } + + public static var subscriptionStatusUrl: Self { + .init(rawValue: "subscriptionStatusUrl") + } + + public static var subscriptionStatusUrlForSandbox: Self { + .init(rawValue: "subscriptionStatusUrlForSandbox") + } + + public static var subscriptionStatusUrlVersion: Self { + .init(rawValue: "subscriptionStatusUrlVersion") + } + + public static var subscriptionStatusUrlVersionForSandbox: Self { + .init(rawValue: "subscriptionStatusUrlVersionForSandbox") + } + + public static var webhooks: Self { + .init(rawValue: "webhooks") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "appAvailability": self = .appAvailability - case "appClips": self = .appClips - case "appCustomProductPages": self = .appCustomProductPages - case "appEncryptionDeclarations": self = .appEncryptionDeclarations - case "appEvents": self = .appEvents - case "appInfos": self = .appInfos - case "appPricePoints": self = .appPricePoints - case "appPriceSchedule": self = .appPriceSchedule - case "appStoreVersionExperimentsV2": self = .appStoreVersionExperimentsV2 - case "appStoreVersions": self = .appStoreVersions - case "availableInNewTerritories": self = .availableInNewTerritories - case "availableTerritories": self = .availableTerritories - case "betaAppLocalizations": self = .betaAppLocalizations - case "betaAppReviewDetail": self = .betaAppReviewDetail - case "betaGroups": self = .betaGroups - case "betaLicenseAgreement": self = .betaLicenseAgreement - case "betaTesters": self = .betaTesters - case "builds": self = .builds - case "bundleId": self = .bundleId - case "ciProduct": self = .ciProduct - case "contentRightsDeclaration": self = .contentRightsDeclaration - case "customerReviews": self = .customerReviews - case "endUserLicenseAgreement": self = .endUserLicenseAgreement - case "gameCenterDetail": self = .gameCenterDetail - case "gameCenterEnabledVersions": self = .gameCenterEnabledVersions - case "inAppPurchases": self = .inAppPurchases - case "inAppPurchasesV2": self = .inAppPurchasesV2 - case "isOrEverWasMadeForKids": self = .isOrEverWasMadeForKids - case "name": self = .name - case "perfPowerMetrics": self = .perfPowerMetrics - case "preOrder": self = .preOrder - case "preReleaseVersions": self = .preReleaseVersions - case "pricePoints": self = .pricePoints - case "prices": self = .prices - case "primaryLocale": self = .primaryLocale - case "promotedPurchases": self = .promotedPurchases - case "reviewSubmissions": self = .reviewSubmissions - case "sku": self = .sku - case "subscriptionGracePeriod": self = .subscriptionGracePeriod - case "subscriptionGroups": self = .subscriptionGroups - case "subscriptionStatusUrl": self = .subscriptionStatusUrl - case "subscriptionStatusUrlForSandbox": self = .subscriptionStatusUrlForSandbox - case "subscriptionStatusUrlVersion": self = .subscriptionStatusUrlVersion - case "subscriptionStatusUrlVersionForSandbox": self = .subscriptionStatusUrlVersionForSandbox - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } @@ -361,25 +432,23 @@ extension V1.Apps.ById.AppCustomProductPages.GET { } } - public enum Include: Hashable, Codable, RawRepresentable { - case app - case appCustomProductPageVersions - case unknown(String) + public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var app: Self { + .init(rawValue: "app") + } - public var rawValue: String { - switch self { - case .app: return "app" - case .appCustomProductPageVersions: return "appCustomProductPageVersions" - case .unknown(let rawValue): return rawValue - } + public static var appCustomProductPageVersions: Self { + .init(rawValue: "appCustomProductPageVersions") } + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "app": self = .app - case "appCustomProductPageVersions": self = .appCustomProductPageVersions - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/AppEncryptionDeclarations/AppsByIdAppEncryptionDeclarations.GET.f75eb3f.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/AppEncryptionDeclarations/AppsByIdAppEncryptionDeclarations.GET.f75eb3f.generated.swift index cb68144f..d0eb5c12 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/AppEncryptionDeclarations/AppsByIdAppEncryptionDeclarations.GET.f75eb3f.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/AppEncryptionDeclarations/AppsByIdAppEncryptionDeclarations.GET.f75eb3f.generated.swift @@ -58,8 +58,10 @@ extension V1.Apps.ById.AppEncryptionDeclarations { /// - Returns: **200**, List of AppEncryptionDeclarations as `AppEncryptionDeclarationsResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -73,12 +75,18 @@ extension V1.Apps.ById.AppEncryptionDeclarations { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 404: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -106,349 +114,447 @@ extension V1.Apps.ById.AppEncryptionDeclarations.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum AppEncryptionDeclarationDocuments: Hashable, Codable, RawRepresentable { - case appEncryptionDeclaration - case assetDeliveryState - case assetToken - case downloadUrl - case fileName - case fileSize - case sourceFileChecksum - case uploadOperations - case uploaded - case unknown(String) - - public var rawValue: String { - switch self { - case .appEncryptionDeclaration: return "appEncryptionDeclaration" - case .assetDeliveryState: return "assetDeliveryState" - case .assetToken: return "assetToken" - case .downloadUrl: return "downloadUrl" - case .fileName: return "fileName" - case .fileSize: return "fileSize" - case .sourceFileChecksum: return "sourceFileChecksum" - case .uploadOperations: return "uploadOperations" - case .uploaded: return "uploaded" - case .unknown(let rawValue): return rawValue - } + public struct AppEncryptionDeclarationDocuments: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var assetDeliveryState: Self { + .init(rawValue: "assetDeliveryState") + } + + public static var assetToken: Self { + .init(rawValue: "assetToken") + } + + public static var downloadUrl: Self { + .init(rawValue: "downloadUrl") + } + + public static var fileName: Self { + .init(rawValue: "fileName") + } + + public static var fileSize: Self { + .init(rawValue: "fileSize") + } + + public static var sourceFileChecksum: Self { + .init(rawValue: "sourceFileChecksum") } + public static var uploadOperations: Self { + .init(rawValue: "uploadOperations") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "appEncryptionDeclaration": self = .appEncryptionDeclaration - case "assetDeliveryState": self = .assetDeliveryState - case "assetToken": self = .assetToken - case "downloadUrl": self = .downloadUrl - case "fileName": self = .fileName - case "fileSize": self = .fileSize - case "sourceFileChecksum": self = .sourceFileChecksum - case "uploadOperations": self = .uploadOperations - case "uploaded": self = .uploaded - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum AppEncryptionDeclarations: Hashable, Codable, RawRepresentable { - case app - case appDescription - case appEncryptionDeclarationDocument - case appEncryptionDeclarationState - case availableOnFrenchStore - case builds - case codeValue - case containsProprietaryCryptography - case containsThirdPartyCryptography - case createdDate - case documentName - case documentType - case documentUrl - case exempt - case platform - case uploadedDate - case usesEncryption - case unknown(String) - - public var rawValue: String { - switch self { - case .app: return "app" - case .appDescription: return "appDescription" - case .appEncryptionDeclarationDocument: return "appEncryptionDeclarationDocument" - case .appEncryptionDeclarationState: return "appEncryptionDeclarationState" - case .availableOnFrenchStore: return "availableOnFrenchStore" - case .builds: return "builds" - case .codeValue: return "codeValue" - case .containsProprietaryCryptography: return "containsProprietaryCryptography" - case .containsThirdPartyCryptography: return "containsThirdPartyCryptography" - case .createdDate: return "createdDate" - case .documentName: return "documentName" - case .documentType: return "documentType" - case .documentUrl: return "documentUrl" - case .exempt: return "exempt" - case .platform: return "platform" - case .uploadedDate: return "uploadedDate" - case .usesEncryption: return "usesEncryption" - case .unknown(let rawValue): return rawValue - } + public struct AppEncryptionDeclarations: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var app: Self { + .init(rawValue: "app") + } + + public static var appDescription: Self { + .init(rawValue: "appDescription") + } + + public static var appEncryptionDeclarationDocument: Self { + .init(rawValue: "appEncryptionDeclarationDocument") + } + + public static var appEncryptionDeclarationState: Self { + .init(rawValue: "appEncryptionDeclarationState") + } + + public static var availableOnFrenchStore: Self { + .init(rawValue: "availableOnFrenchStore") + } + + public static var builds: Self { + .init(rawValue: "builds") + } + + public static var codeValue: Self { + .init(rawValue: "codeValue") + } + + public static var containsProprietaryCryptography: Self { + .init(rawValue: "containsProprietaryCryptography") + } + + public static var containsThirdPartyCryptography: Self { + .init(rawValue: "containsThirdPartyCryptography") + } + + public static var createdDate: Self { + .init(rawValue: "createdDate") + } + + public static var documentName: Self { + .init(rawValue: "documentName") + } + + public static var documentType: Self { + .init(rawValue: "documentType") + } + + public static var documentUrl: Self { + .init(rawValue: "documentUrl") + } + + public static var exempt: Self { + .init(rawValue: "exempt") + } + + public static var platform: Self { + .init(rawValue: "platform") + } + + public static var uploadedDate: Self { + .init(rawValue: "uploadedDate") } + public static var usesEncryption: Self { + .init(rawValue: "usesEncryption") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "app": self = .app - case "appDescription": self = .appDescription - case "appEncryptionDeclarationDocument": self = .appEncryptionDeclarationDocument - case "appEncryptionDeclarationState": self = .appEncryptionDeclarationState - case "availableOnFrenchStore": self = .availableOnFrenchStore - case "builds": self = .builds - case "codeValue": self = .codeValue - case "containsProprietaryCryptography": self = .containsProprietaryCryptography - case "containsThirdPartyCryptography": self = .containsThirdPartyCryptography - case "createdDate": self = .createdDate - case "documentName": self = .documentName - case "documentType": self = .documentType - case "documentUrl": self = .documentUrl - case "exempt": self = .exempt - case "platform": self = .platform - case "uploadedDate": self = .uploadedDate - case "usesEncryption": self = .usesEncryption - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum Apps: Hashable, Codable, RawRepresentable { - case appAvailability - case appClips - case appCustomProductPages - case appEncryptionDeclarations - case appEvents - case appInfos - case appPricePoints - case appPriceSchedule - case appStoreVersionExperimentsV2 - case appStoreVersions - case availableInNewTerritories - case availableTerritories - case betaAppLocalizations - case betaAppReviewDetail - case betaGroups - case betaLicenseAgreement - case betaTesters - case builds - case bundleId - case ciProduct - case contentRightsDeclaration - case customerReviews - case endUserLicenseAgreement - case gameCenterDetail - case gameCenterEnabledVersions - case inAppPurchases - case inAppPurchasesV2 - case isOrEverWasMadeForKids - case name - case perfPowerMetrics - case preOrder - case preReleaseVersions - case pricePoints - case prices - case primaryLocale - case promotedPurchases - case reviewSubmissions - case sku - case subscriptionGracePeriod - case subscriptionGroups - case subscriptionStatusUrl - case subscriptionStatusUrlForSandbox - case subscriptionStatusUrlVersion - case subscriptionStatusUrlVersionForSandbox - case unknown(String) - - public var rawValue: String { - switch self { - case .appAvailability: return "appAvailability" - case .appClips: return "appClips" - case .appCustomProductPages: return "appCustomProductPages" - case .appEncryptionDeclarations: return "appEncryptionDeclarations" - case .appEvents: return "appEvents" - case .appInfos: return "appInfos" - case .appPricePoints: return "appPricePoints" - case .appPriceSchedule: return "appPriceSchedule" - case .appStoreVersionExperimentsV2: return "appStoreVersionExperimentsV2" - case .appStoreVersions: return "appStoreVersions" - case .availableInNewTerritories: return "availableInNewTerritories" - case .availableTerritories: return "availableTerritories" - case .betaAppLocalizations: return "betaAppLocalizations" - case .betaAppReviewDetail: return "betaAppReviewDetail" - case .betaGroups: return "betaGroups" - case .betaLicenseAgreement: return "betaLicenseAgreement" - case .betaTesters: return "betaTesters" - case .builds: return "builds" - case .bundleId: return "bundleId" - case .ciProduct: return "ciProduct" - case .contentRightsDeclaration: return "contentRightsDeclaration" - case .customerReviews: return "customerReviews" - case .endUserLicenseAgreement: return "endUserLicenseAgreement" - case .gameCenterDetail: return "gameCenterDetail" - case .gameCenterEnabledVersions: return "gameCenterEnabledVersions" - case .inAppPurchases: return "inAppPurchases" - case .inAppPurchasesV2: return "inAppPurchasesV2" - case .isOrEverWasMadeForKids: return "isOrEverWasMadeForKids" - case .name: return "name" - case .perfPowerMetrics: return "perfPowerMetrics" - case .preOrder: return "preOrder" - case .preReleaseVersions: return "preReleaseVersions" - case .pricePoints: return "pricePoints" - case .prices: return "prices" - case .primaryLocale: return "primaryLocale" - case .promotedPurchases: return "promotedPurchases" - case .reviewSubmissions: return "reviewSubmissions" - case .sku: return "sku" - case .subscriptionGracePeriod: return "subscriptionGracePeriod" - case .subscriptionGroups: return "subscriptionGroups" - case .subscriptionStatusUrl: return "subscriptionStatusUrl" - case .subscriptionStatusUrlForSandbox: return "subscriptionStatusUrlForSandbox" - case .subscriptionStatusUrlVersion: return "subscriptionStatusUrlVersion" - case .subscriptionStatusUrlVersionForSandbox: return "subscriptionStatusUrlVersionForSandbox" - case .unknown(let rawValue): return rawValue - } + public struct Apps: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var accessibilityDeclarations: Self { + .init(rawValue: "accessibilityDeclarations") + } + + public static var accessibilityUrl: Self { + .init(rawValue: "accessibilityUrl") + } + + public static var alternativeDistributionKey: Self { + .init(rawValue: "alternativeDistributionKey") + } + + public static var analyticsReportRequests: Self { + .init(rawValue: "analyticsReportRequests") + } + + public static var appAvailabilityV2: Self { + .init(rawValue: "appAvailabilityV2") + } + + public static var appClips: Self { + .init(rawValue: "appClips") + } + + public static var appCustomProductPages: Self { + .init(rawValue: "appCustomProductPages") + } + + public static var appEncryptionDeclarations: Self { + .init(rawValue: "appEncryptionDeclarations") + } + + public static var appEvents: Self { + .init(rawValue: "appEvents") + } + + public static var appInfos: Self { + .init(rawValue: "appInfos") + } + + public static var appPricePoints: Self { + .init(rawValue: "appPricePoints") + } + + public static var appPriceSchedule: Self { + .init(rawValue: "appPriceSchedule") + } + + public static var appStoreVersionExperimentsV2: Self { + .init(rawValue: "appStoreVersionExperimentsV2") + } + + public static var appStoreVersions: Self { + .init(rawValue: "appStoreVersions") + } + + public static var backgroundAssets: Self { + .init(rawValue: "backgroundAssets") + } + + public static var betaAppLocalizations: Self { + .init(rawValue: "betaAppLocalizations") + } + + public static var betaAppReviewDetail: Self { + .init(rawValue: "betaAppReviewDetail") + } + + public static var betaFeedbackCrashSubmissions: Self { + .init(rawValue: "betaFeedbackCrashSubmissions") + } + + public static var betaFeedbackScreenshotSubmissions: Self { + .init(rawValue: "betaFeedbackScreenshotSubmissions") + } + + public static var betaGroups: Self { + .init(rawValue: "betaGroups") + } + + public static var betaLicenseAgreement: Self { + .init(rawValue: "betaLicenseAgreement") + } + + public static var betaTesters: Self { + .init(rawValue: "betaTesters") + } + + public static var builds: Self { + .init(rawValue: "builds") + } + + public static var bundleId: Self { + .init(rawValue: "bundleId") + } + + public static var ciProduct: Self { + .init(rawValue: "ciProduct") + } + + public static var contentRightsDeclaration: Self { + .init(rawValue: "contentRightsDeclaration") + } + + public static var customerReviewSummarizations: Self { + .init(rawValue: "customerReviewSummarizations") + } + + public static var customerReviews: Self { + .init(rawValue: "customerReviews") + } + + public static var endUserLicenseAgreement: Self { + .init(rawValue: "endUserLicenseAgreement") + } + + public static var gameCenterDetail: Self { + .init(rawValue: "gameCenterDetail") + } + + public static var gameCenterEnabledVersions: Self { + .init(rawValue: "gameCenterEnabledVersions") + } + + public static var inAppPurchases: Self { + .init(rawValue: "inAppPurchases") + } + + public static var inAppPurchasesV2: Self { + .init(rawValue: "inAppPurchasesV2") + } + + public static var isOrEverWasMadeForKids: Self { + .init(rawValue: "isOrEverWasMadeForKids") + } + + public static var marketplaceSearchDetail: Self { + .init(rawValue: "marketplaceSearchDetail") + } + + public static var name: Self { + .init(rawValue: "name") + } + + public static var perfPowerMetrics: Self { + .init(rawValue: "perfPowerMetrics") + } + + public static var preReleaseVersions: Self { + .init(rawValue: "preReleaseVersions") + } + + public static var primaryLocale: Self { + .init(rawValue: "primaryLocale") + } + + public static var promotedPurchases: Self { + .init(rawValue: "promotedPurchases") + } + + public static var reviewSubmissions: Self { + .init(rawValue: "reviewSubmissions") + } + + public static var sku: Self { + .init(rawValue: "sku") + } + + public static var streamlinedPurchasingEnabled: Self { + .init(rawValue: "streamlinedPurchasingEnabled") + } + + public static var subscriptionGracePeriod: Self { + .init(rawValue: "subscriptionGracePeriod") + } + + public static var subscriptionGroups: Self { + .init(rawValue: "subscriptionGroups") + } + + public static var subscriptionStatusUrl: Self { + .init(rawValue: "subscriptionStatusUrl") + } + + public static var subscriptionStatusUrlForSandbox: Self { + .init(rawValue: "subscriptionStatusUrlForSandbox") + } + + public static var subscriptionStatusUrlVersion: Self { + .init(rawValue: "subscriptionStatusUrlVersion") + } + + public static var subscriptionStatusUrlVersionForSandbox: Self { + .init(rawValue: "subscriptionStatusUrlVersionForSandbox") + } + + public static var webhooks: Self { + .init(rawValue: "webhooks") + } + + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "appAvailability": self = .appAvailability - case "appClips": self = .appClips - case "appCustomProductPages": self = .appCustomProductPages - case "appEncryptionDeclarations": self = .appEncryptionDeclarations - case "appEvents": self = .appEvents - case "appInfos": self = .appInfos - case "appPricePoints": self = .appPricePoints - case "appPriceSchedule": self = .appPriceSchedule - case "appStoreVersionExperimentsV2": self = .appStoreVersionExperimentsV2 - case "appStoreVersions": self = .appStoreVersions - case "availableInNewTerritories": self = .availableInNewTerritories - case "availableTerritories": self = .availableTerritories - case "betaAppLocalizations": self = .betaAppLocalizations - case "betaAppReviewDetail": self = .betaAppReviewDetail - case "betaGroups": self = .betaGroups - case "betaLicenseAgreement": self = .betaLicenseAgreement - case "betaTesters": self = .betaTesters - case "builds": self = .builds - case "bundleId": self = .bundleId - case "ciProduct": self = .ciProduct - case "contentRightsDeclaration": self = .contentRightsDeclaration - case "customerReviews": self = .customerReviews - case "endUserLicenseAgreement": self = .endUserLicenseAgreement - case "gameCenterDetail": self = .gameCenterDetail - case "gameCenterEnabledVersions": self = .gameCenterEnabledVersions - case "inAppPurchases": self = .inAppPurchases - case "inAppPurchasesV2": self = .inAppPurchasesV2 - case "isOrEverWasMadeForKids": self = .isOrEverWasMadeForKids - case "name": self = .name - case "perfPowerMetrics": self = .perfPowerMetrics - case "preOrder": self = .preOrder - case "preReleaseVersions": self = .preReleaseVersions - case "pricePoints": self = .pricePoints - case "prices": self = .prices - case "primaryLocale": self = .primaryLocale - case "promotedPurchases": self = .promotedPurchases - case "reviewSubmissions": self = .reviewSubmissions - case "sku": self = .sku - case "subscriptionGracePeriod": self = .subscriptionGracePeriod - case "subscriptionGroups": self = .subscriptionGroups - case "subscriptionStatusUrl": self = .subscriptionStatusUrl - case "subscriptionStatusUrlForSandbox": self = .subscriptionStatusUrlForSandbox - case "subscriptionStatusUrlVersion": self = .subscriptionStatusUrlVersion - case "subscriptionStatusUrlVersionForSandbox": self = .subscriptionStatusUrlVersionForSandbox - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum Builds: Hashable, Codable, RawRepresentable { - case app - case appEncryptionDeclaration - case appStoreVersion - case betaAppReviewSubmission - case betaBuildLocalizations - case betaGroups - case buildAudienceType - case buildBetaDetail - case buildBundles - case computedMinMacOsVersion - case diagnosticSignatures - case expirationDate - case expired - case iconAssetToken - case icons - case individualTesters - case lsMinimumSystemVersion - case minOsVersion - case perfPowerMetrics - case preReleaseVersion - case processingState - case uploadedDate - case usesNonExemptEncryption - case version - case unknown(String) - - public var rawValue: String { - switch self { - case .app: return "app" - case .appEncryptionDeclaration: return "appEncryptionDeclaration" - case .appStoreVersion: return "appStoreVersion" - case .betaAppReviewSubmission: return "betaAppReviewSubmission" - case .betaBuildLocalizations: return "betaBuildLocalizations" - case .betaGroups: return "betaGroups" - case .buildAudienceType: return "buildAudienceType" - case .buildBetaDetail: return "buildBetaDetail" - case .buildBundles: return "buildBundles" - case .computedMinMacOsVersion: return "computedMinMacOsVersion" - case .diagnosticSignatures: return "diagnosticSignatures" - case .expirationDate: return "expirationDate" - case .expired: return "expired" - case .iconAssetToken: return "iconAssetToken" - case .icons: return "icons" - case .individualTesters: return "individualTesters" - case .lsMinimumSystemVersion: return "lsMinimumSystemVersion" - case .minOsVersion: return "minOsVersion" - case .perfPowerMetrics: return "perfPowerMetrics" - case .preReleaseVersion: return "preReleaseVersion" - case .processingState: return "processingState" - case .uploadedDate: return "uploadedDate" - case .usesNonExemptEncryption: return "usesNonExemptEncryption" - case .version: return "version" - case .unknown(let rawValue): return rawValue - } + public struct Builds: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var app: Self { + .init(rawValue: "app") + } + + public static var appEncryptionDeclaration: Self { + .init(rawValue: "appEncryptionDeclaration") + } + + public static var appStoreVersion: Self { + .init(rawValue: "appStoreVersion") + } + + public static var betaAppReviewSubmission: Self { + .init(rawValue: "betaAppReviewSubmission") + } + + public static var betaBuildLocalizations: Self { + .init(rawValue: "betaBuildLocalizations") + } + + public static var betaGroups: Self { + .init(rawValue: "betaGroups") + } + + public static var buildAudienceType: Self { + .init(rawValue: "buildAudienceType") } + public static var buildBetaDetail: Self { + .init(rawValue: "buildBetaDetail") + } + + public static var buildBundles: Self { + .init(rawValue: "buildBundles") + } + + public static var computedMinMacOsVersion: Self { + .init(rawValue: "computedMinMacOsVersion") + } + + public static var computedMinVisionOsVersion: Self { + .init(rawValue: "computedMinVisionOsVersion") + } + + public static var diagnosticSignatures: Self { + .init(rawValue: "diagnosticSignatures") + } + + public static var expirationDate: Self { + .init(rawValue: "expirationDate") + } + + public static var expired: Self { + .init(rawValue: "expired") + } + + public static var iconAssetToken: Self { + .init(rawValue: "iconAssetToken") + } + + public static var icons: Self { + .init(rawValue: "icons") + } + + public static var individualTesters: Self { + .init(rawValue: "individualTesters") + } + + public static var lsMinimumSystemVersion: Self { + .init(rawValue: "lsMinimumSystemVersion") + } + + public static var minOsVersion: Self { + .init(rawValue: "minOsVersion") + } + + public static var perfPowerMetrics: Self { + .init(rawValue: "perfPowerMetrics") + } + + public static var preReleaseVersion: Self { + .init(rawValue: "preReleaseVersion") + } + + public static var processingState: Self { + .init(rawValue: "processingState") + } + + public static var uploadedDate: Self { + .init(rawValue: "uploadedDate") + } + + public static var usesNonExemptEncryption: Self { + .init(rawValue: "usesNonExemptEncryption") + } + + public static var version: Self { + .init(rawValue: "version") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "app": self = .app - case "appEncryptionDeclaration": self = .appEncryptionDeclaration - case "appStoreVersion": self = .appStoreVersion - case "betaAppReviewSubmission": self = .betaAppReviewSubmission - case "betaBuildLocalizations": self = .betaBuildLocalizations - case "betaGroups": self = .betaGroups - case "buildAudienceType": self = .buildAudienceType - case "buildBetaDetail": self = .buildBetaDetail - case "buildBundles": self = .buildBundles - case "computedMinMacOsVersion": self = .computedMinMacOsVersion - case "diagnosticSignatures": self = .diagnosticSignatures - case "expirationDate": self = .expirationDate - case "expired": self = .expired - case "iconAssetToken": self = .iconAssetToken - case "icons": self = .icons - case "individualTesters": self = .individualTesters - case "lsMinimumSystemVersion": self = .lsMinimumSystemVersion - case "minOsVersion": self = .minOsVersion - case "perfPowerMetrics": self = .perfPowerMetrics - case "preReleaseVersion": self = .preReleaseVersion - case "processingState": self = .processingState - case "uploadedDate": self = .uploadedDate - case "usesNonExemptEncryption": self = .usesNonExemptEncryption - case "version": self = .version - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } @@ -489,28 +595,31 @@ extension V1.Apps.ById.AppEncryptionDeclarations.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum Platform: Hashable, Codable, RawRepresentable { - case iOS - case macOS - case tvOS - case unknown(String) + public struct Platform: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var iOS: Self { + .init(rawValue: "IOS") + } + + public static var macOS: Self { + .init(rawValue: "MAC_OS") + } - public var rawValue: String { - switch self { - case .iOS: return "IOS" - case .macOS: return "MAC_OS" - case .tvOS: return "TV_OS" - case .unknown(let rawValue): return rawValue - } + public static var tvOS: Self { + .init(rawValue: "TV_OS") } + public static var visionOS: Self { + .init(rawValue: "VISION_OS") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "IOS": self = .iOS - case "MAC_OS": self = .macOS - case "TV_OS": self = .tvOS - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } @@ -533,28 +642,27 @@ extension V1.Apps.ById.AppEncryptionDeclarations.GET { } } - public enum Include: Hashable, Codable, RawRepresentable { - case app - case appEncryptionDeclarationDocument - case builds - case unknown(String) + public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var app: Self { + .init(rawValue: "app") + } - public var rawValue: String { - switch self { - case .app: return "app" - case .appEncryptionDeclarationDocument: return "appEncryptionDeclarationDocument" - case .builds: return "builds" - case .unknown(let rawValue): return rawValue - } + public static var appEncryptionDeclarationDocument: Self { + .init(rawValue: "appEncryptionDeclarationDocument") } + public static var builds: Self { + .init(rawValue: "builds") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "app": self = .app - case "appEncryptionDeclarationDocument": self = .appEncryptionDeclarationDocument - case "builds": self = .builds - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/AppEvents/AppsByIdAppEvents.GET.873389c.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/AppEvents/AppsByIdAppEvents.GET.873389c.generated.swift index 6a730e2f..4f23bc7f 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/AppEvents/AppsByIdAppEvents.GET.873389c.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/AppEvents/AppsByIdAppEvents.GET.873389c.generated.swift @@ -54,8 +54,10 @@ extension V1.Apps.ById.AppEvents { /// - Returns: **200**, List of AppEvents as `AppEventsResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -69,12 +71,18 @@ extension V1.Apps.ById.AppEvents { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 404: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -102,92 +110,99 @@ extension V1.Apps.ById.AppEvents.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum AppEventLocalizations: Hashable, Codable, RawRepresentable { - case appEvent - case appEventScreenshots - case appEventVideoClips - case locale - case longDescription - case name - case shortDescription - case unknown(String) - - public var rawValue: String { - switch self { - case .appEvent: return "appEvent" - case .appEventScreenshots: return "appEventScreenshots" - case .appEventVideoClips: return "appEventVideoClips" - case .locale: return "locale" - case .longDescription: return "longDescription" - case .name: return "name" - case .shortDescription: return "shortDescription" - case .unknown(let rawValue): return rawValue - } + public struct AppEventLocalizations: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var appEvent: Self { + .init(rawValue: "appEvent") + } + + public static var appEventScreenshots: Self { + .init(rawValue: "appEventScreenshots") + } + + public static var appEventVideoClips: Self { + .init(rawValue: "appEventVideoClips") + } + + public static var locale: Self { + .init(rawValue: "locale") + } + + public static var longDescription: Self { + .init(rawValue: "longDescription") + } + + public static var name: Self { + .init(rawValue: "name") + } + + public static var shortDescription: Self { + .init(rawValue: "shortDescription") + } + + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "appEvent": self = .appEvent - case "appEventScreenshots": self = .appEventScreenshots - case "appEventVideoClips": self = .appEventVideoClips - case "locale": self = .locale - case "longDescription": self = .longDescription - case "name": self = .name - case "shortDescription": self = .shortDescription - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum AppEvents: Hashable, Codable, RawRepresentable { - case app - case archivedTerritorySchedules - case badge - case deepLink - case eventState - case localizations - case primaryLocale - case priority - case purchaseRequirement - case purpose - case referenceName - case territorySchedules - case unknown(String) - - public var rawValue: String { - switch self { - case .app: return "app" - case .archivedTerritorySchedules: return "archivedTerritorySchedules" - case .badge: return "badge" - case .deepLink: return "deepLink" - case .eventState: return "eventState" - case .localizations: return "localizations" - case .primaryLocale: return "primaryLocale" - case .priority: return "priority" - case .purchaseRequirement: return "purchaseRequirement" - case .purpose: return "purpose" - case .referenceName: return "referenceName" - case .territorySchedules: return "territorySchedules" - case .unknown(let rawValue): return rawValue - } + public struct AppEvents: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var archivedTerritorySchedules: Self { + .init(rawValue: "archivedTerritorySchedules") } + public static var badge: Self { + .init(rawValue: "badge") + } + + public static var deepLink: Self { + .init(rawValue: "deepLink") + } + + public static var eventState: Self { + .init(rawValue: "eventState") + } + + public static var localizations: Self { + .init(rawValue: "localizations") + } + + public static var primaryLocale: Self { + .init(rawValue: "primaryLocale") + } + + public static var priority: Self { + .init(rawValue: "priority") + } + + public static var purchaseRequirement: Self { + .init(rawValue: "purchaseRequirement") + } + + public static var purpose: Self { + .init(rawValue: "purpose") + } + + public static var referenceName: Self { + .init(rawValue: "referenceName") + } + + public static var territorySchedules: Self { + .init(rawValue: "territorySchedules") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "app": self = .app - case "archivedTerritorySchedules": self = .archivedTerritorySchedules - case "badge": self = .badge - case "deepLink": self = .deepLink - case "eventState": self = .eventState - case "localizations": self = .localizations - case "primaryLocale": self = .primaryLocale - case "priority": self = .priority - case "purchaseRequirement": self = .purchaseRequirement - case "purpose": self = .purpose - case "referenceName": self = .referenceName - case "territorySchedules": self = .territorySchedules - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } @@ -218,49 +233,55 @@ extension V1.Apps.ById.AppEvents.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum EventState: Hashable, Codable, RawRepresentable { - case accepted - case approved - case archived - case draft - case inReview - case past - case published - case readyForReview - case rejected - case waitingForReview - case unknown(String) - - public var rawValue: String { - switch self { - case .accepted: return "ACCEPTED" - case .approved: return "APPROVED" - case .archived: return "ARCHIVED" - case .draft: return "DRAFT" - case .inReview: return "IN_REVIEW" - case .past: return "PAST" - case .published: return "PUBLISHED" - case .readyForReview: return "READY_FOR_REVIEW" - case .rejected: return "REJECTED" - case .waitingForReview: return "WAITING_FOR_REVIEW" - case .unknown(let rawValue): return rawValue - } + public struct EventState: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var accepted: Self { + .init(rawValue: "ACCEPTED") } + public static var approved: Self { + .init(rawValue: "APPROVED") + } + + public static var archived: Self { + .init(rawValue: "ARCHIVED") + } + + public static var draft: Self { + .init(rawValue: "DRAFT") + } + + public static var inReview: Self { + .init(rawValue: "IN_REVIEW") + } + + public static var past: Self { + .init(rawValue: "PAST") + } + + public static var published: Self { + .init(rawValue: "PUBLISHED") + } + + public static var readyForReview: Self { + .init(rawValue: "READY_FOR_REVIEW") + } + + public static var rejected: Self { + .init(rawValue: "REJECTED") + } + + public static var waitingForReview: Self { + .init(rawValue: "WAITING_FOR_REVIEW") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "ACCEPTED": self = .accepted - case "APPROVED": self = .approved - case "ARCHIVED": self = .archived - case "DRAFT": self = .draft - case "IN_REVIEW": self = .inReview - case "PAST": self = .past - case "PUBLISHED": self = .published - case "READY_FOR_REVIEW": self = .readyForReview - case "REJECTED": self = .rejected - case "WAITING_FOR_REVIEW": self = .waitingForReview - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } @@ -283,22 +304,19 @@ extension V1.Apps.ById.AppEvents.GET { } } - public enum Include: Hashable, Codable, RawRepresentable { - case localizations - case unknown(String) + public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var localizations: Self { + .init(rawValue: "localizations") + } - public var rawValue: String { - switch self { - case .localizations: return "localizations" - case .unknown(let rawValue): return rawValue - } + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "localizations": self = .localizations - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/AppInfos/AppsByIdAppInfos.GET.dcf3ea6.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/AppInfos/AppsByIdAppInfos.GET.dcf3ea6.generated.swift index 95ab8d7b..6c11e388 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/AppInfos/AppsByIdAppInfos.GET.dcf3ea6.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/AppInfos/AppsByIdAppInfos.GET.dcf3ea6.generated.swift @@ -56,8 +56,10 @@ extension V1.Apps.ById.AppInfos { /// - Returns: **200**, List of AppInfos as `AppInfosResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -71,12 +73,18 @@ extension V1.Apps.ById.AppInfos { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 404: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -102,338 +110,443 @@ extension V1.Apps.ById.AppInfos.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum AgeRatingDeclarations: Hashable, Codable, RawRepresentable { - case alcoholTobaccoOrDrugUseOrReferences - case contests - case gambling - case gamblingAndContests - case gamblingSimulated - case horrorOrFearThemes - case kidsAgeBand - case matureOrSuggestiveThemes - case medicalOrTreatmentInformation - case profanityOrCrudeHumor - case seventeenPlus - case sexualContentGraphicAndNudity - case sexualContentOrNudity - case unrestrictedWebAccess - case violenceCartoonOrFantasy - case violenceRealistic - case violenceRealisticProlongedGraphicOrSadistic - case unknown(String) - - public var rawValue: String { - switch self { - case .alcoholTobaccoOrDrugUseOrReferences: return "alcoholTobaccoOrDrugUseOrReferences" - case .contests: return "contests" - case .gambling: return "gambling" - case .gamblingAndContests: return "gamblingAndContests" - case .gamblingSimulated: return "gamblingSimulated" - case .horrorOrFearThemes: return "horrorOrFearThemes" - case .kidsAgeBand: return "kidsAgeBand" - case .matureOrSuggestiveThemes: return "matureOrSuggestiveThemes" - case .medicalOrTreatmentInformation: return "medicalOrTreatmentInformation" - case .profanityOrCrudeHumor: return "profanityOrCrudeHumor" - case .seventeenPlus: return "seventeenPlus" - case .sexualContentGraphicAndNudity: return "sexualContentGraphicAndNudity" - case .sexualContentOrNudity: return "sexualContentOrNudity" - case .unrestrictedWebAccess: return "unrestrictedWebAccess" - case .violenceCartoonOrFantasy: return "violenceCartoonOrFantasy" - case .violenceRealistic: return "violenceRealistic" - case .violenceRealisticProlongedGraphicOrSadistic: return "violenceRealisticProlongedGraphicOrSadistic" - case .unknown(let rawValue): return rawValue - } + public struct AgeRatingDeclarations: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var alcoholTobaccoOrDrugUseOrReferences: Self { + .init(rawValue: "alcoholTobaccoOrDrugUseOrReferences") + } + + public static var contests: Self { + .init(rawValue: "contests") + } + + public static var gambling: Self { + .init(rawValue: "gambling") + } + + public static var gamblingSimulated: Self { + .init(rawValue: "gamblingSimulated") + } + + public static var horrorOrFearThemes: Self { + .init(rawValue: "horrorOrFearThemes") + } + + public static var kidsAgeBand: Self { + .init(rawValue: "kidsAgeBand") + } + + public static var koreaAgeRatingOverride: Self { + .init(rawValue: "koreaAgeRatingOverride") + } + + public static var lootBox: Self { + .init(rawValue: "lootBox") + } + + public static var matureOrSuggestiveThemes: Self { + .init(rawValue: "matureOrSuggestiveThemes") + } + + public static var medicalOrTreatmentInformation: Self { + .init(rawValue: "medicalOrTreatmentInformation") + } + + public static var profanityOrCrudeHumor: Self { + .init(rawValue: "profanityOrCrudeHumor") + } + + public static var sexualContentGraphicAndNudity: Self { + .init(rawValue: "sexualContentGraphicAndNudity") + } + + public static var sexualContentOrNudity: Self { + .init(rawValue: "sexualContentOrNudity") } + public static var unrestrictedWebAccess: Self { + .init(rawValue: "unrestrictedWebAccess") + } + + public static var violenceCartoonOrFantasy: Self { + .init(rawValue: "violenceCartoonOrFantasy") + } + + public static var violenceRealistic: Self { + .init(rawValue: "violenceRealistic") + } + + public static var violenceRealisticProlongedGraphicOrSadistic: Self { + .init(rawValue: "violenceRealisticProlongedGraphicOrSadistic") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "alcoholTobaccoOrDrugUseOrReferences": self = .alcoholTobaccoOrDrugUseOrReferences - case "contests": self = .contests - case "gambling": self = .gambling - case "gamblingAndContests": self = .gamblingAndContests - case "gamblingSimulated": self = .gamblingSimulated - case "horrorOrFearThemes": self = .horrorOrFearThemes - case "kidsAgeBand": self = .kidsAgeBand - case "matureOrSuggestiveThemes": self = .matureOrSuggestiveThemes - case "medicalOrTreatmentInformation": self = .medicalOrTreatmentInformation - case "profanityOrCrudeHumor": self = .profanityOrCrudeHumor - case "seventeenPlus": self = .seventeenPlus - case "sexualContentGraphicAndNudity": self = .sexualContentGraphicAndNudity - case "sexualContentOrNudity": self = .sexualContentOrNudity - case "unrestrictedWebAccess": self = .unrestrictedWebAccess - case "violenceCartoonOrFantasy": self = .violenceCartoonOrFantasy - case "violenceRealistic": self = .violenceRealistic - case "violenceRealisticProlongedGraphicOrSadistic": self = .violenceRealisticProlongedGraphicOrSadistic - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum AppCategories: Hashable, Codable, RawRepresentable { - case parent - case platforms - case subcategories - case unknown(String) + public struct AppCategories: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var parent: Self { + .init(rawValue: "parent") + } + + public static var platforms: Self { + .init(rawValue: "platforms") + } - public var rawValue: String { - switch self { - case .parent: return "parent" - case .platforms: return "platforms" - case .subcategories: return "subcategories" - case .unknown(let rawValue): return rawValue - } + public static var subcategories: Self { + .init(rawValue: "subcategories") } + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "parent": self = .parent - case "platforms": self = .platforms - case "subcategories": self = .subcategories - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum AppInfoLocalizations: Hashable, Codable, RawRepresentable { - case appInfo - case locale - case name - case privacyChoicesUrl - case privacyPolicyText - case privacyPolicyUrl - case subtitle - case unknown(String) - - public var rawValue: String { - switch self { - case .appInfo: return "appInfo" - case .locale: return "locale" - case .name: return "name" - case .privacyChoicesUrl: return "privacyChoicesUrl" - case .privacyPolicyText: return "privacyPolicyText" - case .privacyPolicyUrl: return "privacyPolicyUrl" - case .subtitle: return "subtitle" - case .unknown(let rawValue): return rawValue - } + public struct AppInfoLocalizations: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var appInfo: Self { + .init(rawValue: "appInfo") + } + + public static var locale: Self { + .init(rawValue: "locale") + } + + public static var name: Self { + .init(rawValue: "name") + } + + public static var privacyChoicesUrl: Self { + .init(rawValue: "privacyChoicesUrl") + } + + public static var privacyPolicyText: Self { + .init(rawValue: "privacyPolicyText") + } + + public static var privacyPolicyUrl: Self { + .init(rawValue: "privacyPolicyUrl") } + public static var subtitle: Self { + .init(rawValue: "subtitle") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "appInfo": self = .appInfo - case "locale": self = .locale - case "name": self = .name - case "privacyChoicesUrl": self = .privacyChoicesUrl - case "privacyPolicyText": self = .privacyPolicyText - case "privacyPolicyUrl": self = .privacyPolicyUrl - case "subtitle": self = .subtitle - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum AppInfos: Hashable, Codable, RawRepresentable { - case ageRatingDeclaration - case app - case appInfoLocalizations - case appStoreAgeRating - case appStoreState - case brazilAgeRating - case brazilAgeRatingV2 - case kidsAgeBand - case primaryCategory - case primarySubcategoryOne - case primarySubcategoryTwo - case secondaryCategory - case secondarySubcategoryOne - case secondarySubcategoryTwo - case unknown(String) - - public var rawValue: String { - switch self { - case .ageRatingDeclaration: return "ageRatingDeclaration" - case .app: return "app" - case .appInfoLocalizations: return "appInfoLocalizations" - case .appStoreAgeRating: return "appStoreAgeRating" - case .appStoreState: return "appStoreState" - case .brazilAgeRating: return "brazilAgeRating" - case .brazilAgeRatingV2: return "brazilAgeRatingV2" - case .kidsAgeBand: return "kidsAgeBand" - case .primaryCategory: return "primaryCategory" - case .primarySubcategoryOne: return "primarySubcategoryOne" - case .primarySubcategoryTwo: return "primarySubcategoryTwo" - case .secondaryCategory: return "secondaryCategory" - case .secondarySubcategoryOne: return "secondarySubcategoryOne" - case .secondarySubcategoryTwo: return "secondarySubcategoryTwo" - case .unknown(let rawValue): return rawValue - } + public struct AppInfos: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var ageRatingDeclaration: Self { + .init(rawValue: "ageRatingDeclaration") + } + + public static var app: Self { + .init(rawValue: "app") + } + + public static var appInfoLocalizations: Self { + .init(rawValue: "appInfoLocalizations") + } + + public static var appStoreAgeRating: Self { + .init(rawValue: "appStoreAgeRating") + } + + public static var appStoreState: Self { + .init(rawValue: "appStoreState") + } + + public static var australiaAgeRating: Self { + .init(rawValue: "australiaAgeRating") + } + + public static var brazilAgeRating: Self { + .init(rawValue: "brazilAgeRating") + } + + public static var brazilAgeRatingV2: Self { + .init(rawValue: "brazilAgeRatingV2") + } + + public static var franceAgeRating: Self { + .init(rawValue: "franceAgeRating") } + public static var kidsAgeBand: Self { + .init(rawValue: "kidsAgeBand") + } + + public static var koreaAgeRating: Self { + .init(rawValue: "koreaAgeRating") + } + + public static var primaryCategory: Self { + .init(rawValue: "primaryCategory") + } + + public static var primarySubcategoryOne: Self { + .init(rawValue: "primarySubcategoryOne") + } + + public static var primarySubcategoryTwo: Self { + .init(rawValue: "primarySubcategoryTwo") + } + + public static var secondaryCategory: Self { + .init(rawValue: "secondaryCategory") + } + + public static var secondarySubcategoryOne: Self { + .init(rawValue: "secondarySubcategoryOne") + } + + public static var secondarySubcategoryTwo: Self { + .init(rawValue: "secondarySubcategoryTwo") + } + + public static var state: Self { + .init(rawValue: "state") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "ageRatingDeclaration": self = .ageRatingDeclaration - case "app": self = .app - case "appInfoLocalizations": self = .appInfoLocalizations - case "appStoreAgeRating": self = .appStoreAgeRating - case "appStoreState": self = .appStoreState - case "brazilAgeRating": self = .brazilAgeRating - case "brazilAgeRatingV2": self = .brazilAgeRatingV2 - case "kidsAgeBand": self = .kidsAgeBand - case "primaryCategory": self = .primaryCategory - case "primarySubcategoryOne": self = .primarySubcategoryOne - case "primarySubcategoryTwo": self = .primarySubcategoryTwo - case "secondaryCategory": self = .secondaryCategory - case "secondarySubcategoryOne": self = .secondarySubcategoryOne - case "secondarySubcategoryTwo": self = .secondarySubcategoryTwo - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum Apps: Hashable, Codable, RawRepresentable { - case appAvailability - case appClips - case appCustomProductPages - case appEncryptionDeclarations - case appEvents - case appInfos - case appPricePoints - case appPriceSchedule - case appStoreVersionExperimentsV2 - case appStoreVersions - case availableInNewTerritories - case availableTerritories - case betaAppLocalizations - case betaAppReviewDetail - case betaGroups - case betaLicenseAgreement - case betaTesters - case builds - case bundleId - case ciProduct - case contentRightsDeclaration - case customerReviews - case endUserLicenseAgreement - case gameCenterDetail - case gameCenterEnabledVersions - case inAppPurchases - case inAppPurchasesV2 - case isOrEverWasMadeForKids - case name - case perfPowerMetrics - case preOrder - case preReleaseVersions - case pricePoints - case prices - case primaryLocale - case promotedPurchases - case reviewSubmissions - case sku - case subscriptionGracePeriod - case subscriptionGroups - case subscriptionStatusUrl - case subscriptionStatusUrlForSandbox - case subscriptionStatusUrlVersion - case subscriptionStatusUrlVersionForSandbox - case unknown(String) - - public var rawValue: String { - switch self { - case .appAvailability: return "appAvailability" - case .appClips: return "appClips" - case .appCustomProductPages: return "appCustomProductPages" - case .appEncryptionDeclarations: return "appEncryptionDeclarations" - case .appEvents: return "appEvents" - case .appInfos: return "appInfos" - case .appPricePoints: return "appPricePoints" - case .appPriceSchedule: return "appPriceSchedule" - case .appStoreVersionExperimentsV2: return "appStoreVersionExperimentsV2" - case .appStoreVersions: return "appStoreVersions" - case .availableInNewTerritories: return "availableInNewTerritories" - case .availableTerritories: return "availableTerritories" - case .betaAppLocalizations: return "betaAppLocalizations" - case .betaAppReviewDetail: return "betaAppReviewDetail" - case .betaGroups: return "betaGroups" - case .betaLicenseAgreement: return "betaLicenseAgreement" - case .betaTesters: return "betaTesters" - case .builds: return "builds" - case .bundleId: return "bundleId" - case .ciProduct: return "ciProduct" - case .contentRightsDeclaration: return "contentRightsDeclaration" - case .customerReviews: return "customerReviews" - case .endUserLicenseAgreement: return "endUserLicenseAgreement" - case .gameCenterDetail: return "gameCenterDetail" - case .gameCenterEnabledVersions: return "gameCenterEnabledVersions" - case .inAppPurchases: return "inAppPurchases" - case .inAppPurchasesV2: return "inAppPurchasesV2" - case .isOrEverWasMadeForKids: return "isOrEverWasMadeForKids" - case .name: return "name" - case .perfPowerMetrics: return "perfPowerMetrics" - case .preOrder: return "preOrder" - case .preReleaseVersions: return "preReleaseVersions" - case .pricePoints: return "pricePoints" - case .prices: return "prices" - case .primaryLocale: return "primaryLocale" - case .promotedPurchases: return "promotedPurchases" - case .reviewSubmissions: return "reviewSubmissions" - case .sku: return "sku" - case .subscriptionGracePeriod: return "subscriptionGracePeriod" - case .subscriptionGroups: return "subscriptionGroups" - case .subscriptionStatusUrl: return "subscriptionStatusUrl" - case .subscriptionStatusUrlForSandbox: return "subscriptionStatusUrlForSandbox" - case .subscriptionStatusUrlVersion: return "subscriptionStatusUrlVersion" - case .subscriptionStatusUrlVersionForSandbox: return "subscriptionStatusUrlVersionForSandbox" - case .unknown(let rawValue): return rawValue - } + public struct Apps: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var accessibilityDeclarations: Self { + .init(rawValue: "accessibilityDeclarations") } + public static var accessibilityUrl: Self { + .init(rawValue: "accessibilityUrl") + } + + public static var alternativeDistributionKey: Self { + .init(rawValue: "alternativeDistributionKey") + } + + public static var analyticsReportRequests: Self { + .init(rawValue: "analyticsReportRequests") + } + + public static var appAvailabilityV2: Self { + .init(rawValue: "appAvailabilityV2") + } + + public static var appClips: Self { + .init(rawValue: "appClips") + } + + public static var appCustomProductPages: Self { + .init(rawValue: "appCustomProductPages") + } + + public static var appEncryptionDeclarations: Self { + .init(rawValue: "appEncryptionDeclarations") + } + + public static var appEvents: Self { + .init(rawValue: "appEvents") + } + + public static var appInfos: Self { + .init(rawValue: "appInfos") + } + + public static var appPricePoints: Self { + .init(rawValue: "appPricePoints") + } + + public static var appPriceSchedule: Self { + .init(rawValue: "appPriceSchedule") + } + + public static var appStoreVersionExperimentsV2: Self { + .init(rawValue: "appStoreVersionExperimentsV2") + } + + public static var appStoreVersions: Self { + .init(rawValue: "appStoreVersions") + } + + public static var backgroundAssets: Self { + .init(rawValue: "backgroundAssets") + } + + public static var betaAppLocalizations: Self { + .init(rawValue: "betaAppLocalizations") + } + + public static var betaAppReviewDetail: Self { + .init(rawValue: "betaAppReviewDetail") + } + + public static var betaFeedbackCrashSubmissions: Self { + .init(rawValue: "betaFeedbackCrashSubmissions") + } + + public static var betaFeedbackScreenshotSubmissions: Self { + .init(rawValue: "betaFeedbackScreenshotSubmissions") + } + + public static var betaGroups: Self { + .init(rawValue: "betaGroups") + } + + public static var betaLicenseAgreement: Self { + .init(rawValue: "betaLicenseAgreement") + } + + public static var betaTesters: Self { + .init(rawValue: "betaTesters") + } + + public static var builds: Self { + .init(rawValue: "builds") + } + + public static var bundleId: Self { + .init(rawValue: "bundleId") + } + + public static var ciProduct: Self { + .init(rawValue: "ciProduct") + } + + public static var contentRightsDeclaration: Self { + .init(rawValue: "contentRightsDeclaration") + } + + public static var customerReviewSummarizations: Self { + .init(rawValue: "customerReviewSummarizations") + } + + public static var customerReviews: Self { + .init(rawValue: "customerReviews") + } + + public static var endUserLicenseAgreement: Self { + .init(rawValue: "endUserLicenseAgreement") + } + + public static var gameCenterDetail: Self { + .init(rawValue: "gameCenterDetail") + } + + public static var gameCenterEnabledVersions: Self { + .init(rawValue: "gameCenterEnabledVersions") + } + + public static var inAppPurchases: Self { + .init(rawValue: "inAppPurchases") + } + + public static var inAppPurchasesV2: Self { + .init(rawValue: "inAppPurchasesV2") + } + + public static var isOrEverWasMadeForKids: Self { + .init(rawValue: "isOrEverWasMadeForKids") + } + + public static var marketplaceSearchDetail: Self { + .init(rawValue: "marketplaceSearchDetail") + } + + public static var name: Self { + .init(rawValue: "name") + } + + public static var perfPowerMetrics: Self { + .init(rawValue: "perfPowerMetrics") + } + + public static var preReleaseVersions: Self { + .init(rawValue: "preReleaseVersions") + } + + public static var primaryLocale: Self { + .init(rawValue: "primaryLocale") + } + + public static var promotedPurchases: Self { + .init(rawValue: "promotedPurchases") + } + + public static var reviewSubmissions: Self { + .init(rawValue: "reviewSubmissions") + } + + public static var sku: Self { + .init(rawValue: "sku") + } + + public static var streamlinedPurchasingEnabled: Self { + .init(rawValue: "streamlinedPurchasingEnabled") + } + + public static var subscriptionGracePeriod: Self { + .init(rawValue: "subscriptionGracePeriod") + } + + public static var subscriptionGroups: Self { + .init(rawValue: "subscriptionGroups") + } + + public static var subscriptionStatusUrl: Self { + .init(rawValue: "subscriptionStatusUrl") + } + + public static var subscriptionStatusUrlForSandbox: Self { + .init(rawValue: "subscriptionStatusUrlForSandbox") + } + + public static var subscriptionStatusUrlVersion: Self { + .init(rawValue: "subscriptionStatusUrlVersion") + } + + public static var subscriptionStatusUrlVersionForSandbox: Self { + .init(rawValue: "subscriptionStatusUrlVersionForSandbox") + } + + public static var webhooks: Self { + .init(rawValue: "webhooks") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "appAvailability": self = .appAvailability - case "appClips": self = .appClips - case "appCustomProductPages": self = .appCustomProductPages - case "appEncryptionDeclarations": self = .appEncryptionDeclarations - case "appEvents": self = .appEvents - case "appInfos": self = .appInfos - case "appPricePoints": self = .appPricePoints - case "appPriceSchedule": self = .appPriceSchedule - case "appStoreVersionExperimentsV2": self = .appStoreVersionExperimentsV2 - case "appStoreVersions": self = .appStoreVersions - case "availableInNewTerritories": self = .availableInNewTerritories - case "availableTerritories": self = .availableTerritories - case "betaAppLocalizations": self = .betaAppLocalizations - case "betaAppReviewDetail": self = .betaAppReviewDetail - case "betaGroups": self = .betaGroups - case "betaLicenseAgreement": self = .betaLicenseAgreement - case "betaTesters": self = .betaTesters - case "builds": self = .builds - case "bundleId": self = .bundleId - case "ciProduct": self = .ciProduct - case "contentRightsDeclaration": self = .contentRightsDeclaration - case "customerReviews": self = .customerReviews - case "endUserLicenseAgreement": self = .endUserLicenseAgreement - case "gameCenterDetail": self = .gameCenterDetail - case "gameCenterEnabledVersions": self = .gameCenterEnabledVersions - case "inAppPurchases": self = .inAppPurchases - case "inAppPurchasesV2": self = .inAppPurchasesV2 - case "isOrEverWasMadeForKids": self = .isOrEverWasMadeForKids - case "name": self = .name - case "perfPowerMetrics": self = .perfPowerMetrics - case "preOrder": self = .preOrder - case "preReleaseVersions": self = .preReleaseVersions - case "pricePoints": self = .pricePoints - case "prices": self = .prices - case "primaryLocale": self = .primaryLocale - case "promotedPurchases": self = .promotedPurchases - case "reviewSubmissions": self = .reviewSubmissions - case "sku": self = .sku - case "subscriptionGracePeriod": self = .subscriptionGracePeriod - case "subscriptionGroups": self = .subscriptionGroups - case "subscriptionStatusUrl": self = .subscriptionStatusUrl - case "subscriptionStatusUrlForSandbox": self = .subscriptionStatusUrlForSandbox - case "subscriptionStatusUrlVersion": self = .subscriptionStatusUrlVersion - case "subscriptionStatusUrlVersionForSandbox": self = .subscriptionStatusUrlVersionForSandbox - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } @@ -471,46 +584,51 @@ extension V1.Apps.ById.AppInfos.GET { } } - public enum Include: Hashable, Codable, RawRepresentable { - case ageRatingDeclaration - case app - case appInfoLocalizations - case primaryCategory - case primarySubcategoryOne - case primarySubcategoryTwo - case secondaryCategory - case secondarySubcategoryOne - case secondarySubcategoryTwo - case unknown(String) - - public var rawValue: String { - switch self { - case .ageRatingDeclaration: return "ageRatingDeclaration" - case .app: return "app" - case .appInfoLocalizations: return "appInfoLocalizations" - case .primaryCategory: return "primaryCategory" - case .primarySubcategoryOne: return "primarySubcategoryOne" - case .primarySubcategoryTwo: return "primarySubcategoryTwo" - case .secondaryCategory: return "secondaryCategory" - case .secondarySubcategoryOne: return "secondarySubcategoryOne" - case .secondarySubcategoryTwo: return "secondarySubcategoryTwo" - case .unknown(let rawValue): return rawValue - } + public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var ageRatingDeclaration: Self { + .init(rawValue: "ageRatingDeclaration") } + public static var app: Self { + .init(rawValue: "app") + } + + public static var appInfoLocalizations: Self { + .init(rawValue: "appInfoLocalizations") + } + + public static var primaryCategory: Self { + .init(rawValue: "primaryCategory") + } + + public static var primarySubcategoryOne: Self { + .init(rawValue: "primarySubcategoryOne") + } + + public static var primarySubcategoryTwo: Self { + .init(rawValue: "primarySubcategoryTwo") + } + + public static var secondaryCategory: Self { + .init(rawValue: "secondaryCategory") + } + + public static var secondarySubcategoryOne: Self { + .init(rawValue: "secondarySubcategoryOne") + } + + public static var secondarySubcategoryTwo: Self { + .init(rawValue: "secondarySubcategoryTwo") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "ageRatingDeclaration": self = .ageRatingDeclaration - case "app": self = .app - case "appInfoLocalizations": self = .appInfoLocalizations - case "primaryCategory": self = .primaryCategory - case "primarySubcategoryOne": self = .primarySubcategoryOne - case "primarySubcategoryTwo": self = .primarySubcategoryTwo - case "secondaryCategory": self = .secondaryCategory - case "secondarySubcategoryOne": self = .secondarySubcategoryOne - case "secondarySubcategoryTwo": self = .secondarySubcategoryTwo - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/AppPricePoints/AppsByIdAppPricePoints.GET.a67db3c.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/AppPricePoints/AppsByIdAppPricePoints.GET.a67db3c.generated.swift index 73e5673f..916d58e7 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/AppPricePoints/AppsByIdAppPricePoints.GET.a67db3c.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/AppPricePoints/AppsByIdAppPricePoints.GET.a67db3c.generated.swift @@ -52,8 +52,10 @@ extension V1.Apps.ById.AppPricePoints { /// - Returns: **200**, List of AppPricePoints as `AppPricePointsV3Response` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -67,12 +69,18 @@ extension V1.Apps.ById.AppPricePoints { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 404: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -100,201 +108,263 @@ extension V1.Apps.ById.AppPricePoints.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum AppPricePoints: Hashable, Codable, RawRepresentable { - case app - case customerPrice - case equalizations - case proceeds - case territory - case unknown(String) - - public var rawValue: String { - switch self { - case .app: return "app" - case .customerPrice: return "customerPrice" - case .equalizations: return "equalizations" - case .proceeds: return "proceeds" - case .territory: return "territory" - case .unknown(let rawValue): return rawValue - } + public struct AppPricePoints: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var app: Self { + .init(rawValue: "app") + } + + public static var customerPrice: Self { + .init(rawValue: "customerPrice") + } + + public static var equalizations: Self { + .init(rawValue: "equalizations") } + public static var proceeds: Self { + .init(rawValue: "proceeds") + } + + public static var territory: Self { + .init(rawValue: "territory") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "app": self = .app - case "customerPrice": self = .customerPrice - case "equalizations": self = .equalizations - case "proceeds": self = .proceeds - case "territory": self = .territory - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum Apps: Hashable, Codable, RawRepresentable { - case appAvailability - case appClips - case appCustomProductPages - case appEncryptionDeclarations - case appEvents - case appInfos - case appPricePoints - case appPriceSchedule - case appStoreVersionExperimentsV2 - case appStoreVersions - case availableInNewTerritories - case availableTerritories - case betaAppLocalizations - case betaAppReviewDetail - case betaGroups - case betaLicenseAgreement - case betaTesters - case builds - case bundleId - case ciProduct - case contentRightsDeclaration - case customerReviews - case endUserLicenseAgreement - case gameCenterDetail - case gameCenterEnabledVersions - case inAppPurchases - case inAppPurchasesV2 - case isOrEverWasMadeForKids - case name - case perfPowerMetrics - case preOrder - case preReleaseVersions - case pricePoints - case prices - case primaryLocale - case promotedPurchases - case reviewSubmissions - case sku - case subscriptionGracePeriod - case subscriptionGroups - case subscriptionStatusUrl - case subscriptionStatusUrlForSandbox - case subscriptionStatusUrlVersion - case subscriptionStatusUrlVersionForSandbox - case unknown(String) - - public var rawValue: String { - switch self { - case .appAvailability: return "appAvailability" - case .appClips: return "appClips" - case .appCustomProductPages: return "appCustomProductPages" - case .appEncryptionDeclarations: return "appEncryptionDeclarations" - case .appEvents: return "appEvents" - case .appInfos: return "appInfos" - case .appPricePoints: return "appPricePoints" - case .appPriceSchedule: return "appPriceSchedule" - case .appStoreVersionExperimentsV2: return "appStoreVersionExperimentsV2" - case .appStoreVersions: return "appStoreVersions" - case .availableInNewTerritories: return "availableInNewTerritories" - case .availableTerritories: return "availableTerritories" - case .betaAppLocalizations: return "betaAppLocalizations" - case .betaAppReviewDetail: return "betaAppReviewDetail" - case .betaGroups: return "betaGroups" - case .betaLicenseAgreement: return "betaLicenseAgreement" - case .betaTesters: return "betaTesters" - case .builds: return "builds" - case .bundleId: return "bundleId" - case .ciProduct: return "ciProduct" - case .contentRightsDeclaration: return "contentRightsDeclaration" - case .customerReviews: return "customerReviews" - case .endUserLicenseAgreement: return "endUserLicenseAgreement" - case .gameCenterDetail: return "gameCenterDetail" - case .gameCenterEnabledVersions: return "gameCenterEnabledVersions" - case .inAppPurchases: return "inAppPurchases" - case .inAppPurchasesV2: return "inAppPurchasesV2" - case .isOrEverWasMadeForKids: return "isOrEverWasMadeForKids" - case .name: return "name" - case .perfPowerMetrics: return "perfPowerMetrics" - case .preOrder: return "preOrder" - case .preReleaseVersions: return "preReleaseVersions" - case .pricePoints: return "pricePoints" - case .prices: return "prices" - case .primaryLocale: return "primaryLocale" - case .promotedPurchases: return "promotedPurchases" - case .reviewSubmissions: return "reviewSubmissions" - case .sku: return "sku" - case .subscriptionGracePeriod: return "subscriptionGracePeriod" - case .subscriptionGroups: return "subscriptionGroups" - case .subscriptionStatusUrl: return "subscriptionStatusUrl" - case .subscriptionStatusUrlForSandbox: return "subscriptionStatusUrlForSandbox" - case .subscriptionStatusUrlVersion: return "subscriptionStatusUrlVersion" - case .subscriptionStatusUrlVersionForSandbox: return "subscriptionStatusUrlVersionForSandbox" - case .unknown(let rawValue): return rawValue - } + public struct Apps: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var accessibilityDeclarations: Self { + .init(rawValue: "accessibilityDeclarations") + } + + public static var accessibilityUrl: Self { + .init(rawValue: "accessibilityUrl") + } + + public static var alternativeDistributionKey: Self { + .init(rawValue: "alternativeDistributionKey") + } + + public static var analyticsReportRequests: Self { + .init(rawValue: "analyticsReportRequests") + } + + public static var appAvailabilityV2: Self { + .init(rawValue: "appAvailabilityV2") + } + + public static var appClips: Self { + .init(rawValue: "appClips") + } + + public static var appCustomProductPages: Self { + .init(rawValue: "appCustomProductPages") + } + + public static var appEncryptionDeclarations: Self { + .init(rawValue: "appEncryptionDeclarations") + } + + public static var appEvents: Self { + .init(rawValue: "appEvents") + } + + public static var appInfos: Self { + .init(rawValue: "appInfos") + } + + public static var appPricePoints: Self { + .init(rawValue: "appPricePoints") + } + + public static var appPriceSchedule: Self { + .init(rawValue: "appPriceSchedule") + } + + public static var appStoreVersionExperimentsV2: Self { + .init(rawValue: "appStoreVersionExperimentsV2") + } + + public static var appStoreVersions: Self { + .init(rawValue: "appStoreVersions") + } + + public static var backgroundAssets: Self { + .init(rawValue: "backgroundAssets") + } + + public static var betaAppLocalizations: Self { + .init(rawValue: "betaAppLocalizations") + } + + public static var betaAppReviewDetail: Self { + .init(rawValue: "betaAppReviewDetail") + } + + public static var betaFeedbackCrashSubmissions: Self { + .init(rawValue: "betaFeedbackCrashSubmissions") + } + + public static var betaFeedbackScreenshotSubmissions: Self { + .init(rawValue: "betaFeedbackScreenshotSubmissions") + } + + public static var betaGroups: Self { + .init(rawValue: "betaGroups") + } + + public static var betaLicenseAgreement: Self { + .init(rawValue: "betaLicenseAgreement") + } + + public static var betaTesters: Self { + .init(rawValue: "betaTesters") + } + + public static var builds: Self { + .init(rawValue: "builds") + } + + public static var bundleId: Self { + .init(rawValue: "bundleId") + } + + public static var ciProduct: Self { + .init(rawValue: "ciProduct") + } + + public static var contentRightsDeclaration: Self { + .init(rawValue: "contentRightsDeclaration") + } + + public static var customerReviewSummarizations: Self { + .init(rawValue: "customerReviewSummarizations") + } + + public static var customerReviews: Self { + .init(rawValue: "customerReviews") + } + + public static var endUserLicenseAgreement: Self { + .init(rawValue: "endUserLicenseAgreement") + } + + public static var gameCenterDetail: Self { + .init(rawValue: "gameCenterDetail") + } + + public static var gameCenterEnabledVersions: Self { + .init(rawValue: "gameCenterEnabledVersions") + } + + public static var inAppPurchases: Self { + .init(rawValue: "inAppPurchases") + } + + public static var inAppPurchasesV2: Self { + .init(rawValue: "inAppPurchasesV2") + } + + public static var isOrEverWasMadeForKids: Self { + .init(rawValue: "isOrEverWasMadeForKids") + } + + public static var marketplaceSearchDetail: Self { + .init(rawValue: "marketplaceSearchDetail") + } + + public static var name: Self { + .init(rawValue: "name") + } + + public static var perfPowerMetrics: Self { + .init(rawValue: "perfPowerMetrics") + } + + public static var preReleaseVersions: Self { + .init(rawValue: "preReleaseVersions") + } + + public static var primaryLocale: Self { + .init(rawValue: "primaryLocale") + } + + public static var promotedPurchases: Self { + .init(rawValue: "promotedPurchases") } + public static var reviewSubmissions: Self { + .init(rawValue: "reviewSubmissions") + } + + public static var sku: Self { + .init(rawValue: "sku") + } + + public static var streamlinedPurchasingEnabled: Self { + .init(rawValue: "streamlinedPurchasingEnabled") + } + + public static var subscriptionGracePeriod: Self { + .init(rawValue: "subscriptionGracePeriod") + } + + public static var subscriptionGroups: Self { + .init(rawValue: "subscriptionGroups") + } + + public static var subscriptionStatusUrl: Self { + .init(rawValue: "subscriptionStatusUrl") + } + + public static var subscriptionStatusUrlForSandbox: Self { + .init(rawValue: "subscriptionStatusUrlForSandbox") + } + + public static var subscriptionStatusUrlVersion: Self { + .init(rawValue: "subscriptionStatusUrlVersion") + } + + public static var subscriptionStatusUrlVersionForSandbox: Self { + .init(rawValue: "subscriptionStatusUrlVersionForSandbox") + } + + public static var webhooks: Self { + .init(rawValue: "webhooks") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "appAvailability": self = .appAvailability - case "appClips": self = .appClips - case "appCustomProductPages": self = .appCustomProductPages - case "appEncryptionDeclarations": self = .appEncryptionDeclarations - case "appEvents": self = .appEvents - case "appInfos": self = .appInfos - case "appPricePoints": self = .appPricePoints - case "appPriceSchedule": self = .appPriceSchedule - case "appStoreVersionExperimentsV2": self = .appStoreVersionExperimentsV2 - case "appStoreVersions": self = .appStoreVersions - case "availableInNewTerritories": self = .availableInNewTerritories - case "availableTerritories": self = .availableTerritories - case "betaAppLocalizations": self = .betaAppLocalizations - case "betaAppReviewDetail": self = .betaAppReviewDetail - case "betaGroups": self = .betaGroups - case "betaLicenseAgreement": self = .betaLicenseAgreement - case "betaTesters": self = .betaTesters - case "builds": self = .builds - case "bundleId": self = .bundleId - case "ciProduct": self = .ciProduct - case "contentRightsDeclaration": self = .contentRightsDeclaration - case "customerReviews": self = .customerReviews - case "endUserLicenseAgreement": self = .endUserLicenseAgreement - case "gameCenterDetail": self = .gameCenterDetail - case "gameCenterEnabledVersions": self = .gameCenterEnabledVersions - case "inAppPurchases": self = .inAppPurchases - case "inAppPurchasesV2": self = .inAppPurchasesV2 - case "isOrEverWasMadeForKids": self = .isOrEverWasMadeForKids - case "name": self = .name - case "perfPowerMetrics": self = .perfPowerMetrics - case "preOrder": self = .preOrder - case "preReleaseVersions": self = .preReleaseVersions - case "pricePoints": self = .pricePoints - case "prices": self = .prices - case "primaryLocale": self = .primaryLocale - case "promotedPurchases": self = .promotedPurchases - case "reviewSubmissions": self = .reviewSubmissions - case "sku": self = .sku - case "subscriptionGracePeriod": self = .subscriptionGracePeriod - case "subscriptionGroups": self = .subscriptionGroups - case "subscriptionStatusUrl": self = .subscriptionStatusUrl - case "subscriptionStatusUrlForSandbox": self = .subscriptionStatusUrlForSandbox - case "subscriptionStatusUrlVersion": self = .subscriptionStatusUrlVersion - case "subscriptionStatusUrlVersionForSandbox": self = .subscriptionStatusUrlVersionForSandbox - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum Territories: Hashable, Codable, RawRepresentable { - case currency - case unknown(String) + public struct Territories: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var currency: Self { + .init(rawValue: "currency") + } - public var rawValue: String { - switch self { - case .currency: return "currency" - case .unknown(let rawValue): return rawValue - } + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "currency": self = .currency - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } @@ -344,25 +414,23 @@ extension V1.Apps.ById.AppPricePoints.GET { } } - public enum Include: Hashable, Codable, RawRepresentable { - case app - case territory - case unknown(String) + public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var app: Self { + .init(rawValue: "app") + } - public var rawValue: String { - switch self { - case .app: return "app" - case .territory: return "territory" - case .unknown(let rawValue): return rawValue - } + public static var territory: Self { + .init(rawValue: "territory") } + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "app": self = .app - case "territory": self = .territory - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/AppPriceSchedule/AppsByIdAppPriceSchedule.GET.2431519.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/AppPriceSchedule/AppsByIdAppPriceSchedule.GET.2431519.generated.swift index 95162934..0861db76 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/AppPriceSchedule/AppsByIdAppPriceSchedule.GET.2431519.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/AppPriceSchedule/AppsByIdAppPriceSchedule.GET.2431519.generated.swift @@ -54,8 +54,10 @@ extension V1.Apps.ById.AppPriceSchedule { /// - Returns: **200**, Single AppPriceSchedule as `AppPriceScheduleResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -69,12 +71,18 @@ extension V1.Apps.ById.AppPriceSchedule { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 404: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -99,229 +107,291 @@ extension V1.Apps.ById.AppPriceSchedule.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum AppPriceSchedules: Hashable, Codable, RawRepresentable { - case app - case automaticPrices - case baseTerritory - case manualPrices - case unknown(String) + public struct AppPriceSchedules: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var app: Self { + .init(rawValue: "app") + } + + public static var automaticPrices: Self { + .init(rawValue: "automaticPrices") + } + + public static var baseTerritory: Self { + .init(rawValue: "baseTerritory") + } + + public static var manualPrices: Self { + .init(rawValue: "manualPrices") + } - public var rawValue: String { - switch self { - case .app: return "app" - case .automaticPrices: return "automaticPrices" - case .baseTerritory: return "baseTerritory" - case .manualPrices: return "manualPrices" - case .unknown(let rawValue): return rawValue - } + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "app": self = .app - case "automaticPrices": self = .automaticPrices - case "baseTerritory": self = .baseTerritory - case "manualPrices": self = .manualPrices - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum AppPrices: Hashable, Codable, RawRepresentable { - case appPricePoint - case endDate - case manual - case startDate - case territory - case unknown(String) - - public var rawValue: String { - switch self { - case .appPricePoint: return "appPricePoint" - case .endDate: return "endDate" - case .manual: return "manual" - case .startDate: return "startDate" - case .territory: return "territory" - case .unknown(let rawValue): return rawValue - } + public struct AppPrices: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var appPricePoint: Self { + .init(rawValue: "appPricePoint") + } + + public static var endDate: Self { + .init(rawValue: "endDate") + } + + public static var manual: Self { + .init(rawValue: "manual") + } + + public static var startDate: Self { + .init(rawValue: "startDate") } + public static var territory: Self { + .init(rawValue: "territory") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "appPricePoint": self = .appPricePoint - case "endDate": self = .endDate - case "manual": self = .manual - case "startDate": self = .startDate - case "territory": self = .territory - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum Apps: Hashable, Codable, RawRepresentable { - case appAvailability - case appClips - case appCustomProductPages - case appEncryptionDeclarations - case appEvents - case appInfos - case appPricePoints - case appPriceSchedule - case appStoreVersionExperimentsV2 - case appStoreVersions - case availableInNewTerritories - case availableTerritories - case betaAppLocalizations - case betaAppReviewDetail - case betaGroups - case betaLicenseAgreement - case betaTesters - case builds - case bundleId - case ciProduct - case contentRightsDeclaration - case customerReviews - case endUserLicenseAgreement - case gameCenterDetail - case gameCenterEnabledVersions - case inAppPurchases - case inAppPurchasesV2 - case isOrEverWasMadeForKids - case name - case perfPowerMetrics - case preOrder - case preReleaseVersions - case pricePoints - case prices - case primaryLocale - case promotedPurchases - case reviewSubmissions - case sku - case subscriptionGracePeriod - case subscriptionGroups - case subscriptionStatusUrl - case subscriptionStatusUrlForSandbox - case subscriptionStatusUrlVersion - case subscriptionStatusUrlVersionForSandbox - case unknown(String) - - public var rawValue: String { - switch self { - case .appAvailability: return "appAvailability" - case .appClips: return "appClips" - case .appCustomProductPages: return "appCustomProductPages" - case .appEncryptionDeclarations: return "appEncryptionDeclarations" - case .appEvents: return "appEvents" - case .appInfos: return "appInfos" - case .appPricePoints: return "appPricePoints" - case .appPriceSchedule: return "appPriceSchedule" - case .appStoreVersionExperimentsV2: return "appStoreVersionExperimentsV2" - case .appStoreVersions: return "appStoreVersions" - case .availableInNewTerritories: return "availableInNewTerritories" - case .availableTerritories: return "availableTerritories" - case .betaAppLocalizations: return "betaAppLocalizations" - case .betaAppReviewDetail: return "betaAppReviewDetail" - case .betaGroups: return "betaGroups" - case .betaLicenseAgreement: return "betaLicenseAgreement" - case .betaTesters: return "betaTesters" - case .builds: return "builds" - case .bundleId: return "bundleId" - case .ciProduct: return "ciProduct" - case .contentRightsDeclaration: return "contentRightsDeclaration" - case .customerReviews: return "customerReviews" - case .endUserLicenseAgreement: return "endUserLicenseAgreement" - case .gameCenterDetail: return "gameCenterDetail" - case .gameCenterEnabledVersions: return "gameCenterEnabledVersions" - case .inAppPurchases: return "inAppPurchases" - case .inAppPurchasesV2: return "inAppPurchasesV2" - case .isOrEverWasMadeForKids: return "isOrEverWasMadeForKids" - case .name: return "name" - case .perfPowerMetrics: return "perfPowerMetrics" - case .preOrder: return "preOrder" - case .preReleaseVersions: return "preReleaseVersions" - case .pricePoints: return "pricePoints" - case .prices: return "prices" - case .primaryLocale: return "primaryLocale" - case .promotedPurchases: return "promotedPurchases" - case .reviewSubmissions: return "reviewSubmissions" - case .sku: return "sku" - case .subscriptionGracePeriod: return "subscriptionGracePeriod" - case .subscriptionGroups: return "subscriptionGroups" - case .subscriptionStatusUrl: return "subscriptionStatusUrl" - case .subscriptionStatusUrlForSandbox: return "subscriptionStatusUrlForSandbox" - case .subscriptionStatusUrlVersion: return "subscriptionStatusUrlVersion" - case .subscriptionStatusUrlVersionForSandbox: return "subscriptionStatusUrlVersionForSandbox" - case .unknown(let rawValue): return rawValue - } + public struct Apps: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var accessibilityDeclarations: Self { + .init(rawValue: "accessibilityDeclarations") + } + + public static var accessibilityUrl: Self { + .init(rawValue: "accessibilityUrl") + } + + public static var alternativeDistributionKey: Self { + .init(rawValue: "alternativeDistributionKey") + } + + public static var analyticsReportRequests: Self { + .init(rawValue: "analyticsReportRequests") + } + + public static var appAvailabilityV2: Self { + .init(rawValue: "appAvailabilityV2") + } + + public static var appClips: Self { + .init(rawValue: "appClips") + } + + public static var appCustomProductPages: Self { + .init(rawValue: "appCustomProductPages") + } + + public static var appEncryptionDeclarations: Self { + .init(rawValue: "appEncryptionDeclarations") + } + + public static var appEvents: Self { + .init(rawValue: "appEvents") + } + + public static var appInfos: Self { + .init(rawValue: "appInfos") + } + + public static var appPricePoints: Self { + .init(rawValue: "appPricePoints") + } + + public static var appPriceSchedule: Self { + .init(rawValue: "appPriceSchedule") + } + + public static var appStoreVersionExperimentsV2: Self { + .init(rawValue: "appStoreVersionExperimentsV2") + } + + public static var appStoreVersions: Self { + .init(rawValue: "appStoreVersions") + } + + public static var backgroundAssets: Self { + .init(rawValue: "backgroundAssets") + } + + public static var betaAppLocalizations: Self { + .init(rawValue: "betaAppLocalizations") + } + + public static var betaAppReviewDetail: Self { + .init(rawValue: "betaAppReviewDetail") + } + + public static var betaFeedbackCrashSubmissions: Self { + .init(rawValue: "betaFeedbackCrashSubmissions") + } + + public static var betaFeedbackScreenshotSubmissions: Self { + .init(rawValue: "betaFeedbackScreenshotSubmissions") + } + + public static var betaGroups: Self { + .init(rawValue: "betaGroups") + } + + public static var betaLicenseAgreement: Self { + .init(rawValue: "betaLicenseAgreement") + } + + public static var betaTesters: Self { + .init(rawValue: "betaTesters") + } + + public static var builds: Self { + .init(rawValue: "builds") + } + + public static var bundleId: Self { + .init(rawValue: "bundleId") } + public static var ciProduct: Self { + .init(rawValue: "ciProduct") + } + + public static var contentRightsDeclaration: Self { + .init(rawValue: "contentRightsDeclaration") + } + + public static var customerReviewSummarizations: Self { + .init(rawValue: "customerReviewSummarizations") + } + + public static var customerReviews: Self { + .init(rawValue: "customerReviews") + } + + public static var endUserLicenseAgreement: Self { + .init(rawValue: "endUserLicenseAgreement") + } + + public static var gameCenterDetail: Self { + .init(rawValue: "gameCenterDetail") + } + + public static var gameCenterEnabledVersions: Self { + .init(rawValue: "gameCenterEnabledVersions") + } + + public static var inAppPurchases: Self { + .init(rawValue: "inAppPurchases") + } + + public static var inAppPurchasesV2: Self { + .init(rawValue: "inAppPurchasesV2") + } + + public static var isOrEverWasMadeForKids: Self { + .init(rawValue: "isOrEverWasMadeForKids") + } + + public static var marketplaceSearchDetail: Self { + .init(rawValue: "marketplaceSearchDetail") + } + + public static var name: Self { + .init(rawValue: "name") + } + + public static var perfPowerMetrics: Self { + .init(rawValue: "perfPowerMetrics") + } + + public static var preReleaseVersions: Self { + .init(rawValue: "preReleaseVersions") + } + + public static var primaryLocale: Self { + .init(rawValue: "primaryLocale") + } + + public static var promotedPurchases: Self { + .init(rawValue: "promotedPurchases") + } + + public static var reviewSubmissions: Self { + .init(rawValue: "reviewSubmissions") + } + + public static var sku: Self { + .init(rawValue: "sku") + } + + public static var streamlinedPurchasingEnabled: Self { + .init(rawValue: "streamlinedPurchasingEnabled") + } + + public static var subscriptionGracePeriod: Self { + .init(rawValue: "subscriptionGracePeriod") + } + + public static var subscriptionGroups: Self { + .init(rawValue: "subscriptionGroups") + } + + public static var subscriptionStatusUrl: Self { + .init(rawValue: "subscriptionStatusUrl") + } + + public static var subscriptionStatusUrlForSandbox: Self { + .init(rawValue: "subscriptionStatusUrlForSandbox") + } + + public static var subscriptionStatusUrlVersion: Self { + .init(rawValue: "subscriptionStatusUrlVersion") + } + + public static var subscriptionStatusUrlVersionForSandbox: Self { + .init(rawValue: "subscriptionStatusUrlVersionForSandbox") + } + + public static var webhooks: Self { + .init(rawValue: "webhooks") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "appAvailability": self = .appAvailability - case "appClips": self = .appClips - case "appCustomProductPages": self = .appCustomProductPages - case "appEncryptionDeclarations": self = .appEncryptionDeclarations - case "appEvents": self = .appEvents - case "appInfos": self = .appInfos - case "appPricePoints": self = .appPricePoints - case "appPriceSchedule": self = .appPriceSchedule - case "appStoreVersionExperimentsV2": self = .appStoreVersionExperimentsV2 - case "appStoreVersions": self = .appStoreVersions - case "availableInNewTerritories": self = .availableInNewTerritories - case "availableTerritories": self = .availableTerritories - case "betaAppLocalizations": self = .betaAppLocalizations - case "betaAppReviewDetail": self = .betaAppReviewDetail - case "betaGroups": self = .betaGroups - case "betaLicenseAgreement": self = .betaLicenseAgreement - case "betaTesters": self = .betaTesters - case "builds": self = .builds - case "bundleId": self = .bundleId - case "ciProduct": self = .ciProduct - case "contentRightsDeclaration": self = .contentRightsDeclaration - case "customerReviews": self = .customerReviews - case "endUserLicenseAgreement": self = .endUserLicenseAgreement - case "gameCenterDetail": self = .gameCenterDetail - case "gameCenterEnabledVersions": self = .gameCenterEnabledVersions - case "inAppPurchases": self = .inAppPurchases - case "inAppPurchasesV2": self = .inAppPurchasesV2 - case "isOrEverWasMadeForKids": self = .isOrEverWasMadeForKids - case "name": self = .name - case "perfPowerMetrics": self = .perfPowerMetrics - case "preOrder": self = .preOrder - case "preReleaseVersions": self = .preReleaseVersions - case "pricePoints": self = .pricePoints - case "prices": self = .prices - case "primaryLocale": self = .primaryLocale - case "promotedPurchases": self = .promotedPurchases - case "reviewSubmissions": self = .reviewSubmissions - case "sku": self = .sku - case "subscriptionGracePeriod": self = .subscriptionGracePeriod - case "subscriptionGroups": self = .subscriptionGroups - case "subscriptionStatusUrl": self = .subscriptionStatusUrl - case "subscriptionStatusUrlForSandbox": self = .subscriptionStatusUrlForSandbox - case "subscriptionStatusUrlVersion": self = .subscriptionStatusUrlVersion - case "subscriptionStatusUrlVersionForSandbox": self = .subscriptionStatusUrlVersionForSandbox - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum Territories: Hashable, Codable, RawRepresentable { - case currency - case unknown(String) + public struct Territories: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var currency: Self { + .init(rawValue: "currency") + } - public var rawValue: String { - switch self { - case .currency: return "currency" - case .unknown(let rawValue): return rawValue - } + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "currency": self = .currency - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } @@ -354,31 +424,31 @@ extension V1.Apps.ById.AppPriceSchedule.GET { } } - public enum Include: Hashable, Codable, RawRepresentable { - case app - case automaticPrices - case baseTerritory - case manualPrices - case unknown(String) - - public var rawValue: String { - switch self { - case .app: return "app" - case .automaticPrices: return "automaticPrices" - case .baseTerritory: return "baseTerritory" - case .manualPrices: return "manualPrices" - case .unknown(let rawValue): return rawValue - } + public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var app: Self { + .init(rawValue: "app") + } + + public static var automaticPrices: Self { + .init(rawValue: "automaticPrices") } + public static var baseTerritory: Self { + .init(rawValue: "baseTerritory") + } + + public static var manualPrices: Self { + .init(rawValue: "manualPrices") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "app": self = .app - case "automaticPrices": self = .automaticPrices - case "baseTerritory": self = .baseTerritory - case "manualPrices": self = .manualPrices - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/AppStoreVersionExperimentsV2/AppsByIdAppStoreVersionExperimentsV2.GET.839e482.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/AppStoreVersionExperimentsV2/AppsByIdAppStoreVersionExperimentsV2.GET.839e482.generated.swift index 82851e95..460ad4a5 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/AppStoreVersionExperimentsV2/AppsByIdAppStoreVersionExperimentsV2.GET.839e482.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/AppStoreVersionExperimentsV2/AppsByIdAppStoreVersionExperimentsV2.GET.839e482.generated.swift @@ -58,8 +58,10 @@ extension V1.Apps.ById.AppStoreVersionExperimentsV2 { /// - Returns: **200**, List of AppStoreVersionExperiments as `AppStoreVersionExperimentsV2Response` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -73,12 +75,18 @@ extension V1.Apps.ById.AppStoreVersionExperimentsV2 { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 404: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -106,316 +114,423 @@ extension V1.Apps.ById.AppStoreVersionExperimentsV2.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum AppStoreVersionExperimentTreatments: Hashable, Codable, RawRepresentable { - case appIcon - case appIconName - case appStoreVersionExperiment - case appStoreVersionExperimentTreatmentLocalizations - case appStoreVersionExperimentV2 - case name - case promotedDate - case unknown(String) - - public var rawValue: String { - switch self { - case .appIcon: return "appIcon" - case .appIconName: return "appIconName" - case .appStoreVersionExperiment: return "appStoreVersionExperiment" - case .appStoreVersionExperimentTreatmentLocalizations: return "appStoreVersionExperimentTreatmentLocalizations" - case .appStoreVersionExperimentV2: return "appStoreVersionExperimentV2" - case .name: return "name" - case .promotedDate: return "promotedDate" - case .unknown(let rawValue): return rawValue - } + public struct AppStoreVersionExperimentTreatments: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var appIcon: Self { + .init(rawValue: "appIcon") + } + + public static var appIconName: Self { + .init(rawValue: "appIconName") + } + + public static var appStoreVersionExperiment: Self { + .init(rawValue: "appStoreVersionExperiment") + } + + public static var appStoreVersionExperimentTreatmentLocalizations: Self { + .init(rawValue: "appStoreVersionExperimentTreatmentLocalizations") + } + + public static var appStoreVersionExperimentV2: Self { + .init(rawValue: "appStoreVersionExperimentV2") + } + + public static var name: Self { + .init(rawValue: "name") } + public static var promotedDate: Self { + .init(rawValue: "promotedDate") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "appIcon": self = .appIcon - case "appIconName": self = .appIconName - case "appStoreVersionExperiment": self = .appStoreVersionExperiment - case "appStoreVersionExperimentTreatmentLocalizations": self = .appStoreVersionExperimentTreatmentLocalizations - case "appStoreVersionExperimentV2": self = .appStoreVersionExperimentV2 - case "name": self = .name - case "promotedDate": self = .promotedDate - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum AppStoreVersionExperiments: Hashable, Codable, RawRepresentable { - case app - case appStoreVersionExperimentTreatments - case controlVersions - case endDate - case latestControlVersion - case name - case platform - case reviewRequired - case startDate - case started - case state - case trafficProportion - case unknown(String) - - public var rawValue: String { - switch self { - case .app: return "app" - case .appStoreVersionExperimentTreatments: return "appStoreVersionExperimentTreatments" - case .controlVersions: return "controlVersions" - case .endDate: return "endDate" - case .latestControlVersion: return "latestControlVersion" - case .name: return "name" - case .platform: return "platform" - case .reviewRequired: return "reviewRequired" - case .startDate: return "startDate" - case .started: return "started" - case .state: return "state" - case .trafficProportion: return "trafficProportion" - case .unknown(let rawValue): return rawValue - } + public struct AppStoreVersionExperiments: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var app: Self { + .init(rawValue: "app") + } + + public static var appStoreVersionExperimentTreatments: Self { + .init(rawValue: "appStoreVersionExperimentTreatments") + } + + public static var controlVersions: Self { + .init(rawValue: "controlVersions") + } + + public static var endDate: Self { + .init(rawValue: "endDate") + } + + public static var latestControlVersion: Self { + .init(rawValue: "latestControlVersion") + } + + public static var name: Self { + .init(rawValue: "name") + } + + public static var platform: Self { + .init(rawValue: "platform") + } + + public static var reviewRequired: Self { + .init(rawValue: "reviewRequired") + } + + public static var startDate: Self { + .init(rawValue: "startDate") } + public static var state: Self { + .init(rawValue: "state") + } + + public static var trafficProportion: Self { + .init(rawValue: "trafficProportion") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "app": self = .app - case "appStoreVersionExperimentTreatments": self = .appStoreVersionExperimentTreatments - case "controlVersions": self = .controlVersions - case "endDate": self = .endDate - case "latestControlVersion": self = .latestControlVersion - case "name": self = .name - case "platform": self = .platform - case "reviewRequired": self = .reviewRequired - case "startDate": self = .startDate - case "started": self = .started - case "state": self = .state - case "trafficProportion": self = .trafficProportion - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum AppStoreVersions: Hashable, Codable, RawRepresentable { - case ageRatingDeclaration - case app - case appClipDefaultExperience - case appStoreReviewDetail - case appStoreState - case appStoreVersionExperiments - case appStoreVersionExperimentsV2 - case appStoreVersionLocalizations - case appStoreVersionPhasedRelease - case appStoreVersionSubmission - case build - case copyright - case createdDate - case customerReviews - case downloadable - case earliestReleaseDate - case platform - case releaseType - case routingAppCoverage - case versionString - case unknown(String) - - public var rawValue: String { - switch self { - case .ageRatingDeclaration: return "ageRatingDeclaration" - case .app: return "app" - case .appClipDefaultExperience: return "appClipDefaultExperience" - case .appStoreReviewDetail: return "appStoreReviewDetail" - case .appStoreState: return "appStoreState" - case .appStoreVersionExperiments: return "appStoreVersionExperiments" - case .appStoreVersionExperimentsV2: return "appStoreVersionExperimentsV2" - case .appStoreVersionLocalizations: return "appStoreVersionLocalizations" - case .appStoreVersionPhasedRelease: return "appStoreVersionPhasedRelease" - case .appStoreVersionSubmission: return "appStoreVersionSubmission" - case .build: return "build" - case .copyright: return "copyright" - case .createdDate: return "createdDate" - case .customerReviews: return "customerReviews" - case .downloadable: return "downloadable" - case .earliestReleaseDate: return "earliestReleaseDate" - case .platform: return "platform" - case .releaseType: return "releaseType" - case .routingAppCoverage: return "routingAppCoverage" - case .versionString: return "versionString" - case .unknown(let rawValue): return rawValue - } + public struct AppStoreVersions: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var ageRatingDeclaration: Self { + .init(rawValue: "ageRatingDeclaration") + } + + public static var alternativeDistributionPackage: Self { + .init(rawValue: "alternativeDistributionPackage") + } + + public static var app: Self { + .init(rawValue: "app") + } + + public static var appClipDefaultExperience: Self { + .init(rawValue: "appClipDefaultExperience") + } + + public static var appStoreReviewDetail: Self { + .init(rawValue: "appStoreReviewDetail") + } + + public static var appStoreState: Self { + .init(rawValue: "appStoreState") + } + + public static var appStoreVersionExperiments: Self { + .init(rawValue: "appStoreVersionExperiments") + } + + public static var appStoreVersionExperimentsV2: Self { + .init(rawValue: "appStoreVersionExperimentsV2") } + public static var appStoreVersionLocalizations: Self { + .init(rawValue: "appStoreVersionLocalizations") + } + + public static var appStoreVersionPhasedRelease: Self { + .init(rawValue: "appStoreVersionPhasedRelease") + } + + public static var appStoreVersionSubmission: Self { + .init(rawValue: "appStoreVersionSubmission") + } + + public static var appVersionState: Self { + .init(rawValue: "appVersionState") + } + + public static var build: Self { + .init(rawValue: "build") + } + + public static var copyright: Self { + .init(rawValue: "copyright") + } + + public static var createdDate: Self { + .init(rawValue: "createdDate") + } + + public static var customerReviews: Self { + .init(rawValue: "customerReviews") + } + + public static var downloadable: Self { + .init(rawValue: "downloadable") + } + + public static var earliestReleaseDate: Self { + .init(rawValue: "earliestReleaseDate") + } + + public static var gameCenterAppVersion: Self { + .init(rawValue: "gameCenterAppVersion") + } + + public static var platform: Self { + .init(rawValue: "platform") + } + + public static var releaseType: Self { + .init(rawValue: "releaseType") + } + + public static var reviewType: Self { + .init(rawValue: "reviewType") + } + + public static var routingAppCoverage: Self { + .init(rawValue: "routingAppCoverage") + } + + public static var usesIdfa: Self { + .init(rawValue: "usesIdfa") + } + + public static var versionString: Self { + .init(rawValue: "versionString") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "ageRatingDeclaration": self = .ageRatingDeclaration - case "app": self = .app - case "appClipDefaultExperience": self = .appClipDefaultExperience - case "appStoreReviewDetail": self = .appStoreReviewDetail - case "appStoreState": self = .appStoreState - case "appStoreVersionExperiments": self = .appStoreVersionExperiments - case "appStoreVersionExperimentsV2": self = .appStoreVersionExperimentsV2 - case "appStoreVersionLocalizations": self = .appStoreVersionLocalizations - case "appStoreVersionPhasedRelease": self = .appStoreVersionPhasedRelease - case "appStoreVersionSubmission": self = .appStoreVersionSubmission - case "build": self = .build - case "copyright": self = .copyright - case "createdDate": self = .createdDate - case "customerReviews": self = .customerReviews - case "downloadable": self = .downloadable - case "earliestReleaseDate": self = .earliestReleaseDate - case "platform": self = .platform - case "releaseType": self = .releaseType - case "routingAppCoverage": self = .routingAppCoverage - case "versionString": self = .versionString - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum Apps: Hashable, Codable, RawRepresentable { - case appAvailability - case appClips - case appCustomProductPages - case appEncryptionDeclarations - case appEvents - case appInfos - case appPricePoints - case appPriceSchedule - case appStoreVersionExperimentsV2 - case appStoreVersions - case availableInNewTerritories - case availableTerritories - case betaAppLocalizations - case betaAppReviewDetail - case betaGroups - case betaLicenseAgreement - case betaTesters - case builds - case bundleId - case ciProduct - case contentRightsDeclaration - case customerReviews - case endUserLicenseAgreement - case gameCenterDetail - case gameCenterEnabledVersions - case inAppPurchases - case inAppPurchasesV2 - case isOrEverWasMadeForKids - case name - case perfPowerMetrics - case preOrder - case preReleaseVersions - case pricePoints - case prices - case primaryLocale - case promotedPurchases - case reviewSubmissions - case sku - case subscriptionGracePeriod - case subscriptionGroups - case subscriptionStatusUrl - case subscriptionStatusUrlForSandbox - case subscriptionStatusUrlVersion - case subscriptionStatusUrlVersionForSandbox - case unknown(String) - - public var rawValue: String { - switch self { - case .appAvailability: return "appAvailability" - case .appClips: return "appClips" - case .appCustomProductPages: return "appCustomProductPages" - case .appEncryptionDeclarations: return "appEncryptionDeclarations" - case .appEvents: return "appEvents" - case .appInfos: return "appInfos" - case .appPricePoints: return "appPricePoints" - case .appPriceSchedule: return "appPriceSchedule" - case .appStoreVersionExperimentsV2: return "appStoreVersionExperimentsV2" - case .appStoreVersions: return "appStoreVersions" - case .availableInNewTerritories: return "availableInNewTerritories" - case .availableTerritories: return "availableTerritories" - case .betaAppLocalizations: return "betaAppLocalizations" - case .betaAppReviewDetail: return "betaAppReviewDetail" - case .betaGroups: return "betaGroups" - case .betaLicenseAgreement: return "betaLicenseAgreement" - case .betaTesters: return "betaTesters" - case .builds: return "builds" - case .bundleId: return "bundleId" - case .ciProduct: return "ciProduct" - case .contentRightsDeclaration: return "contentRightsDeclaration" - case .customerReviews: return "customerReviews" - case .endUserLicenseAgreement: return "endUserLicenseAgreement" - case .gameCenterDetail: return "gameCenterDetail" - case .gameCenterEnabledVersions: return "gameCenterEnabledVersions" - case .inAppPurchases: return "inAppPurchases" - case .inAppPurchasesV2: return "inAppPurchasesV2" - case .isOrEverWasMadeForKids: return "isOrEverWasMadeForKids" - case .name: return "name" - case .perfPowerMetrics: return "perfPowerMetrics" - case .preOrder: return "preOrder" - case .preReleaseVersions: return "preReleaseVersions" - case .pricePoints: return "pricePoints" - case .prices: return "prices" - case .primaryLocale: return "primaryLocale" - case .promotedPurchases: return "promotedPurchases" - case .reviewSubmissions: return "reviewSubmissions" - case .sku: return "sku" - case .subscriptionGracePeriod: return "subscriptionGracePeriod" - case .subscriptionGroups: return "subscriptionGroups" - case .subscriptionStatusUrl: return "subscriptionStatusUrl" - case .subscriptionStatusUrlForSandbox: return "subscriptionStatusUrlForSandbox" - case .subscriptionStatusUrlVersion: return "subscriptionStatusUrlVersion" - case .subscriptionStatusUrlVersionForSandbox: return "subscriptionStatusUrlVersionForSandbox" - case .unknown(let rawValue): return rawValue - } + public struct Apps: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var accessibilityDeclarations: Self { + .init(rawValue: "accessibilityDeclarations") + } + + public static var accessibilityUrl: Self { + .init(rawValue: "accessibilityUrl") + } + + public static var alternativeDistributionKey: Self { + .init(rawValue: "alternativeDistributionKey") + } + + public static var analyticsReportRequests: Self { + .init(rawValue: "analyticsReportRequests") + } + + public static var appAvailabilityV2: Self { + .init(rawValue: "appAvailabilityV2") + } + + public static var appClips: Self { + .init(rawValue: "appClips") + } + + public static var appCustomProductPages: Self { + .init(rawValue: "appCustomProductPages") + } + + public static var appEncryptionDeclarations: Self { + .init(rawValue: "appEncryptionDeclarations") + } + + public static var appEvents: Self { + .init(rawValue: "appEvents") + } + + public static var appInfos: Self { + .init(rawValue: "appInfos") + } + + public static var appPricePoints: Self { + .init(rawValue: "appPricePoints") + } + + public static var appPriceSchedule: Self { + .init(rawValue: "appPriceSchedule") + } + + public static var appStoreVersionExperimentsV2: Self { + .init(rawValue: "appStoreVersionExperimentsV2") + } + + public static var appStoreVersions: Self { + .init(rawValue: "appStoreVersions") + } + + public static var backgroundAssets: Self { + .init(rawValue: "backgroundAssets") + } + + public static var betaAppLocalizations: Self { + .init(rawValue: "betaAppLocalizations") + } + + public static var betaAppReviewDetail: Self { + .init(rawValue: "betaAppReviewDetail") + } + + public static var betaFeedbackCrashSubmissions: Self { + .init(rawValue: "betaFeedbackCrashSubmissions") + } + + public static var betaFeedbackScreenshotSubmissions: Self { + .init(rawValue: "betaFeedbackScreenshotSubmissions") + } + + public static var betaGroups: Self { + .init(rawValue: "betaGroups") + } + + public static var betaLicenseAgreement: Self { + .init(rawValue: "betaLicenseAgreement") + } + + public static var betaTesters: Self { + .init(rawValue: "betaTesters") + } + + public static var builds: Self { + .init(rawValue: "builds") + } + + public static var bundleId: Self { + .init(rawValue: "bundleId") + } + + public static var ciProduct: Self { + .init(rawValue: "ciProduct") + } + + public static var contentRightsDeclaration: Self { + .init(rawValue: "contentRightsDeclaration") + } + + public static var customerReviewSummarizations: Self { + .init(rawValue: "customerReviewSummarizations") + } + + public static var customerReviews: Self { + .init(rawValue: "customerReviews") + } + + public static var endUserLicenseAgreement: Self { + .init(rawValue: "endUserLicenseAgreement") + } + + public static var gameCenterDetail: Self { + .init(rawValue: "gameCenterDetail") + } + + public static var gameCenterEnabledVersions: Self { + .init(rawValue: "gameCenterEnabledVersions") + } + + public static var inAppPurchases: Self { + .init(rawValue: "inAppPurchases") + } + + public static var inAppPurchasesV2: Self { + .init(rawValue: "inAppPurchasesV2") + } + + public static var isOrEverWasMadeForKids: Self { + .init(rawValue: "isOrEverWasMadeForKids") + } + + public static var marketplaceSearchDetail: Self { + .init(rawValue: "marketplaceSearchDetail") + } + + public static var name: Self { + .init(rawValue: "name") + } + + public static var perfPowerMetrics: Self { + .init(rawValue: "perfPowerMetrics") + } + + public static var preReleaseVersions: Self { + .init(rawValue: "preReleaseVersions") + } + + public static var primaryLocale: Self { + .init(rawValue: "primaryLocale") + } + + public static var promotedPurchases: Self { + .init(rawValue: "promotedPurchases") + } + + public static var reviewSubmissions: Self { + .init(rawValue: "reviewSubmissions") + } + + public static var sku: Self { + .init(rawValue: "sku") + } + + public static var streamlinedPurchasingEnabled: Self { + .init(rawValue: "streamlinedPurchasingEnabled") + } + + public static var subscriptionGracePeriod: Self { + .init(rawValue: "subscriptionGracePeriod") + } + + public static var subscriptionGroups: Self { + .init(rawValue: "subscriptionGroups") + } + + public static var subscriptionStatusUrl: Self { + .init(rawValue: "subscriptionStatusUrl") + } + + public static var subscriptionStatusUrlForSandbox: Self { + .init(rawValue: "subscriptionStatusUrlForSandbox") + } + + public static var subscriptionStatusUrlVersion: Self { + .init(rawValue: "subscriptionStatusUrlVersion") + } + + public static var subscriptionStatusUrlVersionForSandbox: Self { + .init(rawValue: "subscriptionStatusUrlVersionForSandbox") } + public static var webhooks: Self { + .init(rawValue: "webhooks") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "appAvailability": self = .appAvailability - case "appClips": self = .appClips - case "appCustomProductPages": self = .appCustomProductPages - case "appEncryptionDeclarations": self = .appEncryptionDeclarations - case "appEvents": self = .appEvents - case "appInfos": self = .appInfos - case "appPricePoints": self = .appPricePoints - case "appPriceSchedule": self = .appPriceSchedule - case "appStoreVersionExperimentsV2": self = .appStoreVersionExperimentsV2 - case "appStoreVersions": self = .appStoreVersions - case "availableInNewTerritories": self = .availableInNewTerritories - case "availableTerritories": self = .availableTerritories - case "betaAppLocalizations": self = .betaAppLocalizations - case "betaAppReviewDetail": self = .betaAppReviewDetail - case "betaGroups": self = .betaGroups - case "betaLicenseAgreement": self = .betaLicenseAgreement - case "betaTesters": self = .betaTesters - case "builds": self = .builds - case "bundleId": self = .bundleId - case "ciProduct": self = .ciProduct - case "contentRightsDeclaration": self = .contentRightsDeclaration - case "customerReviews": self = .customerReviews - case "endUserLicenseAgreement": self = .endUserLicenseAgreement - case "gameCenterDetail": self = .gameCenterDetail - case "gameCenterEnabledVersions": self = .gameCenterEnabledVersions - case "inAppPurchases": self = .inAppPurchases - case "inAppPurchasesV2": self = .inAppPurchasesV2 - case "isOrEverWasMadeForKids": self = .isOrEverWasMadeForKids - case "name": self = .name - case "perfPowerMetrics": self = .perfPowerMetrics - case "preOrder": self = .preOrder - case "preReleaseVersions": self = .preReleaseVersions - case "pricePoints": self = .pricePoints - case "prices": self = .prices - case "primaryLocale": self = .primaryLocale - case "promotedPurchases": self = .promotedPurchases - case "reviewSubmissions": self = .reviewSubmissions - case "sku": self = .sku - case "subscriptionGracePeriod": self = .subscriptionGracePeriod - case "subscriptionGroups": self = .subscriptionGroups - case "subscriptionStatusUrl": self = .subscriptionStatusUrl - case "subscriptionStatusUrlForSandbox": self = .subscriptionStatusUrlForSandbox - case "subscriptionStatusUrlVersion": self = .subscriptionStatusUrlVersion - case "subscriptionStatusUrlVersionForSandbox": self = .subscriptionStatusUrlVersionForSandbox - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } @@ -456,46 +571,51 @@ extension V1.Apps.ById.AppStoreVersionExperimentsV2.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum State: Hashable, Codable, RawRepresentable { - case accepted - case approved - case completed - case inReview - case prepareForSubmission - case readyForReview - case rejected - case stopped - case waitingForReview - case unknown(String) - - public var rawValue: String { - switch self { - case .accepted: return "ACCEPTED" - case .approved: return "APPROVED" - case .completed: return "COMPLETED" - case .inReview: return "IN_REVIEW" - case .prepareForSubmission: return "PREPARE_FOR_SUBMISSION" - case .readyForReview: return "READY_FOR_REVIEW" - case .rejected: return "REJECTED" - case .stopped: return "STOPPED" - case .waitingForReview: return "WAITING_FOR_REVIEW" - case .unknown(let rawValue): return rawValue - } + public struct State: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var accepted: Self { + .init(rawValue: "ACCEPTED") + } + + public static var approved: Self { + .init(rawValue: "APPROVED") } + public static var completed: Self { + .init(rawValue: "COMPLETED") + } + + public static var inReview: Self { + .init(rawValue: "IN_REVIEW") + } + + public static var prepareForSubmission: Self { + .init(rawValue: "PREPARE_FOR_SUBMISSION") + } + + public static var readyForReview: Self { + .init(rawValue: "READY_FOR_REVIEW") + } + + public static var rejected: Self { + .init(rawValue: "REJECTED") + } + + public static var stopped: Self { + .init(rawValue: "STOPPED") + } + + public static var waitingForReview: Self { + .init(rawValue: "WAITING_FOR_REVIEW") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "ACCEPTED": self = .accepted - case "APPROVED": self = .approved - case "COMPLETED": self = .completed - case "IN_REVIEW": self = .inReview - case "PREPARE_FOR_SUBMISSION": self = .prepareForSubmission - case "READY_FOR_REVIEW": self = .readyForReview - case "REJECTED": self = .rejected - case "STOPPED": self = .stopped - case "WAITING_FOR_REVIEW": self = .waitingForReview - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } @@ -513,31 +633,31 @@ extension V1.Apps.ById.AppStoreVersionExperimentsV2.GET { } } - public enum Include: Hashable, Codable, RawRepresentable { - case app - case appStoreVersionExperimentTreatments - case controlVersions - case latestControlVersion - case unknown(String) - - public var rawValue: String { - switch self { - case .app: return "app" - case .appStoreVersionExperimentTreatments: return "appStoreVersionExperimentTreatments" - case .controlVersions: return "controlVersions" - case .latestControlVersion: return "latestControlVersion" - case .unknown(let rawValue): return rawValue - } + public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var app: Self { + .init(rawValue: "app") + } + + public static var appStoreVersionExperimentTreatments: Self { + .init(rawValue: "appStoreVersionExperimentTreatments") + } + + public static var controlVersions: Self { + .init(rawValue: "controlVersions") + } + + public static var latestControlVersion: Self { + .init(rawValue: "latestControlVersion") } + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "app": self = .app - case "appStoreVersionExperimentTreatments": self = .appStoreVersionExperimentTreatments - case "controlVersions": self = .controlVersions - case "latestControlVersion": self = .latestControlVersion - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/AppStoreVersions/AppsByIdAppStoreVersions.GET.5202570.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/AppStoreVersions/AppsByIdAppStoreVersions.GET.5202570.generated.swift index fc12b521..83dde087 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/AppStoreVersions/AppsByIdAppStoreVersions.GET.5202570.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/AppStoreVersions/AppsByIdAppStoreVersions.GET.5202570.generated.swift @@ -30,6 +30,8 @@ extension V1.Apps.ById.AppStoreVersions { components?.queryItems = [ URLQueryItem(name: "fields[ageRatingDeclarations]", value: parameters.fields[.ageRatingDeclarations]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "fields[alternativeDistributionPackages]", + value: parameters.fields[.alternativeDistributionPackages]?.map { "\($0)" }.joined(separator: ",")), URLQueryItem(name: "fields[appClipDefaultExperiences]", value: parameters.fields[.appClipDefaultExperiences]?.map { "\($0)" }.joined(separator: ",")), URLQueryItem(name: "fields[appStoreReviewDetails]", @@ -48,10 +50,14 @@ extension V1.Apps.ById.AppStoreVersions { value: parameters.fields[.apps]?.map { "\($0)" }.joined(separator: ",")), URLQueryItem(name: "fields[builds]", value: parameters.fields[.builds]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "fields[gameCenterAppVersions]", + value: parameters.fields[.gameCenterAppVersions]?.map { "\($0)" }.joined(separator: ",")), URLQueryItem(name: "fields[routingAppCoverages]", value: parameters.fields[.routingAppCoverages]?.map { "\($0)" }.joined(separator: ",")), URLQueryItem(name: "filter[appStoreState]", value: parameters.filter[.appStoreState]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "filter[appVersionState]", + value: parameters.filter[.appVersionState]?.map { "\($0)" }.joined(separator: ",")), URLQueryItem(name: "filter[id]", value: parameters.filter[.id]?.map { "\($0)" }.joined(separator: ",")), URLQueryItem(name: "filter[platform]", @@ -80,8 +86,10 @@ extension V1.Apps.ById.AppStoreVersions { /// - Returns: **200**, List of AppStoreVersions as `AppStoreVersionsResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -95,12 +103,18 @@ extension V1.Apps.ById.AppStoreVersions { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 404: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -128,650 +142,835 @@ extension V1.Apps.ById.AppStoreVersions.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum AgeRatingDeclarations: Hashable, Codable, RawRepresentable { - case alcoholTobaccoOrDrugUseOrReferences - case contests - case gambling - case gamblingAndContests - case gamblingSimulated - case horrorOrFearThemes - case kidsAgeBand - case matureOrSuggestiveThemes - case medicalOrTreatmentInformation - case profanityOrCrudeHumor - case seventeenPlus - case sexualContentGraphicAndNudity - case sexualContentOrNudity - case unrestrictedWebAccess - case violenceCartoonOrFantasy - case violenceRealistic - case violenceRealisticProlongedGraphicOrSadistic - case unknown(String) - - public var rawValue: String { - switch self { - case .alcoholTobaccoOrDrugUseOrReferences: return "alcoholTobaccoOrDrugUseOrReferences" - case .contests: return "contests" - case .gambling: return "gambling" - case .gamblingAndContests: return "gamblingAndContests" - case .gamblingSimulated: return "gamblingSimulated" - case .horrorOrFearThemes: return "horrorOrFearThemes" - case .kidsAgeBand: return "kidsAgeBand" - case .matureOrSuggestiveThemes: return "matureOrSuggestiveThemes" - case .medicalOrTreatmentInformation: return "medicalOrTreatmentInformation" - case .profanityOrCrudeHumor: return "profanityOrCrudeHumor" - case .seventeenPlus: return "seventeenPlus" - case .sexualContentGraphicAndNudity: return "sexualContentGraphicAndNudity" - case .sexualContentOrNudity: return "sexualContentOrNudity" - case .unrestrictedWebAccess: return "unrestrictedWebAccess" - case .violenceCartoonOrFantasy: return "violenceCartoonOrFantasy" - case .violenceRealistic: return "violenceRealistic" - case .violenceRealisticProlongedGraphicOrSadistic: return "violenceRealisticProlongedGraphicOrSadistic" - case .unknown(let rawValue): return rawValue - } + public struct AgeRatingDeclarations: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var alcoholTobaccoOrDrugUseOrReferences: Self { + .init(rawValue: "alcoholTobaccoOrDrugUseOrReferences") + } + + public static var contests: Self { + .init(rawValue: "contests") + } + + public static var gambling: Self { + .init(rawValue: "gambling") + } + + public static var gamblingSimulated: Self { + .init(rawValue: "gamblingSimulated") + } + + public static var horrorOrFearThemes: Self { + .init(rawValue: "horrorOrFearThemes") + } + + public static var kidsAgeBand: Self { + .init(rawValue: "kidsAgeBand") + } + + public static var koreaAgeRatingOverride: Self { + .init(rawValue: "koreaAgeRatingOverride") } + public static var lootBox: Self { + .init(rawValue: "lootBox") + } + + public static var matureOrSuggestiveThemes: Self { + .init(rawValue: "matureOrSuggestiveThemes") + } + + public static var medicalOrTreatmentInformation: Self { + .init(rawValue: "medicalOrTreatmentInformation") + } + + public static var profanityOrCrudeHumor: Self { + .init(rawValue: "profanityOrCrudeHumor") + } + + public static var sexualContentGraphicAndNudity: Self { + .init(rawValue: "sexualContentGraphicAndNudity") + } + + public static var sexualContentOrNudity: Self { + .init(rawValue: "sexualContentOrNudity") + } + + public static var unrestrictedWebAccess: Self { + .init(rawValue: "unrestrictedWebAccess") + } + + public static var violenceCartoonOrFantasy: Self { + .init(rawValue: "violenceCartoonOrFantasy") + } + + public static var violenceRealistic: Self { + .init(rawValue: "violenceRealistic") + } + + public static var violenceRealisticProlongedGraphicOrSadistic: Self { + .init(rawValue: "violenceRealisticProlongedGraphicOrSadistic") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "alcoholTobaccoOrDrugUseOrReferences": self = .alcoholTobaccoOrDrugUseOrReferences - case "contests": self = .contests - case "gambling": self = .gambling - case "gamblingAndContests": self = .gamblingAndContests - case "gamblingSimulated": self = .gamblingSimulated - case "horrorOrFearThemes": self = .horrorOrFearThemes - case "kidsAgeBand": self = .kidsAgeBand - case "matureOrSuggestiveThemes": self = .matureOrSuggestiveThemes - case "medicalOrTreatmentInformation": self = .medicalOrTreatmentInformation - case "profanityOrCrudeHumor": self = .profanityOrCrudeHumor - case "seventeenPlus": self = .seventeenPlus - case "sexualContentGraphicAndNudity": self = .sexualContentGraphicAndNudity - case "sexualContentOrNudity": self = .sexualContentOrNudity - case "unrestrictedWebAccess": self = .unrestrictedWebAccess - case "violenceCartoonOrFantasy": self = .violenceCartoonOrFantasy - case "violenceRealistic": self = .violenceRealistic - case "violenceRealisticProlongedGraphicOrSadistic": self = .violenceRealisticProlongedGraphicOrSadistic - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum AppClipDefaultExperiences: Hashable, Codable, RawRepresentable { - case action - case appClip - case appClipAppStoreReviewDetail - case appClipDefaultExperienceLocalizations - case appClipDefaultExperienceTemplate - case releaseWithAppStoreVersion - case unknown(String) - - public var rawValue: String { - switch self { - case .action: return "action" - case .appClip: return "appClip" - case .appClipAppStoreReviewDetail: return "appClipAppStoreReviewDetail" - case .appClipDefaultExperienceLocalizations: return "appClipDefaultExperienceLocalizations" - case .appClipDefaultExperienceTemplate: return "appClipDefaultExperienceTemplate" - case .releaseWithAppStoreVersion: return "releaseWithAppStoreVersion" - case .unknown(let rawValue): return rawValue - } + public struct AlternativeDistributionPackages: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var versions: Self { + .init(rawValue: "versions") } + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "action": self = .action - case "appClip": self = .appClip - case "appClipAppStoreReviewDetail": self = .appClipAppStoreReviewDetail - case "appClipDefaultExperienceLocalizations": self = .appClipDefaultExperienceLocalizations - case "appClipDefaultExperienceTemplate": self = .appClipDefaultExperienceTemplate - case "releaseWithAppStoreVersion": self = .releaseWithAppStoreVersion - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum AppStoreReviewDetails: Hashable, Codable, RawRepresentable { - case appStoreReviewAttachments - case appStoreVersion - case contactEmail - case contactFirstName - case contactLastName - case contactPhone - case demoAccountName - case demoAccountPassword - case demoAccountRequired - case notes - case unknown(String) - - public var rawValue: String { - switch self { - case .appStoreReviewAttachments: return "appStoreReviewAttachments" - case .appStoreVersion: return "appStoreVersion" - case .contactEmail: return "contactEmail" - case .contactFirstName: return "contactFirstName" - case .contactLastName: return "contactLastName" - case .contactPhone: return "contactPhone" - case .demoAccountName: return "demoAccountName" - case .demoAccountPassword: return "demoAccountPassword" - case .demoAccountRequired: return "demoAccountRequired" - case .notes: return "notes" - case .unknown(let rawValue): return rawValue - } + public struct AppClipDefaultExperiences: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var action: Self { + .init(rawValue: "action") + } + + public static var appClip: Self { + .init(rawValue: "appClip") + } + + public static var appClipAppStoreReviewDetail: Self { + .init(rawValue: "appClipAppStoreReviewDetail") } + public static var appClipDefaultExperienceLocalizations: Self { + .init(rawValue: "appClipDefaultExperienceLocalizations") + } + + public static var releaseWithAppStoreVersion: Self { + .init(rawValue: "releaseWithAppStoreVersion") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "appStoreReviewAttachments": self = .appStoreReviewAttachments - case "appStoreVersion": self = .appStoreVersion - case "contactEmail": self = .contactEmail - case "contactFirstName": self = .contactFirstName - case "contactLastName": self = .contactLastName - case "contactPhone": self = .contactPhone - case "demoAccountName": self = .demoAccountName - case "demoAccountPassword": self = .demoAccountPassword - case "demoAccountRequired": self = .demoAccountRequired - case "notes": self = .notes - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum AppStoreVersionExperiments: Hashable, Codable, RawRepresentable { - case app - case appStoreVersion - case appStoreVersionExperimentTreatments - case controlVersions - case endDate - case latestControlVersion - case name - case platform - case reviewRequired - case startDate - case started - case state - case trafficProportion - case unknown(String) - - public var rawValue: String { - switch self { - case .app: return "app" - case .appStoreVersion: return "appStoreVersion" - case .appStoreVersionExperimentTreatments: return "appStoreVersionExperimentTreatments" - case .controlVersions: return "controlVersions" - case .endDate: return "endDate" - case .latestControlVersion: return "latestControlVersion" - case .name: return "name" - case .platform: return "platform" - case .reviewRequired: return "reviewRequired" - case .startDate: return "startDate" - case .started: return "started" - case .state: return "state" - case .trafficProportion: return "trafficProportion" - case .unknown(let rawValue): return rawValue - } + public struct AppStoreReviewDetails: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var appStoreReviewAttachments: Self { + .init(rawValue: "appStoreReviewAttachments") + } + + public static var appStoreVersion: Self { + .init(rawValue: "appStoreVersion") + } + + public static var contactEmail: Self { + .init(rawValue: "contactEmail") + } + + public static var contactFirstName: Self { + .init(rawValue: "contactFirstName") + } + + public static var contactLastName: Self { + .init(rawValue: "contactLastName") } + public static var contactPhone: Self { + .init(rawValue: "contactPhone") + } + + public static var demoAccountName: Self { + .init(rawValue: "demoAccountName") + } + + public static var demoAccountPassword: Self { + .init(rawValue: "demoAccountPassword") + } + + public static var demoAccountRequired: Self { + .init(rawValue: "demoAccountRequired") + } + + public static var notes: Self { + .init(rawValue: "notes") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "app": self = .app - case "appStoreVersion": self = .appStoreVersion - case "appStoreVersionExperimentTreatments": self = .appStoreVersionExperimentTreatments - case "controlVersions": self = .controlVersions - case "endDate": self = .endDate - case "latestControlVersion": self = .latestControlVersion - case "name": self = .name - case "platform": self = .platform - case "reviewRequired": self = .reviewRequired - case "startDate": self = .startDate - case "started": self = .started - case "state": self = .state - case "trafficProportion": self = .trafficProportion - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum AppStoreVersionLocalizations: Hashable, Codable, RawRepresentable { - case appPreviewSets - case appScreenshotSets - case appStoreVersion - case description - case keywords - case locale - case marketingUrl - case promotionalText - case supportUrl - case whatsNew - case unknown(String) - - public var rawValue: String { - switch self { - case .appPreviewSets: return "appPreviewSets" - case .appScreenshotSets: return "appScreenshotSets" - case .appStoreVersion: return "appStoreVersion" - case .description: return "description" - case .keywords: return "keywords" - case .locale: return "locale" - case .marketingUrl: return "marketingUrl" - case .promotionalText: return "promotionalText" - case .supportUrl: return "supportUrl" - case .whatsNew: return "whatsNew" - case .unknown(let rawValue): return rawValue - } + public struct AppStoreVersionExperiments: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var app: Self { + .init(rawValue: "app") + } + + public static var appStoreVersion: Self { + .init(rawValue: "appStoreVersion") + } + + public static var appStoreVersionExperimentTreatments: Self { + .init(rawValue: "appStoreVersionExperimentTreatments") + } + + public static var controlVersions: Self { + .init(rawValue: "controlVersions") + } + + public static var endDate: Self { + .init(rawValue: "endDate") + } + + public static var latestControlVersion: Self { + .init(rawValue: "latestControlVersion") + } + + public static var name: Self { + .init(rawValue: "name") + } + + public static var platform: Self { + .init(rawValue: "platform") + } + + public static var reviewRequired: Self { + .init(rawValue: "reviewRequired") + } + + public static var startDate: Self { + .init(rawValue: "startDate") } + public static var state: Self { + .init(rawValue: "state") + } + + public static var trafficProportion: Self { + .init(rawValue: "trafficProportion") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "appPreviewSets": self = .appPreviewSets - case "appScreenshotSets": self = .appScreenshotSets - case "appStoreVersion": self = .appStoreVersion - case "description": self = .description - case "keywords": self = .keywords - case "locale": self = .locale - case "marketingUrl": self = .marketingUrl - case "promotionalText": self = .promotionalText - case "supportUrl": self = .supportUrl - case "whatsNew": self = .whatsNew - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum AppStoreVersionPhasedReleases: Hashable, Codable, RawRepresentable { - case appStoreVersion - case currentDayNumber - case phasedReleaseState - case startDate - case totalPauseDuration - case unknown(String) - - public var rawValue: String { - switch self { - case .appStoreVersion: return "appStoreVersion" - case .currentDayNumber: return "currentDayNumber" - case .phasedReleaseState: return "phasedReleaseState" - case .startDate: return "startDate" - case .totalPauseDuration: return "totalPauseDuration" - case .unknown(let rawValue): return rawValue - } + public struct AppStoreVersionLocalizations: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var appPreviewSets: Self { + .init(rawValue: "appPreviewSets") + } + + public static var appScreenshotSets: Self { + .init(rawValue: "appScreenshotSets") + } + + public static var appStoreVersion: Self { + .init(rawValue: "appStoreVersion") + } + + public static var description: Self { + .init(rawValue: "description") + } + + public static var keywords: Self { + .init(rawValue: "keywords") } + public static var locale: Self { + .init(rawValue: "locale") + } + + public static var marketingUrl: Self { + .init(rawValue: "marketingUrl") + } + + public static var promotionalText: Self { + .init(rawValue: "promotionalText") + } + + public static var supportUrl: Self { + .init(rawValue: "supportUrl") + } + + public static var whatsNew: Self { + .init(rawValue: "whatsNew") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "appStoreVersion": self = .appStoreVersion - case "currentDayNumber": self = .currentDayNumber - case "phasedReleaseState": self = .phasedReleaseState - case "startDate": self = .startDate - case "totalPauseDuration": self = .totalPauseDuration - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum AppStoreVersionSubmissions: Hashable, Codable, RawRepresentable { - case appStoreVersion - case unknown(String) + public struct AppStoreVersionPhasedReleases: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var currentDayNumber: Self { + .init(rawValue: "currentDayNumber") + } + + public static var phasedReleaseState: Self { + .init(rawValue: "phasedReleaseState") + } + + public static var startDate: Self { + .init(rawValue: "startDate") + } + + public static var totalPauseDuration: Self { + .init(rawValue: "totalPauseDuration") + } - public var rawValue: String { - switch self { - case .appStoreVersion: return "appStoreVersion" - case .unknown(let rawValue): return rawValue - } + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "appStoreVersion": self = .appStoreVersion - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum AppStoreVersions: Hashable, Codable, RawRepresentable { - case ageRatingDeclaration - case app - case appClipDefaultExperience - case appStoreReviewDetail - case appStoreState - case appStoreVersionExperiments - case appStoreVersionExperimentsV2 - case appStoreVersionLocalizations - case appStoreVersionPhasedRelease - case appStoreVersionSubmission - case build - case copyright - case createdDate - case customerReviews - case downloadable - case earliestReleaseDate - case platform - case releaseType - case routingAppCoverage - case versionString - case unknown(String) - - public var rawValue: String { - switch self { - case .ageRatingDeclaration: return "ageRatingDeclaration" - case .app: return "app" - case .appClipDefaultExperience: return "appClipDefaultExperience" - case .appStoreReviewDetail: return "appStoreReviewDetail" - case .appStoreState: return "appStoreState" - case .appStoreVersionExperiments: return "appStoreVersionExperiments" - case .appStoreVersionExperimentsV2: return "appStoreVersionExperimentsV2" - case .appStoreVersionLocalizations: return "appStoreVersionLocalizations" - case .appStoreVersionPhasedRelease: return "appStoreVersionPhasedRelease" - case .appStoreVersionSubmission: return "appStoreVersionSubmission" - case .build: return "build" - case .copyright: return "copyright" - case .createdDate: return "createdDate" - case .customerReviews: return "customerReviews" - case .downloadable: return "downloadable" - case .earliestReleaseDate: return "earliestReleaseDate" - case .platform: return "platform" - case .releaseType: return "releaseType" - case .routingAppCoverage: return "routingAppCoverage" - case .versionString: return "versionString" - case .unknown(let rawValue): return rawValue - } + public struct AppStoreVersionSubmissions: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var appStoreVersion: Self { + .init(rawValue: "appStoreVersion") + } + + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "ageRatingDeclaration": self = .ageRatingDeclaration - case "app": self = .app - case "appClipDefaultExperience": self = .appClipDefaultExperience - case "appStoreReviewDetail": self = .appStoreReviewDetail - case "appStoreState": self = .appStoreState - case "appStoreVersionExperiments": self = .appStoreVersionExperiments - case "appStoreVersionExperimentsV2": self = .appStoreVersionExperimentsV2 - case "appStoreVersionLocalizations": self = .appStoreVersionLocalizations - case "appStoreVersionPhasedRelease": self = .appStoreVersionPhasedRelease - case "appStoreVersionSubmission": self = .appStoreVersionSubmission - case "build": self = .build - case "copyright": self = .copyright - case "createdDate": self = .createdDate - case "customerReviews": self = .customerReviews - case "downloadable": self = .downloadable - case "earliestReleaseDate": self = .earliestReleaseDate - case "platform": self = .platform - case "releaseType": self = .releaseType - case "routingAppCoverage": self = .routingAppCoverage - case "versionString": self = .versionString - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum Apps: Hashable, Codable, RawRepresentable { - case appAvailability - case appClips - case appCustomProductPages - case appEncryptionDeclarations - case appEvents - case appInfos - case appPricePoints - case appPriceSchedule - case appStoreVersionExperimentsV2 - case appStoreVersions - case availableInNewTerritories - case availableTerritories - case betaAppLocalizations - case betaAppReviewDetail - case betaGroups - case betaLicenseAgreement - case betaTesters - case builds - case bundleId - case ciProduct - case contentRightsDeclaration - case customerReviews - case endUserLicenseAgreement - case gameCenterDetail - case gameCenterEnabledVersions - case inAppPurchases - case inAppPurchasesV2 - case isOrEverWasMadeForKids - case name - case perfPowerMetrics - case preOrder - case preReleaseVersions - case pricePoints - case prices - case primaryLocale - case promotedPurchases - case reviewSubmissions - case sku - case subscriptionGracePeriod - case subscriptionGroups - case subscriptionStatusUrl - case subscriptionStatusUrlForSandbox - case subscriptionStatusUrlVersion - case subscriptionStatusUrlVersionForSandbox - case unknown(String) - - public var rawValue: String { - switch self { - case .appAvailability: return "appAvailability" - case .appClips: return "appClips" - case .appCustomProductPages: return "appCustomProductPages" - case .appEncryptionDeclarations: return "appEncryptionDeclarations" - case .appEvents: return "appEvents" - case .appInfos: return "appInfos" - case .appPricePoints: return "appPricePoints" - case .appPriceSchedule: return "appPriceSchedule" - case .appStoreVersionExperimentsV2: return "appStoreVersionExperimentsV2" - case .appStoreVersions: return "appStoreVersions" - case .availableInNewTerritories: return "availableInNewTerritories" - case .availableTerritories: return "availableTerritories" - case .betaAppLocalizations: return "betaAppLocalizations" - case .betaAppReviewDetail: return "betaAppReviewDetail" - case .betaGroups: return "betaGroups" - case .betaLicenseAgreement: return "betaLicenseAgreement" - case .betaTesters: return "betaTesters" - case .builds: return "builds" - case .bundleId: return "bundleId" - case .ciProduct: return "ciProduct" - case .contentRightsDeclaration: return "contentRightsDeclaration" - case .customerReviews: return "customerReviews" - case .endUserLicenseAgreement: return "endUserLicenseAgreement" - case .gameCenterDetail: return "gameCenterDetail" - case .gameCenterEnabledVersions: return "gameCenterEnabledVersions" - case .inAppPurchases: return "inAppPurchases" - case .inAppPurchasesV2: return "inAppPurchasesV2" - case .isOrEverWasMadeForKids: return "isOrEverWasMadeForKids" - case .name: return "name" - case .perfPowerMetrics: return "perfPowerMetrics" - case .preOrder: return "preOrder" - case .preReleaseVersions: return "preReleaseVersions" - case .pricePoints: return "pricePoints" - case .prices: return "prices" - case .primaryLocale: return "primaryLocale" - case .promotedPurchases: return "promotedPurchases" - case .reviewSubmissions: return "reviewSubmissions" - case .sku: return "sku" - case .subscriptionGracePeriod: return "subscriptionGracePeriod" - case .subscriptionGroups: return "subscriptionGroups" - case .subscriptionStatusUrl: return "subscriptionStatusUrl" - case .subscriptionStatusUrlForSandbox: return "subscriptionStatusUrlForSandbox" - case .subscriptionStatusUrlVersion: return "subscriptionStatusUrlVersion" - case .subscriptionStatusUrlVersionForSandbox: return "subscriptionStatusUrlVersionForSandbox" - case .unknown(let rawValue): return rawValue - } + public struct AppStoreVersions: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var ageRatingDeclaration: Self { + .init(rawValue: "ageRatingDeclaration") + } + + public static var alternativeDistributionPackage: Self { + .init(rawValue: "alternativeDistributionPackage") + } + + public static var app: Self { + .init(rawValue: "app") + } + + public static var appClipDefaultExperience: Self { + .init(rawValue: "appClipDefaultExperience") + } + + public static var appStoreReviewDetail: Self { + .init(rawValue: "appStoreReviewDetail") + } + + public static var appStoreState: Self { + .init(rawValue: "appStoreState") + } + + public static var appStoreVersionExperiments: Self { + .init(rawValue: "appStoreVersionExperiments") + } + + public static var appStoreVersionExperimentsV2: Self { + .init(rawValue: "appStoreVersionExperimentsV2") + } + + public static var appStoreVersionLocalizations: Self { + .init(rawValue: "appStoreVersionLocalizations") + } + + public static var appStoreVersionPhasedRelease: Self { + .init(rawValue: "appStoreVersionPhasedRelease") + } + + public static var appStoreVersionSubmission: Self { + .init(rawValue: "appStoreVersionSubmission") + } + + public static var appVersionState: Self { + .init(rawValue: "appVersionState") } + public static var build: Self { + .init(rawValue: "build") + } + + public static var copyright: Self { + .init(rawValue: "copyright") + } + + public static var createdDate: Self { + .init(rawValue: "createdDate") + } + + public static var customerReviews: Self { + .init(rawValue: "customerReviews") + } + + public static var downloadable: Self { + .init(rawValue: "downloadable") + } + + public static var earliestReleaseDate: Self { + .init(rawValue: "earliestReleaseDate") + } + + public static var gameCenterAppVersion: Self { + .init(rawValue: "gameCenterAppVersion") + } + + public static var platform: Self { + .init(rawValue: "platform") + } + + public static var releaseType: Self { + .init(rawValue: "releaseType") + } + + public static var reviewType: Self { + .init(rawValue: "reviewType") + } + + public static var routingAppCoverage: Self { + .init(rawValue: "routingAppCoverage") + } + + public static var usesIdfa: Self { + .init(rawValue: "usesIdfa") + } + + public static var versionString: Self { + .init(rawValue: "versionString") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "appAvailability": self = .appAvailability - case "appClips": self = .appClips - case "appCustomProductPages": self = .appCustomProductPages - case "appEncryptionDeclarations": self = .appEncryptionDeclarations - case "appEvents": self = .appEvents - case "appInfos": self = .appInfos - case "appPricePoints": self = .appPricePoints - case "appPriceSchedule": self = .appPriceSchedule - case "appStoreVersionExperimentsV2": self = .appStoreVersionExperimentsV2 - case "appStoreVersions": self = .appStoreVersions - case "availableInNewTerritories": self = .availableInNewTerritories - case "availableTerritories": self = .availableTerritories - case "betaAppLocalizations": self = .betaAppLocalizations - case "betaAppReviewDetail": self = .betaAppReviewDetail - case "betaGroups": self = .betaGroups - case "betaLicenseAgreement": self = .betaLicenseAgreement - case "betaTesters": self = .betaTesters - case "builds": self = .builds - case "bundleId": self = .bundleId - case "ciProduct": self = .ciProduct - case "contentRightsDeclaration": self = .contentRightsDeclaration - case "customerReviews": self = .customerReviews - case "endUserLicenseAgreement": self = .endUserLicenseAgreement - case "gameCenterDetail": self = .gameCenterDetail - case "gameCenterEnabledVersions": self = .gameCenterEnabledVersions - case "inAppPurchases": self = .inAppPurchases - case "inAppPurchasesV2": self = .inAppPurchasesV2 - case "isOrEverWasMadeForKids": self = .isOrEverWasMadeForKids - case "name": self = .name - case "perfPowerMetrics": self = .perfPowerMetrics - case "preOrder": self = .preOrder - case "preReleaseVersions": self = .preReleaseVersions - case "pricePoints": self = .pricePoints - case "prices": self = .prices - case "primaryLocale": self = .primaryLocale - case "promotedPurchases": self = .promotedPurchases - case "reviewSubmissions": self = .reviewSubmissions - case "sku": self = .sku - case "subscriptionGracePeriod": self = .subscriptionGracePeriod - case "subscriptionGroups": self = .subscriptionGroups - case "subscriptionStatusUrl": self = .subscriptionStatusUrl - case "subscriptionStatusUrlForSandbox": self = .subscriptionStatusUrlForSandbox - case "subscriptionStatusUrlVersion": self = .subscriptionStatusUrlVersion - case "subscriptionStatusUrlVersionForSandbox": self = .subscriptionStatusUrlVersionForSandbox - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum Builds: Hashable, Codable, RawRepresentable { - case app - case appEncryptionDeclaration - case appStoreVersion - case betaAppReviewSubmission - case betaBuildLocalizations - case betaGroups - case buildAudienceType - case buildBetaDetail - case buildBundles - case computedMinMacOsVersion - case diagnosticSignatures - case expirationDate - case expired - case iconAssetToken - case icons - case individualTesters - case lsMinimumSystemVersion - case minOsVersion - case perfPowerMetrics - case preReleaseVersion - case processingState - case uploadedDate - case usesNonExemptEncryption - case version - case unknown(String) - - public var rawValue: String { - switch self { - case .app: return "app" - case .appEncryptionDeclaration: return "appEncryptionDeclaration" - case .appStoreVersion: return "appStoreVersion" - case .betaAppReviewSubmission: return "betaAppReviewSubmission" - case .betaBuildLocalizations: return "betaBuildLocalizations" - case .betaGroups: return "betaGroups" - case .buildAudienceType: return "buildAudienceType" - case .buildBetaDetail: return "buildBetaDetail" - case .buildBundles: return "buildBundles" - case .computedMinMacOsVersion: return "computedMinMacOsVersion" - case .diagnosticSignatures: return "diagnosticSignatures" - case .expirationDate: return "expirationDate" - case .expired: return "expired" - case .iconAssetToken: return "iconAssetToken" - case .icons: return "icons" - case .individualTesters: return "individualTesters" - case .lsMinimumSystemVersion: return "lsMinimumSystemVersion" - case .minOsVersion: return "minOsVersion" - case .perfPowerMetrics: return "perfPowerMetrics" - case .preReleaseVersion: return "preReleaseVersion" - case .processingState: return "processingState" - case .uploadedDate: return "uploadedDate" - case .usesNonExemptEncryption: return "usesNonExemptEncryption" - case .version: return "version" - case .unknown(let rawValue): return rawValue - } + public struct Apps: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var accessibilityDeclarations: Self { + .init(rawValue: "accessibilityDeclarations") + } + + public static var accessibilityUrl: Self { + .init(rawValue: "accessibilityUrl") + } + + public static var alternativeDistributionKey: Self { + .init(rawValue: "alternativeDistributionKey") + } + + public static var analyticsReportRequests: Self { + .init(rawValue: "analyticsReportRequests") + } + + public static var appAvailabilityV2: Self { + .init(rawValue: "appAvailabilityV2") + } + + public static var appClips: Self { + .init(rawValue: "appClips") + } + + public static var appCustomProductPages: Self { + .init(rawValue: "appCustomProductPages") + } + + public static var appEncryptionDeclarations: Self { + .init(rawValue: "appEncryptionDeclarations") + } + + public static var appEvents: Self { + .init(rawValue: "appEvents") + } + + public static var appInfos: Self { + .init(rawValue: "appInfos") + } + + public static var appPricePoints: Self { + .init(rawValue: "appPricePoints") + } + + public static var appPriceSchedule: Self { + .init(rawValue: "appPriceSchedule") + } + + public static var appStoreVersionExperimentsV2: Self { + .init(rawValue: "appStoreVersionExperimentsV2") + } + + public static var appStoreVersions: Self { + .init(rawValue: "appStoreVersions") + } + + public static var backgroundAssets: Self { + .init(rawValue: "backgroundAssets") + } + + public static var betaAppLocalizations: Self { + .init(rawValue: "betaAppLocalizations") + } + + public static var betaAppReviewDetail: Self { + .init(rawValue: "betaAppReviewDetail") + } + + public static var betaFeedbackCrashSubmissions: Self { + .init(rawValue: "betaFeedbackCrashSubmissions") + } + + public static var betaFeedbackScreenshotSubmissions: Self { + .init(rawValue: "betaFeedbackScreenshotSubmissions") + } + + public static var betaGroups: Self { + .init(rawValue: "betaGroups") + } + + public static var betaLicenseAgreement: Self { + .init(rawValue: "betaLicenseAgreement") + } + + public static var betaTesters: Self { + .init(rawValue: "betaTesters") + } + + public static var builds: Self { + .init(rawValue: "builds") + } + + public static var bundleId: Self { + .init(rawValue: "bundleId") + } + + public static var ciProduct: Self { + .init(rawValue: "ciProduct") + } + + public static var contentRightsDeclaration: Self { + .init(rawValue: "contentRightsDeclaration") + } + + public static var customerReviewSummarizations: Self { + .init(rawValue: "customerReviewSummarizations") + } + + public static var customerReviews: Self { + .init(rawValue: "customerReviews") + } + + public static var endUserLicenseAgreement: Self { + .init(rawValue: "endUserLicenseAgreement") + } + + public static var gameCenterDetail: Self { + .init(rawValue: "gameCenterDetail") + } + + public static var gameCenterEnabledVersions: Self { + .init(rawValue: "gameCenterEnabledVersions") + } + + public static var inAppPurchases: Self { + .init(rawValue: "inAppPurchases") } + public static var inAppPurchasesV2: Self { + .init(rawValue: "inAppPurchasesV2") + } + + public static var isOrEverWasMadeForKids: Self { + .init(rawValue: "isOrEverWasMadeForKids") + } + + public static var marketplaceSearchDetail: Self { + .init(rawValue: "marketplaceSearchDetail") + } + + public static var name: Self { + .init(rawValue: "name") + } + + public static var perfPowerMetrics: Self { + .init(rawValue: "perfPowerMetrics") + } + + public static var preReleaseVersions: Self { + .init(rawValue: "preReleaseVersions") + } + + public static var primaryLocale: Self { + .init(rawValue: "primaryLocale") + } + + public static var promotedPurchases: Self { + .init(rawValue: "promotedPurchases") + } + + public static var reviewSubmissions: Self { + .init(rawValue: "reviewSubmissions") + } + + public static var sku: Self { + .init(rawValue: "sku") + } + + public static var streamlinedPurchasingEnabled: Self { + .init(rawValue: "streamlinedPurchasingEnabled") + } + + public static var subscriptionGracePeriod: Self { + .init(rawValue: "subscriptionGracePeriod") + } + + public static var subscriptionGroups: Self { + .init(rawValue: "subscriptionGroups") + } + + public static var subscriptionStatusUrl: Self { + .init(rawValue: "subscriptionStatusUrl") + } + + public static var subscriptionStatusUrlForSandbox: Self { + .init(rawValue: "subscriptionStatusUrlForSandbox") + } + + public static var subscriptionStatusUrlVersion: Self { + .init(rawValue: "subscriptionStatusUrlVersion") + } + + public static var subscriptionStatusUrlVersionForSandbox: Self { + .init(rawValue: "subscriptionStatusUrlVersionForSandbox") + } + + public static var webhooks: Self { + .init(rawValue: "webhooks") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct Builds: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var app: Self { + .init(rawValue: "app") + } + + public static var appEncryptionDeclaration: Self { + .init(rawValue: "appEncryptionDeclaration") + } + + public static var appStoreVersion: Self { + .init(rawValue: "appStoreVersion") + } + + public static var betaAppReviewSubmission: Self { + .init(rawValue: "betaAppReviewSubmission") + } + + public static var betaBuildLocalizations: Self { + .init(rawValue: "betaBuildLocalizations") + } + + public static var betaGroups: Self { + .init(rawValue: "betaGroups") + } + + public static var buildAudienceType: Self { + .init(rawValue: "buildAudienceType") + } + + public static var buildBetaDetail: Self { + .init(rawValue: "buildBetaDetail") + } + + public static var buildBundles: Self { + .init(rawValue: "buildBundles") + } + + public static var computedMinMacOsVersion: Self { + .init(rawValue: "computedMinMacOsVersion") + } + + public static var computedMinVisionOsVersion: Self { + .init(rawValue: "computedMinVisionOsVersion") + } + + public static var diagnosticSignatures: Self { + .init(rawValue: "diagnosticSignatures") + } + + public static var expirationDate: Self { + .init(rawValue: "expirationDate") + } + + public static var expired: Self { + .init(rawValue: "expired") + } + + public static var iconAssetToken: Self { + .init(rawValue: "iconAssetToken") + } + + public static var icons: Self { + .init(rawValue: "icons") + } + + public static var individualTesters: Self { + .init(rawValue: "individualTesters") + } + + public static var lsMinimumSystemVersion: Self { + .init(rawValue: "lsMinimumSystemVersion") + } + + public static var minOsVersion: Self { + .init(rawValue: "minOsVersion") + } + + public static var perfPowerMetrics: Self { + .init(rawValue: "perfPowerMetrics") + } + + public static var preReleaseVersion: Self { + .init(rawValue: "preReleaseVersion") + } + + public static var processingState: Self { + .init(rawValue: "processingState") + } + + public static var uploadedDate: Self { + .init(rawValue: "uploadedDate") + } + + public static var usesNonExemptEncryption: Self { + .init(rawValue: "usesNonExemptEncryption") + } + + public static var version: Self { + .init(rawValue: "version") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct GameCenterAppVersions: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var appStoreVersion: Self { + .init(rawValue: "appStoreVersion") + } + + public static var compatibilityVersions: Self { + .init(rawValue: "compatibilityVersions") + } + + public static var enabled: Self { + .init(rawValue: "enabled") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "app": self = .app - case "appEncryptionDeclaration": self = .appEncryptionDeclaration - case "appStoreVersion": self = .appStoreVersion - case "betaAppReviewSubmission": self = .betaAppReviewSubmission - case "betaBuildLocalizations": self = .betaBuildLocalizations - case "betaGroups": self = .betaGroups - case "buildAudienceType": self = .buildAudienceType - case "buildBetaDetail": self = .buildBetaDetail - case "buildBundles": self = .buildBundles - case "computedMinMacOsVersion": self = .computedMinMacOsVersion - case "diagnosticSignatures": self = .diagnosticSignatures - case "expirationDate": self = .expirationDate - case "expired": self = .expired - case "iconAssetToken": self = .iconAssetToken - case "icons": self = .icons - case "individualTesters": self = .individualTesters - case "lsMinimumSystemVersion": self = .lsMinimumSystemVersion - case "minOsVersion": self = .minOsVersion - case "perfPowerMetrics": self = .perfPowerMetrics - case "preReleaseVersion": self = .preReleaseVersion - case "processingState": self = .processingState - case "uploadedDate": self = .uploadedDate - case "usesNonExemptEncryption": self = .usesNonExemptEncryption - case "version": self = .version - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum RoutingAppCoverages: Hashable, Codable, RawRepresentable { - case appStoreVersion - case assetDeliveryState - case fileName - case fileSize - case sourceFileChecksum - case uploadOperations - case uploaded - case unknown(String) - - public var rawValue: String { - switch self { - case .appStoreVersion: return "appStoreVersion" - case .assetDeliveryState: return "assetDeliveryState" - case .fileName: return "fileName" - case .fileSize: return "fileSize" - case .sourceFileChecksum: return "sourceFileChecksum" - case .uploadOperations: return "uploadOperations" - case .uploaded: return "uploaded" - case .unknown(let rawValue): return rawValue - } + public struct RoutingAppCoverages: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var appStoreVersion: Self { + .init(rawValue: "appStoreVersion") + } + + public static var assetDeliveryState: Self { + .init(rawValue: "assetDeliveryState") + } + + public static var fileName: Self { + .init(rawValue: "fileName") + } + + public static var fileSize: Self { + .init(rawValue: "fileSize") } + public static var sourceFileChecksum: Self { + .init(rawValue: "sourceFileChecksum") + } + + public static var uploadOperations: Self { + .init(rawValue: "uploadOperations") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "appStoreVersion": self = .appStoreVersion - case "assetDeliveryState": self = .assetDeliveryState - case "fileName": self = .fileName - case "fileSize": self = .fileSize - case "sourceFileChecksum": self = .sourceFileChecksum - case "uploadOperations": self = .uploadOperations - case "uploaded": self = .uploaded - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } @@ -781,6 +980,11 @@ extension V1.Apps.ById.AppStoreVersions.GET { .init(key: "fields[ageRatingDeclarations]") } + /// the fields to include for returned resources of type alternativeDistributionPackages + public static var alternativeDistributionPackages: Relation<[AlternativeDistributionPackages]?> { + .init(key: "fields[alternativeDistributionPackages]") + } + /// the fields to include for returned resources of type appClipDefaultExperiences public static var appClipDefaultExperiences: Relation<[AppClipDefaultExperiences]?> { .init(key: "fields[appClipDefaultExperiences]") @@ -826,6 +1030,11 @@ extension V1.Apps.ById.AppStoreVersions.GET { .init(key: "fields[builds]") } + /// the fields to include for returned resources of type gameCenterAppVersions + public static var gameCenterAppVersions: Relation<[GameCenterAppVersions]?> { + .init(key: "fields[gameCenterAppVersions]") + } + /// the fields to include for returned resources of type routingAppCoverages public static var routingAppCoverages: Relation<[RoutingAppCoverages]?> { .init(key: "fields[routingAppCoverages]") @@ -847,101 +1056,195 @@ extension V1.Apps.ById.AppStoreVersions.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum AppStoreState: Hashable, Codable, RawRepresentable { - case accepted - case developerRejected - case developerRemovedFromSale - case inReview - case invalidBinary - case metadataRejected - case pendingAppleRelease - case pendingContract - case pendingDeveloperRelease - case preorderReadyForSale - case prepareForSubmission - case processingForAppStore - case readyForReview - case readyForSale - case rejected - case removedFromSale - case replacedWithNewVersion - case waitingForExportCompliance - case waitingForReview - case unknown(String) - - public var rawValue: String { - switch self { - case .accepted: return "ACCEPTED" - case .developerRejected: return "DEVELOPER_REJECTED" - case .developerRemovedFromSale: return "DEVELOPER_REMOVED_FROM_SALE" - case .inReview: return "IN_REVIEW" - case .invalidBinary: return "INVALID_BINARY" - case .metadataRejected: return "METADATA_REJECTED" - case .pendingAppleRelease: return "PENDING_APPLE_RELEASE" - case .pendingContract: return "PENDING_CONTRACT" - case .pendingDeveloperRelease: return "PENDING_DEVELOPER_RELEASE" - case .preorderReadyForSale: return "PREORDER_READY_FOR_SALE" - case .prepareForSubmission: return "PREPARE_FOR_SUBMISSION" - case .processingForAppStore: return "PROCESSING_FOR_APP_STORE" - case .readyForReview: return "READY_FOR_REVIEW" - case .readyForSale: return "READY_FOR_SALE" - case .rejected: return "REJECTED" - case .removedFromSale: return "REMOVED_FROM_SALE" - case .replacedWithNewVersion: return "REPLACED_WITH_NEW_VERSION" - case .waitingForExportCompliance: return "WAITING_FOR_EXPORT_COMPLIANCE" - case .waitingForReview: return "WAITING_FOR_REVIEW" - case .unknown(let rawValue): return rawValue - } + public struct AppStoreState: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var accepted: Self { + .init(rawValue: "ACCEPTED") + } + + public static var developerRejected: Self { + .init(rawValue: "DEVELOPER_REJECTED") + } + + public static var developerRemovedFromSale: Self { + .init(rawValue: "DEVELOPER_REMOVED_FROM_SALE") + } + + public static var inReview: Self { + .init(rawValue: "IN_REVIEW") + } + + public static var invalidBinary: Self { + .init(rawValue: "INVALID_BINARY") + } + + public static var metadataRejected: Self { + .init(rawValue: "METADATA_REJECTED") + } + + public static var notApplicable: Self { + .init(rawValue: "NOT_APPLICABLE") } + public static var pendingAppleRelease: Self { + .init(rawValue: "PENDING_APPLE_RELEASE") + } + + public static var pendingContract: Self { + .init(rawValue: "PENDING_CONTRACT") + } + + public static var pendingDeveloperRelease: Self { + .init(rawValue: "PENDING_DEVELOPER_RELEASE") + } + + public static var preorderReadyForSale: Self { + .init(rawValue: "PREORDER_READY_FOR_SALE") + } + + public static var prepareForSubmission: Self { + .init(rawValue: "PREPARE_FOR_SUBMISSION") + } + + public static var processingForAppStore: Self { + .init(rawValue: "PROCESSING_FOR_APP_STORE") + } + + public static var readyForReview: Self { + .init(rawValue: "READY_FOR_REVIEW") + } + + public static var readyForSale: Self { + .init(rawValue: "READY_FOR_SALE") + } + + public static var rejected: Self { + .init(rawValue: "REJECTED") + } + + public static var removedFromSale: Self { + .init(rawValue: "REMOVED_FROM_SALE") + } + + public static var replacedWithNewVersion: Self { + .init(rawValue: "REPLACED_WITH_NEW_VERSION") + } + + public static var waitingForExportCompliance: Self { + .init(rawValue: "WAITING_FOR_EXPORT_COMPLIANCE") + } + + public static var waitingForReview: Self { + .init(rawValue: "WAITING_FOR_REVIEW") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "ACCEPTED": self = .accepted - case "DEVELOPER_REJECTED": self = .developerRejected - case "DEVELOPER_REMOVED_FROM_SALE": self = .developerRemovedFromSale - case "IN_REVIEW": self = .inReview - case "INVALID_BINARY": self = .invalidBinary - case "METADATA_REJECTED": self = .metadataRejected - case "PENDING_APPLE_RELEASE": self = .pendingAppleRelease - case "PENDING_CONTRACT": self = .pendingContract - case "PENDING_DEVELOPER_RELEASE": self = .pendingDeveloperRelease - case "PREORDER_READY_FOR_SALE": self = .preorderReadyForSale - case "PREPARE_FOR_SUBMISSION": self = .prepareForSubmission - case "PROCESSING_FOR_APP_STORE": self = .processingForAppStore - case "READY_FOR_REVIEW": self = .readyForReview - case "READY_FOR_SALE": self = .readyForSale - case "REJECTED": self = .rejected - case "REMOVED_FROM_SALE": self = .removedFromSale - case "REPLACED_WITH_NEW_VERSION": self = .replacedWithNewVersion - case "WAITING_FOR_EXPORT_COMPLIANCE": self = .waitingForExportCompliance - case "WAITING_FOR_REVIEW": self = .waitingForReview - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum Platform: Hashable, Codable, RawRepresentable { - case iOS - case macOS - case tvOS - case unknown(String) + public struct AppVersionState: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var accepted: Self { + .init(rawValue: "ACCEPTED") + } + + public static var developerRejected: Self { + .init(rawValue: "DEVELOPER_REJECTED") + } + + public static var inReview: Self { + .init(rawValue: "IN_REVIEW") + } + + public static var invalidBinary: Self { + .init(rawValue: "INVALID_BINARY") + } + + public static var metadataRejected: Self { + .init(rawValue: "METADATA_REJECTED") + } - public var rawValue: String { - switch self { - case .iOS: return "IOS" - case .macOS: return "MAC_OS" - case .tvOS: return "TV_OS" - case .unknown(let rawValue): return rawValue - } + public static var pendingAppleRelease: Self { + .init(rawValue: "PENDING_APPLE_RELEASE") } + public static var pendingDeveloperRelease: Self { + .init(rawValue: "PENDING_DEVELOPER_RELEASE") + } + + public static var prepareForSubmission: Self { + .init(rawValue: "PREPARE_FOR_SUBMISSION") + } + + public static var processingForDistribution: Self { + .init(rawValue: "PROCESSING_FOR_DISTRIBUTION") + } + + public static var readyForDistribution: Self { + .init(rawValue: "READY_FOR_DISTRIBUTION") + } + + public static var readyForReview: Self { + .init(rawValue: "READY_FOR_REVIEW") + } + + public static var rejected: Self { + .init(rawValue: "REJECTED") + } + + public static var replacedWithNewVersion: Self { + .init(rawValue: "REPLACED_WITH_NEW_VERSION") + } + + public static var waitingForExportCompliance: Self { + .init(rawValue: "WAITING_FOR_EXPORT_COMPLIANCE") + } + + public static var waitingForReview: Self { + .init(rawValue: "WAITING_FOR_REVIEW") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct Platform: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var iOS: Self { + .init(rawValue: "IOS") + } + + public static var macOS: Self { + .init(rawValue: "MAC_OS") + } + + public static var tvOS: Self { + .init(rawValue: "TV_OS") + } + + public static var visionOS: Self { + .init(rawValue: "VISION_OS") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "IOS": self = .iOS - case "MAC_OS": self = .macOS - case "TV_OS": self = .tvOS - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } @@ -951,6 +1254,11 @@ extension V1.Apps.ById.AppStoreVersions.GET { .init(key: "filter[appStoreState]") } + /// filter by attribute 'appVersionState' + public static var appVersionState: Relation<[AppVersionState]?> { + .init(key: "filter[appVersionState]") + } + /// filter by id(s) public static var id: Relation<[String]?> { .init(key: "filter[id]") @@ -974,52 +1282,67 @@ extension V1.Apps.ById.AppStoreVersions.GET { } } - public enum Include: Hashable, Codable, RawRepresentable { - case ageRatingDeclaration - case app - case appClipDefaultExperience - case appStoreReviewDetail - case appStoreVersionExperiments - case appStoreVersionExperimentsV2 - case appStoreVersionLocalizations - case appStoreVersionPhasedRelease - case appStoreVersionSubmission - case build - case routingAppCoverage - case unknown(String) - - public var rawValue: String { - switch self { - case .ageRatingDeclaration: return "ageRatingDeclaration" - case .app: return "app" - case .appClipDefaultExperience: return "appClipDefaultExperience" - case .appStoreReviewDetail: return "appStoreReviewDetail" - case .appStoreVersionExperiments: return "appStoreVersionExperiments" - case .appStoreVersionExperimentsV2: return "appStoreVersionExperimentsV2" - case .appStoreVersionLocalizations: return "appStoreVersionLocalizations" - case .appStoreVersionPhasedRelease: return "appStoreVersionPhasedRelease" - case .appStoreVersionSubmission: return "appStoreVersionSubmission" - case .build: return "build" - case .routingAppCoverage: return "routingAppCoverage" - case .unknown(let rawValue): return rawValue - } + public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var ageRatingDeclaration: Self { + .init(rawValue: "ageRatingDeclaration") + } + + public static var alternativeDistributionPackage: Self { + .init(rawValue: "alternativeDistributionPackage") + } + + public static var app: Self { + .init(rawValue: "app") + } + + public static var appClipDefaultExperience: Self { + .init(rawValue: "appClipDefaultExperience") + } + + public static var appStoreReviewDetail: Self { + .init(rawValue: "appStoreReviewDetail") + } + + public static var appStoreVersionExperiments: Self { + .init(rawValue: "appStoreVersionExperiments") + } + + public static var appStoreVersionExperimentsV2: Self { + .init(rawValue: "appStoreVersionExperimentsV2") + } + + public static var appStoreVersionLocalizations: Self { + .init(rawValue: "appStoreVersionLocalizations") + } + + public static var appStoreVersionPhasedRelease: Self { + .init(rawValue: "appStoreVersionPhasedRelease") + } + + public static var appStoreVersionSubmission: Self { + .init(rawValue: "appStoreVersionSubmission") + } + + public static var build: Self { + .init(rawValue: "build") } + public static var gameCenterAppVersion: Self { + .init(rawValue: "gameCenterAppVersion") + } + + public static var routingAppCoverage: Self { + .init(rawValue: "routingAppCoverage") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "ageRatingDeclaration": self = .ageRatingDeclaration - case "app": self = .app - case "appClipDefaultExperience": self = .appClipDefaultExperience - case "appStoreReviewDetail": self = .appStoreReviewDetail - case "appStoreVersionExperiments": self = .appStoreVersionExperiments - case "appStoreVersionExperimentsV2": self = .appStoreVersionExperimentsV2 - case "appStoreVersionLocalizations": self = .appStoreVersionLocalizations - case "appStoreVersionPhasedRelease": self = .appStoreVersionPhasedRelease - case "appStoreVersionSubmission": self = .appStoreVersionSubmission - case "build": self = .build - case "routingAppCoverage": self = .routingAppCoverage - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/AppsById.GET.37ceec0.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/AppsById.GET.37ceec0.generated.swift index ecd9dae4..bd03e454 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/AppsById.GET.37ceec0.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/AppsById.GET.37ceec0.generated.swift @@ -28,8 +28,6 @@ extension V1.Apps.ById { components?.path = path components?.queryItems = [ - URLQueryItem(name: "fields[appAvailabilities]", - value: parameters.fields[.appAvailabilities]?.map { "\($0)" }.joined(separator: ",")), URLQueryItem(name: "fields[appClips]", value: parameters.fields[.appClips]?.map { "\($0)" }.joined(separator: ",")), URLQueryItem(name: "fields[appCustomProductPages]", @@ -40,14 +38,6 @@ extension V1.Apps.ById { value: parameters.fields[.appEvents]?.map { "\($0)" }.joined(separator: ",")), URLQueryItem(name: "fields[appInfos]", value: parameters.fields[.appInfos]?.map { "\($0)" }.joined(separator: ",")), - URLQueryItem(name: "fields[appPreOrders]", - value: parameters.fields[.appPreOrders]?.map { "\($0)" }.joined(separator: ",")), - URLQueryItem(name: "fields[appPricePoints]", - value: parameters.fields[.appPricePoints]?.map { "\($0)" }.joined(separator: ",")), - URLQueryItem(name: "fields[appPriceSchedules]", - value: parameters.fields[.appPriceSchedules]?.map { "\($0)" }.joined(separator: ",")), - URLQueryItem(name: "fields[appPrices]", - value: parameters.fields[.appPrices]?.map { "\($0)" }.joined(separator: ",")), URLQueryItem(name: "fields[appStoreVersionExperiments]", value: parameters.fields[.appStoreVersionExperiments]?.map { "\($0)" }.joined(separator: ",")), URLQueryItem(name: "fields[appStoreVersions]", @@ -66,8 +56,6 @@ extension V1.Apps.ById { value: parameters.fields[.builds]?.map { "\($0)" }.joined(separator: ",")), URLQueryItem(name: "fields[ciProducts]", value: parameters.fields[.ciProducts]?.map { "\($0)" }.joined(separator: ",")), - URLQueryItem(name: "fields[customerReviews]", - value: parameters.fields[.customerReviews]?.map { "\($0)" }.joined(separator: ",")), URLQueryItem(name: "fields[endUserLicenseAgreements]", value: parameters.fields[.endUserLicenseAgreements]?.map { "\($0)" }.joined(separator: ",")), URLQueryItem(name: "fields[gameCenterDetails]", @@ -76,8 +64,6 @@ extension V1.Apps.ById { value: parameters.fields[.gameCenterEnabledVersions]?.map { "\($0)" }.joined(separator: ",")), URLQueryItem(name: "fields[inAppPurchases]", value: parameters.fields[.inAppPurchases]?.map { "\($0)" }.joined(separator: ",")), - URLQueryItem(name: "fields[perfPowerMetrics]", - value: parameters.fields[.perfPowerMetrics]?.map { "\($0)" }.joined(separator: ",")), URLQueryItem(name: "fields[preReleaseVersions]", value: parameters.fields[.preReleaseVersions]?.map { "\($0)" }.joined(separator: ",")), URLQueryItem(name: "fields[promotedPurchases]", @@ -88,8 +74,6 @@ extension V1.Apps.ById { value: parameters.fields[.subscriptionGracePeriods]?.map { "\($0)" }.joined(separator: ",")), URLQueryItem(name: "fields[subscriptionGroups]", value: parameters.fields[.subscriptionGroups]?.map { "\($0)" }.joined(separator: ",")), - URLQueryItem(name: "fields[territories]", - value: parameters.fields[.territories]?.map { "\($0)" }.joined(separator: ",")), URLQueryItem(name: "include", value: parameters.include?.map { "\($0)" }.joined(separator: ",")), URLQueryItem(name: "limit[appClips]", @@ -106,8 +90,6 @@ extension V1.Apps.ById { value: parameters.limit[.appStoreVersionExperimentsV2].map { "\($0)" }), URLQueryItem(name: "limit[appStoreVersions]", value: parameters.limit[.appStoreVersions].map { "\($0)" }), - URLQueryItem(name: "limit[availableTerritories]", - value: parameters.limit[.availableTerritories].map { "\($0)" }), URLQueryItem(name: "limit[betaAppLocalizations]", value: parameters.limit[.betaAppLocalizations].map { "\($0)" }), URLQueryItem(name: "limit[betaGroups]", @@ -122,8 +104,6 @@ extension V1.Apps.ById { value: parameters.limit[.inAppPurchases].map { "\($0)" }), URLQueryItem(name: "limit[preReleaseVersions]", value: parameters.limit[.preReleaseVersions].map { "\($0)" }), - URLQueryItem(name: "limit[prices]", - value: parameters.limit[.prices].map { "\($0)" }), URLQueryItem(name: "limit[promotedPurchases]", value: parameters.limit[.promotedPurchases].map { "\($0)" }), URLQueryItem(name: "limit[reviewSubmissions]", @@ -142,8 +122,10 @@ extension V1.Apps.ById { /// - Returns: **200**, Single App as `AppResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -157,1414 +139,1427 @@ extension V1.Apps.ById { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) - case 404: - throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +extension V1.Apps.ById.GET { + public struct Parameters: Hashable { + public var fields: Fields = Fields() + + /// comma-separated list of relationships to include + public var include: [Include]? + + public var limit: Limit = Limit() + + public struct Fields: Hashable { + public subscript (_ relation: Relation) -> T { + get { values[relation]?.base as! T } + set { values[relation] = AnyHashable(newValue) } + } + + private var values: [AnyHashable: AnyHashable] = [:] + + public struct AppClips: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var app: Self { + .init(rawValue: "app") + } + + public static var appClipAdvancedExperiences: Self { + .init(rawValue: "appClipAdvancedExperiences") + } + + public static var appClipDefaultExperiences: Self { + .init(rawValue: "appClipDefaultExperiences") + } + + public static var bundleId: Self { + .init(rawValue: "bundleId") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct AppCustomProductPages: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var app: Self { + .init(rawValue: "app") + } + + public static var appCustomProductPageVersions: Self { + .init(rawValue: "appCustomProductPageVersions") + } + + public static var name: Self { + .init(rawValue: "name") + } + + public static var url: Self { + .init(rawValue: "url") + } + + public static var visible: Self { + .init(rawValue: "visible") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct AppEncryptionDeclarations: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var app: Self { + .init(rawValue: "app") + } + + public static var appDescription: Self { + .init(rawValue: "appDescription") + } + + public static var appEncryptionDeclarationDocument: Self { + .init(rawValue: "appEncryptionDeclarationDocument") + } + + public static var appEncryptionDeclarationState: Self { + .init(rawValue: "appEncryptionDeclarationState") + } + + public static var availableOnFrenchStore: Self { + .init(rawValue: "availableOnFrenchStore") + } + + public static var builds: Self { + .init(rawValue: "builds") + } + + public static var codeValue: Self { + .init(rawValue: "codeValue") + } + + public static var containsProprietaryCryptography: Self { + .init(rawValue: "containsProprietaryCryptography") + } + + public static var containsThirdPartyCryptography: Self { + .init(rawValue: "containsThirdPartyCryptography") + } + + public static var createdDate: Self { + .init(rawValue: "createdDate") + } + + public static var documentName: Self { + .init(rawValue: "documentName") + } + + public static var documentType: Self { + .init(rawValue: "documentType") + } + + public static var documentUrl: Self { + .init(rawValue: "documentUrl") + } + + public static var exempt: Self { + .init(rawValue: "exempt") + } + + public static var platform: Self { + .init(rawValue: "platform") + } + + public static var uploadedDate: Self { + .init(rawValue: "uploadedDate") + } + + public static var usesEncryption: Self { + .init(rawValue: "usesEncryption") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct AppEvents: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var archivedTerritorySchedules: Self { + .init(rawValue: "archivedTerritorySchedules") + } + + public static var badge: Self { + .init(rawValue: "badge") + } + + public static var deepLink: Self { + .init(rawValue: "deepLink") + } + + public static var eventState: Self { + .init(rawValue: "eventState") + } + + public static var localizations: Self { + .init(rawValue: "localizations") + } + + public static var primaryLocale: Self { + .init(rawValue: "primaryLocale") + } + + public static var priority: Self { + .init(rawValue: "priority") + } + + public static var purchaseRequirement: Self { + .init(rawValue: "purchaseRequirement") + } + + public static var purpose: Self { + .init(rawValue: "purpose") + } + + public static var referenceName: Self { + .init(rawValue: "referenceName") + } + + public static var territorySchedules: Self { + .init(rawValue: "territorySchedules") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct AppInfos: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var ageRatingDeclaration: Self { + .init(rawValue: "ageRatingDeclaration") + } + + public static var app: Self { + .init(rawValue: "app") + } + + public static var appInfoLocalizations: Self { + .init(rawValue: "appInfoLocalizations") + } + + public static var appStoreAgeRating: Self { + .init(rawValue: "appStoreAgeRating") + } + + public static var appStoreState: Self { + .init(rawValue: "appStoreState") + } + + public static var australiaAgeRating: Self { + .init(rawValue: "australiaAgeRating") + } + + public static var brazilAgeRating: Self { + .init(rawValue: "brazilAgeRating") + } + + public static var brazilAgeRatingV2: Self { + .init(rawValue: "brazilAgeRatingV2") + } + + public static var franceAgeRating: Self { + .init(rawValue: "franceAgeRating") + } + + public static var kidsAgeBand: Self { + .init(rawValue: "kidsAgeBand") + } + + public static var koreaAgeRating: Self { + .init(rawValue: "koreaAgeRating") + } + + public static var primaryCategory: Self { + .init(rawValue: "primaryCategory") + } + + public static var primarySubcategoryOne: Self { + .init(rawValue: "primarySubcategoryOne") + } + + public static var primarySubcategoryTwo: Self { + .init(rawValue: "primarySubcategoryTwo") + } + + public static var secondaryCategory: Self { + .init(rawValue: "secondaryCategory") + } + + public static var secondarySubcategoryOne: Self { + .init(rawValue: "secondarySubcategoryOne") + } + + public static var secondarySubcategoryTwo: Self { + .init(rawValue: "secondarySubcategoryTwo") + } + + public static var state: Self { + .init(rawValue: "state") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct AppStoreVersionExperiments: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var app: Self { + .init(rawValue: "app") + } + + public static var appStoreVersionExperimentTreatments: Self { + .init(rawValue: "appStoreVersionExperimentTreatments") + } + + public static var controlVersions: Self { + .init(rawValue: "controlVersions") + } + + public static var endDate: Self { + .init(rawValue: "endDate") + } + + public static var latestControlVersion: Self { + .init(rawValue: "latestControlVersion") + } + + public static var name: Self { + .init(rawValue: "name") + } + + public static var platform: Self { + .init(rawValue: "platform") + } + + public static var reviewRequired: Self { + .init(rawValue: "reviewRequired") + } + + public static var startDate: Self { + .init(rawValue: "startDate") + } + + public static var state: Self { + .init(rawValue: "state") + } + + public static var trafficProportion: Self { + .init(rawValue: "trafficProportion") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct AppStoreVersions: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var ageRatingDeclaration: Self { + .init(rawValue: "ageRatingDeclaration") + } + + public static var alternativeDistributionPackage: Self { + .init(rawValue: "alternativeDistributionPackage") + } + + public static var app: Self { + .init(rawValue: "app") + } + + public static var appClipDefaultExperience: Self { + .init(rawValue: "appClipDefaultExperience") + } + + public static var appStoreReviewDetail: Self { + .init(rawValue: "appStoreReviewDetail") + } + + public static var appStoreState: Self { + .init(rawValue: "appStoreState") + } + + public static var appStoreVersionExperiments: Self { + .init(rawValue: "appStoreVersionExperiments") + } + + public static var appStoreVersionExperimentsV2: Self { + .init(rawValue: "appStoreVersionExperimentsV2") + } + + public static var appStoreVersionLocalizations: Self { + .init(rawValue: "appStoreVersionLocalizations") + } + + public static var appStoreVersionPhasedRelease: Self { + .init(rawValue: "appStoreVersionPhasedRelease") + } + + public static var appStoreVersionSubmission: Self { + .init(rawValue: "appStoreVersionSubmission") + } + + public static var appVersionState: Self { + .init(rawValue: "appVersionState") + } + + public static var build: Self { + .init(rawValue: "build") + } + + public static var copyright: Self { + .init(rawValue: "copyright") + } + + public static var createdDate: Self { + .init(rawValue: "createdDate") + } + + public static var customerReviews: Self { + .init(rawValue: "customerReviews") + } + + public static var downloadable: Self { + .init(rawValue: "downloadable") + } + + public static var earliestReleaseDate: Self { + .init(rawValue: "earliestReleaseDate") + } + + public static var gameCenterAppVersion: Self { + .init(rawValue: "gameCenterAppVersion") + } + + public static var platform: Self { + .init(rawValue: "platform") + } + + public static var releaseType: Self { + .init(rawValue: "releaseType") + } + + public static var reviewType: Self { + .init(rawValue: "reviewType") + } + + public static var routingAppCoverage: Self { + .init(rawValue: "routingAppCoverage") + } + + public static var usesIdfa: Self { + .init(rawValue: "usesIdfa") + } + + public static var versionString: Self { + .init(rawValue: "versionString") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct Apps: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var accessibilityDeclarations: Self { + .init(rawValue: "accessibilityDeclarations") + } + + public static var accessibilityUrl: Self { + .init(rawValue: "accessibilityUrl") + } + + public static var alternativeDistributionKey: Self { + .init(rawValue: "alternativeDistributionKey") + } + + public static var analyticsReportRequests: Self { + .init(rawValue: "analyticsReportRequests") + } + + public static var appAvailabilityV2: Self { + .init(rawValue: "appAvailabilityV2") + } + + public static var appClips: Self { + .init(rawValue: "appClips") + } + + public static var appCustomProductPages: Self { + .init(rawValue: "appCustomProductPages") + } + + public static var appEncryptionDeclarations: Self { + .init(rawValue: "appEncryptionDeclarations") + } + + public static var appEvents: Self { + .init(rawValue: "appEvents") + } + + public static var appInfos: Self { + .init(rawValue: "appInfos") + } + + public static var appPricePoints: Self { + .init(rawValue: "appPricePoints") + } + + public static var appPriceSchedule: Self { + .init(rawValue: "appPriceSchedule") + } + + public static var appStoreVersionExperimentsV2: Self { + .init(rawValue: "appStoreVersionExperimentsV2") + } + + public static var appStoreVersions: Self { + .init(rawValue: "appStoreVersions") + } + + public static var backgroundAssets: Self { + .init(rawValue: "backgroundAssets") + } + + public static var betaAppLocalizations: Self { + .init(rawValue: "betaAppLocalizations") + } + + public static var betaAppReviewDetail: Self { + .init(rawValue: "betaAppReviewDetail") + } + + public static var betaFeedbackCrashSubmissions: Self { + .init(rawValue: "betaFeedbackCrashSubmissions") + } + + public static var betaFeedbackScreenshotSubmissions: Self { + .init(rawValue: "betaFeedbackScreenshotSubmissions") + } + + public static var betaGroups: Self { + .init(rawValue: "betaGroups") + } + + public static var betaLicenseAgreement: Self { + .init(rawValue: "betaLicenseAgreement") + } + + public static var betaTesters: Self { + .init(rawValue: "betaTesters") + } + + public static var builds: Self { + .init(rawValue: "builds") + } + + public static var bundleId: Self { + .init(rawValue: "bundleId") + } + + public static var ciProduct: Self { + .init(rawValue: "ciProduct") + } + + public static var contentRightsDeclaration: Self { + .init(rawValue: "contentRightsDeclaration") + } + + public static var customerReviewSummarizations: Self { + .init(rawValue: "customerReviewSummarizations") + } + + public static var customerReviews: Self { + .init(rawValue: "customerReviews") + } + + public static var endUserLicenseAgreement: Self { + .init(rawValue: "endUserLicenseAgreement") + } + + public static var gameCenterDetail: Self { + .init(rawValue: "gameCenterDetail") + } + + public static var gameCenterEnabledVersions: Self { + .init(rawValue: "gameCenterEnabledVersions") + } + + public static var inAppPurchases: Self { + .init(rawValue: "inAppPurchases") + } + + public static var inAppPurchasesV2: Self { + .init(rawValue: "inAppPurchasesV2") + } + + public static var isOrEverWasMadeForKids: Self { + .init(rawValue: "isOrEverWasMadeForKids") + } + + public static var marketplaceSearchDetail: Self { + .init(rawValue: "marketplaceSearchDetail") + } + + public static var name: Self { + .init(rawValue: "name") + } + + public static var perfPowerMetrics: Self { + .init(rawValue: "perfPowerMetrics") + } + + public static var preReleaseVersions: Self { + .init(rawValue: "preReleaseVersions") + } + + public static var primaryLocale: Self { + .init(rawValue: "primaryLocale") + } + + public static var promotedPurchases: Self { + .init(rawValue: "promotedPurchases") + } + + public static var reviewSubmissions: Self { + .init(rawValue: "reviewSubmissions") + } + + public static var sku: Self { + .init(rawValue: "sku") + } + + public static var streamlinedPurchasingEnabled: Self { + .init(rawValue: "streamlinedPurchasingEnabled") + } + + public static var subscriptionGracePeriod: Self { + .init(rawValue: "subscriptionGracePeriod") + } + + public static var subscriptionGroups: Self { + .init(rawValue: "subscriptionGroups") + } + + public static var subscriptionStatusUrl: Self { + .init(rawValue: "subscriptionStatusUrl") + } + + public static var subscriptionStatusUrlForSandbox: Self { + .init(rawValue: "subscriptionStatusUrlForSandbox") + } + + public static var subscriptionStatusUrlVersion: Self { + .init(rawValue: "subscriptionStatusUrlVersion") + } + + public static var subscriptionStatusUrlVersionForSandbox: Self { + .init(rawValue: "subscriptionStatusUrlVersionForSandbox") + } + + public static var webhooks: Self { + .init(rawValue: "webhooks") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct BetaAppLocalizations: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var app: Self { + .init(rawValue: "app") + } + + public static var description: Self { + .init(rawValue: "description") + } + + public static var feedbackEmail: Self { + .init(rawValue: "feedbackEmail") + } + + public static var locale: Self { + .init(rawValue: "locale") + } + + public static var marketingUrl: Self { + .init(rawValue: "marketingUrl") + } + + public static var privacyPolicyUrl: Self { + .init(rawValue: "privacyPolicyUrl") + } + + public static var tvOsPrivacyPolicy: Self { + .init(rawValue: "tvOsPrivacyPolicy") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct BetaAppReviewDetails: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var app: Self { + .init(rawValue: "app") + } + + public static var contactEmail: Self { + .init(rawValue: "contactEmail") + } + + public static var contactFirstName: Self { + .init(rawValue: "contactFirstName") + } + + public static var contactLastName: Self { + .init(rawValue: "contactLastName") + } + + public static var contactPhone: Self { + .init(rawValue: "contactPhone") + } + + public static var demoAccountName: Self { + .init(rawValue: "demoAccountName") + } + + public static var demoAccountPassword: Self { + .init(rawValue: "demoAccountPassword") + } + + public static var demoAccountRequired: Self { + .init(rawValue: "demoAccountRequired") + } + + public static var notes: Self { + .init(rawValue: "notes") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct BetaGroups: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var app: Self { + .init(rawValue: "app") + } + + public static var betaRecruitmentCriteria: Self { + .init(rawValue: "betaRecruitmentCriteria") + } + + public static var betaRecruitmentCriterionCompatibleBuildCheck: Self { + .init(rawValue: "betaRecruitmentCriterionCompatibleBuildCheck") + } + + public static var betaTesters: Self { + .init(rawValue: "betaTesters") + } + + public static var builds: Self { + .init(rawValue: "builds") + } + + public static var createdDate: Self { + .init(rawValue: "createdDate") + } + + public static var feedbackEnabled: Self { + .init(rawValue: "feedbackEnabled") + } + + public static var hasAccessToAllBuilds: Self { + .init(rawValue: "hasAccessToAllBuilds") + } + + public static var iosBuildsAvailableForAppleSiliconMac: Self { + .init(rawValue: "iosBuildsAvailableForAppleSiliconMac") + } + + public static var iosBuildsAvailableForAppleVision: Self { + .init(rawValue: "iosBuildsAvailableForAppleVision") + } + + public static var isInternalGroup: Self { + .init(rawValue: "isInternalGroup") + } + + public static var name: Self { + .init(rawValue: "name") + } + + public static var publicLink: Self { + .init(rawValue: "publicLink") + } + + public static var publicLinkEnabled: Self { + .init(rawValue: "publicLinkEnabled") + } + + public static var publicLinkId: Self { + .init(rawValue: "publicLinkId") + } + + public static var publicLinkLimit: Self { + .init(rawValue: "publicLinkLimit") + } + + public static var publicLinkLimitEnabled: Self { + .init(rawValue: "publicLinkLimitEnabled") + } + + public var description: String { + rawValue + } + + public var rawValue: String - default: - throw try jsonDecoder.decode(ErrorResponse.self, from: data) + public init(rawValue: String) { + self.rawValue = rawValue + } } - } - } -} -extension V1.Apps.ById.GET { - public struct Parameters: Hashable { - public var fields: Fields = Fields() + public struct BetaLicenseAgreements: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var agreementText: Self { + .init(rawValue: "agreementText") + } - /// comma-separated list of relationships to include - public var include: [Include]? + public static var app: Self { + .init(rawValue: "app") + } - public var limit: Limit = Limit() + public var description: String { + rawValue + } - public struct Fields: Hashable { - public subscript (_ relation: Relation) -> T { - get { values[relation]?.base as! T } - set { values[relation] = AnyHashable(newValue) } + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } } - private var values: [AnyHashable: AnyHashable] = [:] + public struct Builds: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var app: Self { + .init(rawValue: "app") + } - public enum AppAvailabilities: Hashable, Codable, RawRepresentable { - case app - case availableInNewTerritories - case availableTerritories - case unknown(String) + public static var appEncryptionDeclaration: Self { + .init(rawValue: "appEncryptionDeclaration") + } - public var rawValue: String { - switch self { - case .app: return "app" - case .availableInNewTerritories: return "availableInNewTerritories" - case .availableTerritories: return "availableTerritories" - case .unknown(let rawValue): return rawValue - } + public static var appStoreVersion: Self { + .init(rawValue: "appStoreVersion") } - public init(rawValue: String) { - switch rawValue { - case "app": self = .app - case "availableInNewTerritories": self = .availableInNewTerritories - case "availableTerritories": self = .availableTerritories - default: self = .unknown(rawValue) - } + public static var betaAppReviewSubmission: Self { + .init(rawValue: "betaAppReviewSubmission") + } + + public static var betaBuildLocalizations: Self { + .init(rawValue: "betaBuildLocalizations") } - } - public enum AppClips: Hashable, Codable, RawRepresentable { - case app - case appClipAdvancedExperiences - case appClipDefaultExperiences - case bundleId - case unknown(String) + public static var betaGroups: Self { + .init(rawValue: "betaGroups") + } - public var rawValue: String { - switch self { - case .app: return "app" - case .appClipAdvancedExperiences: return "appClipAdvancedExperiences" - case .appClipDefaultExperiences: return "appClipDefaultExperiences" - case .bundleId: return "bundleId" - case .unknown(let rawValue): return rawValue - } + public static var buildAudienceType: Self { + .init(rawValue: "buildAudienceType") } - public init(rawValue: String) { - switch rawValue { - case "app": self = .app - case "appClipAdvancedExperiences": self = .appClipAdvancedExperiences - case "appClipDefaultExperiences": self = .appClipDefaultExperiences - case "bundleId": self = .bundleId - default: self = .unknown(rawValue) - } + public static var buildBetaDetail: Self { + .init(rawValue: "buildBetaDetail") } - } - public enum AppCustomProductPages: Hashable, Codable, RawRepresentable { - case app - case appCustomProductPageVersions - case appStoreVersionTemplate - case customProductPageTemplate - case name - case url - case visible - case unknown(String) - - public var rawValue: String { - switch self { - case .app: return "app" - case .appCustomProductPageVersions: return "appCustomProductPageVersions" - case .appStoreVersionTemplate: return "appStoreVersionTemplate" - case .customProductPageTemplate: return "customProductPageTemplate" - case .name: return "name" - case .url: return "url" - case .visible: return "visible" - case .unknown(let rawValue): return rawValue - } + public static var buildBundles: Self { + .init(rawValue: "buildBundles") } - public init(rawValue: String) { - switch rawValue { - case "app": self = .app - case "appCustomProductPageVersions": self = .appCustomProductPageVersions - case "appStoreVersionTemplate": self = .appStoreVersionTemplate - case "customProductPageTemplate": self = .customProductPageTemplate - case "name": self = .name - case "url": self = .url - case "visible": self = .visible - default: self = .unknown(rawValue) - } + public static var computedMinMacOsVersion: Self { + .init(rawValue: "computedMinMacOsVersion") } - } - public enum AppEncryptionDeclarations: Hashable, Codable, RawRepresentable { - case app - case appDescription - case appEncryptionDeclarationDocument - case appEncryptionDeclarationState - case availableOnFrenchStore - case builds - case codeValue - case containsProprietaryCryptography - case containsThirdPartyCryptography - case createdDate - case documentName - case documentType - case documentUrl - case exempt - case platform - case uploadedDate - case usesEncryption - case unknown(String) - - public var rawValue: String { - switch self { - case .app: return "app" - case .appDescription: return "appDescription" - case .appEncryptionDeclarationDocument: return "appEncryptionDeclarationDocument" - case .appEncryptionDeclarationState: return "appEncryptionDeclarationState" - case .availableOnFrenchStore: return "availableOnFrenchStore" - case .builds: return "builds" - case .codeValue: return "codeValue" - case .containsProprietaryCryptography: return "containsProprietaryCryptography" - case .containsThirdPartyCryptography: return "containsThirdPartyCryptography" - case .createdDate: return "createdDate" - case .documentName: return "documentName" - case .documentType: return "documentType" - case .documentUrl: return "documentUrl" - case .exempt: return "exempt" - case .platform: return "platform" - case .uploadedDate: return "uploadedDate" - case .usesEncryption: return "usesEncryption" - case .unknown(let rawValue): return rawValue - } + public static var computedMinVisionOsVersion: Self { + .init(rawValue: "computedMinVisionOsVersion") } - public init(rawValue: String) { - switch rawValue { - case "app": self = .app - case "appDescription": self = .appDescription - case "appEncryptionDeclarationDocument": self = .appEncryptionDeclarationDocument - case "appEncryptionDeclarationState": self = .appEncryptionDeclarationState - case "availableOnFrenchStore": self = .availableOnFrenchStore - case "builds": self = .builds - case "codeValue": self = .codeValue - case "containsProprietaryCryptography": self = .containsProprietaryCryptography - case "containsThirdPartyCryptography": self = .containsThirdPartyCryptography - case "createdDate": self = .createdDate - case "documentName": self = .documentName - case "documentType": self = .documentType - case "documentUrl": self = .documentUrl - case "exempt": self = .exempt - case "platform": self = .platform - case "uploadedDate": self = .uploadedDate - case "usesEncryption": self = .usesEncryption - default: self = .unknown(rawValue) - } + public static var diagnosticSignatures: Self { + .init(rawValue: "diagnosticSignatures") } - } - public enum AppEvents: Hashable, Codable, RawRepresentable { - case app - case archivedTerritorySchedules - case badge - case deepLink - case eventState - case localizations - case primaryLocale - case priority - case purchaseRequirement - case purpose - case referenceName - case territorySchedules - case unknown(String) - - public var rawValue: String { - switch self { - case .app: return "app" - case .archivedTerritorySchedules: return "archivedTerritorySchedules" - case .badge: return "badge" - case .deepLink: return "deepLink" - case .eventState: return "eventState" - case .localizations: return "localizations" - case .primaryLocale: return "primaryLocale" - case .priority: return "priority" - case .purchaseRequirement: return "purchaseRequirement" - case .purpose: return "purpose" - case .referenceName: return "referenceName" - case .territorySchedules: return "territorySchedules" - case .unknown(let rawValue): return rawValue - } + public static var expirationDate: Self { + .init(rawValue: "expirationDate") } - public init(rawValue: String) { - switch rawValue { - case "app": self = .app - case "archivedTerritorySchedules": self = .archivedTerritorySchedules - case "badge": self = .badge - case "deepLink": self = .deepLink - case "eventState": self = .eventState - case "localizations": self = .localizations - case "primaryLocale": self = .primaryLocale - case "priority": self = .priority - case "purchaseRequirement": self = .purchaseRequirement - case "purpose": self = .purpose - case "referenceName": self = .referenceName - case "territorySchedules": self = .territorySchedules - default: self = .unknown(rawValue) - } + public static var expired: Self { + .init(rawValue: "expired") } - } - public enum AppInfos: Hashable, Codable, RawRepresentable { - case ageRatingDeclaration - case app - case appInfoLocalizations - case appStoreAgeRating - case appStoreState - case brazilAgeRating - case brazilAgeRatingV2 - case kidsAgeBand - case primaryCategory - case primarySubcategoryOne - case primarySubcategoryTwo - case secondaryCategory - case secondarySubcategoryOne - case secondarySubcategoryTwo - case unknown(String) - - public var rawValue: String { - switch self { - case .ageRatingDeclaration: return "ageRatingDeclaration" - case .app: return "app" - case .appInfoLocalizations: return "appInfoLocalizations" - case .appStoreAgeRating: return "appStoreAgeRating" - case .appStoreState: return "appStoreState" - case .brazilAgeRating: return "brazilAgeRating" - case .brazilAgeRatingV2: return "brazilAgeRatingV2" - case .kidsAgeBand: return "kidsAgeBand" - case .primaryCategory: return "primaryCategory" - case .primarySubcategoryOne: return "primarySubcategoryOne" - case .primarySubcategoryTwo: return "primarySubcategoryTwo" - case .secondaryCategory: return "secondaryCategory" - case .secondarySubcategoryOne: return "secondarySubcategoryOne" - case .secondarySubcategoryTwo: return "secondarySubcategoryTwo" - case .unknown(let rawValue): return rawValue - } + public static var iconAssetToken: Self { + .init(rawValue: "iconAssetToken") } - public init(rawValue: String) { - switch rawValue { - case "ageRatingDeclaration": self = .ageRatingDeclaration - case "app": self = .app - case "appInfoLocalizations": self = .appInfoLocalizations - case "appStoreAgeRating": self = .appStoreAgeRating - case "appStoreState": self = .appStoreState - case "brazilAgeRating": self = .brazilAgeRating - case "brazilAgeRatingV2": self = .brazilAgeRatingV2 - case "kidsAgeBand": self = .kidsAgeBand - case "primaryCategory": self = .primaryCategory - case "primarySubcategoryOne": self = .primarySubcategoryOne - case "primarySubcategoryTwo": self = .primarySubcategoryTwo - case "secondaryCategory": self = .secondaryCategory - case "secondarySubcategoryOne": self = .secondarySubcategoryOne - case "secondarySubcategoryTwo": self = .secondarySubcategoryTwo - default: self = .unknown(rawValue) - } + public static var icons: Self { + .init(rawValue: "icons") } - } - public enum AppPreOrders: Hashable, Codable, RawRepresentable { - case app - case appReleaseDate - case preOrderAvailableDate - case unknown(String) + public static var individualTesters: Self { + .init(rawValue: "individualTesters") + } - public var rawValue: String { - switch self { - case .app: return "app" - case .appReleaseDate: return "appReleaseDate" - case .preOrderAvailableDate: return "preOrderAvailableDate" - case .unknown(let rawValue): return rawValue - } + public static var lsMinimumSystemVersion: Self { + .init(rawValue: "lsMinimumSystemVersion") } - public init(rawValue: String) { - switch rawValue { - case "app": self = .app - case "appReleaseDate": self = .appReleaseDate - case "preOrderAvailableDate": self = .preOrderAvailableDate - default: self = .unknown(rawValue) - } + public static var minOsVersion: Self { + .init(rawValue: "minOsVersion") } - } - public enum AppPricePoints: Hashable, Codable, RawRepresentable { - case app - case customerPrice - case equalizations - case priceTier - case proceeds - case territory - case unknown(String) - - public var rawValue: String { - switch self { - case .app: return "app" - case .customerPrice: return "customerPrice" - case .equalizations: return "equalizations" - case .priceTier: return "priceTier" - case .proceeds: return "proceeds" - case .territory: return "territory" - case .unknown(let rawValue): return rawValue - } + public static var perfPowerMetrics: Self { + .init(rawValue: "perfPowerMetrics") } - public init(rawValue: String) { - switch rawValue { - case "app": self = .app - case "customerPrice": self = .customerPrice - case "equalizations": self = .equalizations - case "priceTier": self = .priceTier - case "proceeds": self = .proceeds - case "territory": self = .territory - default: self = .unknown(rawValue) - } + public static var preReleaseVersion: Self { + .init(rawValue: "preReleaseVersion") } - } - public enum AppPriceSchedules: Hashable, Codable, RawRepresentable { - case app - case automaticPrices - case baseTerritory - case manualPrices - case unknown(String) + public static var processingState: Self { + .init(rawValue: "processingState") + } - public var rawValue: String { - switch self { - case .app: return "app" - case .automaticPrices: return "automaticPrices" - case .baseTerritory: return "baseTerritory" - case .manualPrices: return "manualPrices" - case .unknown(let rawValue): return rawValue - } + public static var uploadedDate: Self { + .init(rawValue: "uploadedDate") } - public init(rawValue: String) { - switch rawValue { - case "app": self = .app - case "automaticPrices": self = .automaticPrices - case "baseTerritory": self = .baseTerritory - case "manualPrices": self = .manualPrices - default: self = .unknown(rawValue) - } + public static var usesNonExemptEncryption: Self { + .init(rawValue: "usesNonExemptEncryption") } - } - public enum AppPrices: Hashable, Codable, RawRepresentable { - case app - case priceTier - case unknown(String) + public static var version: Self { + .init(rawValue: "version") + } - public var rawValue: String { - switch self { - case .app: return "app" - case .priceTier: return "priceTier" - case .unknown(let rawValue): return rawValue - } + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "app": self = .app - case "priceTier": self = .priceTier - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum AppStoreVersionExperiments: Hashable, Codable, RawRepresentable { - case app - case appStoreVersionExperimentTreatments - case controlVersions - case endDate - case latestControlVersion - case name - case platform - case reviewRequired - case startDate - case started - case state - case trafficProportion - case unknown(String) - - public var rawValue: String { - switch self { - case .app: return "app" - case .appStoreVersionExperimentTreatments: return "appStoreVersionExperimentTreatments" - case .controlVersions: return "controlVersions" - case .endDate: return "endDate" - case .latestControlVersion: return "latestControlVersion" - case .name: return "name" - case .platform: return "platform" - case .reviewRequired: return "reviewRequired" - case .startDate: return "startDate" - case .started: return "started" - case .state: return "state" - case .trafficProportion: return "trafficProportion" - case .unknown(let rawValue): return rawValue - } + public struct CiProducts: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var additionalRepositories: Self { + .init(rawValue: "additionalRepositories") } - public init(rawValue: String) { - switch rawValue { - case "app": self = .app - case "appStoreVersionExperimentTreatments": self = .appStoreVersionExperimentTreatments - case "controlVersions": self = .controlVersions - case "endDate": self = .endDate - case "latestControlVersion": self = .latestControlVersion - case "name": self = .name - case "platform": self = .platform - case "reviewRequired": self = .reviewRequired - case "startDate": self = .startDate - case "started": self = .started - case "state": self = .state - case "trafficProportion": self = .trafficProportion - default: self = .unknown(rawValue) - } + public static var app: Self { + .init(rawValue: "app") } - } - public enum AppStoreVersions: Hashable, Codable, RawRepresentable { - case ageRatingDeclaration - case app - case appClipDefaultExperience - case appStoreReviewDetail - case appStoreState - case appStoreVersionExperiments - case appStoreVersionExperimentsV2 - case appStoreVersionLocalizations - case appStoreVersionPhasedRelease - case appStoreVersionSubmission - case build - case copyright - case createdDate - case customerReviews - case downloadable - case earliestReleaseDate - case platform - case releaseType - case routingAppCoverage - case versionString - case unknown(String) - - public var rawValue: String { - switch self { - case .ageRatingDeclaration: return "ageRatingDeclaration" - case .app: return "app" - case .appClipDefaultExperience: return "appClipDefaultExperience" - case .appStoreReviewDetail: return "appStoreReviewDetail" - case .appStoreState: return "appStoreState" - case .appStoreVersionExperiments: return "appStoreVersionExperiments" - case .appStoreVersionExperimentsV2: return "appStoreVersionExperimentsV2" - case .appStoreVersionLocalizations: return "appStoreVersionLocalizations" - case .appStoreVersionPhasedRelease: return "appStoreVersionPhasedRelease" - case .appStoreVersionSubmission: return "appStoreVersionSubmission" - case .build: return "build" - case .copyright: return "copyright" - case .createdDate: return "createdDate" - case .customerReviews: return "customerReviews" - case .downloadable: return "downloadable" - case .earliestReleaseDate: return "earliestReleaseDate" - case .platform: return "platform" - case .releaseType: return "releaseType" - case .routingAppCoverage: return "routingAppCoverage" - case .versionString: return "versionString" - case .unknown(let rawValue): return rawValue - } + public static var buildRuns: Self { + .init(rawValue: "buildRuns") } - public init(rawValue: String) { - switch rawValue { - case "ageRatingDeclaration": self = .ageRatingDeclaration - case "app": self = .app - case "appClipDefaultExperience": self = .appClipDefaultExperience - case "appStoreReviewDetail": self = .appStoreReviewDetail - case "appStoreState": self = .appStoreState - case "appStoreVersionExperiments": self = .appStoreVersionExperiments - case "appStoreVersionExperimentsV2": self = .appStoreVersionExperimentsV2 - case "appStoreVersionLocalizations": self = .appStoreVersionLocalizations - case "appStoreVersionPhasedRelease": self = .appStoreVersionPhasedRelease - case "appStoreVersionSubmission": self = .appStoreVersionSubmission - case "build": self = .build - case "copyright": self = .copyright - case "createdDate": self = .createdDate - case "customerReviews": self = .customerReviews - case "downloadable": self = .downloadable - case "earliestReleaseDate": self = .earliestReleaseDate - case "platform": self = .platform - case "releaseType": self = .releaseType - case "routingAppCoverage": self = .routingAppCoverage - case "versionString": self = .versionString - default: self = .unknown(rawValue) - } + public static var bundleId: Self { + .init(rawValue: "bundleId") } - } - public enum Apps: Hashable, Codable, RawRepresentable { - case appAvailability - case appClips - case appCustomProductPages - case appEncryptionDeclarations - case appEvents - case appInfos - case appPricePoints - case appPriceSchedule - case appStoreVersionExperimentsV2 - case appStoreVersions - case availableInNewTerritories - case availableTerritories - case betaAppLocalizations - case betaAppReviewDetail - case betaGroups - case betaLicenseAgreement - case betaTesters - case builds - case bundleId - case ciProduct - case contentRightsDeclaration - case customerReviews - case endUserLicenseAgreement - case gameCenterDetail - case gameCenterEnabledVersions - case inAppPurchases - case inAppPurchasesV2 - case isOrEverWasMadeForKids - case name - case perfPowerMetrics - case preOrder - case preReleaseVersions - case pricePoints - case prices - case primaryLocale - case promotedPurchases - case reviewSubmissions - case sku - case subscriptionGracePeriod - case subscriptionGroups - case subscriptionStatusUrl - case subscriptionStatusUrlForSandbox - case subscriptionStatusUrlVersion - case subscriptionStatusUrlVersionForSandbox - case unknown(String) - - public var rawValue: String { - switch self { - case .appAvailability: return "appAvailability" - case .appClips: return "appClips" - case .appCustomProductPages: return "appCustomProductPages" - case .appEncryptionDeclarations: return "appEncryptionDeclarations" - case .appEvents: return "appEvents" - case .appInfos: return "appInfos" - case .appPricePoints: return "appPricePoints" - case .appPriceSchedule: return "appPriceSchedule" - case .appStoreVersionExperimentsV2: return "appStoreVersionExperimentsV2" - case .appStoreVersions: return "appStoreVersions" - case .availableInNewTerritories: return "availableInNewTerritories" - case .availableTerritories: return "availableTerritories" - case .betaAppLocalizations: return "betaAppLocalizations" - case .betaAppReviewDetail: return "betaAppReviewDetail" - case .betaGroups: return "betaGroups" - case .betaLicenseAgreement: return "betaLicenseAgreement" - case .betaTesters: return "betaTesters" - case .builds: return "builds" - case .bundleId: return "bundleId" - case .ciProduct: return "ciProduct" - case .contentRightsDeclaration: return "contentRightsDeclaration" - case .customerReviews: return "customerReviews" - case .endUserLicenseAgreement: return "endUserLicenseAgreement" - case .gameCenterDetail: return "gameCenterDetail" - case .gameCenterEnabledVersions: return "gameCenterEnabledVersions" - case .inAppPurchases: return "inAppPurchases" - case .inAppPurchasesV2: return "inAppPurchasesV2" - case .isOrEverWasMadeForKids: return "isOrEverWasMadeForKids" - case .name: return "name" - case .perfPowerMetrics: return "perfPowerMetrics" - case .preOrder: return "preOrder" - case .preReleaseVersions: return "preReleaseVersions" - case .pricePoints: return "pricePoints" - case .prices: return "prices" - case .primaryLocale: return "primaryLocale" - case .promotedPurchases: return "promotedPurchases" - case .reviewSubmissions: return "reviewSubmissions" - case .sku: return "sku" - case .subscriptionGracePeriod: return "subscriptionGracePeriod" - case .subscriptionGroups: return "subscriptionGroups" - case .subscriptionStatusUrl: return "subscriptionStatusUrl" - case .subscriptionStatusUrlForSandbox: return "subscriptionStatusUrlForSandbox" - case .subscriptionStatusUrlVersion: return "subscriptionStatusUrlVersion" - case .subscriptionStatusUrlVersionForSandbox: return "subscriptionStatusUrlVersionForSandbox" - case .unknown(let rawValue): return rawValue - } + public static var createdDate: Self { + .init(rawValue: "createdDate") } - public init(rawValue: String) { - switch rawValue { - case "appAvailability": self = .appAvailability - case "appClips": self = .appClips - case "appCustomProductPages": self = .appCustomProductPages - case "appEncryptionDeclarations": self = .appEncryptionDeclarations - case "appEvents": self = .appEvents - case "appInfos": self = .appInfos - case "appPricePoints": self = .appPricePoints - case "appPriceSchedule": self = .appPriceSchedule - case "appStoreVersionExperimentsV2": self = .appStoreVersionExperimentsV2 - case "appStoreVersions": self = .appStoreVersions - case "availableInNewTerritories": self = .availableInNewTerritories - case "availableTerritories": self = .availableTerritories - case "betaAppLocalizations": self = .betaAppLocalizations - case "betaAppReviewDetail": self = .betaAppReviewDetail - case "betaGroups": self = .betaGroups - case "betaLicenseAgreement": self = .betaLicenseAgreement - case "betaTesters": self = .betaTesters - case "builds": self = .builds - case "bundleId": self = .bundleId - case "ciProduct": self = .ciProduct - case "contentRightsDeclaration": self = .contentRightsDeclaration - case "customerReviews": self = .customerReviews - case "endUserLicenseAgreement": self = .endUserLicenseAgreement - case "gameCenterDetail": self = .gameCenterDetail - case "gameCenterEnabledVersions": self = .gameCenterEnabledVersions - case "inAppPurchases": self = .inAppPurchases - case "inAppPurchasesV2": self = .inAppPurchasesV2 - case "isOrEverWasMadeForKids": self = .isOrEverWasMadeForKids - case "name": self = .name - case "perfPowerMetrics": self = .perfPowerMetrics - case "preOrder": self = .preOrder - case "preReleaseVersions": self = .preReleaseVersions - case "pricePoints": self = .pricePoints - case "prices": self = .prices - case "primaryLocale": self = .primaryLocale - case "promotedPurchases": self = .promotedPurchases - case "reviewSubmissions": self = .reviewSubmissions - case "sku": self = .sku - case "subscriptionGracePeriod": self = .subscriptionGracePeriod - case "subscriptionGroups": self = .subscriptionGroups - case "subscriptionStatusUrl": self = .subscriptionStatusUrl - case "subscriptionStatusUrlForSandbox": self = .subscriptionStatusUrlForSandbox - case "subscriptionStatusUrlVersion": self = .subscriptionStatusUrlVersion - case "subscriptionStatusUrlVersionForSandbox": self = .subscriptionStatusUrlVersionForSandbox - default: self = .unknown(rawValue) - } + public static var name: Self { + .init(rawValue: "name") } - } - public enum BetaAppLocalizations: Hashable, Codable, RawRepresentable { - case app - case description - case feedbackEmail - case locale - case marketingUrl - case privacyPolicyUrl - case tvOsPrivacyPolicy - case unknown(String) - - public var rawValue: String { - switch self { - case .app: return "app" - case .description: return "description" - case .feedbackEmail: return "feedbackEmail" - case .locale: return "locale" - case .marketingUrl: return "marketingUrl" - case .privacyPolicyUrl: return "privacyPolicyUrl" - case .tvOsPrivacyPolicy: return "tvOsPrivacyPolicy" - case .unknown(let rawValue): return rawValue - } + public static var primaryRepositories: Self { + .init(rawValue: "primaryRepositories") } - public init(rawValue: String) { - switch rawValue { - case "app": self = .app - case "description": self = .description - case "feedbackEmail": self = .feedbackEmail - case "locale": self = .locale - case "marketingUrl": self = .marketingUrl - case "privacyPolicyUrl": self = .privacyPolicyUrl - case "tvOsPrivacyPolicy": self = .tvOsPrivacyPolicy - default: self = .unknown(rawValue) - } + public static var productType: Self { + .init(rawValue: "productType") + } + + public static var workflows: Self { + .init(rawValue: "workflows") } - } - public enum BetaAppReviewDetails: Hashable, Codable, RawRepresentable { - case app - case contactEmail - case contactFirstName - case contactLastName - case contactPhone - case demoAccountName - case demoAccountPassword - case demoAccountRequired - case notes - case unknown(String) - - public var rawValue: String { - switch self { - case .app: return "app" - case .contactEmail: return "contactEmail" - case .contactFirstName: return "contactFirstName" - case .contactLastName: return "contactLastName" - case .contactPhone: return "contactPhone" - case .demoAccountName: return "demoAccountName" - case .demoAccountPassword: return "demoAccountPassword" - case .demoAccountRequired: return "demoAccountRequired" - case .notes: return "notes" - case .unknown(let rawValue): return rawValue - } + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "app": self = .app - case "contactEmail": self = .contactEmail - case "contactFirstName": self = .contactFirstName - case "contactLastName": self = .contactLastName - case "contactPhone": self = .contactPhone - case "demoAccountName": self = .demoAccountName - case "demoAccountPassword": self = .demoAccountPassword - case "demoAccountRequired": self = .demoAccountRequired - case "notes": self = .notes - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum BetaGroups: Hashable, Codable, RawRepresentable { - case app - case betaTesters - case builds - case createdDate - case feedbackEnabled - case hasAccessToAllBuilds - case iosBuildsAvailableForAppleSiliconMac - case isInternalGroup - case name - case publicLink - case publicLinkEnabled - case publicLinkId - case publicLinkLimit - case publicLinkLimitEnabled - case unknown(String) - - public var rawValue: String { - switch self { - case .app: return "app" - case .betaTesters: return "betaTesters" - case .builds: return "builds" - case .createdDate: return "createdDate" - case .feedbackEnabled: return "feedbackEnabled" - case .hasAccessToAllBuilds: return "hasAccessToAllBuilds" - case .iosBuildsAvailableForAppleSiliconMac: return "iosBuildsAvailableForAppleSiliconMac" - case .isInternalGroup: return "isInternalGroup" - case .name: return "name" - case .publicLink: return "publicLink" - case .publicLinkEnabled: return "publicLinkEnabled" - case .publicLinkId: return "publicLinkId" - case .publicLinkLimit: return "publicLinkLimit" - case .publicLinkLimitEnabled: return "publicLinkLimitEnabled" - case .unknown(let rawValue): return rawValue - } + public struct EndUserLicenseAgreements: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var agreementText: Self { + .init(rawValue: "agreementText") } - public init(rawValue: String) { - switch rawValue { - case "app": self = .app - case "betaTesters": self = .betaTesters - case "builds": self = .builds - case "createdDate": self = .createdDate - case "feedbackEnabled": self = .feedbackEnabled - case "hasAccessToAllBuilds": self = .hasAccessToAllBuilds - case "iosBuildsAvailableForAppleSiliconMac": self = .iosBuildsAvailableForAppleSiliconMac - case "isInternalGroup": self = .isInternalGroup - case "name": self = .name - case "publicLink": self = .publicLink - case "publicLinkEnabled": self = .publicLinkEnabled - case "publicLinkId": self = .publicLinkId - case "publicLinkLimit": self = .publicLinkLimit - case "publicLinkLimitEnabled": self = .publicLinkLimitEnabled - default: self = .unknown(rawValue) - } + public static var app: Self { + .init(rawValue: "app") } - } - public enum BetaLicenseAgreements: Hashable, Codable, RawRepresentable { - case agreementText - case app - case unknown(String) + public static var territories: Self { + .init(rawValue: "territories") + } - public var rawValue: String { - switch self { - case .agreementText: return "agreementText" - case .app: return "app" - case .unknown(let rawValue): return rawValue - } + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "agreementText": self = .agreementText - case "app": self = .app - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum Builds: Hashable, Codable, RawRepresentable { - case app - case appEncryptionDeclaration - case appStoreVersion - case betaAppReviewSubmission - case betaBuildLocalizations - case betaGroups - case buildAudienceType - case buildBetaDetail - case buildBundles - case computedMinMacOsVersion - case diagnosticSignatures - case expirationDate - case expired - case iconAssetToken - case icons - case individualTesters - case lsMinimumSystemVersion - case minOsVersion - case perfPowerMetrics - case preReleaseVersion - case processingState - case uploadedDate - case usesNonExemptEncryption - case version - case unknown(String) - - public var rawValue: String { - switch self { - case .app: return "app" - case .appEncryptionDeclaration: return "appEncryptionDeclaration" - case .appStoreVersion: return "appStoreVersion" - case .betaAppReviewSubmission: return "betaAppReviewSubmission" - case .betaBuildLocalizations: return "betaBuildLocalizations" - case .betaGroups: return "betaGroups" - case .buildAudienceType: return "buildAudienceType" - case .buildBetaDetail: return "buildBetaDetail" - case .buildBundles: return "buildBundles" - case .computedMinMacOsVersion: return "computedMinMacOsVersion" - case .diagnosticSignatures: return "diagnosticSignatures" - case .expirationDate: return "expirationDate" - case .expired: return "expired" - case .iconAssetToken: return "iconAssetToken" - case .icons: return "icons" - case .individualTesters: return "individualTesters" - case .lsMinimumSystemVersion: return "lsMinimumSystemVersion" - case .minOsVersion: return "minOsVersion" - case .perfPowerMetrics: return "perfPowerMetrics" - case .preReleaseVersion: return "preReleaseVersion" - case .processingState: return "processingState" - case .uploadedDate: return "uploadedDate" - case .usesNonExemptEncryption: return "usesNonExemptEncryption" - case .version: return "version" - case .unknown(let rawValue): return rawValue - } + public struct GameCenterDetails: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var achievementReleases: Self { + .init(rawValue: "achievementReleases") } - public init(rawValue: String) { - switch rawValue { - case "app": self = .app - case "appEncryptionDeclaration": self = .appEncryptionDeclaration - case "appStoreVersion": self = .appStoreVersion - case "betaAppReviewSubmission": self = .betaAppReviewSubmission - case "betaBuildLocalizations": self = .betaBuildLocalizations - case "betaGroups": self = .betaGroups - case "buildAudienceType": self = .buildAudienceType - case "buildBetaDetail": self = .buildBetaDetail - case "buildBundles": self = .buildBundles - case "computedMinMacOsVersion": self = .computedMinMacOsVersion - case "diagnosticSignatures": self = .diagnosticSignatures - case "expirationDate": self = .expirationDate - case "expired": self = .expired - case "iconAssetToken": self = .iconAssetToken - case "icons": self = .icons - case "individualTesters": self = .individualTesters - case "lsMinimumSystemVersion": self = .lsMinimumSystemVersion - case "minOsVersion": self = .minOsVersion - case "perfPowerMetrics": self = .perfPowerMetrics - case "preReleaseVersion": self = .preReleaseVersion - case "processingState": self = .processingState - case "uploadedDate": self = .uploadedDate - case "usesNonExemptEncryption": self = .usesNonExemptEncryption - case "version": self = .version - default: self = .unknown(rawValue) - } + public static var activityReleases: Self { + .init(rawValue: "activityReleases") } - } - public enum CiProducts: Hashable, Codable, RawRepresentable { - case additionalRepositories - case app - case buildRuns - case bundleId - case createdDate - case name - case primaryRepositories - case productType - case workflows - case unknown(String) - - public var rawValue: String { - switch self { - case .additionalRepositories: return "additionalRepositories" - case .app: return "app" - case .buildRuns: return "buildRuns" - case .bundleId: return "bundleId" - case .createdDate: return "createdDate" - case .name: return "name" - case .primaryRepositories: return "primaryRepositories" - case .productType: return "productType" - case .workflows: return "workflows" - case .unknown(let rawValue): return rawValue - } + public static var app: Self { + .init(rawValue: "app") } - public init(rawValue: String) { - switch rawValue { - case "additionalRepositories": self = .additionalRepositories - case "app": self = .app - case "buildRuns": self = .buildRuns - case "bundleId": self = .bundleId - case "createdDate": self = .createdDate - case "name": self = .name - case "primaryRepositories": self = .primaryRepositories - case "productType": self = .productType - case "workflows": self = .workflows - default: self = .unknown(rawValue) - } + public static var arcadeEnabled: Self { + .init(rawValue: "arcadeEnabled") } - } - public enum CustomerReviews: Hashable, Codable, RawRepresentable { - case body - case createdDate - case rating - case response - case reviewerNickname - case territory - case title - case unknown(String) - - public var rawValue: String { - switch self { - case .body: return "body" - case .createdDate: return "createdDate" - case .rating: return "rating" - case .response: return "response" - case .reviewerNickname: return "reviewerNickname" - case .territory: return "territory" - case .title: return "title" - case .unknown(let rawValue): return rawValue - } + public static var challengeEnabled: Self { + .init(rawValue: "challengeEnabled") } - public init(rawValue: String) { - switch rawValue { - case "body": self = .body - case "createdDate": self = .createdDate - case "rating": self = .rating - case "response": self = .response - case "reviewerNickname": self = .reviewerNickname - case "territory": self = .territory - case "title": self = .title - default: self = .unknown(rawValue) - } + public static var challengeReleases: Self { + .init(rawValue: "challengeReleases") } - } - public enum EndUserLicenseAgreements: Hashable, Codable, RawRepresentable { - case agreementText - case app - case territories - case unknown(String) + public static var challengesMinimumPlatformVersions: Self { + .init(rawValue: "challengesMinimumPlatformVersions") + } - public var rawValue: String { - switch self { - case .agreementText: return "agreementText" - case .app: return "app" - case .territories: return "territories" - case .unknown(let rawValue): return rawValue - } + public static var defaultGroupLeaderboard: Self { + .init(rawValue: "defaultGroupLeaderboard") } - public init(rawValue: String) { - switch rawValue { - case "agreementText": self = .agreementText - case "app": self = .app - case "territories": self = .territories - default: self = .unknown(rawValue) - } + public static var defaultLeaderboard: Self { + .init(rawValue: "defaultLeaderboard") } - } - public enum GameCenterDetails: Hashable, Codable, RawRepresentable { - case achievementReleases - case app - case arcadeEnabled - case challengeEnabled - case defaultGroupLeaderboard - case defaultLeaderboard - case gameCenterAchievements - case gameCenterAppVersions - case gameCenterGroup - case gameCenterLeaderboardSets - case gameCenterLeaderboards - case leaderboardReleases - case leaderboardSetReleases - case unknown(String) - - public var rawValue: String { - switch self { - case .achievementReleases: return "achievementReleases" - case .app: return "app" - case .arcadeEnabled: return "arcadeEnabled" - case .challengeEnabled: return "challengeEnabled" - case .defaultGroupLeaderboard: return "defaultGroupLeaderboard" - case .defaultLeaderboard: return "defaultLeaderboard" - case .gameCenterAchievements: return "gameCenterAchievements" - case .gameCenterAppVersions: return "gameCenterAppVersions" - case .gameCenterGroup: return "gameCenterGroup" - case .gameCenterLeaderboardSets: return "gameCenterLeaderboardSets" - case .gameCenterLeaderboards: return "gameCenterLeaderboards" - case .leaderboardReleases: return "leaderboardReleases" - case .leaderboardSetReleases: return "leaderboardSetReleases" - case .unknown(let rawValue): return rawValue - } + public static var gameCenterAchievements: Self { + .init(rawValue: "gameCenterAchievements") } - public init(rawValue: String) { - switch rawValue { - case "achievementReleases": self = .achievementReleases - case "app": self = .app - case "arcadeEnabled": self = .arcadeEnabled - case "challengeEnabled": self = .challengeEnabled - case "defaultGroupLeaderboard": self = .defaultGroupLeaderboard - case "defaultLeaderboard": self = .defaultLeaderboard - case "gameCenterAchievements": self = .gameCenterAchievements - case "gameCenterAppVersions": self = .gameCenterAppVersions - case "gameCenterGroup": self = .gameCenterGroup - case "gameCenterLeaderboardSets": self = .gameCenterLeaderboardSets - case "gameCenterLeaderboards": self = .gameCenterLeaderboards - case "leaderboardReleases": self = .leaderboardReleases - case "leaderboardSetReleases": self = .leaderboardSetReleases - default: self = .unknown(rawValue) - } + public static var gameCenterActivities: Self { + .init(rawValue: "gameCenterActivities") } - } - public enum GameCenterEnabledVersions: Hashable, Codable, RawRepresentable { - case app - case compatibleVersions - case iconAsset - case platform - case versionString - case unknown(String) - - public var rawValue: String { - switch self { - case .app: return "app" - case .compatibleVersions: return "compatibleVersions" - case .iconAsset: return "iconAsset" - case .platform: return "platform" - case .versionString: return "versionString" - case .unknown(let rawValue): return rawValue - } + public static var gameCenterAppVersions: Self { + .init(rawValue: "gameCenterAppVersions") } - public init(rawValue: String) { - switch rawValue { - case "app": self = .app - case "compatibleVersions": self = .compatibleVersions - case "iconAsset": self = .iconAsset - case "platform": self = .platform - case "versionString": self = .versionString - default: self = .unknown(rawValue) - } + public static var gameCenterChallenges: Self { + .init(rawValue: "gameCenterChallenges") + } + + public static var gameCenterGroup: Self { + .init(rawValue: "gameCenterGroup") + } + + public static var gameCenterLeaderboardSets: Self { + .init(rawValue: "gameCenterLeaderboardSets") + } + + public static var gameCenterLeaderboards: Self { + .init(rawValue: "gameCenterLeaderboards") } - } - public enum InAppPurchases: Hashable, Codable, RawRepresentable { - case app - case appStoreReviewScreenshot - case apps - case availableInAllTerritories - case content - case contentHosting - case familySharable - case iapPriceSchedule - case inAppPurchaseAvailability - case inAppPurchaseLocalizations - case inAppPurchaseType - case name - case pricePoints - case productId - case promotedPurchase - case referenceName - case reviewNote - case state - case unknown(String) - - public var rawValue: String { - switch self { - case .app: return "app" - case .appStoreReviewScreenshot: return "appStoreReviewScreenshot" - case .apps: return "apps" - case .availableInAllTerritories: return "availableInAllTerritories" - case .content: return "content" - case .contentHosting: return "contentHosting" - case .familySharable: return "familySharable" - case .iapPriceSchedule: return "iapPriceSchedule" - case .inAppPurchaseAvailability: return "inAppPurchaseAvailability" - case .inAppPurchaseLocalizations: return "inAppPurchaseLocalizations" - case .inAppPurchaseType: return "inAppPurchaseType" - case .name: return "name" - case .pricePoints: return "pricePoints" - case .productId: return "productId" - case .promotedPurchase: return "promotedPurchase" - case .referenceName: return "referenceName" - case .reviewNote: return "reviewNote" - case .state: return "state" - case .unknown(let rawValue): return rawValue - } + public static var leaderboardReleases: Self { + .init(rawValue: "leaderboardReleases") } + public static var leaderboardSetReleases: Self { + .init(rawValue: "leaderboardSetReleases") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "app": self = .app - case "appStoreReviewScreenshot": self = .appStoreReviewScreenshot - case "apps": self = .apps - case "availableInAllTerritories": self = .availableInAllTerritories - case "content": self = .content - case "contentHosting": self = .contentHosting - case "familySharable": self = .familySharable - case "iapPriceSchedule": self = .iapPriceSchedule - case "inAppPurchaseAvailability": self = .inAppPurchaseAvailability - case "inAppPurchaseLocalizations": self = .inAppPurchaseLocalizations - case "inAppPurchaseType": self = .inAppPurchaseType - case "name": self = .name - case "pricePoints": self = .pricePoints - case "productId": self = .productId - case "promotedPurchase": self = .promotedPurchase - case "referenceName": self = .referenceName - case "reviewNote": self = .reviewNote - case "state": self = .state - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum PerfPowerMetrics: Hashable, Codable, RawRepresentable { - case deviceType - case metricType - case platform - case unknown(String) + public struct GameCenterEnabledVersions: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var app: Self { + .init(rawValue: "app") + } + + public static var compatibleVersions: Self { + .init(rawValue: "compatibleVersions") + } + + public static var iconAsset: Self { + .init(rawValue: "iconAsset") + } + + public static var platform: Self { + .init(rawValue: "platform") + } + + public static var versionString: Self { + .init(rawValue: "versionString") + } - public var rawValue: String { - switch self { - case .deviceType: return "deviceType" - case .metricType: return "metricType" - case .platform: return "platform" - case .unknown(let rawValue): return rawValue - } + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "deviceType": self = .deviceType - case "metricType": self = .metricType - case "platform": self = .platform - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum PreReleaseVersions: Hashable, Codable, RawRepresentable { - case app - case builds - case platform - case version - case unknown(String) + public struct InAppPurchases: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var appStoreReviewScreenshot: Self { + .init(rawValue: "appStoreReviewScreenshot") + } + + public static var apps: Self { + .init(rawValue: "apps") + } + + public static var content: Self { + .init(rawValue: "content") + } + + public static var contentHosting: Self { + .init(rawValue: "contentHosting") + } + + public static var familySharable: Self { + .init(rawValue: "familySharable") + } + + public static var iapPriceSchedule: Self { + .init(rawValue: "iapPriceSchedule") + } + + public static var images: Self { + .init(rawValue: "images") + } + + public static var inAppPurchaseAvailability: Self { + .init(rawValue: "inAppPurchaseAvailability") + } + + public static var inAppPurchaseLocalizations: Self { + .init(rawValue: "inAppPurchaseLocalizations") + } + + public static var inAppPurchaseType: Self { + .init(rawValue: "inAppPurchaseType") + } + + public static var name: Self { + .init(rawValue: "name") + } + + public static var pricePoints: Self { + .init(rawValue: "pricePoints") + } + + public static var productId: Self { + .init(rawValue: "productId") + } + + public static var promotedPurchase: Self { + .init(rawValue: "promotedPurchase") + } + + public static var referenceName: Self { + .init(rawValue: "referenceName") + } + + public static var reviewNote: Self { + .init(rawValue: "reviewNote") + } + + public static var state: Self { + .init(rawValue: "state") + } - public var rawValue: String { - switch self { - case .app: return "app" - case .builds: return "builds" - case .platform: return "platform" - case .version: return "version" - case .unknown(let rawValue): return rawValue - } + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "app": self = .app - case "builds": self = .builds - case "platform": self = .platform - case "version": self = .version - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum PromotedPurchases: Hashable, Codable, RawRepresentable { - case app - case enabled - case inAppPurchaseV2 - case promotionImages - case state - case subscription - case visibleForAllUsers - case unknown(String) - - public var rawValue: String { - switch self { - case .app: return "app" - case .enabled: return "enabled" - case .inAppPurchaseV2: return "inAppPurchaseV2" - case .promotionImages: return "promotionImages" - case .state: return "state" - case .subscription: return "subscription" - case .visibleForAllUsers: return "visibleForAllUsers" - case .unknown(let rawValue): return rawValue - } + public struct PreReleaseVersions: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var app: Self { + .init(rawValue: "app") + } + + public static var builds: Self { + .init(rawValue: "builds") + } + + public static var platform: Self { + .init(rawValue: "platform") + } + + public static var version: Self { + .init(rawValue: "version") + } + + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "app": self = .app - case "enabled": self = .enabled - case "inAppPurchaseV2": self = .inAppPurchaseV2 - case "promotionImages": self = .promotionImages - case "state": self = .state - case "subscription": self = .subscription - case "visibleForAllUsers": self = .visibleForAllUsers - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum ReviewSubmissions: Hashable, Codable, RawRepresentable { - case app - case appStoreVersionForReview - case canceled - case items - case lastUpdatedByActor - case platform - case state - case submitted - case submittedByActor - case submittedDate - case unknown(String) - - public var rawValue: String { - switch self { - case .app: return "app" - case .appStoreVersionForReview: return "appStoreVersionForReview" - case .canceled: return "canceled" - case .items: return "items" - case .lastUpdatedByActor: return "lastUpdatedByActor" - case .platform: return "platform" - case .state: return "state" - case .submitted: return "submitted" - case .submittedByActor: return "submittedByActor" - case .submittedDate: return "submittedDate" - case .unknown(let rawValue): return rawValue - } + public struct PromotedPurchases: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var enabled: Self { + .init(rawValue: "enabled") + } + + public static var inAppPurchaseV2: Self { + .init(rawValue: "inAppPurchaseV2") + } + + public static var state: Self { + .init(rawValue: "state") + } + + public static var subscription: Self { + .init(rawValue: "subscription") } + public static var visibleForAllUsers: Self { + .init(rawValue: "visibleForAllUsers") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "app": self = .app - case "appStoreVersionForReview": self = .appStoreVersionForReview - case "canceled": self = .canceled - case "items": self = .items - case "lastUpdatedByActor": self = .lastUpdatedByActor - case "platform": self = .platform - case "state": self = .state - case "submitted": self = .submitted - case "submittedByActor": self = .submittedByActor - case "submittedDate": self = .submittedDate - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum SubscriptionGracePeriods: Hashable, Codable, RawRepresentable { - case duration - case optIn - case renewalType - case sandboxOptIn - case unknown(String) + public struct ReviewSubmissions: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var app: Self { + .init(rawValue: "app") + } + + public static var appStoreVersionForReview: Self { + .init(rawValue: "appStoreVersionForReview") + } + + public static var items: Self { + .init(rawValue: "items") + } + + public static var lastUpdatedByActor: Self { + .init(rawValue: "lastUpdatedByActor") + } + + public static var platform: Self { + .init(rawValue: "platform") + } + + public static var state: Self { + .init(rawValue: "state") + } + + public static var submittedByActor: Self { + .init(rawValue: "submittedByActor") + } + + public static var submittedDate: Self { + .init(rawValue: "submittedDate") + } - public var rawValue: String { - switch self { - case .duration: return "duration" - case .optIn: return "optIn" - case .renewalType: return "renewalType" - case .sandboxOptIn: return "sandboxOptIn" - case .unknown(let rawValue): return rawValue - } + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "duration": self = .duration - case "optIn": self = .optIn - case "renewalType": self = .renewalType - case "sandboxOptIn": self = .sandboxOptIn - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum SubscriptionGroups: Hashable, Codable, RawRepresentable { - case app - case referenceName - case subscriptionGroupLocalizations - case subscriptions - case unknown(String) + public struct SubscriptionGracePeriods: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var duration: Self { + .init(rawValue: "duration") + } + + public static var optIn: Self { + .init(rawValue: "optIn") + } + + public static var renewalType: Self { + .init(rawValue: "renewalType") + } + + public static var sandboxOptIn: Self { + .init(rawValue: "sandboxOptIn") + } - public var rawValue: String { - switch self { - case .app: return "app" - case .referenceName: return "referenceName" - case .subscriptionGroupLocalizations: return "subscriptionGroupLocalizations" - case .subscriptions: return "subscriptions" - case .unknown(let rawValue): return rawValue - } + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "app": self = .app - case "referenceName": self = .referenceName - case "subscriptionGroupLocalizations": self = .subscriptionGroupLocalizations - case "subscriptions": self = .subscriptions - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum Territories: Hashable, Codable, RawRepresentable { - case currency - case unknown(String) + public struct SubscriptionGroups: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var referenceName: Self { + .init(rawValue: "referenceName") + } + + public static var subscriptionGroupLocalizations: Self { + .init(rawValue: "subscriptionGroupLocalizations") + } + + public static var subscriptions: Self { + .init(rawValue: "subscriptions") + } - public var rawValue: String { - switch self { - case .currency: return "currency" - case .unknown(let rawValue): return rawValue - } + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "currency": self = .currency - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } public struct Relation: Hashable { - /// the fields to include for returned resources of type appAvailabilities - public static var appAvailabilities: Relation<[AppAvailabilities]?> { - .init(key: "fields[appAvailabilities]") - } - /// the fields to include for returned resources of type appClips public static var appClips: Relation<[AppClips]?> { .init(key: "fields[appClips]") @@ -1590,26 +1585,6 @@ extension V1.Apps.ById.GET { .init(key: "fields[appInfos]") } - /// the fields to include for returned resources of type appPreOrders - public static var appPreOrders: Relation<[AppPreOrders]?> { - .init(key: "fields[appPreOrders]") - } - - /// the fields to include for returned resources of type appPricePoints - public static var appPricePoints: Relation<[AppPricePoints]?> { - .init(key: "fields[appPricePoints]") - } - - /// the fields to include for returned resources of type appPriceSchedules - public static var appPriceSchedules: Relation<[AppPriceSchedules]?> { - .init(key: "fields[appPriceSchedules]") - } - - /// the fields to include for returned resources of type appPrices - public static var appPrices: Relation<[AppPrices]?> { - .init(key: "fields[appPrices]") - } - /// the fields to include for returned resources of type appStoreVersionExperiments public static var appStoreVersionExperiments: Relation<[AppStoreVersionExperiments]?> { .init(key: "fields[appStoreVersionExperiments]") @@ -1655,11 +1630,6 @@ extension V1.Apps.ById.GET { .init(key: "fields[ciProducts]") } - /// the fields to include for returned resources of type customerReviews - public static var customerReviews: Relation<[CustomerReviews]?> { - .init(key: "fields[customerReviews]") - } - /// the fields to include for returned resources of type endUserLicenseAgreements public static var endUserLicenseAgreements: Relation<[EndUserLicenseAgreements]?> { .init(key: "fields[endUserLicenseAgreements]") @@ -1680,11 +1650,6 @@ extension V1.Apps.ById.GET { .init(key: "fields[inAppPurchases]") } - /// the fields to include for returned resources of type perfPowerMetrics - public static var perfPowerMetrics: Relation<[PerfPowerMetrics]?> { - .init(key: "fields[perfPowerMetrics]") - } - /// the fields to include for returned resources of type preReleaseVersions public static var preReleaseVersions: Relation<[PreReleaseVersions]?> { .init(key: "fields[preReleaseVersions]") @@ -1710,11 +1675,6 @@ extension V1.Apps.ById.GET { .init(key: "fields[subscriptionGroups]") } - /// the fields to include for returned resources of type territories - public static var territories: Relation<[Territories]?> { - .init(key: "fields[territories]") - } - internal let key: String public func hash(into hasher: inout Hasher) { @@ -1723,97 +1683,107 @@ extension V1.Apps.ById.GET { } } - public enum Include: Hashable, Codable, RawRepresentable { - case appClips - case appCustomProductPages - case appEncryptionDeclarations - case appEvents - case appInfos - case appStoreVersionExperimentsV2 - case appStoreVersions - case availableTerritories - case betaAppLocalizations - case betaAppReviewDetail - case betaGroups - case betaLicenseAgreement - case builds - case ciProduct - case endUserLicenseAgreement - case gameCenterDetail - case gameCenterEnabledVersions - case inAppPurchases - case inAppPurchasesV2 - case preOrder - case preReleaseVersions - case prices - case promotedPurchases - case reviewSubmissions - case subscriptionGracePeriod - case subscriptionGroups - case unknown(String) - - public var rawValue: String { - switch self { - case .appClips: return "appClips" - case .appCustomProductPages: return "appCustomProductPages" - case .appEncryptionDeclarations: return "appEncryptionDeclarations" - case .appEvents: return "appEvents" - case .appInfos: return "appInfos" - case .appStoreVersionExperimentsV2: return "appStoreVersionExperimentsV2" - case .appStoreVersions: return "appStoreVersions" - case .availableTerritories: return "availableTerritories" - case .betaAppLocalizations: return "betaAppLocalizations" - case .betaAppReviewDetail: return "betaAppReviewDetail" - case .betaGroups: return "betaGroups" - case .betaLicenseAgreement: return "betaLicenseAgreement" - case .builds: return "builds" - case .ciProduct: return "ciProduct" - case .endUserLicenseAgreement: return "endUserLicenseAgreement" - case .gameCenterDetail: return "gameCenterDetail" - case .gameCenterEnabledVersions: return "gameCenterEnabledVersions" - case .inAppPurchases: return "inAppPurchases" - case .inAppPurchasesV2: return "inAppPurchasesV2" - case .preOrder: return "preOrder" - case .preReleaseVersions: return "preReleaseVersions" - case .prices: return "prices" - case .promotedPurchases: return "promotedPurchases" - case .reviewSubmissions: return "reviewSubmissions" - case .subscriptionGracePeriod: return "subscriptionGracePeriod" - case .subscriptionGroups: return "subscriptionGroups" - case .unknown(let rawValue): return rawValue - } + public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var appClips: Self { + .init(rawValue: "appClips") + } + + public static var appCustomProductPages: Self { + .init(rawValue: "appCustomProductPages") + } + + public static var appEncryptionDeclarations: Self { + .init(rawValue: "appEncryptionDeclarations") + } + + public static var appEvents: Self { + .init(rawValue: "appEvents") + } + + public static var appInfos: Self { + .init(rawValue: "appInfos") + } + + public static var appStoreVersionExperimentsV2: Self { + .init(rawValue: "appStoreVersionExperimentsV2") + } + + public static var appStoreVersions: Self { + .init(rawValue: "appStoreVersions") + } + + public static var betaAppLocalizations: Self { + .init(rawValue: "betaAppLocalizations") + } + + public static var betaAppReviewDetail: Self { + .init(rawValue: "betaAppReviewDetail") + } + + public static var betaGroups: Self { + .init(rawValue: "betaGroups") + } + + public static var betaLicenseAgreement: Self { + .init(rawValue: "betaLicenseAgreement") } + public static var builds: Self { + .init(rawValue: "builds") + } + + public static var ciProduct: Self { + .init(rawValue: "ciProduct") + } + + public static var endUserLicenseAgreement: Self { + .init(rawValue: "endUserLicenseAgreement") + } + + public static var gameCenterDetail: Self { + .init(rawValue: "gameCenterDetail") + } + + public static var gameCenterEnabledVersions: Self { + .init(rawValue: "gameCenterEnabledVersions") + } + + public static var inAppPurchases: Self { + .init(rawValue: "inAppPurchases") + } + + public static var inAppPurchasesV2: Self { + .init(rawValue: "inAppPurchasesV2") + } + + public static var preReleaseVersions: Self { + .init(rawValue: "preReleaseVersions") + } + + public static var promotedPurchases: Self { + .init(rawValue: "promotedPurchases") + } + + public static var reviewSubmissions: Self { + .init(rawValue: "reviewSubmissions") + } + + public static var subscriptionGracePeriod: Self { + .init(rawValue: "subscriptionGracePeriod") + } + + public static var subscriptionGroups: Self { + .init(rawValue: "subscriptionGroups") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "appClips": self = .appClips - case "appCustomProductPages": self = .appCustomProductPages - case "appEncryptionDeclarations": self = .appEncryptionDeclarations - case "appEvents": self = .appEvents - case "appInfos": self = .appInfos - case "appStoreVersionExperimentsV2": self = .appStoreVersionExperimentsV2 - case "appStoreVersions": self = .appStoreVersions - case "availableTerritories": self = .availableTerritories - case "betaAppLocalizations": self = .betaAppLocalizations - case "betaAppReviewDetail": self = .betaAppReviewDetail - case "betaGroups": self = .betaGroups - case "betaLicenseAgreement": self = .betaLicenseAgreement - case "builds": self = .builds - case "ciProduct": self = .ciProduct - case "endUserLicenseAgreement": self = .endUserLicenseAgreement - case "gameCenterDetail": self = .gameCenterDetail - case "gameCenterEnabledVersions": self = .gameCenterEnabledVersions - case "inAppPurchases": self = .inAppPurchases - case "inAppPurchasesV2": self = .inAppPurchasesV2 - case "preOrder": self = .preOrder - case "preReleaseVersions": self = .preReleaseVersions - case "prices": self = .prices - case "promotedPurchases": self = .promotedPurchases - case "reviewSubmissions": self = .reviewSubmissions - case "subscriptionGracePeriod": self = .subscriptionGracePeriod - case "subscriptionGroups": self = .subscriptionGroups - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } @@ -1861,11 +1831,6 @@ extension V1.Apps.ById.GET { .init(key: "limit[appStoreVersions]") } - /// maximum number of related availableTerritories returned (when they are included) - public static var availableTerritories: Relation { - .init(key: "limit[availableTerritories]") - } - /// maximum number of related betaAppLocalizations returned (when they are included) public static var betaAppLocalizations: Relation { .init(key: "limit[betaAppLocalizations]") @@ -1901,11 +1866,6 @@ extension V1.Apps.ById.GET { .init(key: "limit[preReleaseVersions]") } - /// maximum number of related prices returned (when they are included) - public static var prices: Relation { - .init(key: "limit[prices]") - } - /// maximum number of related promotedPurchases returned (when they are included) public static var promotedPurchases: Relation { .init(key: "limit[promotedPurchases]") diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/AppsById.PATCH.37ceec0.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/AppsById.PATCH.37ceec0.generated.swift index b93a2f4d..6933bf0a 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/AppsById.PATCH.37ceec0.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/AppsById.PATCH.37ceec0.generated.swift @@ -48,9 +48,12 @@ extension V1.Apps.ById { /// - Returns: **200**, Single App as `AppResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **422**, Unprocessable request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -64,6 +67,9 @@ extension V1.Apps.ById { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) @@ -73,6 +79,12 @@ extension V1.Apps.ById { case 409: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 422: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/BackgroundAssets/AppsByIdBackgroundAssets.GET.77addb9.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/BackgroundAssets/AppsByIdBackgroundAssets.GET.77addb9.generated.swift new file mode 100644 index 00000000..ea5d5590 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/BackgroundAssets/AppsByIdBackgroundAssets.GET.77addb9.generated.swift @@ -0,0 +1,240 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.Apps.ById.BackgroundAssets { + public struct GET: Endpoint { + public typealias Response = BackgroundAssetsResponse + + public var path: String { + "/v1/apps/\(id)/backgroundAssets" + } + + /// the id of the requested resource + public var id: String + + public var parameters: Parameters = Parameters() + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + components?.queryItems = [ + URLQueryItem(name: "fields[backgroundAssetVersions]", + value: parameters.fields[.backgroundAssetVersions]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "fields[backgroundAssets]", + value: parameters.fields[.backgroundAssets]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "filter[assetPackIdentifier]", + value: parameters.filter[.assetPackIdentifier]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "include", + value: parameters.include?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "limit", + value: parameters.limit.map { "\($0)" }) + ].filter { $0.value != nil } + if components?.queryItems?.isEmpty ?? false { + components?.queryItems = nil + } + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "GET" + return urlRequest + } + + /// - Returns: **200**, List of BackgroundAssets as `BackgroundAssetsResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(BackgroundAssetsResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +extension V1.Apps.ById.BackgroundAssets.GET { + public struct Parameters: Hashable { + public var fields: Fields = Fields() + + public var filter: Filter = Filter() + + /// comma-separated list of relationships to include + public var include: [Include]? + + /// maximum resources per page + public var limit: Int? + + public struct Fields: Hashable { + public subscript (_ relation: Relation) -> T { + get { values[relation]?.base as! T } + set { values[relation] = AnyHashable(newValue) } + } + + private var values: [AnyHashable: AnyHashable] = [:] + + public struct BackgroundAssetVersions: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var assetFile: Self { + .init(rawValue: "assetFile") + } + + public static var backgroundAssetUploadFiles: Self { + .init(rawValue: "backgroundAssetUploadFiles") + } + + public static var createdDate: Self { + .init(rawValue: "createdDate") + } + + public static var internalBetaRelease: Self { + .init(rawValue: "internalBetaRelease") + } + + public static var manifestFile: Self { + .init(rawValue: "manifestFile") + } + + public static var platforms: Self { + .init(rawValue: "platforms") + } + + public static var state: Self { + .init(rawValue: "state") + } + + public static var version: Self { + .init(rawValue: "version") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct BackgroundAssets: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var assetPackIdentifier: Self { + .init(rawValue: "assetPackIdentifier") + } + + public static var createdDate: Self { + .init(rawValue: "createdDate") + } + + public static var internalBetaVersion: Self { + .init(rawValue: "internalBetaVersion") + } + + public static var versions: Self { + .init(rawValue: "versions") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct Relation: Hashable { + /// the fields to include for returned resources of type backgroundAssetVersions + public static var backgroundAssetVersions: Relation<[BackgroundAssetVersions]?> { + .init(key: "fields[backgroundAssetVersions]") + } + + /// the fields to include for returned resources of type backgroundAssets + public static var backgroundAssets: Relation<[BackgroundAssets]?> { + .init(key: "fields[backgroundAssets]") + } + + internal let key: String + + public func hash(into hasher: inout Hasher) { + hasher.combine(key) + } + } + } + + public struct Filter: Hashable { + public subscript (_ relation: Relation) -> T { + get { values[relation]?.base as! T } + set { values[relation] = AnyHashable(newValue) } + } + + private var values: [AnyHashable: AnyHashable] = [:] + + public struct Relation: Hashable { + /// filter by attribute 'assetPackIdentifier' + public static var assetPackIdentifier: Relation<[String]?> { + .init(key: "filter[assetPackIdentifier]") + } + + internal let key: String + + public func hash(into hasher: inout Hasher) { + hasher.combine(key) + } + } + } + + public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var internalBetaVersion: Self { + .init(rawValue: "internalBetaVersion") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/BetaAppLocalizations/AppsByIdBetaAppLocalizations.GET.e032b03.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/BetaAppLocalizations/AppsByIdBetaAppLocalizations.GET.e032b03.generated.swift index 4dd6ab0c..057c8e40 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/BetaAppLocalizations/AppsByIdBetaAppLocalizations.GET.e032b03.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/BetaAppLocalizations/AppsByIdBetaAppLocalizations.GET.e032b03.generated.swift @@ -44,8 +44,10 @@ extension V1.Apps.ById.BetaAppLocalizations { /// - Returns: **200**, List of BetaAppLocalizations with get as `BetaAppLocalizationsWithoutIncludesResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -59,12 +61,18 @@ extension V1.Apps.ById.BetaAppLocalizations { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 404: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -87,40 +95,43 @@ extension V1.Apps.ById.BetaAppLocalizations.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum BetaAppLocalizations: Hashable, Codable, RawRepresentable { - case app - case description - case feedbackEmail - case locale - case marketingUrl - case privacyPolicyUrl - case tvOsPrivacyPolicy - case unknown(String) - - public var rawValue: String { - switch self { - case .app: return "app" - case .description: return "description" - case .feedbackEmail: return "feedbackEmail" - case .locale: return "locale" - case .marketingUrl: return "marketingUrl" - case .privacyPolicyUrl: return "privacyPolicyUrl" - case .tvOsPrivacyPolicy: return "tvOsPrivacyPolicy" - case .unknown(let rawValue): return rawValue - } + public struct BetaAppLocalizations: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var app: Self { + .init(rawValue: "app") + } + + public static var description: Self { + .init(rawValue: "description") + } + + public static var feedbackEmail: Self { + .init(rawValue: "feedbackEmail") + } + + public static var locale: Self { + .init(rawValue: "locale") } + public static var marketingUrl: Self { + .init(rawValue: "marketingUrl") + } + + public static var privacyPolicyUrl: Self { + .init(rawValue: "privacyPolicyUrl") + } + + public static var tvOsPrivacyPolicy: Self { + .init(rawValue: "tvOsPrivacyPolicy") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "app": self = .app - case "description": self = .description - case "feedbackEmail": self = .feedbackEmail - case "locale": self = .locale - case "marketingUrl": self = .marketingUrl - case "privacyPolicyUrl": self = .privacyPolicyUrl - case "tvOsPrivacyPolicy": self = .tvOsPrivacyPolicy - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/BetaAppReviewDetail/AppsByIdBetaAppReviewDetail.GET.2b03a96.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/BetaAppReviewDetail/AppsByIdBetaAppReviewDetail.GET.2b03a96.generated.swift index 536337e0..75671e0c 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/BetaAppReviewDetail/AppsByIdBetaAppReviewDetail.GET.2b03a96.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/BetaAppReviewDetail/AppsByIdBetaAppReviewDetail.GET.2b03a96.generated.swift @@ -42,8 +42,10 @@ extension V1.Apps.ById.BetaAppReviewDetail { /// - Returns: **200**, Single BetaAppReviewDetail with get as `BetaAppReviewDetailWithoutIncludesResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -57,12 +59,18 @@ extension V1.Apps.ById.BetaAppReviewDetail { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 404: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -82,46 +90,51 @@ extension V1.Apps.ById.BetaAppReviewDetail.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum BetaAppReviewDetails: Hashable, Codable, RawRepresentable { - case app - case contactEmail - case contactFirstName - case contactLastName - case contactPhone - case demoAccountName - case demoAccountPassword - case demoAccountRequired - case notes - case unknown(String) - - public var rawValue: String { - switch self { - case .app: return "app" - case .contactEmail: return "contactEmail" - case .contactFirstName: return "contactFirstName" - case .contactLastName: return "contactLastName" - case .contactPhone: return "contactPhone" - case .demoAccountName: return "demoAccountName" - case .demoAccountPassword: return "demoAccountPassword" - case .demoAccountRequired: return "demoAccountRequired" - case .notes: return "notes" - case .unknown(let rawValue): return rawValue - } + public struct BetaAppReviewDetails: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var app: Self { + .init(rawValue: "app") + } + + public static var contactEmail: Self { + .init(rawValue: "contactEmail") + } + + public static var contactFirstName: Self { + .init(rawValue: "contactFirstName") + } + + public static var contactLastName: Self { + .init(rawValue: "contactLastName") + } + + public static var contactPhone: Self { + .init(rawValue: "contactPhone") } + public static var demoAccountName: Self { + .init(rawValue: "demoAccountName") + } + + public static var demoAccountPassword: Self { + .init(rawValue: "demoAccountPassword") + } + + public static var demoAccountRequired: Self { + .init(rawValue: "demoAccountRequired") + } + + public static var notes: Self { + .init(rawValue: "notes") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "app": self = .app - case "contactEmail": self = .contactEmail - case "contactFirstName": self = .contactFirstName - case "contactLastName": self = .contactLastName - case "contactPhone": self = .contactPhone - case "demoAccountName": self = .demoAccountName - case "demoAccountPassword": self = .demoAccountPassword - case "demoAccountRequired": self = .demoAccountRequired - case "notes": self = .notes - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/BetaFeedbackCrashSubmissions/AppsByIdBetaFeedbackCrashSubmissions.GET.4ae2302.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/BetaFeedbackCrashSubmissions/AppsByIdBetaFeedbackCrashSubmissions.GET.4ae2302.generated.swift new file mode 100644 index 00000000..93519e48 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/BetaFeedbackCrashSubmissions/AppsByIdBetaFeedbackCrashSubmissions.GET.4ae2302.generated.swift @@ -0,0 +1,562 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.Apps.ById.BetaFeedbackCrashSubmissions { + public struct GET: Endpoint { + public typealias Response = BetaFeedbackCrashSubmissionsResponse + + public var path: String { + "/v1/apps/\(id)/betaFeedbackCrashSubmissions" + } + + /// the id of the requested resource + public var id: String + + public var parameters: Parameters = Parameters() + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + components?.queryItems = [ + URLQueryItem(name: "fields[betaFeedbackCrashSubmissions]", + value: parameters.fields[.betaFeedbackCrashSubmissions]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "fields[betaTesters]", + value: parameters.fields[.betaTesters]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "fields[builds]", + value: parameters.fields[.builds]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "filter[appPlatform]", + value: parameters.filter[.appPlatform]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "filter[build.preReleaseVersion]", + value: parameters.filter[.buildPreReleaseVersion]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "filter[build]", + value: parameters.filter[.build]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "filter[deviceModel]", + value: parameters.filter[.deviceModel]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "filter[devicePlatform]", + value: parameters.filter[.devicePlatform]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "filter[osVersion]", + value: parameters.filter[.osVersion]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "filter[tester]", + value: parameters.filter[.tester]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "include", + value: parameters.include?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "limit", + value: parameters.limit.map { "\($0)" }), + URLQueryItem(name: "sort", + value: parameters.sort?.map { "\($0)" }.joined(separator: ",")) + ].filter { $0.value != nil } + if components?.queryItems?.isEmpty ?? false { + components?.queryItems = nil + } + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "GET" + return urlRequest + } + + /// - Returns: **200**, List of BetaFeedbackCrashSubmissions as `BetaFeedbackCrashSubmissionsResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(BetaFeedbackCrashSubmissionsResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +extension V1.Apps.ById.BetaFeedbackCrashSubmissions.GET { + public struct Parameters: Hashable { + public var fields: Fields = Fields() + + public var filter: Filter = Filter() + + /// comma-separated list of relationships to include + public var include: [Include]? + + /// maximum resources per page + public var limit: Int? + + /// comma-separated list of sort expressions; resources will be sorted as specified + public var sort: [Sort]? + + public struct Fields: Hashable { + public subscript (_ relation: Relation) -> T { + get { values[relation]?.base as! T } + set { values[relation] = AnyHashable(newValue) } + } + + private var values: [AnyHashable: AnyHashable] = [:] + + public struct BetaFeedbackCrashSubmissions: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var appPlatform: Self { + .init(rawValue: "appPlatform") + } + + public static var appUptimeInMilliseconds: Self { + .init(rawValue: "appUptimeInMilliseconds") + } + + public static var architecture: Self { + .init(rawValue: "architecture") + } + + public static var batteryPercentage: Self { + .init(rawValue: "batteryPercentage") + } + + public static var build: Self { + .init(rawValue: "build") + } + + public static var buildBundleId: Self { + .init(rawValue: "buildBundleId") + } + + public static var comment: Self { + .init(rawValue: "comment") + } + + public static var connectionType: Self { + .init(rawValue: "connectionType") + } + + public static var crashLog: Self { + .init(rawValue: "crashLog") + } + + public static var createdDate: Self { + .init(rawValue: "createdDate") + } + + public static var deviceFamily: Self { + .init(rawValue: "deviceFamily") + } + + public static var deviceModel: Self { + .init(rawValue: "deviceModel") + } + + public static var devicePlatform: Self { + .init(rawValue: "devicePlatform") + } + + public static var diskBytesAvailable: Self { + .init(rawValue: "diskBytesAvailable") + } + + public static var diskBytesTotal: Self { + .init(rawValue: "diskBytesTotal") + } + + public static var email: Self { + .init(rawValue: "email") + } + + public static var locale: Self { + .init(rawValue: "locale") + } + + public static var osVersion: Self { + .init(rawValue: "osVersion") + } + + public static var pairedAppleWatch: Self { + .init(rawValue: "pairedAppleWatch") + } + + public static var screenHeightInPoints: Self { + .init(rawValue: "screenHeightInPoints") + } + + public static var screenWidthInPoints: Self { + .init(rawValue: "screenWidthInPoints") + } + + public static var tester: Self { + .init(rawValue: "tester") + } + + public static var timeZone: Self { + .init(rawValue: "timeZone") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct BetaTesters: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var apps: Self { + .init(rawValue: "apps") + } + + public static var betaGroups: Self { + .init(rawValue: "betaGroups") + } + + public static var builds: Self { + .init(rawValue: "builds") + } + + public static var email: Self { + .init(rawValue: "email") + } + + public static var firstName: Self { + .init(rawValue: "firstName") + } + + public static var inviteType: Self { + .init(rawValue: "inviteType") + } + + public static var lastName: Self { + .init(rawValue: "lastName") + } + + public static var state: Self { + .init(rawValue: "state") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct Builds: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var app: Self { + .init(rawValue: "app") + } + + public static var appEncryptionDeclaration: Self { + .init(rawValue: "appEncryptionDeclaration") + } + + public static var appStoreVersion: Self { + .init(rawValue: "appStoreVersion") + } + + public static var betaAppReviewSubmission: Self { + .init(rawValue: "betaAppReviewSubmission") + } + + public static var betaBuildLocalizations: Self { + .init(rawValue: "betaBuildLocalizations") + } + + public static var betaGroups: Self { + .init(rawValue: "betaGroups") + } + + public static var buildAudienceType: Self { + .init(rawValue: "buildAudienceType") + } + + public static var buildBetaDetail: Self { + .init(rawValue: "buildBetaDetail") + } + + public static var buildBundles: Self { + .init(rawValue: "buildBundles") + } + + public static var computedMinMacOsVersion: Self { + .init(rawValue: "computedMinMacOsVersion") + } + + public static var computedMinVisionOsVersion: Self { + .init(rawValue: "computedMinVisionOsVersion") + } + + public static var diagnosticSignatures: Self { + .init(rawValue: "diagnosticSignatures") + } + + public static var expirationDate: Self { + .init(rawValue: "expirationDate") + } + + public static var expired: Self { + .init(rawValue: "expired") + } + + public static var iconAssetToken: Self { + .init(rawValue: "iconAssetToken") + } + + public static var icons: Self { + .init(rawValue: "icons") + } + + public static var individualTesters: Self { + .init(rawValue: "individualTesters") + } + + public static var lsMinimumSystemVersion: Self { + .init(rawValue: "lsMinimumSystemVersion") + } + + public static var minOsVersion: Self { + .init(rawValue: "minOsVersion") + } + + public static var perfPowerMetrics: Self { + .init(rawValue: "perfPowerMetrics") + } + + public static var preReleaseVersion: Self { + .init(rawValue: "preReleaseVersion") + } + + public static var processingState: Self { + .init(rawValue: "processingState") + } + + public static var uploadedDate: Self { + .init(rawValue: "uploadedDate") + } + + public static var usesNonExemptEncryption: Self { + .init(rawValue: "usesNonExemptEncryption") + } + + public static var version: Self { + .init(rawValue: "version") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct Relation: Hashable { + /// the fields to include for returned resources of type betaFeedbackCrashSubmissions + public static var betaFeedbackCrashSubmissions: Relation<[BetaFeedbackCrashSubmissions]?> { + .init(key: "fields[betaFeedbackCrashSubmissions]") + } + + /// the fields to include for returned resources of type betaTesters + public static var betaTesters: Relation<[BetaTesters]?> { + .init(key: "fields[betaTesters]") + } + + /// the fields to include for returned resources of type builds + public static var builds: Relation<[Builds]?> { + .init(key: "fields[builds]") + } + + internal let key: String + + public func hash(into hasher: inout Hasher) { + hasher.combine(key) + } + } + } + + public struct Filter: Hashable { + public subscript (_ relation: Relation) -> T { + get { values[relation]?.base as! T } + set { values[relation] = AnyHashable(newValue) } + } + + private var values: [AnyHashable: AnyHashable] = [:] + + public struct AppPlatform: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var iOS: Self { + .init(rawValue: "IOS") + } + + public static var macOS: Self { + .init(rawValue: "MAC_OS") + } + + public static var tvOS: Self { + .init(rawValue: "TV_OS") + } + + public static var visionOS: Self { + .init(rawValue: "VISION_OS") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct DevicePlatform: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var iOS: Self { + .init(rawValue: "IOS") + } + + public static var macOS: Self { + .init(rawValue: "MAC_OS") + } + + public static var tvOS: Self { + .init(rawValue: "TV_OS") + } + + public static var visionOS: Self { + .init(rawValue: "VISION_OS") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct Relation: Hashable { + /// filter by attribute 'appPlatform' + public static var appPlatform: Relation<[AppPlatform]?> { + .init(key: "filter[appPlatform]") + } + + /// filter by id(s) of related 'build.preReleaseVersion' + public static var buildPreReleaseVersion: Relation<[String]?> { + .init(key: "filter[build.preReleaseVersion]") + } + + /// filter by id(s) of related 'build' + public static var build: Relation<[String]?> { + .init(key: "filter[build]") + } + + /// filter by attribute 'deviceModel' + public static var deviceModel: Relation<[String]?> { + .init(key: "filter[deviceModel]") + } + + /// filter by attribute 'devicePlatform' + public static var devicePlatform: Relation<[DevicePlatform]?> { + .init(key: "filter[devicePlatform]") + } + + /// filter by attribute 'osVersion' + public static var osVersion: Relation<[String]?> { + .init(key: "filter[osVersion]") + } + + /// filter by id(s) of related 'tester' + public static var tester: Relation<[String]?> { + .init(key: "filter[tester]") + } + + internal let key: String + + public func hash(into hasher: inout Hasher) { + hasher.combine(key) + } + } + } + + public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var build: Self { + .init(rawValue: "build") + } + + public static var tester: Self { + .init(rawValue: "tester") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct Sort: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var createdDate: Self { + .init(rawValue: "createdDate") + } + + public static var createdDateDesc: Self { + .init(rawValue: "-createdDate") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/BetaFeedbackScreenshotSubmissions/AppsByIdBetaFeedbackScreenshotSubmissions.GET.aa35b42.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/BetaFeedbackScreenshotSubmissions/AppsByIdBetaFeedbackScreenshotSubmissions.GET.aa35b42.generated.swift new file mode 100644 index 00000000..4dbd4543 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/BetaFeedbackScreenshotSubmissions/AppsByIdBetaFeedbackScreenshotSubmissions.GET.aa35b42.generated.swift @@ -0,0 +1,562 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.Apps.ById.BetaFeedbackScreenshotSubmissions { + public struct GET: Endpoint { + public typealias Response = BetaFeedbackScreenshotSubmissionsResponse + + public var path: String { + "/v1/apps/\(id)/betaFeedbackScreenshotSubmissions" + } + + /// the id of the requested resource + public var id: String + + public var parameters: Parameters = Parameters() + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + components?.queryItems = [ + URLQueryItem(name: "fields[betaFeedbackScreenshotSubmissions]", + value: parameters.fields[.betaFeedbackScreenshotSubmissions]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "fields[betaTesters]", + value: parameters.fields[.betaTesters]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "fields[builds]", + value: parameters.fields[.builds]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "filter[appPlatform]", + value: parameters.filter[.appPlatform]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "filter[build.preReleaseVersion]", + value: parameters.filter[.buildPreReleaseVersion]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "filter[build]", + value: parameters.filter[.build]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "filter[deviceModel]", + value: parameters.filter[.deviceModel]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "filter[devicePlatform]", + value: parameters.filter[.devicePlatform]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "filter[osVersion]", + value: parameters.filter[.osVersion]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "filter[tester]", + value: parameters.filter[.tester]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "include", + value: parameters.include?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "limit", + value: parameters.limit.map { "\($0)" }), + URLQueryItem(name: "sort", + value: parameters.sort?.map { "\($0)" }.joined(separator: ",")) + ].filter { $0.value != nil } + if components?.queryItems?.isEmpty ?? false { + components?.queryItems = nil + } + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "GET" + return urlRequest + } + + /// - Returns: **200**, List of BetaFeedbackScreenshotSubmissions as `BetaFeedbackScreenshotSubmissionsResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(BetaFeedbackScreenshotSubmissionsResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +extension V1.Apps.ById.BetaFeedbackScreenshotSubmissions.GET { + public struct Parameters: Hashable { + public var fields: Fields = Fields() + + public var filter: Filter = Filter() + + /// comma-separated list of relationships to include + public var include: [Include]? + + /// maximum resources per page + public var limit: Int? + + /// comma-separated list of sort expressions; resources will be sorted as specified + public var sort: [Sort]? + + public struct Fields: Hashable { + public subscript (_ relation: Relation) -> T { + get { values[relation]?.base as! T } + set { values[relation] = AnyHashable(newValue) } + } + + private var values: [AnyHashable: AnyHashable] = [:] + + public struct BetaFeedbackScreenshotSubmissions: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var appPlatform: Self { + .init(rawValue: "appPlatform") + } + + public static var appUptimeInMilliseconds: Self { + .init(rawValue: "appUptimeInMilliseconds") + } + + public static var architecture: Self { + .init(rawValue: "architecture") + } + + public static var batteryPercentage: Self { + .init(rawValue: "batteryPercentage") + } + + public static var build: Self { + .init(rawValue: "build") + } + + public static var buildBundleId: Self { + .init(rawValue: "buildBundleId") + } + + public static var comment: Self { + .init(rawValue: "comment") + } + + public static var connectionType: Self { + .init(rawValue: "connectionType") + } + + public static var createdDate: Self { + .init(rawValue: "createdDate") + } + + public static var deviceFamily: Self { + .init(rawValue: "deviceFamily") + } + + public static var deviceModel: Self { + .init(rawValue: "deviceModel") + } + + public static var devicePlatform: Self { + .init(rawValue: "devicePlatform") + } + + public static var diskBytesAvailable: Self { + .init(rawValue: "diskBytesAvailable") + } + + public static var diskBytesTotal: Self { + .init(rawValue: "diskBytesTotal") + } + + public static var email: Self { + .init(rawValue: "email") + } + + public static var locale: Self { + .init(rawValue: "locale") + } + + public static var osVersion: Self { + .init(rawValue: "osVersion") + } + + public static var pairedAppleWatch: Self { + .init(rawValue: "pairedAppleWatch") + } + + public static var screenHeightInPoints: Self { + .init(rawValue: "screenHeightInPoints") + } + + public static var screenWidthInPoints: Self { + .init(rawValue: "screenWidthInPoints") + } + + public static var screenshots: Self { + .init(rawValue: "screenshots") + } + + public static var tester: Self { + .init(rawValue: "tester") + } + + public static var timeZone: Self { + .init(rawValue: "timeZone") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct BetaTesters: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var apps: Self { + .init(rawValue: "apps") + } + + public static var betaGroups: Self { + .init(rawValue: "betaGroups") + } + + public static var builds: Self { + .init(rawValue: "builds") + } + + public static var email: Self { + .init(rawValue: "email") + } + + public static var firstName: Self { + .init(rawValue: "firstName") + } + + public static var inviteType: Self { + .init(rawValue: "inviteType") + } + + public static var lastName: Self { + .init(rawValue: "lastName") + } + + public static var state: Self { + .init(rawValue: "state") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct Builds: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var app: Self { + .init(rawValue: "app") + } + + public static var appEncryptionDeclaration: Self { + .init(rawValue: "appEncryptionDeclaration") + } + + public static var appStoreVersion: Self { + .init(rawValue: "appStoreVersion") + } + + public static var betaAppReviewSubmission: Self { + .init(rawValue: "betaAppReviewSubmission") + } + + public static var betaBuildLocalizations: Self { + .init(rawValue: "betaBuildLocalizations") + } + + public static var betaGroups: Self { + .init(rawValue: "betaGroups") + } + + public static var buildAudienceType: Self { + .init(rawValue: "buildAudienceType") + } + + public static var buildBetaDetail: Self { + .init(rawValue: "buildBetaDetail") + } + + public static var buildBundles: Self { + .init(rawValue: "buildBundles") + } + + public static var computedMinMacOsVersion: Self { + .init(rawValue: "computedMinMacOsVersion") + } + + public static var computedMinVisionOsVersion: Self { + .init(rawValue: "computedMinVisionOsVersion") + } + + public static var diagnosticSignatures: Self { + .init(rawValue: "diagnosticSignatures") + } + + public static var expirationDate: Self { + .init(rawValue: "expirationDate") + } + + public static var expired: Self { + .init(rawValue: "expired") + } + + public static var iconAssetToken: Self { + .init(rawValue: "iconAssetToken") + } + + public static var icons: Self { + .init(rawValue: "icons") + } + + public static var individualTesters: Self { + .init(rawValue: "individualTesters") + } + + public static var lsMinimumSystemVersion: Self { + .init(rawValue: "lsMinimumSystemVersion") + } + + public static var minOsVersion: Self { + .init(rawValue: "minOsVersion") + } + + public static var perfPowerMetrics: Self { + .init(rawValue: "perfPowerMetrics") + } + + public static var preReleaseVersion: Self { + .init(rawValue: "preReleaseVersion") + } + + public static var processingState: Self { + .init(rawValue: "processingState") + } + + public static var uploadedDate: Self { + .init(rawValue: "uploadedDate") + } + + public static var usesNonExemptEncryption: Self { + .init(rawValue: "usesNonExemptEncryption") + } + + public static var version: Self { + .init(rawValue: "version") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct Relation: Hashable { + /// the fields to include for returned resources of type betaFeedbackScreenshotSubmissions + public static var betaFeedbackScreenshotSubmissions: Relation<[BetaFeedbackScreenshotSubmissions]?> { + .init(key: "fields[betaFeedbackScreenshotSubmissions]") + } + + /// the fields to include for returned resources of type betaTesters + public static var betaTesters: Relation<[BetaTesters]?> { + .init(key: "fields[betaTesters]") + } + + /// the fields to include for returned resources of type builds + public static var builds: Relation<[Builds]?> { + .init(key: "fields[builds]") + } + + internal let key: String + + public func hash(into hasher: inout Hasher) { + hasher.combine(key) + } + } + } + + public struct Filter: Hashable { + public subscript (_ relation: Relation) -> T { + get { values[relation]?.base as! T } + set { values[relation] = AnyHashable(newValue) } + } + + private var values: [AnyHashable: AnyHashable] = [:] + + public struct AppPlatform: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var iOS: Self { + .init(rawValue: "IOS") + } + + public static var macOS: Self { + .init(rawValue: "MAC_OS") + } + + public static var tvOS: Self { + .init(rawValue: "TV_OS") + } + + public static var visionOS: Self { + .init(rawValue: "VISION_OS") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct DevicePlatform: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var iOS: Self { + .init(rawValue: "IOS") + } + + public static var macOS: Self { + .init(rawValue: "MAC_OS") + } + + public static var tvOS: Self { + .init(rawValue: "TV_OS") + } + + public static var visionOS: Self { + .init(rawValue: "VISION_OS") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct Relation: Hashable { + /// filter by attribute 'appPlatform' + public static var appPlatform: Relation<[AppPlatform]?> { + .init(key: "filter[appPlatform]") + } + + /// filter by id(s) of related 'build.preReleaseVersion' + public static var buildPreReleaseVersion: Relation<[String]?> { + .init(key: "filter[build.preReleaseVersion]") + } + + /// filter by id(s) of related 'build' + public static var build: Relation<[String]?> { + .init(key: "filter[build]") + } + + /// filter by attribute 'deviceModel' + public static var deviceModel: Relation<[String]?> { + .init(key: "filter[deviceModel]") + } + + /// filter by attribute 'devicePlatform' + public static var devicePlatform: Relation<[DevicePlatform]?> { + .init(key: "filter[devicePlatform]") + } + + /// filter by attribute 'osVersion' + public static var osVersion: Relation<[String]?> { + .init(key: "filter[osVersion]") + } + + /// filter by id(s) of related 'tester' + public static var tester: Relation<[String]?> { + .init(key: "filter[tester]") + } + + internal let key: String + + public func hash(into hasher: inout Hasher) { + hasher.combine(key) + } + } + } + + public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var build: Self { + .init(rawValue: "build") + } + + public static var tester: Self { + .init(rawValue: "tester") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct Sort: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var createdDate: Self { + .init(rawValue: "createdDate") + } + + public static var createdDateDesc: Self { + .init(rawValue: "-createdDate") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/BetaGroups/AppsByIdBetaGroups.GET.14638c3.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/BetaGroups/AppsByIdBetaGroups.GET.14638c3.generated.swift index 68a0e469..cdb91106 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/BetaGroups/AppsByIdBetaGroups.GET.14638c3.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/BetaGroups/AppsByIdBetaGroups.GET.14638c3.generated.swift @@ -44,8 +44,10 @@ extension V1.Apps.ById.BetaGroups { /// - Returns: **200**, List of BetaGroups with get as `BetaGroupsWithoutIncludesResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -59,12 +61,18 @@ extension V1.Apps.ById.BetaGroups { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 404: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -87,61 +95,83 @@ extension V1.Apps.ById.BetaGroups.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum BetaGroups: Hashable, Codable, RawRepresentable { - case app - case betaTesters - case builds - case createdDate - case feedbackEnabled - case hasAccessToAllBuilds - case iosBuildsAvailableForAppleSiliconMac - case isInternalGroup - case name - case publicLink - case publicLinkEnabled - case publicLinkId - case publicLinkLimit - case publicLinkLimitEnabled - case unknown(String) - - public var rawValue: String { - switch self { - case .app: return "app" - case .betaTesters: return "betaTesters" - case .builds: return "builds" - case .createdDate: return "createdDate" - case .feedbackEnabled: return "feedbackEnabled" - case .hasAccessToAllBuilds: return "hasAccessToAllBuilds" - case .iosBuildsAvailableForAppleSiliconMac: return "iosBuildsAvailableForAppleSiliconMac" - case .isInternalGroup: return "isInternalGroup" - case .name: return "name" - case .publicLink: return "publicLink" - case .publicLinkEnabled: return "publicLinkEnabled" - case .publicLinkId: return "publicLinkId" - case .publicLinkLimit: return "publicLinkLimit" - case .publicLinkLimitEnabled: return "publicLinkLimitEnabled" - case .unknown(let rawValue): return rawValue - } + public struct BetaGroups: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var app: Self { + .init(rawValue: "app") + } + + public static var betaRecruitmentCriteria: Self { + .init(rawValue: "betaRecruitmentCriteria") + } + + public static var betaRecruitmentCriterionCompatibleBuildCheck: Self { + .init(rawValue: "betaRecruitmentCriterionCompatibleBuildCheck") + } + + public static var betaTesters: Self { + .init(rawValue: "betaTesters") + } + + public static var builds: Self { + .init(rawValue: "builds") + } + + public static var createdDate: Self { + .init(rawValue: "createdDate") + } + + public static var feedbackEnabled: Self { + .init(rawValue: "feedbackEnabled") + } + + public static var hasAccessToAllBuilds: Self { + .init(rawValue: "hasAccessToAllBuilds") + } + + public static var iosBuildsAvailableForAppleSiliconMac: Self { + .init(rawValue: "iosBuildsAvailableForAppleSiliconMac") } + public static var iosBuildsAvailableForAppleVision: Self { + .init(rawValue: "iosBuildsAvailableForAppleVision") + } + + public static var isInternalGroup: Self { + .init(rawValue: "isInternalGroup") + } + + public static var name: Self { + .init(rawValue: "name") + } + + public static var publicLink: Self { + .init(rawValue: "publicLink") + } + + public static var publicLinkEnabled: Self { + .init(rawValue: "publicLinkEnabled") + } + + public static var publicLinkId: Self { + .init(rawValue: "publicLinkId") + } + + public static var publicLinkLimit: Self { + .init(rawValue: "publicLinkLimit") + } + + public static var publicLinkLimitEnabled: Self { + .init(rawValue: "publicLinkLimitEnabled") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "app": self = .app - case "betaTesters": self = .betaTesters - case "builds": self = .builds - case "createdDate": self = .createdDate - case "feedbackEnabled": self = .feedbackEnabled - case "hasAccessToAllBuilds": self = .hasAccessToAllBuilds - case "iosBuildsAvailableForAppleSiliconMac": self = .iosBuildsAvailableForAppleSiliconMac - case "isInternalGroup": self = .isInternalGroup - case "name": self = .name - case "publicLink": self = .publicLink - case "publicLinkEnabled": self = .publicLinkEnabled - case "publicLinkId": self = .publicLinkId - case "publicLinkLimit": self = .publicLinkLimit - case "publicLinkLimitEnabled": self = .publicLinkLimitEnabled - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/BetaLicenseAgreement/AppsByIdBetaLicenseAgreement.GET.e36781c.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/BetaLicenseAgreement/AppsByIdBetaLicenseAgreement.GET.e36781c.generated.swift index 405ff2bf..f43d4d22 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/BetaLicenseAgreement/AppsByIdBetaLicenseAgreement.GET.e36781c.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/BetaLicenseAgreement/AppsByIdBetaLicenseAgreement.GET.e36781c.generated.swift @@ -42,8 +42,10 @@ extension V1.Apps.ById.BetaLicenseAgreement { /// - Returns: **200**, Single BetaLicenseAgreement with get as `BetaLicenseAgreementWithoutIncludesResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -57,12 +59,18 @@ extension V1.Apps.ById.BetaLicenseAgreement { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 404: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -82,25 +90,23 @@ extension V1.Apps.ById.BetaLicenseAgreement.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum BetaLicenseAgreements: Hashable, Codable, RawRepresentable { - case agreementText - case app - case unknown(String) - - public var rawValue: String { - switch self { - case .agreementText: return "agreementText" - case .app: return "app" - case .unknown(let rawValue): return rawValue - } + public struct BetaLicenseAgreements: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var agreementText: Self { + .init(rawValue: "agreementText") } + public static var app: Self { + .init(rawValue: "app") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "agreementText": self = .agreementText - case "app": self = .app - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/Builds/AppsByIdBuilds.GET.8af2daf.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/Builds/AppsByIdBuilds.GET.8af2daf.generated.swift index 2f4e955a..a60cd9c5 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/Builds/AppsByIdBuilds.GET.8af2daf.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/Builds/AppsByIdBuilds.GET.8af2daf.generated.swift @@ -44,8 +44,10 @@ extension V1.Apps.ById.Builds { /// - Returns: **200**, List of Builds with get as `BuildsWithoutIncludesResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -59,12 +61,18 @@ extension V1.Apps.ById.Builds { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 404: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -87,91 +95,115 @@ extension V1.Apps.ById.Builds.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum Builds: Hashable, Codable, RawRepresentable { - case app - case appEncryptionDeclaration - case appStoreVersion - case betaAppReviewSubmission - case betaBuildLocalizations - case betaGroups - case buildAudienceType - case buildBetaDetail - case buildBundles - case computedMinMacOsVersion - case diagnosticSignatures - case expirationDate - case expired - case iconAssetToken - case icons - case individualTesters - case lsMinimumSystemVersion - case minOsVersion - case perfPowerMetrics - case preReleaseVersion - case processingState - case uploadedDate - case usesNonExemptEncryption - case version - case unknown(String) - - public var rawValue: String { - switch self { - case .app: return "app" - case .appEncryptionDeclaration: return "appEncryptionDeclaration" - case .appStoreVersion: return "appStoreVersion" - case .betaAppReviewSubmission: return "betaAppReviewSubmission" - case .betaBuildLocalizations: return "betaBuildLocalizations" - case .betaGroups: return "betaGroups" - case .buildAudienceType: return "buildAudienceType" - case .buildBetaDetail: return "buildBetaDetail" - case .buildBundles: return "buildBundles" - case .computedMinMacOsVersion: return "computedMinMacOsVersion" - case .diagnosticSignatures: return "diagnosticSignatures" - case .expirationDate: return "expirationDate" - case .expired: return "expired" - case .iconAssetToken: return "iconAssetToken" - case .icons: return "icons" - case .individualTesters: return "individualTesters" - case .lsMinimumSystemVersion: return "lsMinimumSystemVersion" - case .minOsVersion: return "minOsVersion" - case .perfPowerMetrics: return "perfPowerMetrics" - case .preReleaseVersion: return "preReleaseVersion" - case .processingState: return "processingState" - case .uploadedDate: return "uploadedDate" - case .usesNonExemptEncryption: return "usesNonExemptEncryption" - case .version: return "version" - case .unknown(let rawValue): return rawValue - } + public struct Builds: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var app: Self { + .init(rawValue: "app") + } + + public static var appEncryptionDeclaration: Self { + .init(rawValue: "appEncryptionDeclaration") + } + + public static var appStoreVersion: Self { + .init(rawValue: "appStoreVersion") + } + + public static var betaAppReviewSubmission: Self { + .init(rawValue: "betaAppReviewSubmission") + } + + public static var betaBuildLocalizations: Self { + .init(rawValue: "betaBuildLocalizations") + } + + public static var betaGroups: Self { + .init(rawValue: "betaGroups") + } + + public static var buildAudienceType: Self { + .init(rawValue: "buildAudienceType") + } + + public static var buildBetaDetail: Self { + .init(rawValue: "buildBetaDetail") + } + + public static var buildBundles: Self { + .init(rawValue: "buildBundles") + } + + public static var computedMinMacOsVersion: Self { + .init(rawValue: "computedMinMacOsVersion") + } + + public static var computedMinVisionOsVersion: Self { + .init(rawValue: "computedMinVisionOsVersion") + } + + public static var diagnosticSignatures: Self { + .init(rawValue: "diagnosticSignatures") + } + + public static var expirationDate: Self { + .init(rawValue: "expirationDate") } + public static var expired: Self { + .init(rawValue: "expired") + } + + public static var iconAssetToken: Self { + .init(rawValue: "iconAssetToken") + } + + public static var icons: Self { + .init(rawValue: "icons") + } + + public static var individualTesters: Self { + .init(rawValue: "individualTesters") + } + + public static var lsMinimumSystemVersion: Self { + .init(rawValue: "lsMinimumSystemVersion") + } + + public static var minOsVersion: Self { + .init(rawValue: "minOsVersion") + } + + public static var perfPowerMetrics: Self { + .init(rawValue: "perfPowerMetrics") + } + + public static var preReleaseVersion: Self { + .init(rawValue: "preReleaseVersion") + } + + public static var processingState: Self { + .init(rawValue: "processingState") + } + + public static var uploadedDate: Self { + .init(rawValue: "uploadedDate") + } + + public static var usesNonExemptEncryption: Self { + .init(rawValue: "usesNonExemptEncryption") + } + + public static var version: Self { + .init(rawValue: "version") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "app": self = .app - case "appEncryptionDeclaration": self = .appEncryptionDeclaration - case "appStoreVersion": self = .appStoreVersion - case "betaAppReviewSubmission": self = .betaAppReviewSubmission - case "betaBuildLocalizations": self = .betaBuildLocalizations - case "betaGroups": self = .betaGroups - case "buildAudienceType": self = .buildAudienceType - case "buildBetaDetail": self = .buildBetaDetail - case "buildBundles": self = .buildBundles - case "computedMinMacOsVersion": self = .computedMinMacOsVersion - case "diagnosticSignatures": self = .diagnosticSignatures - case "expirationDate": self = .expirationDate - case "expired": self = .expired - case "iconAssetToken": self = .iconAssetToken - case "icons": self = .icons - case "individualTesters": self = .individualTesters - case "lsMinimumSystemVersion": self = .lsMinimumSystemVersion - case "minOsVersion": self = .minOsVersion - case "perfPowerMetrics": self = .perfPowerMetrics - case "preReleaseVersion": self = .preReleaseVersion - case "processingState": self = .processingState - case "uploadedDate": self = .uploadedDate - case "usesNonExemptEncryption": self = .usesNonExemptEncryption - case "version": self = .version - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/CiProduct/AppsByIdCiProduct.GET.53dedfe.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/CiProduct/AppsByIdCiProduct.GET.53dedfe.generated.swift index 791c3b63..d61200f6 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/CiProduct/AppsByIdCiProduct.GET.53dedfe.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/CiProduct/AppsByIdCiProduct.GET.53dedfe.generated.swift @@ -52,8 +52,10 @@ extension V1.Apps.ById.CiProduct { /// - Returns: **200**, Single CiProduct as `CiProductResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -67,12 +69,18 @@ extension V1.Apps.ById.CiProduct { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 404: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -97,274 +105,351 @@ extension V1.Apps.ById.CiProduct.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum Apps: Hashable, Codable, RawRepresentable { - case appAvailability - case appClips - case appCustomProductPages - case appEncryptionDeclarations - case appEvents - case appInfos - case appPricePoints - case appPriceSchedule - case appStoreVersionExperimentsV2 - case appStoreVersions - case availableInNewTerritories - case availableTerritories - case betaAppLocalizations - case betaAppReviewDetail - case betaGroups - case betaLicenseAgreement - case betaTesters - case builds - case bundleId - case ciProduct - case contentRightsDeclaration - case customerReviews - case endUserLicenseAgreement - case gameCenterDetail - case gameCenterEnabledVersions - case inAppPurchases - case inAppPurchasesV2 - case isOrEverWasMadeForKids - case name - case perfPowerMetrics - case preOrder - case preReleaseVersions - case pricePoints - case prices - case primaryLocale - case promotedPurchases - case reviewSubmissions - case sku - case subscriptionGracePeriod - case subscriptionGroups - case subscriptionStatusUrl - case subscriptionStatusUrlForSandbox - case subscriptionStatusUrlVersion - case subscriptionStatusUrlVersionForSandbox - case unknown(String) - - public var rawValue: String { - switch self { - case .appAvailability: return "appAvailability" - case .appClips: return "appClips" - case .appCustomProductPages: return "appCustomProductPages" - case .appEncryptionDeclarations: return "appEncryptionDeclarations" - case .appEvents: return "appEvents" - case .appInfos: return "appInfos" - case .appPricePoints: return "appPricePoints" - case .appPriceSchedule: return "appPriceSchedule" - case .appStoreVersionExperimentsV2: return "appStoreVersionExperimentsV2" - case .appStoreVersions: return "appStoreVersions" - case .availableInNewTerritories: return "availableInNewTerritories" - case .availableTerritories: return "availableTerritories" - case .betaAppLocalizations: return "betaAppLocalizations" - case .betaAppReviewDetail: return "betaAppReviewDetail" - case .betaGroups: return "betaGroups" - case .betaLicenseAgreement: return "betaLicenseAgreement" - case .betaTesters: return "betaTesters" - case .builds: return "builds" - case .bundleId: return "bundleId" - case .ciProduct: return "ciProduct" - case .contentRightsDeclaration: return "contentRightsDeclaration" - case .customerReviews: return "customerReviews" - case .endUserLicenseAgreement: return "endUserLicenseAgreement" - case .gameCenterDetail: return "gameCenterDetail" - case .gameCenterEnabledVersions: return "gameCenterEnabledVersions" - case .inAppPurchases: return "inAppPurchases" - case .inAppPurchasesV2: return "inAppPurchasesV2" - case .isOrEverWasMadeForKids: return "isOrEverWasMadeForKids" - case .name: return "name" - case .perfPowerMetrics: return "perfPowerMetrics" - case .preOrder: return "preOrder" - case .preReleaseVersions: return "preReleaseVersions" - case .pricePoints: return "pricePoints" - case .prices: return "prices" - case .primaryLocale: return "primaryLocale" - case .promotedPurchases: return "promotedPurchases" - case .reviewSubmissions: return "reviewSubmissions" - case .sku: return "sku" - case .subscriptionGracePeriod: return "subscriptionGracePeriod" - case .subscriptionGroups: return "subscriptionGroups" - case .subscriptionStatusUrl: return "subscriptionStatusUrl" - case .subscriptionStatusUrlForSandbox: return "subscriptionStatusUrlForSandbox" - case .subscriptionStatusUrlVersion: return "subscriptionStatusUrlVersion" - case .subscriptionStatusUrlVersionForSandbox: return "subscriptionStatusUrlVersionForSandbox" - case .unknown(let rawValue): return rawValue - } + public struct Apps: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var accessibilityDeclarations: Self { + .init(rawValue: "accessibilityDeclarations") + } + + public static var accessibilityUrl: Self { + .init(rawValue: "accessibilityUrl") + } + + public static var alternativeDistributionKey: Self { + .init(rawValue: "alternativeDistributionKey") + } + + public static var analyticsReportRequests: Self { + .init(rawValue: "analyticsReportRequests") + } + + public static var appAvailabilityV2: Self { + .init(rawValue: "appAvailabilityV2") + } + + public static var appClips: Self { + .init(rawValue: "appClips") + } + + public static var appCustomProductPages: Self { + .init(rawValue: "appCustomProductPages") + } + + public static var appEncryptionDeclarations: Self { + .init(rawValue: "appEncryptionDeclarations") + } + + public static var appEvents: Self { + .init(rawValue: "appEvents") + } + + public static var appInfos: Self { + .init(rawValue: "appInfos") + } + + public static var appPricePoints: Self { + .init(rawValue: "appPricePoints") + } + + public static var appPriceSchedule: Self { + .init(rawValue: "appPriceSchedule") + } + + public static var appStoreVersionExperimentsV2: Self { + .init(rawValue: "appStoreVersionExperimentsV2") + } + + public static var appStoreVersions: Self { + .init(rawValue: "appStoreVersions") + } + + public static var backgroundAssets: Self { + .init(rawValue: "backgroundAssets") + } + + public static var betaAppLocalizations: Self { + .init(rawValue: "betaAppLocalizations") + } + + public static var betaAppReviewDetail: Self { + .init(rawValue: "betaAppReviewDetail") + } + + public static var betaFeedbackCrashSubmissions: Self { + .init(rawValue: "betaFeedbackCrashSubmissions") + } + + public static var betaFeedbackScreenshotSubmissions: Self { + .init(rawValue: "betaFeedbackScreenshotSubmissions") + } + + public static var betaGroups: Self { + .init(rawValue: "betaGroups") + } + + public static var betaLicenseAgreement: Self { + .init(rawValue: "betaLicenseAgreement") + } + + public static var betaTesters: Self { + .init(rawValue: "betaTesters") + } + + public static var builds: Self { + .init(rawValue: "builds") + } + + public static var bundleId: Self { + .init(rawValue: "bundleId") + } + + public static var ciProduct: Self { + .init(rawValue: "ciProduct") + } + + public static var contentRightsDeclaration: Self { + .init(rawValue: "contentRightsDeclaration") + } + + public static var customerReviewSummarizations: Self { + .init(rawValue: "customerReviewSummarizations") + } + + public static var customerReviews: Self { + .init(rawValue: "customerReviews") + } + + public static var endUserLicenseAgreement: Self { + .init(rawValue: "endUserLicenseAgreement") + } + + public static var gameCenterDetail: Self { + .init(rawValue: "gameCenterDetail") + } + + public static var gameCenterEnabledVersions: Self { + .init(rawValue: "gameCenterEnabledVersions") + } + + public static var inAppPurchases: Self { + .init(rawValue: "inAppPurchases") + } + + public static var inAppPurchasesV2: Self { + .init(rawValue: "inAppPurchasesV2") + } + + public static var isOrEverWasMadeForKids: Self { + .init(rawValue: "isOrEverWasMadeForKids") + } + + public static var marketplaceSearchDetail: Self { + .init(rawValue: "marketplaceSearchDetail") + } + + public static var name: Self { + .init(rawValue: "name") + } + + public static var perfPowerMetrics: Self { + .init(rawValue: "perfPowerMetrics") + } + + public static var preReleaseVersions: Self { + .init(rawValue: "preReleaseVersions") + } + + public static var primaryLocale: Self { + .init(rawValue: "primaryLocale") + } + + public static var promotedPurchases: Self { + .init(rawValue: "promotedPurchases") + } + + public static var reviewSubmissions: Self { + .init(rawValue: "reviewSubmissions") + } + + public static var sku: Self { + .init(rawValue: "sku") + } + + public static var streamlinedPurchasingEnabled: Self { + .init(rawValue: "streamlinedPurchasingEnabled") + } + + public static var subscriptionGracePeriod: Self { + .init(rawValue: "subscriptionGracePeriod") + } + + public static var subscriptionGroups: Self { + .init(rawValue: "subscriptionGroups") + } + + public static var subscriptionStatusUrl: Self { + .init(rawValue: "subscriptionStatusUrl") + } + + public static var subscriptionStatusUrlForSandbox: Self { + .init(rawValue: "subscriptionStatusUrlForSandbox") + } + + public static var subscriptionStatusUrlVersion: Self { + .init(rawValue: "subscriptionStatusUrlVersion") + } + + public static var subscriptionStatusUrlVersionForSandbox: Self { + .init(rawValue: "subscriptionStatusUrlVersionForSandbox") + } + + public static var webhooks: Self { + .init(rawValue: "webhooks") + } + + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "appAvailability": self = .appAvailability - case "appClips": self = .appClips - case "appCustomProductPages": self = .appCustomProductPages - case "appEncryptionDeclarations": self = .appEncryptionDeclarations - case "appEvents": self = .appEvents - case "appInfos": self = .appInfos - case "appPricePoints": self = .appPricePoints - case "appPriceSchedule": self = .appPriceSchedule - case "appStoreVersionExperimentsV2": self = .appStoreVersionExperimentsV2 - case "appStoreVersions": self = .appStoreVersions - case "availableInNewTerritories": self = .availableInNewTerritories - case "availableTerritories": self = .availableTerritories - case "betaAppLocalizations": self = .betaAppLocalizations - case "betaAppReviewDetail": self = .betaAppReviewDetail - case "betaGroups": self = .betaGroups - case "betaLicenseAgreement": self = .betaLicenseAgreement - case "betaTesters": self = .betaTesters - case "builds": self = .builds - case "bundleId": self = .bundleId - case "ciProduct": self = .ciProduct - case "contentRightsDeclaration": self = .contentRightsDeclaration - case "customerReviews": self = .customerReviews - case "endUserLicenseAgreement": self = .endUserLicenseAgreement - case "gameCenterDetail": self = .gameCenterDetail - case "gameCenterEnabledVersions": self = .gameCenterEnabledVersions - case "inAppPurchases": self = .inAppPurchases - case "inAppPurchasesV2": self = .inAppPurchasesV2 - case "isOrEverWasMadeForKids": self = .isOrEverWasMadeForKids - case "name": self = .name - case "perfPowerMetrics": self = .perfPowerMetrics - case "preOrder": self = .preOrder - case "preReleaseVersions": self = .preReleaseVersions - case "pricePoints": self = .pricePoints - case "prices": self = .prices - case "primaryLocale": self = .primaryLocale - case "promotedPurchases": self = .promotedPurchases - case "reviewSubmissions": self = .reviewSubmissions - case "sku": self = .sku - case "subscriptionGracePeriod": self = .subscriptionGracePeriod - case "subscriptionGroups": self = .subscriptionGroups - case "subscriptionStatusUrl": self = .subscriptionStatusUrl - case "subscriptionStatusUrlForSandbox": self = .subscriptionStatusUrlForSandbox - case "subscriptionStatusUrlVersion": self = .subscriptionStatusUrlVersion - case "subscriptionStatusUrlVersionForSandbox": self = .subscriptionStatusUrlVersionForSandbox - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum BundleIds: Hashable, Codable, RawRepresentable { - case app - case bundleIdCapabilities - case identifier - case name - case platform - case profiles - case seedId - case unknown(String) - - public var rawValue: String { - switch self { - case .app: return "app" - case .bundleIdCapabilities: return "bundleIdCapabilities" - case .identifier: return "identifier" - case .name: return "name" - case .platform: return "platform" - case .profiles: return "profiles" - case .seedId: return "seedId" - case .unknown(let rawValue): return rawValue - } + public struct BundleIds: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var app: Self { + .init(rawValue: "app") + } + + public static var bundleIdCapabilities: Self { + .init(rawValue: "bundleIdCapabilities") + } + + public static var identifier: Self { + .init(rawValue: "identifier") + } + + public static var name: Self { + .init(rawValue: "name") + } + + public static var platform: Self { + .init(rawValue: "platform") + } + + public static var profiles: Self { + .init(rawValue: "profiles") } + public static var seedId: Self { + .init(rawValue: "seedId") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "app": self = .app - case "bundleIdCapabilities": self = .bundleIdCapabilities - case "identifier": self = .identifier - case "name": self = .name - case "platform": self = .platform - case "profiles": self = .profiles - case "seedId": self = .seedId - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum CiProducts: Hashable, Codable, RawRepresentable { - case additionalRepositories - case app - case buildRuns - case bundleId - case createdDate - case name - case primaryRepositories - case productType - case workflows - case unknown(String) - - public var rawValue: String { - switch self { - case .additionalRepositories: return "additionalRepositories" - case .app: return "app" - case .buildRuns: return "buildRuns" - case .bundleId: return "bundleId" - case .createdDate: return "createdDate" - case .name: return "name" - case .primaryRepositories: return "primaryRepositories" - case .productType: return "productType" - case .workflows: return "workflows" - case .unknown(let rawValue): return rawValue - } + public struct CiProducts: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var additionalRepositories: Self { + .init(rawValue: "additionalRepositories") } + public static var app: Self { + .init(rawValue: "app") + } + + public static var buildRuns: Self { + .init(rawValue: "buildRuns") + } + + public static var bundleId: Self { + .init(rawValue: "bundleId") + } + + public static var createdDate: Self { + .init(rawValue: "createdDate") + } + + public static var name: Self { + .init(rawValue: "name") + } + + public static var primaryRepositories: Self { + .init(rawValue: "primaryRepositories") + } + + public static var productType: Self { + .init(rawValue: "productType") + } + + public static var workflows: Self { + .init(rawValue: "workflows") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "additionalRepositories": self = .additionalRepositories - case "app": self = .app - case "buildRuns": self = .buildRuns - case "bundleId": self = .bundleId - case "createdDate": self = .createdDate - case "name": self = .name - case "primaryRepositories": self = .primaryRepositories - case "productType": self = .productType - case "workflows": self = .workflows - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum ScmRepositories: Hashable, Codable, RawRepresentable { - case defaultBranch - case gitReferences - case httpCloneUrl - case lastAccessedDate - case ownerName - case pullRequests - case repositoryName - case scmProvider - case sshCloneUrl - case unknown(String) - - public var rawValue: String { - switch self { - case .defaultBranch: return "defaultBranch" - case .gitReferences: return "gitReferences" - case .httpCloneUrl: return "httpCloneUrl" - case .lastAccessedDate: return "lastAccessedDate" - case .ownerName: return "ownerName" - case .pullRequests: return "pullRequests" - case .repositoryName: return "repositoryName" - case .scmProvider: return "scmProvider" - case .sshCloneUrl: return "sshCloneUrl" - case .unknown(let rawValue): return rawValue - } + public struct ScmRepositories: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var defaultBranch: Self { + .init(rawValue: "defaultBranch") + } + + public static var gitReferences: Self { + .init(rawValue: "gitReferences") } + public static var httpCloneUrl: Self { + .init(rawValue: "httpCloneUrl") + } + + public static var lastAccessedDate: Self { + .init(rawValue: "lastAccessedDate") + } + + public static var ownerName: Self { + .init(rawValue: "ownerName") + } + + public static var pullRequests: Self { + .init(rawValue: "pullRequests") + } + + public static var repositoryName: Self { + .init(rawValue: "repositoryName") + } + + public static var scmProvider: Self { + .init(rawValue: "scmProvider") + } + + public static var sshCloneUrl: Self { + .init(rawValue: "sshCloneUrl") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "defaultBranch": self = .defaultBranch - case "gitReferences": self = .gitReferences - case "httpCloneUrl": self = .httpCloneUrl - case "lastAccessedDate": self = .lastAccessedDate - case "ownerName": self = .ownerName - case "pullRequests": self = .pullRequests - case "repositoryName": self = .repositoryName - case "scmProvider": self = .scmProvider - case "sshCloneUrl": self = .sshCloneUrl - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } @@ -397,28 +482,27 @@ extension V1.Apps.ById.CiProduct.GET { } } - public enum Include: Hashable, Codable, RawRepresentable { - case app - case bundleId - case primaryRepositories - case unknown(String) + public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var app: Self { + .init(rawValue: "app") + } - public var rawValue: String { - switch self { - case .app: return "app" - case .bundleId: return "bundleId" - case .primaryRepositories: return "primaryRepositories" - case .unknown(let rawValue): return rawValue - } + public static var bundleId: Self { + .init(rawValue: "bundleId") + } + + public static var primaryRepositories: Self { + .init(rawValue: "primaryRepositories") + } + + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "app": self = .app - case "bundleId": self = .bundleId - case "primaryRepositories": self = .primaryRepositories - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/CustomerReviewSummarizations/AppsByIdCustomerReviewSummarizations.GET.cb8c5d4.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/CustomerReviewSummarizations/AppsByIdCustomerReviewSummarizations.GET.cb8c5d4.generated.swift new file mode 100644 index 00000000..1360793c --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/CustomerReviewSummarizations/AppsByIdCustomerReviewSummarizations.GET.cb8c5d4.generated.swift @@ -0,0 +1,251 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.Apps.ById.CustomerReviewSummarizations { + public struct GET: Endpoint { + public typealias Response = CustomerReviewSummarizationsResponse + + public var path: String { + "/v1/apps/\(id)/customerReviewSummarizations" + } + + /// the id of the requested resource + public var id: String + + public var parameters: Parameters = Parameters() + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + components?.queryItems = [ + URLQueryItem(name: "fields[customerReviewSummarizations]", + value: parameters.fields[.customerReviewSummarizations]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "fields[territories]", + value: parameters.fields[.territories]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "filter[platform]", + value: parameters.filter[.platform]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "filter[territory]", + value: parameters.filter[.territory]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "include", + value: parameters.include?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "limit", + value: parameters.limit.map { "\($0)" }) + ].filter { $0.value != nil } + if components?.queryItems?.isEmpty ?? false { + components?.queryItems = nil + } + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "GET" + return urlRequest + } + + /// - Returns: **200**, List of CustomerReviewSummarizations as `CustomerReviewSummarizationsResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(CustomerReviewSummarizationsResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +extension V1.Apps.ById.CustomerReviewSummarizations.GET { + public struct Parameters: Hashable { + public var fields: Fields = Fields() + + public var filter: Filter = Filter() + + /// comma-separated list of relationships to include + public var include: [Include]? + + /// maximum resources per page + public var limit: Int? + + public struct Fields: Hashable { + public subscript (_ relation: Relation) -> T { + get { values[relation]?.base as! T } + set { values[relation] = AnyHashable(newValue) } + } + + private var values: [AnyHashable: AnyHashable] = [:] + + public struct CustomerReviewSummarizations: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var createdDate: Self { + .init(rawValue: "createdDate") + } + + public static var locale: Self { + .init(rawValue: "locale") + } + + public static var platform: Self { + .init(rawValue: "platform") + } + + public static var territory: Self { + .init(rawValue: "territory") + } + + public static var text: Self { + .init(rawValue: "text") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct Territories: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var currency: Self { + .init(rawValue: "currency") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct Relation: Hashable { + /// the fields to include for returned resources of type customerReviewSummarizations + public static var customerReviewSummarizations: Relation<[CustomerReviewSummarizations]?> { + .init(key: "fields[customerReviewSummarizations]") + } + + /// the fields to include for returned resources of type territories + public static var territories: Relation<[Territories]?> { + .init(key: "fields[territories]") + } + + internal let key: String + + public func hash(into hasher: inout Hasher) { + hasher.combine(key) + } + } + } + + public struct Filter: Hashable { + public subscript (_ relation: Relation) -> T { + get { values[relation]?.base as! T } + set { values[relation] = AnyHashable(newValue) } + } + + private var values: [AnyHashable: AnyHashable] = [:] + + public struct Platform: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var iOS: Self { + .init(rawValue: "IOS") + } + + public static var macOS: Self { + .init(rawValue: "MAC_OS") + } + + public static var tvOS: Self { + .init(rawValue: "TV_OS") + } + + public static var visionOS: Self { + .init(rawValue: "VISION_OS") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct Relation: Hashable { + /// filter by attribute 'platform' **(required)** + public static var platform: Relation<[Platform]?> { + .init(key: "filter[platform]") + } + + /// filter by id(s) of related 'territory' + public static var territory: Relation<[String]?> { + .init(key: "filter[territory]") + } + + internal let key: String + + public func hash(into hasher: inout Hasher) { + hasher.combine(key) + } + } + } + + public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var territory: Self { + .init(rawValue: "territory") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/CustomerReviews/AppsByIdCustomerReviews.GET.b2cd7c0.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/CustomerReviews/AppsByIdCustomerReviews.GET.b2cd7c0.generated.swift index 61d71195..fc95ce2a 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/CustomerReviews/AppsByIdCustomerReviews.GET.b2cd7c0.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/CustomerReviews/AppsByIdCustomerReviews.GET.b2cd7c0.generated.swift @@ -56,8 +56,10 @@ extension V1.Apps.ById.CustomerReviews { /// - Returns: **200**, List of CustomerReviews as `CustomerReviewsResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -71,12 +73,18 @@ extension V1.Apps.ById.CustomerReviews { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 404: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -131,68 +139,71 @@ extension V1.Apps.ById.CustomerReviews.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum CustomerReviewResponses: Hashable, Codable, RawRepresentable { - case lastModifiedDate - case responseBody - case review - case state - case unknown(String) + public struct CustomerReviewResponses: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var lastModifiedDate: Self { + .init(rawValue: "lastModifiedDate") + } + + public static var responseBody: Self { + .init(rawValue: "responseBody") + } + + public static var review: Self { + .init(rawValue: "review") + } + + public static var state: Self { + .init(rawValue: "state") + } - public var rawValue: String { - switch self { - case .lastModifiedDate: return "lastModifiedDate" - case .responseBody: return "responseBody" - case .review: return "review" - case .state: return "state" - case .unknown(let rawValue): return rawValue - } + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "lastModifiedDate": self = .lastModifiedDate - case "responseBody": self = .responseBody - case "review": self = .review - case "state": self = .state - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum CustomerReviews: Hashable, Codable, RawRepresentable { - case body - case createdDate - case rating - case response - case reviewerNickname - case territory - case title - case unknown(String) - - public var rawValue: String { - switch self { - case .body: return "body" - case .createdDate: return "createdDate" - case .rating: return "rating" - case .response: return "response" - case .reviewerNickname: return "reviewerNickname" - case .territory: return "territory" - case .title: return "title" - case .unknown(let rawValue): return rawValue - } + public struct CustomerReviews: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var body: Self { + .init(rawValue: "body") + } + + public static var createdDate: Self { + .init(rawValue: "createdDate") + } + + public static var rating: Self { + .init(rawValue: "rating") } + public static var response: Self { + .init(rawValue: "response") + } + + public static var reviewerNickname: Self { + .init(rawValue: "reviewerNickname") + } + + public static var territory: Self { + .init(rawValue: "territory") + } + + public static var title: Self { + .init(rawValue: "title") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "body": self = .body - case "createdDate": self = .createdDate - case "rating": self = .rating - case "response": self = .response - case "reviewerNickname": self = .reviewerNickname - case "territory": self = .territory - case "title": self = .title - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } @@ -223,715 +234,943 @@ extension V1.Apps.ById.CustomerReviews.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum Territory: Hashable, Codable, RawRepresentable { - case abw - case afg - case ago - case aia - case alb - case and - case ant - case are - case arg - case arm - case asm - case atg - case aus - case aut - case aze - case bdi - case bel - case ben - case bes - case bfa - case bgd - case bgr - case bhr - case bhs - case bih - case blr - case blz - case bmu - case bol - case bra - case brb - case brn - case btn - case bwa - case caf - case can - case che - case chl - case chn - case civ - case cmr - case cod - case cog - case cok - case col - case com - case cpv - case cri - case cub - case cuw - case cxr - case cym - case cyp - case cze - case deu - case dji - case dma - case dnk - case dom - case dza - case ecu - case egy - case eri - case esp - case est - case eth - case fin - case fji - case flk - case fra - case fro - case fsm - case gab - case gbr - case geo - case ggy - case gha - case gib - case gin - case glp - case gmb - case gnb - case gnq - case grc - case grd - case grl - case gtm - case guf - case gum - case guy - case hkg - case hnd - case hrv - case hti - case hun - case idn - case imn - case ind - case irl - case irq - case isl - case isr - case ita - case jam - case jey - case jor - case jpn - case kaz - case ken - case kgz - case khm - case kir - case kna - case kor - case kwt - case lao - case lbn - case lbr - case lby - case lca - case lie - case lka - case lso - case ltu - case lux - case lva - case mac - case mar - case mco - case mda - case mdg - case mdv - case mex - case mhl - case mkd - case mli - case mlt - case mmr - case mne - case mng - case mnp - case moz - case mrt - case msr - case mtq - case mus - case mwi - case mys - case myt - case nam - case ncl - case ner - case nfk - case nga - case nic - case niu - case nld - case nor - case npl - case nru - case nzl - case omn - case pak - case pan - case per - case phl - case plw - case png - case pol - case pri - case prt - case pry - case pse - case pyf - case qat - case reu - case rou - case rus - case rwa - case sau - case sen - case sgp - case shn - case slb - case sle - case slv - case smr - case som - case spm - case srb - case ssd - case stp - case sur - case svk - case svn - case swe - case swz - case sxm - case syc - case tca - case tcd - case tgo - case tha - case tjk - case tkm - case tls - case ton - case tto - case tun - case tur - case tuv - case twn - case tza - case uga - case ukr - case umi - case ury - case usa - case uzb - case vat - case vct - case ven - case vgb - case vir - case vnm - case vut - case wlf - case wsm - case yem - case zaf - case zmb - case zwe - case unknown(String) - - public var rawValue: String { - switch self { - case .abw: return "ABW" - case .afg: return "AFG" - case .ago: return "AGO" - case .aia: return "AIA" - case .alb: return "ALB" - case .and: return "AND" - case .ant: return "ANT" - case .are: return "ARE" - case .arg: return "ARG" - case .arm: return "ARM" - case .asm: return "ASM" - case .atg: return "ATG" - case .aus: return "AUS" - case .aut: return "AUT" - case .aze: return "AZE" - case .bdi: return "BDI" - case .bel: return "BEL" - case .ben: return "BEN" - case .bes: return "BES" - case .bfa: return "BFA" - case .bgd: return "BGD" - case .bgr: return "BGR" - case .bhr: return "BHR" - case .bhs: return "BHS" - case .bih: return "BIH" - case .blr: return "BLR" - case .blz: return "BLZ" - case .bmu: return "BMU" - case .bol: return "BOL" - case .bra: return "BRA" - case .brb: return "BRB" - case .brn: return "BRN" - case .btn: return "BTN" - case .bwa: return "BWA" - case .caf: return "CAF" - case .can: return "CAN" - case .che: return "CHE" - case .chl: return "CHL" - case .chn: return "CHN" - case .civ: return "CIV" - case .cmr: return "CMR" - case .cod: return "COD" - case .cog: return "COG" - case .cok: return "COK" - case .col: return "COL" - case .com: return "COM" - case .cpv: return "CPV" - case .cri: return "CRI" - case .cub: return "CUB" - case .cuw: return "CUW" - case .cxr: return "CXR" - case .cym: return "CYM" - case .cyp: return "CYP" - case .cze: return "CZE" - case .deu: return "DEU" - case .dji: return "DJI" - case .dma: return "DMA" - case .dnk: return "DNK" - case .dom: return "DOM" - case .dza: return "DZA" - case .ecu: return "ECU" - case .egy: return "EGY" - case .eri: return "ERI" - case .esp: return "ESP" - case .est: return "EST" - case .eth: return "ETH" - case .fin: return "FIN" - case .fji: return "FJI" - case .flk: return "FLK" - case .fra: return "FRA" - case .fro: return "FRO" - case .fsm: return "FSM" - case .gab: return "GAB" - case .gbr: return "GBR" - case .geo: return "GEO" - case .ggy: return "GGY" - case .gha: return "GHA" - case .gib: return "GIB" - case .gin: return "GIN" - case .glp: return "GLP" - case .gmb: return "GMB" - case .gnb: return "GNB" - case .gnq: return "GNQ" - case .grc: return "GRC" - case .grd: return "GRD" - case .grl: return "GRL" - case .gtm: return "GTM" - case .guf: return "GUF" - case .gum: return "GUM" - case .guy: return "GUY" - case .hkg: return "HKG" - case .hnd: return "HND" - case .hrv: return "HRV" - case .hti: return "HTI" - case .hun: return "HUN" - case .idn: return "IDN" - case .imn: return "IMN" - case .ind: return "IND" - case .irl: return "IRL" - case .irq: return "IRQ" - case .isl: return "ISL" - case .isr: return "ISR" - case .ita: return "ITA" - case .jam: return "JAM" - case .jey: return "JEY" - case .jor: return "JOR" - case .jpn: return "JPN" - case .kaz: return "KAZ" - case .ken: return "KEN" - case .kgz: return "KGZ" - case .khm: return "KHM" - case .kir: return "KIR" - case .kna: return "KNA" - case .kor: return "KOR" - case .kwt: return "KWT" - case .lao: return "LAO" - case .lbn: return "LBN" - case .lbr: return "LBR" - case .lby: return "LBY" - case .lca: return "LCA" - case .lie: return "LIE" - case .lka: return "LKA" - case .lso: return "LSO" - case .ltu: return "LTU" - case .lux: return "LUX" - case .lva: return "LVA" - case .mac: return "MAC" - case .mar: return "MAR" - case .mco: return "MCO" - case .mda: return "MDA" - case .mdg: return "MDG" - case .mdv: return "MDV" - case .mex: return "MEX" - case .mhl: return "MHL" - case .mkd: return "MKD" - case .mli: return "MLI" - case .mlt: return "MLT" - case .mmr: return "MMR" - case .mne: return "MNE" - case .mng: return "MNG" - case .mnp: return "MNP" - case .moz: return "MOZ" - case .mrt: return "MRT" - case .msr: return "MSR" - case .mtq: return "MTQ" - case .mus: return "MUS" - case .mwi: return "MWI" - case .mys: return "MYS" - case .myt: return "MYT" - case .nam: return "NAM" - case .ncl: return "NCL" - case .ner: return "NER" - case .nfk: return "NFK" - case .nga: return "NGA" - case .nic: return "NIC" - case .niu: return "NIU" - case .nld: return "NLD" - case .nor: return "NOR" - case .npl: return "NPL" - case .nru: return "NRU" - case .nzl: return "NZL" - case .omn: return "OMN" - case .pak: return "PAK" - case .pan: return "PAN" - case .per: return "PER" - case .phl: return "PHL" - case .plw: return "PLW" - case .png: return "PNG" - case .pol: return "POL" - case .pri: return "PRI" - case .prt: return "PRT" - case .pry: return "PRY" - case .pse: return "PSE" - case .pyf: return "PYF" - case .qat: return "QAT" - case .reu: return "REU" - case .rou: return "ROU" - case .rus: return "RUS" - case .rwa: return "RWA" - case .sau: return "SAU" - case .sen: return "SEN" - case .sgp: return "SGP" - case .shn: return "SHN" - case .slb: return "SLB" - case .sle: return "SLE" - case .slv: return "SLV" - case .smr: return "SMR" - case .som: return "SOM" - case .spm: return "SPM" - case .srb: return "SRB" - case .ssd: return "SSD" - case .stp: return "STP" - case .sur: return "SUR" - case .svk: return "SVK" - case .svn: return "SVN" - case .swe: return "SWE" - case .swz: return "SWZ" - case .sxm: return "SXM" - case .syc: return "SYC" - case .tca: return "TCA" - case .tcd: return "TCD" - case .tgo: return "TGO" - case .tha: return "THA" - case .tjk: return "TJK" - case .tkm: return "TKM" - case .tls: return "TLS" - case .ton: return "TON" - case .tto: return "TTO" - case .tun: return "TUN" - case .tur: return "TUR" - case .tuv: return "TUV" - case .twn: return "TWN" - case .tza: return "TZA" - case .uga: return "UGA" - case .ukr: return "UKR" - case .umi: return "UMI" - case .ury: return "URY" - case .usa: return "USA" - case .uzb: return "UZB" - case .vat: return "VAT" - case .vct: return "VCT" - case .ven: return "VEN" - case .vgb: return "VGB" - case .vir: return "VIR" - case .vnm: return "VNM" - case .vut: return "VUT" - case .wlf: return "WLF" - case .wsm: return "WSM" - case .yem: return "YEM" - case .zaf: return "ZAF" - case .zmb: return "ZMB" - case .zwe: return "ZWE" - case .unknown(let rawValue): return rawValue - } + public struct Territory: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var abw: Self { + .init(rawValue: "ABW") + } + + public static var afg: Self { + .init(rawValue: "AFG") + } + + public static var ago: Self { + .init(rawValue: "AGO") + } + + public static var aia: Self { + .init(rawValue: "AIA") + } + + public static var alb: Self { + .init(rawValue: "ALB") + } + + public static var and: Self { + .init(rawValue: "AND") + } + + public static var ant: Self { + .init(rawValue: "ANT") + } + + public static var are: Self { + .init(rawValue: "ARE") + } + + public static var arg: Self { + .init(rawValue: "ARG") + } + + public static var arm: Self { + .init(rawValue: "ARM") + } + + public static var asm: Self { + .init(rawValue: "ASM") + } + + public static var atg: Self { + .init(rawValue: "ATG") + } + + public static var aus: Self { + .init(rawValue: "AUS") + } + + public static var aut: Self { + .init(rawValue: "AUT") + } + + public static var aze: Self { + .init(rawValue: "AZE") + } + + public static var bdi: Self { + .init(rawValue: "BDI") + } + + public static var bel: Self { + .init(rawValue: "BEL") + } + + public static var ben: Self { + .init(rawValue: "BEN") + } + + public static var bes: Self { + .init(rawValue: "BES") + } + + public static var bfa: Self { + .init(rawValue: "BFA") + } + + public static var bgd: Self { + .init(rawValue: "BGD") + } + + public static var bgr: Self { + .init(rawValue: "BGR") + } + + public static var bhr: Self { + .init(rawValue: "BHR") + } + + public static var bhs: Self { + .init(rawValue: "BHS") + } + + public static var bih: Self { + .init(rawValue: "BIH") + } + + public static var blr: Self { + .init(rawValue: "BLR") + } + + public static var blz: Self { + .init(rawValue: "BLZ") + } + + public static var bmu: Self { + .init(rawValue: "BMU") + } + + public static var bol: Self { + .init(rawValue: "BOL") + } + + public static var bra: Self { + .init(rawValue: "BRA") + } + + public static var brb: Self { + .init(rawValue: "BRB") + } + + public static var brn: Self { + .init(rawValue: "BRN") + } + + public static var btn: Self { + .init(rawValue: "BTN") + } + + public static var bwa: Self { + .init(rawValue: "BWA") + } + + public static var caf: Self { + .init(rawValue: "CAF") + } + + public static var can: Self { + .init(rawValue: "CAN") + } + + public static var che: Self { + .init(rawValue: "CHE") + } + + public static var chl: Self { + .init(rawValue: "CHL") + } + + public static var chn: Self { + .init(rawValue: "CHN") + } + + public static var civ: Self { + .init(rawValue: "CIV") + } + + public static var cmr: Self { + .init(rawValue: "CMR") + } + + public static var cod: Self { + .init(rawValue: "COD") + } + + public static var cog: Self { + .init(rawValue: "COG") + } + + public static var cok: Self { + .init(rawValue: "COK") + } + + public static var col: Self { + .init(rawValue: "COL") + } + + public static var com: Self { + .init(rawValue: "COM") + } + + public static var cpv: Self { + .init(rawValue: "CPV") + } + + public static var cri: Self { + .init(rawValue: "CRI") + } + + public static var cub: Self { + .init(rawValue: "CUB") + } + + public static var cuw: Self { + .init(rawValue: "CUW") + } + + public static var cxr: Self { + .init(rawValue: "CXR") } + public static var cym: Self { + .init(rawValue: "CYM") + } + + public static var cyp: Self { + .init(rawValue: "CYP") + } + + public static var cze: Self { + .init(rawValue: "CZE") + } + + public static var deu: Self { + .init(rawValue: "DEU") + } + + public static var dji: Self { + .init(rawValue: "DJI") + } + + public static var dma: Self { + .init(rawValue: "DMA") + } + + public static var dnk: Self { + .init(rawValue: "DNK") + } + + public static var dom: Self { + .init(rawValue: "DOM") + } + + public static var dza: Self { + .init(rawValue: "DZA") + } + + public static var ecu: Self { + .init(rawValue: "ECU") + } + + public static var egy: Self { + .init(rawValue: "EGY") + } + + public static var eri: Self { + .init(rawValue: "ERI") + } + + public static var esp: Self { + .init(rawValue: "ESP") + } + + public static var est: Self { + .init(rawValue: "EST") + } + + public static var eth: Self { + .init(rawValue: "ETH") + } + + public static var fin: Self { + .init(rawValue: "FIN") + } + + public static var fji: Self { + .init(rawValue: "FJI") + } + + public static var flk: Self { + .init(rawValue: "FLK") + } + + public static var fra: Self { + .init(rawValue: "FRA") + } + + public static var fro: Self { + .init(rawValue: "FRO") + } + + public static var fsm: Self { + .init(rawValue: "FSM") + } + + public static var gab: Self { + .init(rawValue: "GAB") + } + + public static var gbr: Self { + .init(rawValue: "GBR") + } + + public static var geo: Self { + .init(rawValue: "GEO") + } + + public static var ggy: Self { + .init(rawValue: "GGY") + } + + public static var gha: Self { + .init(rawValue: "GHA") + } + + public static var gib: Self { + .init(rawValue: "GIB") + } + + public static var gin: Self { + .init(rawValue: "GIN") + } + + public static var glp: Self { + .init(rawValue: "GLP") + } + + public static var gmb: Self { + .init(rawValue: "GMB") + } + + public static var gnb: Self { + .init(rawValue: "GNB") + } + + public static var gnq: Self { + .init(rawValue: "GNQ") + } + + public static var grc: Self { + .init(rawValue: "GRC") + } + + public static var grd: Self { + .init(rawValue: "GRD") + } + + public static var grl: Self { + .init(rawValue: "GRL") + } + + public static var gtm: Self { + .init(rawValue: "GTM") + } + + public static var guf: Self { + .init(rawValue: "GUF") + } + + public static var gum: Self { + .init(rawValue: "GUM") + } + + public static var guy: Self { + .init(rawValue: "GUY") + } + + public static var hkg: Self { + .init(rawValue: "HKG") + } + + public static var hnd: Self { + .init(rawValue: "HND") + } + + public static var hrv: Self { + .init(rawValue: "HRV") + } + + public static var hti: Self { + .init(rawValue: "HTI") + } + + public static var hun: Self { + .init(rawValue: "HUN") + } + + public static var idn: Self { + .init(rawValue: "IDN") + } + + public static var imn: Self { + .init(rawValue: "IMN") + } + + public static var ind: Self { + .init(rawValue: "IND") + } + + public static var irl: Self { + .init(rawValue: "IRL") + } + + public static var irq: Self { + .init(rawValue: "IRQ") + } + + public static var isl: Self { + .init(rawValue: "ISL") + } + + public static var isr: Self { + .init(rawValue: "ISR") + } + + public static var ita: Self { + .init(rawValue: "ITA") + } + + public static var jam: Self { + .init(rawValue: "JAM") + } + + public static var jey: Self { + .init(rawValue: "JEY") + } + + public static var jor: Self { + .init(rawValue: "JOR") + } + + public static var jpn: Self { + .init(rawValue: "JPN") + } + + public static var kaz: Self { + .init(rawValue: "KAZ") + } + + public static var ken: Self { + .init(rawValue: "KEN") + } + + public static var kgz: Self { + .init(rawValue: "KGZ") + } + + public static var khm: Self { + .init(rawValue: "KHM") + } + + public static var kir: Self { + .init(rawValue: "KIR") + } + + public static var kna: Self { + .init(rawValue: "KNA") + } + + public static var kor: Self { + .init(rawValue: "KOR") + } + + public static var kwt: Self { + .init(rawValue: "KWT") + } + + public static var lao: Self { + .init(rawValue: "LAO") + } + + public static var lbn: Self { + .init(rawValue: "LBN") + } + + public static var lbr: Self { + .init(rawValue: "LBR") + } + + public static var lby: Self { + .init(rawValue: "LBY") + } + + public static var lca: Self { + .init(rawValue: "LCA") + } + + public static var lie: Self { + .init(rawValue: "LIE") + } + + public static var lka: Self { + .init(rawValue: "LKA") + } + + public static var lso: Self { + .init(rawValue: "LSO") + } + + public static var ltu: Self { + .init(rawValue: "LTU") + } + + public static var lux: Self { + .init(rawValue: "LUX") + } + + public static var lva: Self { + .init(rawValue: "LVA") + } + + public static var mac: Self { + .init(rawValue: "MAC") + } + + public static var mar: Self { + .init(rawValue: "MAR") + } + + public static var mco: Self { + .init(rawValue: "MCO") + } + + public static var mda: Self { + .init(rawValue: "MDA") + } + + public static var mdg: Self { + .init(rawValue: "MDG") + } + + public static var mdv: Self { + .init(rawValue: "MDV") + } + + public static var mex: Self { + .init(rawValue: "MEX") + } + + public static var mhl: Self { + .init(rawValue: "MHL") + } + + public static var mkd: Self { + .init(rawValue: "MKD") + } + + public static var mli: Self { + .init(rawValue: "MLI") + } + + public static var mlt: Self { + .init(rawValue: "MLT") + } + + public static var mmr: Self { + .init(rawValue: "MMR") + } + + public static var mne: Self { + .init(rawValue: "MNE") + } + + public static var mng: Self { + .init(rawValue: "MNG") + } + + public static var mnp: Self { + .init(rawValue: "MNP") + } + + public static var moz: Self { + .init(rawValue: "MOZ") + } + + public static var mrt: Self { + .init(rawValue: "MRT") + } + + public static var msr: Self { + .init(rawValue: "MSR") + } + + public static var mtq: Self { + .init(rawValue: "MTQ") + } + + public static var mus: Self { + .init(rawValue: "MUS") + } + + public static var mwi: Self { + .init(rawValue: "MWI") + } + + public static var mys: Self { + .init(rawValue: "MYS") + } + + public static var myt: Self { + .init(rawValue: "MYT") + } + + public static var nam: Self { + .init(rawValue: "NAM") + } + + public static var ncl: Self { + .init(rawValue: "NCL") + } + + public static var ner: Self { + .init(rawValue: "NER") + } + + public static var nfk: Self { + .init(rawValue: "NFK") + } + + public static var nga: Self { + .init(rawValue: "NGA") + } + + public static var nic: Self { + .init(rawValue: "NIC") + } + + public static var niu: Self { + .init(rawValue: "NIU") + } + + public static var nld: Self { + .init(rawValue: "NLD") + } + + public static var nor: Self { + .init(rawValue: "NOR") + } + + public static var npl: Self { + .init(rawValue: "NPL") + } + + public static var nru: Self { + .init(rawValue: "NRU") + } + + public static var nzl: Self { + .init(rawValue: "NZL") + } + + public static var omn: Self { + .init(rawValue: "OMN") + } + + public static var pak: Self { + .init(rawValue: "PAK") + } + + public static var pan: Self { + .init(rawValue: "PAN") + } + + public static var per: Self { + .init(rawValue: "PER") + } + + public static var phl: Self { + .init(rawValue: "PHL") + } + + public static var plw: Self { + .init(rawValue: "PLW") + } + + public static var png: Self { + .init(rawValue: "PNG") + } + + public static var pol: Self { + .init(rawValue: "POL") + } + + public static var pri: Self { + .init(rawValue: "PRI") + } + + public static var prt: Self { + .init(rawValue: "PRT") + } + + public static var pry: Self { + .init(rawValue: "PRY") + } + + public static var pse: Self { + .init(rawValue: "PSE") + } + + public static var pyf: Self { + .init(rawValue: "PYF") + } + + public static var qat: Self { + .init(rawValue: "QAT") + } + + public static var reu: Self { + .init(rawValue: "REU") + } + + public static var rou: Self { + .init(rawValue: "ROU") + } + + public static var rus: Self { + .init(rawValue: "RUS") + } + + public static var rwa: Self { + .init(rawValue: "RWA") + } + + public static var sau: Self { + .init(rawValue: "SAU") + } + + public static var sen: Self { + .init(rawValue: "SEN") + } + + public static var sgp: Self { + .init(rawValue: "SGP") + } + + public static var shn: Self { + .init(rawValue: "SHN") + } + + public static var slb: Self { + .init(rawValue: "SLB") + } + + public static var sle: Self { + .init(rawValue: "SLE") + } + + public static var slv: Self { + .init(rawValue: "SLV") + } + + public static var smr: Self { + .init(rawValue: "SMR") + } + + public static var som: Self { + .init(rawValue: "SOM") + } + + public static var spm: Self { + .init(rawValue: "SPM") + } + + public static var srb: Self { + .init(rawValue: "SRB") + } + + public static var ssd: Self { + .init(rawValue: "SSD") + } + + public static var stp: Self { + .init(rawValue: "STP") + } + + public static var sur: Self { + .init(rawValue: "SUR") + } + + public static var svk: Self { + .init(rawValue: "SVK") + } + + public static var svn: Self { + .init(rawValue: "SVN") + } + + public static var swe: Self { + .init(rawValue: "SWE") + } + + public static var swz: Self { + .init(rawValue: "SWZ") + } + + public static var sxm: Self { + .init(rawValue: "SXM") + } + + public static var syc: Self { + .init(rawValue: "SYC") + } + + public static var tca: Self { + .init(rawValue: "TCA") + } + + public static var tcd: Self { + .init(rawValue: "TCD") + } + + public static var tgo: Self { + .init(rawValue: "TGO") + } + + public static var tha: Self { + .init(rawValue: "THA") + } + + public static var tjk: Self { + .init(rawValue: "TJK") + } + + public static var tkm: Self { + .init(rawValue: "TKM") + } + + public static var tls: Self { + .init(rawValue: "TLS") + } + + public static var ton: Self { + .init(rawValue: "TON") + } + + public static var tto: Self { + .init(rawValue: "TTO") + } + + public static var tun: Self { + .init(rawValue: "TUN") + } + + public static var tur: Self { + .init(rawValue: "TUR") + } + + public static var tuv: Self { + .init(rawValue: "TUV") + } + + public static var twn: Self { + .init(rawValue: "TWN") + } + + public static var tza: Self { + .init(rawValue: "TZA") + } + + public static var uga: Self { + .init(rawValue: "UGA") + } + + public static var ukr: Self { + .init(rawValue: "UKR") + } + + public static var umi: Self { + .init(rawValue: "UMI") + } + + public static var ury: Self { + .init(rawValue: "URY") + } + + public static var usa: Self { + .init(rawValue: "USA") + } + + public static var uzb: Self { + .init(rawValue: "UZB") + } + + public static var vat: Self { + .init(rawValue: "VAT") + } + + public static var vct: Self { + .init(rawValue: "VCT") + } + + public static var ven: Self { + .init(rawValue: "VEN") + } + + public static var vgb: Self { + .init(rawValue: "VGB") + } + + public static var vir: Self { + .init(rawValue: "VIR") + } + + public static var vnm: Self { + .init(rawValue: "VNM") + } + + public static var vut: Self { + .init(rawValue: "VUT") + } + + public static var wlf: Self { + .init(rawValue: "WLF") + } + + public static var wsm: Self { + .init(rawValue: "WSM") + } + + public static var yem: Self { + .init(rawValue: "YEM") + } + + public static var zaf: Self { + .init(rawValue: "ZAF") + } + + public static var zmb: Self { + .init(rawValue: "ZMB") + } + + public static var zwe: Self { + .init(rawValue: "ZWE") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "ABW": self = .abw - case "AFG": self = .afg - case "AGO": self = .ago - case "AIA": self = .aia - case "ALB": self = .alb - case "AND": self = .and - case "ANT": self = .ant - case "ARE": self = .are - case "ARG": self = .arg - case "ARM": self = .arm - case "ASM": self = .asm - case "ATG": self = .atg - case "AUS": self = .aus - case "AUT": self = .aut - case "AZE": self = .aze - case "BDI": self = .bdi - case "BEL": self = .bel - case "BEN": self = .ben - case "BES": self = .bes - case "BFA": self = .bfa - case "BGD": self = .bgd - case "BGR": self = .bgr - case "BHR": self = .bhr - case "BHS": self = .bhs - case "BIH": self = .bih - case "BLR": self = .blr - case "BLZ": self = .blz - case "BMU": self = .bmu - case "BOL": self = .bol - case "BRA": self = .bra - case "BRB": self = .brb - case "BRN": self = .brn - case "BTN": self = .btn - case "BWA": self = .bwa - case "CAF": self = .caf - case "CAN": self = .can - case "CHE": self = .che - case "CHL": self = .chl - case "CHN": self = .chn - case "CIV": self = .civ - case "CMR": self = .cmr - case "COD": self = .cod - case "COG": self = .cog - case "COK": self = .cok - case "COL": self = .col - case "COM": self = .com - case "CPV": self = .cpv - case "CRI": self = .cri - case "CUB": self = .cub - case "CUW": self = .cuw - case "CXR": self = .cxr - case "CYM": self = .cym - case "CYP": self = .cyp - case "CZE": self = .cze - case "DEU": self = .deu - case "DJI": self = .dji - case "DMA": self = .dma - case "DNK": self = .dnk - case "DOM": self = .dom - case "DZA": self = .dza - case "ECU": self = .ecu - case "EGY": self = .egy - case "ERI": self = .eri - case "ESP": self = .esp - case "EST": self = .est - case "ETH": self = .eth - case "FIN": self = .fin - case "FJI": self = .fji - case "FLK": self = .flk - case "FRA": self = .fra - case "FRO": self = .fro - case "FSM": self = .fsm - case "GAB": self = .gab - case "GBR": self = .gbr - case "GEO": self = .geo - case "GGY": self = .ggy - case "GHA": self = .gha - case "GIB": self = .gib - case "GIN": self = .gin - case "GLP": self = .glp - case "GMB": self = .gmb - case "GNB": self = .gnb - case "GNQ": self = .gnq - case "GRC": self = .grc - case "GRD": self = .grd - case "GRL": self = .grl - case "GTM": self = .gtm - case "GUF": self = .guf - case "GUM": self = .gum - case "GUY": self = .guy - case "HKG": self = .hkg - case "HND": self = .hnd - case "HRV": self = .hrv - case "HTI": self = .hti - case "HUN": self = .hun - case "IDN": self = .idn - case "IMN": self = .imn - case "IND": self = .ind - case "IRL": self = .irl - case "IRQ": self = .irq - case "ISL": self = .isl - case "ISR": self = .isr - case "ITA": self = .ita - case "JAM": self = .jam - case "JEY": self = .jey - case "JOR": self = .jor - case "JPN": self = .jpn - case "KAZ": self = .kaz - case "KEN": self = .ken - case "KGZ": self = .kgz - case "KHM": self = .khm - case "KIR": self = .kir - case "KNA": self = .kna - case "KOR": self = .kor - case "KWT": self = .kwt - case "LAO": self = .lao - case "LBN": self = .lbn - case "LBR": self = .lbr - case "LBY": self = .lby - case "LCA": self = .lca - case "LIE": self = .lie - case "LKA": self = .lka - case "LSO": self = .lso - case "LTU": self = .ltu - case "LUX": self = .lux - case "LVA": self = .lva - case "MAC": self = .mac - case "MAR": self = .mar - case "MCO": self = .mco - case "MDA": self = .mda - case "MDG": self = .mdg - case "MDV": self = .mdv - case "MEX": self = .mex - case "MHL": self = .mhl - case "MKD": self = .mkd - case "MLI": self = .mli - case "MLT": self = .mlt - case "MMR": self = .mmr - case "MNE": self = .mne - case "MNG": self = .mng - case "MNP": self = .mnp - case "MOZ": self = .moz - case "MRT": self = .mrt - case "MSR": self = .msr - case "MTQ": self = .mtq - case "MUS": self = .mus - case "MWI": self = .mwi - case "MYS": self = .mys - case "MYT": self = .myt - case "NAM": self = .nam - case "NCL": self = .ncl - case "NER": self = .ner - case "NFK": self = .nfk - case "NGA": self = .nga - case "NIC": self = .nic - case "NIU": self = .niu - case "NLD": self = .nld - case "NOR": self = .nor - case "NPL": self = .npl - case "NRU": self = .nru - case "NZL": self = .nzl - case "OMN": self = .omn - case "PAK": self = .pak - case "PAN": self = .pan - case "PER": self = .per - case "PHL": self = .phl - case "PLW": self = .plw - case "PNG": self = .png - case "POL": self = .pol - case "PRI": self = .pri - case "PRT": self = .prt - case "PRY": self = .pry - case "PSE": self = .pse - case "PYF": self = .pyf - case "QAT": self = .qat - case "REU": self = .reu - case "ROU": self = .rou - case "RUS": self = .rus - case "RWA": self = .rwa - case "SAU": self = .sau - case "SEN": self = .sen - case "SGP": self = .sgp - case "SHN": self = .shn - case "SLB": self = .slb - case "SLE": self = .sle - case "SLV": self = .slv - case "SMR": self = .smr - case "SOM": self = .som - case "SPM": self = .spm - case "SRB": self = .srb - case "SSD": self = .ssd - case "STP": self = .stp - case "SUR": self = .sur - case "SVK": self = .svk - case "SVN": self = .svn - case "SWE": self = .swe - case "SWZ": self = .swz - case "SXM": self = .sxm - case "SYC": self = .syc - case "TCA": self = .tca - case "TCD": self = .tcd - case "TGO": self = .tgo - case "THA": self = .tha - case "TJK": self = .tjk - case "TKM": self = .tkm - case "TLS": self = .tls - case "TON": self = .ton - case "TTO": self = .tto - case "TUN": self = .tun - case "TUR": self = .tur - case "TUV": self = .tuv - case "TWN": self = .twn - case "TZA": self = .tza - case "UGA": self = .uga - case "UKR": self = .ukr - case "UMI": self = .umi - case "URY": self = .ury - case "USA": self = .usa - case "UZB": self = .uzb - case "VAT": self = .vat - case "VCT": self = .vct - case "VEN": self = .ven - case "VGB": self = .vgb - case "VIR": self = .vir - case "VNM": self = .vnm - case "VUT": self = .vut - case "WLF": self = .wlf - case "WSM": self = .wsm - case "YEM": self = .yem - case "ZAF": self = .zaf - case "ZMB": self = .zmb - case "ZWE": self = .zwe - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } @@ -954,50 +1193,47 @@ extension V1.Apps.ById.CustomerReviews.GET { } } - public enum Include: Hashable, Codable, RawRepresentable { - case response - case unknown(String) + public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var response: Self { + .init(rawValue: "response") + } - public var rawValue: String { - switch self { - case .response: return "response" - case .unknown(let rawValue): return rawValue - } + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "response": self = .response - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum Sort: Hashable, Codable, RawRepresentable { - case createdDate - case createdDateDesc - case rating - case ratingDesc - case unknown(String) - - public var rawValue: String { - switch self { - case .createdDate: return "createdDate" - case .createdDateDesc: return "-createdDate" - case .rating: return "rating" - case .ratingDesc: return "-rating" - case .unknown(let rawValue): return rawValue - } + public struct Sort: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var createdDate: Self { + .init(rawValue: "createdDate") + } + + public static var createdDateDesc: Self { + .init(rawValue: "-createdDate") } + public static var rating: Self { + .init(rawValue: "rating") + } + + public static var ratingDesc: Self { + .init(rawValue: "-rating") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "createdDate": self = .createdDate - case "-createdDate": self = .createdDateDesc - case "rating": self = .rating - case "-rating": self = .ratingDesc - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/EndUserLicenseAgreement/AppsByIdEndUserLicenseAgreement.GET.f233e41.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/EndUserLicenseAgreement/AppsByIdEndUserLicenseAgreement.GET.f233e41.generated.swift index c42fbf59..afd9445d 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/EndUserLicenseAgreement/AppsByIdEndUserLicenseAgreement.GET.f233e41.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/EndUserLicenseAgreement/AppsByIdEndUserLicenseAgreement.GET.f233e41.generated.swift @@ -42,8 +42,10 @@ extension V1.Apps.ById.EndUserLicenseAgreement { /// - Returns: **200**, Single EndUserLicenseAgreement with get as `EndUserLicenseAgreementWithoutIncludesResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -57,12 +59,18 @@ extension V1.Apps.ById.EndUserLicenseAgreement { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 404: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -82,28 +90,27 @@ extension V1.Apps.ById.EndUserLicenseAgreement.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum EndUserLicenseAgreements: Hashable, Codable, RawRepresentable { - case agreementText - case app - case territories - case unknown(String) - - public var rawValue: String { - switch self { - case .agreementText: return "agreementText" - case .app: return "app" - case .territories: return "territories" - case .unknown(let rawValue): return rawValue - } + public struct EndUserLicenseAgreements: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var agreementText: Self { + .init(rawValue: "agreementText") + } + + public static var app: Self { + .init(rawValue: "app") } + public static var territories: Self { + .init(rawValue: "territories") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "agreementText": self = .agreementText - case "app": self = .app - case "territories": self = .territories - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/GameCenterDetail/AppsByIdGameCenterDetail.GET.ec5e6bc.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/GameCenterDetail/AppsByIdGameCenterDetail.GET.ec5e6bc.generated.swift index 678da6b6..243fdb32 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/GameCenterDetail/AppsByIdGameCenterDetail.GET.ec5e6bc.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/GameCenterDetail/AppsByIdGameCenterDetail.GET.ec5e6bc.generated.swift @@ -28,14 +28,24 @@ extension V1.Apps.ById.GameCenterDetail { components?.path = path components?.queryItems = [ + URLQueryItem(name: "fields[appStoreVersions]", + value: parameters.fields[.appStoreVersions]?.map { "\($0)" }.joined(separator: ",")), URLQueryItem(name: "fields[apps]", value: parameters.fields[.apps]?.map { "\($0)" }.joined(separator: ",")), URLQueryItem(name: "fields[gameCenterAchievementReleases]", value: parameters.fields[.gameCenterAchievementReleases]?.map { "\($0)" }.joined(separator: ",")), URLQueryItem(name: "fields[gameCenterAchievements]", value: parameters.fields[.gameCenterAchievements]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "fields[gameCenterActivities]", + value: parameters.fields[.gameCenterActivities]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "fields[gameCenterActivityVersionReleases]", + value: parameters.fields[.gameCenterActivityVersionReleases]?.map { "\($0)" }.joined(separator: ",")), URLQueryItem(name: "fields[gameCenterAppVersions]", value: parameters.fields[.gameCenterAppVersions]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "fields[gameCenterChallengeVersionReleases]", + value: parameters.fields[.gameCenterChallengeVersionReleases]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "fields[gameCenterChallenges]", + value: parameters.fields[.gameCenterChallenges]?.map { "\($0)" }.joined(separator: ",")), URLQueryItem(name: "fields[gameCenterDetails]", value: parameters.fields[.gameCenterDetails]?.map { "\($0)" }.joined(separator: ",")), URLQueryItem(name: "fields[gameCenterGroups]", @@ -52,10 +62,20 @@ extension V1.Apps.ById.GameCenterDetail { value: parameters.include?.map { "\($0)" }.joined(separator: ",")), URLQueryItem(name: "limit[achievementReleases]", value: parameters.limit[.achievementReleases].map { "\($0)" }), + URLQueryItem(name: "limit[activityReleases]", + value: parameters.limit[.activityReleases].map { "\($0)" }), + URLQueryItem(name: "limit[challengeReleases]", + value: parameters.limit[.challengeReleases].map { "\($0)" }), + URLQueryItem(name: "limit[challengesMinimumPlatformVersions]", + value: parameters.limit[.challengesMinimumPlatformVersions].map { "\($0)" }), URLQueryItem(name: "limit[gameCenterAchievements]", value: parameters.limit[.gameCenterAchievements].map { "\($0)" }), + URLQueryItem(name: "limit[gameCenterActivities]", + value: parameters.limit[.gameCenterActivities].map { "\($0)" }), URLQueryItem(name: "limit[gameCenterAppVersions]", value: parameters.limit[.gameCenterAppVersions].map { "\($0)" }), + URLQueryItem(name: "limit[gameCenterChallenges]", + value: parameters.limit[.gameCenterChallenges].map { "\($0)" }), URLQueryItem(name: "limit[gameCenterLeaderboardSets]", value: parameters.limit[.gameCenterLeaderboardSets].map { "\($0)" }), URLQueryItem(name: "limit[gameCenterLeaderboards]", @@ -76,8 +96,10 @@ extension V1.Apps.ById.GameCenterDetail { /// - Returns: **200**, Single GameCenterDetail as `GameCenterDetailResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -91,12 +113,18 @@ extension V1.Apps.ById.GameCenterDetail { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 404: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -121,497 +149,908 @@ extension V1.Apps.ById.GameCenterDetail.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum Apps: Hashable, Codable, RawRepresentable { - case appAvailability - case appClips - case appCustomProductPages - case appEncryptionDeclarations - case appEvents - case appInfos - case appPricePoints - case appPriceSchedule - case appStoreVersionExperimentsV2 - case appStoreVersions - case availableInNewTerritories - case availableTerritories - case betaAppLocalizations - case betaAppReviewDetail - case betaGroups - case betaLicenseAgreement - case betaTesters - case builds - case bundleId - case ciProduct - case contentRightsDeclaration - case customerReviews - case endUserLicenseAgreement - case gameCenterDetail - case gameCenterEnabledVersions - case inAppPurchases - case inAppPurchasesV2 - case isOrEverWasMadeForKids - case name - case perfPowerMetrics - case preOrder - case preReleaseVersions - case pricePoints - case prices - case primaryLocale - case promotedPurchases - case reviewSubmissions - case sku - case subscriptionGracePeriod - case subscriptionGroups - case subscriptionStatusUrl - case subscriptionStatusUrlForSandbox - case subscriptionStatusUrlVersion - case subscriptionStatusUrlVersionForSandbox - case unknown(String) - - public var rawValue: String { - switch self { - case .appAvailability: return "appAvailability" - case .appClips: return "appClips" - case .appCustomProductPages: return "appCustomProductPages" - case .appEncryptionDeclarations: return "appEncryptionDeclarations" - case .appEvents: return "appEvents" - case .appInfos: return "appInfos" - case .appPricePoints: return "appPricePoints" - case .appPriceSchedule: return "appPriceSchedule" - case .appStoreVersionExperimentsV2: return "appStoreVersionExperimentsV2" - case .appStoreVersions: return "appStoreVersions" - case .availableInNewTerritories: return "availableInNewTerritories" - case .availableTerritories: return "availableTerritories" - case .betaAppLocalizations: return "betaAppLocalizations" - case .betaAppReviewDetail: return "betaAppReviewDetail" - case .betaGroups: return "betaGroups" - case .betaLicenseAgreement: return "betaLicenseAgreement" - case .betaTesters: return "betaTesters" - case .builds: return "builds" - case .bundleId: return "bundleId" - case .ciProduct: return "ciProduct" - case .contentRightsDeclaration: return "contentRightsDeclaration" - case .customerReviews: return "customerReviews" - case .endUserLicenseAgreement: return "endUserLicenseAgreement" - case .gameCenterDetail: return "gameCenterDetail" - case .gameCenterEnabledVersions: return "gameCenterEnabledVersions" - case .inAppPurchases: return "inAppPurchases" - case .inAppPurchasesV2: return "inAppPurchasesV2" - case .isOrEverWasMadeForKids: return "isOrEverWasMadeForKids" - case .name: return "name" - case .perfPowerMetrics: return "perfPowerMetrics" - case .preOrder: return "preOrder" - case .preReleaseVersions: return "preReleaseVersions" - case .pricePoints: return "pricePoints" - case .prices: return "prices" - case .primaryLocale: return "primaryLocale" - case .promotedPurchases: return "promotedPurchases" - case .reviewSubmissions: return "reviewSubmissions" - case .sku: return "sku" - case .subscriptionGracePeriod: return "subscriptionGracePeriod" - case .subscriptionGroups: return "subscriptionGroups" - case .subscriptionStatusUrl: return "subscriptionStatusUrl" - case .subscriptionStatusUrlForSandbox: return "subscriptionStatusUrlForSandbox" - case .subscriptionStatusUrlVersion: return "subscriptionStatusUrlVersion" - case .subscriptionStatusUrlVersionForSandbox: return "subscriptionStatusUrlVersionForSandbox" - case .unknown(let rawValue): return rawValue - } + public struct AppStoreVersions: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var ageRatingDeclaration: Self { + .init(rawValue: "ageRatingDeclaration") + } + + public static var alternativeDistributionPackage: Self { + .init(rawValue: "alternativeDistributionPackage") + } + + public static var app: Self { + .init(rawValue: "app") + } + + public static var appClipDefaultExperience: Self { + .init(rawValue: "appClipDefaultExperience") + } + + public static var appStoreReviewDetail: Self { + .init(rawValue: "appStoreReviewDetail") + } + + public static var appStoreState: Self { + .init(rawValue: "appStoreState") + } + + public static var appStoreVersionExperiments: Self { + .init(rawValue: "appStoreVersionExperiments") } + public static var appStoreVersionExperimentsV2: Self { + .init(rawValue: "appStoreVersionExperimentsV2") + } + + public static var appStoreVersionLocalizations: Self { + .init(rawValue: "appStoreVersionLocalizations") + } + + public static var appStoreVersionPhasedRelease: Self { + .init(rawValue: "appStoreVersionPhasedRelease") + } + + public static var appStoreVersionSubmission: Self { + .init(rawValue: "appStoreVersionSubmission") + } + + public static var appVersionState: Self { + .init(rawValue: "appVersionState") + } + + public static var build: Self { + .init(rawValue: "build") + } + + public static var copyright: Self { + .init(rawValue: "copyright") + } + + public static var createdDate: Self { + .init(rawValue: "createdDate") + } + + public static var customerReviews: Self { + .init(rawValue: "customerReviews") + } + + public static var downloadable: Self { + .init(rawValue: "downloadable") + } + + public static var earliestReleaseDate: Self { + .init(rawValue: "earliestReleaseDate") + } + + public static var gameCenterAppVersion: Self { + .init(rawValue: "gameCenterAppVersion") + } + + public static var platform: Self { + .init(rawValue: "platform") + } + + public static var releaseType: Self { + .init(rawValue: "releaseType") + } + + public static var reviewType: Self { + .init(rawValue: "reviewType") + } + + public static var routingAppCoverage: Self { + .init(rawValue: "routingAppCoverage") + } + + public static var usesIdfa: Self { + .init(rawValue: "usesIdfa") + } + + public static var versionString: Self { + .init(rawValue: "versionString") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "appAvailability": self = .appAvailability - case "appClips": self = .appClips - case "appCustomProductPages": self = .appCustomProductPages - case "appEncryptionDeclarations": self = .appEncryptionDeclarations - case "appEvents": self = .appEvents - case "appInfos": self = .appInfos - case "appPricePoints": self = .appPricePoints - case "appPriceSchedule": self = .appPriceSchedule - case "appStoreVersionExperimentsV2": self = .appStoreVersionExperimentsV2 - case "appStoreVersions": self = .appStoreVersions - case "availableInNewTerritories": self = .availableInNewTerritories - case "availableTerritories": self = .availableTerritories - case "betaAppLocalizations": self = .betaAppLocalizations - case "betaAppReviewDetail": self = .betaAppReviewDetail - case "betaGroups": self = .betaGroups - case "betaLicenseAgreement": self = .betaLicenseAgreement - case "betaTesters": self = .betaTesters - case "builds": self = .builds - case "bundleId": self = .bundleId - case "ciProduct": self = .ciProduct - case "contentRightsDeclaration": self = .contentRightsDeclaration - case "customerReviews": self = .customerReviews - case "endUserLicenseAgreement": self = .endUserLicenseAgreement - case "gameCenterDetail": self = .gameCenterDetail - case "gameCenterEnabledVersions": self = .gameCenterEnabledVersions - case "inAppPurchases": self = .inAppPurchases - case "inAppPurchasesV2": self = .inAppPurchasesV2 - case "isOrEverWasMadeForKids": self = .isOrEverWasMadeForKids - case "name": self = .name - case "perfPowerMetrics": self = .perfPowerMetrics - case "preOrder": self = .preOrder - case "preReleaseVersions": self = .preReleaseVersions - case "pricePoints": self = .pricePoints - case "prices": self = .prices - case "primaryLocale": self = .primaryLocale - case "promotedPurchases": self = .promotedPurchases - case "reviewSubmissions": self = .reviewSubmissions - case "sku": self = .sku - case "subscriptionGracePeriod": self = .subscriptionGracePeriod - case "subscriptionGroups": self = .subscriptionGroups - case "subscriptionStatusUrl": self = .subscriptionStatusUrl - case "subscriptionStatusUrlForSandbox": self = .subscriptionStatusUrlForSandbox - case "subscriptionStatusUrlVersion": self = .subscriptionStatusUrlVersion - case "subscriptionStatusUrlVersionForSandbox": self = .subscriptionStatusUrlVersionForSandbox - default: self = .unknown(rawValue) - } - } - } - - public enum GameCenterAchievementReleases: Hashable, Codable, RawRepresentable { - case gameCenterAchievement - case gameCenterDetail - case live - case unknown(String) - - public var rawValue: String { - switch self { - case .gameCenterAchievement: return "gameCenterAchievement" - case .gameCenterDetail: return "gameCenterDetail" - case .live: return "live" - case .unknown(let rawValue): return rawValue - } + self.rawValue = rawValue + } + } + + public struct Apps: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var accessibilityDeclarations: Self { + .init(rawValue: "accessibilityDeclarations") } + public static var accessibilityUrl: Self { + .init(rawValue: "accessibilityUrl") + } + + public static var alternativeDistributionKey: Self { + .init(rawValue: "alternativeDistributionKey") + } + + public static var analyticsReportRequests: Self { + .init(rawValue: "analyticsReportRequests") + } + + public static var appAvailabilityV2: Self { + .init(rawValue: "appAvailabilityV2") + } + + public static var appClips: Self { + .init(rawValue: "appClips") + } + + public static var appCustomProductPages: Self { + .init(rawValue: "appCustomProductPages") + } + + public static var appEncryptionDeclarations: Self { + .init(rawValue: "appEncryptionDeclarations") + } + + public static var appEvents: Self { + .init(rawValue: "appEvents") + } + + public static var appInfos: Self { + .init(rawValue: "appInfos") + } + + public static var appPricePoints: Self { + .init(rawValue: "appPricePoints") + } + + public static var appPriceSchedule: Self { + .init(rawValue: "appPriceSchedule") + } + + public static var appStoreVersionExperimentsV2: Self { + .init(rawValue: "appStoreVersionExperimentsV2") + } + + public static var appStoreVersions: Self { + .init(rawValue: "appStoreVersions") + } + + public static var backgroundAssets: Self { + .init(rawValue: "backgroundAssets") + } + + public static var betaAppLocalizations: Self { + .init(rawValue: "betaAppLocalizations") + } + + public static var betaAppReviewDetail: Self { + .init(rawValue: "betaAppReviewDetail") + } + + public static var betaFeedbackCrashSubmissions: Self { + .init(rawValue: "betaFeedbackCrashSubmissions") + } + + public static var betaFeedbackScreenshotSubmissions: Self { + .init(rawValue: "betaFeedbackScreenshotSubmissions") + } + + public static var betaGroups: Self { + .init(rawValue: "betaGroups") + } + + public static var betaLicenseAgreement: Self { + .init(rawValue: "betaLicenseAgreement") + } + + public static var betaTesters: Self { + .init(rawValue: "betaTesters") + } + + public static var builds: Self { + .init(rawValue: "builds") + } + + public static var bundleId: Self { + .init(rawValue: "bundleId") + } + + public static var ciProduct: Self { + .init(rawValue: "ciProduct") + } + + public static var contentRightsDeclaration: Self { + .init(rawValue: "contentRightsDeclaration") + } + + public static var customerReviewSummarizations: Self { + .init(rawValue: "customerReviewSummarizations") + } + + public static var customerReviews: Self { + .init(rawValue: "customerReviews") + } + + public static var endUserLicenseAgreement: Self { + .init(rawValue: "endUserLicenseAgreement") + } + + public static var gameCenterDetail: Self { + .init(rawValue: "gameCenterDetail") + } + + public static var gameCenterEnabledVersions: Self { + .init(rawValue: "gameCenterEnabledVersions") + } + + public static var inAppPurchases: Self { + .init(rawValue: "inAppPurchases") + } + + public static var inAppPurchasesV2: Self { + .init(rawValue: "inAppPurchasesV2") + } + + public static var isOrEverWasMadeForKids: Self { + .init(rawValue: "isOrEverWasMadeForKids") + } + + public static var marketplaceSearchDetail: Self { + .init(rawValue: "marketplaceSearchDetail") + } + + public static var name: Self { + .init(rawValue: "name") + } + + public static var perfPowerMetrics: Self { + .init(rawValue: "perfPowerMetrics") + } + + public static var preReleaseVersions: Self { + .init(rawValue: "preReleaseVersions") + } + + public static var primaryLocale: Self { + .init(rawValue: "primaryLocale") + } + + public static var promotedPurchases: Self { + .init(rawValue: "promotedPurchases") + } + + public static var reviewSubmissions: Self { + .init(rawValue: "reviewSubmissions") + } + + public static var sku: Self { + .init(rawValue: "sku") + } + + public static var streamlinedPurchasingEnabled: Self { + .init(rawValue: "streamlinedPurchasingEnabled") + } + + public static var subscriptionGracePeriod: Self { + .init(rawValue: "subscriptionGracePeriod") + } + + public static var subscriptionGroups: Self { + .init(rawValue: "subscriptionGroups") + } + + public static var subscriptionStatusUrl: Self { + .init(rawValue: "subscriptionStatusUrl") + } + + public static var subscriptionStatusUrlForSandbox: Self { + .init(rawValue: "subscriptionStatusUrlForSandbox") + } + + public static var subscriptionStatusUrlVersion: Self { + .init(rawValue: "subscriptionStatusUrlVersion") + } + + public static var subscriptionStatusUrlVersionForSandbox: Self { + .init(rawValue: "subscriptionStatusUrlVersionForSandbox") + } + + public static var webhooks: Self { + .init(rawValue: "webhooks") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "gameCenterAchievement": self = .gameCenterAchievement - case "gameCenterDetail": self = .gameCenterDetail - case "live": self = .live - default: self = .unknown(rawValue) - } - } - } - - public enum GameCenterAchievements: Hashable, Codable, RawRepresentable { - case archived - case gameCenterDetail - case gameCenterGroup - case groupAchievement - case localizations - case points - case referenceName - case releases - case repeatable - case showBeforeEarned - case vendorIdentifier - case unknown(String) - - public var rawValue: String { - switch self { - case .archived: return "archived" - case .gameCenterDetail: return "gameCenterDetail" - case .gameCenterGroup: return "gameCenterGroup" - case .groupAchievement: return "groupAchievement" - case .localizations: return "localizations" - case .points: return "points" - case .referenceName: return "referenceName" - case .releases: return "releases" - case .repeatable: return "repeatable" - case .showBeforeEarned: return "showBeforeEarned" - case .vendorIdentifier: return "vendorIdentifier" - case .unknown(let rawValue): return rawValue - } + self.rawValue = rawValue + } + } + + public struct GameCenterAchievementReleases: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var gameCenterAchievement: Self { + .init(rawValue: "gameCenterAchievement") + } + + public static var gameCenterDetail: Self { + .init(rawValue: "gameCenterDetail") + } + + public static var live: Self { + .init(rawValue: "live") } + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "archived": self = .archived - case "gameCenterDetail": self = .gameCenterDetail - case "gameCenterGroup": self = .gameCenterGroup - case "groupAchievement": self = .groupAchievement - case "localizations": self = .localizations - case "points": self = .points - case "referenceName": self = .referenceName - case "releases": self = .releases - case "repeatable": self = .repeatable - case "showBeforeEarned": self = .showBeforeEarned - case "vendorIdentifier": self = .vendorIdentifier - default: self = .unknown(rawValue) - } - } - } - - public enum GameCenterAppVersions: Hashable, Codable, RawRepresentable { - case appStoreVersion - case compatibilityVersions - case enabled - case unknown(String) - - public var rawValue: String { - switch self { - case .appStoreVersion: return "appStoreVersion" - case .compatibilityVersions: return "compatibilityVersions" - case .enabled: return "enabled" - case .unknown(let rawValue): return rawValue - } + self.rawValue = rawValue + } + } + + public struct GameCenterAchievements: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var activity: Self { + .init(rawValue: "activity") + } + + public static var activityProperties: Self { + .init(rawValue: "activityProperties") + } + + public static var archived: Self { + .init(rawValue: "archived") + } + + public static var gameCenterDetail: Self { + .init(rawValue: "gameCenterDetail") + } + + public static var gameCenterGroup: Self { + .init(rawValue: "gameCenterGroup") + } + + public static var groupAchievement: Self { + .init(rawValue: "groupAchievement") + } + + public static var localizations: Self { + .init(rawValue: "localizations") + } + + public static var points: Self { + .init(rawValue: "points") + } + + public static var referenceName: Self { + .init(rawValue: "referenceName") + } + + public static var releases: Self { + .init(rawValue: "releases") + } + + public static var repeatable: Self { + .init(rawValue: "repeatable") + } + + public static var showBeforeEarned: Self { + .init(rawValue: "showBeforeEarned") + } + + public static var vendorIdentifier: Self { + .init(rawValue: "vendorIdentifier") } + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "appStoreVersion": self = .appStoreVersion - case "compatibilityVersions": self = .compatibilityVersions - case "enabled": self = .enabled - default: self = .unknown(rawValue) - } - } - } - - public enum GameCenterDetails: Hashable, Codable, RawRepresentable { - case achievementReleases - case app - case arcadeEnabled - case challengeEnabled - case defaultGroupLeaderboard - case defaultLeaderboard - case gameCenterAchievements - case gameCenterAppVersions - case gameCenterGroup - case gameCenterLeaderboardSets - case gameCenterLeaderboards - case leaderboardReleases - case leaderboardSetReleases - case unknown(String) - - public var rawValue: String { - switch self { - case .achievementReleases: return "achievementReleases" - case .app: return "app" - case .arcadeEnabled: return "arcadeEnabled" - case .challengeEnabled: return "challengeEnabled" - case .defaultGroupLeaderboard: return "defaultGroupLeaderboard" - case .defaultLeaderboard: return "defaultLeaderboard" - case .gameCenterAchievements: return "gameCenterAchievements" - case .gameCenterAppVersions: return "gameCenterAppVersions" - case .gameCenterGroup: return "gameCenterGroup" - case .gameCenterLeaderboardSets: return "gameCenterLeaderboardSets" - case .gameCenterLeaderboards: return "gameCenterLeaderboards" - case .leaderboardReleases: return "leaderboardReleases" - case .leaderboardSetReleases: return "leaderboardSetReleases" - case .unknown(let rawValue): return rawValue - } + self.rawValue = rawValue + } + } + + public struct GameCenterActivities: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var achievements: Self { + .init(rawValue: "achievements") + } + + public static var archived: Self { + .init(rawValue: "archived") + } + + public static var gameCenterDetail: Self { + .init(rawValue: "gameCenterDetail") + } + + public static var gameCenterGroup: Self { + .init(rawValue: "gameCenterGroup") + } + + public static var leaderboards: Self { + .init(rawValue: "leaderboards") + } + + public static var maximumPlayersCount: Self { + .init(rawValue: "maximumPlayersCount") + } + + public static var minimumPlayersCount: Self { + .init(rawValue: "minimumPlayersCount") + } + + public static var playStyle: Self { + .init(rawValue: "playStyle") + } + + public static var properties: Self { + .init(rawValue: "properties") + } + + public static var referenceName: Self { + .init(rawValue: "referenceName") + } + + public static var supportsPartyCode: Self { + .init(rawValue: "supportsPartyCode") + } + + public static var vendorIdentifier: Self { + .init(rawValue: "vendorIdentifier") + } + + public static var versions: Self { + .init(rawValue: "versions") } + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "achievementReleases": self = .achievementReleases - case "app": self = .app - case "arcadeEnabled": self = .arcadeEnabled - case "challengeEnabled": self = .challengeEnabled - case "defaultGroupLeaderboard": self = .defaultGroupLeaderboard - case "defaultLeaderboard": self = .defaultLeaderboard - case "gameCenterAchievements": self = .gameCenterAchievements - case "gameCenterAppVersions": self = .gameCenterAppVersions - case "gameCenterGroup": self = .gameCenterGroup - case "gameCenterLeaderboardSets": self = .gameCenterLeaderboardSets - case "gameCenterLeaderboards": self = .gameCenterLeaderboards - case "leaderboardReleases": self = .leaderboardReleases - case "leaderboardSetReleases": self = .leaderboardSetReleases - default: self = .unknown(rawValue) - } - } - } - - public enum GameCenterGroups: Hashable, Codable, RawRepresentable { - case gameCenterAchievements - case gameCenterDetails - case gameCenterLeaderboardSets - case gameCenterLeaderboards - case referenceName - case unknown(String) - - public var rawValue: String { - switch self { - case .gameCenterAchievements: return "gameCenterAchievements" - case .gameCenterDetails: return "gameCenterDetails" - case .gameCenterLeaderboardSets: return "gameCenterLeaderboardSets" - case .gameCenterLeaderboards: return "gameCenterLeaderboards" - case .referenceName: return "referenceName" - case .unknown(let rawValue): return rawValue - } + self.rawValue = rawValue + } + } + + public struct GameCenterActivityVersionReleases: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var version: Self { + .init(rawValue: "version") + } + + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "gameCenterAchievements": self = .gameCenterAchievements - case "gameCenterDetails": self = .gameCenterDetails - case "gameCenterLeaderboardSets": self = .gameCenterLeaderboardSets - case "gameCenterLeaderboards": self = .gameCenterLeaderboards - case "referenceName": self = .referenceName - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum GameCenterLeaderboardReleases: Hashable, Codable, RawRepresentable { - case gameCenterDetail - case gameCenterLeaderboard - case live - case unknown(String) + public struct GameCenterAppVersions: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var appStoreVersion: Self { + .init(rawValue: "appStoreVersion") + } + + public static var compatibilityVersions: Self { + .init(rawValue: "compatibilityVersions") + } - public var rawValue: String { - switch self { - case .gameCenterDetail: return "gameCenterDetail" - case .gameCenterLeaderboard: return "gameCenterLeaderboard" - case .live: return "live" - case .unknown(let rawValue): return rawValue - } + public static var enabled: Self { + .init(rawValue: "enabled") } + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "gameCenterDetail": self = .gameCenterDetail - case "gameCenterLeaderboard": self = .gameCenterLeaderboard - case "live": self = .live - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum GameCenterLeaderboardSetReleases: Hashable, Codable, RawRepresentable { - case gameCenterDetail - case gameCenterLeaderboardSet - case live - case unknown(String) + public struct GameCenterChallengeVersionReleases: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var version: Self { + .init(rawValue: "version") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct GameCenterChallenges: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var allowedDurations: Self { + .init(rawValue: "allowedDurations") + } + + public static var archived: Self { + .init(rawValue: "archived") + } + + public static var challengeType: Self { + .init(rawValue: "challengeType") + } + + public static var gameCenterDetail: Self { + .init(rawValue: "gameCenterDetail") + } + + public static var gameCenterGroup: Self { + .init(rawValue: "gameCenterGroup") + } + + public static var leaderboard: Self { + .init(rawValue: "leaderboard") + } + + public static var referenceName: Self { + .init(rawValue: "referenceName") + } + + public static var repeatable: Self { + .init(rawValue: "repeatable") + } + + public static var vendorIdentifier: Self { + .init(rawValue: "vendorIdentifier") + } + + public static var versions: Self { + .init(rawValue: "versions") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct GameCenterDetails: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var achievementReleases: Self { + .init(rawValue: "achievementReleases") + } + + public static var activityReleases: Self { + .init(rawValue: "activityReleases") + } + + public static var app: Self { + .init(rawValue: "app") + } + + public static var arcadeEnabled: Self { + .init(rawValue: "arcadeEnabled") + } + + public static var challengeEnabled: Self { + .init(rawValue: "challengeEnabled") + } + + public static var challengeReleases: Self { + .init(rawValue: "challengeReleases") + } + + public static var challengesMinimumPlatformVersions: Self { + .init(rawValue: "challengesMinimumPlatformVersions") + } + + public static var defaultGroupLeaderboard: Self { + .init(rawValue: "defaultGroupLeaderboard") + } + + public static var defaultLeaderboard: Self { + .init(rawValue: "defaultLeaderboard") + } + + public static var gameCenterAchievements: Self { + .init(rawValue: "gameCenterAchievements") + } + + public static var gameCenterActivities: Self { + .init(rawValue: "gameCenterActivities") + } + + public static var gameCenterAppVersions: Self { + .init(rawValue: "gameCenterAppVersions") + } + + public static var gameCenterChallenges: Self { + .init(rawValue: "gameCenterChallenges") + } + + public static var gameCenterGroup: Self { + .init(rawValue: "gameCenterGroup") + } + + public static var gameCenterLeaderboardSets: Self { + .init(rawValue: "gameCenterLeaderboardSets") + } + + public static var gameCenterLeaderboards: Self { + .init(rawValue: "gameCenterLeaderboards") + } + + public static var leaderboardReleases: Self { + .init(rawValue: "leaderboardReleases") + } + + public static var leaderboardSetReleases: Self { + .init(rawValue: "leaderboardSetReleases") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct GameCenterGroups: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var gameCenterAchievements: Self { + .init(rawValue: "gameCenterAchievements") + } + + public static var gameCenterActivities: Self { + .init(rawValue: "gameCenterActivities") + } + + public static var gameCenterChallenges: Self { + .init(rawValue: "gameCenterChallenges") + } + + public static var gameCenterDetails: Self { + .init(rawValue: "gameCenterDetails") + } + + public static var gameCenterLeaderboardSets: Self { + .init(rawValue: "gameCenterLeaderboardSets") + } + + public static var gameCenterLeaderboards: Self { + .init(rawValue: "gameCenterLeaderboards") + } - public var rawValue: String { - switch self { - case .gameCenterDetail: return "gameCenterDetail" - case .gameCenterLeaderboardSet: return "gameCenterLeaderboardSet" - case .live: return "live" - case .unknown(let rawValue): return rawValue - } + public static var referenceName: Self { + .init(rawValue: "referenceName") } + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct GameCenterLeaderboardReleases: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var gameCenterDetail: Self { + .init(rawValue: "gameCenterDetail") + } + + public static var gameCenterLeaderboard: Self { + .init(rawValue: "gameCenterLeaderboard") + } + + public static var live: Self { + .init(rawValue: "live") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "gameCenterDetail": self = .gameCenterDetail - case "gameCenterLeaderboardSet": self = .gameCenterLeaderboardSet - case "live": self = .live - default: self = .unknown(rawValue) - } - } - } - - public enum GameCenterLeaderboardSets: Hashable, Codable, RawRepresentable { - case gameCenterDetail - case gameCenterGroup - case gameCenterLeaderboards - case groupLeaderboardSet - case localizations - case referenceName - case releases - case vendorIdentifier - case unknown(String) - - public var rawValue: String { - switch self { - case .gameCenterDetail: return "gameCenterDetail" - case .gameCenterGroup: return "gameCenterGroup" - case .gameCenterLeaderboards: return "gameCenterLeaderboards" - case .groupLeaderboardSet: return "groupLeaderboardSet" - case .localizations: return "localizations" - case .referenceName: return "referenceName" - case .releases: return "releases" - case .vendorIdentifier: return "vendorIdentifier" - case .unknown(let rawValue): return rawValue - } + self.rawValue = rawValue + } + } + + public struct GameCenterLeaderboardSetReleases: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var gameCenterDetail: Self { + .init(rawValue: "gameCenterDetail") + } + + public static var gameCenterLeaderboardSet: Self { + .init(rawValue: "gameCenterLeaderboardSet") + } + + public static var live: Self { + .init(rawValue: "live") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct GameCenterLeaderboardSets: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var gameCenterDetail: Self { + .init(rawValue: "gameCenterDetail") + } + + public static var gameCenterGroup: Self { + .init(rawValue: "gameCenterGroup") + } + + public static var gameCenterLeaderboards: Self { + .init(rawValue: "gameCenterLeaderboards") + } + + public static var groupLeaderboardSet: Self { + .init(rawValue: "groupLeaderboardSet") + } + + public static var localizations: Self { + .init(rawValue: "localizations") + } + + public static var referenceName: Self { + .init(rawValue: "referenceName") + } + + public static var releases: Self { + .init(rawValue: "releases") + } + + public static var vendorIdentifier: Self { + .init(rawValue: "vendorIdentifier") + } + + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "gameCenterDetail": self = .gameCenterDetail - case "gameCenterGroup": self = .gameCenterGroup - case "gameCenterLeaderboards": self = .gameCenterLeaderboards - case "groupLeaderboardSet": self = .groupLeaderboardSet - case "localizations": self = .localizations - case "referenceName": self = .referenceName - case "releases": self = .releases - case "vendorIdentifier": self = .vendorIdentifier - default: self = .unknown(rawValue) - } - } - } - - public enum GameCenterLeaderboards: Hashable, Codable, RawRepresentable { - case archived - case defaultFormatter - case gameCenterDetail - case gameCenterGroup - case gameCenterLeaderboardSets - case groupLeaderboard - case localizations - case recurrenceDuration - case recurrenceRule - case recurrenceStartDate - case referenceName - case releases - case scoreRangeEnd - case scoreRangeStart - case scoreSortType - case submissionType - case vendorIdentifier - case unknown(String) - - public var rawValue: String { - switch self { - case .archived: return "archived" - case .defaultFormatter: return "defaultFormatter" - case .gameCenterDetail: return "gameCenterDetail" - case .gameCenterGroup: return "gameCenterGroup" - case .gameCenterLeaderboardSets: return "gameCenterLeaderboardSets" - case .groupLeaderboard: return "groupLeaderboard" - case .localizations: return "localizations" - case .recurrenceDuration: return "recurrenceDuration" - case .recurrenceRule: return "recurrenceRule" - case .recurrenceStartDate: return "recurrenceStartDate" - case .referenceName: return "referenceName" - case .releases: return "releases" - case .scoreRangeEnd: return "scoreRangeEnd" - case .scoreRangeStart: return "scoreRangeStart" - case .scoreSortType: return "scoreSortType" - case .submissionType: return "submissionType" - case .vendorIdentifier: return "vendorIdentifier" - case .unknown(let rawValue): return rawValue - } + self.rawValue = rawValue + } + } + + public struct GameCenterLeaderboards: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var activity: Self { + .init(rawValue: "activity") + } + + public static var activityProperties: Self { + .init(rawValue: "activityProperties") + } + + public static var archived: Self { + .init(rawValue: "archived") + } + + public static var challenge: Self { + .init(rawValue: "challenge") + } + + public static var defaultFormatter: Self { + .init(rawValue: "defaultFormatter") + } + + public static var gameCenterDetail: Self { + .init(rawValue: "gameCenterDetail") + } + + public static var gameCenterGroup: Self { + .init(rawValue: "gameCenterGroup") + } + + public static var gameCenterLeaderboardSets: Self { + .init(rawValue: "gameCenterLeaderboardSets") + } + + public static var groupLeaderboard: Self { + .init(rawValue: "groupLeaderboard") + } + + public static var localizations: Self { + .init(rawValue: "localizations") + } + + public static var recurrenceDuration: Self { + .init(rawValue: "recurrenceDuration") + } + + public static var recurrenceRule: Self { + .init(rawValue: "recurrenceRule") + } + + public static var recurrenceStartDate: Self { + .init(rawValue: "recurrenceStartDate") + } + + public static var referenceName: Self { + .init(rawValue: "referenceName") + } + + public static var releases: Self { + .init(rawValue: "releases") + } + + public static var scoreRangeEnd: Self { + .init(rawValue: "scoreRangeEnd") + } + + public static var scoreRangeStart: Self { + .init(rawValue: "scoreRangeStart") + } + + public static var scoreSortType: Self { + .init(rawValue: "scoreSortType") + } + + public static var submissionType: Self { + .init(rawValue: "submissionType") + } + + public static var vendorIdentifier: Self { + .init(rawValue: "vendorIdentifier") } + public static var visibility: Self { + .init(rawValue: "visibility") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "archived": self = .archived - case "defaultFormatter": self = .defaultFormatter - case "gameCenterDetail": self = .gameCenterDetail - case "gameCenterGroup": self = .gameCenterGroup - case "gameCenterLeaderboardSets": self = .gameCenterLeaderboardSets - case "groupLeaderboard": self = .groupLeaderboard - case "localizations": self = .localizations - case "recurrenceDuration": self = .recurrenceDuration - case "recurrenceRule": self = .recurrenceRule - case "recurrenceStartDate": self = .recurrenceStartDate - case "referenceName": self = .referenceName - case "releases": self = .releases - case "scoreRangeEnd": self = .scoreRangeEnd - case "scoreRangeStart": self = .scoreRangeStart - case "scoreSortType": self = .scoreSortType - case "submissionType": self = .submissionType - case "vendorIdentifier": self = .vendorIdentifier - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } public struct Relation: Hashable { + /// the fields to include for returned resources of type appStoreVersions + public static var appStoreVersions: Relation<[AppStoreVersions]?> { + .init(key: "fields[appStoreVersions]") + } + /// the fields to include for returned resources of type apps public static var apps: Relation<[Apps]?> { .init(key: "fields[apps]") @@ -627,11 +1066,31 @@ extension V1.Apps.ById.GameCenterDetail.GET { .init(key: "fields[gameCenterAchievements]") } + /// the fields to include for returned resources of type gameCenterActivities + public static var gameCenterActivities: Relation<[GameCenterActivities]?> { + .init(key: "fields[gameCenterActivities]") + } + + /// the fields to include for returned resources of type gameCenterActivityVersionReleases + public static var gameCenterActivityVersionReleases: Relation<[GameCenterActivityVersionReleases]?> { + .init(key: "fields[gameCenterActivityVersionReleases]") + } + /// the fields to include for returned resources of type gameCenterAppVersions public static var gameCenterAppVersions: Relation<[GameCenterAppVersions]?> { .init(key: "fields[gameCenterAppVersions]") } + /// the fields to include for returned resources of type gameCenterChallengeVersionReleases + public static var gameCenterChallengeVersionReleases: Relation<[GameCenterChallengeVersionReleases]?> { + .init(key: "fields[gameCenterChallengeVersionReleases]") + } + + /// the fields to include for returned resources of type gameCenterChallenges + public static var gameCenterChallenges: Relation<[GameCenterChallenges]?> { + .init(key: "fields[gameCenterChallenges]") + } + /// the fields to include for returned resources of type gameCenterDetails public static var gameCenterDetails: Relation<[GameCenterDetails]?> { .init(key: "fields[gameCenterDetails]") @@ -670,52 +1129,79 @@ extension V1.Apps.ById.GameCenterDetail.GET { } } - public enum Include: Hashable, Codable, RawRepresentable { - case achievementReleases - case app - case defaultGroupLeaderboard - case defaultLeaderboard - case gameCenterAchievements - case gameCenterAppVersions - case gameCenterGroup - case gameCenterLeaderboardSets - case gameCenterLeaderboards - case leaderboardReleases - case leaderboardSetReleases - case unknown(String) - - public var rawValue: String { - switch self { - case .achievementReleases: return "achievementReleases" - case .app: return "app" - case .defaultGroupLeaderboard: return "defaultGroupLeaderboard" - case .defaultLeaderboard: return "defaultLeaderboard" - case .gameCenterAchievements: return "gameCenterAchievements" - case .gameCenterAppVersions: return "gameCenterAppVersions" - case .gameCenterGroup: return "gameCenterGroup" - case .gameCenterLeaderboardSets: return "gameCenterLeaderboardSets" - case .gameCenterLeaderboards: return "gameCenterLeaderboards" - case .leaderboardReleases: return "leaderboardReleases" - case .leaderboardSetReleases: return "leaderboardSetReleases" - case .unknown(let rawValue): return rawValue - } + public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var achievementReleases: Self { + .init(rawValue: "achievementReleases") + } + + public static var activityReleases: Self { + .init(rawValue: "activityReleases") + } + + public static var app: Self { + .init(rawValue: "app") + } + + public static var challengeReleases: Self { + .init(rawValue: "challengeReleases") + } + + public static var challengesMinimumPlatformVersions: Self { + .init(rawValue: "challengesMinimumPlatformVersions") + } + + public static var defaultGroupLeaderboard: Self { + .init(rawValue: "defaultGroupLeaderboard") + } + + public static var defaultLeaderboard: Self { + .init(rawValue: "defaultLeaderboard") + } + + public static var gameCenterAchievements: Self { + .init(rawValue: "gameCenterAchievements") } + public static var gameCenterActivities: Self { + .init(rawValue: "gameCenterActivities") + } + + public static var gameCenterAppVersions: Self { + .init(rawValue: "gameCenterAppVersions") + } + + public static var gameCenterChallenges: Self { + .init(rawValue: "gameCenterChallenges") + } + + public static var gameCenterGroup: Self { + .init(rawValue: "gameCenterGroup") + } + + public static var gameCenterLeaderboardSets: Self { + .init(rawValue: "gameCenterLeaderboardSets") + } + + public static var gameCenterLeaderboards: Self { + .init(rawValue: "gameCenterLeaderboards") + } + + public static var leaderboardReleases: Self { + .init(rawValue: "leaderboardReleases") + } + + public static var leaderboardSetReleases: Self { + .init(rawValue: "leaderboardSetReleases") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "achievementReleases": self = .achievementReleases - case "app": self = .app - case "defaultGroupLeaderboard": self = .defaultGroupLeaderboard - case "defaultLeaderboard": self = .defaultLeaderboard - case "gameCenterAchievements": self = .gameCenterAchievements - case "gameCenterAppVersions": self = .gameCenterAppVersions - case "gameCenterGroup": self = .gameCenterGroup - case "gameCenterLeaderboardSets": self = .gameCenterLeaderboardSets - case "gameCenterLeaderboards": self = .gameCenterLeaderboards - case "leaderboardReleases": self = .leaderboardReleases - case "leaderboardSetReleases": self = .leaderboardSetReleases - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } @@ -733,16 +1219,41 @@ extension V1.Apps.ById.GameCenterDetail.GET { .init(key: "limit[achievementReleases]") } + /// maximum number of related activityReleases returned (when they are included) + public static var activityReleases: Relation { + .init(key: "limit[activityReleases]") + } + + /// maximum number of related challengeReleases returned (when they are included) + public static var challengeReleases: Relation { + .init(key: "limit[challengeReleases]") + } + + /// maximum number of related challengesMinimumPlatformVersions returned (when they are included) + public static var challengesMinimumPlatformVersions: Relation { + .init(key: "limit[challengesMinimumPlatformVersions]") + } + /// maximum number of related gameCenterAchievements returned (when they are included) public static var gameCenterAchievements: Relation { .init(key: "limit[gameCenterAchievements]") } + /// maximum number of related gameCenterActivities returned (when they are included) + public static var gameCenterActivities: Relation { + .init(key: "limit[gameCenterActivities]") + } + /// maximum number of related gameCenterAppVersions returned (when they are included) public static var gameCenterAppVersions: Relation { .init(key: "limit[gameCenterAppVersions]") } + /// maximum number of related gameCenterChallenges returned (when they are included) + public static var gameCenterChallenges: Relation { + .init(key: "limit[gameCenterChallenges]") + } + /// maximum number of related gameCenterLeaderboardSets returned (when they are included) public static var gameCenterLeaderboardSets: Relation { .init(key: "limit[gameCenterLeaderboardSets]") diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/GameCenterEnabledVersions/AppsByIdGameCenterEnabledVersions.GET.69386a4.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/GameCenterEnabledVersions/AppsByIdGameCenterEnabledVersions.GET.69386a4.generated.swift index c0dba853..8fbc9eb2 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/GameCenterEnabledVersions/AppsByIdGameCenterEnabledVersions.GET.69386a4.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/GameCenterEnabledVersions/AppsByIdGameCenterEnabledVersions.GET.69386a4.generated.swift @@ -59,8 +59,10 @@ extension V1.Apps.ById.GameCenterEnabledVersions { /// - Returns: **200**, List of GameCenterEnabledVersions as `GameCenterEnabledVersionsResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -74,12 +76,18 @@ extension V1.Apps.ById.GameCenterEnabledVersions { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 404: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -110,182 +118,247 @@ extension V1.Apps.ById.GameCenterEnabledVersions.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum Apps: Hashable, Codable, RawRepresentable { - case appAvailability - case appClips - case appCustomProductPages - case appEncryptionDeclarations - case appEvents - case appInfos - case appPricePoints - case appPriceSchedule - case appStoreVersionExperimentsV2 - case appStoreVersions - case availableInNewTerritories - case availableTerritories - case betaAppLocalizations - case betaAppReviewDetail - case betaGroups - case betaLicenseAgreement - case betaTesters - case builds - case bundleId - case ciProduct - case contentRightsDeclaration - case customerReviews - case endUserLicenseAgreement - case gameCenterDetail - case gameCenterEnabledVersions - case inAppPurchases - case inAppPurchasesV2 - case isOrEverWasMadeForKids - case name - case perfPowerMetrics - case preOrder - case preReleaseVersions - case pricePoints - case prices - case primaryLocale - case promotedPurchases - case reviewSubmissions - case sku - case subscriptionGracePeriod - case subscriptionGroups - case subscriptionStatusUrl - case subscriptionStatusUrlForSandbox - case subscriptionStatusUrlVersion - case subscriptionStatusUrlVersionForSandbox - case unknown(String) - - public var rawValue: String { - switch self { - case .appAvailability: return "appAvailability" - case .appClips: return "appClips" - case .appCustomProductPages: return "appCustomProductPages" - case .appEncryptionDeclarations: return "appEncryptionDeclarations" - case .appEvents: return "appEvents" - case .appInfos: return "appInfos" - case .appPricePoints: return "appPricePoints" - case .appPriceSchedule: return "appPriceSchedule" - case .appStoreVersionExperimentsV2: return "appStoreVersionExperimentsV2" - case .appStoreVersions: return "appStoreVersions" - case .availableInNewTerritories: return "availableInNewTerritories" - case .availableTerritories: return "availableTerritories" - case .betaAppLocalizations: return "betaAppLocalizations" - case .betaAppReviewDetail: return "betaAppReviewDetail" - case .betaGroups: return "betaGroups" - case .betaLicenseAgreement: return "betaLicenseAgreement" - case .betaTesters: return "betaTesters" - case .builds: return "builds" - case .bundleId: return "bundleId" - case .ciProduct: return "ciProduct" - case .contentRightsDeclaration: return "contentRightsDeclaration" - case .customerReviews: return "customerReviews" - case .endUserLicenseAgreement: return "endUserLicenseAgreement" - case .gameCenterDetail: return "gameCenterDetail" - case .gameCenterEnabledVersions: return "gameCenterEnabledVersions" - case .inAppPurchases: return "inAppPurchases" - case .inAppPurchasesV2: return "inAppPurchasesV2" - case .isOrEverWasMadeForKids: return "isOrEverWasMadeForKids" - case .name: return "name" - case .perfPowerMetrics: return "perfPowerMetrics" - case .preOrder: return "preOrder" - case .preReleaseVersions: return "preReleaseVersions" - case .pricePoints: return "pricePoints" - case .prices: return "prices" - case .primaryLocale: return "primaryLocale" - case .promotedPurchases: return "promotedPurchases" - case .reviewSubmissions: return "reviewSubmissions" - case .sku: return "sku" - case .subscriptionGracePeriod: return "subscriptionGracePeriod" - case .subscriptionGroups: return "subscriptionGroups" - case .subscriptionStatusUrl: return "subscriptionStatusUrl" - case .subscriptionStatusUrlForSandbox: return "subscriptionStatusUrlForSandbox" - case .subscriptionStatusUrlVersion: return "subscriptionStatusUrlVersion" - case .subscriptionStatusUrlVersionForSandbox: return "subscriptionStatusUrlVersionForSandbox" - case .unknown(let rawValue): return rawValue - } + public struct Apps: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var accessibilityDeclarations: Self { + .init(rawValue: "accessibilityDeclarations") + } + + public static var accessibilityUrl: Self { + .init(rawValue: "accessibilityUrl") + } + + public static var alternativeDistributionKey: Self { + .init(rawValue: "alternativeDistributionKey") + } + + public static var analyticsReportRequests: Self { + .init(rawValue: "analyticsReportRequests") + } + + public static var appAvailabilityV2: Self { + .init(rawValue: "appAvailabilityV2") + } + + public static var appClips: Self { + .init(rawValue: "appClips") + } + + public static var appCustomProductPages: Self { + .init(rawValue: "appCustomProductPages") + } + + public static var appEncryptionDeclarations: Self { + .init(rawValue: "appEncryptionDeclarations") + } + + public static var appEvents: Self { + .init(rawValue: "appEvents") + } + + public static var appInfos: Self { + .init(rawValue: "appInfos") + } + + public static var appPricePoints: Self { + .init(rawValue: "appPricePoints") + } + + public static var appPriceSchedule: Self { + .init(rawValue: "appPriceSchedule") + } + + public static var appStoreVersionExperimentsV2: Self { + .init(rawValue: "appStoreVersionExperimentsV2") + } + + public static var appStoreVersions: Self { + .init(rawValue: "appStoreVersions") + } + + public static var backgroundAssets: Self { + .init(rawValue: "backgroundAssets") + } + + public static var betaAppLocalizations: Self { + .init(rawValue: "betaAppLocalizations") + } + + public static var betaAppReviewDetail: Self { + .init(rawValue: "betaAppReviewDetail") + } + + public static var betaFeedbackCrashSubmissions: Self { + .init(rawValue: "betaFeedbackCrashSubmissions") + } + + public static var betaFeedbackScreenshotSubmissions: Self { + .init(rawValue: "betaFeedbackScreenshotSubmissions") + } + + public static var betaGroups: Self { + .init(rawValue: "betaGroups") + } + + public static var betaLicenseAgreement: Self { + .init(rawValue: "betaLicenseAgreement") + } + + public static var betaTesters: Self { + .init(rawValue: "betaTesters") + } + + public static var builds: Self { + .init(rawValue: "builds") + } + + public static var bundleId: Self { + .init(rawValue: "bundleId") + } + + public static var ciProduct: Self { + .init(rawValue: "ciProduct") + } + + public static var contentRightsDeclaration: Self { + .init(rawValue: "contentRightsDeclaration") + } + + public static var customerReviewSummarizations: Self { + .init(rawValue: "customerReviewSummarizations") + } + + public static var customerReviews: Self { + .init(rawValue: "customerReviews") + } + + public static var endUserLicenseAgreement: Self { + .init(rawValue: "endUserLicenseAgreement") + } + + public static var gameCenterDetail: Self { + .init(rawValue: "gameCenterDetail") + } + + public static var gameCenterEnabledVersions: Self { + .init(rawValue: "gameCenterEnabledVersions") + } + + public static var inAppPurchases: Self { + .init(rawValue: "inAppPurchases") + } + + public static var inAppPurchasesV2: Self { + .init(rawValue: "inAppPurchasesV2") } + public static var isOrEverWasMadeForKids: Self { + .init(rawValue: "isOrEverWasMadeForKids") + } + + public static var marketplaceSearchDetail: Self { + .init(rawValue: "marketplaceSearchDetail") + } + + public static var name: Self { + .init(rawValue: "name") + } + + public static var perfPowerMetrics: Self { + .init(rawValue: "perfPowerMetrics") + } + + public static var preReleaseVersions: Self { + .init(rawValue: "preReleaseVersions") + } + + public static var primaryLocale: Self { + .init(rawValue: "primaryLocale") + } + + public static var promotedPurchases: Self { + .init(rawValue: "promotedPurchases") + } + + public static var reviewSubmissions: Self { + .init(rawValue: "reviewSubmissions") + } + + public static var sku: Self { + .init(rawValue: "sku") + } + + public static var streamlinedPurchasingEnabled: Self { + .init(rawValue: "streamlinedPurchasingEnabled") + } + + public static var subscriptionGracePeriod: Self { + .init(rawValue: "subscriptionGracePeriod") + } + + public static var subscriptionGroups: Self { + .init(rawValue: "subscriptionGroups") + } + + public static var subscriptionStatusUrl: Self { + .init(rawValue: "subscriptionStatusUrl") + } + + public static var subscriptionStatusUrlForSandbox: Self { + .init(rawValue: "subscriptionStatusUrlForSandbox") + } + + public static var subscriptionStatusUrlVersion: Self { + .init(rawValue: "subscriptionStatusUrlVersion") + } + + public static var subscriptionStatusUrlVersionForSandbox: Self { + .init(rawValue: "subscriptionStatusUrlVersionForSandbox") + } + + public static var webhooks: Self { + .init(rawValue: "webhooks") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "appAvailability": self = .appAvailability - case "appClips": self = .appClips - case "appCustomProductPages": self = .appCustomProductPages - case "appEncryptionDeclarations": self = .appEncryptionDeclarations - case "appEvents": self = .appEvents - case "appInfos": self = .appInfos - case "appPricePoints": self = .appPricePoints - case "appPriceSchedule": self = .appPriceSchedule - case "appStoreVersionExperimentsV2": self = .appStoreVersionExperimentsV2 - case "appStoreVersions": self = .appStoreVersions - case "availableInNewTerritories": self = .availableInNewTerritories - case "availableTerritories": self = .availableTerritories - case "betaAppLocalizations": self = .betaAppLocalizations - case "betaAppReviewDetail": self = .betaAppReviewDetail - case "betaGroups": self = .betaGroups - case "betaLicenseAgreement": self = .betaLicenseAgreement - case "betaTesters": self = .betaTesters - case "builds": self = .builds - case "bundleId": self = .bundleId - case "ciProduct": self = .ciProduct - case "contentRightsDeclaration": self = .contentRightsDeclaration - case "customerReviews": self = .customerReviews - case "endUserLicenseAgreement": self = .endUserLicenseAgreement - case "gameCenterDetail": self = .gameCenterDetail - case "gameCenterEnabledVersions": self = .gameCenterEnabledVersions - case "inAppPurchases": self = .inAppPurchases - case "inAppPurchasesV2": self = .inAppPurchasesV2 - case "isOrEverWasMadeForKids": self = .isOrEverWasMadeForKids - case "name": self = .name - case "perfPowerMetrics": self = .perfPowerMetrics - case "preOrder": self = .preOrder - case "preReleaseVersions": self = .preReleaseVersions - case "pricePoints": self = .pricePoints - case "prices": self = .prices - case "primaryLocale": self = .primaryLocale - case "promotedPurchases": self = .promotedPurchases - case "reviewSubmissions": self = .reviewSubmissions - case "sku": self = .sku - case "subscriptionGracePeriod": self = .subscriptionGracePeriod - case "subscriptionGroups": self = .subscriptionGroups - case "subscriptionStatusUrl": self = .subscriptionStatusUrl - case "subscriptionStatusUrlForSandbox": self = .subscriptionStatusUrlForSandbox - case "subscriptionStatusUrlVersion": self = .subscriptionStatusUrlVersion - case "subscriptionStatusUrlVersionForSandbox": self = .subscriptionStatusUrlVersionForSandbox - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum GameCenterEnabledVersions: Hashable, Codable, RawRepresentable { - case app - case compatibleVersions - case iconAsset - case platform - case versionString - case unknown(String) - - public var rawValue: String { - switch self { - case .app: return "app" - case .compatibleVersions: return "compatibleVersions" - case .iconAsset: return "iconAsset" - case .platform: return "platform" - case .versionString: return "versionString" - case .unknown(let rawValue): return rawValue - } + public struct GameCenterEnabledVersions: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var app: Self { + .init(rawValue: "app") + } + + public static var compatibleVersions: Self { + .init(rawValue: "compatibleVersions") + } + + public static var iconAsset: Self { + .init(rawValue: "iconAsset") + } + + public static var platform: Self { + .init(rawValue: "platform") } + public static var versionString: Self { + .init(rawValue: "versionString") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "app": self = .app - case "compatibleVersions": self = .compatibleVersions - case "iconAsset": self = .iconAsset - case "platform": self = .platform - case "versionString": self = .versionString - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } @@ -316,28 +389,31 @@ extension V1.Apps.ById.GameCenterEnabledVersions.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum Platform: Hashable, Codable, RawRepresentable { - case iOS - case macOS - case tvOS - case unknown(String) + public struct Platform: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var iOS: Self { + .init(rawValue: "IOS") + } + + public static var macOS: Self { + .init(rawValue: "MAC_OS") + } + + public static var tvOS: Self { + .init(rawValue: "TV_OS") + } - public var rawValue: String { - switch self { - case .iOS: return "IOS" - case .macOS: return "MAC_OS" - case .tvOS: return "TV_OS" - case .unknown(let rawValue): return rawValue - } + public static var visionOS: Self { + .init(rawValue: "VISION_OS") } + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "IOS": self = .iOS - case "MAC_OS": self = .macOS - case "TV_OS": self = .tvOS - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } @@ -365,25 +441,23 @@ extension V1.Apps.ById.GameCenterEnabledVersions.GET { } } - public enum Include: Hashable, Codable, RawRepresentable { - case app - case compatibleVersions - case unknown(String) + public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var app: Self { + .init(rawValue: "app") + } - public var rawValue: String { - switch self { - case .app: return "app" - case .compatibleVersions: return "compatibleVersions" - case .unknown(let rawValue): return rawValue - } + public static var compatibleVersions: Self { + .init(rawValue: "compatibleVersions") + } + + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "app": self = .app - case "compatibleVersions": self = .compatibleVersions - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } @@ -414,25 +488,23 @@ extension V1.Apps.ById.GameCenterEnabledVersions.GET { } } - public enum Sort: Hashable, Codable, RawRepresentable { - case versionString - case versionStringDesc - case unknown(String) + public struct Sort: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var versionString: Self { + .init(rawValue: "versionString") + } - public var rawValue: String { - switch self { - case .versionString: return "versionString" - case .versionStringDesc: return "-versionString" - case .unknown(let rawValue): return rawValue - } + public static var versionStringDesc: Self { + .init(rawValue: "-versionString") } + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "versionString": self = .versionString - case "-versionString": self = .versionStringDesc - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/InAppPurchases/AppsByIdInAppPurchases.GET.8b65266.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/InAppPurchases/AppsByIdInAppPurchases.GET.8b65266.generated.swift index 6da724cf..2c74eaae 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/InAppPurchases/AppsByIdInAppPurchases.GET.8b65266.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/InAppPurchases/AppsByIdInAppPurchases.GET.8b65266.generated.swift @@ -57,8 +57,10 @@ extension V1.Apps.ById.InAppPurchases { /// - Returns: **200**, List of InAppPurchases as `InAppPurchasesResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -72,12 +74,18 @@ extension V1.Apps.ById.InAppPurchases { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 404: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -108,182 +116,247 @@ extension V1.Apps.ById.InAppPurchases.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum Apps: Hashable, Codable, RawRepresentable { - case appAvailability - case appClips - case appCustomProductPages - case appEncryptionDeclarations - case appEvents - case appInfos - case appPricePoints - case appPriceSchedule - case appStoreVersionExperimentsV2 - case appStoreVersions - case availableInNewTerritories - case availableTerritories - case betaAppLocalizations - case betaAppReviewDetail - case betaGroups - case betaLicenseAgreement - case betaTesters - case builds - case bundleId - case ciProduct - case contentRightsDeclaration - case customerReviews - case endUserLicenseAgreement - case gameCenterDetail - case gameCenterEnabledVersions - case inAppPurchases - case inAppPurchasesV2 - case isOrEverWasMadeForKids - case name - case perfPowerMetrics - case preOrder - case preReleaseVersions - case pricePoints - case prices - case primaryLocale - case promotedPurchases - case reviewSubmissions - case sku - case subscriptionGracePeriod - case subscriptionGroups - case subscriptionStatusUrl - case subscriptionStatusUrlForSandbox - case subscriptionStatusUrlVersion - case subscriptionStatusUrlVersionForSandbox - case unknown(String) - - public var rawValue: String { - switch self { - case .appAvailability: return "appAvailability" - case .appClips: return "appClips" - case .appCustomProductPages: return "appCustomProductPages" - case .appEncryptionDeclarations: return "appEncryptionDeclarations" - case .appEvents: return "appEvents" - case .appInfos: return "appInfos" - case .appPricePoints: return "appPricePoints" - case .appPriceSchedule: return "appPriceSchedule" - case .appStoreVersionExperimentsV2: return "appStoreVersionExperimentsV2" - case .appStoreVersions: return "appStoreVersions" - case .availableInNewTerritories: return "availableInNewTerritories" - case .availableTerritories: return "availableTerritories" - case .betaAppLocalizations: return "betaAppLocalizations" - case .betaAppReviewDetail: return "betaAppReviewDetail" - case .betaGroups: return "betaGroups" - case .betaLicenseAgreement: return "betaLicenseAgreement" - case .betaTesters: return "betaTesters" - case .builds: return "builds" - case .bundleId: return "bundleId" - case .ciProduct: return "ciProduct" - case .contentRightsDeclaration: return "contentRightsDeclaration" - case .customerReviews: return "customerReviews" - case .endUserLicenseAgreement: return "endUserLicenseAgreement" - case .gameCenterDetail: return "gameCenterDetail" - case .gameCenterEnabledVersions: return "gameCenterEnabledVersions" - case .inAppPurchases: return "inAppPurchases" - case .inAppPurchasesV2: return "inAppPurchasesV2" - case .isOrEverWasMadeForKids: return "isOrEverWasMadeForKids" - case .name: return "name" - case .perfPowerMetrics: return "perfPowerMetrics" - case .preOrder: return "preOrder" - case .preReleaseVersions: return "preReleaseVersions" - case .pricePoints: return "pricePoints" - case .prices: return "prices" - case .primaryLocale: return "primaryLocale" - case .promotedPurchases: return "promotedPurchases" - case .reviewSubmissions: return "reviewSubmissions" - case .sku: return "sku" - case .subscriptionGracePeriod: return "subscriptionGracePeriod" - case .subscriptionGroups: return "subscriptionGroups" - case .subscriptionStatusUrl: return "subscriptionStatusUrl" - case .subscriptionStatusUrlForSandbox: return "subscriptionStatusUrlForSandbox" - case .subscriptionStatusUrlVersion: return "subscriptionStatusUrlVersion" - case .subscriptionStatusUrlVersionForSandbox: return "subscriptionStatusUrlVersionForSandbox" - case .unknown(let rawValue): return rawValue - } + public struct Apps: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var accessibilityDeclarations: Self { + .init(rawValue: "accessibilityDeclarations") + } + + public static var accessibilityUrl: Self { + .init(rawValue: "accessibilityUrl") + } + + public static var alternativeDistributionKey: Self { + .init(rawValue: "alternativeDistributionKey") + } + + public static var analyticsReportRequests: Self { + .init(rawValue: "analyticsReportRequests") + } + + public static var appAvailabilityV2: Self { + .init(rawValue: "appAvailabilityV2") + } + + public static var appClips: Self { + .init(rawValue: "appClips") + } + + public static var appCustomProductPages: Self { + .init(rawValue: "appCustomProductPages") + } + + public static var appEncryptionDeclarations: Self { + .init(rawValue: "appEncryptionDeclarations") + } + + public static var appEvents: Self { + .init(rawValue: "appEvents") + } + + public static var appInfos: Self { + .init(rawValue: "appInfos") + } + + public static var appPricePoints: Self { + .init(rawValue: "appPricePoints") + } + + public static var appPriceSchedule: Self { + .init(rawValue: "appPriceSchedule") + } + + public static var appStoreVersionExperimentsV2: Self { + .init(rawValue: "appStoreVersionExperimentsV2") + } + + public static var appStoreVersions: Self { + .init(rawValue: "appStoreVersions") + } + + public static var backgroundAssets: Self { + .init(rawValue: "backgroundAssets") + } + + public static var betaAppLocalizations: Self { + .init(rawValue: "betaAppLocalizations") + } + + public static var betaAppReviewDetail: Self { + .init(rawValue: "betaAppReviewDetail") + } + + public static var betaFeedbackCrashSubmissions: Self { + .init(rawValue: "betaFeedbackCrashSubmissions") + } + + public static var betaFeedbackScreenshotSubmissions: Self { + .init(rawValue: "betaFeedbackScreenshotSubmissions") + } + + public static var betaGroups: Self { + .init(rawValue: "betaGroups") + } + + public static var betaLicenseAgreement: Self { + .init(rawValue: "betaLicenseAgreement") + } + + public static var betaTesters: Self { + .init(rawValue: "betaTesters") + } + + public static var builds: Self { + .init(rawValue: "builds") + } + + public static var bundleId: Self { + .init(rawValue: "bundleId") + } + + public static var ciProduct: Self { + .init(rawValue: "ciProduct") + } + + public static var contentRightsDeclaration: Self { + .init(rawValue: "contentRightsDeclaration") + } + + public static var customerReviewSummarizations: Self { + .init(rawValue: "customerReviewSummarizations") + } + + public static var customerReviews: Self { + .init(rawValue: "customerReviews") + } + + public static var endUserLicenseAgreement: Self { + .init(rawValue: "endUserLicenseAgreement") + } + + public static var gameCenterDetail: Self { + .init(rawValue: "gameCenterDetail") + } + + public static var gameCenterEnabledVersions: Self { + .init(rawValue: "gameCenterEnabledVersions") + } + + public static var inAppPurchases: Self { + .init(rawValue: "inAppPurchases") + } + + public static var inAppPurchasesV2: Self { + .init(rawValue: "inAppPurchasesV2") + } + + public static var isOrEverWasMadeForKids: Self { + .init(rawValue: "isOrEverWasMadeForKids") + } + + public static var marketplaceSearchDetail: Self { + .init(rawValue: "marketplaceSearchDetail") + } + + public static var name: Self { + .init(rawValue: "name") + } + + public static var perfPowerMetrics: Self { + .init(rawValue: "perfPowerMetrics") + } + + public static var preReleaseVersions: Self { + .init(rawValue: "preReleaseVersions") + } + + public static var primaryLocale: Self { + .init(rawValue: "primaryLocale") + } + + public static var promotedPurchases: Self { + .init(rawValue: "promotedPurchases") + } + + public static var reviewSubmissions: Self { + .init(rawValue: "reviewSubmissions") + } + + public static var sku: Self { + .init(rawValue: "sku") + } + + public static var streamlinedPurchasingEnabled: Self { + .init(rawValue: "streamlinedPurchasingEnabled") + } + + public static var subscriptionGracePeriod: Self { + .init(rawValue: "subscriptionGracePeriod") + } + + public static var subscriptionGroups: Self { + .init(rawValue: "subscriptionGroups") } + public static var subscriptionStatusUrl: Self { + .init(rawValue: "subscriptionStatusUrl") + } + + public static var subscriptionStatusUrlForSandbox: Self { + .init(rawValue: "subscriptionStatusUrlForSandbox") + } + + public static var subscriptionStatusUrlVersion: Self { + .init(rawValue: "subscriptionStatusUrlVersion") + } + + public static var subscriptionStatusUrlVersionForSandbox: Self { + .init(rawValue: "subscriptionStatusUrlVersionForSandbox") + } + + public static var webhooks: Self { + .init(rawValue: "webhooks") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "appAvailability": self = .appAvailability - case "appClips": self = .appClips - case "appCustomProductPages": self = .appCustomProductPages - case "appEncryptionDeclarations": self = .appEncryptionDeclarations - case "appEvents": self = .appEvents - case "appInfos": self = .appInfos - case "appPricePoints": self = .appPricePoints - case "appPriceSchedule": self = .appPriceSchedule - case "appStoreVersionExperimentsV2": self = .appStoreVersionExperimentsV2 - case "appStoreVersions": self = .appStoreVersions - case "availableInNewTerritories": self = .availableInNewTerritories - case "availableTerritories": self = .availableTerritories - case "betaAppLocalizations": self = .betaAppLocalizations - case "betaAppReviewDetail": self = .betaAppReviewDetail - case "betaGroups": self = .betaGroups - case "betaLicenseAgreement": self = .betaLicenseAgreement - case "betaTesters": self = .betaTesters - case "builds": self = .builds - case "bundleId": self = .bundleId - case "ciProduct": self = .ciProduct - case "contentRightsDeclaration": self = .contentRightsDeclaration - case "customerReviews": self = .customerReviews - case "endUserLicenseAgreement": self = .endUserLicenseAgreement - case "gameCenterDetail": self = .gameCenterDetail - case "gameCenterEnabledVersions": self = .gameCenterEnabledVersions - case "inAppPurchases": self = .inAppPurchases - case "inAppPurchasesV2": self = .inAppPurchasesV2 - case "isOrEverWasMadeForKids": self = .isOrEverWasMadeForKids - case "name": self = .name - case "perfPowerMetrics": self = .perfPowerMetrics - case "preOrder": self = .preOrder - case "preReleaseVersions": self = .preReleaseVersions - case "pricePoints": self = .pricePoints - case "prices": self = .prices - case "primaryLocale": self = .primaryLocale - case "promotedPurchases": self = .promotedPurchases - case "reviewSubmissions": self = .reviewSubmissions - case "sku": self = .sku - case "subscriptionGracePeriod": self = .subscriptionGracePeriod - case "subscriptionGroups": self = .subscriptionGroups - case "subscriptionStatusUrl": self = .subscriptionStatusUrl - case "subscriptionStatusUrlForSandbox": self = .subscriptionStatusUrlForSandbox - case "subscriptionStatusUrlVersion": self = .subscriptionStatusUrlVersion - case "subscriptionStatusUrlVersionForSandbox": self = .subscriptionStatusUrlVersionForSandbox - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum InAppPurchases: Hashable, Codable, RawRepresentable { - case apps - case inAppPurchaseType - case productId - case referenceName - case state - case unknown(String) - - public var rawValue: String { - switch self { - case .apps: return "apps" - case .inAppPurchaseType: return "inAppPurchaseType" - case .productId: return "productId" - case .referenceName: return "referenceName" - case .state: return "state" - case .unknown(let rawValue): return rawValue - } + public struct InAppPurchases: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var apps: Self { + .init(rawValue: "apps") } + public static var inAppPurchaseType: Self { + .init(rawValue: "inAppPurchaseType") + } + + public static var productId: Self { + .init(rawValue: "productId") + } + + public static var referenceName: Self { + .init(rawValue: "referenceName") + } + + public static var state: Self { + .init(rawValue: "state") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "apps": self = .apps - case "inAppPurchaseType": self = .inAppPurchaseType - case "productId": self = .productId - case "referenceName": self = .referenceName - case "state": self = .state - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } @@ -314,34 +387,35 @@ extension V1.Apps.ById.InAppPurchases.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum InAppPurchaseType: Hashable, Codable, RawRepresentable { - case automaticallyRenewableSubscription - case consumable - case freeSubscription - case nonConsumable - case nonRenewingSubscription - case unknown(String) - - public var rawValue: String { - switch self { - case .automaticallyRenewableSubscription: return "AUTOMATICALLY_RENEWABLE_SUBSCRIPTION" - case .consumable: return "CONSUMABLE" - case .freeSubscription: return "FREE_SUBSCRIPTION" - case .nonConsumable: return "NON_CONSUMABLE" - case .nonRenewingSubscription: return "NON_RENEWING_SUBSCRIPTION" - case .unknown(let rawValue): return rawValue - } + public struct InAppPurchaseType: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var automaticallyRenewableSubscription: Self { + .init(rawValue: "AUTOMATICALLY_RENEWABLE_SUBSCRIPTION") + } + + public static var consumable: Self { + .init(rawValue: "CONSUMABLE") + } + + public static var freeSubscription: Self { + .init(rawValue: "FREE_SUBSCRIPTION") + } + + public static var nonConsumable: Self { + .init(rawValue: "NON_CONSUMABLE") + } + + public static var nonRenewingSubscription: Self { + .init(rawValue: "NON_RENEWING_SUBSCRIPTION") } + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "AUTOMATICALLY_RENEWABLE_SUBSCRIPTION": self = .automaticallyRenewableSubscription - case "CONSUMABLE": self = .consumable - case "FREE_SUBSCRIPTION": self = .freeSubscription - case "NON_CONSUMABLE": self = .nonConsumable - case "NON_RENEWING_SUBSCRIPTION": self = .nonRenewingSubscription - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } @@ -364,22 +438,19 @@ extension V1.Apps.ById.InAppPurchases.GET { } } - public enum Include: Hashable, Codable, RawRepresentable { - case apps - case unknown(String) + public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var apps: Self { + .init(rawValue: "apps") + } - public var rawValue: String { - switch self { - case .apps: return "apps" - case .unknown(let rawValue): return rawValue - } + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "apps": self = .apps - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } @@ -410,37 +481,39 @@ extension V1.Apps.ById.InAppPurchases.GET { } } - public enum Sort: Hashable, Codable, RawRepresentable { - case inAppPurchaseType - case inAppPurchaseTypeDesc - case productId - case productIdDesc - case referenceName - case referenceNameDesc - case unknown(String) - - public var rawValue: String { - switch self { - case .inAppPurchaseType: return "inAppPurchaseType" - case .inAppPurchaseTypeDesc: return "-inAppPurchaseType" - case .productId: return "productId" - case .productIdDesc: return "-productId" - case .referenceName: return "referenceName" - case .referenceNameDesc: return "-referenceName" - case .unknown(let rawValue): return rawValue - } + public struct Sort: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var inAppPurchaseType: Self { + .init(rawValue: "inAppPurchaseType") + } + + public static var inAppPurchaseTypeDesc: Self { + .init(rawValue: "-inAppPurchaseType") + } + + public static var productId: Self { + .init(rawValue: "productId") + } + + public static var productIdDesc: Self { + .init(rawValue: "-productId") + } + + public static var referenceName: Self { + .init(rawValue: "referenceName") + } + + public static var referenceNameDesc: Self { + .init(rawValue: "-referenceName") } + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "inAppPurchaseType": self = .inAppPurchaseType - case "-inAppPurchaseType": self = .inAppPurchaseTypeDesc - case "productId": self = .productId - case "-productId": self = .productIdDesc - case "referenceName": self = .referenceName - case "-referenceName": self = .referenceNameDesc - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/InAppPurchasesV2/AppsByIdInAppPurchasesV2.GET.a47247f.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/InAppPurchasesV2/AppsByIdInAppPurchasesV2.GET.a47247f.generated.swift index 9f655f29..c6b9ae5c 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/InAppPurchasesV2/AppsByIdInAppPurchasesV2.GET.a47247f.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/InAppPurchasesV2/AppsByIdInAppPurchasesV2.GET.a47247f.generated.swift @@ -34,6 +34,8 @@ extension V1.Apps.ById.InAppPurchasesV2 { value: parameters.fields[.inAppPurchaseAvailabilities]?.map { "\($0)" }.joined(separator: ",")), URLQueryItem(name: "fields[inAppPurchaseContents]", value: parameters.fields[.inAppPurchaseContents]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "fields[inAppPurchaseImages]", + value: parameters.fields[.inAppPurchaseImages]?.map { "\($0)" }.joined(separator: ",")), URLQueryItem(name: "fields[inAppPurchaseLocalizations]", value: parameters.fields[.inAppPurchaseLocalizations]?.map { "\($0)" }.joined(separator: ",")), URLQueryItem(name: "fields[inAppPurchasePriceSchedules]", @@ -52,6 +54,8 @@ extension V1.Apps.ById.InAppPurchasesV2 { value: parameters.filter[.state]?.map { "\($0)" }.joined(separator: ",")), URLQueryItem(name: "include", value: parameters.include?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "limit[images]", + value: parameters.limit[.images].map { "\($0)" }), URLQueryItem(name: "limit[inAppPurchaseLocalizations]", value: parameters.limit[.inAppPurchaseLocalizations].map { "\($0)" }), URLQueryItem(name: "limit", @@ -70,8 +74,10 @@ extension V1.Apps.ById.InAppPurchasesV2 { /// - Returns: **200**, List of InAppPurchases as `InAppPurchasesV2Response` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -85,12 +91,18 @@ extension V1.Apps.ById.InAppPurchasesV2 { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 404: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -121,262 +133,307 @@ extension V1.Apps.ById.InAppPurchasesV2.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum InAppPurchaseAppStoreReviewScreenshots: Hashable, Codable, RawRepresentable { - case assetDeliveryState - case assetToken - case assetType - case fileName - case fileSize - case imageAsset - case inAppPurchaseV2 - case sourceFileChecksum - case uploadOperations - case uploaded - case unknown(String) - - public var rawValue: String { - switch self { - case .assetDeliveryState: return "assetDeliveryState" - case .assetToken: return "assetToken" - case .assetType: return "assetType" - case .fileName: return "fileName" - case .fileSize: return "fileSize" - case .imageAsset: return "imageAsset" - case .inAppPurchaseV2: return "inAppPurchaseV2" - case .sourceFileChecksum: return "sourceFileChecksum" - case .uploadOperations: return "uploadOperations" - case .uploaded: return "uploaded" - case .unknown(let rawValue): return rawValue - } + public struct InAppPurchaseAppStoreReviewScreenshots: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var assetDeliveryState: Self { + .init(rawValue: "assetDeliveryState") + } + + public static var assetToken: Self { + .init(rawValue: "assetToken") + } + + public static var assetType: Self { + .init(rawValue: "assetType") + } + + public static var fileName: Self { + .init(rawValue: "fileName") + } + + public static var fileSize: Self { + .init(rawValue: "fileSize") + } + + public static var imageAsset: Self { + .init(rawValue: "imageAsset") + } + + public static var inAppPurchaseV2: Self { + .init(rawValue: "inAppPurchaseV2") + } + + public static var sourceFileChecksum: Self { + .init(rawValue: "sourceFileChecksum") + } + + public static var uploadOperations: Self { + .init(rawValue: "uploadOperations") } + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "assetDeliveryState": self = .assetDeliveryState - case "assetToken": self = .assetToken - case "assetType": self = .assetType - case "fileName": self = .fileName - case "fileSize": self = .fileSize - case "imageAsset": self = .imageAsset - case "inAppPurchaseV2": self = .inAppPurchaseV2 - case "sourceFileChecksum": self = .sourceFileChecksum - case "uploadOperations": self = .uploadOperations - case "uploaded": self = .uploaded - default: self = .unknown(rawValue) - } - } - } - - public enum InAppPurchaseAvailabilities: Hashable, Codable, RawRepresentable { - case availableInNewTerritories - case availableTerritories - case inAppPurchase - case unknown(String) - - public var rawValue: String { - switch self { - case .availableInNewTerritories: return "availableInNewTerritories" - case .availableTerritories: return "availableTerritories" - case .inAppPurchase: return "inAppPurchase" - case .unknown(let rawValue): return rawValue - } + self.rawValue = rawValue + } + } + + public struct InAppPurchaseAvailabilities: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var availableInNewTerritories: Self { + .init(rawValue: "availableInNewTerritories") } + public static var availableTerritories: Self { + .init(rawValue: "availableTerritories") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "availableInNewTerritories": self = .availableInNewTerritories - case "availableTerritories": self = .availableTerritories - case "inAppPurchase": self = .inAppPurchase - default: self = .unknown(rawValue) - } - } - } - - public enum InAppPurchaseContents: Hashable, Codable, RawRepresentable { - case fileName - case fileSize - case inAppPurchaseV2 - case lastModifiedDate - case url - case unknown(String) - - public var rawValue: String { - switch self { - case .fileName: return "fileName" - case .fileSize: return "fileSize" - case .inAppPurchaseV2: return "inAppPurchaseV2" - case .lastModifiedDate: return "lastModifiedDate" - case .url: return "url" - case .unknown(let rawValue): return rawValue - } + self.rawValue = rawValue + } + } + + public struct InAppPurchaseContents: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var fileName: Self { + .init(rawValue: "fileName") + } + + public static var fileSize: Self { + .init(rawValue: "fileSize") + } + + public static var inAppPurchaseV2: Self { + .init(rawValue: "inAppPurchaseV2") + } + + public static var lastModifiedDate: Self { + .init(rawValue: "lastModifiedDate") + } + + public static var url: Self { + .init(rawValue: "url") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct InAppPurchaseImages: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var assetToken: Self { + .init(rawValue: "assetToken") } + public static var fileName: Self { + .init(rawValue: "fileName") + } + + public static var fileSize: Self { + .init(rawValue: "fileSize") + } + + public static var imageAsset: Self { + .init(rawValue: "imageAsset") + } + + public static var inAppPurchase: Self { + .init(rawValue: "inAppPurchase") + } + + public static var sourceFileChecksum: Self { + .init(rawValue: "sourceFileChecksum") + } + + public static var state: Self { + .init(rawValue: "state") + } + + public static var uploadOperations: Self { + .init(rawValue: "uploadOperations") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "fileName": self = .fileName - case "fileSize": self = .fileSize - case "inAppPurchaseV2": self = .inAppPurchaseV2 - case "lastModifiedDate": self = .lastModifiedDate - case "url": self = .url - default: self = .unknown(rawValue) - } - } - } - - public enum InAppPurchaseLocalizations: Hashable, Codable, RawRepresentable { - case description - case inAppPurchaseV2 - case locale - case name - case state - case unknown(String) - - public var rawValue: String { - switch self { - case .description: return "description" - case .inAppPurchaseV2: return "inAppPurchaseV2" - case .locale: return "locale" - case .name: return "name" - case .state: return "state" - case .unknown(let rawValue): return rawValue - } + self.rawValue = rawValue + } + } + + public struct InAppPurchaseLocalizations: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var description: Self { + .init(rawValue: "description") + } + + public static var inAppPurchaseV2: Self { + .init(rawValue: "inAppPurchaseV2") + } + + public static var locale: Self { + .init(rawValue: "locale") + } + + public static var name: Self { + .init(rawValue: "name") } + public static var state: Self { + .init(rawValue: "state") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "description": self = .description - case "inAppPurchaseV2": self = .inAppPurchaseV2 - case "locale": self = .locale - case "name": self = .name - case "state": self = .state - default: self = .unknown(rawValue) - } - } - } - - public enum InAppPurchasePriceSchedules: Hashable, Codable, RawRepresentable { - case automaticPrices - case baseTerritory - case inAppPurchase - case manualPrices - case unknown(String) - - public var rawValue: String { - switch self { - case .automaticPrices: return "automaticPrices" - case .baseTerritory: return "baseTerritory" - case .inAppPurchase: return "inAppPurchase" - case .manualPrices: return "manualPrices" - case .unknown(let rawValue): return rawValue - } + self.rawValue = rawValue } + } + + public struct InAppPurchasePriceSchedules: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var automaticPrices: Self { + .init(rawValue: "automaticPrices") + } + + public static var baseTerritory: Self { + .init(rawValue: "baseTerritory") + } + + public static var manualPrices: Self { + .init(rawValue: "manualPrices") + } + + public var description: String { + rawValue + } + + public var rawValue: String public init(rawValue: String) { - switch rawValue { - case "automaticPrices": self = .automaticPrices - case "baseTerritory": self = .baseTerritory - case "inAppPurchase": self = .inAppPurchase - case "manualPrices": self = .manualPrices - default: self = .unknown(rawValue) - } - } - } - - public enum InAppPurchases: Hashable, Codable, RawRepresentable { - case app - case appStoreReviewScreenshot - case availableInAllTerritories - case content - case contentHosting - case familySharable - case iapPriceSchedule - case inAppPurchaseAvailability - case inAppPurchaseLocalizations - case inAppPurchaseType - case name - case productId - case promotedPurchase - case reviewNote - case state - case unknown(String) - - public var rawValue: String { - switch self { - case .app: return "app" - case .appStoreReviewScreenshot: return "appStoreReviewScreenshot" - case .availableInAllTerritories: return "availableInAllTerritories" - case .content: return "content" - case .contentHosting: return "contentHosting" - case .familySharable: return "familySharable" - case .iapPriceSchedule: return "iapPriceSchedule" - case .inAppPurchaseAvailability: return "inAppPurchaseAvailability" - case .inAppPurchaseLocalizations: return "inAppPurchaseLocalizations" - case .inAppPurchaseType: return "inAppPurchaseType" - case .name: return "name" - case .productId: return "productId" - case .promotedPurchase: return "promotedPurchase" - case .reviewNote: return "reviewNote" - case .state: return "state" - case .unknown(let rawValue): return rawValue - } + self.rawValue = rawValue + } + } + + public struct InAppPurchases: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var appStoreReviewScreenshot: Self { + .init(rawValue: "appStoreReviewScreenshot") + } + + public static var content: Self { + .init(rawValue: "content") + } + + public static var contentHosting: Self { + .init(rawValue: "contentHosting") + } + + public static var familySharable: Self { + .init(rawValue: "familySharable") + } + + public static var iapPriceSchedule: Self { + .init(rawValue: "iapPriceSchedule") + } + + public static var images: Self { + .init(rawValue: "images") + } + + public static var inAppPurchaseAvailability: Self { + .init(rawValue: "inAppPurchaseAvailability") + } + + public static var inAppPurchaseLocalizations: Self { + .init(rawValue: "inAppPurchaseLocalizations") + } + + public static var inAppPurchaseType: Self { + .init(rawValue: "inAppPurchaseType") + } + + public static var name: Self { + .init(rawValue: "name") + } + + public static var pricePoints: Self { + .init(rawValue: "pricePoints") } + public static var productId: Self { + .init(rawValue: "productId") + } + + public static var promotedPurchase: Self { + .init(rawValue: "promotedPurchase") + } + + public static var reviewNote: Self { + .init(rawValue: "reviewNote") + } + + public static var state: Self { + .init(rawValue: "state") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "app": self = .app - case "appStoreReviewScreenshot": self = .appStoreReviewScreenshot - case "availableInAllTerritories": self = .availableInAllTerritories - case "content": self = .content - case "contentHosting": self = .contentHosting - case "familySharable": self = .familySharable - case "iapPriceSchedule": self = .iapPriceSchedule - case "inAppPurchaseAvailability": self = .inAppPurchaseAvailability - case "inAppPurchaseLocalizations": self = .inAppPurchaseLocalizations - case "inAppPurchaseType": self = .inAppPurchaseType - case "name": self = .name - case "productId": self = .productId - case "promotedPurchase": self = .promotedPurchase - case "reviewNote": self = .reviewNote - case "state": self = .state - default: self = .unknown(rawValue) - } - } - } - - public enum PromotedPurchases: Hashable, Codable, RawRepresentable { - case app - case enabled - case inAppPurchaseV2 - case promotionImages - case state - case subscription - case visibleForAllUsers - case unknown(String) - - public var rawValue: String { - switch self { - case .app: return "app" - case .enabled: return "enabled" - case .inAppPurchaseV2: return "inAppPurchaseV2" - case .promotionImages: return "promotionImages" - case .state: return "state" - case .subscription: return "subscription" - case .visibleForAllUsers: return "visibleForAllUsers" - case .unknown(let rawValue): return rawValue - } + self.rawValue = rawValue } + } + + public struct PromotedPurchases: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var enabled: Self { + .init(rawValue: "enabled") + } + + public static var inAppPurchaseV2: Self { + .init(rawValue: "inAppPurchaseV2") + } + + public static var state: Self { + .init(rawValue: "state") + } + + public static var subscription: Self { + .init(rawValue: "subscription") + } + + public static var visibleForAllUsers: Self { + .init(rawValue: "visibleForAllUsers") + } + + public var description: String { + rawValue + } + + public var rawValue: String public init(rawValue: String) { - switch rawValue { - case "app": self = .app - case "enabled": self = .enabled - case "inAppPurchaseV2": self = .inAppPurchaseV2 - case "promotionImages": self = .promotionImages - case "state": self = .state - case "subscription": self = .subscription - case "visibleForAllUsers": self = .visibleForAllUsers - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } @@ -396,6 +453,11 @@ extension V1.Apps.ById.InAppPurchasesV2.GET { .init(key: "fields[inAppPurchaseContents]") } + /// the fields to include for returned resources of type inAppPurchaseImages + public static var inAppPurchaseImages: Relation<[InAppPurchaseImages]?> { + .init(key: "fields[inAppPurchaseImages]") + } + /// the fields to include for returned resources of type inAppPurchaseLocalizations public static var inAppPurchaseLocalizations: Relation<[InAppPurchaseLocalizations]?> { .init(key: "fields[inAppPurchaseLocalizations]") @@ -432,80 +494,87 @@ extension V1.Apps.ById.InAppPurchasesV2.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum InAppPurchaseType: Hashable, Codable, RawRepresentable { - case consumable - case nonConsumable - case nonRenewingSubscription - case unknown(String) + public struct InAppPurchaseType: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var consumable: Self { + .init(rawValue: "CONSUMABLE") + } + + public static var nonConsumable: Self { + .init(rawValue: "NON_CONSUMABLE") + } + + public static var nonRenewingSubscription: Self { + .init(rawValue: "NON_RENEWING_SUBSCRIPTION") + } - public var rawValue: String { - switch self { - case .consumable: return "CONSUMABLE" - case .nonConsumable: return "NON_CONSUMABLE" - case .nonRenewingSubscription: return "NON_RENEWING_SUBSCRIPTION" - case .unknown(let rawValue): return rawValue - } + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "CONSUMABLE": self = .consumable - case "NON_CONSUMABLE": self = .nonConsumable - case "NON_RENEWING_SUBSCRIPTION": self = .nonRenewingSubscription - default: self = .unknown(rawValue) - } - } - } - - public enum State: Hashable, Codable, RawRepresentable { - case approved - case developerActionNeeded - case developerRemovedFromSale - case inReview - case missingMetadata - case pendingBinaryApproval - case processingContent - case readyToSubmit - case rejected - case removedFromSale - case waitingForReview - case waitingForUpload - case unknown(String) - - public var rawValue: String { - switch self { - case .approved: return "APPROVED" - case .developerActionNeeded: return "DEVELOPER_ACTION_NEEDED" - case .developerRemovedFromSale: return "DEVELOPER_REMOVED_FROM_SALE" - case .inReview: return "IN_REVIEW" - case .missingMetadata: return "MISSING_METADATA" - case .pendingBinaryApproval: return "PENDING_BINARY_APPROVAL" - case .processingContent: return "PROCESSING_CONTENT" - case .readyToSubmit: return "READY_TO_SUBMIT" - case .rejected: return "REJECTED" - case .removedFromSale: return "REMOVED_FROM_SALE" - case .waitingForReview: return "WAITING_FOR_REVIEW" - case .waitingForUpload: return "WAITING_FOR_UPLOAD" - case .unknown(let rawValue): return rawValue - } + self.rawValue = rawValue + } + } + + public struct State: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var approved: Self { + .init(rawValue: "APPROVED") + } + + public static var developerActionNeeded: Self { + .init(rawValue: "DEVELOPER_ACTION_NEEDED") } + public static var developerRemovedFromSale: Self { + .init(rawValue: "DEVELOPER_REMOVED_FROM_SALE") + } + + public static var inReview: Self { + .init(rawValue: "IN_REVIEW") + } + + public static var missingMetadata: Self { + .init(rawValue: "MISSING_METADATA") + } + + public static var pendingBinaryApproval: Self { + .init(rawValue: "PENDING_BINARY_APPROVAL") + } + + public static var processingContent: Self { + .init(rawValue: "PROCESSING_CONTENT") + } + + public static var readyToSubmit: Self { + .init(rawValue: "READY_TO_SUBMIT") + } + + public static var rejected: Self { + .init(rawValue: "REJECTED") + } + + public static var removedFromSale: Self { + .init(rawValue: "REMOVED_FROM_SALE") + } + + public static var waitingForReview: Self { + .init(rawValue: "WAITING_FOR_REVIEW") + } + + public static var waitingForUpload: Self { + .init(rawValue: "WAITING_FOR_UPLOAD") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "APPROVED": self = .approved - case "DEVELOPER_ACTION_NEEDED": self = .developerActionNeeded - case "DEVELOPER_REMOVED_FROM_SALE": self = .developerRemovedFromSale - case "IN_REVIEW": self = .inReview - case "MISSING_METADATA": self = .missingMetadata - case "PENDING_BINARY_APPROVAL": self = .pendingBinaryApproval - case "PROCESSING_CONTENT": self = .processingContent - case "READY_TO_SUBMIT": self = .readyToSubmit - case "REJECTED": self = .rejected - case "REMOVED_FROM_SALE": self = .removedFromSale - case "WAITING_FOR_REVIEW": self = .waitingForReview - case "WAITING_FOR_UPLOAD": self = .waitingForUpload - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } @@ -538,37 +607,43 @@ extension V1.Apps.ById.InAppPurchasesV2.GET { } } - public enum Include: Hashable, Codable, RawRepresentable { - case appStoreReviewScreenshot - case content - case iapPriceSchedule - case inAppPurchaseAvailability - case inAppPurchaseLocalizations - case promotedPurchase - case unknown(String) + public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var appStoreReviewScreenshot: Self { + .init(rawValue: "appStoreReviewScreenshot") + } - public var rawValue: String { - switch self { - case .appStoreReviewScreenshot: return "appStoreReviewScreenshot" - case .content: return "content" - case .iapPriceSchedule: return "iapPriceSchedule" - case .inAppPurchaseAvailability: return "inAppPurchaseAvailability" - case .inAppPurchaseLocalizations: return "inAppPurchaseLocalizations" - case .promotedPurchase: return "promotedPurchase" - case .unknown(let rawValue): return rawValue - } + public static var content: Self { + .init(rawValue: "content") } + public static var iapPriceSchedule: Self { + .init(rawValue: "iapPriceSchedule") + } + + public static var images: Self { + .init(rawValue: "images") + } + + public static var inAppPurchaseAvailability: Self { + .init(rawValue: "inAppPurchaseAvailability") + } + + public static var inAppPurchaseLocalizations: Self { + .init(rawValue: "inAppPurchaseLocalizations") + } + + public static var promotedPurchase: Self { + .init(rawValue: "promotedPurchase") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "appStoreReviewScreenshot": self = .appStoreReviewScreenshot - case "content": self = .content - case "iapPriceSchedule": self = .iapPriceSchedule - case "inAppPurchaseAvailability": self = .inAppPurchaseAvailability - case "inAppPurchaseLocalizations": self = .inAppPurchaseLocalizations - case "promotedPurchase": self = .promotedPurchase - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } @@ -586,6 +661,11 @@ extension V1.Apps.ById.InAppPurchasesV2.GET { private var values: [AnyHashable: AnyHashable] = [:] public struct Relation: Hashable { + /// maximum number of related images returned (when they are included) + public static var images: Relation { + .init(key: "limit[images]") + } + /// maximum number of related inAppPurchaseLocalizations returned (when they are included) public static var inAppPurchaseLocalizations: Relation { .init(key: "limit[inAppPurchaseLocalizations]") @@ -599,31 +679,31 @@ extension V1.Apps.ById.InAppPurchasesV2.GET { } } - public enum Sort: Hashable, Codable, RawRepresentable { - case inAppPurchaseType - case inAppPurchaseTypeDesc - case name - case nameDesc - case unknown(String) + public struct Sort: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var inAppPurchaseType: Self { + .init(rawValue: "inAppPurchaseType") + } + + public static var inAppPurchaseTypeDesc: Self { + .init(rawValue: "-inAppPurchaseType") + } - public var rawValue: String { - switch self { - case .inAppPurchaseType: return "inAppPurchaseType" - case .inAppPurchaseTypeDesc: return "-inAppPurchaseType" - case .name: return "name" - case .nameDesc: return "-name" - case .unknown(let rawValue): return rawValue - } + public static var name: Self { + .init(rawValue: "name") } + public static var nameDesc: Self { + .init(rawValue: "-name") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "inAppPurchaseType": self = .inAppPurchaseType - case "-inAppPurchaseType": self = .inAppPurchaseTypeDesc - case "name": self = .name - case "-name": self = .nameDesc - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/MarketplaceSearchDetail/AppsByIdMarketplaceSearchDetail.GET.5b4dcb3.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/MarketplaceSearchDetail/AppsByIdMarketplaceSearchDetail.GET.5b4dcb3.generated.swift new file mode 100644 index 00000000..088eec60 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/MarketplaceSearchDetail/AppsByIdMarketplaceSearchDetail.GET.5b4dcb3.generated.swift @@ -0,0 +1,125 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.Apps.ById.MarketplaceSearchDetail { + public struct GET: Endpoint { + public typealias Response = MarketplaceSearchDetailResponse + + public var path: String { + "/v1/apps/\(id)/marketplaceSearchDetail" + } + + /// the id of the requested resource + public var id: String + + public var parameters: Parameters = Parameters() + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + components?.queryItems = [ + URLQueryItem(name: "fields[marketplaceSearchDetails]", + value: parameters.fields[.marketplaceSearchDetails]?.map { "\($0)" }.joined(separator: ",")) + ].filter { $0.value != nil } + if components?.queryItems?.isEmpty ?? false { + components?.queryItems = nil + } + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "GET" + return urlRequest + } + + /// - Returns: **200**, Single MarketplaceSearchDetail as `MarketplaceSearchDetailResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(MarketplaceSearchDetailResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +extension V1.Apps.ById.MarketplaceSearchDetail.GET { + public struct Parameters: Hashable { + public var fields: Fields = Fields() + + public struct Fields: Hashable { + public subscript (_ relation: Relation) -> T { + get { values[relation]?.base as! T } + set { values[relation] = AnyHashable(newValue) } + } + + private var values: [AnyHashable: AnyHashable] = [:] + + public struct MarketplaceSearchDetails: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var catalogUrl: Self { + .init(rawValue: "catalogUrl") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct Relation: Hashable { + /// the fields to include for returned resources of type marketplaceSearchDetails + public static var marketplaceSearchDetails: Relation<[MarketplaceSearchDetails]?> { + .init(key: "fields[marketplaceSearchDetails]") + } + + internal let key: String + + public func hash(into hasher: inout Hasher) { + hasher.combine(key) + } + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/Metrics/BetaTesterUsages/AppsByIdMetricsBetaTesterUsages.GET.8807a65.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/Metrics/BetaTesterUsages/AppsByIdMetricsBetaTesterUsages.GET.8807a65.generated.swift index 569ff987..0d006d6a 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/Metrics/BetaTesterUsages/AppsByIdMetricsBetaTesterUsages.GET.8807a65.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/Metrics/BetaTesterUsages/AppsByIdMetricsBetaTesterUsages.GET.8807a65.generated.swift @@ -48,8 +48,10 @@ extension V1.Apps.ById.Metrics.BetaTesterUsages { /// - Returns: **200**, Metrics data response as `AppsBetaTesterUsagesV1MetricResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -63,12 +65,18 @@ extension V1.Apps.ById.Metrics.BetaTesterUsages { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 404: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -87,7 +95,7 @@ extension V1.Apps.ById.Metrics.BetaTesterUsages.GET { public var limit: Int? /// the duration of the reporting period - public var period: String? + public var period: Period? public struct Filter: Hashable { public subscript (_ relation: Relation) -> T { @@ -111,22 +119,47 @@ extension V1.Apps.ById.Metrics.BetaTesterUsages.GET { } } - public enum GroupBy: Hashable, Codable, RawRepresentable { - case betaTesters - case unknown(String) + public struct GroupBy: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var betaTesters: Self { + .init(rawValue: "betaTesters") + } - public var rawValue: String { - switch self { - case .betaTesters: return "betaTesters" - case .unknown(let rawValue): return rawValue - } + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "betaTesters": self = .betaTesters - default: self = .unknown(rawValue) - } + self.rawValue = rawValue + } + } + + public struct Period: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var p30D: Self { + .init(rawValue: "P30D") + } + + public static var p365D: Self { + .init(rawValue: "P365D") + } + + public static var p7D: Self { + .init(rawValue: "P7D") + } + + public static var p90D: Self { + .init(rawValue: "P90D") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue } } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/PerfPowerMetrics/AppsByIdPerfPowerMetrics.GET.7611cac.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/PerfPowerMetrics/AppsByIdPerfPowerMetrics.GET.7611cac.generated.swift index f00f282a..1ac20f5b 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/PerfPowerMetrics/AppsByIdPerfPowerMetrics.GET.7611cac.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/PerfPowerMetrics/AppsByIdPerfPowerMetrics.GET.7611cac.generated.swift @@ -46,8 +46,10 @@ extension V1.Apps.ById.PerfPowerMetrics { /// - Returns: **200**, List of PerfPowerMetrics as `XcodeMetrics` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -61,12 +63,18 @@ extension V1.Apps.ById.PerfPowerMetrics { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 404: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -86,59 +94,59 @@ extension V1.Apps.ById.PerfPowerMetrics.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum MetricType: Hashable, Codable, RawRepresentable { - case animation - case battery - case disk - case hang - case launch - case memory - case termination - case unknown(String) - - public var rawValue: String { - switch self { - case .animation: return "ANIMATION" - case .battery: return "BATTERY" - case .disk: return "DISK" - case .hang: return "HANG" - case .launch: return "LAUNCH" - case .memory: return "MEMORY" - case .termination: return "TERMINATION" - case .unknown(let rawValue): return rawValue - } + public struct MetricType: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var animation: Self { + .init(rawValue: "ANIMATION") + } + + public static var battery: Self { + .init(rawValue: "BATTERY") } + public static var disk: Self { + .init(rawValue: "DISK") + } + + public static var hang: Self { + .init(rawValue: "HANG") + } + + public static var launch: Self { + .init(rawValue: "LAUNCH") + } + + public static var memory: Self { + .init(rawValue: "MEMORY") + } + + public static var termination: Self { + .init(rawValue: "TERMINATION") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "ANIMATION": self = .animation - case "BATTERY": self = .battery - case "DISK": self = .disk - case "HANG": self = .hang - case "LAUNCH": self = .launch - case "MEMORY": self = .memory - case "TERMINATION": self = .termination - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum Platform: Hashable, Codable, RawRepresentable { - case iOS - case unknown(String) + public struct Platform: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var iOS: Self { + .init(rawValue: "IOS") + } - public var rawValue: String { - switch self { - case .iOS: return "IOS" - case .unknown(let rawValue): return rawValue - } + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "IOS": self = .iOS - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/PreReleaseVersions/AppsByIdPreReleaseVersions.GET.e73d506.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/PreReleaseVersions/AppsByIdPreReleaseVersions.GET.e73d506.generated.swift index c4f0b224..72a4e4c4 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/PreReleaseVersions/AppsByIdPreReleaseVersions.GET.e73d506.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/PreReleaseVersions/AppsByIdPreReleaseVersions.GET.e73d506.generated.swift @@ -44,8 +44,10 @@ extension V1.Apps.ById.PreReleaseVersions { /// - Returns: **200**, List of PreReleaseVersions with get as `PreReleaseVersionsWithoutIncludesResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -59,12 +61,18 @@ extension V1.Apps.ById.PreReleaseVersions { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 404: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -87,31 +95,31 @@ extension V1.Apps.ById.PreReleaseVersions.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum PreReleaseVersions: Hashable, Codable, RawRepresentable { - case app - case builds - case platform - case version - case unknown(String) - - public var rawValue: String { - switch self { - case .app: return "app" - case .builds: return "builds" - case .platform: return "platform" - case .version: return "version" - case .unknown(let rawValue): return rawValue - } + public struct PreReleaseVersions: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var app: Self { + .init(rawValue: "app") } + public static var builds: Self { + .init(rawValue: "builds") + } + + public static var platform: Self { + .init(rawValue: "platform") + } + + public static var version: Self { + .init(rawValue: "version") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "app": self = .app - case "builds": self = .builds - case "platform": self = .platform - case "version": self = .version - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/PricePoints/AppsByIdPricePoints.GET.2176881.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/PricePoints/AppsByIdPricePoints.GET.2176881.generated.swift deleted file mode 100644 index 54bbcced..00000000 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/PricePoints/AppsByIdPricePoints.GET.2176881.generated.swift +++ /dev/null @@ -1,408 +0,0 @@ -// autogenerated - -// swiftlint:disable all -import Foundation -#if canImport(FoundationNetworking) -import FoundationNetworking -#endif - -extension V1.Apps.ById.PricePoints { - @available(*, deprecated) - public struct GET: Endpoint { - public typealias Response = AppPricePointsV2Response - - public var path: String { - "/v1/apps/\(id)/pricePoints" - } - - /// the id of the requested resource - public var id: String - - public var parameters: Parameters = Parameters() - - public init(id: String) { - self.id = id - } - - public func request(with baseURL: URL) throws -> URLRequest? { - var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) - components?.path = path - - components?.queryItems = [ - URLQueryItem(name: "fields[appPricePoints]", - value: parameters.fields[.appPricePoints]?.map { "\($0)" }.joined(separator: ",")), - URLQueryItem(name: "fields[appPriceTiers]", - value: parameters.fields[.appPriceTiers]?.map { "\($0)" }.joined(separator: ",")), - URLQueryItem(name: "fields[apps]", - value: parameters.fields[.apps]?.map { "\($0)" }.joined(separator: ",")), - URLQueryItem(name: "fields[territories]", - value: parameters.fields[.territories]?.map { "\($0)" }.joined(separator: ",")), - URLQueryItem(name: "filter[priceTier]", - value: parameters.filter[.priceTier]?.map { "\($0)" }.joined(separator: ",")), - URLQueryItem(name: "filter[territory]", - value: parameters.filter[.territory]?.map { "\($0)" }.joined(separator: ",")), - URLQueryItem(name: "include", - value: parameters.include?.map { "\($0)" }.joined(separator: ",")), - URLQueryItem(name: "limit", - value: parameters.limit.map { "\($0)" }) - ].filter { $0.value != nil } - if components?.queryItems?.isEmpty ?? false { - components?.queryItems = nil - } - - var urlRequest = components?.url.map { URLRequest(url: $0) } - urlRequest?.httpMethod = "GET" - return urlRequest - } - - /// - Returns: **200**, List of AppPricePoints as `AppPricePointsV2Response` - /// - Throws: **400**, Parameter error(s) as `ErrorResponse` - /// - Throws: **403**, Forbidden error as `ErrorResponse` - /// - Throws: **404**, Not found error as `ErrorResponse` - public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { - var jsonDecoder: JSONDecoder { - let decoder = JSONDecoder() - return decoder - } - - switch urlResponse.statusCode { - case 200: - return try jsonDecoder.decode(AppPricePointsV2Response.self, from: data) - - case 400: - throw try jsonDecoder.decode(ErrorResponse.self, from: data) - - case 403: - throw try jsonDecoder.decode(ErrorResponse.self, from: data) - - case 404: - throw try jsonDecoder.decode(ErrorResponse.self, from: data) - - default: - throw try jsonDecoder.decode(ErrorResponse.self, from: data) - } - } - } -} - -extension V1.Apps.ById.PricePoints.GET { - public struct Parameters: Hashable { - public var fields: Fields = Fields() - - public var filter: Filter = Filter() - - /// comma-separated list of relationships to include - public var include: [Include]? - - /// maximum resources per page - public var limit: Int? - - public struct Fields: Hashable { - public subscript (_ relation: Relation) -> T { - get { values[relation]?.base as! T } - set { values[relation] = AnyHashable(newValue) } - } - - private var values: [AnyHashable: AnyHashable] = [:] - - public enum AppPricePoints: Hashable, Codable, RawRepresentable { - case app - case customerPrice - case priceTier - case proceeds - case territory - case unknown(String) - - public var rawValue: String { - switch self { - case .app: return "app" - case .customerPrice: return "customerPrice" - case .priceTier: return "priceTier" - case .proceeds: return "proceeds" - case .territory: return "territory" - case .unknown(let rawValue): return rawValue - } - } - - public init(rawValue: String) { - switch rawValue { - case "app": self = .app - case "customerPrice": self = .customerPrice - case "priceTier": self = .priceTier - case "proceeds": self = .proceeds - case "territory": self = .territory - default: self = .unknown(rawValue) - } - } - } - - public enum AppPriceTiers: Hashable, Codable, RawRepresentable { - case pricePoints - case unknown(String) - - public var rawValue: String { - switch self { - case .pricePoints: return "pricePoints" - case .unknown(let rawValue): return rawValue - } - } - - public init(rawValue: String) { - switch rawValue { - case "pricePoints": self = .pricePoints - default: self = .unknown(rawValue) - } - } - } - - public enum Apps: Hashable, Codable, RawRepresentable { - case appAvailability - case appClips - case appCustomProductPages - case appEncryptionDeclarations - case appEvents - case appInfos - case appPricePoints - case appPriceSchedule - case appStoreVersionExperimentsV2 - case appStoreVersions - case availableInNewTerritories - case availableTerritories - case betaAppLocalizations - case betaAppReviewDetail - case betaGroups - case betaLicenseAgreement - case betaTesters - case builds - case bundleId - case ciProduct - case contentRightsDeclaration - case customerReviews - case endUserLicenseAgreement - case gameCenterDetail - case gameCenterEnabledVersions - case inAppPurchases - case inAppPurchasesV2 - case isOrEverWasMadeForKids - case name - case perfPowerMetrics - case preOrder - case preReleaseVersions - case pricePoints - case prices - case primaryLocale - case promotedPurchases - case reviewSubmissions - case sku - case subscriptionGracePeriod - case subscriptionGroups - case subscriptionStatusUrl - case subscriptionStatusUrlForSandbox - case subscriptionStatusUrlVersion - case subscriptionStatusUrlVersionForSandbox - case unknown(String) - - public var rawValue: String { - switch self { - case .appAvailability: return "appAvailability" - case .appClips: return "appClips" - case .appCustomProductPages: return "appCustomProductPages" - case .appEncryptionDeclarations: return "appEncryptionDeclarations" - case .appEvents: return "appEvents" - case .appInfos: return "appInfos" - case .appPricePoints: return "appPricePoints" - case .appPriceSchedule: return "appPriceSchedule" - case .appStoreVersionExperimentsV2: return "appStoreVersionExperimentsV2" - case .appStoreVersions: return "appStoreVersions" - case .availableInNewTerritories: return "availableInNewTerritories" - case .availableTerritories: return "availableTerritories" - case .betaAppLocalizations: return "betaAppLocalizations" - case .betaAppReviewDetail: return "betaAppReviewDetail" - case .betaGroups: return "betaGroups" - case .betaLicenseAgreement: return "betaLicenseAgreement" - case .betaTesters: return "betaTesters" - case .builds: return "builds" - case .bundleId: return "bundleId" - case .ciProduct: return "ciProduct" - case .contentRightsDeclaration: return "contentRightsDeclaration" - case .customerReviews: return "customerReviews" - case .endUserLicenseAgreement: return "endUserLicenseAgreement" - case .gameCenterDetail: return "gameCenterDetail" - case .gameCenterEnabledVersions: return "gameCenterEnabledVersions" - case .inAppPurchases: return "inAppPurchases" - case .inAppPurchasesV2: return "inAppPurchasesV2" - case .isOrEverWasMadeForKids: return "isOrEverWasMadeForKids" - case .name: return "name" - case .perfPowerMetrics: return "perfPowerMetrics" - case .preOrder: return "preOrder" - case .preReleaseVersions: return "preReleaseVersions" - case .pricePoints: return "pricePoints" - case .prices: return "prices" - case .primaryLocale: return "primaryLocale" - case .promotedPurchases: return "promotedPurchases" - case .reviewSubmissions: return "reviewSubmissions" - case .sku: return "sku" - case .subscriptionGracePeriod: return "subscriptionGracePeriod" - case .subscriptionGroups: return "subscriptionGroups" - case .subscriptionStatusUrl: return "subscriptionStatusUrl" - case .subscriptionStatusUrlForSandbox: return "subscriptionStatusUrlForSandbox" - case .subscriptionStatusUrlVersion: return "subscriptionStatusUrlVersion" - case .subscriptionStatusUrlVersionForSandbox: return "subscriptionStatusUrlVersionForSandbox" - case .unknown(let rawValue): return rawValue - } - } - - public init(rawValue: String) { - switch rawValue { - case "appAvailability": self = .appAvailability - case "appClips": self = .appClips - case "appCustomProductPages": self = .appCustomProductPages - case "appEncryptionDeclarations": self = .appEncryptionDeclarations - case "appEvents": self = .appEvents - case "appInfos": self = .appInfos - case "appPricePoints": self = .appPricePoints - case "appPriceSchedule": self = .appPriceSchedule - case "appStoreVersionExperimentsV2": self = .appStoreVersionExperimentsV2 - case "appStoreVersions": self = .appStoreVersions - case "availableInNewTerritories": self = .availableInNewTerritories - case "availableTerritories": self = .availableTerritories - case "betaAppLocalizations": self = .betaAppLocalizations - case "betaAppReviewDetail": self = .betaAppReviewDetail - case "betaGroups": self = .betaGroups - case "betaLicenseAgreement": self = .betaLicenseAgreement - case "betaTesters": self = .betaTesters - case "builds": self = .builds - case "bundleId": self = .bundleId - case "ciProduct": self = .ciProduct - case "contentRightsDeclaration": self = .contentRightsDeclaration - case "customerReviews": self = .customerReviews - case "endUserLicenseAgreement": self = .endUserLicenseAgreement - case "gameCenterDetail": self = .gameCenterDetail - case "gameCenterEnabledVersions": self = .gameCenterEnabledVersions - case "inAppPurchases": self = .inAppPurchases - case "inAppPurchasesV2": self = .inAppPurchasesV2 - case "isOrEverWasMadeForKids": self = .isOrEverWasMadeForKids - case "name": self = .name - case "perfPowerMetrics": self = .perfPowerMetrics - case "preOrder": self = .preOrder - case "preReleaseVersions": self = .preReleaseVersions - case "pricePoints": self = .pricePoints - case "prices": self = .prices - case "primaryLocale": self = .primaryLocale - case "promotedPurchases": self = .promotedPurchases - case "reviewSubmissions": self = .reviewSubmissions - case "sku": self = .sku - case "subscriptionGracePeriod": self = .subscriptionGracePeriod - case "subscriptionGroups": self = .subscriptionGroups - case "subscriptionStatusUrl": self = .subscriptionStatusUrl - case "subscriptionStatusUrlForSandbox": self = .subscriptionStatusUrlForSandbox - case "subscriptionStatusUrlVersion": self = .subscriptionStatusUrlVersion - case "subscriptionStatusUrlVersionForSandbox": self = .subscriptionStatusUrlVersionForSandbox - default: self = .unknown(rawValue) - } - } - } - - public enum Territories: Hashable, Codable, RawRepresentable { - case currency - case unknown(String) - - public var rawValue: String { - switch self { - case .currency: return "currency" - case .unknown(let rawValue): return rawValue - } - } - - public init(rawValue: String) { - switch rawValue { - case "currency": self = .currency - default: self = .unknown(rawValue) - } - } - } - - public struct Relation: Hashable { - /// the fields to include for returned resources of type appPricePoints - public static var appPricePoints: Relation<[AppPricePoints]?> { - .init(key: "fields[appPricePoints]") - } - - /// the fields to include for returned resources of type appPriceTiers - public static var appPriceTiers: Relation<[AppPriceTiers]?> { - .init(key: "fields[appPriceTiers]") - } - - /// the fields to include for returned resources of type apps - public static var apps: Relation<[Apps]?> { - .init(key: "fields[apps]") - } - - /// the fields to include for returned resources of type territories - public static var territories: Relation<[Territories]?> { - .init(key: "fields[territories]") - } - - internal let key: String - - public func hash(into hasher: inout Hasher) { - hasher.combine(key) - } - } - } - - public struct Filter: Hashable { - public subscript (_ relation: Relation) -> T { - get { values[relation]?.base as! T } - set { values[relation] = AnyHashable(newValue) } - } - - private var values: [AnyHashable: AnyHashable] = [:] - - public struct Relation: Hashable { - /// filter by id(s) of related 'priceTier' - public static var priceTier: Relation<[String]?> { - .init(key: "filter[priceTier]") - } - - /// filter by id(s) of related 'territory' - public static var territory: Relation<[String]?> { - .init(key: "filter[territory]") - } - - internal let key: String - - public func hash(into hasher: inout Hasher) { - hasher.combine(key) - } - } - } - - public enum Include: Hashable, Codable, RawRepresentable { - case app - case priceTier - case territory - case unknown(String) - - public var rawValue: String { - switch self { - case .app: return "app" - case .priceTier: return "priceTier" - case .territory: return "territory" - case .unknown(let rawValue): return rawValue - } - } - - public init(rawValue: String) { - switch rawValue { - case "app": self = .app - case "priceTier": self = .priceTier - case "territory": self = .territory - default: self = .unknown(rawValue) - } - } - } - } -} - -// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/Prices/AppsByIdPrices.GET.83c9fbe.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/Prices/AppsByIdPrices.GET.83c9fbe.generated.swift deleted file mode 100644 index 8fdcab10..00000000 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/Prices/AppsByIdPrices.GET.83c9fbe.generated.swift +++ /dev/null @@ -1,337 +0,0 @@ -// autogenerated - -// swiftlint:disable all -import Foundation -#if canImport(FoundationNetworking) -import FoundationNetworking -#endif - -extension V1.Apps.ById.Prices { - @available(*, deprecated) - public struct GET: Endpoint { - public typealias Response = AppPricesResponse - - public var path: String { - "/v1/apps/\(id)/prices" - } - - /// the id of the requested resource - public var id: String - - public var parameters: Parameters = Parameters() - - public init(id: String) { - self.id = id - } - - public func request(with baseURL: URL) throws -> URLRequest? { - var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) - components?.path = path - - components?.queryItems = [ - URLQueryItem(name: "fields[appPriceTiers]", - value: parameters.fields[.appPriceTiers]?.map { "\($0)" }.joined(separator: ",")), - URLQueryItem(name: "fields[appPrices]", - value: parameters.fields[.appPrices]?.map { "\($0)" }.joined(separator: ",")), - URLQueryItem(name: "fields[apps]", - value: parameters.fields[.apps]?.map { "\($0)" }.joined(separator: ",")), - URLQueryItem(name: "include", - value: parameters.include?.map { "\($0)" }.joined(separator: ",")), - URLQueryItem(name: "limit", - value: parameters.limit.map { "\($0)" }) - ].filter { $0.value != nil } - if components?.queryItems?.isEmpty ?? false { - components?.queryItems = nil - } - - var urlRequest = components?.url.map { URLRequest(url: $0) } - urlRequest?.httpMethod = "GET" - return urlRequest - } - - /// - Returns: **200**, List of AppPrices as `AppPricesResponse` - /// - Throws: **400**, Parameter error(s) as `ErrorResponse` - /// - Throws: **403**, Forbidden error as `ErrorResponse` - /// - Throws: **404**, Not found error as `ErrorResponse` - public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { - var jsonDecoder: JSONDecoder { - let decoder = JSONDecoder() - return decoder - } - - switch urlResponse.statusCode { - case 200: - return try jsonDecoder.decode(AppPricesResponse.self, from: data) - - case 400: - throw try jsonDecoder.decode(ErrorResponse.self, from: data) - - case 403: - throw try jsonDecoder.decode(ErrorResponse.self, from: data) - - case 404: - throw try jsonDecoder.decode(ErrorResponse.self, from: data) - - default: - throw try jsonDecoder.decode(ErrorResponse.self, from: data) - } - } - } -} - -extension V1.Apps.ById.Prices.GET { - public struct Parameters: Hashable { - public var fields: Fields = Fields() - - /// comma-separated list of relationships to include - public var include: [Include]? - - /// maximum resources per page - public var limit: Int? - - public struct Fields: Hashable { - public subscript (_ relation: Relation) -> T { - get { values[relation]?.base as! T } - set { values[relation] = AnyHashable(newValue) } - } - - private var values: [AnyHashable: AnyHashable] = [:] - - public enum AppPriceTiers: Hashable, Codable, RawRepresentable { - case pricePoints - case unknown(String) - - public var rawValue: String { - switch self { - case .pricePoints: return "pricePoints" - case .unknown(let rawValue): return rawValue - } - } - - public init(rawValue: String) { - switch rawValue { - case "pricePoints": self = .pricePoints - default: self = .unknown(rawValue) - } - } - } - - public enum AppPrices: Hashable, Codable, RawRepresentable { - case app - case priceTier - case unknown(String) - - public var rawValue: String { - switch self { - case .app: return "app" - case .priceTier: return "priceTier" - case .unknown(let rawValue): return rawValue - } - } - - public init(rawValue: String) { - switch rawValue { - case "app": self = .app - case "priceTier": self = .priceTier - default: self = .unknown(rawValue) - } - } - } - - public enum Apps: Hashable, Codable, RawRepresentable { - case appAvailability - case appClips - case appCustomProductPages - case appEncryptionDeclarations - case appEvents - case appInfos - case appPricePoints - case appPriceSchedule - case appStoreVersionExperimentsV2 - case appStoreVersions - case availableInNewTerritories - case availableTerritories - case betaAppLocalizations - case betaAppReviewDetail - case betaGroups - case betaLicenseAgreement - case betaTesters - case builds - case bundleId - case ciProduct - case contentRightsDeclaration - case customerReviews - case endUserLicenseAgreement - case gameCenterDetail - case gameCenterEnabledVersions - case inAppPurchases - case inAppPurchasesV2 - case isOrEverWasMadeForKids - case name - case perfPowerMetrics - case preOrder - case preReleaseVersions - case pricePoints - case prices - case primaryLocale - case promotedPurchases - case reviewSubmissions - case sku - case subscriptionGracePeriod - case subscriptionGroups - case subscriptionStatusUrl - case subscriptionStatusUrlForSandbox - case subscriptionStatusUrlVersion - case subscriptionStatusUrlVersionForSandbox - case unknown(String) - - public var rawValue: String { - switch self { - case .appAvailability: return "appAvailability" - case .appClips: return "appClips" - case .appCustomProductPages: return "appCustomProductPages" - case .appEncryptionDeclarations: return "appEncryptionDeclarations" - case .appEvents: return "appEvents" - case .appInfos: return "appInfos" - case .appPricePoints: return "appPricePoints" - case .appPriceSchedule: return "appPriceSchedule" - case .appStoreVersionExperimentsV2: return "appStoreVersionExperimentsV2" - case .appStoreVersions: return "appStoreVersions" - case .availableInNewTerritories: return "availableInNewTerritories" - case .availableTerritories: return "availableTerritories" - case .betaAppLocalizations: return "betaAppLocalizations" - case .betaAppReviewDetail: return "betaAppReviewDetail" - case .betaGroups: return "betaGroups" - case .betaLicenseAgreement: return "betaLicenseAgreement" - case .betaTesters: return "betaTesters" - case .builds: return "builds" - case .bundleId: return "bundleId" - case .ciProduct: return "ciProduct" - case .contentRightsDeclaration: return "contentRightsDeclaration" - case .customerReviews: return "customerReviews" - case .endUserLicenseAgreement: return "endUserLicenseAgreement" - case .gameCenterDetail: return "gameCenterDetail" - case .gameCenterEnabledVersions: return "gameCenterEnabledVersions" - case .inAppPurchases: return "inAppPurchases" - case .inAppPurchasesV2: return "inAppPurchasesV2" - case .isOrEverWasMadeForKids: return "isOrEverWasMadeForKids" - case .name: return "name" - case .perfPowerMetrics: return "perfPowerMetrics" - case .preOrder: return "preOrder" - case .preReleaseVersions: return "preReleaseVersions" - case .pricePoints: return "pricePoints" - case .prices: return "prices" - case .primaryLocale: return "primaryLocale" - case .promotedPurchases: return "promotedPurchases" - case .reviewSubmissions: return "reviewSubmissions" - case .sku: return "sku" - case .subscriptionGracePeriod: return "subscriptionGracePeriod" - case .subscriptionGroups: return "subscriptionGroups" - case .subscriptionStatusUrl: return "subscriptionStatusUrl" - case .subscriptionStatusUrlForSandbox: return "subscriptionStatusUrlForSandbox" - case .subscriptionStatusUrlVersion: return "subscriptionStatusUrlVersion" - case .subscriptionStatusUrlVersionForSandbox: return "subscriptionStatusUrlVersionForSandbox" - case .unknown(let rawValue): return rawValue - } - } - - public init(rawValue: String) { - switch rawValue { - case "appAvailability": self = .appAvailability - case "appClips": self = .appClips - case "appCustomProductPages": self = .appCustomProductPages - case "appEncryptionDeclarations": self = .appEncryptionDeclarations - case "appEvents": self = .appEvents - case "appInfos": self = .appInfos - case "appPricePoints": self = .appPricePoints - case "appPriceSchedule": self = .appPriceSchedule - case "appStoreVersionExperimentsV2": self = .appStoreVersionExperimentsV2 - case "appStoreVersions": self = .appStoreVersions - case "availableInNewTerritories": self = .availableInNewTerritories - case "availableTerritories": self = .availableTerritories - case "betaAppLocalizations": self = .betaAppLocalizations - case "betaAppReviewDetail": self = .betaAppReviewDetail - case "betaGroups": self = .betaGroups - case "betaLicenseAgreement": self = .betaLicenseAgreement - case "betaTesters": self = .betaTesters - case "builds": self = .builds - case "bundleId": self = .bundleId - case "ciProduct": self = .ciProduct - case "contentRightsDeclaration": self = .contentRightsDeclaration - case "customerReviews": self = .customerReviews - case "endUserLicenseAgreement": self = .endUserLicenseAgreement - case "gameCenterDetail": self = .gameCenterDetail - case "gameCenterEnabledVersions": self = .gameCenterEnabledVersions - case "inAppPurchases": self = .inAppPurchases - case "inAppPurchasesV2": self = .inAppPurchasesV2 - case "isOrEverWasMadeForKids": self = .isOrEverWasMadeForKids - case "name": self = .name - case "perfPowerMetrics": self = .perfPowerMetrics - case "preOrder": self = .preOrder - case "preReleaseVersions": self = .preReleaseVersions - case "pricePoints": self = .pricePoints - case "prices": self = .prices - case "primaryLocale": self = .primaryLocale - case "promotedPurchases": self = .promotedPurchases - case "reviewSubmissions": self = .reviewSubmissions - case "sku": self = .sku - case "subscriptionGracePeriod": self = .subscriptionGracePeriod - case "subscriptionGroups": self = .subscriptionGroups - case "subscriptionStatusUrl": self = .subscriptionStatusUrl - case "subscriptionStatusUrlForSandbox": self = .subscriptionStatusUrlForSandbox - case "subscriptionStatusUrlVersion": self = .subscriptionStatusUrlVersion - case "subscriptionStatusUrlVersionForSandbox": self = .subscriptionStatusUrlVersionForSandbox - default: self = .unknown(rawValue) - } - } - } - - public struct Relation: Hashable { - /// the fields to include for returned resources of type appPriceTiers - public static var appPriceTiers: Relation<[AppPriceTiers]?> { - .init(key: "fields[appPriceTiers]") - } - - /// the fields to include for returned resources of type appPrices - public static var appPrices: Relation<[AppPrices]?> { - .init(key: "fields[appPrices]") - } - - /// the fields to include for returned resources of type apps - public static var apps: Relation<[Apps]?> { - .init(key: "fields[apps]") - } - - internal let key: String - - public func hash(into hasher: inout Hasher) { - hasher.combine(key) - } - } - } - - public enum Include: Hashable, Codable, RawRepresentable { - case app - case priceTier - case unknown(String) - - public var rawValue: String { - switch self { - case .app: return "app" - case .priceTier: return "priceTier" - case .unknown(let rawValue): return rawValue - } - } - - public init(rawValue: String) { - switch rawValue { - case "app": self = .app - case "priceTier": self = .priceTier - default: self = .unknown(rawValue) - } - } - } - } -} - -// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/PromotedPurchases/AppsByIdPromotedPurchases.GET.62d9cf2.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/PromotedPurchases/AppsByIdPromotedPurchases.GET.62d9cf2.generated.swift index 8fe32e83..e96e91b6 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/PromotedPurchases/AppsByIdPromotedPurchases.GET.62d9cf2.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/PromotedPurchases/AppsByIdPromotedPurchases.GET.62d9cf2.generated.swift @@ -30,18 +30,14 @@ extension V1.Apps.ById.PromotedPurchases { components?.queryItems = [ URLQueryItem(name: "fields[inAppPurchases]", value: parameters.fields[.inAppPurchases]?.map { "\($0)" }.joined(separator: ",")), - URLQueryItem(name: "fields[promotedPurchaseImages]", - value: parameters.fields[.promotedPurchaseImages]?.map { "\($0)" }.joined(separator: ",")), URLQueryItem(name: "fields[promotedPurchases]", value: parameters.fields[.promotedPurchases]?.map { "\($0)" }.joined(separator: ",")), URLQueryItem(name: "fields[subscriptions]", value: parameters.fields[.subscriptions]?.map { "\($0)" }.joined(separator: ",")), URLQueryItem(name: "include", value: parameters.include?.map { "\($0)" }.joined(separator: ",")), - URLQueryItem(name: "limit[promotionImages]", - value: parameters.limit[.promotionImages].map { "\($0)" }), URLQueryItem(name: "limit", - value: parameters.limit[].map { "\($0)" }) + value: parameters.limit.map { "\($0)" }) ].filter { $0.value != nil } if components?.queryItems?.isEmpty ?? false { components?.queryItems = nil @@ -54,8 +50,10 @@ extension V1.Apps.ById.PromotedPurchases { /// - Returns: **200**, List of PromotedPurchases as `PromotedPurchasesResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -69,12 +67,18 @@ extension V1.Apps.ById.PromotedPurchases { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 404: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -90,7 +94,7 @@ extension V1.Apps.ById.PromotedPurchases.GET { public var include: [Include]? /// maximum resources per page - public var limit: Limit = Limit() + public var limit: Int? public struct Fields: Hashable { public subscript (_ relation: Relation) -> T { @@ -100,220 +104,195 @@ extension V1.Apps.ById.PromotedPurchases.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum InAppPurchases: Hashable, Codable, RawRepresentable { - case app - case appStoreReviewScreenshot - case availableInAllTerritories - case content - case contentHosting - case familySharable - case iapPriceSchedule - case inAppPurchaseAvailability - case inAppPurchaseLocalizations - case inAppPurchaseType - case name - case pricePoints - case productId - case promotedPurchase - case reviewNote - case state - case unknown(String) - - public var rawValue: String { - switch self { - case .app: return "app" - case .appStoreReviewScreenshot: return "appStoreReviewScreenshot" - case .availableInAllTerritories: return "availableInAllTerritories" - case .content: return "content" - case .contentHosting: return "contentHosting" - case .familySharable: return "familySharable" - case .iapPriceSchedule: return "iapPriceSchedule" - case .inAppPurchaseAvailability: return "inAppPurchaseAvailability" - case .inAppPurchaseLocalizations: return "inAppPurchaseLocalizations" - case .inAppPurchaseType: return "inAppPurchaseType" - case .name: return "name" - case .pricePoints: return "pricePoints" - case .productId: return "productId" - case .promotedPurchase: return "promotedPurchase" - case .reviewNote: return "reviewNote" - case .state: return "state" - case .unknown(let rawValue): return rawValue - } + public struct InAppPurchases: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var appStoreReviewScreenshot: Self { + .init(rawValue: "appStoreReviewScreenshot") } - public init(rawValue: String) { - switch rawValue { - case "app": self = .app - case "appStoreReviewScreenshot": self = .appStoreReviewScreenshot - case "availableInAllTerritories": self = .availableInAllTerritories - case "content": self = .content - case "contentHosting": self = .contentHosting - case "familySharable": self = .familySharable - case "iapPriceSchedule": self = .iapPriceSchedule - case "inAppPurchaseAvailability": self = .inAppPurchaseAvailability - case "inAppPurchaseLocalizations": self = .inAppPurchaseLocalizations - case "inAppPurchaseType": self = .inAppPurchaseType - case "name": self = .name - case "pricePoints": self = .pricePoints - case "productId": self = .productId - case "promotedPurchase": self = .promotedPurchase - case "reviewNote": self = .reviewNote - case "state": self = .state - default: self = .unknown(rawValue) - } + public static var content: Self { + .init(rawValue: "content") + } + + public static var contentHosting: Self { + .init(rawValue: "contentHosting") + } + + public static var familySharable: Self { + .init(rawValue: "familySharable") + } + + public static var iapPriceSchedule: Self { + .init(rawValue: "iapPriceSchedule") + } + + public static var images: Self { + .init(rawValue: "images") } - } - public enum PromotedPurchaseImages: Hashable, Codable, RawRepresentable { - case assetToken - case assetType - case fileName - case fileSize - case imageAsset - case promotedPurchase - case sourceFileChecksum - case state - case uploadOperations - case uploaded - case unknown(String) - - public var rawValue: String { - switch self { - case .assetToken: return "assetToken" - case .assetType: return "assetType" - case .fileName: return "fileName" - case .fileSize: return "fileSize" - case .imageAsset: return "imageAsset" - case .promotedPurchase: return "promotedPurchase" - case .sourceFileChecksum: return "sourceFileChecksum" - case .state: return "state" - case .uploadOperations: return "uploadOperations" - case .uploaded: return "uploaded" - case .unknown(let rawValue): return rawValue - } + public static var inAppPurchaseAvailability: Self { + .init(rawValue: "inAppPurchaseAvailability") } + public static var inAppPurchaseLocalizations: Self { + .init(rawValue: "inAppPurchaseLocalizations") + } + + public static var inAppPurchaseType: Self { + .init(rawValue: "inAppPurchaseType") + } + + public static var name: Self { + .init(rawValue: "name") + } + + public static var pricePoints: Self { + .init(rawValue: "pricePoints") + } + + public static var productId: Self { + .init(rawValue: "productId") + } + + public static var promotedPurchase: Self { + .init(rawValue: "promotedPurchase") + } + + public static var reviewNote: Self { + .init(rawValue: "reviewNote") + } + + public static var state: Self { + .init(rawValue: "state") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "assetToken": self = .assetToken - case "assetType": self = .assetType - case "fileName": self = .fileName - case "fileSize": self = .fileSize - case "imageAsset": self = .imageAsset - case "promotedPurchase": self = .promotedPurchase - case "sourceFileChecksum": self = .sourceFileChecksum - case "state": self = .state - case "uploadOperations": self = .uploadOperations - case "uploaded": self = .uploaded - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum PromotedPurchases: Hashable, Codable, RawRepresentable { - case app - case enabled - case inAppPurchaseV2 - case promotionImages - case state - case subscription - case visibleForAllUsers - case unknown(String) - - public var rawValue: String { - switch self { - case .app: return "app" - case .enabled: return "enabled" - case .inAppPurchaseV2: return "inAppPurchaseV2" - case .promotionImages: return "promotionImages" - case .state: return "state" - case .subscription: return "subscription" - case .visibleForAllUsers: return "visibleForAllUsers" - case .unknown(let rawValue): return rawValue - } + public struct PromotedPurchases: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var enabled: Self { + .init(rawValue: "enabled") + } + + public static var inAppPurchaseV2: Self { + .init(rawValue: "inAppPurchaseV2") + } + + public static var state: Self { + .init(rawValue: "state") + } + + public static var subscription: Self { + .init(rawValue: "subscription") + } + + public static var visibleForAllUsers: Self { + .init(rawValue: "visibleForAllUsers") + } + + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "app": self = .app - case "enabled": self = .enabled - case "inAppPurchaseV2": self = .inAppPurchaseV2 - case "promotionImages": self = .promotionImages - case "state": self = .state - case "subscription": self = .subscription - case "visibleForAllUsers": self = .visibleForAllUsers - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum Subscriptions: Hashable, Codable, RawRepresentable { - case appStoreReviewScreenshot - case availableInAllTerritories - case familySharable - case group - case groupLevel - case introductoryOffers - case name - case offerCodes - case pricePoints - case prices - case productId - case promotedPurchase - case promotionalOffers - case reviewNote - case state - case subscriptionAvailability - case subscriptionLocalizations - case subscriptionPeriod - case unknown(String) - - public var rawValue: String { - switch self { - case .appStoreReviewScreenshot: return "appStoreReviewScreenshot" - case .availableInAllTerritories: return "availableInAllTerritories" - case .familySharable: return "familySharable" - case .group: return "group" - case .groupLevel: return "groupLevel" - case .introductoryOffers: return "introductoryOffers" - case .name: return "name" - case .offerCodes: return "offerCodes" - case .pricePoints: return "pricePoints" - case .prices: return "prices" - case .productId: return "productId" - case .promotedPurchase: return "promotedPurchase" - case .promotionalOffers: return "promotionalOffers" - case .reviewNote: return "reviewNote" - case .state: return "state" - case .subscriptionAvailability: return "subscriptionAvailability" - case .subscriptionLocalizations: return "subscriptionLocalizations" - case .subscriptionPeriod: return "subscriptionPeriod" - case .unknown(let rawValue): return rawValue - } + public struct Subscriptions: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var appStoreReviewScreenshot: Self { + .init(rawValue: "appStoreReviewScreenshot") } + public static var familySharable: Self { + .init(rawValue: "familySharable") + } + + public static var group: Self { + .init(rawValue: "group") + } + + public static var groupLevel: Self { + .init(rawValue: "groupLevel") + } + + public static var images: Self { + .init(rawValue: "images") + } + + public static var introductoryOffers: Self { + .init(rawValue: "introductoryOffers") + } + + public static var name: Self { + .init(rawValue: "name") + } + + public static var offerCodes: Self { + .init(rawValue: "offerCodes") + } + + public static var pricePoints: Self { + .init(rawValue: "pricePoints") + } + + public static var prices: Self { + .init(rawValue: "prices") + } + + public static var productId: Self { + .init(rawValue: "productId") + } + + public static var promotedPurchase: Self { + .init(rawValue: "promotedPurchase") + } + + public static var promotionalOffers: Self { + .init(rawValue: "promotionalOffers") + } + + public static var reviewNote: Self { + .init(rawValue: "reviewNote") + } + + public static var state: Self { + .init(rawValue: "state") + } + + public static var subscriptionAvailability: Self { + .init(rawValue: "subscriptionAvailability") + } + + public static var subscriptionLocalizations: Self { + .init(rawValue: "subscriptionLocalizations") + } + + public static var subscriptionPeriod: Self { + .init(rawValue: "subscriptionPeriod") + } + + public static var winBackOffers: Self { + .init(rawValue: "winBackOffers") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "appStoreReviewScreenshot": self = .appStoreReviewScreenshot - case "availableInAllTerritories": self = .availableInAllTerritories - case "familySharable": self = .familySharable - case "group": self = .group - case "groupLevel": self = .groupLevel - case "introductoryOffers": self = .introductoryOffers - case "name": self = .name - case "offerCodes": self = .offerCodes - case "pricePoints": self = .pricePoints - case "prices": self = .prices - case "productId": self = .productId - case "promotedPurchase": self = .promotedPurchase - case "promotionalOffers": self = .promotionalOffers - case "reviewNote": self = .reviewNote - case "state": self = .state - case "subscriptionAvailability": self = .subscriptionAvailability - case "subscriptionLocalizations": self = .subscriptionLocalizations - case "subscriptionPeriod": self = .subscriptionPeriod - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } @@ -323,11 +302,6 @@ extension V1.Apps.ById.PromotedPurchases.GET { .init(key: "fields[inAppPurchases]") } - /// the fields to include for returned resources of type promotedPurchaseImages - public static var promotedPurchaseImages: Relation<[PromotedPurchaseImages]?> { - .init(key: "fields[promotedPurchaseImages]") - } - /// the fields to include for returned resources of type promotedPurchases public static var promotedPurchases: Relation<[PromotedPurchases]?> { .init(key: "fields[promotedPurchases]") @@ -346,55 +320,23 @@ extension V1.Apps.ById.PromotedPurchases.GET { } } - public enum Include: Hashable, Codable, RawRepresentable { - case inAppPurchaseV2 - case promotionImages - case subscription - case unknown(String) - - public var rawValue: String { - switch self { - case .inAppPurchaseV2: return "inAppPurchaseV2" - case .promotionImages: return "promotionImages" - case .subscription: return "subscription" - case .unknown(let rawValue): return rawValue - } - } - - public init(rawValue: String) { - switch rawValue { - case "inAppPurchaseV2": self = .inAppPurchaseV2 - case "promotionImages": self = .promotionImages - case "subscription": self = .subscription - default: self = .unknown(rawValue) - } + public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var inAppPurchaseV2: Self { + .init(rawValue: "inAppPurchaseV2") } - } - public struct Limit: Hashable { - public subscript () -> Int? { - get { self[Relation(key: "limit")] } - set { self[Relation(key: "limit")] = newValue } + public static var subscription: Self { + .init(rawValue: "subscription") } - public subscript (_ relation: Relation) -> T { - get { values[relation]?.base as! T } - set { values[relation] = AnyHashable(newValue) } + public var description: String { + rawValue } - private var values: [AnyHashable: AnyHashable] = [:] - - public struct Relation: Hashable { - /// maximum number of related promotionImages returned (when they are included) - public static var promotionImages: Relation { - .init(key: "limit[promotionImages]") - } + public var rawValue: String - internal let key: String - - public func hash(into hasher: inout Hasher) { - hasher.combine(key) - } + public init(rawValue: String) { + self.rawValue = rawValue } } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/Relationships/AccessibilityDeclarations/AppsByIdRelationshipsAccessibilityDeclarations.GET.d342b13.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/Relationships/AccessibilityDeclarations/AppsByIdRelationshipsAccessibilityDeclarations.GET.d342b13.generated.swift new file mode 100644 index 00000000..7e47d2ab --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/Relationships/AccessibilityDeclarations/AppsByIdRelationshipsAccessibilityDeclarations.GET.d342b13.generated.swift @@ -0,0 +1,88 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.Apps.ById.Relationships.AccessibilityDeclarations { + public struct GET: Endpoint { + public typealias Response = AppAccessibilityDeclarationsLinkagesResponse + + public var path: String { + "/v1/apps/\(id)/relationships/accessibilityDeclarations" + } + + /// the id of the requested resource + public var id: String + + public var parameters: Parameters = Parameters() + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + components?.queryItems = [ + URLQueryItem(name: "limit", + value: parameters.limit.map { "\($0)" }) + ].filter { $0.value != nil } + if components?.queryItems?.isEmpty ?? false { + components?.queryItems = nil + } + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "GET" + return urlRequest + } + + /// - Returns: **200**, List of related linkages as `AppAccessibilityDeclarationsLinkagesResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(AppAccessibilityDeclarationsLinkagesResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +extension V1.Apps.ById.Relationships.AccessibilityDeclarations.GET { + public struct Parameters: Hashable { + /// maximum resources per page + public var limit: Int? + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/Relationships/AlternativeDistributionKey/AppsByIdRelationshipsAlternativeDistributionKey.GET.5ed9734.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/Relationships/AlternativeDistributionKey/AppsByIdRelationshipsAlternativeDistributionKey.GET.5ed9734.generated.swift new file mode 100644 index 00000000..efd445fa --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/Relationships/AlternativeDistributionKey/AppsByIdRelationshipsAlternativeDistributionKey.GET.5ed9734.generated.swift @@ -0,0 +1,86 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.Apps.ById.Relationships.AlternativeDistributionKey { + public struct GET: Endpoint { + public typealias Response = AppAlternativeDistributionKeyLinkageResponse + + public var path: String { + "/v1/apps/\(id)/relationships/alternativeDistributionKey" + } + + /// the id of the requested resource + public var id: String + + public var parameters: Parameters = Parameters() + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + components?.queryItems = [ + + ].filter { $0.value != nil } + if components?.queryItems?.isEmpty ?? false { + components?.queryItems = nil + } + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "GET" + return urlRequest + } + + /// - Returns: **200**, Related linkage as `AppAlternativeDistributionKeyLinkageResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(AppAlternativeDistributionKeyLinkageResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +extension V1.Apps.ById.Relationships.AlternativeDistributionKey.GET { + public struct Parameters: Hashable { + + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/Relationships/AnalyticsReportRequests/AppsByIdRelationshipsAnalyticsReportRequests.GET.aa7d3d5.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/Relationships/AnalyticsReportRequests/AppsByIdRelationshipsAnalyticsReportRequests.GET.aa7d3d5.generated.swift new file mode 100644 index 00000000..8f10a180 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/Relationships/AnalyticsReportRequests/AppsByIdRelationshipsAnalyticsReportRequests.GET.aa7d3d5.generated.swift @@ -0,0 +1,88 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.Apps.ById.Relationships.AnalyticsReportRequests { + public struct GET: Endpoint { + public typealias Response = AppAnalyticsReportRequestsLinkagesResponse + + public var path: String { + "/v1/apps/\(id)/relationships/analyticsReportRequests" + } + + /// the id of the requested resource + public var id: String + + public var parameters: Parameters = Parameters() + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + components?.queryItems = [ + URLQueryItem(name: "limit", + value: parameters.limit.map { "\($0)" }) + ].filter { $0.value != nil } + if components?.queryItems?.isEmpty ?? false { + components?.queryItems = nil + } + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "GET" + return urlRequest + } + + /// - Returns: **200**, List of related linkages as `AppAnalyticsReportRequestsLinkagesResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(AppAnalyticsReportRequestsLinkagesResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +extension V1.Apps.ById.Relationships.AnalyticsReportRequests.GET { + public struct Parameters: Hashable { + /// maximum resources per page + public var limit: Int? + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/Relationships/AppAvailabilityV2/AppsByIdRelationshipsAppAvailabilityV2.GET.8425a03.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/Relationships/AppAvailabilityV2/AppsByIdRelationshipsAppAvailabilityV2.GET.8425a03.generated.swift new file mode 100644 index 00000000..abfced2c --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/Relationships/AppAvailabilityV2/AppsByIdRelationshipsAppAvailabilityV2.GET.8425a03.generated.swift @@ -0,0 +1,86 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.Apps.ById.Relationships.AppAvailabilityV2 { + public struct GET: Endpoint { + public typealias Response = AppAppAvailabilityV2LinkageResponse + + public var path: String { + "/v1/apps/\(id)/relationships/appAvailabilityV2" + } + + /// the id of the requested resource + public var id: String + + public var parameters: Parameters = Parameters() + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + components?.queryItems = [ + + ].filter { $0.value != nil } + if components?.queryItems?.isEmpty ?? false { + components?.queryItems = nil + } + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "GET" + return urlRequest + } + + /// - Returns: **200**, Related linkage as `AppAppAvailabilityV2LinkageResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(AppAppAvailabilityV2LinkageResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +extension V1.Apps.ById.Relationships.AppAvailabilityV2.GET { + public struct Parameters: Hashable { + + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/Relationships/AppClips/AppsByIdRelationshipsAppClips.GET.c839455.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/Relationships/AppClips/AppsByIdRelationshipsAppClips.GET.c839455.generated.swift new file mode 100644 index 00000000..c0773cda --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/Relationships/AppClips/AppsByIdRelationshipsAppClips.GET.c839455.generated.swift @@ -0,0 +1,88 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.Apps.ById.Relationships.AppClips { + public struct GET: Endpoint { + public typealias Response = AppAppClipsLinkagesResponse + + public var path: String { + "/v1/apps/\(id)/relationships/appClips" + } + + /// the id of the requested resource + public var id: String + + public var parameters: Parameters = Parameters() + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + components?.queryItems = [ + URLQueryItem(name: "limit", + value: parameters.limit.map { "\($0)" }) + ].filter { $0.value != nil } + if components?.queryItems?.isEmpty ?? false { + components?.queryItems = nil + } + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "GET" + return urlRequest + } + + /// - Returns: **200**, List of related linkages as `AppAppClipsLinkagesResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(AppAppClipsLinkagesResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +extension V1.Apps.ById.Relationships.AppClips.GET { + public struct Parameters: Hashable { + /// maximum resources per page + public var limit: Int? + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/Relationships/AppCustomProductPages/AppsByIdRelationshipsAppCustomProductPages.GET.0ca67e7.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/Relationships/AppCustomProductPages/AppsByIdRelationshipsAppCustomProductPages.GET.0ca67e7.generated.swift new file mode 100644 index 00000000..37472523 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/Relationships/AppCustomProductPages/AppsByIdRelationshipsAppCustomProductPages.GET.0ca67e7.generated.swift @@ -0,0 +1,88 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.Apps.ById.Relationships.AppCustomProductPages { + public struct GET: Endpoint { + public typealias Response = AppAppCustomProductPagesLinkagesResponse + + public var path: String { + "/v1/apps/\(id)/relationships/appCustomProductPages" + } + + /// the id of the requested resource + public var id: String + + public var parameters: Parameters = Parameters() + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + components?.queryItems = [ + URLQueryItem(name: "limit", + value: parameters.limit.map { "\($0)" }) + ].filter { $0.value != nil } + if components?.queryItems?.isEmpty ?? false { + components?.queryItems = nil + } + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "GET" + return urlRequest + } + + /// - Returns: **200**, List of related linkages as `AppAppCustomProductPagesLinkagesResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(AppAppCustomProductPagesLinkagesResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +extension V1.Apps.ById.Relationships.AppCustomProductPages.GET { + public struct Parameters: Hashable { + /// maximum resources per page + public var limit: Int? + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/Relationships/AppEncryptionDeclarations/AppsByIdRelationshipsAppEncryptionDeclarations.GET.108f6f5.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/Relationships/AppEncryptionDeclarations/AppsByIdRelationshipsAppEncryptionDeclarations.GET.108f6f5.generated.swift new file mode 100644 index 00000000..2ad50667 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/Relationships/AppEncryptionDeclarations/AppsByIdRelationshipsAppEncryptionDeclarations.GET.108f6f5.generated.swift @@ -0,0 +1,88 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.Apps.ById.Relationships.AppEncryptionDeclarations { + public struct GET: Endpoint { + public typealias Response = AppAppEncryptionDeclarationsLinkagesResponse + + public var path: String { + "/v1/apps/\(id)/relationships/appEncryptionDeclarations" + } + + /// the id of the requested resource + public var id: String + + public var parameters: Parameters = Parameters() + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + components?.queryItems = [ + URLQueryItem(name: "limit", + value: parameters.limit.map { "\($0)" }) + ].filter { $0.value != nil } + if components?.queryItems?.isEmpty ?? false { + components?.queryItems = nil + } + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "GET" + return urlRequest + } + + /// - Returns: **200**, List of related linkages as `AppAppEncryptionDeclarationsLinkagesResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(AppAppEncryptionDeclarationsLinkagesResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +extension V1.Apps.ById.Relationships.AppEncryptionDeclarations.GET { + public struct Parameters: Hashable { + /// maximum resources per page + public var limit: Int? + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/Relationships/AppEvents/AppsByIdRelationshipsAppEvents.GET.7392ea0.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/Relationships/AppEvents/AppsByIdRelationshipsAppEvents.GET.7392ea0.generated.swift new file mode 100644 index 00000000..e7b4afe4 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/Relationships/AppEvents/AppsByIdRelationshipsAppEvents.GET.7392ea0.generated.swift @@ -0,0 +1,88 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.Apps.ById.Relationships.AppEvents { + public struct GET: Endpoint { + public typealias Response = AppAppEventsLinkagesResponse + + public var path: String { + "/v1/apps/\(id)/relationships/appEvents" + } + + /// the id of the requested resource + public var id: String + + public var parameters: Parameters = Parameters() + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + components?.queryItems = [ + URLQueryItem(name: "limit", + value: parameters.limit.map { "\($0)" }) + ].filter { $0.value != nil } + if components?.queryItems?.isEmpty ?? false { + components?.queryItems = nil + } + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "GET" + return urlRequest + } + + /// - Returns: **200**, List of related linkages as `AppAppEventsLinkagesResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(AppAppEventsLinkagesResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +extension V1.Apps.ById.Relationships.AppEvents.GET { + public struct Parameters: Hashable { + /// maximum resources per page + public var limit: Int? + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/Relationships/AppInfos/AppsByIdRelationshipsAppInfos.GET.72825f0.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/Relationships/AppInfos/AppsByIdRelationshipsAppInfos.GET.72825f0.generated.swift new file mode 100644 index 00000000..64345017 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/Relationships/AppInfos/AppsByIdRelationshipsAppInfos.GET.72825f0.generated.swift @@ -0,0 +1,88 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.Apps.ById.Relationships.AppInfos { + public struct GET: Endpoint { + public typealias Response = AppAppInfosLinkagesResponse + + public var path: String { + "/v1/apps/\(id)/relationships/appInfos" + } + + /// the id of the requested resource + public var id: String + + public var parameters: Parameters = Parameters() + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + components?.queryItems = [ + URLQueryItem(name: "limit", + value: parameters.limit.map { "\($0)" }) + ].filter { $0.value != nil } + if components?.queryItems?.isEmpty ?? false { + components?.queryItems = nil + } + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "GET" + return urlRequest + } + + /// - Returns: **200**, List of related linkages as `AppAppInfosLinkagesResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(AppAppInfosLinkagesResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +extension V1.Apps.ById.Relationships.AppInfos.GET { + public struct Parameters: Hashable { + /// maximum resources per page + public var limit: Int? + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/Relationships/AppPricePoints/AppsByIdRelationshipsAppPricePoints.GET.a9b6454.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/Relationships/AppPricePoints/AppsByIdRelationshipsAppPricePoints.GET.a9b6454.generated.swift new file mode 100644 index 00000000..6d0ddcff --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/Relationships/AppPricePoints/AppsByIdRelationshipsAppPricePoints.GET.a9b6454.generated.swift @@ -0,0 +1,88 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.Apps.ById.Relationships.AppPricePoints { + public struct GET: Endpoint { + public typealias Response = AppAppPricePointsLinkagesResponse + + public var path: String { + "/v1/apps/\(id)/relationships/appPricePoints" + } + + /// the id of the requested resource + public var id: String + + public var parameters: Parameters = Parameters() + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + components?.queryItems = [ + URLQueryItem(name: "limit", + value: parameters.limit.map { "\($0)" }) + ].filter { $0.value != nil } + if components?.queryItems?.isEmpty ?? false { + components?.queryItems = nil + } + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "GET" + return urlRequest + } + + /// - Returns: **200**, List of related linkages as `AppAppPricePointsLinkagesResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(AppAppPricePointsLinkagesResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +extension V1.Apps.ById.Relationships.AppPricePoints.GET { + public struct Parameters: Hashable { + /// maximum resources per page + public var limit: Int? + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/Relationships/AppPriceSchedule/AppsByIdRelationshipsAppPriceSchedule.GET.1363afb.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/Relationships/AppPriceSchedule/AppsByIdRelationshipsAppPriceSchedule.GET.1363afb.generated.swift new file mode 100644 index 00000000..5247738b --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/Relationships/AppPriceSchedule/AppsByIdRelationshipsAppPriceSchedule.GET.1363afb.generated.swift @@ -0,0 +1,86 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.Apps.ById.Relationships.AppPriceSchedule { + public struct GET: Endpoint { + public typealias Response = AppAppPriceScheduleLinkageResponse + + public var path: String { + "/v1/apps/\(id)/relationships/appPriceSchedule" + } + + /// the id of the requested resource + public var id: String + + public var parameters: Parameters = Parameters() + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + components?.queryItems = [ + + ].filter { $0.value != nil } + if components?.queryItems?.isEmpty ?? false { + components?.queryItems = nil + } + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "GET" + return urlRequest + } + + /// - Returns: **200**, Related linkage as `AppAppPriceScheduleLinkageResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(AppAppPriceScheduleLinkageResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +extension V1.Apps.ById.Relationships.AppPriceSchedule.GET { + public struct Parameters: Hashable { + + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/Relationships/AppStoreVersionExperimentsV2/AppsByIdRelationshipsAppStoreVersionExperimentsV2.GET.e79927d.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/Relationships/AppStoreVersionExperimentsV2/AppsByIdRelationshipsAppStoreVersionExperimentsV2.GET.e79927d.generated.swift new file mode 100644 index 00000000..a5ba994e --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/Relationships/AppStoreVersionExperimentsV2/AppsByIdRelationshipsAppStoreVersionExperimentsV2.GET.e79927d.generated.swift @@ -0,0 +1,88 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.Apps.ById.Relationships.AppStoreVersionExperimentsV2 { + public struct GET: Endpoint { + public typealias Response = AppAppStoreVersionExperimentsV2LinkagesResponse + + public var path: String { + "/v1/apps/\(id)/relationships/appStoreVersionExperimentsV2" + } + + /// the id of the requested resource + public var id: String + + public var parameters: Parameters = Parameters() + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + components?.queryItems = [ + URLQueryItem(name: "limit", + value: parameters.limit.map { "\($0)" }) + ].filter { $0.value != nil } + if components?.queryItems?.isEmpty ?? false { + components?.queryItems = nil + } + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "GET" + return urlRequest + } + + /// - Returns: **200**, List of related linkages as `AppAppStoreVersionExperimentsV2LinkagesResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(AppAppStoreVersionExperimentsV2LinkagesResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +extension V1.Apps.ById.Relationships.AppStoreVersionExperimentsV2.GET { + public struct Parameters: Hashable { + /// maximum resources per page + public var limit: Int? + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/Relationships/AppStoreVersions/AppsByIdRelationshipsAppStoreVersions.GET.1fab7ec.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/Relationships/AppStoreVersions/AppsByIdRelationshipsAppStoreVersions.GET.1fab7ec.generated.swift new file mode 100644 index 00000000..6c6164e4 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/Relationships/AppStoreVersions/AppsByIdRelationshipsAppStoreVersions.GET.1fab7ec.generated.swift @@ -0,0 +1,88 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.Apps.ById.Relationships.AppStoreVersions { + public struct GET: Endpoint { + public typealias Response = AppAppStoreVersionsLinkagesResponse + + public var path: String { + "/v1/apps/\(id)/relationships/appStoreVersions" + } + + /// the id of the requested resource + public var id: String + + public var parameters: Parameters = Parameters() + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + components?.queryItems = [ + URLQueryItem(name: "limit", + value: parameters.limit.map { "\($0)" }) + ].filter { $0.value != nil } + if components?.queryItems?.isEmpty ?? false { + components?.queryItems = nil + } + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "GET" + return urlRequest + } + + /// - Returns: **200**, List of related linkages as `AppAppStoreVersionsLinkagesResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(AppAppStoreVersionsLinkagesResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +extension V1.Apps.ById.Relationships.AppStoreVersions.GET { + public struct Parameters: Hashable { + /// maximum resources per page + public var limit: Int? + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/Relationships/BackgroundAssets/AppsByIdRelationshipsBackgroundAssets.GET.d7aa9c7.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/Relationships/BackgroundAssets/AppsByIdRelationshipsBackgroundAssets.GET.d7aa9c7.generated.swift new file mode 100644 index 00000000..88a9d454 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/Relationships/BackgroundAssets/AppsByIdRelationshipsBackgroundAssets.GET.d7aa9c7.generated.swift @@ -0,0 +1,88 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.Apps.ById.Relationships.BackgroundAssets { + public struct GET: Endpoint { + public typealias Response = AppBackgroundAssetsLinkagesResponse + + public var path: String { + "/v1/apps/\(id)/relationships/backgroundAssets" + } + + /// the id of the requested resource + public var id: String + + public var parameters: Parameters = Parameters() + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + components?.queryItems = [ + URLQueryItem(name: "limit", + value: parameters.limit.map { "\($0)" }) + ].filter { $0.value != nil } + if components?.queryItems?.isEmpty ?? false { + components?.queryItems = nil + } + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "GET" + return urlRequest + } + + /// - Returns: **200**, List of related linkages as `AppBackgroundAssetsLinkagesResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(AppBackgroundAssetsLinkagesResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +extension V1.Apps.ById.Relationships.BackgroundAssets.GET { + public struct Parameters: Hashable { + /// maximum resources per page + public var limit: Int? + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/Relationships/BetaAppLocalizations/AppsByIdRelationshipsBetaAppLocalizations.GET.75f7850.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/Relationships/BetaAppLocalizations/AppsByIdRelationshipsBetaAppLocalizations.GET.75f7850.generated.swift new file mode 100644 index 00000000..46048a0b --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/Relationships/BetaAppLocalizations/AppsByIdRelationshipsBetaAppLocalizations.GET.75f7850.generated.swift @@ -0,0 +1,88 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.Apps.ById.Relationships.BetaAppLocalizations { + public struct GET: Endpoint { + public typealias Response = AppBetaAppLocalizationsLinkagesResponse + + public var path: String { + "/v1/apps/\(id)/relationships/betaAppLocalizations" + } + + /// the id of the requested resource + public var id: String + + public var parameters: Parameters = Parameters() + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + components?.queryItems = [ + URLQueryItem(name: "limit", + value: parameters.limit.map { "\($0)" }) + ].filter { $0.value != nil } + if components?.queryItems?.isEmpty ?? false { + components?.queryItems = nil + } + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "GET" + return urlRequest + } + + /// - Returns: **200**, List of related linkages as `AppBetaAppLocalizationsLinkagesResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(AppBetaAppLocalizationsLinkagesResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +extension V1.Apps.ById.Relationships.BetaAppLocalizations.GET { + public struct Parameters: Hashable { + /// maximum resources per page + public var limit: Int? + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/Relationships/BetaAppReviewDetail/AppsByIdRelationshipsBetaAppReviewDetail.GET.e5ed9b6.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/Relationships/BetaAppReviewDetail/AppsByIdRelationshipsBetaAppReviewDetail.GET.e5ed9b6.generated.swift new file mode 100644 index 00000000..0cb2c9d4 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/Relationships/BetaAppReviewDetail/AppsByIdRelationshipsBetaAppReviewDetail.GET.e5ed9b6.generated.swift @@ -0,0 +1,86 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.Apps.ById.Relationships.BetaAppReviewDetail { + public struct GET: Endpoint { + public typealias Response = AppBetaAppReviewDetailLinkageResponse + + public var path: String { + "/v1/apps/\(id)/relationships/betaAppReviewDetail" + } + + /// the id of the requested resource + public var id: String + + public var parameters: Parameters = Parameters() + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + components?.queryItems = [ + + ].filter { $0.value != nil } + if components?.queryItems?.isEmpty ?? false { + components?.queryItems = nil + } + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "GET" + return urlRequest + } + + /// - Returns: **200**, Related linkage as `AppBetaAppReviewDetailLinkageResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(AppBetaAppReviewDetailLinkageResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +extension V1.Apps.ById.Relationships.BetaAppReviewDetail.GET { + public struct Parameters: Hashable { + + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/Relationships/BetaFeedbackCrashSubmissions/AppsByIdRelationshipsBetaFeedbackCrashSubmissions.GET.134af14.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/Relationships/BetaFeedbackCrashSubmissions/AppsByIdRelationshipsBetaFeedbackCrashSubmissions.GET.134af14.generated.swift new file mode 100644 index 00000000..224f639a --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/Relationships/BetaFeedbackCrashSubmissions/AppsByIdRelationshipsBetaFeedbackCrashSubmissions.GET.134af14.generated.swift @@ -0,0 +1,88 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.Apps.ById.Relationships.BetaFeedbackCrashSubmissions { + public struct GET: Endpoint { + public typealias Response = AppBetaFeedbackCrashSubmissionsLinkagesResponse + + public var path: String { + "/v1/apps/\(id)/relationships/betaFeedbackCrashSubmissions" + } + + /// the id of the requested resource + public var id: String + + public var parameters: Parameters = Parameters() + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + components?.queryItems = [ + URLQueryItem(name: "limit", + value: parameters.limit.map { "\($0)" }) + ].filter { $0.value != nil } + if components?.queryItems?.isEmpty ?? false { + components?.queryItems = nil + } + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "GET" + return urlRequest + } + + /// - Returns: **200**, List of related linkages as `AppBetaFeedbackCrashSubmissionsLinkagesResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(AppBetaFeedbackCrashSubmissionsLinkagesResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +extension V1.Apps.ById.Relationships.BetaFeedbackCrashSubmissions.GET { + public struct Parameters: Hashable { + /// maximum resources per page + public var limit: Int? + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/Relationships/BetaFeedbackScreenshotSubmissions/AppsByIdRelationshipsBetaFeedbackScreenshotSubmissions.GET.90656f3.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/Relationships/BetaFeedbackScreenshotSubmissions/AppsByIdRelationshipsBetaFeedbackScreenshotSubmissions.GET.90656f3.generated.swift new file mode 100644 index 00000000..ae0cf9f2 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/Relationships/BetaFeedbackScreenshotSubmissions/AppsByIdRelationshipsBetaFeedbackScreenshotSubmissions.GET.90656f3.generated.swift @@ -0,0 +1,88 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.Apps.ById.Relationships.BetaFeedbackScreenshotSubmissions { + public struct GET: Endpoint { + public typealias Response = AppBetaFeedbackScreenshotSubmissionsLinkagesResponse + + public var path: String { + "/v1/apps/\(id)/relationships/betaFeedbackScreenshotSubmissions" + } + + /// the id of the requested resource + public var id: String + + public var parameters: Parameters = Parameters() + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + components?.queryItems = [ + URLQueryItem(name: "limit", + value: parameters.limit.map { "\($0)" }) + ].filter { $0.value != nil } + if components?.queryItems?.isEmpty ?? false { + components?.queryItems = nil + } + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "GET" + return urlRequest + } + + /// - Returns: **200**, List of related linkages as `AppBetaFeedbackScreenshotSubmissionsLinkagesResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(AppBetaFeedbackScreenshotSubmissionsLinkagesResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +extension V1.Apps.ById.Relationships.BetaFeedbackScreenshotSubmissions.GET { + public struct Parameters: Hashable { + /// maximum resources per page + public var limit: Int? + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/Relationships/BetaGroups/AppsByIdRelationshipsBetaGroups.GET.d789466.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/Relationships/BetaGroups/AppsByIdRelationshipsBetaGroups.GET.d789466.generated.swift new file mode 100644 index 00000000..8416278b --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/Relationships/BetaGroups/AppsByIdRelationshipsBetaGroups.GET.d789466.generated.swift @@ -0,0 +1,88 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.Apps.ById.Relationships.BetaGroups { + public struct GET: Endpoint { + public typealias Response = AppBetaGroupsLinkagesResponse + + public var path: String { + "/v1/apps/\(id)/relationships/betaGroups" + } + + /// the id of the requested resource + public var id: String + + public var parameters: Parameters = Parameters() + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + components?.queryItems = [ + URLQueryItem(name: "limit", + value: parameters.limit.map { "\($0)" }) + ].filter { $0.value != nil } + if components?.queryItems?.isEmpty ?? false { + components?.queryItems = nil + } + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "GET" + return urlRequest + } + + /// - Returns: **200**, List of related linkages as `AppBetaGroupsLinkagesResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(AppBetaGroupsLinkagesResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +extension V1.Apps.ById.Relationships.BetaGroups.GET { + public struct Parameters: Hashable { + /// maximum resources per page + public var limit: Int? + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/Relationships/BetaLicenseAgreement/AppsByIdRelationshipsBetaLicenseAgreement.GET.1ff41ab.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/Relationships/BetaLicenseAgreement/AppsByIdRelationshipsBetaLicenseAgreement.GET.1ff41ab.generated.swift new file mode 100644 index 00000000..bcf77ce4 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/Relationships/BetaLicenseAgreement/AppsByIdRelationshipsBetaLicenseAgreement.GET.1ff41ab.generated.swift @@ -0,0 +1,86 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.Apps.ById.Relationships.BetaLicenseAgreement { + public struct GET: Endpoint { + public typealias Response = AppBetaLicenseAgreementLinkageResponse + + public var path: String { + "/v1/apps/\(id)/relationships/betaLicenseAgreement" + } + + /// the id of the requested resource + public var id: String + + public var parameters: Parameters = Parameters() + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + components?.queryItems = [ + + ].filter { $0.value != nil } + if components?.queryItems?.isEmpty ?? false { + components?.queryItems = nil + } + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "GET" + return urlRequest + } + + /// - Returns: **200**, Related linkage as `AppBetaLicenseAgreementLinkageResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(AppBetaLicenseAgreementLinkageResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +extension V1.Apps.ById.Relationships.BetaLicenseAgreement.GET { + public struct Parameters: Hashable { + + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/Relationships/BetaTesters/AppsByIdRelationshipsBetaTesters.DELETE.c177ff4.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/Relationships/BetaTesters/AppsByIdRelationshipsBetaTesters.DELETE.c177ff4.generated.swift index 573730ef..974e583f 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/Relationships/BetaTesters/AppsByIdRelationshipsBetaTesters.DELETE.c177ff4.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/Relationships/BetaTesters/AppsByIdRelationshipsBetaTesters.DELETE.c177ff4.generated.swift @@ -31,11 +31,12 @@ extension V1.Apps.ById.Relationships.BetaTesters { return urlRequest } - /// - Returns: **202**, Accepted for future completion - /// - Returns: **204**, Success (no content) + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **422**, Unprocessable request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -43,11 +44,8 @@ extension V1.Apps.ById.Relationships.BetaTesters { } switch urlResponse.statusCode { - case 202: - return - - case 204: - return + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) @@ -58,6 +56,12 @@ extension V1.Apps.ById.Relationships.BetaTesters { case 409: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 422: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/Relationships/Builds/AppsByIdRelationshipsBuilds.GET.8b2cb78.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/Relationships/Builds/AppsByIdRelationshipsBuilds.GET.8b2cb78.generated.swift new file mode 100644 index 00000000..f9996e63 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/Relationships/Builds/AppsByIdRelationshipsBuilds.GET.8b2cb78.generated.swift @@ -0,0 +1,88 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.Apps.ById.Relationships.Builds { + public struct GET: Endpoint { + public typealias Response = AppBuildsLinkagesResponse + + public var path: String { + "/v1/apps/\(id)/relationships/builds" + } + + /// the id of the requested resource + public var id: String + + public var parameters: Parameters = Parameters() + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + components?.queryItems = [ + URLQueryItem(name: "limit", + value: parameters.limit.map { "\($0)" }) + ].filter { $0.value != nil } + if components?.queryItems?.isEmpty ?? false { + components?.queryItems = nil + } + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "GET" + return urlRequest + } + + /// - Returns: **200**, List of related linkages as `AppBuildsLinkagesResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(AppBuildsLinkagesResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +extension V1.Apps.ById.Relationships.Builds.GET { + public struct Parameters: Hashable { + /// maximum resources per page + public var limit: Int? + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/Relationships/CiProduct/AppsByIdRelationshipsCiProduct.GET.73fede2.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/Relationships/CiProduct/AppsByIdRelationshipsCiProduct.GET.73fede2.generated.swift new file mode 100644 index 00000000..23f0e84c --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/Relationships/CiProduct/AppsByIdRelationshipsCiProduct.GET.73fede2.generated.swift @@ -0,0 +1,86 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.Apps.ById.Relationships.CiProduct { + public struct GET: Endpoint { + public typealias Response = AppCiProductLinkageResponse + + public var path: String { + "/v1/apps/\(id)/relationships/ciProduct" + } + + /// the id of the requested resource + public var id: String + + public var parameters: Parameters = Parameters() + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + components?.queryItems = [ + + ].filter { $0.value != nil } + if components?.queryItems?.isEmpty ?? false { + components?.queryItems = nil + } + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "GET" + return urlRequest + } + + /// - Returns: **200**, Related linkage as `AppCiProductLinkageResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(AppCiProductLinkageResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +extension V1.Apps.ById.Relationships.CiProduct.GET { + public struct Parameters: Hashable { + + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/Relationships/CustomerReviews/AppsByIdRelationshipsCustomerReviews.GET.578d23b.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/Relationships/CustomerReviews/AppsByIdRelationshipsCustomerReviews.GET.578d23b.generated.swift new file mode 100644 index 00000000..c963011a --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/Relationships/CustomerReviews/AppsByIdRelationshipsCustomerReviews.GET.578d23b.generated.swift @@ -0,0 +1,88 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.Apps.ById.Relationships.CustomerReviews { + public struct GET: Endpoint { + public typealias Response = AppCustomerReviewsLinkagesResponse + + public var path: String { + "/v1/apps/\(id)/relationships/customerReviews" + } + + /// the id of the requested resource + public var id: String + + public var parameters: Parameters = Parameters() + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + components?.queryItems = [ + URLQueryItem(name: "limit", + value: parameters.limit.map { "\($0)" }) + ].filter { $0.value != nil } + if components?.queryItems?.isEmpty ?? false { + components?.queryItems = nil + } + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "GET" + return urlRequest + } + + /// - Returns: **200**, List of related linkages as `AppCustomerReviewsLinkagesResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(AppCustomerReviewsLinkagesResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +extension V1.Apps.ById.Relationships.CustomerReviews.GET { + public struct Parameters: Hashable { + /// maximum resources per page + public var limit: Int? + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/Relationships/EndUserLicenseAgreement/AppsByIdRelationshipsEndUserLicenseAgreement.GET.f8d197b.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/Relationships/EndUserLicenseAgreement/AppsByIdRelationshipsEndUserLicenseAgreement.GET.f8d197b.generated.swift new file mode 100644 index 00000000..3cfebaae --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/Relationships/EndUserLicenseAgreement/AppsByIdRelationshipsEndUserLicenseAgreement.GET.f8d197b.generated.swift @@ -0,0 +1,86 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.Apps.ById.Relationships.EndUserLicenseAgreement { + public struct GET: Endpoint { + public typealias Response = AppEndUserLicenseAgreementLinkageResponse + + public var path: String { + "/v1/apps/\(id)/relationships/endUserLicenseAgreement" + } + + /// the id of the requested resource + public var id: String + + public var parameters: Parameters = Parameters() + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + components?.queryItems = [ + + ].filter { $0.value != nil } + if components?.queryItems?.isEmpty ?? false { + components?.queryItems = nil + } + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "GET" + return urlRequest + } + + /// - Returns: **200**, Related linkage as `AppEndUserLicenseAgreementLinkageResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(AppEndUserLicenseAgreementLinkageResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +extension V1.Apps.ById.Relationships.EndUserLicenseAgreement.GET { + public struct Parameters: Hashable { + + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/Relationships/GameCenterDetail/AppsByIdRelationshipsGameCenterDetail.GET.a4aba4b.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/Relationships/GameCenterDetail/AppsByIdRelationshipsGameCenterDetail.GET.a4aba4b.generated.swift new file mode 100644 index 00000000..94bc3d68 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/Relationships/GameCenterDetail/AppsByIdRelationshipsGameCenterDetail.GET.a4aba4b.generated.swift @@ -0,0 +1,86 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.Apps.ById.Relationships.GameCenterDetail { + public struct GET: Endpoint { + public typealias Response = AppGameCenterDetailLinkageResponse + + public var path: String { + "/v1/apps/\(id)/relationships/gameCenterDetail" + } + + /// the id of the requested resource + public var id: String + + public var parameters: Parameters = Parameters() + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + components?.queryItems = [ + + ].filter { $0.value != nil } + if components?.queryItems?.isEmpty ?? false { + components?.queryItems = nil + } + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "GET" + return urlRequest + } + + /// - Returns: **200**, Related linkage as `AppGameCenterDetailLinkageResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(AppGameCenterDetailLinkageResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +extension V1.Apps.ById.Relationships.GameCenterDetail.GET { + public struct Parameters: Hashable { + + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/Relationships/GameCenterEnabledVersions/AppsByIdRelationshipsGameCenterEnabledVersions.GET.2179bd8.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/Relationships/GameCenterEnabledVersions/AppsByIdRelationshipsGameCenterEnabledVersions.GET.2179bd8.generated.swift new file mode 100644 index 00000000..b4ec45e3 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/Relationships/GameCenterEnabledVersions/AppsByIdRelationshipsGameCenterEnabledVersions.GET.2179bd8.generated.swift @@ -0,0 +1,89 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.Apps.ById.Relationships.GameCenterEnabledVersions { + @available(*, deprecated) + public struct GET: Endpoint { + public typealias Response = AppGameCenterEnabledVersionsLinkagesResponse + + public var path: String { + "/v1/apps/\(id)/relationships/gameCenterEnabledVersions" + } + + /// the id of the requested resource + public var id: String + + public var parameters: Parameters = Parameters() + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + components?.queryItems = [ + URLQueryItem(name: "limit", + value: parameters.limit.map { "\($0)" }) + ].filter { $0.value != nil } + if components?.queryItems?.isEmpty ?? false { + components?.queryItems = nil + } + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "GET" + return urlRequest + } + + /// - Returns: **200**, List of related linkages as `AppGameCenterEnabledVersionsLinkagesResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(AppGameCenterEnabledVersionsLinkagesResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +extension V1.Apps.ById.Relationships.GameCenterEnabledVersions.GET { + public struct Parameters: Hashable { + /// maximum resources per page + public var limit: Int? + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/Relationships/InAppPurchases/AppsByIdRelationshipsInAppPurchases.GET.0d73652.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/Relationships/InAppPurchases/AppsByIdRelationshipsInAppPurchases.GET.0d73652.generated.swift new file mode 100644 index 00000000..6b4dac21 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/Relationships/InAppPurchases/AppsByIdRelationshipsInAppPurchases.GET.0d73652.generated.swift @@ -0,0 +1,89 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.Apps.ById.Relationships.InAppPurchases { + @available(*, deprecated) + public struct GET: Endpoint { + public typealias Response = AppInAppPurchasesLinkagesResponse + + public var path: String { + "/v1/apps/\(id)/relationships/inAppPurchases" + } + + /// the id of the requested resource + public var id: String + + public var parameters: Parameters = Parameters() + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + components?.queryItems = [ + URLQueryItem(name: "limit", + value: parameters.limit.map { "\($0)" }) + ].filter { $0.value != nil } + if components?.queryItems?.isEmpty ?? false { + components?.queryItems = nil + } + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "GET" + return urlRequest + } + + /// - Returns: **200**, List of related linkages as `AppInAppPurchasesLinkagesResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(AppInAppPurchasesLinkagesResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +extension V1.Apps.ById.Relationships.InAppPurchases.GET { + public struct Parameters: Hashable { + /// maximum resources per page + public var limit: Int? + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/Relationships/InAppPurchasesV2/AppsByIdRelationshipsInAppPurchasesV2.GET.2dccce1.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/Relationships/InAppPurchasesV2/AppsByIdRelationshipsInAppPurchasesV2.GET.2dccce1.generated.swift new file mode 100644 index 00000000..be686c84 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/Relationships/InAppPurchasesV2/AppsByIdRelationshipsInAppPurchasesV2.GET.2dccce1.generated.swift @@ -0,0 +1,88 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.Apps.ById.Relationships.InAppPurchasesV2 { + public struct GET: Endpoint { + public typealias Response = AppInAppPurchasesV2LinkagesResponse + + public var path: String { + "/v1/apps/\(id)/relationships/inAppPurchasesV2" + } + + /// the id of the requested resource + public var id: String + + public var parameters: Parameters = Parameters() + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + components?.queryItems = [ + URLQueryItem(name: "limit", + value: parameters.limit.map { "\($0)" }) + ].filter { $0.value != nil } + if components?.queryItems?.isEmpty ?? false { + components?.queryItems = nil + } + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "GET" + return urlRequest + } + + /// - Returns: **200**, List of related linkages as `AppInAppPurchasesV2LinkagesResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(AppInAppPurchasesV2LinkagesResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +extension V1.Apps.ById.Relationships.InAppPurchasesV2.GET { + public struct Parameters: Hashable { + /// maximum resources per page + public var limit: Int? + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/Relationships/MarketplaceSearchDetail/AppsByIdRelationshipsMarketplaceSearchDetail.GET.45000c7.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/Relationships/MarketplaceSearchDetail/AppsByIdRelationshipsMarketplaceSearchDetail.GET.45000c7.generated.swift new file mode 100644 index 00000000..8fc0d557 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/Relationships/MarketplaceSearchDetail/AppsByIdRelationshipsMarketplaceSearchDetail.GET.45000c7.generated.swift @@ -0,0 +1,86 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.Apps.ById.Relationships.MarketplaceSearchDetail { + public struct GET: Endpoint { + public typealias Response = AppMarketplaceSearchDetailLinkageResponse + + public var path: String { + "/v1/apps/\(id)/relationships/marketplaceSearchDetail" + } + + /// the id of the requested resource + public var id: String + + public var parameters: Parameters = Parameters() + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + components?.queryItems = [ + + ].filter { $0.value != nil } + if components?.queryItems?.isEmpty ?? false { + components?.queryItems = nil + } + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "GET" + return urlRequest + } + + /// - Returns: **200**, Related linkage as `AppMarketplaceSearchDetailLinkageResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(AppMarketplaceSearchDetailLinkageResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +extension V1.Apps.ById.Relationships.MarketplaceSearchDetail.GET { + public struct Parameters: Hashable { + + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/Relationships/PreReleaseVersions/AppsByIdRelationshipsPreReleaseVersions.GET.66145ba.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/Relationships/PreReleaseVersions/AppsByIdRelationshipsPreReleaseVersions.GET.66145ba.generated.swift new file mode 100644 index 00000000..cca5e1fd --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/Relationships/PreReleaseVersions/AppsByIdRelationshipsPreReleaseVersions.GET.66145ba.generated.swift @@ -0,0 +1,88 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.Apps.ById.Relationships.PreReleaseVersions { + public struct GET: Endpoint { + public typealias Response = AppPreReleaseVersionsLinkagesResponse + + public var path: String { + "/v1/apps/\(id)/relationships/preReleaseVersions" + } + + /// the id of the requested resource + public var id: String + + public var parameters: Parameters = Parameters() + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + components?.queryItems = [ + URLQueryItem(name: "limit", + value: parameters.limit.map { "\($0)" }) + ].filter { $0.value != nil } + if components?.queryItems?.isEmpty ?? false { + components?.queryItems = nil + } + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "GET" + return urlRequest + } + + /// - Returns: **200**, List of related linkages as `AppPreReleaseVersionsLinkagesResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(AppPreReleaseVersionsLinkagesResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +extension V1.Apps.ById.Relationships.PreReleaseVersions.GET { + public struct Parameters: Hashable { + /// maximum resources per page + public var limit: Int? + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/Relationships/PromotedPurchases/AppsByIdRelationshipsPromotedPurchases.GET.8bab01e.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/Relationships/PromotedPurchases/AppsByIdRelationshipsPromotedPurchases.GET.8bab01e.generated.swift index 97367cd3..853d7f37 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/Relationships/PromotedPurchases/AppsByIdRelationshipsPromotedPurchases.GET.8bab01e.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/Relationships/PromotedPurchases/AppsByIdRelationshipsPromotedPurchases.GET.8bab01e.generated.swift @@ -42,8 +42,10 @@ extension V1.Apps.ById.Relationships.PromotedPurchases { /// - Returns: **200**, List of related linkages as `AppPromotedPurchasesLinkagesResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -57,12 +59,18 @@ extension V1.Apps.ById.Relationships.PromotedPurchases { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 404: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/Relationships/PromotedPurchases/AppsByIdRelationshipsPromotedPurchases.PATCH.8bab01e.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/Relationships/PromotedPurchases/AppsByIdRelationshipsPromotedPurchases.PATCH.8bab01e.generated.swift index 36c62ee4..d0631aff 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/Relationships/PromotedPurchases/AppsByIdRelationshipsPromotedPurchases.PATCH.8bab01e.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/Relationships/PromotedPurchases/AppsByIdRelationshipsPromotedPurchases.PATCH.8bab01e.generated.swift @@ -46,10 +46,12 @@ extension V1.Apps.ById.Relationships.PromotedPurchases { return urlRequest } - /// - Returns: **204**, Success (no content) + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **422**, Unprocessable request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -57,8 +59,8 @@ extension V1.Apps.ById.Relationships.PromotedPurchases { } switch urlResponse.statusCode { - case 204: - return + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) @@ -69,6 +71,12 @@ extension V1.Apps.ById.Relationships.PromotedPurchases { case 409: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 422: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/Relationships/ReviewSubmissions/AppsByIdRelationshipsReviewSubmissions.GET.f4edf48.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/Relationships/ReviewSubmissions/AppsByIdRelationshipsReviewSubmissions.GET.f4edf48.generated.swift new file mode 100644 index 00000000..a4765867 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/Relationships/ReviewSubmissions/AppsByIdRelationshipsReviewSubmissions.GET.f4edf48.generated.swift @@ -0,0 +1,88 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.Apps.ById.Relationships.ReviewSubmissions { + public struct GET: Endpoint { + public typealias Response = AppReviewSubmissionsLinkagesResponse + + public var path: String { + "/v1/apps/\(id)/relationships/reviewSubmissions" + } + + /// the id of the requested resource + public var id: String + + public var parameters: Parameters = Parameters() + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + components?.queryItems = [ + URLQueryItem(name: "limit", + value: parameters.limit.map { "\($0)" }) + ].filter { $0.value != nil } + if components?.queryItems?.isEmpty ?? false { + components?.queryItems = nil + } + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "GET" + return urlRequest + } + + /// - Returns: **200**, List of related linkages as `AppReviewSubmissionsLinkagesResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(AppReviewSubmissionsLinkagesResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +extension V1.Apps.ById.Relationships.ReviewSubmissions.GET { + public struct Parameters: Hashable { + /// maximum resources per page + public var limit: Int? + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/Relationships/SubscriptionGracePeriod/AppsByIdRelationshipsSubscriptionGracePeriod.GET.d6f12be.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/Relationships/SubscriptionGracePeriod/AppsByIdRelationshipsSubscriptionGracePeriod.GET.d6f12be.generated.swift new file mode 100644 index 00000000..6e771118 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/Relationships/SubscriptionGracePeriod/AppsByIdRelationshipsSubscriptionGracePeriod.GET.d6f12be.generated.swift @@ -0,0 +1,86 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.Apps.ById.Relationships.SubscriptionGracePeriod { + public struct GET: Endpoint { + public typealias Response = AppSubscriptionGracePeriodLinkageResponse + + public var path: String { + "/v1/apps/\(id)/relationships/subscriptionGracePeriod" + } + + /// the id of the requested resource + public var id: String + + public var parameters: Parameters = Parameters() + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + components?.queryItems = [ + + ].filter { $0.value != nil } + if components?.queryItems?.isEmpty ?? false { + components?.queryItems = nil + } + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "GET" + return urlRequest + } + + /// - Returns: **200**, Related linkage as `AppSubscriptionGracePeriodLinkageResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(AppSubscriptionGracePeriodLinkageResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +extension V1.Apps.ById.Relationships.SubscriptionGracePeriod.GET { + public struct Parameters: Hashable { + + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/Relationships/SubscriptionGroups/AppsByIdRelationshipsSubscriptionGroups.GET.9fc614e.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/Relationships/SubscriptionGroups/AppsByIdRelationshipsSubscriptionGroups.GET.9fc614e.generated.swift new file mode 100644 index 00000000..b75008cc --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/Relationships/SubscriptionGroups/AppsByIdRelationshipsSubscriptionGroups.GET.9fc614e.generated.swift @@ -0,0 +1,88 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.Apps.ById.Relationships.SubscriptionGroups { + public struct GET: Endpoint { + public typealias Response = AppSubscriptionGroupsLinkagesResponse + + public var path: String { + "/v1/apps/\(id)/relationships/subscriptionGroups" + } + + /// the id of the requested resource + public var id: String + + public var parameters: Parameters = Parameters() + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + components?.queryItems = [ + URLQueryItem(name: "limit", + value: parameters.limit.map { "\($0)" }) + ].filter { $0.value != nil } + if components?.queryItems?.isEmpty ?? false { + components?.queryItems = nil + } + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "GET" + return urlRequest + } + + /// - Returns: **200**, List of related linkages as `AppSubscriptionGroupsLinkagesResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(AppSubscriptionGroupsLinkagesResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +extension V1.Apps.ById.Relationships.SubscriptionGroups.GET { + public struct Parameters: Hashable { + /// maximum resources per page + public var limit: Int? + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/Relationships/Webhooks/AppsByIdRelationshipsWebhooks.GET.cbc7253.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/Relationships/Webhooks/AppsByIdRelationshipsWebhooks.GET.cbc7253.generated.swift new file mode 100644 index 00000000..0715a0bc --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/Relationships/Webhooks/AppsByIdRelationshipsWebhooks.GET.cbc7253.generated.swift @@ -0,0 +1,88 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.Apps.ById.Relationships.Webhooks { + public struct GET: Endpoint { + public typealias Response = AppWebhooksLinkagesResponse + + public var path: String { + "/v1/apps/\(id)/relationships/webhooks" + } + + /// the id of the requested resource + public var id: String + + public var parameters: Parameters = Parameters() + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + components?.queryItems = [ + URLQueryItem(name: "limit", + value: parameters.limit.map { "\($0)" }) + ].filter { $0.value != nil } + if components?.queryItems?.isEmpty ?? false { + components?.queryItems = nil + } + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "GET" + return urlRequest + } + + /// - Returns: **200**, List of related linkages as `AppWebhooksLinkagesResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(AppWebhooksLinkagesResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +extension V1.Apps.ById.Relationships.Webhooks.GET { + public struct Parameters: Hashable { + /// maximum resources per page + public var limit: Int? + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/ReviewSubmissions/AppsByIdReviewSubmissions.GET.7dc5c8b.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/ReviewSubmissions/AppsByIdReviewSubmissions.GET.7dc5c8b.generated.swift index 6340dd24..c2e1c790 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/ReviewSubmissions/AppsByIdReviewSubmissions.GET.7dc5c8b.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/ReviewSubmissions/AppsByIdReviewSubmissions.GET.7dc5c8b.generated.swift @@ -60,8 +60,10 @@ extension V1.Apps.ById.ReviewSubmissions { /// - Returns: **200**, List of ReviewSubmissions as `ReviewSubmissionsResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -75,12 +77,18 @@ extension V1.Apps.ById.ReviewSubmissions { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 404: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -108,347 +116,439 @@ extension V1.Apps.ById.ReviewSubmissions.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum Actors: Hashable, Codable, RawRepresentable { - case actorType - case apiKeyId - case userEmail - case userFirstName - case userLastName - case unknown(String) - - public var rawValue: String { - switch self { - case .actorType: return "actorType" - case .apiKeyId: return "apiKeyId" - case .userEmail: return "userEmail" - case .userFirstName: return "userFirstName" - case .userLastName: return "userLastName" - case .unknown(let rawValue): return rawValue - } + public struct Actors: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var actorType: Self { + .init(rawValue: "actorType") + } + + public static var apiKeyId: Self { + .init(rawValue: "apiKeyId") + } + + public static var userEmail: Self { + .init(rawValue: "userEmail") } + public static var userFirstName: Self { + .init(rawValue: "userFirstName") + } + + public static var userLastName: Self { + .init(rawValue: "userLastName") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "actorType": self = .actorType - case "apiKeyId": self = .apiKeyId - case "userEmail": self = .userEmail - case "userFirstName": self = .userFirstName - case "userLastName": self = .userLastName - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum AppStoreVersions: Hashable, Codable, RawRepresentable { - case ageRatingDeclaration - case app - case appClipDefaultExperience - case appStoreReviewDetail - case appStoreState - case appStoreVersionExperiments - case appStoreVersionExperimentsV2 - case appStoreVersionLocalizations - case appStoreVersionPhasedRelease - case appStoreVersionSubmission - case build - case copyright - case createdDate - case customerReviews - case downloadable - case earliestReleaseDate - case platform - case releaseType - case routingAppCoverage - case versionString - case unknown(String) - - public var rawValue: String { - switch self { - case .ageRatingDeclaration: return "ageRatingDeclaration" - case .app: return "app" - case .appClipDefaultExperience: return "appClipDefaultExperience" - case .appStoreReviewDetail: return "appStoreReviewDetail" - case .appStoreState: return "appStoreState" - case .appStoreVersionExperiments: return "appStoreVersionExperiments" - case .appStoreVersionExperimentsV2: return "appStoreVersionExperimentsV2" - case .appStoreVersionLocalizations: return "appStoreVersionLocalizations" - case .appStoreVersionPhasedRelease: return "appStoreVersionPhasedRelease" - case .appStoreVersionSubmission: return "appStoreVersionSubmission" - case .build: return "build" - case .copyright: return "copyright" - case .createdDate: return "createdDate" - case .customerReviews: return "customerReviews" - case .downloadable: return "downloadable" - case .earliestReleaseDate: return "earliestReleaseDate" - case .platform: return "platform" - case .releaseType: return "releaseType" - case .routingAppCoverage: return "routingAppCoverage" - case .versionString: return "versionString" - case .unknown(let rawValue): return rawValue - } + public struct AppStoreVersions: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var ageRatingDeclaration: Self { + .init(rawValue: "ageRatingDeclaration") + } + + public static var alternativeDistributionPackage: Self { + .init(rawValue: "alternativeDistributionPackage") + } + + public static var app: Self { + .init(rawValue: "app") + } + + public static var appClipDefaultExperience: Self { + .init(rawValue: "appClipDefaultExperience") + } + + public static var appStoreReviewDetail: Self { + .init(rawValue: "appStoreReviewDetail") + } + + public static var appStoreState: Self { + .init(rawValue: "appStoreState") + } + + public static var appStoreVersionExperiments: Self { + .init(rawValue: "appStoreVersionExperiments") + } + + public static var appStoreVersionExperimentsV2: Self { + .init(rawValue: "appStoreVersionExperimentsV2") + } + + public static var appStoreVersionLocalizations: Self { + .init(rawValue: "appStoreVersionLocalizations") + } + + public static var appStoreVersionPhasedRelease: Self { + .init(rawValue: "appStoreVersionPhasedRelease") + } + + public static var appStoreVersionSubmission: Self { + .init(rawValue: "appStoreVersionSubmission") + } + + public static var appVersionState: Self { + .init(rawValue: "appVersionState") + } + + public static var build: Self { + .init(rawValue: "build") + } + + public static var copyright: Self { + .init(rawValue: "copyright") + } + + public static var createdDate: Self { + .init(rawValue: "createdDate") + } + + public static var customerReviews: Self { + .init(rawValue: "customerReviews") + } + + public static var downloadable: Self { + .init(rawValue: "downloadable") + } + + public static var earliestReleaseDate: Self { + .init(rawValue: "earliestReleaseDate") + } + + public static var gameCenterAppVersion: Self { + .init(rawValue: "gameCenterAppVersion") + } + + public static var platform: Self { + .init(rawValue: "platform") + } + + public static var releaseType: Self { + .init(rawValue: "releaseType") + } + + public static var reviewType: Self { + .init(rawValue: "reviewType") + } + + public static var routingAppCoverage: Self { + .init(rawValue: "routingAppCoverage") } + public static var usesIdfa: Self { + .init(rawValue: "usesIdfa") + } + + public static var versionString: Self { + .init(rawValue: "versionString") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "ageRatingDeclaration": self = .ageRatingDeclaration - case "app": self = .app - case "appClipDefaultExperience": self = .appClipDefaultExperience - case "appStoreReviewDetail": self = .appStoreReviewDetail - case "appStoreState": self = .appStoreState - case "appStoreVersionExperiments": self = .appStoreVersionExperiments - case "appStoreVersionExperimentsV2": self = .appStoreVersionExperimentsV2 - case "appStoreVersionLocalizations": self = .appStoreVersionLocalizations - case "appStoreVersionPhasedRelease": self = .appStoreVersionPhasedRelease - case "appStoreVersionSubmission": self = .appStoreVersionSubmission - case "build": self = .build - case "copyright": self = .copyright - case "createdDate": self = .createdDate - case "customerReviews": self = .customerReviews - case "downloadable": self = .downloadable - case "earliestReleaseDate": self = .earliestReleaseDate - case "platform": self = .platform - case "releaseType": self = .releaseType - case "routingAppCoverage": self = .routingAppCoverage - case "versionString": self = .versionString - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum Apps: Hashable, Codable, RawRepresentable { - case appAvailability - case appClips - case appCustomProductPages - case appEncryptionDeclarations - case appEvents - case appInfos - case appPricePoints - case appPriceSchedule - case appStoreVersionExperimentsV2 - case appStoreVersions - case availableInNewTerritories - case availableTerritories - case betaAppLocalizations - case betaAppReviewDetail - case betaGroups - case betaLicenseAgreement - case betaTesters - case builds - case bundleId - case ciProduct - case contentRightsDeclaration - case customerReviews - case endUserLicenseAgreement - case gameCenterDetail - case gameCenterEnabledVersions - case inAppPurchases - case inAppPurchasesV2 - case isOrEverWasMadeForKids - case name - case perfPowerMetrics - case preOrder - case preReleaseVersions - case pricePoints - case prices - case primaryLocale - case promotedPurchases - case reviewSubmissions - case sku - case subscriptionGracePeriod - case subscriptionGroups - case subscriptionStatusUrl - case subscriptionStatusUrlForSandbox - case subscriptionStatusUrlVersion - case subscriptionStatusUrlVersionForSandbox - case unknown(String) - - public var rawValue: String { - switch self { - case .appAvailability: return "appAvailability" - case .appClips: return "appClips" - case .appCustomProductPages: return "appCustomProductPages" - case .appEncryptionDeclarations: return "appEncryptionDeclarations" - case .appEvents: return "appEvents" - case .appInfos: return "appInfos" - case .appPricePoints: return "appPricePoints" - case .appPriceSchedule: return "appPriceSchedule" - case .appStoreVersionExperimentsV2: return "appStoreVersionExperimentsV2" - case .appStoreVersions: return "appStoreVersions" - case .availableInNewTerritories: return "availableInNewTerritories" - case .availableTerritories: return "availableTerritories" - case .betaAppLocalizations: return "betaAppLocalizations" - case .betaAppReviewDetail: return "betaAppReviewDetail" - case .betaGroups: return "betaGroups" - case .betaLicenseAgreement: return "betaLicenseAgreement" - case .betaTesters: return "betaTesters" - case .builds: return "builds" - case .bundleId: return "bundleId" - case .ciProduct: return "ciProduct" - case .contentRightsDeclaration: return "contentRightsDeclaration" - case .customerReviews: return "customerReviews" - case .endUserLicenseAgreement: return "endUserLicenseAgreement" - case .gameCenterDetail: return "gameCenterDetail" - case .gameCenterEnabledVersions: return "gameCenterEnabledVersions" - case .inAppPurchases: return "inAppPurchases" - case .inAppPurchasesV2: return "inAppPurchasesV2" - case .isOrEverWasMadeForKids: return "isOrEverWasMadeForKids" - case .name: return "name" - case .perfPowerMetrics: return "perfPowerMetrics" - case .preOrder: return "preOrder" - case .preReleaseVersions: return "preReleaseVersions" - case .pricePoints: return "pricePoints" - case .prices: return "prices" - case .primaryLocale: return "primaryLocale" - case .promotedPurchases: return "promotedPurchases" - case .reviewSubmissions: return "reviewSubmissions" - case .sku: return "sku" - case .subscriptionGracePeriod: return "subscriptionGracePeriod" - case .subscriptionGroups: return "subscriptionGroups" - case .subscriptionStatusUrl: return "subscriptionStatusUrl" - case .subscriptionStatusUrlForSandbox: return "subscriptionStatusUrlForSandbox" - case .subscriptionStatusUrlVersion: return "subscriptionStatusUrlVersion" - case .subscriptionStatusUrlVersionForSandbox: return "subscriptionStatusUrlVersionForSandbox" - case .unknown(let rawValue): return rawValue - } + public struct Apps: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var accessibilityDeclarations: Self { + .init(rawValue: "accessibilityDeclarations") + } + + public static var accessibilityUrl: Self { + .init(rawValue: "accessibilityUrl") + } + + public static var alternativeDistributionKey: Self { + .init(rawValue: "alternativeDistributionKey") + } + + public static var analyticsReportRequests: Self { + .init(rawValue: "analyticsReportRequests") + } + + public static var appAvailabilityV2: Self { + .init(rawValue: "appAvailabilityV2") + } + + public static var appClips: Self { + .init(rawValue: "appClips") + } + + public static var appCustomProductPages: Self { + .init(rawValue: "appCustomProductPages") + } + + public static var appEncryptionDeclarations: Self { + .init(rawValue: "appEncryptionDeclarations") + } + + public static var appEvents: Self { + .init(rawValue: "appEvents") + } + + public static var appInfos: Self { + .init(rawValue: "appInfos") + } + + public static var appPricePoints: Self { + .init(rawValue: "appPricePoints") + } + + public static var appPriceSchedule: Self { + .init(rawValue: "appPriceSchedule") } + public static var appStoreVersionExperimentsV2: Self { + .init(rawValue: "appStoreVersionExperimentsV2") + } + + public static var appStoreVersions: Self { + .init(rawValue: "appStoreVersions") + } + + public static var backgroundAssets: Self { + .init(rawValue: "backgroundAssets") + } + + public static var betaAppLocalizations: Self { + .init(rawValue: "betaAppLocalizations") + } + + public static var betaAppReviewDetail: Self { + .init(rawValue: "betaAppReviewDetail") + } + + public static var betaFeedbackCrashSubmissions: Self { + .init(rawValue: "betaFeedbackCrashSubmissions") + } + + public static var betaFeedbackScreenshotSubmissions: Self { + .init(rawValue: "betaFeedbackScreenshotSubmissions") + } + + public static var betaGroups: Self { + .init(rawValue: "betaGroups") + } + + public static var betaLicenseAgreement: Self { + .init(rawValue: "betaLicenseAgreement") + } + + public static var betaTesters: Self { + .init(rawValue: "betaTesters") + } + + public static var builds: Self { + .init(rawValue: "builds") + } + + public static var bundleId: Self { + .init(rawValue: "bundleId") + } + + public static var ciProduct: Self { + .init(rawValue: "ciProduct") + } + + public static var contentRightsDeclaration: Self { + .init(rawValue: "contentRightsDeclaration") + } + + public static var customerReviewSummarizations: Self { + .init(rawValue: "customerReviewSummarizations") + } + + public static var customerReviews: Self { + .init(rawValue: "customerReviews") + } + + public static var endUserLicenseAgreement: Self { + .init(rawValue: "endUserLicenseAgreement") + } + + public static var gameCenterDetail: Self { + .init(rawValue: "gameCenterDetail") + } + + public static var gameCenterEnabledVersions: Self { + .init(rawValue: "gameCenterEnabledVersions") + } + + public static var inAppPurchases: Self { + .init(rawValue: "inAppPurchases") + } + + public static var inAppPurchasesV2: Self { + .init(rawValue: "inAppPurchasesV2") + } + + public static var isOrEverWasMadeForKids: Self { + .init(rawValue: "isOrEverWasMadeForKids") + } + + public static var marketplaceSearchDetail: Self { + .init(rawValue: "marketplaceSearchDetail") + } + + public static var name: Self { + .init(rawValue: "name") + } + + public static var perfPowerMetrics: Self { + .init(rawValue: "perfPowerMetrics") + } + + public static var preReleaseVersions: Self { + .init(rawValue: "preReleaseVersions") + } + + public static var primaryLocale: Self { + .init(rawValue: "primaryLocale") + } + + public static var promotedPurchases: Self { + .init(rawValue: "promotedPurchases") + } + + public static var reviewSubmissions: Self { + .init(rawValue: "reviewSubmissions") + } + + public static var sku: Self { + .init(rawValue: "sku") + } + + public static var streamlinedPurchasingEnabled: Self { + .init(rawValue: "streamlinedPurchasingEnabled") + } + + public static var subscriptionGracePeriod: Self { + .init(rawValue: "subscriptionGracePeriod") + } + + public static var subscriptionGroups: Self { + .init(rawValue: "subscriptionGroups") + } + + public static var subscriptionStatusUrl: Self { + .init(rawValue: "subscriptionStatusUrl") + } + + public static var subscriptionStatusUrlForSandbox: Self { + .init(rawValue: "subscriptionStatusUrlForSandbox") + } + + public static var subscriptionStatusUrlVersion: Self { + .init(rawValue: "subscriptionStatusUrlVersion") + } + + public static var subscriptionStatusUrlVersionForSandbox: Self { + .init(rawValue: "subscriptionStatusUrlVersionForSandbox") + } + + public static var webhooks: Self { + .init(rawValue: "webhooks") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "appAvailability": self = .appAvailability - case "appClips": self = .appClips - case "appCustomProductPages": self = .appCustomProductPages - case "appEncryptionDeclarations": self = .appEncryptionDeclarations - case "appEvents": self = .appEvents - case "appInfos": self = .appInfos - case "appPricePoints": self = .appPricePoints - case "appPriceSchedule": self = .appPriceSchedule - case "appStoreVersionExperimentsV2": self = .appStoreVersionExperimentsV2 - case "appStoreVersions": self = .appStoreVersions - case "availableInNewTerritories": self = .availableInNewTerritories - case "availableTerritories": self = .availableTerritories - case "betaAppLocalizations": self = .betaAppLocalizations - case "betaAppReviewDetail": self = .betaAppReviewDetail - case "betaGroups": self = .betaGroups - case "betaLicenseAgreement": self = .betaLicenseAgreement - case "betaTesters": self = .betaTesters - case "builds": self = .builds - case "bundleId": self = .bundleId - case "ciProduct": self = .ciProduct - case "contentRightsDeclaration": self = .contentRightsDeclaration - case "customerReviews": self = .customerReviews - case "endUserLicenseAgreement": self = .endUserLicenseAgreement - case "gameCenterDetail": self = .gameCenterDetail - case "gameCenterEnabledVersions": self = .gameCenterEnabledVersions - case "inAppPurchases": self = .inAppPurchases - case "inAppPurchasesV2": self = .inAppPurchasesV2 - case "isOrEverWasMadeForKids": self = .isOrEverWasMadeForKids - case "name": self = .name - case "perfPowerMetrics": self = .perfPowerMetrics - case "preOrder": self = .preOrder - case "preReleaseVersions": self = .preReleaseVersions - case "pricePoints": self = .pricePoints - case "prices": self = .prices - case "primaryLocale": self = .primaryLocale - case "promotedPurchases": self = .promotedPurchases - case "reviewSubmissions": self = .reviewSubmissions - case "sku": self = .sku - case "subscriptionGracePeriod": self = .subscriptionGracePeriod - case "subscriptionGroups": self = .subscriptionGroups - case "subscriptionStatusUrl": self = .subscriptionStatusUrl - case "subscriptionStatusUrlForSandbox": self = .subscriptionStatusUrlForSandbox - case "subscriptionStatusUrlVersion": self = .subscriptionStatusUrlVersion - case "subscriptionStatusUrlVersionForSandbox": self = .subscriptionStatusUrlVersionForSandbox - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum ReviewSubmissionItems: Hashable, Codable, RawRepresentable { - case appCustomProductPageVersion - case appEvent - case appStoreVersion - case appStoreVersionExperiment - case appStoreVersionExperimentV2 - case removed - case resolved - case reviewSubmission - case state - case unknown(String) - - public var rawValue: String { - switch self { - case .appCustomProductPageVersion: return "appCustomProductPageVersion" - case .appEvent: return "appEvent" - case .appStoreVersion: return "appStoreVersion" - case .appStoreVersionExperiment: return "appStoreVersionExperiment" - case .appStoreVersionExperimentV2: return "appStoreVersionExperimentV2" - case .removed: return "removed" - case .resolved: return "resolved" - case .reviewSubmission: return "reviewSubmission" - case .state: return "state" - case .unknown(let rawValue): return rawValue - } + public struct ReviewSubmissionItems: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var appCustomProductPageVersion: Self { + .init(rawValue: "appCustomProductPageVersion") + } + + public static var appEvent: Self { + .init(rawValue: "appEvent") + } + + public static var appStoreVersion: Self { + .init(rawValue: "appStoreVersion") + } + + public static var appStoreVersionExperiment: Self { + .init(rawValue: "appStoreVersionExperiment") + } + + public static var appStoreVersionExperimentV2: Self { + .init(rawValue: "appStoreVersionExperimentV2") } + public static var state: Self { + .init(rawValue: "state") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "appCustomProductPageVersion": self = .appCustomProductPageVersion - case "appEvent": self = .appEvent - case "appStoreVersion": self = .appStoreVersion - case "appStoreVersionExperiment": self = .appStoreVersionExperiment - case "appStoreVersionExperimentV2": self = .appStoreVersionExperimentV2 - case "removed": self = .removed - case "resolved": self = .resolved - case "reviewSubmission": self = .reviewSubmission - case "state": self = .state - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum ReviewSubmissions: Hashable, Codable, RawRepresentable { - case app - case appStoreVersionForReview - case canceled - case items - case lastUpdatedByActor - case platform - case state - case submitted - case submittedByActor - case submittedDate - case unknown(String) - - public var rawValue: String { - switch self { - case .app: return "app" - case .appStoreVersionForReview: return "appStoreVersionForReview" - case .canceled: return "canceled" - case .items: return "items" - case .lastUpdatedByActor: return "lastUpdatedByActor" - case .platform: return "platform" - case .state: return "state" - case .submitted: return "submitted" - case .submittedByActor: return "submittedByActor" - case .submittedDate: return "submittedDate" - case .unknown(let rawValue): return rawValue - } + public struct ReviewSubmissions: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var app: Self { + .init(rawValue: "app") + } + + public static var appStoreVersionForReview: Self { + .init(rawValue: "appStoreVersionForReview") + } + + public static var items: Self { + .init(rawValue: "items") + } + + public static var lastUpdatedByActor: Self { + .init(rawValue: "lastUpdatedByActor") + } + + public static var platform: Self { + .init(rawValue: "platform") + } + + public static var state: Self { + .init(rawValue: "state") } + public static var submittedByActor: Self { + .init(rawValue: "submittedByActor") + } + + public static var submittedDate: Self { + .init(rawValue: "submittedDate") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "app": self = .app - case "appStoreVersionForReview": self = .appStoreVersionForReview - case "canceled": self = .canceled - case "items": self = .items - case "lastUpdatedByActor": self = .lastUpdatedByActor - case "platform": self = .platform - case "state": self = .state - case "submitted": self = .submitted - case "submittedByActor": self = .submittedByActor - case "submittedDate": self = .submittedDate - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } @@ -494,65 +594,71 @@ extension V1.Apps.ById.ReviewSubmissions.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum Platform: Hashable, Codable, RawRepresentable { - case iOS - case macOS - case tvOS - case unknown(String) + public struct Platform: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var iOS: Self { + .init(rawValue: "IOS") + } + + public static var macOS: Self { + .init(rawValue: "MAC_OS") + } + + public static var tvOS: Self { + .init(rawValue: "TV_OS") + } + + public static var visionOS: Self { + .init(rawValue: "VISION_OS") + } - public var rawValue: String { - switch self { - case .iOS: return "IOS" - case .macOS: return "MAC_OS" - case .tvOS: return "TV_OS" - case .unknown(let rawValue): return rawValue - } + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "IOS": self = .iOS - case "MAC_OS": self = .macOS - case "TV_OS": self = .tvOS - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum State: Hashable, Codable, RawRepresentable { - case canceling - case complete - case completing - case inReview - case readyForReview - case unresolvedIssues - case waitingForReview - case unknown(String) - - public var rawValue: String { - switch self { - case .canceling: return "CANCELING" - case .complete: return "COMPLETE" - case .completing: return "COMPLETING" - case .inReview: return "IN_REVIEW" - case .readyForReview: return "READY_FOR_REVIEW" - case .unresolvedIssues: return "UNRESOLVED_ISSUES" - case .waitingForReview: return "WAITING_FOR_REVIEW" - case .unknown(let rawValue): return rawValue - } + public struct State: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var canceling: Self { + .init(rawValue: "CANCELING") + } + + public static var complete: Self { + .init(rawValue: "COMPLETE") + } + + public static var completing: Self { + .init(rawValue: "COMPLETING") + } + + public static var inReview: Self { + .init(rawValue: "IN_REVIEW") + } + + public static var readyForReview: Self { + .init(rawValue: "READY_FOR_REVIEW") + } + + public static var unresolvedIssues: Self { + .init(rawValue: "UNRESOLVED_ISSUES") + } + + public static var waitingForReview: Self { + .init(rawValue: "WAITING_FOR_REVIEW") + } + + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "CANCELING": self = .canceling - case "COMPLETE": self = .complete - case "COMPLETING": self = .completing - case "IN_REVIEW": self = .inReview - case "READY_FOR_REVIEW": self = .readyForReview - case "UNRESOLVED_ISSUES": self = .unresolvedIssues - case "WAITING_FOR_REVIEW": self = .waitingForReview - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } @@ -575,34 +681,35 @@ extension V1.Apps.ById.ReviewSubmissions.GET { } } - public enum Include: Hashable, Codable, RawRepresentable { - case app - case appStoreVersionForReview - case items - case lastUpdatedByActor - case submittedByActor - case unknown(String) - - public var rawValue: String { - switch self { - case .app: return "app" - case .appStoreVersionForReview: return "appStoreVersionForReview" - case .items: return "items" - case .lastUpdatedByActor: return "lastUpdatedByActor" - case .submittedByActor: return "submittedByActor" - case .unknown(let rawValue): return rawValue - } + public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var app: Self { + .init(rawValue: "app") + } + + public static var appStoreVersionForReview: Self { + .init(rawValue: "appStoreVersionForReview") + } + + public static var items: Self { + .init(rawValue: "items") + } + + public static var lastUpdatedByActor: Self { + .init(rawValue: "lastUpdatedByActor") + } + + public static var submittedByActor: Self { + .init(rawValue: "submittedByActor") } + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "app": self = .app - case "appStoreVersionForReview": self = .appStoreVersionForReview - case "items": self = .items - case "lastUpdatedByActor": self = .lastUpdatedByActor - case "submittedByActor": self = .submittedByActor - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/SubscriptionGracePeriod/AppsByIdSubscriptionGracePeriod.GET.4b68811.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/SubscriptionGracePeriod/AppsByIdSubscriptionGracePeriod.GET.4b68811.generated.swift index 7339df3f..c49aa1a3 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/SubscriptionGracePeriod/AppsByIdSubscriptionGracePeriod.GET.4b68811.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/SubscriptionGracePeriod/AppsByIdSubscriptionGracePeriod.GET.4b68811.generated.swift @@ -42,8 +42,10 @@ extension V1.Apps.ById.SubscriptionGracePeriod { /// - Returns: **200**, Single SubscriptionGracePeriod as `SubscriptionGracePeriodResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -57,12 +59,18 @@ extension V1.Apps.ById.SubscriptionGracePeriod { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 404: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -82,31 +90,31 @@ extension V1.Apps.ById.SubscriptionGracePeriod.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum SubscriptionGracePeriods: Hashable, Codable, RawRepresentable { - case duration - case optIn - case renewalType - case sandboxOptIn - case unknown(String) - - public var rawValue: String { - switch self { - case .duration: return "duration" - case .optIn: return "optIn" - case .renewalType: return "renewalType" - case .sandboxOptIn: return "sandboxOptIn" - case .unknown(let rawValue): return rawValue - } + public struct SubscriptionGracePeriods: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var duration: Self { + .init(rawValue: "duration") } + public static var optIn: Self { + .init(rawValue: "optIn") + } + + public static var renewalType: Self { + .init(rawValue: "renewalType") + } + + public static var sandboxOptIn: Self { + .init(rawValue: "sandboxOptIn") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "duration": self = .duration - case "optIn": self = .optIn - case "renewalType": self = .renewalType - case "sandboxOptIn": self = .sandboxOptIn - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/SubscriptionGroups/AppsByIdSubscriptionGroups.GET.3586939.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/SubscriptionGroups/AppsByIdSubscriptionGroups.GET.3586939.generated.swift index d7e58ef2..ea140325 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/SubscriptionGroups/AppsByIdSubscriptionGroups.GET.3586939.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/SubscriptionGroups/AppsByIdSubscriptionGroups.GET.3586939.generated.swift @@ -60,8 +60,10 @@ extension V1.Apps.ById.SubscriptionGroups { /// - Returns: **200**, List of SubscriptionGroups as `SubscriptionGroupsResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -75,12 +77,18 @@ extension V1.Apps.ById.SubscriptionGroups { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 404: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -111,132 +119,147 @@ extension V1.Apps.ById.SubscriptionGroups.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum SubscriptionGroupLocalizations: Hashable, Codable, RawRepresentable { - case customAppName - case locale - case name - case state - case subscriptionGroup - case unknown(String) - - public var rawValue: String { - switch self { - case .customAppName: return "customAppName" - case .locale: return "locale" - case .name: return "name" - case .state: return "state" - case .subscriptionGroup: return "subscriptionGroup" - case .unknown(let rawValue): return rawValue - } + public struct SubscriptionGroupLocalizations: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var customAppName: Self { + .init(rawValue: "customAppName") + } + + public static var locale: Self { + .init(rawValue: "locale") + } + + public static var name: Self { + .init(rawValue: "name") + } + + public static var state: Self { + .init(rawValue: "state") + } + + public static var subscriptionGroup: Self { + .init(rawValue: "subscriptionGroup") } + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "customAppName": self = .customAppName - case "locale": self = .locale - case "name": self = .name - case "state": self = .state - case "subscriptionGroup": self = .subscriptionGroup - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum SubscriptionGroups: Hashable, Codable, RawRepresentable { - case app - case referenceName - case subscriptionGroupLocalizations - case subscriptions - case unknown(String) + public struct SubscriptionGroups: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var referenceName: Self { + .init(rawValue: "referenceName") + } + + public static var subscriptionGroupLocalizations: Self { + .init(rawValue: "subscriptionGroupLocalizations") + } + + public static var subscriptions: Self { + .init(rawValue: "subscriptions") + } - public var rawValue: String { - switch self { - case .app: return "app" - case .referenceName: return "referenceName" - case .subscriptionGroupLocalizations: return "subscriptionGroupLocalizations" - case .subscriptions: return "subscriptions" - case .unknown(let rawValue): return rawValue - } + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "app": self = .app - case "referenceName": self = .referenceName - case "subscriptionGroupLocalizations": self = .subscriptionGroupLocalizations - case "subscriptions": self = .subscriptions - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum Subscriptions: Hashable, Codable, RawRepresentable { - case appStoreReviewScreenshot - case availableInAllTerritories - case familySharable - case group - case groupLevel - case introductoryOffers - case name - case offerCodes - case pricePoints - case prices - case productId - case promotedPurchase - case promotionalOffers - case reviewNote - case state - case subscriptionAvailability - case subscriptionLocalizations - case subscriptionPeriod - case unknown(String) - - public var rawValue: String { - switch self { - case .appStoreReviewScreenshot: return "appStoreReviewScreenshot" - case .availableInAllTerritories: return "availableInAllTerritories" - case .familySharable: return "familySharable" - case .group: return "group" - case .groupLevel: return "groupLevel" - case .introductoryOffers: return "introductoryOffers" - case .name: return "name" - case .offerCodes: return "offerCodes" - case .pricePoints: return "pricePoints" - case .prices: return "prices" - case .productId: return "productId" - case .promotedPurchase: return "promotedPurchase" - case .promotionalOffers: return "promotionalOffers" - case .reviewNote: return "reviewNote" - case .state: return "state" - case .subscriptionAvailability: return "subscriptionAvailability" - case .subscriptionLocalizations: return "subscriptionLocalizations" - case .subscriptionPeriod: return "subscriptionPeriod" - case .unknown(let rawValue): return rawValue - } + public struct Subscriptions: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var appStoreReviewScreenshot: Self { + .init(rawValue: "appStoreReviewScreenshot") + } + + public static var familySharable: Self { + .init(rawValue: "familySharable") + } + + public static var group: Self { + .init(rawValue: "group") + } + + public static var groupLevel: Self { + .init(rawValue: "groupLevel") + } + + public static var images: Self { + .init(rawValue: "images") + } + + public static var introductoryOffers: Self { + .init(rawValue: "introductoryOffers") + } + + public static var name: Self { + .init(rawValue: "name") + } + + public static var offerCodes: Self { + .init(rawValue: "offerCodes") + } + + public static var pricePoints: Self { + .init(rawValue: "pricePoints") + } + + public static var prices: Self { + .init(rawValue: "prices") + } + + public static var productId: Self { + .init(rawValue: "productId") + } + + public static var promotedPurchase: Self { + .init(rawValue: "promotedPurchase") + } + + public static var promotionalOffers: Self { + .init(rawValue: "promotionalOffers") + } + + public static var reviewNote: Self { + .init(rawValue: "reviewNote") } + public static var state: Self { + .init(rawValue: "state") + } + + public static var subscriptionAvailability: Self { + .init(rawValue: "subscriptionAvailability") + } + + public static var subscriptionLocalizations: Self { + .init(rawValue: "subscriptionLocalizations") + } + + public static var subscriptionPeriod: Self { + .init(rawValue: "subscriptionPeriod") + } + + public static var winBackOffers: Self { + .init(rawValue: "winBackOffers") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "appStoreReviewScreenshot": self = .appStoreReviewScreenshot - case "availableInAllTerritories": self = .availableInAllTerritories - case "familySharable": self = .familySharable - case "group": self = .group - case "groupLevel": self = .groupLevel - case "introductoryOffers": self = .introductoryOffers - case "name": self = .name - case "offerCodes": self = .offerCodes - case "pricePoints": self = .pricePoints - case "prices": self = .prices - case "productId": self = .productId - case "promotedPurchase": self = .promotedPurchase - case "promotionalOffers": self = .promotionalOffers - case "reviewNote": self = .reviewNote - case "state": self = .state - case "subscriptionAvailability": self = .subscriptionAvailability - case "subscriptionLocalizations": self = .subscriptionLocalizations - case "subscriptionPeriod": self = .subscriptionPeriod - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } @@ -272,49 +295,55 @@ extension V1.Apps.ById.SubscriptionGroups.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum SubscriptionsState: Hashable, Codable, RawRepresentable { - case approved - case developerActionNeeded - case developerRemovedFromSale - case inReview - case missingMetadata - case pendingBinaryApproval - case readyToSubmit - case rejected - case removedFromSale - case waitingForReview - case unknown(String) - - public var rawValue: String { - switch self { - case .approved: return "APPROVED" - case .developerActionNeeded: return "DEVELOPER_ACTION_NEEDED" - case .developerRemovedFromSale: return "DEVELOPER_REMOVED_FROM_SALE" - case .inReview: return "IN_REVIEW" - case .missingMetadata: return "MISSING_METADATA" - case .pendingBinaryApproval: return "PENDING_BINARY_APPROVAL" - case .readyToSubmit: return "READY_TO_SUBMIT" - case .rejected: return "REJECTED" - case .removedFromSale: return "REMOVED_FROM_SALE" - case .waitingForReview: return "WAITING_FOR_REVIEW" - case .unknown(let rawValue): return rawValue - } + public struct SubscriptionsState: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var approved: Self { + .init(rawValue: "APPROVED") + } + + public static var developerActionNeeded: Self { + .init(rawValue: "DEVELOPER_ACTION_NEEDED") + } + + public static var developerRemovedFromSale: Self { + .init(rawValue: "DEVELOPER_REMOVED_FROM_SALE") + } + + public static var inReview: Self { + .init(rawValue: "IN_REVIEW") + } + + public static var missingMetadata: Self { + .init(rawValue: "MISSING_METADATA") + } + + public static var pendingBinaryApproval: Self { + .init(rawValue: "PENDING_BINARY_APPROVAL") } + public static var readyToSubmit: Self { + .init(rawValue: "READY_TO_SUBMIT") + } + + public static var rejected: Self { + .init(rawValue: "REJECTED") + } + + public static var removedFromSale: Self { + .init(rawValue: "REMOVED_FROM_SALE") + } + + public static var waitingForReview: Self { + .init(rawValue: "WAITING_FOR_REVIEW") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "APPROVED": self = .approved - case "DEVELOPER_ACTION_NEEDED": self = .developerActionNeeded - case "DEVELOPER_REMOVED_FROM_SALE": self = .developerRemovedFromSale - case "IN_REVIEW": self = .inReview - case "MISSING_METADATA": self = .missingMetadata - case "PENDING_BINARY_APPROVAL": self = .pendingBinaryApproval - case "READY_TO_SUBMIT": self = .readyToSubmit - case "REJECTED": self = .rejected - case "REMOVED_FROM_SALE": self = .removedFromSale - case "WAITING_FOR_REVIEW": self = .waitingForReview - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } @@ -337,25 +366,23 @@ extension V1.Apps.ById.SubscriptionGroups.GET { } } - public enum Include: Hashable, Codable, RawRepresentable { - case subscriptionGroupLocalizations - case subscriptions - case unknown(String) + public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var subscriptionGroupLocalizations: Self { + .init(rawValue: "subscriptionGroupLocalizations") + } - public var rawValue: String { - switch self { - case .subscriptionGroupLocalizations: return "subscriptionGroupLocalizations" - case .subscriptions: return "subscriptions" - case .unknown(let rawValue): return rawValue - } + public static var subscriptions: Self { + .init(rawValue: "subscriptions") + } + + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "subscriptionGroupLocalizations": self = .subscriptionGroupLocalizations - case "subscriptions": self = .subscriptions - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } @@ -391,25 +418,23 @@ extension V1.Apps.ById.SubscriptionGroups.GET { } } - public enum Sort: Hashable, Codable, RawRepresentable { - case referenceName - case referenceNameDesc - case unknown(String) + public struct Sort: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var referenceName: Self { + .init(rawValue: "referenceName") + } - public var rawValue: String { - switch self { - case .referenceName: return "referenceName" - case .referenceNameDesc: return "-referenceName" - case .unknown(let rawValue): return rawValue - } + public static var referenceNameDesc: Self { + .init(rawValue: "-referenceName") + } + + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "referenceName": self = .referenceName - case "-referenceName": self = .referenceNameDesc - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/Webhooks/AppsByIdWebhooks.GET.d07bfb0.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/Webhooks/AppsByIdWebhooks.GET.d07bfb0.generated.swift new file mode 100644 index 00000000..1bd5b730 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/Webhooks/AppsByIdWebhooks.GET.d07bfb0.generated.swift @@ -0,0 +1,390 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.Apps.ById.Webhooks { + public struct GET: Endpoint { + public typealias Response = WebhooksResponse + + public var path: String { + "/v1/apps/\(id)/webhooks" + } + + /// the id of the requested resource + public var id: String + + public var parameters: Parameters = Parameters() + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + components?.queryItems = [ + URLQueryItem(name: "fields[apps]", + value: parameters.fields[.apps]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "fields[webhooks]", + value: parameters.fields[.webhooks]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "include", + value: parameters.include?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "limit", + value: parameters.limit.map { "\($0)" }) + ].filter { $0.value != nil } + if components?.queryItems?.isEmpty ?? false { + components?.queryItems = nil + } + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "GET" + return urlRequest + } + + /// - Returns: **200**, List of Webhooks as `WebhooksResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(WebhooksResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +extension V1.Apps.ById.Webhooks.GET { + public struct Parameters: Hashable { + public var fields: Fields = Fields() + + /// comma-separated list of relationships to include + public var include: [Include]? + + /// maximum resources per page + public var limit: Int? + + public struct Fields: Hashable { + public subscript (_ relation: Relation) -> T { + get { values[relation]?.base as! T } + set { values[relation] = AnyHashable(newValue) } + } + + private var values: [AnyHashable: AnyHashable] = [:] + + public struct Apps: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var accessibilityDeclarations: Self { + .init(rawValue: "accessibilityDeclarations") + } + + public static var accessibilityUrl: Self { + .init(rawValue: "accessibilityUrl") + } + + public static var alternativeDistributionKey: Self { + .init(rawValue: "alternativeDistributionKey") + } + + public static var analyticsReportRequests: Self { + .init(rawValue: "analyticsReportRequests") + } + + public static var appAvailabilityV2: Self { + .init(rawValue: "appAvailabilityV2") + } + + public static var appClips: Self { + .init(rawValue: "appClips") + } + + public static var appCustomProductPages: Self { + .init(rawValue: "appCustomProductPages") + } + + public static var appEncryptionDeclarations: Self { + .init(rawValue: "appEncryptionDeclarations") + } + + public static var appEvents: Self { + .init(rawValue: "appEvents") + } + + public static var appInfos: Self { + .init(rawValue: "appInfos") + } + + public static var appPricePoints: Self { + .init(rawValue: "appPricePoints") + } + + public static var appPriceSchedule: Self { + .init(rawValue: "appPriceSchedule") + } + + public static var appStoreVersionExperimentsV2: Self { + .init(rawValue: "appStoreVersionExperimentsV2") + } + + public static var appStoreVersions: Self { + .init(rawValue: "appStoreVersions") + } + + public static var backgroundAssets: Self { + .init(rawValue: "backgroundAssets") + } + + public static var betaAppLocalizations: Self { + .init(rawValue: "betaAppLocalizations") + } + + public static var betaAppReviewDetail: Self { + .init(rawValue: "betaAppReviewDetail") + } + + public static var betaFeedbackCrashSubmissions: Self { + .init(rawValue: "betaFeedbackCrashSubmissions") + } + + public static var betaFeedbackScreenshotSubmissions: Self { + .init(rawValue: "betaFeedbackScreenshotSubmissions") + } + + public static var betaGroups: Self { + .init(rawValue: "betaGroups") + } + + public static var betaLicenseAgreement: Self { + .init(rawValue: "betaLicenseAgreement") + } + + public static var betaTesters: Self { + .init(rawValue: "betaTesters") + } + + public static var builds: Self { + .init(rawValue: "builds") + } + + public static var bundleId: Self { + .init(rawValue: "bundleId") + } + + public static var ciProduct: Self { + .init(rawValue: "ciProduct") + } + + public static var contentRightsDeclaration: Self { + .init(rawValue: "contentRightsDeclaration") + } + + public static var customerReviewSummarizations: Self { + .init(rawValue: "customerReviewSummarizations") + } + + public static var customerReviews: Self { + .init(rawValue: "customerReviews") + } + + public static var endUserLicenseAgreement: Self { + .init(rawValue: "endUserLicenseAgreement") + } + + public static var gameCenterDetail: Self { + .init(rawValue: "gameCenterDetail") + } + + public static var gameCenterEnabledVersions: Self { + .init(rawValue: "gameCenterEnabledVersions") + } + + public static var inAppPurchases: Self { + .init(rawValue: "inAppPurchases") + } + + public static var inAppPurchasesV2: Self { + .init(rawValue: "inAppPurchasesV2") + } + + public static var isOrEverWasMadeForKids: Self { + .init(rawValue: "isOrEverWasMadeForKids") + } + + public static var marketplaceSearchDetail: Self { + .init(rawValue: "marketplaceSearchDetail") + } + + public static var name: Self { + .init(rawValue: "name") + } + + public static var perfPowerMetrics: Self { + .init(rawValue: "perfPowerMetrics") + } + + public static var preReleaseVersions: Self { + .init(rawValue: "preReleaseVersions") + } + + public static var primaryLocale: Self { + .init(rawValue: "primaryLocale") + } + + public static var promotedPurchases: Self { + .init(rawValue: "promotedPurchases") + } + + public static var reviewSubmissions: Self { + .init(rawValue: "reviewSubmissions") + } + + public static var sku: Self { + .init(rawValue: "sku") + } + + public static var streamlinedPurchasingEnabled: Self { + .init(rawValue: "streamlinedPurchasingEnabled") + } + + public static var subscriptionGracePeriod: Self { + .init(rawValue: "subscriptionGracePeriod") + } + + public static var subscriptionGroups: Self { + .init(rawValue: "subscriptionGroups") + } + + public static var subscriptionStatusUrl: Self { + .init(rawValue: "subscriptionStatusUrl") + } + + public static var subscriptionStatusUrlForSandbox: Self { + .init(rawValue: "subscriptionStatusUrlForSandbox") + } + + public static var subscriptionStatusUrlVersion: Self { + .init(rawValue: "subscriptionStatusUrlVersion") + } + + public static var subscriptionStatusUrlVersionForSandbox: Self { + .init(rawValue: "subscriptionStatusUrlVersionForSandbox") + } + + public static var webhooks: Self { + .init(rawValue: "webhooks") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct Webhooks: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var app: Self { + .init(rawValue: "app") + } + + public static var deliveries: Self { + .init(rawValue: "deliveries") + } + + public static var enabled: Self { + .init(rawValue: "enabled") + } + + public static var eventTypes: Self { + .init(rawValue: "eventTypes") + } + + public static var name: Self { + .init(rawValue: "name") + } + + public static var url: Self { + .init(rawValue: "url") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct Relation: Hashable { + /// the fields to include for returned resources of type apps + public static var apps: Relation<[Apps]?> { + .init(key: "fields[apps]") + } + + /// the fields to include for returned resources of type webhooks + public static var webhooks: Relation<[Webhooks]?> { + .init(key: "fields[webhooks]") + } + + internal let key: String + + public func hash(into hasher: inout Hasher) { + hasher.combine(key) + } + } + } + + public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var app: Self { + .init(rawValue: "app") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BackgroundAssetUploadFiles/BackgroundAssetUploadFiles.POST.c7fa164.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BackgroundAssetUploadFiles/BackgroundAssetUploadFiles.POST.c7fa164.generated.swift new file mode 100644 index 00000000..3f7b18ee --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BackgroundAssetUploadFiles/BackgroundAssetUploadFiles.POST.c7fa164.generated.swift @@ -0,0 +1,84 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.BackgroundAssetUploadFiles { + public struct POST: Endpoint { + public typealias Parameters = BackgroundAssetUploadFileCreateRequest + public typealias Response = BackgroundAssetUploadFileResponse + + public var path: String { + "/v1/backgroundAssetUploadFiles" + } + + /// BackgroundAssetUploadFile representation + public var parameters: Parameters + + public init(parameters: Parameters) { + self.parameters = parameters + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "POST" + + var jsonEncoder: JSONEncoder { + let encoder = JSONEncoder() + return encoder + } + + urlRequest?.httpBody = try jsonEncoder.encode(parameters) + urlRequest?.setValue("application/json", forHTTPHeaderField: "Content-Type") + return urlRequest + } + + /// - Returns: **201**, Single BackgroundAssetUploadFile as `BackgroundAssetUploadFileResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **422**, Unprocessable request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 201: + return try jsonDecoder.decode(BackgroundAssetUploadFileResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 409: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 422: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BackgroundAssetUploadFiles/ById/BackgroundAssetUploadFilesById.GET.1ad97cd.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BackgroundAssetUploadFiles/ById/BackgroundAssetUploadFilesById.GET.1ad97cd.generated.swift new file mode 100644 index 00000000..3e89b0ac --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BackgroundAssetUploadFiles/ById/BackgroundAssetUploadFilesById.GET.1ad97cd.generated.swift @@ -0,0 +1,149 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.BackgroundAssetUploadFiles.ById { + public struct GET: Endpoint { + public typealias Response = BackgroundAssetUploadFileResponse + + public var path: String { + "/v1/backgroundAssetUploadFiles/\(id)" + } + + /// the id of the requested resource + public var id: String + + public var parameters: Parameters = Parameters() + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + components?.queryItems = [ + URLQueryItem(name: "fields[backgroundAssetUploadFiles]", + value: parameters.fields[.backgroundAssetUploadFiles]?.map { "\($0)" }.joined(separator: ",")) + ].filter { $0.value != nil } + if components?.queryItems?.isEmpty ?? false { + components?.queryItems = nil + } + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "GET" + return urlRequest + } + + /// - Returns: **200**, Single BackgroundAssetUploadFile as `BackgroundAssetUploadFileResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(BackgroundAssetUploadFileResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +extension V1.BackgroundAssetUploadFiles.ById.GET { + public struct Parameters: Hashable { + public var fields: Fields = Fields() + + public struct Fields: Hashable { + public subscript (_ relation: Relation) -> T { + get { values[relation]?.base as! T } + set { values[relation] = AnyHashable(newValue) } + } + + private var values: [AnyHashable: AnyHashable] = [:] + + public struct BackgroundAssetUploadFiles: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var assetDeliveryState: Self { + .init(rawValue: "assetDeliveryState") + } + + public static var assetToken: Self { + .init(rawValue: "assetToken") + } + + public static var assetType: Self { + .init(rawValue: "assetType") + } + + public static var fileName: Self { + .init(rawValue: "fileName") + } + + public static var fileSize: Self { + .init(rawValue: "fileSize") + } + + public static var sourceFileChecksum: Self { + .init(rawValue: "sourceFileChecksum") + } + + public static var uploadOperations: Self { + .init(rawValue: "uploadOperations") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct Relation: Hashable { + /// the fields to include for returned resources of type backgroundAssetUploadFiles + public static var backgroundAssetUploadFiles: Relation<[BackgroundAssetUploadFiles]?> { + .init(key: "fields[backgroundAssetUploadFiles]") + } + + internal let key: String + + public func hash(into hasher: inout Hasher) { + hasher.combine(key) + } + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BackgroundAssetUploadFiles/ById/BackgroundAssetUploadFilesById.PATCH.1ad97cd.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BackgroundAssetUploadFiles/ById/BackgroundAssetUploadFilesById.PATCH.1ad97cd.generated.swift new file mode 100644 index 00000000..7fbe09ee --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BackgroundAssetUploadFiles/ById/BackgroundAssetUploadFilesById.PATCH.1ad97cd.generated.swift @@ -0,0 +1,95 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.BackgroundAssetUploadFiles.ById { + public struct PATCH: Endpoint { + public typealias Parameters = BackgroundAssetUploadFileUpdateRequest + public typealias Response = BackgroundAssetUploadFileResponse + + public var path: String { + "/v1/backgroundAssetUploadFiles/\(id)" + } + + /// the id of the requested resource + public var id: String + + /// BackgroundAssetUploadFile representation + public var parameters: Parameters + + public init( + id: String, + parameters: Parameters + ) { + self.id = id + self.parameters = parameters + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "PATCH" + + var jsonEncoder: JSONEncoder { + let encoder = JSONEncoder() + return encoder + } + + urlRequest?.httpBody = try jsonEncoder.encode(parameters) + urlRequest?.setValue("application/json", forHTTPHeaderField: "Content-Type") + return urlRequest + } + + /// - Returns: **200**, Single BackgroundAssetUploadFile as `BackgroundAssetUploadFileResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **422**, Unprocessable request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(BackgroundAssetUploadFileResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 409: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 422: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BackgroundAssetVersionInternalBetaReleases/ById/BackgroundAssetVersionInternalBetaReleasesById.GET.c763a11.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BackgroundAssetVersionInternalBetaReleases/ById/BackgroundAssetVersionInternalBetaReleasesById.GET.c763a11.generated.swift new file mode 100644 index 00000000..f99fcbd6 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BackgroundAssetVersionInternalBetaReleases/ById/BackgroundAssetVersionInternalBetaReleasesById.GET.c763a11.generated.swift @@ -0,0 +1,150 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.BackgroundAssetVersionInternalBetaReleases.ById { + public struct GET: Endpoint { + public typealias Response = BackgroundAssetVersionInternalBetaReleaseResponse + + public var path: String { + "/v1/backgroundAssetVersionInternalBetaReleases/\(id)" + } + + /// the id of the requested resource + public var id: String + + public var parameters: Parameters = Parameters() + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + components?.queryItems = [ + URLQueryItem(name: "fields[backgroundAssetVersionInternalBetaReleases]", + value: parameters.fields[.backgroundAssetVersionInternalBetaReleases]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "include", + value: parameters.include?.map { "\($0)" }.joined(separator: ",")) + ].filter { $0.value != nil } + if components?.queryItems?.isEmpty ?? false { + components?.queryItems = nil + } + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "GET" + return urlRequest + } + + /// - Returns: **200**, Single BackgroundAssetVersionInternalBetaRelease as `BackgroundAssetVersionInternalBetaReleaseResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(BackgroundAssetVersionInternalBetaReleaseResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +extension V1.BackgroundAssetVersionInternalBetaReleases.ById.GET { + public struct Parameters: Hashable { + public var fields: Fields = Fields() + + /// comma-separated list of relationships to include + public var include: [Include]? + + public struct Fields: Hashable { + public subscript (_ relation: Relation) -> T { + get { values[relation]?.base as! T } + set { values[relation] = AnyHashable(newValue) } + } + + private var values: [AnyHashable: AnyHashable] = [:] + + public struct BackgroundAssetVersionInternalBetaReleases: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var backgroundAssetVersion: Self { + .init(rawValue: "backgroundAssetVersion") + } + + public static var state: Self { + .init(rawValue: "state") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct Relation: Hashable { + /// the fields to include for returned resources of type backgroundAssetVersionInternalBetaReleases + public static var backgroundAssetVersionInternalBetaReleases: Relation<[BackgroundAssetVersionInternalBetaReleases]?> { + .init(key: "fields[backgroundAssetVersionInternalBetaReleases]") + } + + internal let key: String + + public func hash(into hasher: inout Hasher) { + hasher.combine(key) + } + } + } + + public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var backgroundAssetVersion: Self { + .init(rawValue: "backgroundAssetVersion") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BackgroundAssetVersions/BackgroundAssetVersions.POST.24a1fc5.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BackgroundAssetVersions/BackgroundAssetVersions.POST.24a1fc5.generated.swift new file mode 100644 index 00000000..e4bc7143 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BackgroundAssetVersions/BackgroundAssetVersions.POST.24a1fc5.generated.swift @@ -0,0 +1,84 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.BackgroundAssetVersions { + public struct POST: Endpoint { + public typealias Parameters = BackgroundAssetVersionCreateRequest + public typealias Response = BackgroundAssetVersionResponse + + public var path: String { + "/v1/backgroundAssetVersions" + } + + /// BackgroundAssetVersion representation + public var parameters: Parameters + + public init(parameters: Parameters) { + self.parameters = parameters + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "POST" + + var jsonEncoder: JSONEncoder { + let encoder = JSONEncoder() + return encoder + } + + urlRequest?.httpBody = try jsonEncoder.encode(parameters) + urlRequest?.setValue("application/json", forHTTPHeaderField: "Content-Type") + return urlRequest + } + + /// - Returns: **201**, Single BackgroundAssetVersion as `BackgroundAssetVersionResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **422**, Unprocessable request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 201: + return try jsonDecoder.decode(BackgroundAssetVersionResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 409: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 422: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BackgroundAssetVersions/ById/BackgroundAssetUploadFiles/BackgroundAssetVersionsByIdBackgroundAssetUploadFiles.GET.85c8b34.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BackgroundAssetVersions/ById/BackgroundAssetUploadFiles/BackgroundAssetVersionsByIdBackgroundAssetUploadFiles.GET.85c8b34.generated.swift new file mode 100644 index 00000000..00adb1f3 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BackgroundAssetVersions/ById/BackgroundAssetUploadFiles/BackgroundAssetVersionsByIdBackgroundAssetUploadFiles.GET.85c8b34.generated.swift @@ -0,0 +1,154 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.BackgroundAssetVersions.ById.BackgroundAssetUploadFiles { + public struct GET: Endpoint { + public typealias Response = BackgroundAssetUploadFilesResponse + + public var path: String { + "/v1/backgroundAssetVersions/\(id)/backgroundAssetUploadFiles" + } + + /// the id of the requested resource + public var id: String + + public var parameters: Parameters = Parameters() + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + components?.queryItems = [ + URLQueryItem(name: "fields[backgroundAssetUploadFiles]", + value: parameters.fields[.backgroundAssetUploadFiles]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "limit", + value: parameters.limit.map { "\($0)" }) + ].filter { $0.value != nil } + if components?.queryItems?.isEmpty ?? false { + components?.queryItems = nil + } + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "GET" + return urlRequest + } + + /// - Returns: **200**, List of BackgroundAssetUploadFiles as `BackgroundAssetUploadFilesResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(BackgroundAssetUploadFilesResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +extension V1.BackgroundAssetVersions.ById.BackgroundAssetUploadFiles.GET { + public struct Parameters: Hashable { + public var fields: Fields = Fields() + + /// maximum resources per page + public var limit: Int? + + public struct Fields: Hashable { + public subscript (_ relation: Relation) -> T { + get { values[relation]?.base as! T } + set { values[relation] = AnyHashable(newValue) } + } + + private var values: [AnyHashable: AnyHashable] = [:] + + public struct BackgroundAssetUploadFiles: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var assetDeliveryState: Self { + .init(rawValue: "assetDeliveryState") + } + + public static var assetToken: Self { + .init(rawValue: "assetToken") + } + + public static var assetType: Self { + .init(rawValue: "assetType") + } + + public static var fileName: Self { + .init(rawValue: "fileName") + } + + public static var fileSize: Self { + .init(rawValue: "fileSize") + } + + public static var sourceFileChecksum: Self { + .init(rawValue: "sourceFileChecksum") + } + + public static var uploadOperations: Self { + .init(rawValue: "uploadOperations") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct Relation: Hashable { + /// the fields to include for returned resources of type backgroundAssetUploadFiles + public static var backgroundAssetUploadFiles: Relation<[BackgroundAssetUploadFiles]?> { + .init(key: "fields[backgroundAssetUploadFiles]") + } + + internal let key: String + + public func hash(into hasher: inout Hasher) { + hasher.combine(key) + } + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppPricePoints/ById/AppPricePointsById.GET.97761a8.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BackgroundAssetVersions/ById/BackgroundAssetVersionsById.GET.95cd11c.generated.swift similarity index 50% rename from Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppPricePoints/ById/AppPricePointsById.GET.97761a8.generated.swift rename to Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BackgroundAssetVersions/ById/BackgroundAssetVersionsById.GET.95cd11c.generated.swift index 9e6c144f..14eabb0a 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppPricePoints/ById/AppPricePointsById.GET.97761a8.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BackgroundAssetVersions/ById/BackgroundAssetVersionsById.GET.95cd11c.generated.swift @@ -6,13 +6,12 @@ import Foundation import FoundationNetworking #endif -extension V1.AppPricePoints.ById { - @available(*, deprecated) +extension V1.BackgroundAssetVersions.ById { public struct GET: Endpoint { - public typealias Response = AppPricePointResponse + public typealias Response = BackgroundAssetVersionResponse public var path: String { - "/v1/appPricePoints/\(id)" + "/v1/backgroundAssetVersions/\(id)" } /// the id of the requested resource @@ -29,10 +28,8 @@ extension V1.AppPricePoints.ById { components?.path = path components?.queryItems = [ - URLQueryItem(name: "fields[appPricePoints]", - value: parameters.fields[.appPricePoints]?.map { "\($0)" }.joined(separator: ",")), - URLQueryItem(name: "fields[territories]", - value: parameters.fields[.territories]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "fields[backgroundAssetVersions]", + value: parameters.fields[.backgroundAssetVersions]?.map { "\($0)" }.joined(separator: ",")), URLQueryItem(name: "include", value: parameters.include?.map { "\($0)" }.joined(separator: ",")) ].filter { $0.value != nil } @@ -45,10 +42,12 @@ extension V1.AppPricePoints.ById { return urlRequest } - /// - Returns: **200**, Single AppPricePoint as `AppPricePointResponse` + /// - Returns: **200**, Single BackgroundAssetVersion as `BackgroundAssetVersionResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -57,17 +56,23 @@ extension V1.AppPricePoints.ById { switch urlResponse.statusCode { case 200: - return try jsonDecoder.decode(AppPricePointResponse.self, from: data) + return try jsonDecoder.decode(BackgroundAssetVersionResponse.self, from: data) case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 404: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -75,7 +80,7 @@ extension V1.AppPricePoints.ById { } } -extension V1.AppPricePoints.ById.GET { +extension V1.BackgroundAssetVersions.ById.GET { public struct Parameters: Hashable { public var fields: Fields = Fields() @@ -90,62 +95,54 @@ extension V1.AppPricePoints.ById.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum AppPricePoints: Hashable, Codable, RawRepresentable { - case customerPrice - case priceTier - case proceeds - case territory - case unknown(String) - - public var rawValue: String { - switch self { - case .customerPrice: return "customerPrice" - case .priceTier: return "priceTier" - case .proceeds: return "proceeds" - case .territory: return "territory" - case .unknown(let rawValue): return rawValue - } + public struct BackgroundAssetVersions: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var assetFile: Self { + .init(rawValue: "assetFile") } - public init(rawValue: String) { - switch rawValue { - case "customerPrice": self = .customerPrice - case "priceTier": self = .priceTier - case "proceeds": self = .proceeds - case "territory": self = .territory - default: self = .unknown(rawValue) - } + public static var backgroundAssetUploadFiles: Self { + .init(rawValue: "backgroundAssetUploadFiles") + } + + public static var createdDate: Self { + .init(rawValue: "createdDate") + } + + public static var internalBetaRelease: Self { + .init(rawValue: "internalBetaRelease") + } + + public static var manifestFile: Self { + .init(rawValue: "manifestFile") + } + + public static var platforms: Self { + .init(rawValue: "platforms") } - } - public enum Territories: Hashable, Codable, RawRepresentable { - case currency - case unknown(String) + public static var state: Self { + .init(rawValue: "state") + } + + public static var version: Self { + .init(rawValue: "version") + } - public var rawValue: String { - switch self { - case .currency: return "currency" - case .unknown(let rawValue): return rawValue - } + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "currency": self = .currency - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } public struct Relation: Hashable { - /// the fields to include for returned resources of type appPricePoints - public static var appPricePoints: Relation<[AppPricePoints]?> { - .init(key: "fields[appPricePoints]") - } - - /// the fields to include for returned resources of type territories - public static var territories: Relation<[Territories]?> { - .init(key: "fields[territories]") + /// the fields to include for returned resources of type backgroundAssetVersions + public static var backgroundAssetVersions: Relation<[BackgroundAssetVersions]?> { + .init(key: "fields[backgroundAssetVersions]") } internal let key: String @@ -156,25 +153,27 @@ extension V1.AppPricePoints.ById.GET { } } - public enum Include: Hashable, Codable, RawRepresentable { - case priceTier - case territory - case unknown(String) + public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var assetFile: Self { + .init(rawValue: "assetFile") + } + + public static var internalBetaRelease: Self { + .init(rawValue: "internalBetaRelease") + } - public var rawValue: String { - switch self { - case .priceTier: return "priceTier" - case .territory: return "territory" - case .unknown(let rawValue): return rawValue - } + public static var manifestFile: Self { + .init(rawValue: "manifestFile") } + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "priceTier": self = .priceTier - case "territory": self = .territory - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BackgroundAssetVersions/ById/Relationships/BackgroundAssetUploadFiles/BackgroundAssetVersionsByIdRelationshipsBackgroundAssetUploadFiles.GET.c3a234c.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BackgroundAssetVersions/ById/Relationships/BackgroundAssetUploadFiles/BackgroundAssetVersionsByIdRelationshipsBackgroundAssetUploadFiles.GET.c3a234c.generated.swift new file mode 100644 index 00000000..11ccbabc --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BackgroundAssetVersions/ById/Relationships/BackgroundAssetUploadFiles/BackgroundAssetVersionsByIdRelationshipsBackgroundAssetUploadFiles.GET.c3a234c.generated.swift @@ -0,0 +1,88 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.BackgroundAssetVersions.ById.Relationships.BackgroundAssetUploadFiles { + public struct GET: Endpoint { + public typealias Response = BackgroundAssetVersionBackgroundAssetUploadFilesLinkagesResponse + + public var path: String { + "/v1/backgroundAssetVersions/\(id)/relationships/backgroundAssetUploadFiles" + } + + /// the id of the requested resource + public var id: String + + public var parameters: Parameters = Parameters() + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + components?.queryItems = [ + URLQueryItem(name: "limit", + value: parameters.limit.map { "\($0)" }) + ].filter { $0.value != nil } + if components?.queryItems?.isEmpty ?? false { + components?.queryItems = nil + } + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "GET" + return urlRequest + } + + /// - Returns: **200**, List of related linkages as `BackgroundAssetVersionBackgroundAssetUploadFilesLinkagesResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(BackgroundAssetVersionBackgroundAssetUploadFilesLinkagesResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +extension V1.BackgroundAssetVersions.ById.Relationships.BackgroundAssetUploadFiles.GET { + public struct Parameters: Hashable { + /// maximum resources per page + public var limit: Int? + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BackgroundAssets/BackgroundAssets.POST.177247a.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BackgroundAssets/BackgroundAssets.POST.177247a.generated.swift new file mode 100644 index 00000000..0ec240c2 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BackgroundAssets/BackgroundAssets.POST.177247a.generated.swift @@ -0,0 +1,84 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.BackgroundAssets { + public struct POST: Endpoint { + public typealias Parameters = BackgroundAssetCreateRequest + public typealias Response = BackgroundAssetResponse + + public var path: String { + "/v1/backgroundAssets" + } + + /// BackgroundAsset representation + public var parameters: Parameters + + public init(parameters: Parameters) { + self.parameters = parameters + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "POST" + + var jsonEncoder: JSONEncoder { + let encoder = JSONEncoder() + return encoder + } + + urlRequest?.httpBody = try jsonEncoder.encode(parameters) + urlRequest?.setValue("application/json", forHTTPHeaderField: "Content-Type") + return urlRequest + } + + /// - Returns: **201**, Single BackgroundAsset as `BackgroundAssetResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **422**, Unprocessable request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 201: + return try jsonDecoder.decode(BackgroundAssetResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 409: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 422: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BackgroundAssets/ById/BackgroundAssetsById.GET.ab8fadb.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BackgroundAssets/ById/BackgroundAssetsById.GET.ab8fadb.generated.swift new file mode 100644 index 00000000..433313da --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BackgroundAssets/ById/BackgroundAssetsById.GET.ab8fadb.generated.swift @@ -0,0 +1,158 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.BackgroundAssets.ById { + public struct GET: Endpoint { + public typealias Response = BackgroundAssetResponse + + public var path: String { + "/v1/backgroundAssets/\(id)" + } + + /// the id of the requested resource + public var id: String + + public var parameters: Parameters = Parameters() + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + components?.queryItems = [ + URLQueryItem(name: "fields[backgroundAssets]", + value: parameters.fields[.backgroundAssets]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "include", + value: parameters.include?.map { "\($0)" }.joined(separator: ",")) + ].filter { $0.value != nil } + if components?.queryItems?.isEmpty ?? false { + components?.queryItems = nil + } + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "GET" + return urlRequest + } + + /// - Returns: **200**, Single BackgroundAsset as `BackgroundAssetResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(BackgroundAssetResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +extension V1.BackgroundAssets.ById.GET { + public struct Parameters: Hashable { + public var fields: Fields = Fields() + + /// comma-separated list of relationships to include + public var include: [Include]? + + public struct Fields: Hashable { + public subscript (_ relation: Relation) -> T { + get { values[relation]?.base as! T } + set { values[relation] = AnyHashable(newValue) } + } + + private var values: [AnyHashable: AnyHashable] = [:] + + public struct BackgroundAssets: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var assetPackIdentifier: Self { + .init(rawValue: "assetPackIdentifier") + } + + public static var createdDate: Self { + .init(rawValue: "createdDate") + } + + public static var internalBetaVersion: Self { + .init(rawValue: "internalBetaVersion") + } + + public static var versions: Self { + .init(rawValue: "versions") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct Relation: Hashable { + /// the fields to include for returned resources of type backgroundAssets + public static var backgroundAssets: Relation<[BackgroundAssets]?> { + .init(key: "fields[backgroundAssets]") + } + + internal let key: String + + public func hash(into hasher: inout Hasher) { + hasher.combine(key) + } + } + } + + public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var internalBetaVersion: Self { + .init(rawValue: "internalBetaVersion") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BackgroundAssets/ById/Relationships/Versions/BackgroundAssetsByIdRelationshipsVersions.GET.d06fc9a.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BackgroundAssets/ById/Relationships/Versions/BackgroundAssetsByIdRelationshipsVersions.GET.d06fc9a.generated.swift new file mode 100644 index 00000000..2cc3b48c --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BackgroundAssets/ById/Relationships/Versions/BackgroundAssetsByIdRelationshipsVersions.GET.d06fc9a.generated.swift @@ -0,0 +1,88 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.BackgroundAssets.ById.Relationships.Versions { + public struct GET: Endpoint { + public typealias Response = BackgroundAssetVersionsLinkagesResponse + + public var path: String { + "/v1/backgroundAssets/\(id)/relationships/versions" + } + + /// the id of the requested resource + public var id: String + + public var parameters: Parameters = Parameters() + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + components?.queryItems = [ + URLQueryItem(name: "limit", + value: parameters.limit.map { "\($0)" }) + ].filter { $0.value != nil } + if components?.queryItems?.isEmpty ?? false { + components?.queryItems = nil + } + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "GET" + return urlRequest + } + + /// - Returns: **200**, List of related linkages as `BackgroundAssetVersionsLinkagesResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(BackgroundAssetVersionsLinkagesResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +extension V1.BackgroundAssets.ById.Relationships.Versions.GET { + public struct Parameters: Hashable { + /// maximum resources per page + public var limit: Int? + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BackgroundAssets/ById/Versions/BackgroundAssetsByIdVersions.GET.c529844.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BackgroundAssets/ById/Versions/BackgroundAssetsByIdVersions.GET.c529844.generated.swift new file mode 100644 index 00000000..ca52e021 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BackgroundAssets/ById/Versions/BackgroundAssetsByIdVersions.GET.c529844.generated.swift @@ -0,0 +1,374 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.BackgroundAssets.ById.Versions { + public struct GET: Endpoint { + public typealias Response = BackgroundAssetVersionsResponse + + public var path: String { + "/v1/backgroundAssets/\(id)/versions" + } + + /// the id of the requested resource + public var id: String + + public var parameters: Parameters = Parameters() + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + components?.queryItems = [ + URLQueryItem(name: "fields[backgroundAssetUploadFiles]", + value: parameters.fields[.backgroundAssetUploadFiles]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "fields[backgroundAssetVersionInternalBetaReleases]", + value: parameters.fields[.backgroundAssetVersionInternalBetaReleases]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "fields[backgroundAssetVersions]", + value: parameters.fields[.backgroundAssetVersions]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "filter[internalBetaRelease.state]", + value: parameters.filter[.internalBetaReleaseState]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "filter[state]", + value: parameters.filter[.state]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "filter[version]", + value: parameters.filter[.version]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "include", + value: parameters.include?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "limit", + value: parameters.limit.map { "\($0)" }), + URLQueryItem(name: "sort", + value: parameters.sort?.map { "\($0)" }.joined(separator: ",")) + ].filter { $0.value != nil } + if components?.queryItems?.isEmpty ?? false { + components?.queryItems = nil + } + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "GET" + return urlRequest + } + + /// - Returns: **200**, List of BackgroundAssetVersions as `BackgroundAssetVersionsResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(BackgroundAssetVersionsResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +extension V1.BackgroundAssets.ById.Versions.GET { + public struct Parameters: Hashable { + public var fields: Fields = Fields() + + public var filter: Filter = Filter() + + /// comma-separated list of relationships to include + public var include: [Include]? + + /// maximum resources per page + public var limit: Int? + + /// comma-separated list of sort expressions; resources will be sorted as specified + public var sort: [Sort]? + + public struct Fields: Hashable { + public subscript (_ relation: Relation) -> T { + get { values[relation]?.base as! T } + set { values[relation] = AnyHashable(newValue) } + } + + private var values: [AnyHashable: AnyHashable] = [:] + + public struct BackgroundAssetUploadFiles: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var assetDeliveryState: Self { + .init(rawValue: "assetDeliveryState") + } + + public static var assetToken: Self { + .init(rawValue: "assetToken") + } + + public static var assetType: Self { + .init(rawValue: "assetType") + } + + public static var fileName: Self { + .init(rawValue: "fileName") + } + + public static var fileSize: Self { + .init(rawValue: "fileSize") + } + + public static var sourceFileChecksum: Self { + .init(rawValue: "sourceFileChecksum") + } + + public static var uploadOperations: Self { + .init(rawValue: "uploadOperations") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct BackgroundAssetVersionInternalBetaReleases: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var backgroundAssetVersion: Self { + .init(rawValue: "backgroundAssetVersion") + } + + public static var state: Self { + .init(rawValue: "state") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct BackgroundAssetVersions: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var assetFile: Self { + .init(rawValue: "assetFile") + } + + public static var backgroundAssetUploadFiles: Self { + .init(rawValue: "backgroundAssetUploadFiles") + } + + public static var createdDate: Self { + .init(rawValue: "createdDate") + } + + public static var internalBetaRelease: Self { + .init(rawValue: "internalBetaRelease") + } + + public static var manifestFile: Self { + .init(rawValue: "manifestFile") + } + + public static var platforms: Self { + .init(rawValue: "platforms") + } + + public static var state: Self { + .init(rawValue: "state") + } + + public static var version: Self { + .init(rawValue: "version") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct Relation: Hashable { + /// the fields to include for returned resources of type backgroundAssetUploadFiles + public static var backgroundAssetUploadFiles: Relation<[BackgroundAssetUploadFiles]?> { + .init(key: "fields[backgroundAssetUploadFiles]") + } + + /// the fields to include for returned resources of type backgroundAssetVersionInternalBetaReleases + public static var backgroundAssetVersionInternalBetaReleases: Relation<[BackgroundAssetVersionInternalBetaReleases]?> { + .init(key: "fields[backgroundAssetVersionInternalBetaReleases]") + } + + /// the fields to include for returned resources of type backgroundAssetVersions + public static var backgroundAssetVersions: Relation<[BackgroundAssetVersions]?> { + .init(key: "fields[backgroundAssetVersions]") + } + + internal let key: String + + public func hash(into hasher: inout Hasher) { + hasher.combine(key) + } + } + } + + public struct Filter: Hashable { + public subscript (_ relation: Relation) -> T { + get { values[relation]?.base as! T } + set { values[relation] = AnyHashable(newValue) } + } + + private var values: [AnyHashable: AnyHashable] = [:] + + public struct InternalBetaReleaseState: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var readyForTesting: Self { + .init(rawValue: "READY_FOR_TESTING") + } + + public static var superseded: Self { + .init(rawValue: "SUPERSEDED") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct State: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var awaitingUpload: Self { + .init(rawValue: "AWAITING_UPLOAD") + } + + public static var complete: Self { + .init(rawValue: "COMPLETE") + } + + public static var failed: Self { + .init(rawValue: "FAILED") + } + + public static var processing: Self { + .init(rawValue: "PROCESSING") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct Relation: Hashable { + /// filter by attribute 'internalBetaRelease.state' + public static var internalBetaReleaseState: Relation<[InternalBetaReleaseState]?> { + .init(key: "filter[internalBetaRelease.state]") + } + + /// filter by attribute 'state' + public static var state: Relation<[State]?> { + .init(key: "filter[state]") + } + + /// filter by attribute 'version' + public static var version: Relation<[String]?> { + .init(key: "filter[version]") + } + + internal let key: String + + public func hash(into hasher: inout Hasher) { + hasher.combine(key) + } + } + } + + public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var assetFile: Self { + .init(rawValue: "assetFile") + } + + public static var internalBetaRelease: Self { + .init(rawValue: "internalBetaRelease") + } + + public static var manifestFile: Self { + .init(rawValue: "manifestFile") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct Sort: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var version: Self { + .init(rawValue: "version") + } + + public static var versionDesc: Self { + .init(rawValue: "-version") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaAppClipInvocationLocalizations/BetaAppClipInvocationLocalizations.POST.2333b59.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaAppClipInvocationLocalizations/BetaAppClipInvocationLocalizations.POST.2333b59.generated.swift index eab47146..de141435 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaAppClipInvocationLocalizations/BetaAppClipInvocationLocalizations.POST.2333b59.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaAppClipInvocationLocalizations/BetaAppClipInvocationLocalizations.POST.2333b59.generated.swift @@ -41,8 +41,11 @@ extension V1.BetaAppClipInvocationLocalizations { /// - Returns: **201**, Single BetaAppClipInvocationLocalization as `BetaAppClipInvocationLocalizationResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **422**, Unprocessable request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -56,12 +59,21 @@ extension V1.BetaAppClipInvocationLocalizations { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 409: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 422: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaAppClipInvocationLocalizations/ById/BetaAppClipInvocationLocalizationsById.DELETE.f68cb29.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaAppClipInvocationLocalizations/ById/BetaAppClipInvocationLocalizationsById.DELETE.f68cb29.generated.swift index 2c5f221e..d69f90f4 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaAppClipInvocationLocalizations/ById/BetaAppClipInvocationLocalizationsById.DELETE.f68cb29.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaAppClipInvocationLocalizations/ById/BetaAppClipInvocationLocalizationsById.DELETE.f68cb29.generated.swift @@ -31,11 +31,12 @@ extension V1.BetaAppClipInvocationLocalizations.ById { return urlRequest } - /// - Returns: **204**, Success (no content) /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -43,12 +44,12 @@ extension V1.BetaAppClipInvocationLocalizations.ById { } switch urlResponse.statusCode { - case 204: - return - case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) @@ -58,6 +59,9 @@ extension V1.BetaAppClipInvocationLocalizations.ById { case 409: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaAppClipInvocationLocalizations/ById/BetaAppClipInvocationLocalizationsById.PATCH.f68cb29.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaAppClipInvocationLocalizations/ById/BetaAppClipInvocationLocalizationsById.PATCH.f68cb29.generated.swift index 195923ca..d1fe036d 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaAppClipInvocationLocalizations/ById/BetaAppClipInvocationLocalizationsById.PATCH.f68cb29.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaAppClipInvocationLocalizations/ById/BetaAppClipInvocationLocalizationsById.PATCH.f68cb29.generated.swift @@ -48,9 +48,12 @@ extension V1.BetaAppClipInvocationLocalizations.ById { /// - Returns: **200**, Single BetaAppClipInvocationLocalization as `BetaAppClipInvocationLocalizationResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **422**, Unprocessable request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -64,6 +67,9 @@ extension V1.BetaAppClipInvocationLocalizations.ById { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) @@ -73,6 +79,12 @@ extension V1.BetaAppClipInvocationLocalizations.ById { case 409: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 422: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaAppClipInvocations/BetaAppClipInvocations.POST.2056a5d.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaAppClipInvocations/BetaAppClipInvocations.POST.2056a5d.generated.swift index 9ca69602..56b7f42b 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaAppClipInvocations/BetaAppClipInvocations.POST.2056a5d.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaAppClipInvocations/BetaAppClipInvocations.POST.2056a5d.generated.swift @@ -41,8 +41,11 @@ extension V1.BetaAppClipInvocations { /// - Returns: **201**, Single BetaAppClipInvocation as `BetaAppClipInvocationResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **422**, Unprocessable request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -56,12 +59,21 @@ extension V1.BetaAppClipInvocations { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 409: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 422: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaAppClipInvocations/ById/BetaAppClipInvocationsById.DELETE.de3257b.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaAppClipInvocations/ById/BetaAppClipInvocationsById.DELETE.de3257b.generated.swift index 9bfaa1e1..654d33ad 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaAppClipInvocations/ById/BetaAppClipInvocationsById.DELETE.de3257b.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaAppClipInvocations/ById/BetaAppClipInvocationsById.DELETE.de3257b.generated.swift @@ -31,11 +31,12 @@ extension V1.BetaAppClipInvocations.ById { return urlRequest } - /// - Returns: **204**, Success (no content) /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -43,12 +44,12 @@ extension V1.BetaAppClipInvocations.ById { } switch urlResponse.statusCode { - case 204: - return - case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) @@ -58,6 +59,9 @@ extension V1.BetaAppClipInvocations.ById { case 409: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaAppClipInvocations/ById/BetaAppClipInvocationsById.GET.de3257b.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaAppClipInvocations/ById/BetaAppClipInvocationsById.GET.de3257b.generated.swift index 4bedf1e8..27bfc2f3 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaAppClipInvocations/ById/BetaAppClipInvocationsById.GET.de3257b.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaAppClipInvocations/ById/BetaAppClipInvocationsById.GET.de3257b.generated.swift @@ -46,8 +46,10 @@ extension V1.BetaAppClipInvocations.ById { /// - Returns: **200**, Single BetaAppClipInvocation as `BetaAppClipInvocationResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -61,12 +63,18 @@ extension V1.BetaAppClipInvocations.ById { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 404: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -91,28 +99,23 @@ extension V1.BetaAppClipInvocations.ById.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum BetaAppClipInvocations: Hashable, Codable, RawRepresentable { - case betaAppClipInvocationLocalizations - case buildBundle - case url - case unknown(String) - - public var rawValue: String { - switch self { - case .betaAppClipInvocationLocalizations: return "betaAppClipInvocationLocalizations" - case .buildBundle: return "buildBundle" - case .url: return "url" - case .unknown(let rawValue): return rawValue - } + public struct BetaAppClipInvocations: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var betaAppClipInvocationLocalizations: Self { + .init(rawValue: "betaAppClipInvocationLocalizations") } + public static var url: Self { + .init(rawValue: "url") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "betaAppClipInvocationLocalizations": self = .betaAppClipInvocationLocalizations - case "buildBundle": self = .buildBundle - case "url": self = .url - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } @@ -130,22 +133,19 @@ extension V1.BetaAppClipInvocations.ById.GET { } } - public enum Include: Hashable, Codable, RawRepresentable { - case betaAppClipInvocationLocalizations - case unknown(String) + public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var betaAppClipInvocationLocalizations: Self { + .init(rawValue: "betaAppClipInvocationLocalizations") + } - public var rawValue: String { - switch self { - case .betaAppClipInvocationLocalizations: return "betaAppClipInvocationLocalizations" - case .unknown(let rawValue): return rawValue - } + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "betaAppClipInvocationLocalizations": self = .betaAppClipInvocationLocalizations - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaAppClipInvocations/ById/BetaAppClipInvocationsById.PATCH.de3257b.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaAppClipInvocations/ById/BetaAppClipInvocationsById.PATCH.de3257b.generated.swift index 282b69c6..113c0ea7 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaAppClipInvocations/ById/BetaAppClipInvocationsById.PATCH.de3257b.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaAppClipInvocations/ById/BetaAppClipInvocationsById.PATCH.de3257b.generated.swift @@ -48,9 +48,12 @@ extension V1.BetaAppClipInvocations.ById { /// - Returns: **200**, Single BetaAppClipInvocation as `BetaAppClipInvocationResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **422**, Unprocessable request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -64,6 +67,9 @@ extension V1.BetaAppClipInvocations.ById { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) @@ -73,6 +79,12 @@ extension V1.BetaAppClipInvocations.ById { case 409: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 422: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaAppLocalizations/BetaAppLocalizations.GET.a08bdc9.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaAppLocalizations/BetaAppLocalizations.GET.a08bdc9.generated.swift index 9e81a266..fca98a13 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaAppLocalizations/BetaAppLocalizations.GET.a08bdc9.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaAppLocalizations/BetaAppLocalizations.GET.a08bdc9.generated.swift @@ -49,7 +49,9 @@ extension V1.BetaAppLocalizations { /// - Returns: **200**, List of BetaAppLocalizations as `BetaAppLocalizationsResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -63,9 +65,15 @@ extension V1.BetaAppLocalizations { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -93,188 +101,255 @@ extension V1.BetaAppLocalizations.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum Apps: Hashable, Codable, RawRepresentable { - case appAvailability - case appClips - case appCustomProductPages - case appEncryptionDeclarations - case appEvents - case appInfos - case appPricePoints - case appPriceSchedule - case appStoreVersionExperimentsV2 - case appStoreVersions - case availableInNewTerritories - case availableTerritories - case betaAppLocalizations - case betaAppReviewDetail - case betaGroups - case betaLicenseAgreement - case betaTesters - case builds - case bundleId - case ciProduct - case contentRightsDeclaration - case customerReviews - case endUserLicenseAgreement - case gameCenterDetail - case gameCenterEnabledVersions - case inAppPurchases - case inAppPurchasesV2 - case isOrEverWasMadeForKids - case name - case perfPowerMetrics - case preOrder - case preReleaseVersions - case pricePoints - case prices - case primaryLocale - case promotedPurchases - case reviewSubmissions - case sku - case subscriptionGracePeriod - case subscriptionGroups - case subscriptionStatusUrl - case subscriptionStatusUrlForSandbox - case subscriptionStatusUrlVersion - case subscriptionStatusUrlVersionForSandbox - case unknown(String) - - public var rawValue: String { - switch self { - case .appAvailability: return "appAvailability" - case .appClips: return "appClips" - case .appCustomProductPages: return "appCustomProductPages" - case .appEncryptionDeclarations: return "appEncryptionDeclarations" - case .appEvents: return "appEvents" - case .appInfos: return "appInfos" - case .appPricePoints: return "appPricePoints" - case .appPriceSchedule: return "appPriceSchedule" - case .appStoreVersionExperimentsV2: return "appStoreVersionExperimentsV2" - case .appStoreVersions: return "appStoreVersions" - case .availableInNewTerritories: return "availableInNewTerritories" - case .availableTerritories: return "availableTerritories" - case .betaAppLocalizations: return "betaAppLocalizations" - case .betaAppReviewDetail: return "betaAppReviewDetail" - case .betaGroups: return "betaGroups" - case .betaLicenseAgreement: return "betaLicenseAgreement" - case .betaTesters: return "betaTesters" - case .builds: return "builds" - case .bundleId: return "bundleId" - case .ciProduct: return "ciProduct" - case .contentRightsDeclaration: return "contentRightsDeclaration" - case .customerReviews: return "customerReviews" - case .endUserLicenseAgreement: return "endUserLicenseAgreement" - case .gameCenterDetail: return "gameCenterDetail" - case .gameCenterEnabledVersions: return "gameCenterEnabledVersions" - case .inAppPurchases: return "inAppPurchases" - case .inAppPurchasesV2: return "inAppPurchasesV2" - case .isOrEverWasMadeForKids: return "isOrEverWasMadeForKids" - case .name: return "name" - case .perfPowerMetrics: return "perfPowerMetrics" - case .preOrder: return "preOrder" - case .preReleaseVersions: return "preReleaseVersions" - case .pricePoints: return "pricePoints" - case .prices: return "prices" - case .primaryLocale: return "primaryLocale" - case .promotedPurchases: return "promotedPurchases" - case .reviewSubmissions: return "reviewSubmissions" - case .sku: return "sku" - case .subscriptionGracePeriod: return "subscriptionGracePeriod" - case .subscriptionGroups: return "subscriptionGroups" - case .subscriptionStatusUrl: return "subscriptionStatusUrl" - case .subscriptionStatusUrlForSandbox: return "subscriptionStatusUrlForSandbox" - case .subscriptionStatusUrlVersion: return "subscriptionStatusUrlVersion" - case .subscriptionStatusUrlVersionForSandbox: return "subscriptionStatusUrlVersionForSandbox" - case .unknown(let rawValue): return rawValue - } + public struct Apps: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var accessibilityDeclarations: Self { + .init(rawValue: "accessibilityDeclarations") + } + + public static var accessibilityUrl: Self { + .init(rawValue: "accessibilityUrl") + } + + public static var alternativeDistributionKey: Self { + .init(rawValue: "alternativeDistributionKey") + } + + public static var analyticsReportRequests: Self { + .init(rawValue: "analyticsReportRequests") + } + + public static var appAvailabilityV2: Self { + .init(rawValue: "appAvailabilityV2") + } + + public static var appClips: Self { + .init(rawValue: "appClips") + } + + public static var appCustomProductPages: Self { + .init(rawValue: "appCustomProductPages") + } + + public static var appEncryptionDeclarations: Self { + .init(rawValue: "appEncryptionDeclarations") + } + + public static var appEvents: Self { + .init(rawValue: "appEvents") + } + + public static var appInfos: Self { + .init(rawValue: "appInfos") + } + + public static var appPricePoints: Self { + .init(rawValue: "appPricePoints") + } + + public static var appPriceSchedule: Self { + .init(rawValue: "appPriceSchedule") + } + + public static var appStoreVersionExperimentsV2: Self { + .init(rawValue: "appStoreVersionExperimentsV2") + } + + public static var appStoreVersions: Self { + .init(rawValue: "appStoreVersions") + } + + public static var backgroundAssets: Self { + .init(rawValue: "backgroundAssets") + } + + public static var betaAppLocalizations: Self { + .init(rawValue: "betaAppLocalizations") + } + + public static var betaAppReviewDetail: Self { + .init(rawValue: "betaAppReviewDetail") + } + + public static var betaFeedbackCrashSubmissions: Self { + .init(rawValue: "betaFeedbackCrashSubmissions") + } + + public static var betaFeedbackScreenshotSubmissions: Self { + .init(rawValue: "betaFeedbackScreenshotSubmissions") + } + + public static var betaGroups: Self { + .init(rawValue: "betaGroups") + } + + public static var betaLicenseAgreement: Self { + .init(rawValue: "betaLicenseAgreement") + } + + public static var betaTesters: Self { + .init(rawValue: "betaTesters") + } + + public static var builds: Self { + .init(rawValue: "builds") + } + + public static var bundleId: Self { + .init(rawValue: "bundleId") + } + + public static var ciProduct: Self { + .init(rawValue: "ciProduct") + } + + public static var contentRightsDeclaration: Self { + .init(rawValue: "contentRightsDeclaration") + } + + public static var customerReviewSummarizations: Self { + .init(rawValue: "customerReviewSummarizations") + } + + public static var customerReviews: Self { + .init(rawValue: "customerReviews") + } + + public static var endUserLicenseAgreement: Self { + .init(rawValue: "endUserLicenseAgreement") + } + + public static var gameCenterDetail: Self { + .init(rawValue: "gameCenterDetail") } + public static var gameCenterEnabledVersions: Self { + .init(rawValue: "gameCenterEnabledVersions") + } + + public static var inAppPurchases: Self { + .init(rawValue: "inAppPurchases") + } + + public static var inAppPurchasesV2: Self { + .init(rawValue: "inAppPurchasesV2") + } + + public static var isOrEverWasMadeForKids: Self { + .init(rawValue: "isOrEverWasMadeForKids") + } + + public static var marketplaceSearchDetail: Self { + .init(rawValue: "marketplaceSearchDetail") + } + + public static var name: Self { + .init(rawValue: "name") + } + + public static var perfPowerMetrics: Self { + .init(rawValue: "perfPowerMetrics") + } + + public static var preReleaseVersions: Self { + .init(rawValue: "preReleaseVersions") + } + + public static var primaryLocale: Self { + .init(rawValue: "primaryLocale") + } + + public static var promotedPurchases: Self { + .init(rawValue: "promotedPurchases") + } + + public static var reviewSubmissions: Self { + .init(rawValue: "reviewSubmissions") + } + + public static var sku: Self { + .init(rawValue: "sku") + } + + public static var streamlinedPurchasingEnabled: Self { + .init(rawValue: "streamlinedPurchasingEnabled") + } + + public static var subscriptionGracePeriod: Self { + .init(rawValue: "subscriptionGracePeriod") + } + + public static var subscriptionGroups: Self { + .init(rawValue: "subscriptionGroups") + } + + public static var subscriptionStatusUrl: Self { + .init(rawValue: "subscriptionStatusUrl") + } + + public static var subscriptionStatusUrlForSandbox: Self { + .init(rawValue: "subscriptionStatusUrlForSandbox") + } + + public static var subscriptionStatusUrlVersion: Self { + .init(rawValue: "subscriptionStatusUrlVersion") + } + + public static var subscriptionStatusUrlVersionForSandbox: Self { + .init(rawValue: "subscriptionStatusUrlVersionForSandbox") + } + + public static var webhooks: Self { + .init(rawValue: "webhooks") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "appAvailability": self = .appAvailability - case "appClips": self = .appClips - case "appCustomProductPages": self = .appCustomProductPages - case "appEncryptionDeclarations": self = .appEncryptionDeclarations - case "appEvents": self = .appEvents - case "appInfos": self = .appInfos - case "appPricePoints": self = .appPricePoints - case "appPriceSchedule": self = .appPriceSchedule - case "appStoreVersionExperimentsV2": self = .appStoreVersionExperimentsV2 - case "appStoreVersions": self = .appStoreVersions - case "availableInNewTerritories": self = .availableInNewTerritories - case "availableTerritories": self = .availableTerritories - case "betaAppLocalizations": self = .betaAppLocalizations - case "betaAppReviewDetail": self = .betaAppReviewDetail - case "betaGroups": self = .betaGroups - case "betaLicenseAgreement": self = .betaLicenseAgreement - case "betaTesters": self = .betaTesters - case "builds": self = .builds - case "bundleId": self = .bundleId - case "ciProduct": self = .ciProduct - case "contentRightsDeclaration": self = .contentRightsDeclaration - case "customerReviews": self = .customerReviews - case "endUserLicenseAgreement": self = .endUserLicenseAgreement - case "gameCenterDetail": self = .gameCenterDetail - case "gameCenterEnabledVersions": self = .gameCenterEnabledVersions - case "inAppPurchases": self = .inAppPurchases - case "inAppPurchasesV2": self = .inAppPurchasesV2 - case "isOrEverWasMadeForKids": self = .isOrEverWasMadeForKids - case "name": self = .name - case "perfPowerMetrics": self = .perfPowerMetrics - case "preOrder": self = .preOrder - case "preReleaseVersions": self = .preReleaseVersions - case "pricePoints": self = .pricePoints - case "prices": self = .prices - case "primaryLocale": self = .primaryLocale - case "promotedPurchases": self = .promotedPurchases - case "reviewSubmissions": self = .reviewSubmissions - case "sku": self = .sku - case "subscriptionGracePeriod": self = .subscriptionGracePeriod - case "subscriptionGroups": self = .subscriptionGroups - case "subscriptionStatusUrl": self = .subscriptionStatusUrl - case "subscriptionStatusUrlForSandbox": self = .subscriptionStatusUrlForSandbox - case "subscriptionStatusUrlVersion": self = .subscriptionStatusUrlVersion - case "subscriptionStatusUrlVersionForSandbox": self = .subscriptionStatusUrlVersionForSandbox - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum BetaAppLocalizations: Hashable, Codable, RawRepresentable { - case app - case description - case feedbackEmail - case locale - case marketingUrl - case privacyPolicyUrl - case tvOsPrivacyPolicy - case unknown(String) - - public var rawValue: String { - switch self { - case .app: return "app" - case .description: return "description" - case .feedbackEmail: return "feedbackEmail" - case .locale: return "locale" - case .marketingUrl: return "marketingUrl" - case .privacyPolicyUrl: return "privacyPolicyUrl" - case .tvOsPrivacyPolicy: return "tvOsPrivacyPolicy" - case .unknown(let rawValue): return rawValue - } + public struct BetaAppLocalizations: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var app: Self { + .init(rawValue: "app") + } + + public static var description: Self { + .init(rawValue: "description") + } + + public static var feedbackEmail: Self { + .init(rawValue: "feedbackEmail") } + public static var locale: Self { + .init(rawValue: "locale") + } + + public static var marketingUrl: Self { + .init(rawValue: "marketingUrl") + } + + public static var privacyPolicyUrl: Self { + .init(rawValue: "privacyPolicyUrl") + } + + public static var tvOsPrivacyPolicy: Self { + .init(rawValue: "tvOsPrivacyPolicy") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "app": self = .app - case "description": self = .description - case "feedbackEmail": self = .feedbackEmail - case "locale": self = .locale - case "marketingUrl": self = .marketingUrl - case "privacyPolicyUrl": self = .privacyPolicyUrl - case "tvOsPrivacyPolicy": self = .tvOsPrivacyPolicy - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } @@ -324,22 +399,19 @@ extension V1.BetaAppLocalizations.GET { } } - public enum Include: Hashable, Codable, RawRepresentable { - case app - case unknown(String) + public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var app: Self { + .init(rawValue: "app") + } - public var rawValue: String { - switch self { - case .app: return "app" - case .unknown(let rawValue): return rawValue - } + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "app": self = .app - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaAppLocalizations/BetaAppLocalizations.POST.a08bdc9.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaAppLocalizations/BetaAppLocalizations.POST.a08bdc9.generated.swift index 4bf29027..11f68be9 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaAppLocalizations/BetaAppLocalizations.POST.a08bdc9.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaAppLocalizations/BetaAppLocalizations.POST.a08bdc9.generated.swift @@ -41,8 +41,11 @@ extension V1.BetaAppLocalizations { /// - Returns: **201**, Single BetaAppLocalization as `BetaAppLocalizationResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **422**, Unprocessable request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -56,12 +59,21 @@ extension V1.BetaAppLocalizations { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 409: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 422: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaAppLocalizations/ById/App/BetaAppLocalizationsByIdApp.GET.8283110.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaAppLocalizations/ById/App/BetaAppLocalizationsByIdApp.GET.8283110.generated.swift index 16f23240..94638dc5 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaAppLocalizations/ById/App/BetaAppLocalizationsByIdApp.GET.8283110.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaAppLocalizations/ById/App/BetaAppLocalizationsByIdApp.GET.8283110.generated.swift @@ -42,8 +42,10 @@ extension V1.BetaAppLocalizations.ById.App { /// - Returns: **200**, Single App with get as `AppWithoutIncludesResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -57,12 +59,18 @@ extension V1.BetaAppLocalizations.ById.App { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 404: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -82,151 +90,215 @@ extension V1.BetaAppLocalizations.ById.App.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum Apps: Hashable, Codable, RawRepresentable { - case appAvailability - case appClips - case appCustomProductPages - case appEncryptionDeclarations - case appEvents - case appInfos - case appPricePoints - case appPriceSchedule - case appStoreVersionExperimentsV2 - case appStoreVersions - case availableInNewTerritories - case availableTerritories - case betaAppLocalizations - case betaAppReviewDetail - case betaGroups - case betaLicenseAgreement - case betaTesters - case builds - case bundleId - case ciProduct - case contentRightsDeclaration - case customerReviews - case endUserLicenseAgreement - case gameCenterDetail - case gameCenterEnabledVersions - case inAppPurchases - case inAppPurchasesV2 - case isOrEverWasMadeForKids - case name - case perfPowerMetrics - case preOrder - case preReleaseVersions - case pricePoints - case prices - case primaryLocale - case promotedPurchases - case reviewSubmissions - case sku - case subscriptionGracePeriod - case subscriptionGroups - case subscriptionStatusUrl - case subscriptionStatusUrlForSandbox - case subscriptionStatusUrlVersion - case subscriptionStatusUrlVersionForSandbox - case unknown(String) - - public var rawValue: String { - switch self { - case .appAvailability: return "appAvailability" - case .appClips: return "appClips" - case .appCustomProductPages: return "appCustomProductPages" - case .appEncryptionDeclarations: return "appEncryptionDeclarations" - case .appEvents: return "appEvents" - case .appInfos: return "appInfos" - case .appPricePoints: return "appPricePoints" - case .appPriceSchedule: return "appPriceSchedule" - case .appStoreVersionExperimentsV2: return "appStoreVersionExperimentsV2" - case .appStoreVersions: return "appStoreVersions" - case .availableInNewTerritories: return "availableInNewTerritories" - case .availableTerritories: return "availableTerritories" - case .betaAppLocalizations: return "betaAppLocalizations" - case .betaAppReviewDetail: return "betaAppReviewDetail" - case .betaGroups: return "betaGroups" - case .betaLicenseAgreement: return "betaLicenseAgreement" - case .betaTesters: return "betaTesters" - case .builds: return "builds" - case .bundleId: return "bundleId" - case .ciProduct: return "ciProduct" - case .contentRightsDeclaration: return "contentRightsDeclaration" - case .customerReviews: return "customerReviews" - case .endUserLicenseAgreement: return "endUserLicenseAgreement" - case .gameCenterDetail: return "gameCenterDetail" - case .gameCenterEnabledVersions: return "gameCenterEnabledVersions" - case .inAppPurchases: return "inAppPurchases" - case .inAppPurchasesV2: return "inAppPurchasesV2" - case .isOrEverWasMadeForKids: return "isOrEverWasMadeForKids" - case .name: return "name" - case .perfPowerMetrics: return "perfPowerMetrics" - case .preOrder: return "preOrder" - case .preReleaseVersions: return "preReleaseVersions" - case .pricePoints: return "pricePoints" - case .prices: return "prices" - case .primaryLocale: return "primaryLocale" - case .promotedPurchases: return "promotedPurchases" - case .reviewSubmissions: return "reviewSubmissions" - case .sku: return "sku" - case .subscriptionGracePeriod: return "subscriptionGracePeriod" - case .subscriptionGroups: return "subscriptionGroups" - case .subscriptionStatusUrl: return "subscriptionStatusUrl" - case .subscriptionStatusUrlForSandbox: return "subscriptionStatusUrlForSandbox" - case .subscriptionStatusUrlVersion: return "subscriptionStatusUrlVersion" - case .subscriptionStatusUrlVersionForSandbox: return "subscriptionStatusUrlVersionForSandbox" - case .unknown(let rawValue): return rawValue - } + public struct Apps: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var accessibilityDeclarations: Self { + .init(rawValue: "accessibilityDeclarations") + } + + public static var accessibilityUrl: Self { + .init(rawValue: "accessibilityUrl") + } + + public static var alternativeDistributionKey: Self { + .init(rawValue: "alternativeDistributionKey") + } + + public static var analyticsReportRequests: Self { + .init(rawValue: "analyticsReportRequests") + } + + public static var appAvailabilityV2: Self { + .init(rawValue: "appAvailabilityV2") + } + + public static var appClips: Self { + .init(rawValue: "appClips") } + public static var appCustomProductPages: Self { + .init(rawValue: "appCustomProductPages") + } + + public static var appEncryptionDeclarations: Self { + .init(rawValue: "appEncryptionDeclarations") + } + + public static var appEvents: Self { + .init(rawValue: "appEvents") + } + + public static var appInfos: Self { + .init(rawValue: "appInfos") + } + + public static var appPricePoints: Self { + .init(rawValue: "appPricePoints") + } + + public static var appPriceSchedule: Self { + .init(rawValue: "appPriceSchedule") + } + + public static var appStoreVersionExperimentsV2: Self { + .init(rawValue: "appStoreVersionExperimentsV2") + } + + public static var appStoreVersions: Self { + .init(rawValue: "appStoreVersions") + } + + public static var backgroundAssets: Self { + .init(rawValue: "backgroundAssets") + } + + public static var betaAppLocalizations: Self { + .init(rawValue: "betaAppLocalizations") + } + + public static var betaAppReviewDetail: Self { + .init(rawValue: "betaAppReviewDetail") + } + + public static var betaFeedbackCrashSubmissions: Self { + .init(rawValue: "betaFeedbackCrashSubmissions") + } + + public static var betaFeedbackScreenshotSubmissions: Self { + .init(rawValue: "betaFeedbackScreenshotSubmissions") + } + + public static var betaGroups: Self { + .init(rawValue: "betaGroups") + } + + public static var betaLicenseAgreement: Self { + .init(rawValue: "betaLicenseAgreement") + } + + public static var betaTesters: Self { + .init(rawValue: "betaTesters") + } + + public static var builds: Self { + .init(rawValue: "builds") + } + + public static var bundleId: Self { + .init(rawValue: "bundleId") + } + + public static var ciProduct: Self { + .init(rawValue: "ciProduct") + } + + public static var contentRightsDeclaration: Self { + .init(rawValue: "contentRightsDeclaration") + } + + public static var customerReviewSummarizations: Self { + .init(rawValue: "customerReviewSummarizations") + } + + public static var customerReviews: Self { + .init(rawValue: "customerReviews") + } + + public static var endUserLicenseAgreement: Self { + .init(rawValue: "endUserLicenseAgreement") + } + + public static var gameCenterDetail: Self { + .init(rawValue: "gameCenterDetail") + } + + public static var gameCenterEnabledVersions: Self { + .init(rawValue: "gameCenterEnabledVersions") + } + + public static var inAppPurchases: Self { + .init(rawValue: "inAppPurchases") + } + + public static var inAppPurchasesV2: Self { + .init(rawValue: "inAppPurchasesV2") + } + + public static var isOrEverWasMadeForKids: Self { + .init(rawValue: "isOrEverWasMadeForKids") + } + + public static var marketplaceSearchDetail: Self { + .init(rawValue: "marketplaceSearchDetail") + } + + public static var name: Self { + .init(rawValue: "name") + } + + public static var perfPowerMetrics: Self { + .init(rawValue: "perfPowerMetrics") + } + + public static var preReleaseVersions: Self { + .init(rawValue: "preReleaseVersions") + } + + public static var primaryLocale: Self { + .init(rawValue: "primaryLocale") + } + + public static var promotedPurchases: Self { + .init(rawValue: "promotedPurchases") + } + + public static var reviewSubmissions: Self { + .init(rawValue: "reviewSubmissions") + } + + public static var sku: Self { + .init(rawValue: "sku") + } + + public static var streamlinedPurchasingEnabled: Self { + .init(rawValue: "streamlinedPurchasingEnabled") + } + + public static var subscriptionGracePeriod: Self { + .init(rawValue: "subscriptionGracePeriod") + } + + public static var subscriptionGroups: Self { + .init(rawValue: "subscriptionGroups") + } + + public static var subscriptionStatusUrl: Self { + .init(rawValue: "subscriptionStatusUrl") + } + + public static var subscriptionStatusUrlForSandbox: Self { + .init(rawValue: "subscriptionStatusUrlForSandbox") + } + + public static var subscriptionStatusUrlVersion: Self { + .init(rawValue: "subscriptionStatusUrlVersion") + } + + public static var subscriptionStatusUrlVersionForSandbox: Self { + .init(rawValue: "subscriptionStatusUrlVersionForSandbox") + } + + public static var webhooks: Self { + .init(rawValue: "webhooks") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "appAvailability": self = .appAvailability - case "appClips": self = .appClips - case "appCustomProductPages": self = .appCustomProductPages - case "appEncryptionDeclarations": self = .appEncryptionDeclarations - case "appEvents": self = .appEvents - case "appInfos": self = .appInfos - case "appPricePoints": self = .appPricePoints - case "appPriceSchedule": self = .appPriceSchedule - case "appStoreVersionExperimentsV2": self = .appStoreVersionExperimentsV2 - case "appStoreVersions": self = .appStoreVersions - case "availableInNewTerritories": self = .availableInNewTerritories - case "availableTerritories": self = .availableTerritories - case "betaAppLocalizations": self = .betaAppLocalizations - case "betaAppReviewDetail": self = .betaAppReviewDetail - case "betaGroups": self = .betaGroups - case "betaLicenseAgreement": self = .betaLicenseAgreement - case "betaTesters": self = .betaTesters - case "builds": self = .builds - case "bundleId": self = .bundleId - case "ciProduct": self = .ciProduct - case "contentRightsDeclaration": self = .contentRightsDeclaration - case "customerReviews": self = .customerReviews - case "endUserLicenseAgreement": self = .endUserLicenseAgreement - case "gameCenterDetail": self = .gameCenterDetail - case "gameCenterEnabledVersions": self = .gameCenterEnabledVersions - case "inAppPurchases": self = .inAppPurchases - case "inAppPurchasesV2": self = .inAppPurchasesV2 - case "isOrEverWasMadeForKids": self = .isOrEverWasMadeForKids - case "name": self = .name - case "perfPowerMetrics": self = .perfPowerMetrics - case "preOrder": self = .preOrder - case "preReleaseVersions": self = .preReleaseVersions - case "pricePoints": self = .pricePoints - case "prices": self = .prices - case "primaryLocale": self = .primaryLocale - case "promotedPurchases": self = .promotedPurchases - case "reviewSubmissions": self = .reviewSubmissions - case "sku": self = .sku - case "subscriptionGracePeriod": self = .subscriptionGracePeriod - case "subscriptionGroups": self = .subscriptionGroups - case "subscriptionStatusUrl": self = .subscriptionStatusUrl - case "subscriptionStatusUrlForSandbox": self = .subscriptionStatusUrlForSandbox - case "subscriptionStatusUrlVersion": self = .subscriptionStatusUrlVersion - case "subscriptionStatusUrlVersionForSandbox": self = .subscriptionStatusUrlVersionForSandbox - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaAppLocalizations/ById/BetaAppLocalizationsById.DELETE.59c6c03.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaAppLocalizations/ById/BetaAppLocalizationsById.DELETE.59c6c03.generated.swift index b0b8c862..49ad339e 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaAppLocalizations/ById/BetaAppLocalizationsById.DELETE.59c6c03.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaAppLocalizations/ById/BetaAppLocalizationsById.DELETE.59c6c03.generated.swift @@ -31,11 +31,12 @@ extension V1.BetaAppLocalizations.ById { return urlRequest } - /// - Returns: **204**, Success (no content) /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -43,12 +44,12 @@ extension V1.BetaAppLocalizations.ById { } switch urlResponse.statusCode { - case 204: - return - case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) @@ -58,6 +59,9 @@ extension V1.BetaAppLocalizations.ById { case 409: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaAppLocalizations/ById/BetaAppLocalizationsById.GET.59c6c03.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaAppLocalizations/ById/BetaAppLocalizationsById.GET.59c6c03.generated.swift index 5bc98154..0af1c73b 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaAppLocalizations/ById/BetaAppLocalizationsById.GET.59c6c03.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaAppLocalizations/ById/BetaAppLocalizationsById.GET.59c6c03.generated.swift @@ -46,8 +46,10 @@ extension V1.BetaAppLocalizations.ById { /// - Returns: **200**, Single BetaAppLocalization as `BetaAppLocalizationResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -61,12 +63,18 @@ extension V1.BetaAppLocalizations.ById { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 404: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -89,188 +97,255 @@ extension V1.BetaAppLocalizations.ById.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum Apps: Hashable, Codable, RawRepresentable { - case appAvailability - case appClips - case appCustomProductPages - case appEncryptionDeclarations - case appEvents - case appInfos - case appPricePoints - case appPriceSchedule - case appStoreVersionExperimentsV2 - case appStoreVersions - case availableInNewTerritories - case availableTerritories - case betaAppLocalizations - case betaAppReviewDetail - case betaGroups - case betaLicenseAgreement - case betaTesters - case builds - case bundleId - case ciProduct - case contentRightsDeclaration - case customerReviews - case endUserLicenseAgreement - case gameCenterDetail - case gameCenterEnabledVersions - case inAppPurchases - case inAppPurchasesV2 - case isOrEverWasMadeForKids - case name - case perfPowerMetrics - case preOrder - case preReleaseVersions - case pricePoints - case prices - case primaryLocale - case promotedPurchases - case reviewSubmissions - case sku - case subscriptionGracePeriod - case subscriptionGroups - case subscriptionStatusUrl - case subscriptionStatusUrlForSandbox - case subscriptionStatusUrlVersion - case subscriptionStatusUrlVersionForSandbox - case unknown(String) - - public var rawValue: String { - switch self { - case .appAvailability: return "appAvailability" - case .appClips: return "appClips" - case .appCustomProductPages: return "appCustomProductPages" - case .appEncryptionDeclarations: return "appEncryptionDeclarations" - case .appEvents: return "appEvents" - case .appInfos: return "appInfos" - case .appPricePoints: return "appPricePoints" - case .appPriceSchedule: return "appPriceSchedule" - case .appStoreVersionExperimentsV2: return "appStoreVersionExperimentsV2" - case .appStoreVersions: return "appStoreVersions" - case .availableInNewTerritories: return "availableInNewTerritories" - case .availableTerritories: return "availableTerritories" - case .betaAppLocalizations: return "betaAppLocalizations" - case .betaAppReviewDetail: return "betaAppReviewDetail" - case .betaGroups: return "betaGroups" - case .betaLicenseAgreement: return "betaLicenseAgreement" - case .betaTesters: return "betaTesters" - case .builds: return "builds" - case .bundleId: return "bundleId" - case .ciProduct: return "ciProduct" - case .contentRightsDeclaration: return "contentRightsDeclaration" - case .customerReviews: return "customerReviews" - case .endUserLicenseAgreement: return "endUserLicenseAgreement" - case .gameCenterDetail: return "gameCenterDetail" - case .gameCenterEnabledVersions: return "gameCenterEnabledVersions" - case .inAppPurchases: return "inAppPurchases" - case .inAppPurchasesV2: return "inAppPurchasesV2" - case .isOrEverWasMadeForKids: return "isOrEverWasMadeForKids" - case .name: return "name" - case .perfPowerMetrics: return "perfPowerMetrics" - case .preOrder: return "preOrder" - case .preReleaseVersions: return "preReleaseVersions" - case .pricePoints: return "pricePoints" - case .prices: return "prices" - case .primaryLocale: return "primaryLocale" - case .promotedPurchases: return "promotedPurchases" - case .reviewSubmissions: return "reviewSubmissions" - case .sku: return "sku" - case .subscriptionGracePeriod: return "subscriptionGracePeriod" - case .subscriptionGroups: return "subscriptionGroups" - case .subscriptionStatusUrl: return "subscriptionStatusUrl" - case .subscriptionStatusUrlForSandbox: return "subscriptionStatusUrlForSandbox" - case .subscriptionStatusUrlVersion: return "subscriptionStatusUrlVersion" - case .subscriptionStatusUrlVersionForSandbox: return "subscriptionStatusUrlVersionForSandbox" - case .unknown(let rawValue): return rawValue - } + public struct Apps: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var accessibilityDeclarations: Self { + .init(rawValue: "accessibilityDeclarations") + } + + public static var accessibilityUrl: Self { + .init(rawValue: "accessibilityUrl") + } + + public static var alternativeDistributionKey: Self { + .init(rawValue: "alternativeDistributionKey") + } + + public static var analyticsReportRequests: Self { + .init(rawValue: "analyticsReportRequests") + } + + public static var appAvailabilityV2: Self { + .init(rawValue: "appAvailabilityV2") + } + + public static var appClips: Self { + .init(rawValue: "appClips") + } + + public static var appCustomProductPages: Self { + .init(rawValue: "appCustomProductPages") + } + + public static var appEncryptionDeclarations: Self { + .init(rawValue: "appEncryptionDeclarations") + } + + public static var appEvents: Self { + .init(rawValue: "appEvents") + } + + public static var appInfos: Self { + .init(rawValue: "appInfos") + } + + public static var appPricePoints: Self { + .init(rawValue: "appPricePoints") + } + + public static var appPriceSchedule: Self { + .init(rawValue: "appPriceSchedule") + } + + public static var appStoreVersionExperimentsV2: Self { + .init(rawValue: "appStoreVersionExperimentsV2") + } + + public static var appStoreVersions: Self { + .init(rawValue: "appStoreVersions") + } + + public static var backgroundAssets: Self { + .init(rawValue: "backgroundAssets") + } + + public static var betaAppLocalizations: Self { + .init(rawValue: "betaAppLocalizations") + } + + public static var betaAppReviewDetail: Self { + .init(rawValue: "betaAppReviewDetail") + } + + public static var betaFeedbackCrashSubmissions: Self { + .init(rawValue: "betaFeedbackCrashSubmissions") + } + + public static var betaFeedbackScreenshotSubmissions: Self { + .init(rawValue: "betaFeedbackScreenshotSubmissions") + } + + public static var betaGroups: Self { + .init(rawValue: "betaGroups") + } + + public static var betaLicenseAgreement: Self { + .init(rawValue: "betaLicenseAgreement") + } + + public static var betaTesters: Self { + .init(rawValue: "betaTesters") + } + + public static var builds: Self { + .init(rawValue: "builds") + } + + public static var bundleId: Self { + .init(rawValue: "bundleId") + } + + public static var ciProduct: Self { + .init(rawValue: "ciProduct") + } + + public static var contentRightsDeclaration: Self { + .init(rawValue: "contentRightsDeclaration") + } + + public static var customerReviewSummarizations: Self { + .init(rawValue: "customerReviewSummarizations") + } + + public static var customerReviews: Self { + .init(rawValue: "customerReviews") + } + + public static var endUserLicenseAgreement: Self { + .init(rawValue: "endUserLicenseAgreement") + } + + public static var gameCenterDetail: Self { + .init(rawValue: "gameCenterDetail") } + public static var gameCenterEnabledVersions: Self { + .init(rawValue: "gameCenterEnabledVersions") + } + + public static var inAppPurchases: Self { + .init(rawValue: "inAppPurchases") + } + + public static var inAppPurchasesV2: Self { + .init(rawValue: "inAppPurchasesV2") + } + + public static var isOrEverWasMadeForKids: Self { + .init(rawValue: "isOrEverWasMadeForKids") + } + + public static var marketplaceSearchDetail: Self { + .init(rawValue: "marketplaceSearchDetail") + } + + public static var name: Self { + .init(rawValue: "name") + } + + public static var perfPowerMetrics: Self { + .init(rawValue: "perfPowerMetrics") + } + + public static var preReleaseVersions: Self { + .init(rawValue: "preReleaseVersions") + } + + public static var primaryLocale: Self { + .init(rawValue: "primaryLocale") + } + + public static var promotedPurchases: Self { + .init(rawValue: "promotedPurchases") + } + + public static var reviewSubmissions: Self { + .init(rawValue: "reviewSubmissions") + } + + public static var sku: Self { + .init(rawValue: "sku") + } + + public static var streamlinedPurchasingEnabled: Self { + .init(rawValue: "streamlinedPurchasingEnabled") + } + + public static var subscriptionGracePeriod: Self { + .init(rawValue: "subscriptionGracePeriod") + } + + public static var subscriptionGroups: Self { + .init(rawValue: "subscriptionGroups") + } + + public static var subscriptionStatusUrl: Self { + .init(rawValue: "subscriptionStatusUrl") + } + + public static var subscriptionStatusUrlForSandbox: Self { + .init(rawValue: "subscriptionStatusUrlForSandbox") + } + + public static var subscriptionStatusUrlVersion: Self { + .init(rawValue: "subscriptionStatusUrlVersion") + } + + public static var subscriptionStatusUrlVersionForSandbox: Self { + .init(rawValue: "subscriptionStatusUrlVersionForSandbox") + } + + public static var webhooks: Self { + .init(rawValue: "webhooks") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "appAvailability": self = .appAvailability - case "appClips": self = .appClips - case "appCustomProductPages": self = .appCustomProductPages - case "appEncryptionDeclarations": self = .appEncryptionDeclarations - case "appEvents": self = .appEvents - case "appInfos": self = .appInfos - case "appPricePoints": self = .appPricePoints - case "appPriceSchedule": self = .appPriceSchedule - case "appStoreVersionExperimentsV2": self = .appStoreVersionExperimentsV2 - case "appStoreVersions": self = .appStoreVersions - case "availableInNewTerritories": self = .availableInNewTerritories - case "availableTerritories": self = .availableTerritories - case "betaAppLocalizations": self = .betaAppLocalizations - case "betaAppReviewDetail": self = .betaAppReviewDetail - case "betaGroups": self = .betaGroups - case "betaLicenseAgreement": self = .betaLicenseAgreement - case "betaTesters": self = .betaTesters - case "builds": self = .builds - case "bundleId": self = .bundleId - case "ciProduct": self = .ciProduct - case "contentRightsDeclaration": self = .contentRightsDeclaration - case "customerReviews": self = .customerReviews - case "endUserLicenseAgreement": self = .endUserLicenseAgreement - case "gameCenterDetail": self = .gameCenterDetail - case "gameCenterEnabledVersions": self = .gameCenterEnabledVersions - case "inAppPurchases": self = .inAppPurchases - case "inAppPurchasesV2": self = .inAppPurchasesV2 - case "isOrEverWasMadeForKids": self = .isOrEverWasMadeForKids - case "name": self = .name - case "perfPowerMetrics": self = .perfPowerMetrics - case "preOrder": self = .preOrder - case "preReleaseVersions": self = .preReleaseVersions - case "pricePoints": self = .pricePoints - case "prices": self = .prices - case "primaryLocale": self = .primaryLocale - case "promotedPurchases": self = .promotedPurchases - case "reviewSubmissions": self = .reviewSubmissions - case "sku": self = .sku - case "subscriptionGracePeriod": self = .subscriptionGracePeriod - case "subscriptionGroups": self = .subscriptionGroups - case "subscriptionStatusUrl": self = .subscriptionStatusUrl - case "subscriptionStatusUrlForSandbox": self = .subscriptionStatusUrlForSandbox - case "subscriptionStatusUrlVersion": self = .subscriptionStatusUrlVersion - case "subscriptionStatusUrlVersionForSandbox": self = .subscriptionStatusUrlVersionForSandbox - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum BetaAppLocalizations: Hashable, Codable, RawRepresentable { - case app - case description - case feedbackEmail - case locale - case marketingUrl - case privacyPolicyUrl - case tvOsPrivacyPolicy - case unknown(String) - - public var rawValue: String { - switch self { - case .app: return "app" - case .description: return "description" - case .feedbackEmail: return "feedbackEmail" - case .locale: return "locale" - case .marketingUrl: return "marketingUrl" - case .privacyPolicyUrl: return "privacyPolicyUrl" - case .tvOsPrivacyPolicy: return "tvOsPrivacyPolicy" - case .unknown(let rawValue): return rawValue - } + public struct BetaAppLocalizations: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var app: Self { + .init(rawValue: "app") + } + + public static var description: Self { + .init(rawValue: "description") + } + + public static var feedbackEmail: Self { + .init(rawValue: "feedbackEmail") } + public static var locale: Self { + .init(rawValue: "locale") + } + + public static var marketingUrl: Self { + .init(rawValue: "marketingUrl") + } + + public static var privacyPolicyUrl: Self { + .init(rawValue: "privacyPolicyUrl") + } + + public static var tvOsPrivacyPolicy: Self { + .init(rawValue: "tvOsPrivacyPolicy") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "app": self = .app - case "description": self = .description - case "feedbackEmail": self = .feedbackEmail - case "locale": self = .locale - case "marketingUrl": self = .marketingUrl - case "privacyPolicyUrl": self = .privacyPolicyUrl - case "tvOsPrivacyPolicy": self = .tvOsPrivacyPolicy - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } @@ -293,22 +368,19 @@ extension V1.BetaAppLocalizations.ById.GET { } } - public enum Include: Hashable, Codable, RawRepresentable { - case app - case unknown(String) + public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var app: Self { + .init(rawValue: "app") + } - public var rawValue: String { - switch self { - case .app: return "app" - case .unknown(let rawValue): return rawValue - } + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "app": self = .app - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaAppLocalizations/ById/BetaAppLocalizationsById.PATCH.59c6c03.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaAppLocalizations/ById/BetaAppLocalizationsById.PATCH.59c6c03.generated.swift index 81f8b1c7..fd411cd5 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaAppLocalizations/ById/BetaAppLocalizationsById.PATCH.59c6c03.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaAppLocalizations/ById/BetaAppLocalizationsById.PATCH.59c6c03.generated.swift @@ -48,9 +48,12 @@ extension V1.BetaAppLocalizations.ById { /// - Returns: **200**, Single BetaAppLocalization as `BetaAppLocalizationResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **422**, Unprocessable request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -64,6 +67,9 @@ extension V1.BetaAppLocalizations.ById { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) @@ -73,6 +79,12 @@ extension V1.BetaAppLocalizations.ById { case 409: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 422: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaAppLocalizations/ById/Relationships/App/BetaAppLocalizationsByIdRelationshipsApp.GET.ec25861.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaAppLocalizations/ById/Relationships/App/BetaAppLocalizationsByIdRelationshipsApp.GET.ec25861.generated.swift new file mode 100644 index 00000000..74dee43c --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaAppLocalizations/ById/Relationships/App/BetaAppLocalizationsByIdRelationshipsApp.GET.ec25861.generated.swift @@ -0,0 +1,86 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.BetaAppLocalizations.ById.Relationships.App { + public struct GET: Endpoint { + public typealias Response = BetaAppLocalizationAppLinkageResponse + + public var path: String { + "/v1/betaAppLocalizations/\(id)/relationships/app" + } + + /// the id of the requested resource + public var id: String + + public var parameters: Parameters = Parameters() + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + components?.queryItems = [ + + ].filter { $0.value != nil } + if components?.queryItems?.isEmpty ?? false { + components?.queryItems = nil + } + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "GET" + return urlRequest + } + + /// - Returns: **200**, Related linkage as `BetaAppLocalizationAppLinkageResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(BetaAppLocalizationAppLinkageResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +extension V1.BetaAppLocalizations.ById.Relationships.App.GET { + public struct Parameters: Hashable { + + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaAppReviewDetails/BetaAppReviewDetails.GET.1e9828a.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaAppReviewDetails/BetaAppReviewDetails.GET.1e9828a.generated.swift index d65dbed9..c5a18309 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaAppReviewDetails/BetaAppReviewDetails.GET.1e9828a.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaAppReviewDetails/BetaAppReviewDetails.GET.1e9828a.generated.swift @@ -47,7 +47,9 @@ extension V1.BetaAppReviewDetails { /// - Returns: **200**, List of BetaAppReviewDetails as `BetaAppReviewDetailsResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -61,9 +63,15 @@ extension V1.BetaAppReviewDetails { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -91,194 +99,263 @@ extension V1.BetaAppReviewDetails.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum Apps: Hashable, Codable, RawRepresentable { - case appAvailability - case appClips - case appCustomProductPages - case appEncryptionDeclarations - case appEvents - case appInfos - case appPricePoints - case appPriceSchedule - case appStoreVersionExperimentsV2 - case appStoreVersions - case availableInNewTerritories - case availableTerritories - case betaAppLocalizations - case betaAppReviewDetail - case betaGroups - case betaLicenseAgreement - case betaTesters - case builds - case bundleId - case ciProduct - case contentRightsDeclaration - case customerReviews - case endUserLicenseAgreement - case gameCenterDetail - case gameCenterEnabledVersions - case inAppPurchases - case inAppPurchasesV2 - case isOrEverWasMadeForKids - case name - case perfPowerMetrics - case preOrder - case preReleaseVersions - case pricePoints - case prices - case primaryLocale - case promotedPurchases - case reviewSubmissions - case sku - case subscriptionGracePeriod - case subscriptionGroups - case subscriptionStatusUrl - case subscriptionStatusUrlForSandbox - case subscriptionStatusUrlVersion - case subscriptionStatusUrlVersionForSandbox - case unknown(String) - - public var rawValue: String { - switch self { - case .appAvailability: return "appAvailability" - case .appClips: return "appClips" - case .appCustomProductPages: return "appCustomProductPages" - case .appEncryptionDeclarations: return "appEncryptionDeclarations" - case .appEvents: return "appEvents" - case .appInfos: return "appInfos" - case .appPricePoints: return "appPricePoints" - case .appPriceSchedule: return "appPriceSchedule" - case .appStoreVersionExperimentsV2: return "appStoreVersionExperimentsV2" - case .appStoreVersions: return "appStoreVersions" - case .availableInNewTerritories: return "availableInNewTerritories" - case .availableTerritories: return "availableTerritories" - case .betaAppLocalizations: return "betaAppLocalizations" - case .betaAppReviewDetail: return "betaAppReviewDetail" - case .betaGroups: return "betaGroups" - case .betaLicenseAgreement: return "betaLicenseAgreement" - case .betaTesters: return "betaTesters" - case .builds: return "builds" - case .bundleId: return "bundleId" - case .ciProduct: return "ciProduct" - case .contentRightsDeclaration: return "contentRightsDeclaration" - case .customerReviews: return "customerReviews" - case .endUserLicenseAgreement: return "endUserLicenseAgreement" - case .gameCenterDetail: return "gameCenterDetail" - case .gameCenterEnabledVersions: return "gameCenterEnabledVersions" - case .inAppPurchases: return "inAppPurchases" - case .inAppPurchasesV2: return "inAppPurchasesV2" - case .isOrEverWasMadeForKids: return "isOrEverWasMadeForKids" - case .name: return "name" - case .perfPowerMetrics: return "perfPowerMetrics" - case .preOrder: return "preOrder" - case .preReleaseVersions: return "preReleaseVersions" - case .pricePoints: return "pricePoints" - case .prices: return "prices" - case .primaryLocale: return "primaryLocale" - case .promotedPurchases: return "promotedPurchases" - case .reviewSubmissions: return "reviewSubmissions" - case .sku: return "sku" - case .subscriptionGracePeriod: return "subscriptionGracePeriod" - case .subscriptionGroups: return "subscriptionGroups" - case .subscriptionStatusUrl: return "subscriptionStatusUrl" - case .subscriptionStatusUrlForSandbox: return "subscriptionStatusUrlForSandbox" - case .subscriptionStatusUrlVersion: return "subscriptionStatusUrlVersion" - case .subscriptionStatusUrlVersionForSandbox: return "subscriptionStatusUrlVersionForSandbox" - case .unknown(let rawValue): return rawValue - } + public struct Apps: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var accessibilityDeclarations: Self { + .init(rawValue: "accessibilityDeclarations") + } + + public static var accessibilityUrl: Self { + .init(rawValue: "accessibilityUrl") + } + + public static var alternativeDistributionKey: Self { + .init(rawValue: "alternativeDistributionKey") + } + + public static var analyticsReportRequests: Self { + .init(rawValue: "analyticsReportRequests") + } + + public static var appAvailabilityV2: Self { + .init(rawValue: "appAvailabilityV2") + } + + public static var appClips: Self { + .init(rawValue: "appClips") + } + + public static var appCustomProductPages: Self { + .init(rawValue: "appCustomProductPages") + } + + public static var appEncryptionDeclarations: Self { + .init(rawValue: "appEncryptionDeclarations") + } + + public static var appEvents: Self { + .init(rawValue: "appEvents") + } + + public static var appInfos: Self { + .init(rawValue: "appInfos") + } + + public static var appPricePoints: Self { + .init(rawValue: "appPricePoints") + } + + public static var appPriceSchedule: Self { + .init(rawValue: "appPriceSchedule") + } + + public static var appStoreVersionExperimentsV2: Self { + .init(rawValue: "appStoreVersionExperimentsV2") + } + + public static var appStoreVersions: Self { + .init(rawValue: "appStoreVersions") + } + + public static var backgroundAssets: Self { + .init(rawValue: "backgroundAssets") + } + + public static var betaAppLocalizations: Self { + .init(rawValue: "betaAppLocalizations") + } + + public static var betaAppReviewDetail: Self { + .init(rawValue: "betaAppReviewDetail") + } + + public static var betaFeedbackCrashSubmissions: Self { + .init(rawValue: "betaFeedbackCrashSubmissions") + } + + public static var betaFeedbackScreenshotSubmissions: Self { + .init(rawValue: "betaFeedbackScreenshotSubmissions") + } + + public static var betaGroups: Self { + .init(rawValue: "betaGroups") + } + + public static var betaLicenseAgreement: Self { + .init(rawValue: "betaLicenseAgreement") + } + + public static var betaTesters: Self { + .init(rawValue: "betaTesters") + } + + public static var builds: Self { + .init(rawValue: "builds") + } + + public static var bundleId: Self { + .init(rawValue: "bundleId") + } + + public static var ciProduct: Self { + .init(rawValue: "ciProduct") + } + + public static var contentRightsDeclaration: Self { + .init(rawValue: "contentRightsDeclaration") + } + + public static var customerReviewSummarizations: Self { + .init(rawValue: "customerReviewSummarizations") + } + + public static var customerReviews: Self { + .init(rawValue: "customerReviews") + } + + public static var endUserLicenseAgreement: Self { + .init(rawValue: "endUserLicenseAgreement") + } + + public static var gameCenterDetail: Self { + .init(rawValue: "gameCenterDetail") + } + + public static var gameCenterEnabledVersions: Self { + .init(rawValue: "gameCenterEnabledVersions") } + public static var inAppPurchases: Self { + .init(rawValue: "inAppPurchases") + } + + public static var inAppPurchasesV2: Self { + .init(rawValue: "inAppPurchasesV2") + } + + public static var isOrEverWasMadeForKids: Self { + .init(rawValue: "isOrEverWasMadeForKids") + } + + public static var marketplaceSearchDetail: Self { + .init(rawValue: "marketplaceSearchDetail") + } + + public static var name: Self { + .init(rawValue: "name") + } + + public static var perfPowerMetrics: Self { + .init(rawValue: "perfPowerMetrics") + } + + public static var preReleaseVersions: Self { + .init(rawValue: "preReleaseVersions") + } + + public static var primaryLocale: Self { + .init(rawValue: "primaryLocale") + } + + public static var promotedPurchases: Self { + .init(rawValue: "promotedPurchases") + } + + public static var reviewSubmissions: Self { + .init(rawValue: "reviewSubmissions") + } + + public static var sku: Self { + .init(rawValue: "sku") + } + + public static var streamlinedPurchasingEnabled: Self { + .init(rawValue: "streamlinedPurchasingEnabled") + } + + public static var subscriptionGracePeriod: Self { + .init(rawValue: "subscriptionGracePeriod") + } + + public static var subscriptionGroups: Self { + .init(rawValue: "subscriptionGroups") + } + + public static var subscriptionStatusUrl: Self { + .init(rawValue: "subscriptionStatusUrl") + } + + public static var subscriptionStatusUrlForSandbox: Self { + .init(rawValue: "subscriptionStatusUrlForSandbox") + } + + public static var subscriptionStatusUrlVersion: Self { + .init(rawValue: "subscriptionStatusUrlVersion") + } + + public static var subscriptionStatusUrlVersionForSandbox: Self { + .init(rawValue: "subscriptionStatusUrlVersionForSandbox") + } + + public static var webhooks: Self { + .init(rawValue: "webhooks") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "appAvailability": self = .appAvailability - case "appClips": self = .appClips - case "appCustomProductPages": self = .appCustomProductPages - case "appEncryptionDeclarations": self = .appEncryptionDeclarations - case "appEvents": self = .appEvents - case "appInfos": self = .appInfos - case "appPricePoints": self = .appPricePoints - case "appPriceSchedule": self = .appPriceSchedule - case "appStoreVersionExperimentsV2": self = .appStoreVersionExperimentsV2 - case "appStoreVersions": self = .appStoreVersions - case "availableInNewTerritories": self = .availableInNewTerritories - case "availableTerritories": self = .availableTerritories - case "betaAppLocalizations": self = .betaAppLocalizations - case "betaAppReviewDetail": self = .betaAppReviewDetail - case "betaGroups": self = .betaGroups - case "betaLicenseAgreement": self = .betaLicenseAgreement - case "betaTesters": self = .betaTesters - case "builds": self = .builds - case "bundleId": self = .bundleId - case "ciProduct": self = .ciProduct - case "contentRightsDeclaration": self = .contentRightsDeclaration - case "customerReviews": self = .customerReviews - case "endUserLicenseAgreement": self = .endUserLicenseAgreement - case "gameCenterDetail": self = .gameCenterDetail - case "gameCenterEnabledVersions": self = .gameCenterEnabledVersions - case "inAppPurchases": self = .inAppPurchases - case "inAppPurchasesV2": self = .inAppPurchasesV2 - case "isOrEverWasMadeForKids": self = .isOrEverWasMadeForKids - case "name": self = .name - case "perfPowerMetrics": self = .perfPowerMetrics - case "preOrder": self = .preOrder - case "preReleaseVersions": self = .preReleaseVersions - case "pricePoints": self = .pricePoints - case "prices": self = .prices - case "primaryLocale": self = .primaryLocale - case "promotedPurchases": self = .promotedPurchases - case "reviewSubmissions": self = .reviewSubmissions - case "sku": self = .sku - case "subscriptionGracePeriod": self = .subscriptionGracePeriod - case "subscriptionGroups": self = .subscriptionGroups - case "subscriptionStatusUrl": self = .subscriptionStatusUrl - case "subscriptionStatusUrlForSandbox": self = .subscriptionStatusUrlForSandbox - case "subscriptionStatusUrlVersion": self = .subscriptionStatusUrlVersion - case "subscriptionStatusUrlVersionForSandbox": self = .subscriptionStatusUrlVersionForSandbox - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum BetaAppReviewDetails: Hashable, Codable, RawRepresentable { - case app - case contactEmail - case contactFirstName - case contactLastName - case contactPhone - case demoAccountName - case demoAccountPassword - case demoAccountRequired - case notes - case unknown(String) - - public var rawValue: String { - switch self { - case .app: return "app" - case .contactEmail: return "contactEmail" - case .contactFirstName: return "contactFirstName" - case .contactLastName: return "contactLastName" - case .contactPhone: return "contactPhone" - case .demoAccountName: return "demoAccountName" - case .demoAccountPassword: return "demoAccountPassword" - case .demoAccountRequired: return "demoAccountRequired" - case .notes: return "notes" - case .unknown(let rawValue): return rawValue - } + public struct BetaAppReviewDetails: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var app: Self { + .init(rawValue: "app") + } + + public static var contactEmail: Self { + .init(rawValue: "contactEmail") + } + + public static var contactFirstName: Self { + .init(rawValue: "contactFirstName") + } + + public static var contactLastName: Self { + .init(rawValue: "contactLastName") + } + + public static var contactPhone: Self { + .init(rawValue: "contactPhone") + } + + public static var demoAccountName: Self { + .init(rawValue: "demoAccountName") + } + + public static var demoAccountPassword: Self { + .init(rawValue: "demoAccountPassword") + } + + public static var demoAccountRequired: Self { + .init(rawValue: "demoAccountRequired") + } + + public static var notes: Self { + .init(rawValue: "notes") + } + + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "app": self = .app - case "contactEmail": self = .contactEmail - case "contactFirstName": self = .contactFirstName - case "contactLastName": self = .contactLastName - case "contactPhone": self = .contactPhone - case "demoAccountName": self = .demoAccountName - case "demoAccountPassword": self = .demoAccountPassword - case "demoAccountRequired": self = .demoAccountRequired - case "notes": self = .notes - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } @@ -323,22 +400,19 @@ extension V1.BetaAppReviewDetails.GET { } } - public enum Include: Hashable, Codable, RawRepresentable { - case app - case unknown(String) + public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var app: Self { + .init(rawValue: "app") + } - public var rawValue: String { - switch self { - case .app: return "app" - case .unknown(let rawValue): return rawValue - } + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "app": self = .app - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaAppReviewDetails/ById/App/BetaAppReviewDetailsByIdApp.GET.4bf8d5e.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaAppReviewDetails/ById/App/BetaAppReviewDetailsByIdApp.GET.4bf8d5e.generated.swift index 944543e9..2f3904f9 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaAppReviewDetails/ById/App/BetaAppReviewDetailsByIdApp.GET.4bf8d5e.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaAppReviewDetails/ById/App/BetaAppReviewDetailsByIdApp.GET.4bf8d5e.generated.swift @@ -42,8 +42,10 @@ extension V1.BetaAppReviewDetails.ById.App { /// - Returns: **200**, Single App with get as `AppWithoutIncludesResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -57,12 +59,18 @@ extension V1.BetaAppReviewDetails.ById.App { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 404: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -82,151 +90,215 @@ extension V1.BetaAppReviewDetails.ById.App.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum Apps: Hashable, Codable, RawRepresentable { - case appAvailability - case appClips - case appCustomProductPages - case appEncryptionDeclarations - case appEvents - case appInfos - case appPricePoints - case appPriceSchedule - case appStoreVersionExperimentsV2 - case appStoreVersions - case availableInNewTerritories - case availableTerritories - case betaAppLocalizations - case betaAppReviewDetail - case betaGroups - case betaLicenseAgreement - case betaTesters - case builds - case bundleId - case ciProduct - case contentRightsDeclaration - case customerReviews - case endUserLicenseAgreement - case gameCenterDetail - case gameCenterEnabledVersions - case inAppPurchases - case inAppPurchasesV2 - case isOrEverWasMadeForKids - case name - case perfPowerMetrics - case preOrder - case preReleaseVersions - case pricePoints - case prices - case primaryLocale - case promotedPurchases - case reviewSubmissions - case sku - case subscriptionGracePeriod - case subscriptionGroups - case subscriptionStatusUrl - case subscriptionStatusUrlForSandbox - case subscriptionStatusUrlVersion - case subscriptionStatusUrlVersionForSandbox - case unknown(String) - - public var rawValue: String { - switch self { - case .appAvailability: return "appAvailability" - case .appClips: return "appClips" - case .appCustomProductPages: return "appCustomProductPages" - case .appEncryptionDeclarations: return "appEncryptionDeclarations" - case .appEvents: return "appEvents" - case .appInfos: return "appInfos" - case .appPricePoints: return "appPricePoints" - case .appPriceSchedule: return "appPriceSchedule" - case .appStoreVersionExperimentsV2: return "appStoreVersionExperimentsV2" - case .appStoreVersions: return "appStoreVersions" - case .availableInNewTerritories: return "availableInNewTerritories" - case .availableTerritories: return "availableTerritories" - case .betaAppLocalizations: return "betaAppLocalizations" - case .betaAppReviewDetail: return "betaAppReviewDetail" - case .betaGroups: return "betaGroups" - case .betaLicenseAgreement: return "betaLicenseAgreement" - case .betaTesters: return "betaTesters" - case .builds: return "builds" - case .bundleId: return "bundleId" - case .ciProduct: return "ciProduct" - case .contentRightsDeclaration: return "contentRightsDeclaration" - case .customerReviews: return "customerReviews" - case .endUserLicenseAgreement: return "endUserLicenseAgreement" - case .gameCenterDetail: return "gameCenterDetail" - case .gameCenterEnabledVersions: return "gameCenterEnabledVersions" - case .inAppPurchases: return "inAppPurchases" - case .inAppPurchasesV2: return "inAppPurchasesV2" - case .isOrEverWasMadeForKids: return "isOrEverWasMadeForKids" - case .name: return "name" - case .perfPowerMetrics: return "perfPowerMetrics" - case .preOrder: return "preOrder" - case .preReleaseVersions: return "preReleaseVersions" - case .pricePoints: return "pricePoints" - case .prices: return "prices" - case .primaryLocale: return "primaryLocale" - case .promotedPurchases: return "promotedPurchases" - case .reviewSubmissions: return "reviewSubmissions" - case .sku: return "sku" - case .subscriptionGracePeriod: return "subscriptionGracePeriod" - case .subscriptionGroups: return "subscriptionGroups" - case .subscriptionStatusUrl: return "subscriptionStatusUrl" - case .subscriptionStatusUrlForSandbox: return "subscriptionStatusUrlForSandbox" - case .subscriptionStatusUrlVersion: return "subscriptionStatusUrlVersion" - case .subscriptionStatusUrlVersionForSandbox: return "subscriptionStatusUrlVersionForSandbox" - case .unknown(let rawValue): return rawValue - } + public struct Apps: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var accessibilityDeclarations: Self { + .init(rawValue: "accessibilityDeclarations") + } + + public static var accessibilityUrl: Self { + .init(rawValue: "accessibilityUrl") + } + + public static var alternativeDistributionKey: Self { + .init(rawValue: "alternativeDistributionKey") + } + + public static var analyticsReportRequests: Self { + .init(rawValue: "analyticsReportRequests") + } + + public static var appAvailabilityV2: Self { + .init(rawValue: "appAvailabilityV2") + } + + public static var appClips: Self { + .init(rawValue: "appClips") } + public static var appCustomProductPages: Self { + .init(rawValue: "appCustomProductPages") + } + + public static var appEncryptionDeclarations: Self { + .init(rawValue: "appEncryptionDeclarations") + } + + public static var appEvents: Self { + .init(rawValue: "appEvents") + } + + public static var appInfos: Self { + .init(rawValue: "appInfos") + } + + public static var appPricePoints: Self { + .init(rawValue: "appPricePoints") + } + + public static var appPriceSchedule: Self { + .init(rawValue: "appPriceSchedule") + } + + public static var appStoreVersionExperimentsV2: Self { + .init(rawValue: "appStoreVersionExperimentsV2") + } + + public static var appStoreVersions: Self { + .init(rawValue: "appStoreVersions") + } + + public static var backgroundAssets: Self { + .init(rawValue: "backgroundAssets") + } + + public static var betaAppLocalizations: Self { + .init(rawValue: "betaAppLocalizations") + } + + public static var betaAppReviewDetail: Self { + .init(rawValue: "betaAppReviewDetail") + } + + public static var betaFeedbackCrashSubmissions: Self { + .init(rawValue: "betaFeedbackCrashSubmissions") + } + + public static var betaFeedbackScreenshotSubmissions: Self { + .init(rawValue: "betaFeedbackScreenshotSubmissions") + } + + public static var betaGroups: Self { + .init(rawValue: "betaGroups") + } + + public static var betaLicenseAgreement: Self { + .init(rawValue: "betaLicenseAgreement") + } + + public static var betaTesters: Self { + .init(rawValue: "betaTesters") + } + + public static var builds: Self { + .init(rawValue: "builds") + } + + public static var bundleId: Self { + .init(rawValue: "bundleId") + } + + public static var ciProduct: Self { + .init(rawValue: "ciProduct") + } + + public static var contentRightsDeclaration: Self { + .init(rawValue: "contentRightsDeclaration") + } + + public static var customerReviewSummarizations: Self { + .init(rawValue: "customerReviewSummarizations") + } + + public static var customerReviews: Self { + .init(rawValue: "customerReviews") + } + + public static var endUserLicenseAgreement: Self { + .init(rawValue: "endUserLicenseAgreement") + } + + public static var gameCenterDetail: Self { + .init(rawValue: "gameCenterDetail") + } + + public static var gameCenterEnabledVersions: Self { + .init(rawValue: "gameCenterEnabledVersions") + } + + public static var inAppPurchases: Self { + .init(rawValue: "inAppPurchases") + } + + public static var inAppPurchasesV2: Self { + .init(rawValue: "inAppPurchasesV2") + } + + public static var isOrEverWasMadeForKids: Self { + .init(rawValue: "isOrEverWasMadeForKids") + } + + public static var marketplaceSearchDetail: Self { + .init(rawValue: "marketplaceSearchDetail") + } + + public static var name: Self { + .init(rawValue: "name") + } + + public static var perfPowerMetrics: Self { + .init(rawValue: "perfPowerMetrics") + } + + public static var preReleaseVersions: Self { + .init(rawValue: "preReleaseVersions") + } + + public static var primaryLocale: Self { + .init(rawValue: "primaryLocale") + } + + public static var promotedPurchases: Self { + .init(rawValue: "promotedPurchases") + } + + public static var reviewSubmissions: Self { + .init(rawValue: "reviewSubmissions") + } + + public static var sku: Self { + .init(rawValue: "sku") + } + + public static var streamlinedPurchasingEnabled: Self { + .init(rawValue: "streamlinedPurchasingEnabled") + } + + public static var subscriptionGracePeriod: Self { + .init(rawValue: "subscriptionGracePeriod") + } + + public static var subscriptionGroups: Self { + .init(rawValue: "subscriptionGroups") + } + + public static var subscriptionStatusUrl: Self { + .init(rawValue: "subscriptionStatusUrl") + } + + public static var subscriptionStatusUrlForSandbox: Self { + .init(rawValue: "subscriptionStatusUrlForSandbox") + } + + public static var subscriptionStatusUrlVersion: Self { + .init(rawValue: "subscriptionStatusUrlVersion") + } + + public static var subscriptionStatusUrlVersionForSandbox: Self { + .init(rawValue: "subscriptionStatusUrlVersionForSandbox") + } + + public static var webhooks: Self { + .init(rawValue: "webhooks") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "appAvailability": self = .appAvailability - case "appClips": self = .appClips - case "appCustomProductPages": self = .appCustomProductPages - case "appEncryptionDeclarations": self = .appEncryptionDeclarations - case "appEvents": self = .appEvents - case "appInfos": self = .appInfos - case "appPricePoints": self = .appPricePoints - case "appPriceSchedule": self = .appPriceSchedule - case "appStoreVersionExperimentsV2": self = .appStoreVersionExperimentsV2 - case "appStoreVersions": self = .appStoreVersions - case "availableInNewTerritories": self = .availableInNewTerritories - case "availableTerritories": self = .availableTerritories - case "betaAppLocalizations": self = .betaAppLocalizations - case "betaAppReviewDetail": self = .betaAppReviewDetail - case "betaGroups": self = .betaGroups - case "betaLicenseAgreement": self = .betaLicenseAgreement - case "betaTesters": self = .betaTesters - case "builds": self = .builds - case "bundleId": self = .bundleId - case "ciProduct": self = .ciProduct - case "contentRightsDeclaration": self = .contentRightsDeclaration - case "customerReviews": self = .customerReviews - case "endUserLicenseAgreement": self = .endUserLicenseAgreement - case "gameCenterDetail": self = .gameCenterDetail - case "gameCenterEnabledVersions": self = .gameCenterEnabledVersions - case "inAppPurchases": self = .inAppPurchases - case "inAppPurchasesV2": self = .inAppPurchasesV2 - case "isOrEverWasMadeForKids": self = .isOrEverWasMadeForKids - case "name": self = .name - case "perfPowerMetrics": self = .perfPowerMetrics - case "preOrder": self = .preOrder - case "preReleaseVersions": self = .preReleaseVersions - case "pricePoints": self = .pricePoints - case "prices": self = .prices - case "primaryLocale": self = .primaryLocale - case "promotedPurchases": self = .promotedPurchases - case "reviewSubmissions": self = .reviewSubmissions - case "sku": self = .sku - case "subscriptionGracePeriod": self = .subscriptionGracePeriod - case "subscriptionGroups": self = .subscriptionGroups - case "subscriptionStatusUrl": self = .subscriptionStatusUrl - case "subscriptionStatusUrlForSandbox": self = .subscriptionStatusUrlForSandbox - case "subscriptionStatusUrlVersion": self = .subscriptionStatusUrlVersion - case "subscriptionStatusUrlVersionForSandbox": self = .subscriptionStatusUrlVersionForSandbox - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaAppReviewDetails/ById/BetaAppReviewDetailsById.GET.0f84acd.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaAppReviewDetails/ById/BetaAppReviewDetailsById.GET.0f84acd.generated.swift index 0ca060da..dc86e4fc 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaAppReviewDetails/ById/BetaAppReviewDetailsById.GET.0f84acd.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaAppReviewDetails/ById/BetaAppReviewDetailsById.GET.0f84acd.generated.swift @@ -46,8 +46,10 @@ extension V1.BetaAppReviewDetails.ById { /// - Returns: **200**, Single BetaAppReviewDetail as `BetaAppReviewDetailResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -61,12 +63,18 @@ extension V1.BetaAppReviewDetails.ById { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 404: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -89,194 +97,263 @@ extension V1.BetaAppReviewDetails.ById.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum Apps: Hashable, Codable, RawRepresentable { - case appAvailability - case appClips - case appCustomProductPages - case appEncryptionDeclarations - case appEvents - case appInfos - case appPricePoints - case appPriceSchedule - case appStoreVersionExperimentsV2 - case appStoreVersions - case availableInNewTerritories - case availableTerritories - case betaAppLocalizations - case betaAppReviewDetail - case betaGroups - case betaLicenseAgreement - case betaTesters - case builds - case bundleId - case ciProduct - case contentRightsDeclaration - case customerReviews - case endUserLicenseAgreement - case gameCenterDetail - case gameCenterEnabledVersions - case inAppPurchases - case inAppPurchasesV2 - case isOrEverWasMadeForKids - case name - case perfPowerMetrics - case preOrder - case preReleaseVersions - case pricePoints - case prices - case primaryLocale - case promotedPurchases - case reviewSubmissions - case sku - case subscriptionGracePeriod - case subscriptionGroups - case subscriptionStatusUrl - case subscriptionStatusUrlForSandbox - case subscriptionStatusUrlVersion - case subscriptionStatusUrlVersionForSandbox - case unknown(String) - - public var rawValue: String { - switch self { - case .appAvailability: return "appAvailability" - case .appClips: return "appClips" - case .appCustomProductPages: return "appCustomProductPages" - case .appEncryptionDeclarations: return "appEncryptionDeclarations" - case .appEvents: return "appEvents" - case .appInfos: return "appInfos" - case .appPricePoints: return "appPricePoints" - case .appPriceSchedule: return "appPriceSchedule" - case .appStoreVersionExperimentsV2: return "appStoreVersionExperimentsV2" - case .appStoreVersions: return "appStoreVersions" - case .availableInNewTerritories: return "availableInNewTerritories" - case .availableTerritories: return "availableTerritories" - case .betaAppLocalizations: return "betaAppLocalizations" - case .betaAppReviewDetail: return "betaAppReviewDetail" - case .betaGroups: return "betaGroups" - case .betaLicenseAgreement: return "betaLicenseAgreement" - case .betaTesters: return "betaTesters" - case .builds: return "builds" - case .bundleId: return "bundleId" - case .ciProduct: return "ciProduct" - case .contentRightsDeclaration: return "contentRightsDeclaration" - case .customerReviews: return "customerReviews" - case .endUserLicenseAgreement: return "endUserLicenseAgreement" - case .gameCenterDetail: return "gameCenterDetail" - case .gameCenterEnabledVersions: return "gameCenterEnabledVersions" - case .inAppPurchases: return "inAppPurchases" - case .inAppPurchasesV2: return "inAppPurchasesV2" - case .isOrEverWasMadeForKids: return "isOrEverWasMadeForKids" - case .name: return "name" - case .perfPowerMetrics: return "perfPowerMetrics" - case .preOrder: return "preOrder" - case .preReleaseVersions: return "preReleaseVersions" - case .pricePoints: return "pricePoints" - case .prices: return "prices" - case .primaryLocale: return "primaryLocale" - case .promotedPurchases: return "promotedPurchases" - case .reviewSubmissions: return "reviewSubmissions" - case .sku: return "sku" - case .subscriptionGracePeriod: return "subscriptionGracePeriod" - case .subscriptionGroups: return "subscriptionGroups" - case .subscriptionStatusUrl: return "subscriptionStatusUrl" - case .subscriptionStatusUrlForSandbox: return "subscriptionStatusUrlForSandbox" - case .subscriptionStatusUrlVersion: return "subscriptionStatusUrlVersion" - case .subscriptionStatusUrlVersionForSandbox: return "subscriptionStatusUrlVersionForSandbox" - case .unknown(let rawValue): return rawValue - } + public struct Apps: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var accessibilityDeclarations: Self { + .init(rawValue: "accessibilityDeclarations") + } + + public static var accessibilityUrl: Self { + .init(rawValue: "accessibilityUrl") + } + + public static var alternativeDistributionKey: Self { + .init(rawValue: "alternativeDistributionKey") + } + + public static var analyticsReportRequests: Self { + .init(rawValue: "analyticsReportRequests") + } + + public static var appAvailabilityV2: Self { + .init(rawValue: "appAvailabilityV2") + } + + public static var appClips: Self { + .init(rawValue: "appClips") + } + + public static var appCustomProductPages: Self { + .init(rawValue: "appCustomProductPages") + } + + public static var appEncryptionDeclarations: Self { + .init(rawValue: "appEncryptionDeclarations") + } + + public static var appEvents: Self { + .init(rawValue: "appEvents") + } + + public static var appInfos: Self { + .init(rawValue: "appInfos") + } + + public static var appPricePoints: Self { + .init(rawValue: "appPricePoints") + } + + public static var appPriceSchedule: Self { + .init(rawValue: "appPriceSchedule") + } + + public static var appStoreVersionExperimentsV2: Self { + .init(rawValue: "appStoreVersionExperimentsV2") + } + + public static var appStoreVersions: Self { + .init(rawValue: "appStoreVersions") + } + + public static var backgroundAssets: Self { + .init(rawValue: "backgroundAssets") + } + + public static var betaAppLocalizations: Self { + .init(rawValue: "betaAppLocalizations") + } + + public static var betaAppReviewDetail: Self { + .init(rawValue: "betaAppReviewDetail") + } + + public static var betaFeedbackCrashSubmissions: Self { + .init(rawValue: "betaFeedbackCrashSubmissions") + } + + public static var betaFeedbackScreenshotSubmissions: Self { + .init(rawValue: "betaFeedbackScreenshotSubmissions") + } + + public static var betaGroups: Self { + .init(rawValue: "betaGroups") + } + + public static var betaLicenseAgreement: Self { + .init(rawValue: "betaLicenseAgreement") + } + + public static var betaTesters: Self { + .init(rawValue: "betaTesters") + } + + public static var builds: Self { + .init(rawValue: "builds") + } + + public static var bundleId: Self { + .init(rawValue: "bundleId") + } + + public static var ciProduct: Self { + .init(rawValue: "ciProduct") + } + + public static var contentRightsDeclaration: Self { + .init(rawValue: "contentRightsDeclaration") + } + + public static var customerReviewSummarizations: Self { + .init(rawValue: "customerReviewSummarizations") + } + + public static var customerReviews: Self { + .init(rawValue: "customerReviews") + } + + public static var endUserLicenseAgreement: Self { + .init(rawValue: "endUserLicenseAgreement") + } + + public static var gameCenterDetail: Self { + .init(rawValue: "gameCenterDetail") + } + + public static var gameCenterEnabledVersions: Self { + .init(rawValue: "gameCenterEnabledVersions") } + public static var inAppPurchases: Self { + .init(rawValue: "inAppPurchases") + } + + public static var inAppPurchasesV2: Self { + .init(rawValue: "inAppPurchasesV2") + } + + public static var isOrEverWasMadeForKids: Self { + .init(rawValue: "isOrEverWasMadeForKids") + } + + public static var marketplaceSearchDetail: Self { + .init(rawValue: "marketplaceSearchDetail") + } + + public static var name: Self { + .init(rawValue: "name") + } + + public static var perfPowerMetrics: Self { + .init(rawValue: "perfPowerMetrics") + } + + public static var preReleaseVersions: Self { + .init(rawValue: "preReleaseVersions") + } + + public static var primaryLocale: Self { + .init(rawValue: "primaryLocale") + } + + public static var promotedPurchases: Self { + .init(rawValue: "promotedPurchases") + } + + public static var reviewSubmissions: Self { + .init(rawValue: "reviewSubmissions") + } + + public static var sku: Self { + .init(rawValue: "sku") + } + + public static var streamlinedPurchasingEnabled: Self { + .init(rawValue: "streamlinedPurchasingEnabled") + } + + public static var subscriptionGracePeriod: Self { + .init(rawValue: "subscriptionGracePeriod") + } + + public static var subscriptionGroups: Self { + .init(rawValue: "subscriptionGroups") + } + + public static var subscriptionStatusUrl: Self { + .init(rawValue: "subscriptionStatusUrl") + } + + public static var subscriptionStatusUrlForSandbox: Self { + .init(rawValue: "subscriptionStatusUrlForSandbox") + } + + public static var subscriptionStatusUrlVersion: Self { + .init(rawValue: "subscriptionStatusUrlVersion") + } + + public static var subscriptionStatusUrlVersionForSandbox: Self { + .init(rawValue: "subscriptionStatusUrlVersionForSandbox") + } + + public static var webhooks: Self { + .init(rawValue: "webhooks") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "appAvailability": self = .appAvailability - case "appClips": self = .appClips - case "appCustomProductPages": self = .appCustomProductPages - case "appEncryptionDeclarations": self = .appEncryptionDeclarations - case "appEvents": self = .appEvents - case "appInfos": self = .appInfos - case "appPricePoints": self = .appPricePoints - case "appPriceSchedule": self = .appPriceSchedule - case "appStoreVersionExperimentsV2": self = .appStoreVersionExperimentsV2 - case "appStoreVersions": self = .appStoreVersions - case "availableInNewTerritories": self = .availableInNewTerritories - case "availableTerritories": self = .availableTerritories - case "betaAppLocalizations": self = .betaAppLocalizations - case "betaAppReviewDetail": self = .betaAppReviewDetail - case "betaGroups": self = .betaGroups - case "betaLicenseAgreement": self = .betaLicenseAgreement - case "betaTesters": self = .betaTesters - case "builds": self = .builds - case "bundleId": self = .bundleId - case "ciProduct": self = .ciProduct - case "contentRightsDeclaration": self = .contentRightsDeclaration - case "customerReviews": self = .customerReviews - case "endUserLicenseAgreement": self = .endUserLicenseAgreement - case "gameCenterDetail": self = .gameCenterDetail - case "gameCenterEnabledVersions": self = .gameCenterEnabledVersions - case "inAppPurchases": self = .inAppPurchases - case "inAppPurchasesV2": self = .inAppPurchasesV2 - case "isOrEverWasMadeForKids": self = .isOrEverWasMadeForKids - case "name": self = .name - case "perfPowerMetrics": self = .perfPowerMetrics - case "preOrder": self = .preOrder - case "preReleaseVersions": self = .preReleaseVersions - case "pricePoints": self = .pricePoints - case "prices": self = .prices - case "primaryLocale": self = .primaryLocale - case "promotedPurchases": self = .promotedPurchases - case "reviewSubmissions": self = .reviewSubmissions - case "sku": self = .sku - case "subscriptionGracePeriod": self = .subscriptionGracePeriod - case "subscriptionGroups": self = .subscriptionGroups - case "subscriptionStatusUrl": self = .subscriptionStatusUrl - case "subscriptionStatusUrlForSandbox": self = .subscriptionStatusUrlForSandbox - case "subscriptionStatusUrlVersion": self = .subscriptionStatusUrlVersion - case "subscriptionStatusUrlVersionForSandbox": self = .subscriptionStatusUrlVersionForSandbox - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum BetaAppReviewDetails: Hashable, Codable, RawRepresentable { - case app - case contactEmail - case contactFirstName - case contactLastName - case contactPhone - case demoAccountName - case demoAccountPassword - case demoAccountRequired - case notes - case unknown(String) - - public var rawValue: String { - switch self { - case .app: return "app" - case .contactEmail: return "contactEmail" - case .contactFirstName: return "contactFirstName" - case .contactLastName: return "contactLastName" - case .contactPhone: return "contactPhone" - case .demoAccountName: return "demoAccountName" - case .demoAccountPassword: return "demoAccountPassword" - case .demoAccountRequired: return "demoAccountRequired" - case .notes: return "notes" - case .unknown(let rawValue): return rawValue - } + public struct BetaAppReviewDetails: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var app: Self { + .init(rawValue: "app") + } + + public static var contactEmail: Self { + .init(rawValue: "contactEmail") + } + + public static var contactFirstName: Self { + .init(rawValue: "contactFirstName") + } + + public static var contactLastName: Self { + .init(rawValue: "contactLastName") + } + + public static var contactPhone: Self { + .init(rawValue: "contactPhone") + } + + public static var demoAccountName: Self { + .init(rawValue: "demoAccountName") + } + + public static var demoAccountPassword: Self { + .init(rawValue: "demoAccountPassword") + } + + public static var demoAccountRequired: Self { + .init(rawValue: "demoAccountRequired") + } + + public static var notes: Self { + .init(rawValue: "notes") + } + + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "app": self = .app - case "contactEmail": self = .contactEmail - case "contactFirstName": self = .contactFirstName - case "contactLastName": self = .contactLastName - case "contactPhone": self = .contactPhone - case "demoAccountName": self = .demoAccountName - case "demoAccountPassword": self = .demoAccountPassword - case "demoAccountRequired": self = .demoAccountRequired - case "notes": self = .notes - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } @@ -299,22 +376,19 @@ extension V1.BetaAppReviewDetails.ById.GET { } } - public enum Include: Hashable, Codable, RawRepresentable { - case app - case unknown(String) + public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var app: Self { + .init(rawValue: "app") + } - public var rawValue: String { - switch self { - case .app: return "app" - case .unknown(let rawValue): return rawValue - } + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "app": self = .app - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaAppReviewDetails/ById/BetaAppReviewDetailsById.PATCH.0f84acd.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaAppReviewDetails/ById/BetaAppReviewDetailsById.PATCH.0f84acd.generated.swift index 6f90e55e..38a50b46 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaAppReviewDetails/ById/BetaAppReviewDetailsById.PATCH.0f84acd.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaAppReviewDetails/ById/BetaAppReviewDetailsById.PATCH.0f84acd.generated.swift @@ -48,9 +48,12 @@ extension V1.BetaAppReviewDetails.ById { /// - Returns: **200**, Single BetaAppReviewDetail as `BetaAppReviewDetailResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **422**, Unprocessable request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -64,6 +67,9 @@ extension V1.BetaAppReviewDetails.ById { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) @@ -73,6 +79,12 @@ extension V1.BetaAppReviewDetails.ById { case 409: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 422: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaAppReviewDetails/ById/Relationships/App/BetaAppReviewDetailsByIdRelationshipsApp.GET.ab28547.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaAppReviewDetails/ById/Relationships/App/BetaAppReviewDetailsByIdRelationshipsApp.GET.ab28547.generated.swift new file mode 100644 index 00000000..2c2b3f74 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaAppReviewDetails/ById/Relationships/App/BetaAppReviewDetailsByIdRelationshipsApp.GET.ab28547.generated.swift @@ -0,0 +1,86 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.BetaAppReviewDetails.ById.Relationships.App { + public struct GET: Endpoint { + public typealias Response = BetaAppReviewDetailAppLinkageResponse + + public var path: String { + "/v1/betaAppReviewDetails/\(id)/relationships/app" + } + + /// the id of the requested resource + public var id: String + + public var parameters: Parameters = Parameters() + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + components?.queryItems = [ + + ].filter { $0.value != nil } + if components?.queryItems?.isEmpty ?? false { + components?.queryItems = nil + } + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "GET" + return urlRequest + } + + /// - Returns: **200**, Related linkage as `BetaAppReviewDetailAppLinkageResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(BetaAppReviewDetailAppLinkageResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +extension V1.BetaAppReviewDetails.ById.Relationships.App.GET { + public struct Parameters: Hashable { + + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaAppReviewSubmissions/BetaAppReviewSubmissions.GET.c59a8bc.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaAppReviewSubmissions/BetaAppReviewSubmissions.GET.c59a8bc.generated.swift index ff30d79a..eed6b94b 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaAppReviewSubmissions/BetaAppReviewSubmissions.GET.c59a8bc.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaAppReviewSubmissions/BetaAppReviewSubmissions.GET.c59a8bc.generated.swift @@ -49,7 +49,9 @@ extension V1.BetaAppReviewSubmissions { /// - Returns: **200**, List of BetaAppReviewSubmissions as `BetaAppReviewSubmissionsResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -63,9 +65,15 @@ extension V1.BetaAppReviewSubmissions { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -93,116 +101,139 @@ extension V1.BetaAppReviewSubmissions.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum BetaAppReviewSubmissions: Hashable, Codable, RawRepresentable { - case betaReviewState - case build - case submittedDate - case unknown(String) + public struct BetaAppReviewSubmissions: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var betaReviewState: Self { + .init(rawValue: "betaReviewState") + } + + public static var build: Self { + .init(rawValue: "build") + } - public var rawValue: String { - switch self { - case .betaReviewState: return "betaReviewState" - case .build: return "build" - case .submittedDate: return "submittedDate" - case .unknown(let rawValue): return rawValue - } + public static var submittedDate: Self { + .init(rawValue: "submittedDate") } + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "betaReviewState": self = .betaReviewState - case "build": self = .build - case "submittedDate": self = .submittedDate - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum Builds: Hashable, Codable, RawRepresentable { - case app - case appEncryptionDeclaration - case appStoreVersion - case betaAppReviewSubmission - case betaBuildLocalizations - case betaGroups - case buildAudienceType - case buildBetaDetail - case buildBundles - case computedMinMacOsVersion - case diagnosticSignatures - case expirationDate - case expired - case iconAssetToken - case icons - case individualTesters - case lsMinimumSystemVersion - case minOsVersion - case perfPowerMetrics - case preReleaseVersion - case processingState - case uploadedDate - case usesNonExemptEncryption - case version - case unknown(String) - - public var rawValue: String { - switch self { - case .app: return "app" - case .appEncryptionDeclaration: return "appEncryptionDeclaration" - case .appStoreVersion: return "appStoreVersion" - case .betaAppReviewSubmission: return "betaAppReviewSubmission" - case .betaBuildLocalizations: return "betaBuildLocalizations" - case .betaGroups: return "betaGroups" - case .buildAudienceType: return "buildAudienceType" - case .buildBetaDetail: return "buildBetaDetail" - case .buildBundles: return "buildBundles" - case .computedMinMacOsVersion: return "computedMinMacOsVersion" - case .diagnosticSignatures: return "diagnosticSignatures" - case .expirationDate: return "expirationDate" - case .expired: return "expired" - case .iconAssetToken: return "iconAssetToken" - case .icons: return "icons" - case .individualTesters: return "individualTesters" - case .lsMinimumSystemVersion: return "lsMinimumSystemVersion" - case .minOsVersion: return "minOsVersion" - case .perfPowerMetrics: return "perfPowerMetrics" - case .preReleaseVersion: return "preReleaseVersion" - case .processingState: return "processingState" - case .uploadedDate: return "uploadedDate" - case .usesNonExemptEncryption: return "usesNonExemptEncryption" - case .version: return "version" - case .unknown(let rawValue): return rawValue - } + public struct Builds: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var app: Self { + .init(rawValue: "app") } + public static var appEncryptionDeclaration: Self { + .init(rawValue: "appEncryptionDeclaration") + } + + public static var appStoreVersion: Self { + .init(rawValue: "appStoreVersion") + } + + public static var betaAppReviewSubmission: Self { + .init(rawValue: "betaAppReviewSubmission") + } + + public static var betaBuildLocalizations: Self { + .init(rawValue: "betaBuildLocalizations") + } + + public static var betaGroups: Self { + .init(rawValue: "betaGroups") + } + + public static var buildAudienceType: Self { + .init(rawValue: "buildAudienceType") + } + + public static var buildBetaDetail: Self { + .init(rawValue: "buildBetaDetail") + } + + public static var buildBundles: Self { + .init(rawValue: "buildBundles") + } + + public static var computedMinMacOsVersion: Self { + .init(rawValue: "computedMinMacOsVersion") + } + + public static var computedMinVisionOsVersion: Self { + .init(rawValue: "computedMinVisionOsVersion") + } + + public static var diagnosticSignatures: Self { + .init(rawValue: "diagnosticSignatures") + } + + public static var expirationDate: Self { + .init(rawValue: "expirationDate") + } + + public static var expired: Self { + .init(rawValue: "expired") + } + + public static var iconAssetToken: Self { + .init(rawValue: "iconAssetToken") + } + + public static var icons: Self { + .init(rawValue: "icons") + } + + public static var individualTesters: Self { + .init(rawValue: "individualTesters") + } + + public static var lsMinimumSystemVersion: Self { + .init(rawValue: "lsMinimumSystemVersion") + } + + public static var minOsVersion: Self { + .init(rawValue: "minOsVersion") + } + + public static var perfPowerMetrics: Self { + .init(rawValue: "perfPowerMetrics") + } + + public static var preReleaseVersion: Self { + .init(rawValue: "preReleaseVersion") + } + + public static var processingState: Self { + .init(rawValue: "processingState") + } + + public static var uploadedDate: Self { + .init(rawValue: "uploadedDate") + } + + public static var usesNonExemptEncryption: Self { + .init(rawValue: "usesNonExemptEncryption") + } + + public static var version: Self { + .init(rawValue: "version") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "app": self = .app - case "appEncryptionDeclaration": self = .appEncryptionDeclaration - case "appStoreVersion": self = .appStoreVersion - case "betaAppReviewSubmission": self = .betaAppReviewSubmission - case "betaBuildLocalizations": self = .betaBuildLocalizations - case "betaGroups": self = .betaGroups - case "buildAudienceType": self = .buildAudienceType - case "buildBetaDetail": self = .buildBetaDetail - case "buildBundles": self = .buildBundles - case "computedMinMacOsVersion": self = .computedMinMacOsVersion - case "diagnosticSignatures": self = .diagnosticSignatures - case "expirationDate": self = .expirationDate - case "expired": self = .expired - case "iconAssetToken": self = .iconAssetToken - case "icons": self = .icons - case "individualTesters": self = .individualTesters - case "lsMinimumSystemVersion": self = .lsMinimumSystemVersion - case "minOsVersion": self = .minOsVersion - case "perfPowerMetrics": self = .perfPowerMetrics - case "preReleaseVersion": self = .preReleaseVersion - case "processingState": self = .processingState - case "uploadedDate": self = .uploadedDate - case "usesNonExemptEncryption": self = .usesNonExemptEncryption - case "version": self = .version - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } @@ -233,31 +264,31 @@ extension V1.BetaAppReviewSubmissions.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum BetaReviewState: Hashable, Codable, RawRepresentable { - case approved - case inReview - case rejected - case waitingForReview - case unknown(String) + public struct BetaReviewState: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var approved: Self { + .init(rawValue: "APPROVED") + } + + public static var inReview: Self { + .init(rawValue: "IN_REVIEW") + } + + public static var rejected: Self { + .init(rawValue: "REJECTED") + } - public var rawValue: String { - switch self { - case .approved: return "APPROVED" - case .inReview: return "IN_REVIEW" - case .rejected: return "REJECTED" - case .waitingForReview: return "WAITING_FOR_REVIEW" - case .unknown(let rawValue): return rawValue - } + public static var waitingForReview: Self { + .init(rawValue: "WAITING_FOR_REVIEW") } + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "APPROVED": self = .approved - case "IN_REVIEW": self = .inReview - case "REJECTED": self = .rejected - case "WAITING_FOR_REVIEW": self = .waitingForReview - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } @@ -280,22 +311,19 @@ extension V1.BetaAppReviewSubmissions.GET { } } - public enum Include: Hashable, Codable, RawRepresentable { - case build - case unknown(String) + public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var build: Self { + .init(rawValue: "build") + } - public var rawValue: String { - switch self { - case .build: return "build" - case .unknown(let rawValue): return rawValue - } + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "build": self = .build - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaAppReviewSubmissions/BetaAppReviewSubmissions.POST.c59a8bc.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaAppReviewSubmissions/BetaAppReviewSubmissions.POST.c59a8bc.generated.swift index 2be63034..161a7f76 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaAppReviewSubmissions/BetaAppReviewSubmissions.POST.c59a8bc.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaAppReviewSubmissions/BetaAppReviewSubmissions.POST.c59a8bc.generated.swift @@ -41,8 +41,11 @@ extension V1.BetaAppReviewSubmissions { /// - Returns: **201**, Single BetaAppReviewSubmission as `BetaAppReviewSubmissionResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **422**, Unprocessable request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -56,12 +59,21 @@ extension V1.BetaAppReviewSubmissions { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 409: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 422: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaAppReviewSubmissions/ById/BetaAppReviewSubmissionsById.GET.22fc8d8.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaAppReviewSubmissions/ById/BetaAppReviewSubmissionsById.GET.22fc8d8.generated.swift index fe2162cc..26640887 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaAppReviewSubmissions/ById/BetaAppReviewSubmissionsById.GET.22fc8d8.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaAppReviewSubmissions/ById/BetaAppReviewSubmissionsById.GET.22fc8d8.generated.swift @@ -46,8 +46,10 @@ extension V1.BetaAppReviewSubmissions.ById { /// - Returns: **200**, Single BetaAppReviewSubmission as `BetaAppReviewSubmissionResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -61,12 +63,18 @@ extension V1.BetaAppReviewSubmissions.ById { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 404: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -89,116 +97,139 @@ extension V1.BetaAppReviewSubmissions.ById.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum BetaAppReviewSubmissions: Hashable, Codable, RawRepresentable { - case betaReviewState - case build - case submittedDate - case unknown(String) + public struct BetaAppReviewSubmissions: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var betaReviewState: Self { + .init(rawValue: "betaReviewState") + } + + public static var build: Self { + .init(rawValue: "build") + } + + public static var submittedDate: Self { + .init(rawValue: "submittedDate") + } - public var rawValue: String { - switch self { - case .betaReviewState: return "betaReviewState" - case .build: return "build" - case .submittedDate: return "submittedDate" - case .unknown(let rawValue): return rawValue - } + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "betaReviewState": self = .betaReviewState - case "build": self = .build - case "submittedDate": self = .submittedDate - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum Builds: Hashable, Codable, RawRepresentable { - case app - case appEncryptionDeclaration - case appStoreVersion - case betaAppReviewSubmission - case betaBuildLocalizations - case betaGroups - case buildAudienceType - case buildBetaDetail - case buildBundles - case computedMinMacOsVersion - case diagnosticSignatures - case expirationDate - case expired - case iconAssetToken - case icons - case individualTesters - case lsMinimumSystemVersion - case minOsVersion - case perfPowerMetrics - case preReleaseVersion - case processingState - case uploadedDate - case usesNonExemptEncryption - case version - case unknown(String) - - public var rawValue: String { - switch self { - case .app: return "app" - case .appEncryptionDeclaration: return "appEncryptionDeclaration" - case .appStoreVersion: return "appStoreVersion" - case .betaAppReviewSubmission: return "betaAppReviewSubmission" - case .betaBuildLocalizations: return "betaBuildLocalizations" - case .betaGroups: return "betaGroups" - case .buildAudienceType: return "buildAudienceType" - case .buildBetaDetail: return "buildBetaDetail" - case .buildBundles: return "buildBundles" - case .computedMinMacOsVersion: return "computedMinMacOsVersion" - case .diagnosticSignatures: return "diagnosticSignatures" - case .expirationDate: return "expirationDate" - case .expired: return "expired" - case .iconAssetToken: return "iconAssetToken" - case .icons: return "icons" - case .individualTesters: return "individualTesters" - case .lsMinimumSystemVersion: return "lsMinimumSystemVersion" - case .minOsVersion: return "minOsVersion" - case .perfPowerMetrics: return "perfPowerMetrics" - case .preReleaseVersion: return "preReleaseVersion" - case .processingState: return "processingState" - case .uploadedDate: return "uploadedDate" - case .usesNonExemptEncryption: return "usesNonExemptEncryption" - case .version: return "version" - case .unknown(let rawValue): return rawValue - } + public struct Builds: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var app: Self { + .init(rawValue: "app") + } + + public static var appEncryptionDeclaration: Self { + .init(rawValue: "appEncryptionDeclaration") + } + + public static var appStoreVersion: Self { + .init(rawValue: "appStoreVersion") + } + + public static var betaAppReviewSubmission: Self { + .init(rawValue: "betaAppReviewSubmission") } + public static var betaBuildLocalizations: Self { + .init(rawValue: "betaBuildLocalizations") + } + + public static var betaGroups: Self { + .init(rawValue: "betaGroups") + } + + public static var buildAudienceType: Self { + .init(rawValue: "buildAudienceType") + } + + public static var buildBetaDetail: Self { + .init(rawValue: "buildBetaDetail") + } + + public static var buildBundles: Self { + .init(rawValue: "buildBundles") + } + + public static var computedMinMacOsVersion: Self { + .init(rawValue: "computedMinMacOsVersion") + } + + public static var computedMinVisionOsVersion: Self { + .init(rawValue: "computedMinVisionOsVersion") + } + + public static var diagnosticSignatures: Self { + .init(rawValue: "diagnosticSignatures") + } + + public static var expirationDate: Self { + .init(rawValue: "expirationDate") + } + + public static var expired: Self { + .init(rawValue: "expired") + } + + public static var iconAssetToken: Self { + .init(rawValue: "iconAssetToken") + } + + public static var icons: Self { + .init(rawValue: "icons") + } + + public static var individualTesters: Self { + .init(rawValue: "individualTesters") + } + + public static var lsMinimumSystemVersion: Self { + .init(rawValue: "lsMinimumSystemVersion") + } + + public static var minOsVersion: Self { + .init(rawValue: "minOsVersion") + } + + public static var perfPowerMetrics: Self { + .init(rawValue: "perfPowerMetrics") + } + + public static var preReleaseVersion: Self { + .init(rawValue: "preReleaseVersion") + } + + public static var processingState: Self { + .init(rawValue: "processingState") + } + + public static var uploadedDate: Self { + .init(rawValue: "uploadedDate") + } + + public static var usesNonExemptEncryption: Self { + .init(rawValue: "usesNonExemptEncryption") + } + + public static var version: Self { + .init(rawValue: "version") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "app": self = .app - case "appEncryptionDeclaration": self = .appEncryptionDeclaration - case "appStoreVersion": self = .appStoreVersion - case "betaAppReviewSubmission": self = .betaAppReviewSubmission - case "betaBuildLocalizations": self = .betaBuildLocalizations - case "betaGroups": self = .betaGroups - case "buildAudienceType": self = .buildAudienceType - case "buildBetaDetail": self = .buildBetaDetail - case "buildBundles": self = .buildBundles - case "computedMinMacOsVersion": self = .computedMinMacOsVersion - case "diagnosticSignatures": self = .diagnosticSignatures - case "expirationDate": self = .expirationDate - case "expired": self = .expired - case "iconAssetToken": self = .iconAssetToken - case "icons": self = .icons - case "individualTesters": self = .individualTesters - case "lsMinimumSystemVersion": self = .lsMinimumSystemVersion - case "minOsVersion": self = .minOsVersion - case "perfPowerMetrics": self = .perfPowerMetrics - case "preReleaseVersion": self = .preReleaseVersion - case "processingState": self = .processingState - case "uploadedDate": self = .uploadedDate - case "usesNonExemptEncryption": self = .usesNonExemptEncryption - case "version": self = .version - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } @@ -221,22 +252,19 @@ extension V1.BetaAppReviewSubmissions.ById.GET { } } - public enum Include: Hashable, Codable, RawRepresentable { - case build - case unknown(String) + public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var build: Self { + .init(rawValue: "build") + } - public var rawValue: String { - switch self { - case .build: return "build" - case .unknown(let rawValue): return rawValue - } + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "build": self = .build - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaBuildLocalizations/BetaBuildLocalizations.GET.3bc0b25.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaBuildLocalizations/BetaBuildLocalizations.GET.3bc0b25.generated.swift index 6d2fcfc9..1e527066 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaBuildLocalizations/BetaBuildLocalizations.GET.3bc0b25.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaBuildLocalizations/BetaBuildLocalizations.GET.3bc0b25.generated.swift @@ -49,7 +49,9 @@ extension V1.BetaBuildLocalizations { /// - Returns: **200**, List of BetaBuildLocalizations as `BetaBuildLocalizationsResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -63,9 +65,15 @@ extension V1.BetaBuildLocalizations { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -93,116 +101,139 @@ extension V1.BetaBuildLocalizations.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum BetaBuildLocalizations: Hashable, Codable, RawRepresentable { - case build - case locale - case whatsNew - case unknown(String) + public struct BetaBuildLocalizations: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var build: Self { + .init(rawValue: "build") + } + + public static var locale: Self { + .init(rawValue: "locale") + } + + public static var whatsNew: Self { + .init(rawValue: "whatsNew") + } - public var rawValue: String { - switch self { - case .build: return "build" - case .locale: return "locale" - case .whatsNew: return "whatsNew" - case .unknown(let rawValue): return rawValue - } + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "build": self = .build - case "locale": self = .locale - case "whatsNew": self = .whatsNew - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum Builds: Hashable, Codable, RawRepresentable { - case app - case appEncryptionDeclaration - case appStoreVersion - case betaAppReviewSubmission - case betaBuildLocalizations - case betaGroups - case buildAudienceType - case buildBetaDetail - case buildBundles - case computedMinMacOsVersion - case diagnosticSignatures - case expirationDate - case expired - case iconAssetToken - case icons - case individualTesters - case lsMinimumSystemVersion - case minOsVersion - case perfPowerMetrics - case preReleaseVersion - case processingState - case uploadedDate - case usesNonExemptEncryption - case version - case unknown(String) - - public var rawValue: String { - switch self { - case .app: return "app" - case .appEncryptionDeclaration: return "appEncryptionDeclaration" - case .appStoreVersion: return "appStoreVersion" - case .betaAppReviewSubmission: return "betaAppReviewSubmission" - case .betaBuildLocalizations: return "betaBuildLocalizations" - case .betaGroups: return "betaGroups" - case .buildAudienceType: return "buildAudienceType" - case .buildBetaDetail: return "buildBetaDetail" - case .buildBundles: return "buildBundles" - case .computedMinMacOsVersion: return "computedMinMacOsVersion" - case .diagnosticSignatures: return "diagnosticSignatures" - case .expirationDate: return "expirationDate" - case .expired: return "expired" - case .iconAssetToken: return "iconAssetToken" - case .icons: return "icons" - case .individualTesters: return "individualTesters" - case .lsMinimumSystemVersion: return "lsMinimumSystemVersion" - case .minOsVersion: return "minOsVersion" - case .perfPowerMetrics: return "perfPowerMetrics" - case .preReleaseVersion: return "preReleaseVersion" - case .processingState: return "processingState" - case .uploadedDate: return "uploadedDate" - case .usesNonExemptEncryption: return "usesNonExemptEncryption" - case .version: return "version" - case .unknown(let rawValue): return rawValue - } + public struct Builds: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var app: Self { + .init(rawValue: "app") + } + + public static var appEncryptionDeclaration: Self { + .init(rawValue: "appEncryptionDeclaration") + } + + public static var appStoreVersion: Self { + .init(rawValue: "appStoreVersion") + } + + public static var betaAppReviewSubmission: Self { + .init(rawValue: "betaAppReviewSubmission") } + public static var betaBuildLocalizations: Self { + .init(rawValue: "betaBuildLocalizations") + } + + public static var betaGroups: Self { + .init(rawValue: "betaGroups") + } + + public static var buildAudienceType: Self { + .init(rawValue: "buildAudienceType") + } + + public static var buildBetaDetail: Self { + .init(rawValue: "buildBetaDetail") + } + + public static var buildBundles: Self { + .init(rawValue: "buildBundles") + } + + public static var computedMinMacOsVersion: Self { + .init(rawValue: "computedMinMacOsVersion") + } + + public static var computedMinVisionOsVersion: Self { + .init(rawValue: "computedMinVisionOsVersion") + } + + public static var diagnosticSignatures: Self { + .init(rawValue: "diagnosticSignatures") + } + + public static var expirationDate: Self { + .init(rawValue: "expirationDate") + } + + public static var expired: Self { + .init(rawValue: "expired") + } + + public static var iconAssetToken: Self { + .init(rawValue: "iconAssetToken") + } + + public static var icons: Self { + .init(rawValue: "icons") + } + + public static var individualTesters: Self { + .init(rawValue: "individualTesters") + } + + public static var lsMinimumSystemVersion: Self { + .init(rawValue: "lsMinimumSystemVersion") + } + + public static var minOsVersion: Self { + .init(rawValue: "minOsVersion") + } + + public static var perfPowerMetrics: Self { + .init(rawValue: "perfPowerMetrics") + } + + public static var preReleaseVersion: Self { + .init(rawValue: "preReleaseVersion") + } + + public static var processingState: Self { + .init(rawValue: "processingState") + } + + public static var uploadedDate: Self { + .init(rawValue: "uploadedDate") + } + + public static var usesNonExemptEncryption: Self { + .init(rawValue: "usesNonExemptEncryption") + } + + public static var version: Self { + .init(rawValue: "version") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "app": self = .app - case "appEncryptionDeclaration": self = .appEncryptionDeclaration - case "appStoreVersion": self = .appStoreVersion - case "betaAppReviewSubmission": self = .betaAppReviewSubmission - case "betaBuildLocalizations": self = .betaBuildLocalizations - case "betaGroups": self = .betaGroups - case "buildAudienceType": self = .buildAudienceType - case "buildBetaDetail": self = .buildBetaDetail - case "buildBundles": self = .buildBundles - case "computedMinMacOsVersion": self = .computedMinMacOsVersion - case "diagnosticSignatures": self = .diagnosticSignatures - case "expirationDate": self = .expirationDate - case "expired": self = .expired - case "iconAssetToken": self = .iconAssetToken - case "icons": self = .icons - case "individualTesters": self = .individualTesters - case "lsMinimumSystemVersion": self = .lsMinimumSystemVersion - case "minOsVersion": self = .minOsVersion - case "perfPowerMetrics": self = .perfPowerMetrics - case "preReleaseVersion": self = .preReleaseVersion - case "processingState": self = .processingState - case "uploadedDate": self = .uploadedDate - case "usesNonExemptEncryption": self = .usesNonExemptEncryption - case "version": self = .version - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } @@ -252,22 +283,19 @@ extension V1.BetaBuildLocalizations.GET { } } - public enum Include: Hashable, Codable, RawRepresentable { - case build - case unknown(String) + public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var build: Self { + .init(rawValue: "build") + } - public var rawValue: String { - switch self { - case .build: return "build" - case .unknown(let rawValue): return rawValue - } + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "build": self = .build - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaBuildLocalizations/BetaBuildLocalizations.POST.3bc0b25.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaBuildLocalizations/BetaBuildLocalizations.POST.3bc0b25.generated.swift index 628356ef..52b4001d 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaBuildLocalizations/BetaBuildLocalizations.POST.3bc0b25.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaBuildLocalizations/BetaBuildLocalizations.POST.3bc0b25.generated.swift @@ -41,8 +41,11 @@ extension V1.BetaBuildLocalizations { /// - Returns: **201**, Single BetaBuildLocalization as `BetaBuildLocalizationResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **422**, Unprocessable request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -56,12 +59,21 @@ extension V1.BetaBuildLocalizations { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 409: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 422: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaBuildLocalizations/ById/BetaBuildLocalizationsById.DELETE.5c519b7.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaBuildLocalizations/ById/BetaBuildLocalizationsById.DELETE.5c519b7.generated.swift index 30b7c8f9..849baf1a 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaBuildLocalizations/ById/BetaBuildLocalizationsById.DELETE.5c519b7.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaBuildLocalizations/ById/BetaBuildLocalizationsById.DELETE.5c519b7.generated.swift @@ -31,11 +31,12 @@ extension V1.BetaBuildLocalizations.ById { return urlRequest } - /// - Returns: **204**, Success (no content) /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -43,12 +44,12 @@ extension V1.BetaBuildLocalizations.ById { } switch urlResponse.statusCode { - case 204: - return - case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) @@ -58,6 +59,9 @@ extension V1.BetaBuildLocalizations.ById { case 409: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaBuildLocalizations/ById/BetaBuildLocalizationsById.GET.5c519b7.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaBuildLocalizations/ById/BetaBuildLocalizationsById.GET.5c519b7.generated.swift index 70da43b7..8f6b4433 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaBuildLocalizations/ById/BetaBuildLocalizationsById.GET.5c519b7.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaBuildLocalizations/ById/BetaBuildLocalizationsById.GET.5c519b7.generated.swift @@ -46,8 +46,10 @@ extension V1.BetaBuildLocalizations.ById { /// - Returns: **200**, Single BetaBuildLocalization as `BetaBuildLocalizationResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -61,12 +63,18 @@ extension V1.BetaBuildLocalizations.ById { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 404: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -89,116 +97,139 @@ extension V1.BetaBuildLocalizations.ById.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum BetaBuildLocalizations: Hashable, Codable, RawRepresentable { - case build - case locale - case whatsNew - case unknown(String) + public struct BetaBuildLocalizations: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var build: Self { + .init(rawValue: "build") + } + + public static var locale: Self { + .init(rawValue: "locale") + } + + public static var whatsNew: Self { + .init(rawValue: "whatsNew") + } - public var rawValue: String { - switch self { - case .build: return "build" - case .locale: return "locale" - case .whatsNew: return "whatsNew" - case .unknown(let rawValue): return rawValue - } + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "build": self = .build - case "locale": self = .locale - case "whatsNew": self = .whatsNew - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum Builds: Hashable, Codable, RawRepresentable { - case app - case appEncryptionDeclaration - case appStoreVersion - case betaAppReviewSubmission - case betaBuildLocalizations - case betaGroups - case buildAudienceType - case buildBetaDetail - case buildBundles - case computedMinMacOsVersion - case diagnosticSignatures - case expirationDate - case expired - case iconAssetToken - case icons - case individualTesters - case lsMinimumSystemVersion - case minOsVersion - case perfPowerMetrics - case preReleaseVersion - case processingState - case uploadedDate - case usesNonExemptEncryption - case version - case unknown(String) - - public var rawValue: String { - switch self { - case .app: return "app" - case .appEncryptionDeclaration: return "appEncryptionDeclaration" - case .appStoreVersion: return "appStoreVersion" - case .betaAppReviewSubmission: return "betaAppReviewSubmission" - case .betaBuildLocalizations: return "betaBuildLocalizations" - case .betaGroups: return "betaGroups" - case .buildAudienceType: return "buildAudienceType" - case .buildBetaDetail: return "buildBetaDetail" - case .buildBundles: return "buildBundles" - case .computedMinMacOsVersion: return "computedMinMacOsVersion" - case .diagnosticSignatures: return "diagnosticSignatures" - case .expirationDate: return "expirationDate" - case .expired: return "expired" - case .iconAssetToken: return "iconAssetToken" - case .icons: return "icons" - case .individualTesters: return "individualTesters" - case .lsMinimumSystemVersion: return "lsMinimumSystemVersion" - case .minOsVersion: return "minOsVersion" - case .perfPowerMetrics: return "perfPowerMetrics" - case .preReleaseVersion: return "preReleaseVersion" - case .processingState: return "processingState" - case .uploadedDate: return "uploadedDate" - case .usesNonExemptEncryption: return "usesNonExemptEncryption" - case .version: return "version" - case .unknown(let rawValue): return rawValue - } + public struct Builds: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var app: Self { + .init(rawValue: "app") + } + + public static var appEncryptionDeclaration: Self { + .init(rawValue: "appEncryptionDeclaration") + } + + public static var appStoreVersion: Self { + .init(rawValue: "appStoreVersion") + } + + public static var betaAppReviewSubmission: Self { + .init(rawValue: "betaAppReviewSubmission") } + public static var betaBuildLocalizations: Self { + .init(rawValue: "betaBuildLocalizations") + } + + public static var betaGroups: Self { + .init(rawValue: "betaGroups") + } + + public static var buildAudienceType: Self { + .init(rawValue: "buildAudienceType") + } + + public static var buildBetaDetail: Self { + .init(rawValue: "buildBetaDetail") + } + + public static var buildBundles: Self { + .init(rawValue: "buildBundles") + } + + public static var computedMinMacOsVersion: Self { + .init(rawValue: "computedMinMacOsVersion") + } + + public static var computedMinVisionOsVersion: Self { + .init(rawValue: "computedMinVisionOsVersion") + } + + public static var diagnosticSignatures: Self { + .init(rawValue: "diagnosticSignatures") + } + + public static var expirationDate: Self { + .init(rawValue: "expirationDate") + } + + public static var expired: Self { + .init(rawValue: "expired") + } + + public static var iconAssetToken: Self { + .init(rawValue: "iconAssetToken") + } + + public static var icons: Self { + .init(rawValue: "icons") + } + + public static var individualTesters: Self { + .init(rawValue: "individualTesters") + } + + public static var lsMinimumSystemVersion: Self { + .init(rawValue: "lsMinimumSystemVersion") + } + + public static var minOsVersion: Self { + .init(rawValue: "minOsVersion") + } + + public static var perfPowerMetrics: Self { + .init(rawValue: "perfPowerMetrics") + } + + public static var preReleaseVersion: Self { + .init(rawValue: "preReleaseVersion") + } + + public static var processingState: Self { + .init(rawValue: "processingState") + } + + public static var uploadedDate: Self { + .init(rawValue: "uploadedDate") + } + + public static var usesNonExemptEncryption: Self { + .init(rawValue: "usesNonExemptEncryption") + } + + public static var version: Self { + .init(rawValue: "version") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "app": self = .app - case "appEncryptionDeclaration": self = .appEncryptionDeclaration - case "appStoreVersion": self = .appStoreVersion - case "betaAppReviewSubmission": self = .betaAppReviewSubmission - case "betaBuildLocalizations": self = .betaBuildLocalizations - case "betaGroups": self = .betaGroups - case "buildAudienceType": self = .buildAudienceType - case "buildBetaDetail": self = .buildBetaDetail - case "buildBundles": self = .buildBundles - case "computedMinMacOsVersion": self = .computedMinMacOsVersion - case "diagnosticSignatures": self = .diagnosticSignatures - case "expirationDate": self = .expirationDate - case "expired": self = .expired - case "iconAssetToken": self = .iconAssetToken - case "icons": self = .icons - case "individualTesters": self = .individualTesters - case "lsMinimumSystemVersion": self = .lsMinimumSystemVersion - case "minOsVersion": self = .minOsVersion - case "perfPowerMetrics": self = .perfPowerMetrics - case "preReleaseVersion": self = .preReleaseVersion - case "processingState": self = .processingState - case "uploadedDate": self = .uploadedDate - case "usesNonExemptEncryption": self = .usesNonExemptEncryption - case "version": self = .version - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } @@ -221,22 +252,19 @@ extension V1.BetaBuildLocalizations.ById.GET { } } - public enum Include: Hashable, Codable, RawRepresentable { - case build - case unknown(String) + public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var build: Self { + .init(rawValue: "build") + } - public var rawValue: String { - switch self { - case .build: return "build" - case .unknown(let rawValue): return rawValue - } + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "build": self = .build - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaBuildLocalizations/ById/BetaBuildLocalizationsById.PATCH.5c519b7.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaBuildLocalizations/ById/BetaBuildLocalizationsById.PATCH.5c519b7.generated.swift index 5b3deb52..75000971 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaBuildLocalizations/ById/BetaBuildLocalizationsById.PATCH.5c519b7.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaBuildLocalizations/ById/BetaBuildLocalizationsById.PATCH.5c519b7.generated.swift @@ -48,9 +48,12 @@ extension V1.BetaBuildLocalizations.ById { /// - Returns: **200**, Single BetaBuildLocalization as `BetaBuildLocalizationResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **422**, Unprocessable request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -64,6 +67,9 @@ extension V1.BetaBuildLocalizations.ById { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) @@ -73,6 +79,12 @@ extension V1.BetaBuildLocalizations.ById { case 409: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 422: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppPricePoints/ById/Territory/AppPricePointsByIdTerritory.GET.1cb31a4.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaCrashLogs/ById/BetaCrashLogsById.GET.ada3fbb.generated.swift similarity index 66% rename from Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppPricePoints/ById/Territory/AppPricePointsByIdTerritory.GET.1cb31a4.generated.swift rename to Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaCrashLogs/ById/BetaCrashLogsById.GET.ada3fbb.generated.swift index 058e4c08..a538d1dc 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppPricePoints/ById/Territory/AppPricePointsByIdTerritory.GET.1cb31a4.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaCrashLogs/ById/BetaCrashLogsById.GET.ada3fbb.generated.swift @@ -6,13 +6,12 @@ import Foundation import FoundationNetworking #endif -extension V1.AppPricePoints.ById.Territory { - @available(*, deprecated) +extension V1.BetaCrashLogs.ById { public struct GET: Endpoint { - public typealias Response = TerritoryResponse + public typealias Response = BetaCrashLogResponse public var path: String { - "/v1/appPricePoints/\(id)/territory" + "/v1/betaCrashLogs/\(id)" } /// the id of the requested resource @@ -29,8 +28,8 @@ extension V1.AppPricePoints.ById.Territory { components?.path = path components?.queryItems = [ - URLQueryItem(name: "fields[territories]", - value: parameters.fields[.territories]?.map { "\($0)" }.joined(separator: ",")) + URLQueryItem(name: "fields[betaCrashLogs]", + value: parameters.fields[.betaCrashLogs]?.map { "\($0)" }.joined(separator: ",")) ].filter { $0.value != nil } if components?.queryItems?.isEmpty ?? false { components?.queryItems = nil @@ -41,10 +40,12 @@ extension V1.AppPricePoints.ById.Territory { return urlRequest } - /// - Returns: **200**, Single Territory as `TerritoryResponse` + /// - Returns: **200**, Single BetaCrashLog as `BetaCrashLogResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -53,17 +54,23 @@ extension V1.AppPricePoints.ById.Territory { switch urlResponse.statusCode { case 200: - return try jsonDecoder.decode(TerritoryResponse.self, from: data) + return try jsonDecoder.decode(BetaCrashLogResponse.self, from: data) case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 404: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -71,7 +78,7 @@ extension V1.AppPricePoints.ById.Territory { } } -extension V1.AppPricePoints.ById.Territory.GET { +extension V1.BetaCrashLogs.ById.GET { public struct Parameters: Hashable { public var fields: Fields = Fields() @@ -83,29 +90,26 @@ extension V1.AppPricePoints.ById.Territory.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum Territories: Hashable, Codable, RawRepresentable { - case currency - case unknown(String) + public struct BetaCrashLogs: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var logText: Self { + .init(rawValue: "logText") + } - public var rawValue: String { - switch self { - case .currency: return "currency" - case .unknown(let rawValue): return rawValue - } + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "currency": self = .currency - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } public struct Relation: Hashable { - /// the fields to include for returned resources of type territories - public static var territories: Relation<[Territories]?> { - .init(key: "fields[territories]") + /// the fields to include for returned resources of type betaCrashLogs + public static var betaCrashLogs: Relation<[BetaCrashLogs]?> { + .init(key: "fields[betaCrashLogs]") } internal let key: String diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaFeedbackCrashSubmissions/ById/BetaFeedbackCrashSubmissionsById.DELETE.a2529fe.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaFeedbackCrashSubmissions/ById/BetaFeedbackCrashSubmissionsById.DELETE.a2529fe.generated.swift new file mode 100644 index 00000000..91100ab7 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaFeedbackCrashSubmissions/ById/BetaFeedbackCrashSubmissionsById.DELETE.a2529fe.generated.swift @@ -0,0 +1,72 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.BetaFeedbackCrashSubmissions.ById { + public struct DELETE: Endpoint { + public typealias Parameters = Never + public typealias Response = Void + + public var path: String { + "/v1/betaFeedbackCrashSubmissions/\(id)" + } + + /// the id of the requested resource + public var id: String + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "DELETE" + return urlRequest + } + + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 409: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaFeedbackCrashSubmissions/ById/BetaFeedbackCrashSubmissionsById.GET.a2529fe.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaFeedbackCrashSubmissions/ById/BetaFeedbackCrashSubmissionsById.GET.a2529fe.generated.swift new file mode 100644 index 00000000..491f942a --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaFeedbackCrashSubmissions/ById/BetaFeedbackCrashSubmissionsById.GET.a2529fe.generated.swift @@ -0,0 +1,238 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.BetaFeedbackCrashSubmissions.ById { + public struct GET: Endpoint { + public typealias Response = BetaFeedbackCrashSubmissionResponse + + public var path: String { + "/v1/betaFeedbackCrashSubmissions/\(id)" + } + + /// the id of the requested resource + public var id: String + + public var parameters: Parameters = Parameters() + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + components?.queryItems = [ + URLQueryItem(name: "fields[betaFeedbackCrashSubmissions]", + value: parameters.fields[.betaFeedbackCrashSubmissions]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "include", + value: parameters.include?.map { "\($0)" }.joined(separator: ",")) + ].filter { $0.value != nil } + if components?.queryItems?.isEmpty ?? false { + components?.queryItems = nil + } + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "GET" + return urlRequest + } + + /// - Returns: **200**, Single BetaFeedbackCrashSubmission as `BetaFeedbackCrashSubmissionResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(BetaFeedbackCrashSubmissionResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +extension V1.BetaFeedbackCrashSubmissions.ById.GET { + public struct Parameters: Hashable { + public var fields: Fields = Fields() + + /// comma-separated list of relationships to include + public var include: [Include]? + + public struct Fields: Hashable { + public subscript (_ relation: Relation) -> T { + get { values[relation]?.base as! T } + set { values[relation] = AnyHashable(newValue) } + } + + private var values: [AnyHashable: AnyHashable] = [:] + + public struct BetaFeedbackCrashSubmissions: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var appPlatform: Self { + .init(rawValue: "appPlatform") + } + + public static var appUptimeInMilliseconds: Self { + .init(rawValue: "appUptimeInMilliseconds") + } + + public static var architecture: Self { + .init(rawValue: "architecture") + } + + public static var batteryPercentage: Self { + .init(rawValue: "batteryPercentage") + } + + public static var build: Self { + .init(rawValue: "build") + } + + public static var buildBundleId: Self { + .init(rawValue: "buildBundleId") + } + + public static var comment: Self { + .init(rawValue: "comment") + } + + public static var connectionType: Self { + .init(rawValue: "connectionType") + } + + public static var crashLog: Self { + .init(rawValue: "crashLog") + } + + public static var createdDate: Self { + .init(rawValue: "createdDate") + } + + public static var deviceFamily: Self { + .init(rawValue: "deviceFamily") + } + + public static var deviceModel: Self { + .init(rawValue: "deviceModel") + } + + public static var devicePlatform: Self { + .init(rawValue: "devicePlatform") + } + + public static var diskBytesAvailable: Self { + .init(rawValue: "diskBytesAvailable") + } + + public static var diskBytesTotal: Self { + .init(rawValue: "diskBytesTotal") + } + + public static var email: Self { + .init(rawValue: "email") + } + + public static var locale: Self { + .init(rawValue: "locale") + } + + public static var osVersion: Self { + .init(rawValue: "osVersion") + } + + public static var pairedAppleWatch: Self { + .init(rawValue: "pairedAppleWatch") + } + + public static var screenHeightInPoints: Self { + .init(rawValue: "screenHeightInPoints") + } + + public static var screenWidthInPoints: Self { + .init(rawValue: "screenWidthInPoints") + } + + public static var tester: Self { + .init(rawValue: "tester") + } + + public static var timeZone: Self { + .init(rawValue: "timeZone") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct Relation: Hashable { + /// the fields to include for returned resources of type betaFeedbackCrashSubmissions + public static var betaFeedbackCrashSubmissions: Relation<[BetaFeedbackCrashSubmissions]?> { + .init(key: "fields[betaFeedbackCrashSubmissions]") + } + + internal let key: String + + public func hash(into hasher: inout Hasher) { + hasher.combine(key) + } + } + } + + public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var build: Self { + .init(rawValue: "build") + } + + public static var tester: Self { + .init(rawValue: "tester") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/AvailableTerritories/AppsByIdAvailableTerritories.GET.5cd8bdc.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaFeedbackCrashSubmissions/ById/CrashLog/BetaFeedbackCrashSubmissionsByIdCrashLog.GET.623e984.generated.swift similarity index 65% rename from Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/AvailableTerritories/AppsByIdAvailableTerritories.GET.5cd8bdc.generated.swift rename to Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaFeedbackCrashSubmissions/ById/CrashLog/BetaFeedbackCrashSubmissionsByIdCrashLog.GET.623e984.generated.swift index a9e9dc9e..ecb9a472 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Apps/ById/AvailableTerritories/AppsByIdAvailableTerritories.GET.5cd8bdc.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaFeedbackCrashSubmissions/ById/CrashLog/BetaFeedbackCrashSubmissionsByIdCrashLog.GET.623e984.generated.swift @@ -6,13 +6,12 @@ import Foundation import FoundationNetworking #endif -extension V1.Apps.ById.AvailableTerritories { - @available(*, deprecated) +extension V1.BetaFeedbackCrashSubmissions.ById.CrashLog { public struct GET: Endpoint { - public typealias Response = TerritoriesResponse + public typealias Response = BetaCrashLogResponse public var path: String { - "/v1/apps/\(id)/availableTerritories" + "/v1/betaFeedbackCrashSubmissions/\(id)/crashLog" } /// the id of the requested resource @@ -29,10 +28,8 @@ extension V1.Apps.ById.AvailableTerritories { components?.path = path components?.queryItems = [ - URLQueryItem(name: "fields[territories]", - value: parameters.fields[.territories]?.map { "\($0)" }.joined(separator: ",")), - URLQueryItem(name: "limit", - value: parameters.limit.map { "\($0)" }) + URLQueryItem(name: "fields[betaCrashLogs]", + value: parameters.fields[.betaCrashLogs]?.map { "\($0)" }.joined(separator: ",")) ].filter { $0.value != nil } if components?.queryItems?.isEmpty ?? false { components?.queryItems = nil @@ -43,10 +40,12 @@ extension V1.Apps.ById.AvailableTerritories { return urlRequest } - /// - Returns: **200**, List of Territories as `TerritoriesResponse` + /// - Returns: **200**, Single BetaCrashLog as `BetaCrashLogResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -55,17 +54,23 @@ extension V1.Apps.ById.AvailableTerritories { switch urlResponse.statusCode { case 200: - return try jsonDecoder.decode(TerritoriesResponse.self, from: data) + return try jsonDecoder.decode(BetaCrashLogResponse.self, from: data) case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 404: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -73,13 +78,10 @@ extension V1.Apps.ById.AvailableTerritories { } } -extension V1.Apps.ById.AvailableTerritories.GET { +extension V1.BetaFeedbackCrashSubmissions.ById.CrashLog.GET { public struct Parameters: Hashable { public var fields: Fields = Fields() - /// maximum resources per page - public var limit: Int? - public struct Fields: Hashable { public subscript (_ relation: Relation) -> T { get { values[relation]?.base as! T } @@ -88,29 +90,26 @@ extension V1.Apps.ById.AvailableTerritories.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum Territories: Hashable, Codable, RawRepresentable { - case currency - case unknown(String) + public struct BetaCrashLogs: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var logText: Self { + .init(rawValue: "logText") + } - public var rawValue: String { - switch self { - case .currency: return "currency" - case .unknown(let rawValue): return rawValue - } + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "currency": self = .currency - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } public struct Relation: Hashable { - /// the fields to include for returned resources of type territories - public static var territories: Relation<[Territories]?> { - .init(key: "fields[territories]") + /// the fields to include for returned resources of type betaCrashLogs + public static var betaCrashLogs: Relation<[BetaCrashLogs]?> { + .init(key: "fields[betaCrashLogs]") } internal let key: String diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaFeedbackCrashSubmissions/ById/Relationships/CrashLog/BetaFeedbackCrashSubmissionsByIdRelationshipsCrashLog.GET.b383ae2.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaFeedbackCrashSubmissions/ById/Relationships/CrashLog/BetaFeedbackCrashSubmissionsByIdRelationshipsCrashLog.GET.b383ae2.generated.swift new file mode 100644 index 00000000..6b157a0d --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaFeedbackCrashSubmissions/ById/Relationships/CrashLog/BetaFeedbackCrashSubmissionsByIdRelationshipsCrashLog.GET.b383ae2.generated.swift @@ -0,0 +1,86 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.BetaFeedbackCrashSubmissions.ById.Relationships.CrashLog { + public struct GET: Endpoint { + public typealias Response = BetaFeedbackCrashSubmissionCrashLogLinkageResponse + + public var path: String { + "/v1/betaFeedbackCrashSubmissions/\(id)/relationships/crashLog" + } + + /// the id of the requested resource + public var id: String + + public var parameters: Parameters = Parameters() + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + components?.queryItems = [ + + ].filter { $0.value != nil } + if components?.queryItems?.isEmpty ?? false { + components?.queryItems = nil + } + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "GET" + return urlRequest + } + + /// - Returns: **200**, Related linkage as `BetaFeedbackCrashSubmissionCrashLogLinkageResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(BetaFeedbackCrashSubmissionCrashLogLinkageResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +extension V1.BetaFeedbackCrashSubmissions.ById.Relationships.CrashLog.GET { + public struct Parameters: Hashable { + + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaFeedbackScreenshotSubmissions/ById/BetaFeedbackScreenshotSubmissionsById.DELETE.93f1434.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaFeedbackScreenshotSubmissions/ById/BetaFeedbackScreenshotSubmissionsById.DELETE.93f1434.generated.swift new file mode 100644 index 00000000..654f706f --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaFeedbackScreenshotSubmissions/ById/BetaFeedbackScreenshotSubmissionsById.DELETE.93f1434.generated.swift @@ -0,0 +1,72 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.BetaFeedbackScreenshotSubmissions.ById { + public struct DELETE: Endpoint { + public typealias Parameters = Never + public typealias Response = Void + + public var path: String { + "/v1/betaFeedbackScreenshotSubmissions/\(id)" + } + + /// the id of the requested resource + public var id: String + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "DELETE" + return urlRequest + } + + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 409: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaFeedbackScreenshotSubmissions/ById/BetaFeedbackScreenshotSubmissionsById.GET.93f1434.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaFeedbackScreenshotSubmissions/ById/BetaFeedbackScreenshotSubmissionsById.GET.93f1434.generated.swift new file mode 100644 index 00000000..2e4c45c2 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaFeedbackScreenshotSubmissions/ById/BetaFeedbackScreenshotSubmissionsById.GET.93f1434.generated.swift @@ -0,0 +1,238 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.BetaFeedbackScreenshotSubmissions.ById { + public struct GET: Endpoint { + public typealias Response = BetaFeedbackScreenshotSubmissionResponse + + public var path: String { + "/v1/betaFeedbackScreenshotSubmissions/\(id)" + } + + /// the id of the requested resource + public var id: String + + public var parameters: Parameters = Parameters() + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + components?.queryItems = [ + URLQueryItem(name: "fields[betaFeedbackScreenshotSubmissions]", + value: parameters.fields[.betaFeedbackScreenshotSubmissions]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "include", + value: parameters.include?.map { "\($0)" }.joined(separator: ",")) + ].filter { $0.value != nil } + if components?.queryItems?.isEmpty ?? false { + components?.queryItems = nil + } + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "GET" + return urlRequest + } + + /// - Returns: **200**, Single BetaFeedbackScreenshotSubmission as `BetaFeedbackScreenshotSubmissionResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(BetaFeedbackScreenshotSubmissionResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +extension V1.BetaFeedbackScreenshotSubmissions.ById.GET { + public struct Parameters: Hashable { + public var fields: Fields = Fields() + + /// comma-separated list of relationships to include + public var include: [Include]? + + public struct Fields: Hashable { + public subscript (_ relation: Relation) -> T { + get { values[relation]?.base as! T } + set { values[relation] = AnyHashable(newValue) } + } + + private var values: [AnyHashable: AnyHashable] = [:] + + public struct BetaFeedbackScreenshotSubmissions: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var appPlatform: Self { + .init(rawValue: "appPlatform") + } + + public static var appUptimeInMilliseconds: Self { + .init(rawValue: "appUptimeInMilliseconds") + } + + public static var architecture: Self { + .init(rawValue: "architecture") + } + + public static var batteryPercentage: Self { + .init(rawValue: "batteryPercentage") + } + + public static var build: Self { + .init(rawValue: "build") + } + + public static var buildBundleId: Self { + .init(rawValue: "buildBundleId") + } + + public static var comment: Self { + .init(rawValue: "comment") + } + + public static var connectionType: Self { + .init(rawValue: "connectionType") + } + + public static var createdDate: Self { + .init(rawValue: "createdDate") + } + + public static var deviceFamily: Self { + .init(rawValue: "deviceFamily") + } + + public static var deviceModel: Self { + .init(rawValue: "deviceModel") + } + + public static var devicePlatform: Self { + .init(rawValue: "devicePlatform") + } + + public static var diskBytesAvailable: Self { + .init(rawValue: "diskBytesAvailable") + } + + public static var diskBytesTotal: Self { + .init(rawValue: "diskBytesTotal") + } + + public static var email: Self { + .init(rawValue: "email") + } + + public static var locale: Self { + .init(rawValue: "locale") + } + + public static var osVersion: Self { + .init(rawValue: "osVersion") + } + + public static var pairedAppleWatch: Self { + .init(rawValue: "pairedAppleWatch") + } + + public static var screenHeightInPoints: Self { + .init(rawValue: "screenHeightInPoints") + } + + public static var screenWidthInPoints: Self { + .init(rawValue: "screenWidthInPoints") + } + + public static var screenshots: Self { + .init(rawValue: "screenshots") + } + + public static var tester: Self { + .init(rawValue: "tester") + } + + public static var timeZone: Self { + .init(rawValue: "timeZone") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct Relation: Hashable { + /// the fields to include for returned resources of type betaFeedbackScreenshotSubmissions + public static var betaFeedbackScreenshotSubmissions: Relation<[BetaFeedbackScreenshotSubmissions]?> { + .init(key: "fields[betaFeedbackScreenshotSubmissions]") + } + + internal let key: String + + public func hash(into hasher: inout Hasher) { + hasher.combine(key) + } + } + } + + public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var build: Self { + .init(rawValue: "build") + } + + public static var tester: Self { + .init(rawValue: "tester") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaGroups/BetaGroups.GET.b27708f.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaGroups/BetaGroups.GET.b27708f.generated.swift index c9532c4f..5a0e99ad 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaGroups/BetaGroups.GET.b27708f.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaGroups/BetaGroups.GET.b27708f.generated.swift @@ -29,6 +29,8 @@ extension V1.BetaGroups { value: parameters.fields[.apps]?.map { "\($0)" }.joined(separator: ",")), URLQueryItem(name: "fields[betaGroups]", value: parameters.fields[.betaGroups]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "fields[betaRecruitmentCriteria]", + value: parameters.fields[.betaRecruitmentCriteria]?.map { "\($0)" }.joined(separator: ",")), URLQueryItem(name: "fields[betaTesters]", value: parameters.fields[.betaTesters]?.map { "\($0)" }.joined(separator: ",")), URLQueryItem(name: "fields[builds]", @@ -71,7 +73,9 @@ extension V1.BetaGroups { /// - Returns: **200**, List of BetaGroups as `BetaGroupsResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -85,9 +89,15 @@ extension V1.BetaGroups { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -118,334 +128,471 @@ extension V1.BetaGroups.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum Apps: Hashable, Codable, RawRepresentable { - case appAvailability - case appClips - case appCustomProductPages - case appEncryptionDeclarations - case appEvents - case appInfos - case appPricePoints - case appPriceSchedule - case appStoreVersionExperimentsV2 - case appStoreVersions - case availableInNewTerritories - case availableTerritories - case betaAppLocalizations - case betaAppReviewDetail - case betaGroups - case betaLicenseAgreement - case betaTesters - case builds - case bundleId - case ciProduct - case contentRightsDeclaration - case customerReviews - case endUserLicenseAgreement - case gameCenterDetail - case gameCenterEnabledVersions - case inAppPurchases - case inAppPurchasesV2 - case isOrEverWasMadeForKids - case name - case perfPowerMetrics - case preOrder - case preReleaseVersions - case pricePoints - case prices - case primaryLocale - case promotedPurchases - case reviewSubmissions - case sku - case subscriptionGracePeriod - case subscriptionGroups - case subscriptionStatusUrl - case subscriptionStatusUrlForSandbox - case subscriptionStatusUrlVersion - case subscriptionStatusUrlVersionForSandbox - case unknown(String) - - public var rawValue: String { - switch self { - case .appAvailability: return "appAvailability" - case .appClips: return "appClips" - case .appCustomProductPages: return "appCustomProductPages" - case .appEncryptionDeclarations: return "appEncryptionDeclarations" - case .appEvents: return "appEvents" - case .appInfos: return "appInfos" - case .appPricePoints: return "appPricePoints" - case .appPriceSchedule: return "appPriceSchedule" - case .appStoreVersionExperimentsV2: return "appStoreVersionExperimentsV2" - case .appStoreVersions: return "appStoreVersions" - case .availableInNewTerritories: return "availableInNewTerritories" - case .availableTerritories: return "availableTerritories" - case .betaAppLocalizations: return "betaAppLocalizations" - case .betaAppReviewDetail: return "betaAppReviewDetail" - case .betaGroups: return "betaGroups" - case .betaLicenseAgreement: return "betaLicenseAgreement" - case .betaTesters: return "betaTesters" - case .builds: return "builds" - case .bundleId: return "bundleId" - case .ciProduct: return "ciProduct" - case .contentRightsDeclaration: return "contentRightsDeclaration" - case .customerReviews: return "customerReviews" - case .endUserLicenseAgreement: return "endUserLicenseAgreement" - case .gameCenterDetail: return "gameCenterDetail" - case .gameCenterEnabledVersions: return "gameCenterEnabledVersions" - case .inAppPurchases: return "inAppPurchases" - case .inAppPurchasesV2: return "inAppPurchasesV2" - case .isOrEverWasMadeForKids: return "isOrEverWasMadeForKids" - case .name: return "name" - case .perfPowerMetrics: return "perfPowerMetrics" - case .preOrder: return "preOrder" - case .preReleaseVersions: return "preReleaseVersions" - case .pricePoints: return "pricePoints" - case .prices: return "prices" - case .primaryLocale: return "primaryLocale" - case .promotedPurchases: return "promotedPurchases" - case .reviewSubmissions: return "reviewSubmissions" - case .sku: return "sku" - case .subscriptionGracePeriod: return "subscriptionGracePeriod" - case .subscriptionGroups: return "subscriptionGroups" - case .subscriptionStatusUrl: return "subscriptionStatusUrl" - case .subscriptionStatusUrlForSandbox: return "subscriptionStatusUrlForSandbox" - case .subscriptionStatusUrlVersion: return "subscriptionStatusUrlVersion" - case .subscriptionStatusUrlVersionForSandbox: return "subscriptionStatusUrlVersionForSandbox" - case .unknown(let rawValue): return rawValue - } + public struct Apps: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var accessibilityDeclarations: Self { + .init(rawValue: "accessibilityDeclarations") + } + + public static var accessibilityUrl: Self { + .init(rawValue: "accessibilityUrl") + } + + public static var alternativeDistributionKey: Self { + .init(rawValue: "alternativeDistributionKey") + } + + public static var analyticsReportRequests: Self { + .init(rawValue: "analyticsReportRequests") + } + + public static var appAvailabilityV2: Self { + .init(rawValue: "appAvailabilityV2") + } + + public static var appClips: Self { + .init(rawValue: "appClips") + } + + public static var appCustomProductPages: Self { + .init(rawValue: "appCustomProductPages") + } + + public static var appEncryptionDeclarations: Self { + .init(rawValue: "appEncryptionDeclarations") + } + + public static var appEvents: Self { + .init(rawValue: "appEvents") + } + + public static var appInfos: Self { + .init(rawValue: "appInfos") + } + + public static var appPricePoints: Self { + .init(rawValue: "appPricePoints") + } + + public static var appPriceSchedule: Self { + .init(rawValue: "appPriceSchedule") + } + + public static var appStoreVersionExperimentsV2: Self { + .init(rawValue: "appStoreVersionExperimentsV2") + } + + public static var appStoreVersions: Self { + .init(rawValue: "appStoreVersions") + } + + public static var backgroundAssets: Self { + .init(rawValue: "backgroundAssets") + } + + public static var betaAppLocalizations: Self { + .init(rawValue: "betaAppLocalizations") + } + + public static var betaAppReviewDetail: Self { + .init(rawValue: "betaAppReviewDetail") + } + + public static var betaFeedbackCrashSubmissions: Self { + .init(rawValue: "betaFeedbackCrashSubmissions") + } + + public static var betaFeedbackScreenshotSubmissions: Self { + .init(rawValue: "betaFeedbackScreenshotSubmissions") + } + + public static var betaGroups: Self { + .init(rawValue: "betaGroups") + } + + public static var betaLicenseAgreement: Self { + .init(rawValue: "betaLicenseAgreement") + } + + public static var betaTesters: Self { + .init(rawValue: "betaTesters") + } + + public static var builds: Self { + .init(rawValue: "builds") + } + + public static var bundleId: Self { + .init(rawValue: "bundleId") + } + + public static var ciProduct: Self { + .init(rawValue: "ciProduct") + } + + public static var contentRightsDeclaration: Self { + .init(rawValue: "contentRightsDeclaration") + } + + public static var customerReviewSummarizations: Self { + .init(rawValue: "customerReviewSummarizations") + } + + public static var customerReviews: Self { + .init(rawValue: "customerReviews") + } + + public static var endUserLicenseAgreement: Self { + .init(rawValue: "endUserLicenseAgreement") + } + + public static var gameCenterDetail: Self { + .init(rawValue: "gameCenterDetail") + } + + public static var gameCenterEnabledVersions: Self { + .init(rawValue: "gameCenterEnabledVersions") + } + + public static var inAppPurchases: Self { + .init(rawValue: "inAppPurchases") + } + + public static var inAppPurchasesV2: Self { + .init(rawValue: "inAppPurchasesV2") + } + + public static var isOrEverWasMadeForKids: Self { + .init(rawValue: "isOrEverWasMadeForKids") + } + + public static var marketplaceSearchDetail: Self { + .init(rawValue: "marketplaceSearchDetail") + } + + public static var name: Self { + .init(rawValue: "name") + } + + public static var perfPowerMetrics: Self { + .init(rawValue: "perfPowerMetrics") + } + + public static var preReleaseVersions: Self { + .init(rawValue: "preReleaseVersions") + } + + public static var primaryLocale: Self { + .init(rawValue: "primaryLocale") + } + + public static var promotedPurchases: Self { + .init(rawValue: "promotedPurchases") + } + + public static var reviewSubmissions: Self { + .init(rawValue: "reviewSubmissions") + } + + public static var sku: Self { + .init(rawValue: "sku") + } + + public static var streamlinedPurchasingEnabled: Self { + .init(rawValue: "streamlinedPurchasingEnabled") + } + + public static var subscriptionGracePeriod: Self { + .init(rawValue: "subscriptionGracePeriod") + } + + public static var subscriptionGroups: Self { + .init(rawValue: "subscriptionGroups") + } + + public static var subscriptionStatusUrl: Self { + .init(rawValue: "subscriptionStatusUrl") + } + + public static var subscriptionStatusUrlForSandbox: Self { + .init(rawValue: "subscriptionStatusUrlForSandbox") + } + + public static var subscriptionStatusUrlVersion: Self { + .init(rawValue: "subscriptionStatusUrlVersion") + } + + public static var subscriptionStatusUrlVersionForSandbox: Self { + .init(rawValue: "subscriptionStatusUrlVersionForSandbox") + } + + public static var webhooks: Self { + .init(rawValue: "webhooks") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct BetaGroups: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var app: Self { + .init(rawValue: "app") + } + + public static var betaRecruitmentCriteria: Self { + .init(rawValue: "betaRecruitmentCriteria") + } + + public static var betaRecruitmentCriterionCompatibleBuildCheck: Self { + .init(rawValue: "betaRecruitmentCriterionCompatibleBuildCheck") + } + + public static var betaTesters: Self { + .init(rawValue: "betaTesters") + } + + public static var builds: Self { + .init(rawValue: "builds") + } + + public static var createdDate: Self { + .init(rawValue: "createdDate") + } + + public static var feedbackEnabled: Self { + .init(rawValue: "feedbackEnabled") + } + + public static var hasAccessToAllBuilds: Self { + .init(rawValue: "hasAccessToAllBuilds") } + public static var iosBuildsAvailableForAppleSiliconMac: Self { + .init(rawValue: "iosBuildsAvailableForAppleSiliconMac") + } + + public static var iosBuildsAvailableForAppleVision: Self { + .init(rawValue: "iosBuildsAvailableForAppleVision") + } + + public static var isInternalGroup: Self { + .init(rawValue: "isInternalGroup") + } + + public static var name: Self { + .init(rawValue: "name") + } + + public static var publicLink: Self { + .init(rawValue: "publicLink") + } + + public static var publicLinkEnabled: Self { + .init(rawValue: "publicLinkEnabled") + } + + public static var publicLinkId: Self { + .init(rawValue: "publicLinkId") + } + + public static var publicLinkLimit: Self { + .init(rawValue: "publicLinkLimit") + } + + public static var publicLinkLimitEnabled: Self { + .init(rawValue: "publicLinkLimitEnabled") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "appAvailability": self = .appAvailability - case "appClips": self = .appClips - case "appCustomProductPages": self = .appCustomProductPages - case "appEncryptionDeclarations": self = .appEncryptionDeclarations - case "appEvents": self = .appEvents - case "appInfos": self = .appInfos - case "appPricePoints": self = .appPricePoints - case "appPriceSchedule": self = .appPriceSchedule - case "appStoreVersionExperimentsV2": self = .appStoreVersionExperimentsV2 - case "appStoreVersions": self = .appStoreVersions - case "availableInNewTerritories": self = .availableInNewTerritories - case "availableTerritories": self = .availableTerritories - case "betaAppLocalizations": self = .betaAppLocalizations - case "betaAppReviewDetail": self = .betaAppReviewDetail - case "betaGroups": self = .betaGroups - case "betaLicenseAgreement": self = .betaLicenseAgreement - case "betaTesters": self = .betaTesters - case "builds": self = .builds - case "bundleId": self = .bundleId - case "ciProduct": self = .ciProduct - case "contentRightsDeclaration": self = .contentRightsDeclaration - case "customerReviews": self = .customerReviews - case "endUserLicenseAgreement": self = .endUserLicenseAgreement - case "gameCenterDetail": self = .gameCenterDetail - case "gameCenterEnabledVersions": self = .gameCenterEnabledVersions - case "inAppPurchases": self = .inAppPurchases - case "inAppPurchasesV2": self = .inAppPurchasesV2 - case "isOrEverWasMadeForKids": self = .isOrEverWasMadeForKids - case "name": self = .name - case "perfPowerMetrics": self = .perfPowerMetrics - case "preOrder": self = .preOrder - case "preReleaseVersions": self = .preReleaseVersions - case "pricePoints": self = .pricePoints - case "prices": self = .prices - case "primaryLocale": self = .primaryLocale - case "promotedPurchases": self = .promotedPurchases - case "reviewSubmissions": self = .reviewSubmissions - case "sku": self = .sku - case "subscriptionGracePeriod": self = .subscriptionGracePeriod - case "subscriptionGroups": self = .subscriptionGroups - case "subscriptionStatusUrl": self = .subscriptionStatusUrl - case "subscriptionStatusUrlForSandbox": self = .subscriptionStatusUrlForSandbox - case "subscriptionStatusUrlVersion": self = .subscriptionStatusUrlVersion - case "subscriptionStatusUrlVersionForSandbox": self = .subscriptionStatusUrlVersionForSandbox - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum BetaGroups: Hashable, Codable, RawRepresentable { - case app - case betaTesters - case builds - case createdDate - case feedbackEnabled - case hasAccessToAllBuilds - case iosBuildsAvailableForAppleSiliconMac - case isInternalGroup - case name - case publicLink - case publicLinkEnabled - case publicLinkId - case publicLinkLimit - case publicLinkLimitEnabled - case unknown(String) - - public var rawValue: String { - switch self { - case .app: return "app" - case .betaTesters: return "betaTesters" - case .builds: return "builds" - case .createdDate: return "createdDate" - case .feedbackEnabled: return "feedbackEnabled" - case .hasAccessToAllBuilds: return "hasAccessToAllBuilds" - case .iosBuildsAvailableForAppleSiliconMac: return "iosBuildsAvailableForAppleSiliconMac" - case .isInternalGroup: return "isInternalGroup" - case .name: return "name" - case .publicLink: return "publicLink" - case .publicLinkEnabled: return "publicLinkEnabled" - case .publicLinkId: return "publicLinkId" - case .publicLinkLimit: return "publicLinkLimit" - case .publicLinkLimitEnabled: return "publicLinkLimitEnabled" - case .unknown(let rawValue): return rawValue - } + public struct BetaRecruitmentCriteria: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var deviceFamilyOsVersionFilters: Self { + .init(rawValue: "deviceFamilyOsVersionFilters") + } + + public static var lastModifiedDate: Self { + .init(rawValue: "lastModifiedDate") + } + + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "app": self = .app - case "betaTesters": self = .betaTesters - case "builds": self = .builds - case "createdDate": self = .createdDate - case "feedbackEnabled": self = .feedbackEnabled - case "hasAccessToAllBuilds": self = .hasAccessToAllBuilds - case "iosBuildsAvailableForAppleSiliconMac": self = .iosBuildsAvailableForAppleSiliconMac - case "isInternalGroup": self = .isInternalGroup - case "name": self = .name - case "publicLink": self = .publicLink - case "publicLinkEnabled": self = .publicLinkEnabled - case "publicLinkId": self = .publicLinkId - case "publicLinkLimit": self = .publicLinkLimit - case "publicLinkLimitEnabled": self = .publicLinkLimitEnabled - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum BetaTesters: Hashable, Codable, RawRepresentable { - case apps - case betaGroups - case builds - case email - case firstName - case inviteType - case lastName - case unknown(String) - - public var rawValue: String { - switch self { - case .apps: return "apps" - case .betaGroups: return "betaGroups" - case .builds: return "builds" - case .email: return "email" - case .firstName: return "firstName" - case .inviteType: return "inviteType" - case .lastName: return "lastName" - case .unknown(let rawValue): return rawValue - } + public struct BetaTesters: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var apps: Self { + .init(rawValue: "apps") + } + + public static var betaGroups: Self { + .init(rawValue: "betaGroups") + } + + public static var builds: Self { + .init(rawValue: "builds") + } + + public static var email: Self { + .init(rawValue: "email") } + public static var firstName: Self { + .init(rawValue: "firstName") + } + + public static var inviteType: Self { + .init(rawValue: "inviteType") + } + + public static var lastName: Self { + .init(rawValue: "lastName") + } + + public static var state: Self { + .init(rawValue: "state") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "apps": self = .apps - case "betaGroups": self = .betaGroups - case "builds": self = .builds - case "email": self = .email - case "firstName": self = .firstName - case "inviteType": self = .inviteType - case "lastName": self = .lastName - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum Builds: Hashable, Codable, RawRepresentable { - case app - case appEncryptionDeclaration - case appStoreVersion - case betaAppReviewSubmission - case betaBuildLocalizations - case betaGroups - case buildAudienceType - case buildBetaDetail - case buildBundles - case computedMinMacOsVersion - case diagnosticSignatures - case expirationDate - case expired - case iconAssetToken - case icons - case individualTesters - case lsMinimumSystemVersion - case minOsVersion - case perfPowerMetrics - case preReleaseVersion - case processingState - case uploadedDate - case usesNonExemptEncryption - case version - case unknown(String) - - public var rawValue: String { - switch self { - case .app: return "app" - case .appEncryptionDeclaration: return "appEncryptionDeclaration" - case .appStoreVersion: return "appStoreVersion" - case .betaAppReviewSubmission: return "betaAppReviewSubmission" - case .betaBuildLocalizations: return "betaBuildLocalizations" - case .betaGroups: return "betaGroups" - case .buildAudienceType: return "buildAudienceType" - case .buildBetaDetail: return "buildBetaDetail" - case .buildBundles: return "buildBundles" - case .computedMinMacOsVersion: return "computedMinMacOsVersion" - case .diagnosticSignatures: return "diagnosticSignatures" - case .expirationDate: return "expirationDate" - case .expired: return "expired" - case .iconAssetToken: return "iconAssetToken" - case .icons: return "icons" - case .individualTesters: return "individualTesters" - case .lsMinimumSystemVersion: return "lsMinimumSystemVersion" - case .minOsVersion: return "minOsVersion" - case .perfPowerMetrics: return "perfPowerMetrics" - case .preReleaseVersion: return "preReleaseVersion" - case .processingState: return "processingState" - case .uploadedDate: return "uploadedDate" - case .usesNonExemptEncryption: return "usesNonExemptEncryption" - case .version: return "version" - case .unknown(let rawValue): return rawValue - } + public struct Builds: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var app: Self { + .init(rawValue: "app") + } + + public static var appEncryptionDeclaration: Self { + .init(rawValue: "appEncryptionDeclaration") + } + + public static var appStoreVersion: Self { + .init(rawValue: "appStoreVersion") + } + + public static var betaAppReviewSubmission: Self { + .init(rawValue: "betaAppReviewSubmission") + } + + public static var betaBuildLocalizations: Self { + .init(rawValue: "betaBuildLocalizations") + } + + public static var betaGroups: Self { + .init(rawValue: "betaGroups") + } + + public static var buildAudienceType: Self { + .init(rawValue: "buildAudienceType") + } + + public static var buildBetaDetail: Self { + .init(rawValue: "buildBetaDetail") + } + + public static var buildBundles: Self { + .init(rawValue: "buildBundles") + } + + public static var computedMinMacOsVersion: Self { + .init(rawValue: "computedMinMacOsVersion") + } + + public static var computedMinVisionOsVersion: Self { + .init(rawValue: "computedMinVisionOsVersion") } + public static var diagnosticSignatures: Self { + .init(rawValue: "diagnosticSignatures") + } + + public static var expirationDate: Self { + .init(rawValue: "expirationDate") + } + + public static var expired: Self { + .init(rawValue: "expired") + } + + public static var iconAssetToken: Self { + .init(rawValue: "iconAssetToken") + } + + public static var icons: Self { + .init(rawValue: "icons") + } + + public static var individualTesters: Self { + .init(rawValue: "individualTesters") + } + + public static var lsMinimumSystemVersion: Self { + .init(rawValue: "lsMinimumSystemVersion") + } + + public static var minOsVersion: Self { + .init(rawValue: "minOsVersion") + } + + public static var perfPowerMetrics: Self { + .init(rawValue: "perfPowerMetrics") + } + + public static var preReleaseVersion: Self { + .init(rawValue: "preReleaseVersion") + } + + public static var processingState: Self { + .init(rawValue: "processingState") + } + + public static var uploadedDate: Self { + .init(rawValue: "uploadedDate") + } + + public static var usesNonExemptEncryption: Self { + .init(rawValue: "usesNonExemptEncryption") + } + + public static var version: Self { + .init(rawValue: "version") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "app": self = .app - case "appEncryptionDeclaration": self = .appEncryptionDeclaration - case "appStoreVersion": self = .appStoreVersion - case "betaAppReviewSubmission": self = .betaAppReviewSubmission - case "betaBuildLocalizations": self = .betaBuildLocalizations - case "betaGroups": self = .betaGroups - case "buildAudienceType": self = .buildAudienceType - case "buildBetaDetail": self = .buildBetaDetail - case "buildBundles": self = .buildBundles - case "computedMinMacOsVersion": self = .computedMinMacOsVersion - case "diagnosticSignatures": self = .diagnosticSignatures - case "expirationDate": self = .expirationDate - case "expired": self = .expired - case "iconAssetToken": self = .iconAssetToken - case "icons": self = .icons - case "individualTesters": self = .individualTesters - case "lsMinimumSystemVersion": self = .lsMinimumSystemVersion - case "minOsVersion": self = .minOsVersion - case "perfPowerMetrics": self = .perfPowerMetrics - case "preReleaseVersion": self = .preReleaseVersion - case "processingState": self = .processingState - case "uploadedDate": self = .uploadedDate - case "usesNonExemptEncryption": self = .usesNonExemptEncryption - case "version": self = .version - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } @@ -460,6 +607,11 @@ extension V1.BetaGroups.GET { .init(key: "fields[betaGroups]") } + /// the fields to include for returned resources of type betaRecruitmentCriteria + public static var betaRecruitmentCriteria: Relation<[BetaRecruitmentCriteria]?> { + .init(key: "fields[betaRecruitmentCriteria]") + } + /// the fields to include for returned resources of type betaTesters public static var betaTesters: Relation<[BetaTesters]?> { .init(key: "fields[betaTesters]") @@ -535,28 +687,31 @@ extension V1.BetaGroups.GET { } } - public enum Include: Hashable, Codable, RawRepresentable { - case app - case betaTesters - case builds - case unknown(String) + public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var app: Self { + .init(rawValue: "app") + } - public var rawValue: String { - switch self { - case .app: return "app" - case .betaTesters: return "betaTesters" - case .builds: return "builds" - case .unknown(let rawValue): return rawValue - } + public static var betaRecruitmentCriteria: Self { + .init(rawValue: "betaRecruitmentCriteria") + } + + public static var betaTesters: Self { + .init(rawValue: "betaTesters") + } + + public static var builds: Self { + .init(rawValue: "builds") } + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "app": self = .app - case "betaTesters": self = .betaTesters - case "builds": self = .builds - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } @@ -592,43 +747,47 @@ extension V1.BetaGroups.GET { } } - public enum Sort: Hashable, Codable, RawRepresentable { - case createdDate - case createdDateDesc - case name - case nameDesc - case publicLinkEnabled - case publicLinkEnabledDesc - case publicLinkLimit - case publicLinkLimitDesc - case unknown(String) - - public var rawValue: String { - switch self { - case .createdDate: return "createdDate" - case .createdDateDesc: return "-createdDate" - case .name: return "name" - case .nameDesc: return "-name" - case .publicLinkEnabled: return "publicLinkEnabled" - case .publicLinkEnabledDesc: return "-publicLinkEnabled" - case .publicLinkLimit: return "publicLinkLimit" - case .publicLinkLimitDesc: return "-publicLinkLimit" - case .unknown(let rawValue): return rawValue - } + public struct Sort: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var createdDate: Self { + .init(rawValue: "createdDate") + } + + public static var createdDateDesc: Self { + .init(rawValue: "-createdDate") } + public static var name: Self { + .init(rawValue: "name") + } + + public static var nameDesc: Self { + .init(rawValue: "-name") + } + + public static var publicLinkEnabled: Self { + .init(rawValue: "publicLinkEnabled") + } + + public static var publicLinkEnabledDesc: Self { + .init(rawValue: "-publicLinkEnabled") + } + + public static var publicLinkLimit: Self { + .init(rawValue: "publicLinkLimit") + } + + public static var publicLinkLimitDesc: Self { + .init(rawValue: "-publicLinkLimit") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "createdDate": self = .createdDate - case "-createdDate": self = .createdDateDesc - case "name": self = .name - case "-name": self = .nameDesc - case "publicLinkEnabled": self = .publicLinkEnabled - case "-publicLinkEnabled": self = .publicLinkEnabledDesc - case "publicLinkLimit": self = .publicLinkLimit - case "-publicLinkLimit": self = .publicLinkLimitDesc - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaGroups/BetaGroups.POST.b27708f.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaGroups/BetaGroups.POST.b27708f.generated.swift index e503508c..44f96511 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaGroups/BetaGroups.POST.b27708f.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaGroups/BetaGroups.POST.b27708f.generated.swift @@ -41,8 +41,11 @@ extension V1.BetaGroups { /// - Returns: **201**, Single BetaGroup as `BetaGroupResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **422**, Unprocessable request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -56,12 +59,21 @@ extension V1.BetaGroups { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 409: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 422: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaGroups/ById/App/BetaGroupsByIdApp.GET.691b38e.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaGroups/ById/App/BetaGroupsByIdApp.GET.691b38e.generated.swift index 8b475d54..2dd7a6d2 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaGroups/ById/App/BetaGroupsByIdApp.GET.691b38e.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaGroups/ById/App/BetaGroupsByIdApp.GET.691b38e.generated.swift @@ -42,8 +42,10 @@ extension V1.BetaGroups.ById.App { /// - Returns: **200**, Single App with get as `AppWithoutIncludesResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -57,12 +59,18 @@ extension V1.BetaGroups.ById.App { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 404: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -82,151 +90,215 @@ extension V1.BetaGroups.ById.App.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum Apps: Hashable, Codable, RawRepresentable { - case appAvailability - case appClips - case appCustomProductPages - case appEncryptionDeclarations - case appEvents - case appInfos - case appPricePoints - case appPriceSchedule - case appStoreVersionExperimentsV2 - case appStoreVersions - case availableInNewTerritories - case availableTerritories - case betaAppLocalizations - case betaAppReviewDetail - case betaGroups - case betaLicenseAgreement - case betaTesters - case builds - case bundleId - case ciProduct - case contentRightsDeclaration - case customerReviews - case endUserLicenseAgreement - case gameCenterDetail - case gameCenterEnabledVersions - case inAppPurchases - case inAppPurchasesV2 - case isOrEverWasMadeForKids - case name - case perfPowerMetrics - case preOrder - case preReleaseVersions - case pricePoints - case prices - case primaryLocale - case promotedPurchases - case reviewSubmissions - case sku - case subscriptionGracePeriod - case subscriptionGroups - case subscriptionStatusUrl - case subscriptionStatusUrlForSandbox - case subscriptionStatusUrlVersion - case subscriptionStatusUrlVersionForSandbox - case unknown(String) - - public var rawValue: String { - switch self { - case .appAvailability: return "appAvailability" - case .appClips: return "appClips" - case .appCustomProductPages: return "appCustomProductPages" - case .appEncryptionDeclarations: return "appEncryptionDeclarations" - case .appEvents: return "appEvents" - case .appInfos: return "appInfos" - case .appPricePoints: return "appPricePoints" - case .appPriceSchedule: return "appPriceSchedule" - case .appStoreVersionExperimentsV2: return "appStoreVersionExperimentsV2" - case .appStoreVersions: return "appStoreVersions" - case .availableInNewTerritories: return "availableInNewTerritories" - case .availableTerritories: return "availableTerritories" - case .betaAppLocalizations: return "betaAppLocalizations" - case .betaAppReviewDetail: return "betaAppReviewDetail" - case .betaGroups: return "betaGroups" - case .betaLicenseAgreement: return "betaLicenseAgreement" - case .betaTesters: return "betaTesters" - case .builds: return "builds" - case .bundleId: return "bundleId" - case .ciProduct: return "ciProduct" - case .contentRightsDeclaration: return "contentRightsDeclaration" - case .customerReviews: return "customerReviews" - case .endUserLicenseAgreement: return "endUserLicenseAgreement" - case .gameCenterDetail: return "gameCenterDetail" - case .gameCenterEnabledVersions: return "gameCenterEnabledVersions" - case .inAppPurchases: return "inAppPurchases" - case .inAppPurchasesV2: return "inAppPurchasesV2" - case .isOrEverWasMadeForKids: return "isOrEverWasMadeForKids" - case .name: return "name" - case .perfPowerMetrics: return "perfPowerMetrics" - case .preOrder: return "preOrder" - case .preReleaseVersions: return "preReleaseVersions" - case .pricePoints: return "pricePoints" - case .prices: return "prices" - case .primaryLocale: return "primaryLocale" - case .promotedPurchases: return "promotedPurchases" - case .reviewSubmissions: return "reviewSubmissions" - case .sku: return "sku" - case .subscriptionGracePeriod: return "subscriptionGracePeriod" - case .subscriptionGroups: return "subscriptionGroups" - case .subscriptionStatusUrl: return "subscriptionStatusUrl" - case .subscriptionStatusUrlForSandbox: return "subscriptionStatusUrlForSandbox" - case .subscriptionStatusUrlVersion: return "subscriptionStatusUrlVersion" - case .subscriptionStatusUrlVersionForSandbox: return "subscriptionStatusUrlVersionForSandbox" - case .unknown(let rawValue): return rawValue - } + public struct Apps: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var accessibilityDeclarations: Self { + .init(rawValue: "accessibilityDeclarations") + } + + public static var accessibilityUrl: Self { + .init(rawValue: "accessibilityUrl") + } + + public static var alternativeDistributionKey: Self { + .init(rawValue: "alternativeDistributionKey") + } + + public static var analyticsReportRequests: Self { + .init(rawValue: "analyticsReportRequests") + } + + public static var appAvailabilityV2: Self { + .init(rawValue: "appAvailabilityV2") + } + + public static var appClips: Self { + .init(rawValue: "appClips") } + public static var appCustomProductPages: Self { + .init(rawValue: "appCustomProductPages") + } + + public static var appEncryptionDeclarations: Self { + .init(rawValue: "appEncryptionDeclarations") + } + + public static var appEvents: Self { + .init(rawValue: "appEvents") + } + + public static var appInfos: Self { + .init(rawValue: "appInfos") + } + + public static var appPricePoints: Self { + .init(rawValue: "appPricePoints") + } + + public static var appPriceSchedule: Self { + .init(rawValue: "appPriceSchedule") + } + + public static var appStoreVersionExperimentsV2: Self { + .init(rawValue: "appStoreVersionExperimentsV2") + } + + public static var appStoreVersions: Self { + .init(rawValue: "appStoreVersions") + } + + public static var backgroundAssets: Self { + .init(rawValue: "backgroundAssets") + } + + public static var betaAppLocalizations: Self { + .init(rawValue: "betaAppLocalizations") + } + + public static var betaAppReviewDetail: Self { + .init(rawValue: "betaAppReviewDetail") + } + + public static var betaFeedbackCrashSubmissions: Self { + .init(rawValue: "betaFeedbackCrashSubmissions") + } + + public static var betaFeedbackScreenshotSubmissions: Self { + .init(rawValue: "betaFeedbackScreenshotSubmissions") + } + + public static var betaGroups: Self { + .init(rawValue: "betaGroups") + } + + public static var betaLicenseAgreement: Self { + .init(rawValue: "betaLicenseAgreement") + } + + public static var betaTesters: Self { + .init(rawValue: "betaTesters") + } + + public static var builds: Self { + .init(rawValue: "builds") + } + + public static var bundleId: Self { + .init(rawValue: "bundleId") + } + + public static var ciProduct: Self { + .init(rawValue: "ciProduct") + } + + public static var contentRightsDeclaration: Self { + .init(rawValue: "contentRightsDeclaration") + } + + public static var customerReviewSummarizations: Self { + .init(rawValue: "customerReviewSummarizations") + } + + public static var customerReviews: Self { + .init(rawValue: "customerReviews") + } + + public static var endUserLicenseAgreement: Self { + .init(rawValue: "endUserLicenseAgreement") + } + + public static var gameCenterDetail: Self { + .init(rawValue: "gameCenterDetail") + } + + public static var gameCenterEnabledVersions: Self { + .init(rawValue: "gameCenterEnabledVersions") + } + + public static var inAppPurchases: Self { + .init(rawValue: "inAppPurchases") + } + + public static var inAppPurchasesV2: Self { + .init(rawValue: "inAppPurchasesV2") + } + + public static var isOrEverWasMadeForKids: Self { + .init(rawValue: "isOrEverWasMadeForKids") + } + + public static var marketplaceSearchDetail: Self { + .init(rawValue: "marketplaceSearchDetail") + } + + public static var name: Self { + .init(rawValue: "name") + } + + public static var perfPowerMetrics: Self { + .init(rawValue: "perfPowerMetrics") + } + + public static var preReleaseVersions: Self { + .init(rawValue: "preReleaseVersions") + } + + public static var primaryLocale: Self { + .init(rawValue: "primaryLocale") + } + + public static var promotedPurchases: Self { + .init(rawValue: "promotedPurchases") + } + + public static var reviewSubmissions: Self { + .init(rawValue: "reviewSubmissions") + } + + public static var sku: Self { + .init(rawValue: "sku") + } + + public static var streamlinedPurchasingEnabled: Self { + .init(rawValue: "streamlinedPurchasingEnabled") + } + + public static var subscriptionGracePeriod: Self { + .init(rawValue: "subscriptionGracePeriod") + } + + public static var subscriptionGroups: Self { + .init(rawValue: "subscriptionGroups") + } + + public static var subscriptionStatusUrl: Self { + .init(rawValue: "subscriptionStatusUrl") + } + + public static var subscriptionStatusUrlForSandbox: Self { + .init(rawValue: "subscriptionStatusUrlForSandbox") + } + + public static var subscriptionStatusUrlVersion: Self { + .init(rawValue: "subscriptionStatusUrlVersion") + } + + public static var subscriptionStatusUrlVersionForSandbox: Self { + .init(rawValue: "subscriptionStatusUrlVersionForSandbox") + } + + public static var webhooks: Self { + .init(rawValue: "webhooks") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "appAvailability": self = .appAvailability - case "appClips": self = .appClips - case "appCustomProductPages": self = .appCustomProductPages - case "appEncryptionDeclarations": self = .appEncryptionDeclarations - case "appEvents": self = .appEvents - case "appInfos": self = .appInfos - case "appPricePoints": self = .appPricePoints - case "appPriceSchedule": self = .appPriceSchedule - case "appStoreVersionExperimentsV2": self = .appStoreVersionExperimentsV2 - case "appStoreVersions": self = .appStoreVersions - case "availableInNewTerritories": self = .availableInNewTerritories - case "availableTerritories": self = .availableTerritories - case "betaAppLocalizations": self = .betaAppLocalizations - case "betaAppReviewDetail": self = .betaAppReviewDetail - case "betaGroups": self = .betaGroups - case "betaLicenseAgreement": self = .betaLicenseAgreement - case "betaTesters": self = .betaTesters - case "builds": self = .builds - case "bundleId": self = .bundleId - case "ciProduct": self = .ciProduct - case "contentRightsDeclaration": self = .contentRightsDeclaration - case "customerReviews": self = .customerReviews - case "endUserLicenseAgreement": self = .endUserLicenseAgreement - case "gameCenterDetail": self = .gameCenterDetail - case "gameCenterEnabledVersions": self = .gameCenterEnabledVersions - case "inAppPurchases": self = .inAppPurchases - case "inAppPurchasesV2": self = .inAppPurchasesV2 - case "isOrEverWasMadeForKids": self = .isOrEverWasMadeForKids - case "name": self = .name - case "perfPowerMetrics": self = .perfPowerMetrics - case "preOrder": self = .preOrder - case "preReleaseVersions": self = .preReleaseVersions - case "pricePoints": self = .pricePoints - case "prices": self = .prices - case "primaryLocale": self = .primaryLocale - case "promotedPurchases": self = .promotedPurchases - case "reviewSubmissions": self = .reviewSubmissions - case "sku": self = .sku - case "subscriptionGracePeriod": self = .subscriptionGracePeriod - case "subscriptionGroups": self = .subscriptionGroups - case "subscriptionStatusUrl": self = .subscriptionStatusUrl - case "subscriptionStatusUrlForSandbox": self = .subscriptionStatusUrlForSandbox - case "subscriptionStatusUrlVersion": self = .subscriptionStatusUrlVersion - case "subscriptionStatusUrlVersionForSandbox": self = .subscriptionStatusUrlVersionForSandbox - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaGroups/ById/BetaGroupsById.DELETE.4ae6ed3.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaGroups/ById/BetaGroupsById.DELETE.4ae6ed3.generated.swift index d0cd90d0..0b8c3370 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaGroups/ById/BetaGroupsById.DELETE.4ae6ed3.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaGroups/ById/BetaGroupsById.DELETE.4ae6ed3.generated.swift @@ -31,11 +31,12 @@ extension V1.BetaGroups.ById { return urlRequest } - /// - Returns: **204**, Success (no content) /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -43,12 +44,12 @@ extension V1.BetaGroups.ById { } switch urlResponse.statusCode { - case 204: - return - case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) @@ -58,6 +59,9 @@ extension V1.BetaGroups.ById { case 409: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaGroups/ById/BetaGroupsById.GET.4ae6ed3.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaGroups/ById/BetaGroupsById.GET.4ae6ed3.generated.swift index 71d8ac6e..7c0f749e 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaGroups/ById/BetaGroupsById.GET.4ae6ed3.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaGroups/ById/BetaGroupsById.GET.4ae6ed3.generated.swift @@ -32,6 +32,8 @@ extension V1.BetaGroups.ById { value: parameters.fields[.apps]?.map { "\($0)" }.joined(separator: ",")), URLQueryItem(name: "fields[betaGroups]", value: parameters.fields[.betaGroups]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "fields[betaRecruitmentCriteria]", + value: parameters.fields[.betaRecruitmentCriteria]?.map { "\($0)" }.joined(separator: ",")), URLQueryItem(name: "fields[betaTesters]", value: parameters.fields[.betaTesters]?.map { "\($0)" }.joined(separator: ",")), URLQueryItem(name: "fields[builds]", @@ -54,8 +56,10 @@ extension V1.BetaGroups.ById { /// - Returns: **200**, Single BetaGroup as `BetaGroupResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -69,12 +73,18 @@ extension V1.BetaGroups.ById { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 404: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -99,334 +109,471 @@ extension V1.BetaGroups.ById.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum Apps: Hashable, Codable, RawRepresentable { - case appAvailability - case appClips - case appCustomProductPages - case appEncryptionDeclarations - case appEvents - case appInfos - case appPricePoints - case appPriceSchedule - case appStoreVersionExperimentsV2 - case appStoreVersions - case availableInNewTerritories - case availableTerritories - case betaAppLocalizations - case betaAppReviewDetail - case betaGroups - case betaLicenseAgreement - case betaTesters - case builds - case bundleId - case ciProduct - case contentRightsDeclaration - case customerReviews - case endUserLicenseAgreement - case gameCenterDetail - case gameCenterEnabledVersions - case inAppPurchases - case inAppPurchasesV2 - case isOrEverWasMadeForKids - case name - case perfPowerMetrics - case preOrder - case preReleaseVersions - case pricePoints - case prices - case primaryLocale - case promotedPurchases - case reviewSubmissions - case sku - case subscriptionGracePeriod - case subscriptionGroups - case subscriptionStatusUrl - case subscriptionStatusUrlForSandbox - case subscriptionStatusUrlVersion - case subscriptionStatusUrlVersionForSandbox - case unknown(String) - - public var rawValue: String { - switch self { - case .appAvailability: return "appAvailability" - case .appClips: return "appClips" - case .appCustomProductPages: return "appCustomProductPages" - case .appEncryptionDeclarations: return "appEncryptionDeclarations" - case .appEvents: return "appEvents" - case .appInfos: return "appInfos" - case .appPricePoints: return "appPricePoints" - case .appPriceSchedule: return "appPriceSchedule" - case .appStoreVersionExperimentsV2: return "appStoreVersionExperimentsV2" - case .appStoreVersions: return "appStoreVersions" - case .availableInNewTerritories: return "availableInNewTerritories" - case .availableTerritories: return "availableTerritories" - case .betaAppLocalizations: return "betaAppLocalizations" - case .betaAppReviewDetail: return "betaAppReviewDetail" - case .betaGroups: return "betaGroups" - case .betaLicenseAgreement: return "betaLicenseAgreement" - case .betaTesters: return "betaTesters" - case .builds: return "builds" - case .bundleId: return "bundleId" - case .ciProduct: return "ciProduct" - case .contentRightsDeclaration: return "contentRightsDeclaration" - case .customerReviews: return "customerReviews" - case .endUserLicenseAgreement: return "endUserLicenseAgreement" - case .gameCenterDetail: return "gameCenterDetail" - case .gameCenterEnabledVersions: return "gameCenterEnabledVersions" - case .inAppPurchases: return "inAppPurchases" - case .inAppPurchasesV2: return "inAppPurchasesV2" - case .isOrEverWasMadeForKids: return "isOrEverWasMadeForKids" - case .name: return "name" - case .perfPowerMetrics: return "perfPowerMetrics" - case .preOrder: return "preOrder" - case .preReleaseVersions: return "preReleaseVersions" - case .pricePoints: return "pricePoints" - case .prices: return "prices" - case .primaryLocale: return "primaryLocale" - case .promotedPurchases: return "promotedPurchases" - case .reviewSubmissions: return "reviewSubmissions" - case .sku: return "sku" - case .subscriptionGracePeriod: return "subscriptionGracePeriod" - case .subscriptionGroups: return "subscriptionGroups" - case .subscriptionStatusUrl: return "subscriptionStatusUrl" - case .subscriptionStatusUrlForSandbox: return "subscriptionStatusUrlForSandbox" - case .subscriptionStatusUrlVersion: return "subscriptionStatusUrlVersion" - case .subscriptionStatusUrlVersionForSandbox: return "subscriptionStatusUrlVersionForSandbox" - case .unknown(let rawValue): return rawValue - } + public struct Apps: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var accessibilityDeclarations: Self { + .init(rawValue: "accessibilityDeclarations") + } + + public static var accessibilityUrl: Self { + .init(rawValue: "accessibilityUrl") + } + + public static var alternativeDistributionKey: Self { + .init(rawValue: "alternativeDistributionKey") + } + + public static var analyticsReportRequests: Self { + .init(rawValue: "analyticsReportRequests") + } + + public static var appAvailabilityV2: Self { + .init(rawValue: "appAvailabilityV2") + } + + public static var appClips: Self { + .init(rawValue: "appClips") + } + + public static var appCustomProductPages: Self { + .init(rawValue: "appCustomProductPages") + } + + public static var appEncryptionDeclarations: Self { + .init(rawValue: "appEncryptionDeclarations") + } + + public static var appEvents: Self { + .init(rawValue: "appEvents") + } + + public static var appInfos: Self { + .init(rawValue: "appInfos") + } + + public static var appPricePoints: Self { + .init(rawValue: "appPricePoints") + } + + public static var appPriceSchedule: Self { + .init(rawValue: "appPriceSchedule") + } + + public static var appStoreVersionExperimentsV2: Self { + .init(rawValue: "appStoreVersionExperimentsV2") + } + + public static var appStoreVersions: Self { + .init(rawValue: "appStoreVersions") + } + + public static var backgroundAssets: Self { + .init(rawValue: "backgroundAssets") + } + + public static var betaAppLocalizations: Self { + .init(rawValue: "betaAppLocalizations") + } + + public static var betaAppReviewDetail: Self { + .init(rawValue: "betaAppReviewDetail") + } + + public static var betaFeedbackCrashSubmissions: Self { + .init(rawValue: "betaFeedbackCrashSubmissions") + } + + public static var betaFeedbackScreenshotSubmissions: Self { + .init(rawValue: "betaFeedbackScreenshotSubmissions") + } + + public static var betaGroups: Self { + .init(rawValue: "betaGroups") + } + + public static var betaLicenseAgreement: Self { + .init(rawValue: "betaLicenseAgreement") + } + + public static var betaTesters: Self { + .init(rawValue: "betaTesters") + } + + public static var builds: Self { + .init(rawValue: "builds") + } + + public static var bundleId: Self { + .init(rawValue: "bundleId") + } + + public static var ciProduct: Self { + .init(rawValue: "ciProduct") + } + + public static var contentRightsDeclaration: Self { + .init(rawValue: "contentRightsDeclaration") + } + + public static var customerReviewSummarizations: Self { + .init(rawValue: "customerReviewSummarizations") + } + + public static var customerReviews: Self { + .init(rawValue: "customerReviews") } + public static var endUserLicenseAgreement: Self { + .init(rawValue: "endUserLicenseAgreement") + } + + public static var gameCenterDetail: Self { + .init(rawValue: "gameCenterDetail") + } + + public static var gameCenterEnabledVersions: Self { + .init(rawValue: "gameCenterEnabledVersions") + } + + public static var inAppPurchases: Self { + .init(rawValue: "inAppPurchases") + } + + public static var inAppPurchasesV2: Self { + .init(rawValue: "inAppPurchasesV2") + } + + public static var isOrEverWasMadeForKids: Self { + .init(rawValue: "isOrEverWasMadeForKids") + } + + public static var marketplaceSearchDetail: Self { + .init(rawValue: "marketplaceSearchDetail") + } + + public static var name: Self { + .init(rawValue: "name") + } + + public static var perfPowerMetrics: Self { + .init(rawValue: "perfPowerMetrics") + } + + public static var preReleaseVersions: Self { + .init(rawValue: "preReleaseVersions") + } + + public static var primaryLocale: Self { + .init(rawValue: "primaryLocale") + } + + public static var promotedPurchases: Self { + .init(rawValue: "promotedPurchases") + } + + public static var reviewSubmissions: Self { + .init(rawValue: "reviewSubmissions") + } + + public static var sku: Self { + .init(rawValue: "sku") + } + + public static var streamlinedPurchasingEnabled: Self { + .init(rawValue: "streamlinedPurchasingEnabled") + } + + public static var subscriptionGracePeriod: Self { + .init(rawValue: "subscriptionGracePeriod") + } + + public static var subscriptionGroups: Self { + .init(rawValue: "subscriptionGroups") + } + + public static var subscriptionStatusUrl: Self { + .init(rawValue: "subscriptionStatusUrl") + } + + public static var subscriptionStatusUrlForSandbox: Self { + .init(rawValue: "subscriptionStatusUrlForSandbox") + } + + public static var subscriptionStatusUrlVersion: Self { + .init(rawValue: "subscriptionStatusUrlVersion") + } + + public static var subscriptionStatusUrlVersionForSandbox: Self { + .init(rawValue: "subscriptionStatusUrlVersionForSandbox") + } + + public static var webhooks: Self { + .init(rawValue: "webhooks") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "appAvailability": self = .appAvailability - case "appClips": self = .appClips - case "appCustomProductPages": self = .appCustomProductPages - case "appEncryptionDeclarations": self = .appEncryptionDeclarations - case "appEvents": self = .appEvents - case "appInfos": self = .appInfos - case "appPricePoints": self = .appPricePoints - case "appPriceSchedule": self = .appPriceSchedule - case "appStoreVersionExperimentsV2": self = .appStoreVersionExperimentsV2 - case "appStoreVersions": self = .appStoreVersions - case "availableInNewTerritories": self = .availableInNewTerritories - case "availableTerritories": self = .availableTerritories - case "betaAppLocalizations": self = .betaAppLocalizations - case "betaAppReviewDetail": self = .betaAppReviewDetail - case "betaGroups": self = .betaGroups - case "betaLicenseAgreement": self = .betaLicenseAgreement - case "betaTesters": self = .betaTesters - case "builds": self = .builds - case "bundleId": self = .bundleId - case "ciProduct": self = .ciProduct - case "contentRightsDeclaration": self = .contentRightsDeclaration - case "customerReviews": self = .customerReviews - case "endUserLicenseAgreement": self = .endUserLicenseAgreement - case "gameCenterDetail": self = .gameCenterDetail - case "gameCenterEnabledVersions": self = .gameCenterEnabledVersions - case "inAppPurchases": self = .inAppPurchases - case "inAppPurchasesV2": self = .inAppPurchasesV2 - case "isOrEverWasMadeForKids": self = .isOrEverWasMadeForKids - case "name": self = .name - case "perfPowerMetrics": self = .perfPowerMetrics - case "preOrder": self = .preOrder - case "preReleaseVersions": self = .preReleaseVersions - case "pricePoints": self = .pricePoints - case "prices": self = .prices - case "primaryLocale": self = .primaryLocale - case "promotedPurchases": self = .promotedPurchases - case "reviewSubmissions": self = .reviewSubmissions - case "sku": self = .sku - case "subscriptionGracePeriod": self = .subscriptionGracePeriod - case "subscriptionGroups": self = .subscriptionGroups - case "subscriptionStatusUrl": self = .subscriptionStatusUrl - case "subscriptionStatusUrlForSandbox": self = .subscriptionStatusUrlForSandbox - case "subscriptionStatusUrlVersion": self = .subscriptionStatusUrlVersion - case "subscriptionStatusUrlVersionForSandbox": self = .subscriptionStatusUrlVersionForSandbox - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum BetaGroups: Hashable, Codable, RawRepresentable { - case app - case betaTesters - case builds - case createdDate - case feedbackEnabled - case hasAccessToAllBuilds - case iosBuildsAvailableForAppleSiliconMac - case isInternalGroup - case name - case publicLink - case publicLinkEnabled - case publicLinkId - case publicLinkLimit - case publicLinkLimitEnabled - case unknown(String) - - public var rawValue: String { - switch self { - case .app: return "app" - case .betaTesters: return "betaTesters" - case .builds: return "builds" - case .createdDate: return "createdDate" - case .feedbackEnabled: return "feedbackEnabled" - case .hasAccessToAllBuilds: return "hasAccessToAllBuilds" - case .iosBuildsAvailableForAppleSiliconMac: return "iosBuildsAvailableForAppleSiliconMac" - case .isInternalGroup: return "isInternalGroup" - case .name: return "name" - case .publicLink: return "publicLink" - case .publicLinkEnabled: return "publicLinkEnabled" - case .publicLinkId: return "publicLinkId" - case .publicLinkLimit: return "publicLinkLimit" - case .publicLinkLimitEnabled: return "publicLinkLimitEnabled" - case .unknown(let rawValue): return rawValue - } + public struct BetaGroups: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var app: Self { + .init(rawValue: "app") + } + + public static var betaRecruitmentCriteria: Self { + .init(rawValue: "betaRecruitmentCriteria") + } + + public static var betaRecruitmentCriterionCompatibleBuildCheck: Self { + .init(rawValue: "betaRecruitmentCriterionCompatibleBuildCheck") } + public static var betaTesters: Self { + .init(rawValue: "betaTesters") + } + + public static var builds: Self { + .init(rawValue: "builds") + } + + public static var createdDate: Self { + .init(rawValue: "createdDate") + } + + public static var feedbackEnabled: Self { + .init(rawValue: "feedbackEnabled") + } + + public static var hasAccessToAllBuilds: Self { + .init(rawValue: "hasAccessToAllBuilds") + } + + public static var iosBuildsAvailableForAppleSiliconMac: Self { + .init(rawValue: "iosBuildsAvailableForAppleSiliconMac") + } + + public static var iosBuildsAvailableForAppleVision: Self { + .init(rawValue: "iosBuildsAvailableForAppleVision") + } + + public static var isInternalGroup: Self { + .init(rawValue: "isInternalGroup") + } + + public static var name: Self { + .init(rawValue: "name") + } + + public static var publicLink: Self { + .init(rawValue: "publicLink") + } + + public static var publicLinkEnabled: Self { + .init(rawValue: "publicLinkEnabled") + } + + public static var publicLinkId: Self { + .init(rawValue: "publicLinkId") + } + + public static var publicLinkLimit: Self { + .init(rawValue: "publicLinkLimit") + } + + public static var publicLinkLimitEnabled: Self { + .init(rawValue: "publicLinkLimitEnabled") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "app": self = .app - case "betaTesters": self = .betaTesters - case "builds": self = .builds - case "createdDate": self = .createdDate - case "feedbackEnabled": self = .feedbackEnabled - case "hasAccessToAllBuilds": self = .hasAccessToAllBuilds - case "iosBuildsAvailableForAppleSiliconMac": self = .iosBuildsAvailableForAppleSiliconMac - case "isInternalGroup": self = .isInternalGroup - case "name": self = .name - case "publicLink": self = .publicLink - case "publicLinkEnabled": self = .publicLinkEnabled - case "publicLinkId": self = .publicLinkId - case "publicLinkLimit": self = .publicLinkLimit - case "publicLinkLimitEnabled": self = .publicLinkLimitEnabled - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum BetaTesters: Hashable, Codable, RawRepresentable { - case apps - case betaGroups - case builds - case email - case firstName - case inviteType - case lastName - case unknown(String) - - public var rawValue: String { - switch self { - case .apps: return "apps" - case .betaGroups: return "betaGroups" - case .builds: return "builds" - case .email: return "email" - case .firstName: return "firstName" - case .inviteType: return "inviteType" - case .lastName: return "lastName" - case .unknown(let rawValue): return rawValue - } + public struct BetaRecruitmentCriteria: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var deviceFamilyOsVersionFilters: Self { + .init(rawValue: "deviceFamilyOsVersionFilters") + } + + public static var lastModifiedDate: Self { + .init(rawValue: "lastModifiedDate") } + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "apps": self = .apps - case "betaGroups": self = .betaGroups - case "builds": self = .builds - case "email": self = .email - case "firstName": self = .firstName - case "inviteType": self = .inviteType - case "lastName": self = .lastName - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum Builds: Hashable, Codable, RawRepresentable { - case app - case appEncryptionDeclaration - case appStoreVersion - case betaAppReviewSubmission - case betaBuildLocalizations - case betaGroups - case buildAudienceType - case buildBetaDetail - case buildBundles - case computedMinMacOsVersion - case diagnosticSignatures - case expirationDate - case expired - case iconAssetToken - case icons - case individualTesters - case lsMinimumSystemVersion - case minOsVersion - case perfPowerMetrics - case preReleaseVersion - case processingState - case uploadedDate - case usesNonExemptEncryption - case version - case unknown(String) - - public var rawValue: String { - switch self { - case .app: return "app" - case .appEncryptionDeclaration: return "appEncryptionDeclaration" - case .appStoreVersion: return "appStoreVersion" - case .betaAppReviewSubmission: return "betaAppReviewSubmission" - case .betaBuildLocalizations: return "betaBuildLocalizations" - case .betaGroups: return "betaGroups" - case .buildAudienceType: return "buildAudienceType" - case .buildBetaDetail: return "buildBetaDetail" - case .buildBundles: return "buildBundles" - case .computedMinMacOsVersion: return "computedMinMacOsVersion" - case .diagnosticSignatures: return "diagnosticSignatures" - case .expirationDate: return "expirationDate" - case .expired: return "expired" - case .iconAssetToken: return "iconAssetToken" - case .icons: return "icons" - case .individualTesters: return "individualTesters" - case .lsMinimumSystemVersion: return "lsMinimumSystemVersion" - case .minOsVersion: return "minOsVersion" - case .perfPowerMetrics: return "perfPowerMetrics" - case .preReleaseVersion: return "preReleaseVersion" - case .processingState: return "processingState" - case .uploadedDate: return "uploadedDate" - case .usesNonExemptEncryption: return "usesNonExemptEncryption" - case .version: return "version" - case .unknown(let rawValue): return rawValue - } + public struct BetaTesters: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var apps: Self { + .init(rawValue: "apps") } + public static var betaGroups: Self { + .init(rawValue: "betaGroups") + } + + public static var builds: Self { + .init(rawValue: "builds") + } + + public static var email: Self { + .init(rawValue: "email") + } + + public static var firstName: Self { + .init(rawValue: "firstName") + } + + public static var inviteType: Self { + .init(rawValue: "inviteType") + } + + public static var lastName: Self { + .init(rawValue: "lastName") + } + + public static var state: Self { + .init(rawValue: "state") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "app": self = .app - case "appEncryptionDeclaration": self = .appEncryptionDeclaration - case "appStoreVersion": self = .appStoreVersion - case "betaAppReviewSubmission": self = .betaAppReviewSubmission - case "betaBuildLocalizations": self = .betaBuildLocalizations - case "betaGroups": self = .betaGroups - case "buildAudienceType": self = .buildAudienceType - case "buildBetaDetail": self = .buildBetaDetail - case "buildBundles": self = .buildBundles - case "computedMinMacOsVersion": self = .computedMinMacOsVersion - case "diagnosticSignatures": self = .diagnosticSignatures - case "expirationDate": self = .expirationDate - case "expired": self = .expired - case "iconAssetToken": self = .iconAssetToken - case "icons": self = .icons - case "individualTesters": self = .individualTesters - case "lsMinimumSystemVersion": self = .lsMinimumSystemVersion - case "minOsVersion": self = .minOsVersion - case "perfPowerMetrics": self = .perfPowerMetrics - case "preReleaseVersion": self = .preReleaseVersion - case "processingState": self = .processingState - case "uploadedDate": self = .uploadedDate - case "usesNonExemptEncryption": self = .usesNonExemptEncryption - case "version": self = .version - default: self = .unknown(rawValue) - } + self.rawValue = rawValue + } + } + + public struct Builds: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var app: Self { + .init(rawValue: "app") + } + + public static var appEncryptionDeclaration: Self { + .init(rawValue: "appEncryptionDeclaration") + } + + public static var appStoreVersion: Self { + .init(rawValue: "appStoreVersion") + } + + public static var betaAppReviewSubmission: Self { + .init(rawValue: "betaAppReviewSubmission") + } + + public static var betaBuildLocalizations: Self { + .init(rawValue: "betaBuildLocalizations") + } + + public static var betaGroups: Self { + .init(rawValue: "betaGroups") + } + + public static var buildAudienceType: Self { + .init(rawValue: "buildAudienceType") + } + + public static var buildBetaDetail: Self { + .init(rawValue: "buildBetaDetail") + } + + public static var buildBundles: Self { + .init(rawValue: "buildBundles") + } + + public static var computedMinMacOsVersion: Self { + .init(rawValue: "computedMinMacOsVersion") + } + + public static var computedMinVisionOsVersion: Self { + .init(rawValue: "computedMinVisionOsVersion") + } + + public static var diagnosticSignatures: Self { + .init(rawValue: "diagnosticSignatures") + } + + public static var expirationDate: Self { + .init(rawValue: "expirationDate") + } + + public static var expired: Self { + .init(rawValue: "expired") + } + + public static var iconAssetToken: Self { + .init(rawValue: "iconAssetToken") + } + + public static var icons: Self { + .init(rawValue: "icons") + } + + public static var individualTesters: Self { + .init(rawValue: "individualTesters") + } + + public static var lsMinimumSystemVersion: Self { + .init(rawValue: "lsMinimumSystemVersion") + } + + public static var minOsVersion: Self { + .init(rawValue: "minOsVersion") + } + + public static var perfPowerMetrics: Self { + .init(rawValue: "perfPowerMetrics") + } + + public static var preReleaseVersion: Self { + .init(rawValue: "preReleaseVersion") + } + + public static var processingState: Self { + .init(rawValue: "processingState") + } + + public static var uploadedDate: Self { + .init(rawValue: "uploadedDate") + } + + public static var usesNonExemptEncryption: Self { + .init(rawValue: "usesNonExemptEncryption") + } + + public static var version: Self { + .init(rawValue: "version") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue } } @@ -441,6 +588,11 @@ extension V1.BetaGroups.ById.GET { .init(key: "fields[betaGroups]") } + /// the fields to include for returned resources of type betaRecruitmentCriteria + public static var betaRecruitmentCriteria: Relation<[BetaRecruitmentCriteria]?> { + .init(key: "fields[betaRecruitmentCriteria]") + } + /// the fields to include for returned resources of type betaTesters public static var betaTesters: Relation<[BetaTesters]?> { .init(key: "fields[betaTesters]") @@ -459,28 +611,31 @@ extension V1.BetaGroups.ById.GET { } } - public enum Include: Hashable, Codable, RawRepresentable { - case app - case betaTesters - case builds - case unknown(String) + public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var app: Self { + .init(rawValue: "app") + } - public var rawValue: String { - switch self { - case .app: return "app" - case .betaTesters: return "betaTesters" - case .builds: return "builds" - case .unknown(let rawValue): return rawValue - } + public static var betaRecruitmentCriteria: Self { + .init(rawValue: "betaRecruitmentCriteria") + } + + public static var betaTesters: Self { + .init(rawValue: "betaTesters") + } + + public static var builds: Self { + .init(rawValue: "builds") } + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "app": self = .app - case "betaTesters": self = .betaTesters - case "builds": self = .builds - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaGroups/ById/BetaGroupsById.PATCH.4ae6ed3.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaGroups/ById/BetaGroupsById.PATCH.4ae6ed3.generated.swift index cadb2d8d..d5b19e30 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaGroups/ById/BetaGroupsById.PATCH.4ae6ed3.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaGroups/ById/BetaGroupsById.PATCH.4ae6ed3.generated.swift @@ -48,9 +48,12 @@ extension V1.BetaGroups.ById { /// - Returns: **200**, Single BetaGroup as `BetaGroupResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **422**, Unprocessable request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -64,6 +67,9 @@ extension V1.BetaGroups.ById { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) @@ -73,6 +79,12 @@ extension V1.BetaGroups.ById { case 409: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 422: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaGroups/ById/BetaRecruitmentCriteria/BetaGroupsByIdBetaRecruitmentCriteria.GET.f997474.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaGroups/ById/BetaRecruitmentCriteria/BetaGroupsByIdBetaRecruitmentCriteria.GET.f997474.generated.swift new file mode 100644 index 00000000..e5b3af14 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaGroups/ById/BetaRecruitmentCriteria/BetaGroupsByIdBetaRecruitmentCriteria.GET.f997474.generated.swift @@ -0,0 +1,129 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.BetaGroups.ById.BetaRecruitmentCriteria { + public struct GET: Endpoint { + public typealias Response = BetaRecruitmentCriterionResponse + + public var path: String { + "/v1/betaGroups/\(id)/betaRecruitmentCriteria" + } + + /// the id of the requested resource + public var id: String + + public var parameters: Parameters = Parameters() + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + components?.queryItems = [ + URLQueryItem(name: "fields[betaRecruitmentCriteria]", + value: parameters.fields[.betaRecruitmentCriteria]?.map { "\($0)" }.joined(separator: ",")) + ].filter { $0.value != nil } + if components?.queryItems?.isEmpty ?? false { + components?.queryItems = nil + } + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "GET" + return urlRequest + } + + /// - Returns: **200**, Single BetaRecruitmentCriterion as `BetaRecruitmentCriterionResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(BetaRecruitmentCriterionResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +extension V1.BetaGroups.ById.BetaRecruitmentCriteria.GET { + public struct Parameters: Hashable { + public var fields: Fields = Fields() + + public struct Fields: Hashable { + public subscript (_ relation: Relation) -> T { + get { values[relation]?.base as! T } + set { values[relation] = AnyHashable(newValue) } + } + + private var values: [AnyHashable: AnyHashable] = [:] + + public struct BetaRecruitmentCriteria: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var deviceFamilyOsVersionFilters: Self { + .init(rawValue: "deviceFamilyOsVersionFilters") + } + + public static var lastModifiedDate: Self { + .init(rawValue: "lastModifiedDate") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct Relation: Hashable { + /// the fields to include for returned resources of type betaRecruitmentCriteria + public static var betaRecruitmentCriteria: Relation<[BetaRecruitmentCriteria]?> { + .init(key: "fields[betaRecruitmentCriteria]") + } + + internal let key: String + + public func hash(into hasher: inout Hasher) { + hasher.combine(key) + } + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaGroups/ById/BetaRecruitmentCriterionCompatibleBuildCheck/BetaGroupsByIdBetaRecruitmentCriterionCompatibleBuildCheck.GET.66455fd.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaGroups/ById/BetaRecruitmentCriterionCompatibleBuildCheck/BetaGroupsByIdBetaRecruitmentCriterionCompatibleBuildCheck.GET.66455fd.generated.swift new file mode 100644 index 00000000..f26bfc3b --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaGroups/ById/BetaRecruitmentCriterionCompatibleBuildCheck/BetaGroupsByIdBetaRecruitmentCriterionCompatibleBuildCheck.GET.66455fd.generated.swift @@ -0,0 +1,125 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.BetaGroups.ById.BetaRecruitmentCriterionCompatibleBuildCheck { + public struct GET: Endpoint { + public typealias Response = BetaRecruitmentCriterionCompatibleBuildCheckResponse + + public var path: String { + "/v1/betaGroups/\(id)/betaRecruitmentCriterionCompatibleBuildCheck" + } + + /// the id of the requested resource + public var id: String + + public var parameters: Parameters = Parameters() + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + components?.queryItems = [ + URLQueryItem(name: "fields[betaRecruitmentCriterionCompatibleBuildChecks]", + value: parameters.fields[.betaRecruitmentCriterionCompatibleBuildChecks]?.map { "\($0)" }.joined(separator: ",")) + ].filter { $0.value != nil } + if components?.queryItems?.isEmpty ?? false { + components?.queryItems = nil + } + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "GET" + return urlRequest + } + + /// - Returns: **200**, Single BetaRecruitmentCriterionCompatibleBuildCheck as `BetaRecruitmentCriterionCompatibleBuildCheckResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(BetaRecruitmentCriterionCompatibleBuildCheckResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +extension V1.BetaGroups.ById.BetaRecruitmentCriterionCompatibleBuildCheck.GET { + public struct Parameters: Hashable { + public var fields: Fields = Fields() + + public struct Fields: Hashable { + public subscript (_ relation: Relation) -> T { + get { values[relation]?.base as! T } + set { values[relation] = AnyHashable(newValue) } + } + + private var values: [AnyHashable: AnyHashable] = [:] + + public struct BetaRecruitmentCriterionCompatibleBuildChecks: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var hasCompatibleBuild: Self { + .init(rawValue: "hasCompatibleBuild") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct Relation: Hashable { + /// the fields to include for returned resources of type betaRecruitmentCriterionCompatibleBuildChecks + public static var betaRecruitmentCriterionCompatibleBuildChecks: Relation<[BetaRecruitmentCriterionCompatibleBuildChecks]?> { + .init(key: "fields[betaRecruitmentCriterionCompatibleBuildChecks]") + } + + internal let key: String + + public func hash(into hasher: inout Hasher) { + hasher.combine(key) + } + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaGroups/ById/BetaTesters/BetaGroupsByIdBetaTesters.GET.6be2957.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaGroups/ById/BetaTesters/BetaGroupsByIdBetaTesters.GET.6be2957.generated.swift index ed6a3d24..cefaed0a 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaGroups/ById/BetaTesters/BetaGroupsByIdBetaTesters.GET.6be2957.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaGroups/ById/BetaTesters/BetaGroupsByIdBetaTesters.GET.6be2957.generated.swift @@ -44,8 +44,10 @@ extension V1.BetaGroups.ById.BetaTesters { /// - Returns: **200**, List of BetaTesters with get as `BetaTestersWithoutIncludesResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -59,12 +61,18 @@ extension V1.BetaGroups.ById.BetaTesters { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 404: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -87,40 +95,47 @@ extension V1.BetaGroups.ById.BetaTesters.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum BetaTesters: Hashable, Codable, RawRepresentable { - case apps - case betaGroups - case builds - case email - case firstName - case inviteType - case lastName - case unknown(String) - - public var rawValue: String { - switch self { - case .apps: return "apps" - case .betaGroups: return "betaGroups" - case .builds: return "builds" - case .email: return "email" - case .firstName: return "firstName" - case .inviteType: return "inviteType" - case .lastName: return "lastName" - case .unknown(let rawValue): return rawValue - } + public struct BetaTesters: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var apps: Self { + .init(rawValue: "apps") + } + + public static var betaGroups: Self { + .init(rawValue: "betaGroups") } + public static var builds: Self { + .init(rawValue: "builds") + } + + public static var email: Self { + .init(rawValue: "email") + } + + public static var firstName: Self { + .init(rawValue: "firstName") + } + + public static var inviteType: Self { + .init(rawValue: "inviteType") + } + + public static var lastName: Self { + .init(rawValue: "lastName") + } + + public static var state: Self { + .init(rawValue: "state") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "apps": self = .apps - case "betaGroups": self = .betaGroups - case "builds": self = .builds - case "email": self = .email - case "firstName": self = .firstName - case "inviteType": self = .inviteType - case "lastName": self = .lastName - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaGroups/ById/Builds/BetaGroupsByIdBuilds.GET.4c37b79.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaGroups/ById/Builds/BetaGroupsByIdBuilds.GET.4c37b79.generated.swift index 00e406b3..e0df2335 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaGroups/ById/Builds/BetaGroupsByIdBuilds.GET.4c37b79.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaGroups/ById/Builds/BetaGroupsByIdBuilds.GET.4c37b79.generated.swift @@ -44,8 +44,10 @@ extension V1.BetaGroups.ById.Builds { /// - Returns: **200**, List of Builds with get as `BuildsWithoutIncludesResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -59,12 +61,18 @@ extension V1.BetaGroups.ById.Builds { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 404: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -87,91 +95,115 @@ extension V1.BetaGroups.ById.Builds.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum Builds: Hashable, Codable, RawRepresentable { - case app - case appEncryptionDeclaration - case appStoreVersion - case betaAppReviewSubmission - case betaBuildLocalizations - case betaGroups - case buildAudienceType - case buildBetaDetail - case buildBundles - case computedMinMacOsVersion - case diagnosticSignatures - case expirationDate - case expired - case iconAssetToken - case icons - case individualTesters - case lsMinimumSystemVersion - case minOsVersion - case perfPowerMetrics - case preReleaseVersion - case processingState - case uploadedDate - case usesNonExemptEncryption - case version - case unknown(String) - - public var rawValue: String { - switch self { - case .app: return "app" - case .appEncryptionDeclaration: return "appEncryptionDeclaration" - case .appStoreVersion: return "appStoreVersion" - case .betaAppReviewSubmission: return "betaAppReviewSubmission" - case .betaBuildLocalizations: return "betaBuildLocalizations" - case .betaGroups: return "betaGroups" - case .buildAudienceType: return "buildAudienceType" - case .buildBetaDetail: return "buildBetaDetail" - case .buildBundles: return "buildBundles" - case .computedMinMacOsVersion: return "computedMinMacOsVersion" - case .diagnosticSignatures: return "diagnosticSignatures" - case .expirationDate: return "expirationDate" - case .expired: return "expired" - case .iconAssetToken: return "iconAssetToken" - case .icons: return "icons" - case .individualTesters: return "individualTesters" - case .lsMinimumSystemVersion: return "lsMinimumSystemVersion" - case .minOsVersion: return "minOsVersion" - case .perfPowerMetrics: return "perfPowerMetrics" - case .preReleaseVersion: return "preReleaseVersion" - case .processingState: return "processingState" - case .uploadedDate: return "uploadedDate" - case .usesNonExemptEncryption: return "usesNonExemptEncryption" - case .version: return "version" - case .unknown(let rawValue): return rawValue - } + public struct Builds: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var app: Self { + .init(rawValue: "app") + } + + public static var appEncryptionDeclaration: Self { + .init(rawValue: "appEncryptionDeclaration") + } + + public static var appStoreVersion: Self { + .init(rawValue: "appStoreVersion") + } + + public static var betaAppReviewSubmission: Self { + .init(rawValue: "betaAppReviewSubmission") + } + + public static var betaBuildLocalizations: Self { + .init(rawValue: "betaBuildLocalizations") + } + + public static var betaGroups: Self { + .init(rawValue: "betaGroups") + } + + public static var buildAudienceType: Self { + .init(rawValue: "buildAudienceType") + } + + public static var buildBetaDetail: Self { + .init(rawValue: "buildBetaDetail") + } + + public static var buildBundles: Self { + .init(rawValue: "buildBundles") + } + + public static var computedMinMacOsVersion: Self { + .init(rawValue: "computedMinMacOsVersion") + } + + public static var computedMinVisionOsVersion: Self { + .init(rawValue: "computedMinVisionOsVersion") + } + + public static var diagnosticSignatures: Self { + .init(rawValue: "diagnosticSignatures") + } + + public static var expirationDate: Self { + .init(rawValue: "expirationDate") } + public static var expired: Self { + .init(rawValue: "expired") + } + + public static var iconAssetToken: Self { + .init(rawValue: "iconAssetToken") + } + + public static var icons: Self { + .init(rawValue: "icons") + } + + public static var individualTesters: Self { + .init(rawValue: "individualTesters") + } + + public static var lsMinimumSystemVersion: Self { + .init(rawValue: "lsMinimumSystemVersion") + } + + public static var minOsVersion: Self { + .init(rawValue: "minOsVersion") + } + + public static var perfPowerMetrics: Self { + .init(rawValue: "perfPowerMetrics") + } + + public static var preReleaseVersion: Self { + .init(rawValue: "preReleaseVersion") + } + + public static var processingState: Self { + .init(rawValue: "processingState") + } + + public static var uploadedDate: Self { + .init(rawValue: "uploadedDate") + } + + public static var usesNonExemptEncryption: Self { + .init(rawValue: "usesNonExemptEncryption") + } + + public static var version: Self { + .init(rawValue: "version") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "app": self = .app - case "appEncryptionDeclaration": self = .appEncryptionDeclaration - case "appStoreVersion": self = .appStoreVersion - case "betaAppReviewSubmission": self = .betaAppReviewSubmission - case "betaBuildLocalizations": self = .betaBuildLocalizations - case "betaGroups": self = .betaGroups - case "buildAudienceType": self = .buildAudienceType - case "buildBetaDetail": self = .buildBetaDetail - case "buildBundles": self = .buildBundles - case "computedMinMacOsVersion": self = .computedMinMacOsVersion - case "diagnosticSignatures": self = .diagnosticSignatures - case "expirationDate": self = .expirationDate - case "expired": self = .expired - case "iconAssetToken": self = .iconAssetToken - case "icons": self = .icons - case "individualTesters": self = .individualTesters - case "lsMinimumSystemVersion": self = .lsMinimumSystemVersion - case "minOsVersion": self = .minOsVersion - case "perfPowerMetrics": self = .perfPowerMetrics - case "preReleaseVersion": self = .preReleaseVersion - case "processingState": self = .processingState - case "uploadedDate": self = .uploadedDate - case "usesNonExemptEncryption": self = .usesNonExemptEncryption - case "version": self = .version - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaGroups/ById/Metrics/BetaTesterUsages/BetaGroupsByIdMetricsBetaTesterUsages.GET.feeeb4f.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaGroups/ById/Metrics/BetaTesterUsages/BetaGroupsByIdMetricsBetaTesterUsages.GET.feeeb4f.generated.swift index fd547ed7..e8540b6d 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaGroups/ById/Metrics/BetaTesterUsages/BetaGroupsByIdMetricsBetaTesterUsages.GET.feeeb4f.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaGroups/ById/Metrics/BetaTesterUsages/BetaGroupsByIdMetricsBetaTesterUsages.GET.feeeb4f.generated.swift @@ -48,8 +48,10 @@ extension V1.BetaGroups.ById.Metrics.BetaTesterUsages { /// - Returns: **200**, Metrics data response as `AppsBetaTesterUsagesV1MetricResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -63,12 +65,18 @@ extension V1.BetaGroups.ById.Metrics.BetaTesterUsages { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 404: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -87,7 +95,7 @@ extension V1.BetaGroups.ById.Metrics.BetaTesterUsages.GET { public var limit: Int? /// the duration of the reporting period - public var period: String? + public var period: Period? public struct Filter: Hashable { public subscript (_ relation: Relation) -> T { @@ -111,22 +119,47 @@ extension V1.BetaGroups.ById.Metrics.BetaTesterUsages.GET { } } - public enum GroupBy: Hashable, Codable, RawRepresentable { - case betaTesters - case unknown(String) + public struct GroupBy: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var betaTesters: Self { + .init(rawValue: "betaTesters") + } - public var rawValue: String { - switch self { - case .betaTesters: return "betaTesters" - case .unknown(let rawValue): return rawValue - } + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "betaTesters": self = .betaTesters - default: self = .unknown(rawValue) - } + self.rawValue = rawValue + } + } + + public struct Period: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var p30D: Self { + .init(rawValue: "P30D") + } + + public static var p365D: Self { + .init(rawValue: "P365D") + } + + public static var p7D: Self { + .init(rawValue: "P7D") + } + + public static var p90D: Self { + .init(rawValue: "P90D") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue } } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaGroups/ById/Metrics/PublicLinkUsages/BetaGroupsByIdMetricsPublicLinkUsages.GET.1e8a460.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaGroups/ById/Metrics/PublicLinkUsages/BetaGroupsByIdMetricsPublicLinkUsages.GET.1e8a460.generated.swift new file mode 100644 index 00000000..ba19faae --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaGroups/ById/Metrics/PublicLinkUsages/BetaGroupsByIdMetricsPublicLinkUsages.GET.1e8a460.generated.swift @@ -0,0 +1,88 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.BetaGroups.ById.Metrics.PublicLinkUsages { + public struct GET: Endpoint { + public typealias Response = BetaPublicLinkUsagesV1MetricResponse + + public var path: String { + "/v1/betaGroups/\(id)/metrics/publicLinkUsages" + } + + /// the id of the requested resource + public var id: String + + public var parameters: Parameters = Parameters() + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + components?.queryItems = [ + URLQueryItem(name: "limit", + value: parameters.limit.map { "\($0)" }) + ].filter { $0.value != nil } + if components?.queryItems?.isEmpty ?? false { + components?.queryItems = nil + } + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "GET" + return urlRequest + } + + /// - Returns: **200**, Metrics data response as `BetaPublicLinkUsagesV1MetricResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(BetaPublicLinkUsagesV1MetricResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +extension V1.BetaGroups.ById.Metrics.PublicLinkUsages.GET { + public struct Parameters: Hashable { + /// maximum number of groups to return per page + public var limit: Int? + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaGroups/ById/Relationships/App/BetaGroupsByIdRelationshipsApp.GET.1257202.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaGroups/ById/Relationships/App/BetaGroupsByIdRelationshipsApp.GET.1257202.generated.swift new file mode 100644 index 00000000..11b45060 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaGroups/ById/Relationships/App/BetaGroupsByIdRelationshipsApp.GET.1257202.generated.swift @@ -0,0 +1,86 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.BetaGroups.ById.Relationships.App { + public struct GET: Endpoint { + public typealias Response = BetaGroupAppLinkageResponse + + public var path: String { + "/v1/betaGroups/\(id)/relationships/app" + } + + /// the id of the requested resource + public var id: String + + public var parameters: Parameters = Parameters() + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + components?.queryItems = [ + + ].filter { $0.value != nil } + if components?.queryItems?.isEmpty ?? false { + components?.queryItems = nil + } + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "GET" + return urlRequest + } + + /// - Returns: **200**, Related linkage as `BetaGroupAppLinkageResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(BetaGroupAppLinkageResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +extension V1.BetaGroups.ById.Relationships.App.GET { + public struct Parameters: Hashable { + + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaGroups/ById/Relationships/BetaRecruitmentCriteria/BetaGroupsByIdRelationshipsBetaRecruitmentCriteria.GET.b05174d.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaGroups/ById/Relationships/BetaRecruitmentCriteria/BetaGroupsByIdRelationshipsBetaRecruitmentCriteria.GET.b05174d.generated.swift new file mode 100644 index 00000000..e4ef37ee --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaGroups/ById/Relationships/BetaRecruitmentCriteria/BetaGroupsByIdRelationshipsBetaRecruitmentCriteria.GET.b05174d.generated.swift @@ -0,0 +1,86 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.BetaGroups.ById.Relationships.BetaRecruitmentCriteria { + public struct GET: Endpoint { + public typealias Response = BetaGroupBetaRecruitmentCriteriaLinkageResponse + + public var path: String { + "/v1/betaGroups/\(id)/relationships/betaRecruitmentCriteria" + } + + /// the id of the requested resource + public var id: String + + public var parameters: Parameters = Parameters() + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + components?.queryItems = [ + + ].filter { $0.value != nil } + if components?.queryItems?.isEmpty ?? false { + components?.queryItems = nil + } + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "GET" + return urlRequest + } + + /// - Returns: **200**, Related linkage as `BetaGroupBetaRecruitmentCriteriaLinkageResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(BetaGroupBetaRecruitmentCriteriaLinkageResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +extension V1.BetaGroups.ById.Relationships.BetaRecruitmentCriteria.GET { + public struct Parameters: Hashable { + + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaGroups/ById/Relationships/BetaRecruitmentCriterionCompatibleBuildCheck/BetaGroupsByIdRelationshipsBetaRecruitmentCriterionCompatibleBuildCheck.GET.39f8e93.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaGroups/ById/Relationships/BetaRecruitmentCriterionCompatibleBuildCheck/BetaGroupsByIdRelationshipsBetaRecruitmentCriterionCompatibleBuildCheck.GET.39f8e93.generated.swift new file mode 100644 index 00000000..c639ee30 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaGroups/ById/Relationships/BetaRecruitmentCriterionCompatibleBuildCheck/BetaGroupsByIdRelationshipsBetaRecruitmentCriterionCompatibleBuildCheck.GET.39f8e93.generated.swift @@ -0,0 +1,86 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.BetaGroups.ById.Relationships.BetaRecruitmentCriterionCompatibleBuildCheck { + public struct GET: Endpoint { + public typealias Response = BetaGroupBetaRecruitmentCriterionCompatibleBuildCheckLinkageResponse + + public var path: String { + "/v1/betaGroups/\(id)/relationships/betaRecruitmentCriterionCompatibleBuildCheck" + } + + /// the id of the requested resource + public var id: String + + public var parameters: Parameters = Parameters() + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + components?.queryItems = [ + + ].filter { $0.value != nil } + if components?.queryItems?.isEmpty ?? false { + components?.queryItems = nil + } + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "GET" + return urlRequest + } + + /// - Returns: **200**, Related linkage as `BetaGroupBetaRecruitmentCriterionCompatibleBuildCheckLinkageResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(BetaGroupBetaRecruitmentCriterionCompatibleBuildCheckLinkageResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +extension V1.BetaGroups.ById.Relationships.BetaRecruitmentCriterionCompatibleBuildCheck.GET { + public struct Parameters: Hashable { + + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaGroups/ById/Relationships/BetaTesters/BetaGroupsByIdRelationshipsBetaTesters.DELETE.35d7641.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaGroups/ById/Relationships/BetaTesters/BetaGroupsByIdRelationshipsBetaTesters.DELETE.35d7641.generated.swift index 06c2d17f..c8f47067 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaGroups/ById/Relationships/BetaTesters/BetaGroupsByIdRelationshipsBetaTesters.DELETE.35d7641.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaGroups/ById/Relationships/BetaTesters/BetaGroupsByIdRelationshipsBetaTesters.DELETE.35d7641.generated.swift @@ -31,10 +31,12 @@ extension V1.BetaGroups.ById.Relationships.BetaTesters { return urlRequest } - /// - Returns: **204**, Success (no content) + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **422**, Unprocessable request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -42,8 +44,8 @@ extension V1.BetaGroups.ById.Relationships.BetaTesters { } switch urlResponse.statusCode { - case 204: - return + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) @@ -54,6 +56,12 @@ extension V1.BetaGroups.ById.Relationships.BetaTesters { case 409: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 422: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaGroups/ById/Relationships/BetaTesters/BetaGroupsByIdRelationshipsBetaTesters.GET.35d7641.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaGroups/ById/Relationships/BetaTesters/BetaGroupsByIdRelationshipsBetaTesters.GET.35d7641.generated.swift index 8d4ea20c..a710b75d 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaGroups/ById/Relationships/BetaTesters/BetaGroupsByIdRelationshipsBetaTesters.GET.35d7641.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaGroups/ById/Relationships/BetaTesters/BetaGroupsByIdRelationshipsBetaTesters.GET.35d7641.generated.swift @@ -42,8 +42,10 @@ extension V1.BetaGroups.ById.Relationships.BetaTesters { /// - Returns: **200**, List of related linkages as `BetaGroupBetaTestersLinkagesResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -57,12 +59,18 @@ extension V1.BetaGroups.ById.Relationships.BetaTesters { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 404: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaGroups/ById/Relationships/BetaTesters/BetaGroupsByIdRelationshipsBetaTesters.POST.35d7641.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaGroups/ById/Relationships/BetaTesters/BetaGroupsByIdRelationshipsBetaTesters.POST.35d7641.generated.swift index 545180f2..ccee28d5 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaGroups/ById/Relationships/BetaTesters/BetaGroupsByIdRelationshipsBetaTesters.POST.35d7641.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaGroups/ById/Relationships/BetaTesters/BetaGroupsByIdRelationshipsBetaTesters.POST.35d7641.generated.swift @@ -46,10 +46,12 @@ extension V1.BetaGroups.ById.Relationships.BetaTesters { return urlRequest } - /// - Returns: **204**, Success (no content) + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **422**, Unprocessable request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -57,8 +59,8 @@ extension V1.BetaGroups.ById.Relationships.BetaTesters { } switch urlResponse.statusCode { - case 204: - return + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) @@ -69,6 +71,12 @@ extension V1.BetaGroups.ById.Relationships.BetaTesters { case 409: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 422: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaGroups/ById/Relationships/Builds/BetaGroupsByIdRelationshipsBuilds.DELETE.b710f39.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaGroups/ById/Relationships/Builds/BetaGroupsByIdRelationshipsBuilds.DELETE.b710f39.generated.swift index 648b4ee1..f6e27c3a 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaGroups/ById/Relationships/Builds/BetaGroupsByIdRelationshipsBuilds.DELETE.b710f39.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaGroups/ById/Relationships/Builds/BetaGroupsByIdRelationshipsBuilds.DELETE.b710f39.generated.swift @@ -31,10 +31,12 @@ extension V1.BetaGroups.ById.Relationships.Builds { return urlRequest } - /// - Returns: **204**, Success (no content) + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **422**, Unprocessable request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -42,8 +44,8 @@ extension V1.BetaGroups.ById.Relationships.Builds { } switch urlResponse.statusCode { - case 204: - return + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) @@ -54,6 +56,12 @@ extension V1.BetaGroups.ById.Relationships.Builds { case 409: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 422: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaGroups/ById/Relationships/Builds/BetaGroupsByIdRelationshipsBuilds.GET.b710f39.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaGroups/ById/Relationships/Builds/BetaGroupsByIdRelationshipsBuilds.GET.b710f39.generated.swift index fd5cae7b..4af3eb0b 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaGroups/ById/Relationships/Builds/BetaGroupsByIdRelationshipsBuilds.GET.b710f39.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaGroups/ById/Relationships/Builds/BetaGroupsByIdRelationshipsBuilds.GET.b710f39.generated.swift @@ -42,8 +42,10 @@ extension V1.BetaGroups.ById.Relationships.Builds { /// - Returns: **200**, List of related linkages as `BetaGroupBuildsLinkagesResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -57,12 +59,18 @@ extension V1.BetaGroups.ById.Relationships.Builds { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 404: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaGroups/ById/Relationships/Builds/BetaGroupsByIdRelationshipsBuilds.POST.b710f39.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaGroups/ById/Relationships/Builds/BetaGroupsByIdRelationshipsBuilds.POST.b710f39.generated.swift index 413c9185..7f3ce584 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaGroups/ById/Relationships/Builds/BetaGroupsByIdRelationshipsBuilds.POST.b710f39.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaGroups/ById/Relationships/Builds/BetaGroupsByIdRelationshipsBuilds.POST.b710f39.generated.swift @@ -46,10 +46,12 @@ extension V1.BetaGroups.ById.Relationships.Builds { return urlRequest } - /// - Returns: **204**, Success (no content) + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **422**, Unprocessable request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -57,8 +59,8 @@ extension V1.BetaGroups.ById.Relationships.Builds { } switch urlResponse.statusCode { - case 204: - return + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) @@ -69,6 +71,12 @@ extension V1.BetaGroups.ById.Relationships.Builds { case 409: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 422: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaLicenseAgreements/BetaLicenseAgreements.GET.0f8b4d4.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaLicenseAgreements/BetaLicenseAgreements.GET.0f8b4d4.generated.swift index c086b531..d01f6777 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaLicenseAgreements/BetaLicenseAgreements.GET.0f8b4d4.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaLicenseAgreements/BetaLicenseAgreements.GET.0f8b4d4.generated.swift @@ -47,7 +47,9 @@ extension V1.BetaLicenseAgreements { /// - Returns: **200**, List of BetaLicenseAgreements as `BetaLicenseAgreementsResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -61,9 +63,15 @@ extension V1.BetaLicenseAgreements { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -91,173 +99,235 @@ extension V1.BetaLicenseAgreements.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum Apps: Hashable, Codable, RawRepresentable { - case appAvailability - case appClips - case appCustomProductPages - case appEncryptionDeclarations - case appEvents - case appInfos - case appPricePoints - case appPriceSchedule - case appStoreVersionExperimentsV2 - case appStoreVersions - case availableInNewTerritories - case availableTerritories - case betaAppLocalizations - case betaAppReviewDetail - case betaGroups - case betaLicenseAgreement - case betaTesters - case builds - case bundleId - case ciProduct - case contentRightsDeclaration - case customerReviews - case endUserLicenseAgreement - case gameCenterDetail - case gameCenterEnabledVersions - case inAppPurchases - case inAppPurchasesV2 - case isOrEverWasMadeForKids - case name - case perfPowerMetrics - case preOrder - case preReleaseVersions - case pricePoints - case prices - case primaryLocale - case promotedPurchases - case reviewSubmissions - case sku - case subscriptionGracePeriod - case subscriptionGroups - case subscriptionStatusUrl - case subscriptionStatusUrlForSandbox - case subscriptionStatusUrlVersion - case subscriptionStatusUrlVersionForSandbox - case unknown(String) - - public var rawValue: String { - switch self { - case .appAvailability: return "appAvailability" - case .appClips: return "appClips" - case .appCustomProductPages: return "appCustomProductPages" - case .appEncryptionDeclarations: return "appEncryptionDeclarations" - case .appEvents: return "appEvents" - case .appInfos: return "appInfos" - case .appPricePoints: return "appPricePoints" - case .appPriceSchedule: return "appPriceSchedule" - case .appStoreVersionExperimentsV2: return "appStoreVersionExperimentsV2" - case .appStoreVersions: return "appStoreVersions" - case .availableInNewTerritories: return "availableInNewTerritories" - case .availableTerritories: return "availableTerritories" - case .betaAppLocalizations: return "betaAppLocalizations" - case .betaAppReviewDetail: return "betaAppReviewDetail" - case .betaGroups: return "betaGroups" - case .betaLicenseAgreement: return "betaLicenseAgreement" - case .betaTesters: return "betaTesters" - case .builds: return "builds" - case .bundleId: return "bundleId" - case .ciProduct: return "ciProduct" - case .contentRightsDeclaration: return "contentRightsDeclaration" - case .customerReviews: return "customerReviews" - case .endUserLicenseAgreement: return "endUserLicenseAgreement" - case .gameCenterDetail: return "gameCenterDetail" - case .gameCenterEnabledVersions: return "gameCenterEnabledVersions" - case .inAppPurchases: return "inAppPurchases" - case .inAppPurchasesV2: return "inAppPurchasesV2" - case .isOrEverWasMadeForKids: return "isOrEverWasMadeForKids" - case .name: return "name" - case .perfPowerMetrics: return "perfPowerMetrics" - case .preOrder: return "preOrder" - case .preReleaseVersions: return "preReleaseVersions" - case .pricePoints: return "pricePoints" - case .prices: return "prices" - case .primaryLocale: return "primaryLocale" - case .promotedPurchases: return "promotedPurchases" - case .reviewSubmissions: return "reviewSubmissions" - case .sku: return "sku" - case .subscriptionGracePeriod: return "subscriptionGracePeriod" - case .subscriptionGroups: return "subscriptionGroups" - case .subscriptionStatusUrl: return "subscriptionStatusUrl" - case .subscriptionStatusUrlForSandbox: return "subscriptionStatusUrlForSandbox" - case .subscriptionStatusUrlVersion: return "subscriptionStatusUrlVersion" - case .subscriptionStatusUrlVersionForSandbox: return "subscriptionStatusUrlVersionForSandbox" - case .unknown(let rawValue): return rawValue - } + public struct Apps: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var accessibilityDeclarations: Self { + .init(rawValue: "accessibilityDeclarations") + } + + public static var accessibilityUrl: Self { + .init(rawValue: "accessibilityUrl") + } + + public static var alternativeDistributionKey: Self { + .init(rawValue: "alternativeDistributionKey") } + public static var analyticsReportRequests: Self { + .init(rawValue: "analyticsReportRequests") + } + + public static var appAvailabilityV2: Self { + .init(rawValue: "appAvailabilityV2") + } + + public static var appClips: Self { + .init(rawValue: "appClips") + } + + public static var appCustomProductPages: Self { + .init(rawValue: "appCustomProductPages") + } + + public static var appEncryptionDeclarations: Self { + .init(rawValue: "appEncryptionDeclarations") + } + + public static var appEvents: Self { + .init(rawValue: "appEvents") + } + + public static var appInfos: Self { + .init(rawValue: "appInfos") + } + + public static var appPricePoints: Self { + .init(rawValue: "appPricePoints") + } + + public static var appPriceSchedule: Self { + .init(rawValue: "appPriceSchedule") + } + + public static var appStoreVersionExperimentsV2: Self { + .init(rawValue: "appStoreVersionExperimentsV2") + } + + public static var appStoreVersions: Self { + .init(rawValue: "appStoreVersions") + } + + public static var backgroundAssets: Self { + .init(rawValue: "backgroundAssets") + } + + public static var betaAppLocalizations: Self { + .init(rawValue: "betaAppLocalizations") + } + + public static var betaAppReviewDetail: Self { + .init(rawValue: "betaAppReviewDetail") + } + + public static var betaFeedbackCrashSubmissions: Self { + .init(rawValue: "betaFeedbackCrashSubmissions") + } + + public static var betaFeedbackScreenshotSubmissions: Self { + .init(rawValue: "betaFeedbackScreenshotSubmissions") + } + + public static var betaGroups: Self { + .init(rawValue: "betaGroups") + } + + public static var betaLicenseAgreement: Self { + .init(rawValue: "betaLicenseAgreement") + } + + public static var betaTesters: Self { + .init(rawValue: "betaTesters") + } + + public static var builds: Self { + .init(rawValue: "builds") + } + + public static var bundleId: Self { + .init(rawValue: "bundleId") + } + + public static var ciProduct: Self { + .init(rawValue: "ciProduct") + } + + public static var contentRightsDeclaration: Self { + .init(rawValue: "contentRightsDeclaration") + } + + public static var customerReviewSummarizations: Self { + .init(rawValue: "customerReviewSummarizations") + } + + public static var customerReviews: Self { + .init(rawValue: "customerReviews") + } + + public static var endUserLicenseAgreement: Self { + .init(rawValue: "endUserLicenseAgreement") + } + + public static var gameCenterDetail: Self { + .init(rawValue: "gameCenterDetail") + } + + public static var gameCenterEnabledVersions: Self { + .init(rawValue: "gameCenterEnabledVersions") + } + + public static var inAppPurchases: Self { + .init(rawValue: "inAppPurchases") + } + + public static var inAppPurchasesV2: Self { + .init(rawValue: "inAppPurchasesV2") + } + + public static var isOrEverWasMadeForKids: Self { + .init(rawValue: "isOrEverWasMadeForKids") + } + + public static var marketplaceSearchDetail: Self { + .init(rawValue: "marketplaceSearchDetail") + } + + public static var name: Self { + .init(rawValue: "name") + } + + public static var perfPowerMetrics: Self { + .init(rawValue: "perfPowerMetrics") + } + + public static var preReleaseVersions: Self { + .init(rawValue: "preReleaseVersions") + } + + public static var primaryLocale: Self { + .init(rawValue: "primaryLocale") + } + + public static var promotedPurchases: Self { + .init(rawValue: "promotedPurchases") + } + + public static var reviewSubmissions: Self { + .init(rawValue: "reviewSubmissions") + } + + public static var sku: Self { + .init(rawValue: "sku") + } + + public static var streamlinedPurchasingEnabled: Self { + .init(rawValue: "streamlinedPurchasingEnabled") + } + + public static var subscriptionGracePeriod: Self { + .init(rawValue: "subscriptionGracePeriod") + } + + public static var subscriptionGroups: Self { + .init(rawValue: "subscriptionGroups") + } + + public static var subscriptionStatusUrl: Self { + .init(rawValue: "subscriptionStatusUrl") + } + + public static var subscriptionStatusUrlForSandbox: Self { + .init(rawValue: "subscriptionStatusUrlForSandbox") + } + + public static var subscriptionStatusUrlVersion: Self { + .init(rawValue: "subscriptionStatusUrlVersion") + } + + public static var subscriptionStatusUrlVersionForSandbox: Self { + .init(rawValue: "subscriptionStatusUrlVersionForSandbox") + } + + public static var webhooks: Self { + .init(rawValue: "webhooks") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "appAvailability": self = .appAvailability - case "appClips": self = .appClips - case "appCustomProductPages": self = .appCustomProductPages - case "appEncryptionDeclarations": self = .appEncryptionDeclarations - case "appEvents": self = .appEvents - case "appInfos": self = .appInfos - case "appPricePoints": self = .appPricePoints - case "appPriceSchedule": self = .appPriceSchedule - case "appStoreVersionExperimentsV2": self = .appStoreVersionExperimentsV2 - case "appStoreVersions": self = .appStoreVersions - case "availableInNewTerritories": self = .availableInNewTerritories - case "availableTerritories": self = .availableTerritories - case "betaAppLocalizations": self = .betaAppLocalizations - case "betaAppReviewDetail": self = .betaAppReviewDetail - case "betaGroups": self = .betaGroups - case "betaLicenseAgreement": self = .betaLicenseAgreement - case "betaTesters": self = .betaTesters - case "builds": self = .builds - case "bundleId": self = .bundleId - case "ciProduct": self = .ciProduct - case "contentRightsDeclaration": self = .contentRightsDeclaration - case "customerReviews": self = .customerReviews - case "endUserLicenseAgreement": self = .endUserLicenseAgreement - case "gameCenterDetail": self = .gameCenterDetail - case "gameCenterEnabledVersions": self = .gameCenterEnabledVersions - case "inAppPurchases": self = .inAppPurchases - case "inAppPurchasesV2": self = .inAppPurchasesV2 - case "isOrEverWasMadeForKids": self = .isOrEverWasMadeForKids - case "name": self = .name - case "perfPowerMetrics": self = .perfPowerMetrics - case "preOrder": self = .preOrder - case "preReleaseVersions": self = .preReleaseVersions - case "pricePoints": self = .pricePoints - case "prices": self = .prices - case "primaryLocale": self = .primaryLocale - case "promotedPurchases": self = .promotedPurchases - case "reviewSubmissions": self = .reviewSubmissions - case "sku": self = .sku - case "subscriptionGracePeriod": self = .subscriptionGracePeriod - case "subscriptionGroups": self = .subscriptionGroups - case "subscriptionStatusUrl": self = .subscriptionStatusUrl - case "subscriptionStatusUrlForSandbox": self = .subscriptionStatusUrlForSandbox - case "subscriptionStatusUrlVersion": self = .subscriptionStatusUrlVersion - case "subscriptionStatusUrlVersionForSandbox": self = .subscriptionStatusUrlVersionForSandbox - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum BetaLicenseAgreements: Hashable, Codable, RawRepresentable { - case agreementText - case app - case unknown(String) + public struct BetaLicenseAgreements: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var agreementText: Self { + .init(rawValue: "agreementText") + } + + public static var app: Self { + .init(rawValue: "app") + } - public var rawValue: String { - switch self { - case .agreementText: return "agreementText" - case .app: return "app" - case .unknown(let rawValue): return rawValue - } + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "agreementText": self = .agreementText - case "app": self = .app - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } @@ -302,22 +372,19 @@ extension V1.BetaLicenseAgreements.GET { } } - public enum Include: Hashable, Codable, RawRepresentable { - case app - case unknown(String) + public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var app: Self { + .init(rawValue: "app") + } - public var rawValue: String { - switch self { - case .app: return "app" - case .unknown(let rawValue): return rawValue - } + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "app": self = .app - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaLicenseAgreements/ById/App/BetaLicenseAgreementsByIdApp.GET.622a7ba.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaLicenseAgreements/ById/App/BetaLicenseAgreementsByIdApp.GET.622a7ba.generated.swift index aa267c29..9654c8f9 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaLicenseAgreements/ById/App/BetaLicenseAgreementsByIdApp.GET.622a7ba.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaLicenseAgreements/ById/App/BetaLicenseAgreementsByIdApp.GET.622a7ba.generated.swift @@ -42,8 +42,10 @@ extension V1.BetaLicenseAgreements.ById.App { /// - Returns: **200**, Single App with get as `AppWithoutIncludesResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -57,12 +59,18 @@ extension V1.BetaLicenseAgreements.ById.App { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 404: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -82,151 +90,215 @@ extension V1.BetaLicenseAgreements.ById.App.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum Apps: Hashable, Codable, RawRepresentable { - case appAvailability - case appClips - case appCustomProductPages - case appEncryptionDeclarations - case appEvents - case appInfos - case appPricePoints - case appPriceSchedule - case appStoreVersionExperimentsV2 - case appStoreVersions - case availableInNewTerritories - case availableTerritories - case betaAppLocalizations - case betaAppReviewDetail - case betaGroups - case betaLicenseAgreement - case betaTesters - case builds - case bundleId - case ciProduct - case contentRightsDeclaration - case customerReviews - case endUserLicenseAgreement - case gameCenterDetail - case gameCenterEnabledVersions - case inAppPurchases - case inAppPurchasesV2 - case isOrEverWasMadeForKids - case name - case perfPowerMetrics - case preOrder - case preReleaseVersions - case pricePoints - case prices - case primaryLocale - case promotedPurchases - case reviewSubmissions - case sku - case subscriptionGracePeriod - case subscriptionGroups - case subscriptionStatusUrl - case subscriptionStatusUrlForSandbox - case subscriptionStatusUrlVersion - case subscriptionStatusUrlVersionForSandbox - case unknown(String) - - public var rawValue: String { - switch self { - case .appAvailability: return "appAvailability" - case .appClips: return "appClips" - case .appCustomProductPages: return "appCustomProductPages" - case .appEncryptionDeclarations: return "appEncryptionDeclarations" - case .appEvents: return "appEvents" - case .appInfos: return "appInfos" - case .appPricePoints: return "appPricePoints" - case .appPriceSchedule: return "appPriceSchedule" - case .appStoreVersionExperimentsV2: return "appStoreVersionExperimentsV2" - case .appStoreVersions: return "appStoreVersions" - case .availableInNewTerritories: return "availableInNewTerritories" - case .availableTerritories: return "availableTerritories" - case .betaAppLocalizations: return "betaAppLocalizations" - case .betaAppReviewDetail: return "betaAppReviewDetail" - case .betaGroups: return "betaGroups" - case .betaLicenseAgreement: return "betaLicenseAgreement" - case .betaTesters: return "betaTesters" - case .builds: return "builds" - case .bundleId: return "bundleId" - case .ciProduct: return "ciProduct" - case .contentRightsDeclaration: return "contentRightsDeclaration" - case .customerReviews: return "customerReviews" - case .endUserLicenseAgreement: return "endUserLicenseAgreement" - case .gameCenterDetail: return "gameCenterDetail" - case .gameCenterEnabledVersions: return "gameCenterEnabledVersions" - case .inAppPurchases: return "inAppPurchases" - case .inAppPurchasesV2: return "inAppPurchasesV2" - case .isOrEverWasMadeForKids: return "isOrEverWasMadeForKids" - case .name: return "name" - case .perfPowerMetrics: return "perfPowerMetrics" - case .preOrder: return "preOrder" - case .preReleaseVersions: return "preReleaseVersions" - case .pricePoints: return "pricePoints" - case .prices: return "prices" - case .primaryLocale: return "primaryLocale" - case .promotedPurchases: return "promotedPurchases" - case .reviewSubmissions: return "reviewSubmissions" - case .sku: return "sku" - case .subscriptionGracePeriod: return "subscriptionGracePeriod" - case .subscriptionGroups: return "subscriptionGroups" - case .subscriptionStatusUrl: return "subscriptionStatusUrl" - case .subscriptionStatusUrlForSandbox: return "subscriptionStatusUrlForSandbox" - case .subscriptionStatusUrlVersion: return "subscriptionStatusUrlVersion" - case .subscriptionStatusUrlVersionForSandbox: return "subscriptionStatusUrlVersionForSandbox" - case .unknown(let rawValue): return rawValue - } + public struct Apps: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var accessibilityDeclarations: Self { + .init(rawValue: "accessibilityDeclarations") + } + + public static var accessibilityUrl: Self { + .init(rawValue: "accessibilityUrl") + } + + public static var alternativeDistributionKey: Self { + .init(rawValue: "alternativeDistributionKey") + } + + public static var analyticsReportRequests: Self { + .init(rawValue: "analyticsReportRequests") + } + + public static var appAvailabilityV2: Self { + .init(rawValue: "appAvailabilityV2") + } + + public static var appClips: Self { + .init(rawValue: "appClips") } + public static var appCustomProductPages: Self { + .init(rawValue: "appCustomProductPages") + } + + public static var appEncryptionDeclarations: Self { + .init(rawValue: "appEncryptionDeclarations") + } + + public static var appEvents: Self { + .init(rawValue: "appEvents") + } + + public static var appInfos: Self { + .init(rawValue: "appInfos") + } + + public static var appPricePoints: Self { + .init(rawValue: "appPricePoints") + } + + public static var appPriceSchedule: Self { + .init(rawValue: "appPriceSchedule") + } + + public static var appStoreVersionExperimentsV2: Self { + .init(rawValue: "appStoreVersionExperimentsV2") + } + + public static var appStoreVersions: Self { + .init(rawValue: "appStoreVersions") + } + + public static var backgroundAssets: Self { + .init(rawValue: "backgroundAssets") + } + + public static var betaAppLocalizations: Self { + .init(rawValue: "betaAppLocalizations") + } + + public static var betaAppReviewDetail: Self { + .init(rawValue: "betaAppReviewDetail") + } + + public static var betaFeedbackCrashSubmissions: Self { + .init(rawValue: "betaFeedbackCrashSubmissions") + } + + public static var betaFeedbackScreenshotSubmissions: Self { + .init(rawValue: "betaFeedbackScreenshotSubmissions") + } + + public static var betaGroups: Self { + .init(rawValue: "betaGroups") + } + + public static var betaLicenseAgreement: Self { + .init(rawValue: "betaLicenseAgreement") + } + + public static var betaTesters: Self { + .init(rawValue: "betaTesters") + } + + public static var builds: Self { + .init(rawValue: "builds") + } + + public static var bundleId: Self { + .init(rawValue: "bundleId") + } + + public static var ciProduct: Self { + .init(rawValue: "ciProduct") + } + + public static var contentRightsDeclaration: Self { + .init(rawValue: "contentRightsDeclaration") + } + + public static var customerReviewSummarizations: Self { + .init(rawValue: "customerReviewSummarizations") + } + + public static var customerReviews: Self { + .init(rawValue: "customerReviews") + } + + public static var endUserLicenseAgreement: Self { + .init(rawValue: "endUserLicenseAgreement") + } + + public static var gameCenterDetail: Self { + .init(rawValue: "gameCenterDetail") + } + + public static var gameCenterEnabledVersions: Self { + .init(rawValue: "gameCenterEnabledVersions") + } + + public static var inAppPurchases: Self { + .init(rawValue: "inAppPurchases") + } + + public static var inAppPurchasesV2: Self { + .init(rawValue: "inAppPurchasesV2") + } + + public static var isOrEverWasMadeForKids: Self { + .init(rawValue: "isOrEverWasMadeForKids") + } + + public static var marketplaceSearchDetail: Self { + .init(rawValue: "marketplaceSearchDetail") + } + + public static var name: Self { + .init(rawValue: "name") + } + + public static var perfPowerMetrics: Self { + .init(rawValue: "perfPowerMetrics") + } + + public static var preReleaseVersions: Self { + .init(rawValue: "preReleaseVersions") + } + + public static var primaryLocale: Self { + .init(rawValue: "primaryLocale") + } + + public static var promotedPurchases: Self { + .init(rawValue: "promotedPurchases") + } + + public static var reviewSubmissions: Self { + .init(rawValue: "reviewSubmissions") + } + + public static var sku: Self { + .init(rawValue: "sku") + } + + public static var streamlinedPurchasingEnabled: Self { + .init(rawValue: "streamlinedPurchasingEnabled") + } + + public static var subscriptionGracePeriod: Self { + .init(rawValue: "subscriptionGracePeriod") + } + + public static var subscriptionGroups: Self { + .init(rawValue: "subscriptionGroups") + } + + public static var subscriptionStatusUrl: Self { + .init(rawValue: "subscriptionStatusUrl") + } + + public static var subscriptionStatusUrlForSandbox: Self { + .init(rawValue: "subscriptionStatusUrlForSandbox") + } + + public static var subscriptionStatusUrlVersion: Self { + .init(rawValue: "subscriptionStatusUrlVersion") + } + + public static var subscriptionStatusUrlVersionForSandbox: Self { + .init(rawValue: "subscriptionStatusUrlVersionForSandbox") + } + + public static var webhooks: Self { + .init(rawValue: "webhooks") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "appAvailability": self = .appAvailability - case "appClips": self = .appClips - case "appCustomProductPages": self = .appCustomProductPages - case "appEncryptionDeclarations": self = .appEncryptionDeclarations - case "appEvents": self = .appEvents - case "appInfos": self = .appInfos - case "appPricePoints": self = .appPricePoints - case "appPriceSchedule": self = .appPriceSchedule - case "appStoreVersionExperimentsV2": self = .appStoreVersionExperimentsV2 - case "appStoreVersions": self = .appStoreVersions - case "availableInNewTerritories": self = .availableInNewTerritories - case "availableTerritories": self = .availableTerritories - case "betaAppLocalizations": self = .betaAppLocalizations - case "betaAppReviewDetail": self = .betaAppReviewDetail - case "betaGroups": self = .betaGroups - case "betaLicenseAgreement": self = .betaLicenseAgreement - case "betaTesters": self = .betaTesters - case "builds": self = .builds - case "bundleId": self = .bundleId - case "ciProduct": self = .ciProduct - case "contentRightsDeclaration": self = .contentRightsDeclaration - case "customerReviews": self = .customerReviews - case "endUserLicenseAgreement": self = .endUserLicenseAgreement - case "gameCenterDetail": self = .gameCenterDetail - case "gameCenterEnabledVersions": self = .gameCenterEnabledVersions - case "inAppPurchases": self = .inAppPurchases - case "inAppPurchasesV2": self = .inAppPurchasesV2 - case "isOrEverWasMadeForKids": self = .isOrEverWasMadeForKids - case "name": self = .name - case "perfPowerMetrics": self = .perfPowerMetrics - case "preOrder": self = .preOrder - case "preReleaseVersions": self = .preReleaseVersions - case "pricePoints": self = .pricePoints - case "prices": self = .prices - case "primaryLocale": self = .primaryLocale - case "promotedPurchases": self = .promotedPurchases - case "reviewSubmissions": self = .reviewSubmissions - case "sku": self = .sku - case "subscriptionGracePeriod": self = .subscriptionGracePeriod - case "subscriptionGroups": self = .subscriptionGroups - case "subscriptionStatusUrl": self = .subscriptionStatusUrl - case "subscriptionStatusUrlForSandbox": self = .subscriptionStatusUrlForSandbox - case "subscriptionStatusUrlVersion": self = .subscriptionStatusUrlVersion - case "subscriptionStatusUrlVersionForSandbox": self = .subscriptionStatusUrlVersionForSandbox - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaLicenseAgreements/ById/BetaLicenseAgreementsById.GET.9ff773a.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaLicenseAgreements/ById/BetaLicenseAgreementsById.GET.9ff773a.generated.swift index 70e13943..171eedf3 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaLicenseAgreements/ById/BetaLicenseAgreementsById.GET.9ff773a.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaLicenseAgreements/ById/BetaLicenseAgreementsById.GET.9ff773a.generated.swift @@ -46,8 +46,10 @@ extension V1.BetaLicenseAgreements.ById { /// - Returns: **200**, Single BetaLicenseAgreement as `BetaLicenseAgreementResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -61,12 +63,18 @@ extension V1.BetaLicenseAgreements.ById { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 404: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -89,173 +97,235 @@ extension V1.BetaLicenseAgreements.ById.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum Apps: Hashable, Codable, RawRepresentable { - case appAvailability - case appClips - case appCustomProductPages - case appEncryptionDeclarations - case appEvents - case appInfos - case appPricePoints - case appPriceSchedule - case appStoreVersionExperimentsV2 - case appStoreVersions - case availableInNewTerritories - case availableTerritories - case betaAppLocalizations - case betaAppReviewDetail - case betaGroups - case betaLicenseAgreement - case betaTesters - case builds - case bundleId - case ciProduct - case contentRightsDeclaration - case customerReviews - case endUserLicenseAgreement - case gameCenterDetail - case gameCenterEnabledVersions - case inAppPurchases - case inAppPurchasesV2 - case isOrEverWasMadeForKids - case name - case perfPowerMetrics - case preOrder - case preReleaseVersions - case pricePoints - case prices - case primaryLocale - case promotedPurchases - case reviewSubmissions - case sku - case subscriptionGracePeriod - case subscriptionGroups - case subscriptionStatusUrl - case subscriptionStatusUrlForSandbox - case subscriptionStatusUrlVersion - case subscriptionStatusUrlVersionForSandbox - case unknown(String) - - public var rawValue: String { - switch self { - case .appAvailability: return "appAvailability" - case .appClips: return "appClips" - case .appCustomProductPages: return "appCustomProductPages" - case .appEncryptionDeclarations: return "appEncryptionDeclarations" - case .appEvents: return "appEvents" - case .appInfos: return "appInfos" - case .appPricePoints: return "appPricePoints" - case .appPriceSchedule: return "appPriceSchedule" - case .appStoreVersionExperimentsV2: return "appStoreVersionExperimentsV2" - case .appStoreVersions: return "appStoreVersions" - case .availableInNewTerritories: return "availableInNewTerritories" - case .availableTerritories: return "availableTerritories" - case .betaAppLocalizations: return "betaAppLocalizations" - case .betaAppReviewDetail: return "betaAppReviewDetail" - case .betaGroups: return "betaGroups" - case .betaLicenseAgreement: return "betaLicenseAgreement" - case .betaTesters: return "betaTesters" - case .builds: return "builds" - case .bundleId: return "bundleId" - case .ciProduct: return "ciProduct" - case .contentRightsDeclaration: return "contentRightsDeclaration" - case .customerReviews: return "customerReviews" - case .endUserLicenseAgreement: return "endUserLicenseAgreement" - case .gameCenterDetail: return "gameCenterDetail" - case .gameCenterEnabledVersions: return "gameCenterEnabledVersions" - case .inAppPurchases: return "inAppPurchases" - case .inAppPurchasesV2: return "inAppPurchasesV2" - case .isOrEverWasMadeForKids: return "isOrEverWasMadeForKids" - case .name: return "name" - case .perfPowerMetrics: return "perfPowerMetrics" - case .preOrder: return "preOrder" - case .preReleaseVersions: return "preReleaseVersions" - case .pricePoints: return "pricePoints" - case .prices: return "prices" - case .primaryLocale: return "primaryLocale" - case .promotedPurchases: return "promotedPurchases" - case .reviewSubmissions: return "reviewSubmissions" - case .sku: return "sku" - case .subscriptionGracePeriod: return "subscriptionGracePeriod" - case .subscriptionGroups: return "subscriptionGroups" - case .subscriptionStatusUrl: return "subscriptionStatusUrl" - case .subscriptionStatusUrlForSandbox: return "subscriptionStatusUrlForSandbox" - case .subscriptionStatusUrlVersion: return "subscriptionStatusUrlVersion" - case .subscriptionStatusUrlVersionForSandbox: return "subscriptionStatusUrlVersionForSandbox" - case .unknown(let rawValue): return rawValue - } + public struct Apps: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var accessibilityDeclarations: Self { + .init(rawValue: "accessibilityDeclarations") + } + + public static var accessibilityUrl: Self { + .init(rawValue: "accessibilityUrl") + } + + public static var alternativeDistributionKey: Self { + .init(rawValue: "alternativeDistributionKey") } + public static var analyticsReportRequests: Self { + .init(rawValue: "analyticsReportRequests") + } + + public static var appAvailabilityV2: Self { + .init(rawValue: "appAvailabilityV2") + } + + public static var appClips: Self { + .init(rawValue: "appClips") + } + + public static var appCustomProductPages: Self { + .init(rawValue: "appCustomProductPages") + } + + public static var appEncryptionDeclarations: Self { + .init(rawValue: "appEncryptionDeclarations") + } + + public static var appEvents: Self { + .init(rawValue: "appEvents") + } + + public static var appInfos: Self { + .init(rawValue: "appInfos") + } + + public static var appPricePoints: Self { + .init(rawValue: "appPricePoints") + } + + public static var appPriceSchedule: Self { + .init(rawValue: "appPriceSchedule") + } + + public static var appStoreVersionExperimentsV2: Self { + .init(rawValue: "appStoreVersionExperimentsV2") + } + + public static var appStoreVersions: Self { + .init(rawValue: "appStoreVersions") + } + + public static var backgroundAssets: Self { + .init(rawValue: "backgroundAssets") + } + + public static var betaAppLocalizations: Self { + .init(rawValue: "betaAppLocalizations") + } + + public static var betaAppReviewDetail: Self { + .init(rawValue: "betaAppReviewDetail") + } + + public static var betaFeedbackCrashSubmissions: Self { + .init(rawValue: "betaFeedbackCrashSubmissions") + } + + public static var betaFeedbackScreenshotSubmissions: Self { + .init(rawValue: "betaFeedbackScreenshotSubmissions") + } + + public static var betaGroups: Self { + .init(rawValue: "betaGroups") + } + + public static var betaLicenseAgreement: Self { + .init(rawValue: "betaLicenseAgreement") + } + + public static var betaTesters: Self { + .init(rawValue: "betaTesters") + } + + public static var builds: Self { + .init(rawValue: "builds") + } + + public static var bundleId: Self { + .init(rawValue: "bundleId") + } + + public static var ciProduct: Self { + .init(rawValue: "ciProduct") + } + + public static var contentRightsDeclaration: Self { + .init(rawValue: "contentRightsDeclaration") + } + + public static var customerReviewSummarizations: Self { + .init(rawValue: "customerReviewSummarizations") + } + + public static var customerReviews: Self { + .init(rawValue: "customerReviews") + } + + public static var endUserLicenseAgreement: Self { + .init(rawValue: "endUserLicenseAgreement") + } + + public static var gameCenterDetail: Self { + .init(rawValue: "gameCenterDetail") + } + + public static var gameCenterEnabledVersions: Self { + .init(rawValue: "gameCenterEnabledVersions") + } + + public static var inAppPurchases: Self { + .init(rawValue: "inAppPurchases") + } + + public static var inAppPurchasesV2: Self { + .init(rawValue: "inAppPurchasesV2") + } + + public static var isOrEverWasMadeForKids: Self { + .init(rawValue: "isOrEverWasMadeForKids") + } + + public static var marketplaceSearchDetail: Self { + .init(rawValue: "marketplaceSearchDetail") + } + + public static var name: Self { + .init(rawValue: "name") + } + + public static var perfPowerMetrics: Self { + .init(rawValue: "perfPowerMetrics") + } + + public static var preReleaseVersions: Self { + .init(rawValue: "preReleaseVersions") + } + + public static var primaryLocale: Self { + .init(rawValue: "primaryLocale") + } + + public static var promotedPurchases: Self { + .init(rawValue: "promotedPurchases") + } + + public static var reviewSubmissions: Self { + .init(rawValue: "reviewSubmissions") + } + + public static var sku: Self { + .init(rawValue: "sku") + } + + public static var streamlinedPurchasingEnabled: Self { + .init(rawValue: "streamlinedPurchasingEnabled") + } + + public static var subscriptionGracePeriod: Self { + .init(rawValue: "subscriptionGracePeriod") + } + + public static var subscriptionGroups: Self { + .init(rawValue: "subscriptionGroups") + } + + public static var subscriptionStatusUrl: Self { + .init(rawValue: "subscriptionStatusUrl") + } + + public static var subscriptionStatusUrlForSandbox: Self { + .init(rawValue: "subscriptionStatusUrlForSandbox") + } + + public static var subscriptionStatusUrlVersion: Self { + .init(rawValue: "subscriptionStatusUrlVersion") + } + + public static var subscriptionStatusUrlVersionForSandbox: Self { + .init(rawValue: "subscriptionStatusUrlVersionForSandbox") + } + + public static var webhooks: Self { + .init(rawValue: "webhooks") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "appAvailability": self = .appAvailability - case "appClips": self = .appClips - case "appCustomProductPages": self = .appCustomProductPages - case "appEncryptionDeclarations": self = .appEncryptionDeclarations - case "appEvents": self = .appEvents - case "appInfos": self = .appInfos - case "appPricePoints": self = .appPricePoints - case "appPriceSchedule": self = .appPriceSchedule - case "appStoreVersionExperimentsV2": self = .appStoreVersionExperimentsV2 - case "appStoreVersions": self = .appStoreVersions - case "availableInNewTerritories": self = .availableInNewTerritories - case "availableTerritories": self = .availableTerritories - case "betaAppLocalizations": self = .betaAppLocalizations - case "betaAppReviewDetail": self = .betaAppReviewDetail - case "betaGroups": self = .betaGroups - case "betaLicenseAgreement": self = .betaLicenseAgreement - case "betaTesters": self = .betaTesters - case "builds": self = .builds - case "bundleId": self = .bundleId - case "ciProduct": self = .ciProduct - case "contentRightsDeclaration": self = .contentRightsDeclaration - case "customerReviews": self = .customerReviews - case "endUserLicenseAgreement": self = .endUserLicenseAgreement - case "gameCenterDetail": self = .gameCenterDetail - case "gameCenterEnabledVersions": self = .gameCenterEnabledVersions - case "inAppPurchases": self = .inAppPurchases - case "inAppPurchasesV2": self = .inAppPurchasesV2 - case "isOrEverWasMadeForKids": self = .isOrEverWasMadeForKids - case "name": self = .name - case "perfPowerMetrics": self = .perfPowerMetrics - case "preOrder": self = .preOrder - case "preReleaseVersions": self = .preReleaseVersions - case "pricePoints": self = .pricePoints - case "prices": self = .prices - case "primaryLocale": self = .primaryLocale - case "promotedPurchases": self = .promotedPurchases - case "reviewSubmissions": self = .reviewSubmissions - case "sku": self = .sku - case "subscriptionGracePeriod": self = .subscriptionGracePeriod - case "subscriptionGroups": self = .subscriptionGroups - case "subscriptionStatusUrl": self = .subscriptionStatusUrl - case "subscriptionStatusUrlForSandbox": self = .subscriptionStatusUrlForSandbox - case "subscriptionStatusUrlVersion": self = .subscriptionStatusUrlVersion - case "subscriptionStatusUrlVersionForSandbox": self = .subscriptionStatusUrlVersionForSandbox - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum BetaLicenseAgreements: Hashable, Codable, RawRepresentable { - case agreementText - case app - case unknown(String) + public struct BetaLicenseAgreements: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var agreementText: Self { + .init(rawValue: "agreementText") + } + + public static var app: Self { + .init(rawValue: "app") + } - public var rawValue: String { - switch self { - case .agreementText: return "agreementText" - case .app: return "app" - case .unknown(let rawValue): return rawValue - } + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "agreementText": self = .agreementText - case "app": self = .app - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } @@ -278,22 +348,19 @@ extension V1.BetaLicenseAgreements.ById.GET { } } - public enum Include: Hashable, Codable, RawRepresentable { - case app - case unknown(String) + public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var app: Self { + .init(rawValue: "app") + } - public var rawValue: String { - switch self { - case .app: return "app" - case .unknown(let rawValue): return rawValue - } + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "app": self = .app - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaLicenseAgreements/ById/BetaLicenseAgreementsById.PATCH.9ff773a.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaLicenseAgreements/ById/BetaLicenseAgreementsById.PATCH.9ff773a.generated.swift index 06049960..d3bd8dc0 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaLicenseAgreements/ById/BetaLicenseAgreementsById.PATCH.9ff773a.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaLicenseAgreements/ById/BetaLicenseAgreementsById.PATCH.9ff773a.generated.swift @@ -48,9 +48,12 @@ extension V1.BetaLicenseAgreements.ById { /// - Returns: **200**, Single BetaLicenseAgreement as `BetaLicenseAgreementResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **422**, Unprocessable request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -64,6 +67,9 @@ extension V1.BetaLicenseAgreements.ById { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) @@ -73,6 +79,12 @@ extension V1.BetaLicenseAgreements.ById { case 409: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 422: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaLicenseAgreements/ById/Relationships/App/BetaLicenseAgreementsByIdRelationshipsApp.GET.cc76054.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaLicenseAgreements/ById/Relationships/App/BetaLicenseAgreementsByIdRelationshipsApp.GET.cc76054.generated.swift new file mode 100644 index 00000000..6382f161 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaLicenseAgreements/ById/Relationships/App/BetaLicenseAgreementsByIdRelationshipsApp.GET.cc76054.generated.swift @@ -0,0 +1,86 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.BetaLicenseAgreements.ById.Relationships.App { + public struct GET: Endpoint { + public typealias Response = BetaLicenseAgreementAppLinkageResponse + + public var path: String { + "/v1/betaLicenseAgreements/\(id)/relationships/app" + } + + /// the id of the requested resource + public var id: String + + public var parameters: Parameters = Parameters() + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + components?.queryItems = [ + + ].filter { $0.value != nil } + if components?.queryItems?.isEmpty ?? false { + components?.queryItems = nil + } + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "GET" + return urlRequest + } + + /// - Returns: **200**, Related linkage as `BetaLicenseAgreementAppLinkageResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(BetaLicenseAgreementAppLinkageResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +extension V1.BetaLicenseAgreements.ById.Relationships.App.GET { + public struct Parameters: Hashable { + + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaRecruitmentCriteria/BetaRecruitmentCriteria.POST.35b0940.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaRecruitmentCriteria/BetaRecruitmentCriteria.POST.35b0940.generated.swift new file mode 100644 index 00000000..389de2df --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaRecruitmentCriteria/BetaRecruitmentCriteria.POST.35b0940.generated.swift @@ -0,0 +1,84 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.BetaRecruitmentCriteria { + public struct POST: Endpoint { + public typealias Parameters = BetaRecruitmentCriterionCreateRequest + public typealias Response = BetaRecruitmentCriterionResponse + + public var path: String { + "/v1/betaRecruitmentCriteria" + } + + /// BetaRecruitmentCriterion representation + public var parameters: Parameters + + public init(parameters: Parameters) { + self.parameters = parameters + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "POST" + + var jsonEncoder: JSONEncoder { + let encoder = JSONEncoder() + return encoder + } + + urlRequest?.httpBody = try jsonEncoder.encode(parameters) + urlRequest?.setValue("application/json", forHTTPHeaderField: "Content-Type") + return urlRequest + } + + /// - Returns: **201**, Single BetaRecruitmentCriterion as `BetaRecruitmentCriterionResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **422**, Unprocessable request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 201: + return try jsonDecoder.decode(BetaRecruitmentCriterionResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 409: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 422: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaRecruitmentCriteria/ById/BetaRecruitmentCriteriaById.DELETE.9c589da.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaRecruitmentCriteria/ById/BetaRecruitmentCriteriaById.DELETE.9c589da.generated.swift new file mode 100644 index 00000000..9e80f456 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaRecruitmentCriteria/ById/BetaRecruitmentCriteriaById.DELETE.9c589da.generated.swift @@ -0,0 +1,72 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.BetaRecruitmentCriteria.ById { + public struct DELETE: Endpoint { + public typealias Parameters = Never + public typealias Response = Void + + public var path: String { + "/v1/betaRecruitmentCriteria/\(id)" + } + + /// the id of the requested resource + public var id: String + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "DELETE" + return urlRequest + } + + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 409: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaRecruitmentCriteria/ById/BetaRecruitmentCriteriaById.PATCH.9c589da.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaRecruitmentCriteria/ById/BetaRecruitmentCriteriaById.PATCH.9c589da.generated.swift new file mode 100644 index 00000000..53c0e7d1 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaRecruitmentCriteria/ById/BetaRecruitmentCriteriaById.PATCH.9c589da.generated.swift @@ -0,0 +1,95 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.BetaRecruitmentCriteria.ById { + public struct PATCH: Endpoint { + public typealias Parameters = BetaRecruitmentCriterionUpdateRequest + public typealias Response = BetaRecruitmentCriterionResponse + + public var path: String { + "/v1/betaRecruitmentCriteria/\(id)" + } + + /// the id of the requested resource + public var id: String + + /// BetaRecruitmentCriterion representation + public var parameters: Parameters + + public init( + id: String, + parameters: Parameters + ) { + self.id = id + self.parameters = parameters + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "PATCH" + + var jsonEncoder: JSONEncoder { + let encoder = JSONEncoder() + return encoder + } + + urlRequest?.httpBody = try jsonEncoder.encode(parameters) + urlRequest?.setValue("application/json", forHTTPHeaderField: "Content-Type") + return urlRequest + } + + /// - Returns: **200**, Single BetaRecruitmentCriterion as `BetaRecruitmentCriterionResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **422**, Unprocessable request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(BetaRecruitmentCriterionResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 409: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 422: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaRecruitmentCriterionOptions/BetaRecruitmentCriterionOptions.GET.4116836.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaRecruitmentCriterionOptions/BetaRecruitmentCriterionOptions.GET.4116836.generated.swift new file mode 100644 index 00000000..3faf3628 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaRecruitmentCriterionOptions/BetaRecruitmentCriterionOptions.GET.4116836.generated.swift @@ -0,0 +1,123 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.BetaRecruitmentCriterionOptions { + public struct GET: Endpoint { + public typealias Response = BetaRecruitmentCriterionOptionsResponse + + public var path: String { + "/v1/betaRecruitmentCriterionOptions" + } + + public var parameters: Parameters = Parameters() + + public init() { + + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + components?.queryItems = [ + URLQueryItem(name: "fields[betaRecruitmentCriterionOptions]", + value: parameters.fields[.betaRecruitmentCriterionOptions]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "limit", + value: parameters.limit.map { "\($0)" }) + ].filter { $0.value != nil } + if components?.queryItems?.isEmpty ?? false { + components?.queryItems = nil + } + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "GET" + return urlRequest + } + + /// - Returns: **200**, List of BetaRecruitmentCriterionOptions as `BetaRecruitmentCriterionOptionsResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(BetaRecruitmentCriterionOptionsResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +extension V1.BetaRecruitmentCriterionOptions.GET { + public struct Parameters: Hashable { + public var fields: Fields = Fields() + + /// maximum resources per page + public var limit: Int? + + public struct Fields: Hashable { + public subscript (_ relation: Relation) -> T { + get { values[relation]?.base as! T } + set { values[relation] = AnyHashable(newValue) } + } + + private var values: [AnyHashable: AnyHashable] = [:] + + public struct BetaRecruitmentCriterionOptions: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var deviceFamilyOsVersions: Self { + .init(rawValue: "deviceFamilyOsVersions") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct Relation: Hashable { + /// the fields to include for returned resources of type betaRecruitmentCriterionOptions + public static var betaRecruitmentCriterionOptions: Relation<[BetaRecruitmentCriterionOptions]?> { + .init(key: "fields[betaRecruitmentCriterionOptions]") + } + + internal let key: String + + public func hash(into hasher: inout Hasher) { + hasher.combine(key) + } + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaTesterInvitations/BetaTesterInvitations.POST.b019dde.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaTesterInvitations/BetaTesterInvitations.POST.b019dde.generated.swift index f333462a..18a5149b 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaTesterInvitations/BetaTesterInvitations.POST.b019dde.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaTesterInvitations/BetaTesterInvitations.POST.b019dde.generated.swift @@ -41,8 +41,11 @@ extension V1.BetaTesterInvitations { /// - Returns: **201**, Single BetaTesterInvitation as `BetaTesterInvitationResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **422**, Unprocessable request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -56,12 +59,21 @@ extension V1.BetaTesterInvitations { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 409: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 422: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaTesters/BetaTesters.GET.51a9871.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaTesters/BetaTesters.GET.51a9871.generated.swift index 3e31e69c..05abcfe9 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaTesters/BetaTesters.GET.51a9871.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaTesters/BetaTesters.GET.51a9871.generated.swift @@ -73,7 +73,9 @@ extension V1.BetaTesters { /// - Returns: **200**, List of BetaTesters as `BetaTestersResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -87,9 +89,15 @@ extension V1.BetaTesters { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -120,334 +128,451 @@ extension V1.BetaTesters.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum Apps: Hashable, Codable, RawRepresentable { - case appAvailability - case appClips - case appCustomProductPages - case appEncryptionDeclarations - case appEvents - case appInfos - case appPricePoints - case appPriceSchedule - case appStoreVersionExperimentsV2 - case appStoreVersions - case availableInNewTerritories - case availableTerritories - case betaAppLocalizations - case betaAppReviewDetail - case betaGroups - case betaLicenseAgreement - case betaTesters - case builds - case bundleId - case ciProduct - case contentRightsDeclaration - case customerReviews - case endUserLicenseAgreement - case gameCenterDetail - case gameCenterEnabledVersions - case inAppPurchases - case inAppPurchasesV2 - case isOrEverWasMadeForKids - case name - case perfPowerMetrics - case preOrder - case preReleaseVersions - case pricePoints - case prices - case primaryLocale - case promotedPurchases - case reviewSubmissions - case sku - case subscriptionGracePeriod - case subscriptionGroups - case subscriptionStatusUrl - case subscriptionStatusUrlForSandbox - case subscriptionStatusUrlVersion - case subscriptionStatusUrlVersionForSandbox - case unknown(String) - - public var rawValue: String { - switch self { - case .appAvailability: return "appAvailability" - case .appClips: return "appClips" - case .appCustomProductPages: return "appCustomProductPages" - case .appEncryptionDeclarations: return "appEncryptionDeclarations" - case .appEvents: return "appEvents" - case .appInfos: return "appInfos" - case .appPricePoints: return "appPricePoints" - case .appPriceSchedule: return "appPriceSchedule" - case .appStoreVersionExperimentsV2: return "appStoreVersionExperimentsV2" - case .appStoreVersions: return "appStoreVersions" - case .availableInNewTerritories: return "availableInNewTerritories" - case .availableTerritories: return "availableTerritories" - case .betaAppLocalizations: return "betaAppLocalizations" - case .betaAppReviewDetail: return "betaAppReviewDetail" - case .betaGroups: return "betaGroups" - case .betaLicenseAgreement: return "betaLicenseAgreement" - case .betaTesters: return "betaTesters" - case .builds: return "builds" - case .bundleId: return "bundleId" - case .ciProduct: return "ciProduct" - case .contentRightsDeclaration: return "contentRightsDeclaration" - case .customerReviews: return "customerReviews" - case .endUserLicenseAgreement: return "endUserLicenseAgreement" - case .gameCenterDetail: return "gameCenterDetail" - case .gameCenterEnabledVersions: return "gameCenterEnabledVersions" - case .inAppPurchases: return "inAppPurchases" - case .inAppPurchasesV2: return "inAppPurchasesV2" - case .isOrEverWasMadeForKids: return "isOrEverWasMadeForKids" - case .name: return "name" - case .perfPowerMetrics: return "perfPowerMetrics" - case .preOrder: return "preOrder" - case .preReleaseVersions: return "preReleaseVersions" - case .pricePoints: return "pricePoints" - case .prices: return "prices" - case .primaryLocale: return "primaryLocale" - case .promotedPurchases: return "promotedPurchases" - case .reviewSubmissions: return "reviewSubmissions" - case .sku: return "sku" - case .subscriptionGracePeriod: return "subscriptionGracePeriod" - case .subscriptionGroups: return "subscriptionGroups" - case .subscriptionStatusUrl: return "subscriptionStatusUrl" - case .subscriptionStatusUrlForSandbox: return "subscriptionStatusUrlForSandbox" - case .subscriptionStatusUrlVersion: return "subscriptionStatusUrlVersion" - case .subscriptionStatusUrlVersionForSandbox: return "subscriptionStatusUrlVersionForSandbox" - case .unknown(let rawValue): return rawValue - } + public struct Apps: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var accessibilityDeclarations: Self { + .init(rawValue: "accessibilityDeclarations") + } + + public static var accessibilityUrl: Self { + .init(rawValue: "accessibilityUrl") + } + + public static var alternativeDistributionKey: Self { + .init(rawValue: "alternativeDistributionKey") + } + + public static var analyticsReportRequests: Self { + .init(rawValue: "analyticsReportRequests") + } + + public static var appAvailabilityV2: Self { + .init(rawValue: "appAvailabilityV2") + } + + public static var appClips: Self { + .init(rawValue: "appClips") + } + + public static var appCustomProductPages: Self { + .init(rawValue: "appCustomProductPages") + } + + public static var appEncryptionDeclarations: Self { + .init(rawValue: "appEncryptionDeclarations") + } + + public static var appEvents: Self { + .init(rawValue: "appEvents") + } + + public static var appInfos: Self { + .init(rawValue: "appInfos") + } + + public static var appPricePoints: Self { + .init(rawValue: "appPricePoints") + } + + public static var appPriceSchedule: Self { + .init(rawValue: "appPriceSchedule") + } + + public static var appStoreVersionExperimentsV2: Self { + .init(rawValue: "appStoreVersionExperimentsV2") + } + + public static var appStoreVersions: Self { + .init(rawValue: "appStoreVersions") + } + + public static var backgroundAssets: Self { + .init(rawValue: "backgroundAssets") + } + + public static var betaAppLocalizations: Self { + .init(rawValue: "betaAppLocalizations") + } + + public static var betaAppReviewDetail: Self { + .init(rawValue: "betaAppReviewDetail") + } + + public static var betaFeedbackCrashSubmissions: Self { + .init(rawValue: "betaFeedbackCrashSubmissions") + } + + public static var betaFeedbackScreenshotSubmissions: Self { + .init(rawValue: "betaFeedbackScreenshotSubmissions") + } + + public static var betaGroups: Self { + .init(rawValue: "betaGroups") + } + + public static var betaLicenseAgreement: Self { + .init(rawValue: "betaLicenseAgreement") + } + + public static var betaTesters: Self { + .init(rawValue: "betaTesters") + } + + public static var builds: Self { + .init(rawValue: "builds") + } + + public static var bundleId: Self { + .init(rawValue: "bundleId") + } + + public static var ciProduct: Self { + .init(rawValue: "ciProduct") + } + + public static var contentRightsDeclaration: Self { + .init(rawValue: "contentRightsDeclaration") + } + + public static var customerReviewSummarizations: Self { + .init(rawValue: "customerReviewSummarizations") + } + + public static var customerReviews: Self { + .init(rawValue: "customerReviews") + } + + public static var endUserLicenseAgreement: Self { + .init(rawValue: "endUserLicenseAgreement") + } + + public static var gameCenterDetail: Self { + .init(rawValue: "gameCenterDetail") + } + + public static var gameCenterEnabledVersions: Self { + .init(rawValue: "gameCenterEnabledVersions") + } + + public static var inAppPurchases: Self { + .init(rawValue: "inAppPurchases") + } + + public static var inAppPurchasesV2: Self { + .init(rawValue: "inAppPurchasesV2") + } + + public static var isOrEverWasMadeForKids: Self { + .init(rawValue: "isOrEverWasMadeForKids") + } + + public static var marketplaceSearchDetail: Self { + .init(rawValue: "marketplaceSearchDetail") + } + + public static var name: Self { + .init(rawValue: "name") + } + + public static var perfPowerMetrics: Self { + .init(rawValue: "perfPowerMetrics") + } + + public static var preReleaseVersions: Self { + .init(rawValue: "preReleaseVersions") + } + + public static var primaryLocale: Self { + .init(rawValue: "primaryLocale") + } + + public static var promotedPurchases: Self { + .init(rawValue: "promotedPurchases") + } + + public static var reviewSubmissions: Self { + .init(rawValue: "reviewSubmissions") + } + + public static var sku: Self { + .init(rawValue: "sku") + } + + public static var streamlinedPurchasingEnabled: Self { + .init(rawValue: "streamlinedPurchasingEnabled") + } + + public static var subscriptionGracePeriod: Self { + .init(rawValue: "subscriptionGracePeriod") + } + + public static var subscriptionGroups: Self { + .init(rawValue: "subscriptionGroups") + } + + public static var subscriptionStatusUrl: Self { + .init(rawValue: "subscriptionStatusUrl") } + public static var subscriptionStatusUrlForSandbox: Self { + .init(rawValue: "subscriptionStatusUrlForSandbox") + } + + public static var subscriptionStatusUrlVersion: Self { + .init(rawValue: "subscriptionStatusUrlVersion") + } + + public static var subscriptionStatusUrlVersionForSandbox: Self { + .init(rawValue: "subscriptionStatusUrlVersionForSandbox") + } + + public static var webhooks: Self { + .init(rawValue: "webhooks") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "appAvailability": self = .appAvailability - case "appClips": self = .appClips - case "appCustomProductPages": self = .appCustomProductPages - case "appEncryptionDeclarations": self = .appEncryptionDeclarations - case "appEvents": self = .appEvents - case "appInfos": self = .appInfos - case "appPricePoints": self = .appPricePoints - case "appPriceSchedule": self = .appPriceSchedule - case "appStoreVersionExperimentsV2": self = .appStoreVersionExperimentsV2 - case "appStoreVersions": self = .appStoreVersions - case "availableInNewTerritories": self = .availableInNewTerritories - case "availableTerritories": self = .availableTerritories - case "betaAppLocalizations": self = .betaAppLocalizations - case "betaAppReviewDetail": self = .betaAppReviewDetail - case "betaGroups": self = .betaGroups - case "betaLicenseAgreement": self = .betaLicenseAgreement - case "betaTesters": self = .betaTesters - case "builds": self = .builds - case "bundleId": self = .bundleId - case "ciProduct": self = .ciProduct - case "contentRightsDeclaration": self = .contentRightsDeclaration - case "customerReviews": self = .customerReviews - case "endUserLicenseAgreement": self = .endUserLicenseAgreement - case "gameCenterDetail": self = .gameCenterDetail - case "gameCenterEnabledVersions": self = .gameCenterEnabledVersions - case "inAppPurchases": self = .inAppPurchases - case "inAppPurchasesV2": self = .inAppPurchasesV2 - case "isOrEverWasMadeForKids": self = .isOrEverWasMadeForKids - case "name": self = .name - case "perfPowerMetrics": self = .perfPowerMetrics - case "preOrder": self = .preOrder - case "preReleaseVersions": self = .preReleaseVersions - case "pricePoints": self = .pricePoints - case "prices": self = .prices - case "primaryLocale": self = .primaryLocale - case "promotedPurchases": self = .promotedPurchases - case "reviewSubmissions": self = .reviewSubmissions - case "sku": self = .sku - case "subscriptionGracePeriod": self = .subscriptionGracePeriod - case "subscriptionGroups": self = .subscriptionGroups - case "subscriptionStatusUrl": self = .subscriptionStatusUrl - case "subscriptionStatusUrlForSandbox": self = .subscriptionStatusUrlForSandbox - case "subscriptionStatusUrlVersion": self = .subscriptionStatusUrlVersion - case "subscriptionStatusUrlVersionForSandbox": self = .subscriptionStatusUrlVersionForSandbox - default: self = .unknown(rawValue) - } - } - } - - public enum BetaGroups: Hashable, Codable, RawRepresentable { - case app - case betaTesters - case builds - case createdDate - case feedbackEnabled - case hasAccessToAllBuilds - case iosBuildsAvailableForAppleSiliconMac - case isInternalGroup - case name - case publicLink - case publicLinkEnabled - case publicLinkId - case publicLinkLimit - case publicLinkLimitEnabled - case unknown(String) - - public var rawValue: String { - switch self { - case .app: return "app" - case .betaTesters: return "betaTesters" - case .builds: return "builds" - case .createdDate: return "createdDate" - case .feedbackEnabled: return "feedbackEnabled" - case .hasAccessToAllBuilds: return "hasAccessToAllBuilds" - case .iosBuildsAvailableForAppleSiliconMac: return "iosBuildsAvailableForAppleSiliconMac" - case .isInternalGroup: return "isInternalGroup" - case .name: return "name" - case .publicLink: return "publicLink" - case .publicLinkEnabled: return "publicLinkEnabled" - case .publicLinkId: return "publicLinkId" - case .publicLinkLimit: return "publicLinkLimit" - case .publicLinkLimitEnabled: return "publicLinkLimitEnabled" - case .unknown(let rawValue): return rawValue - } + self.rawValue = rawValue + } + } + + public struct BetaGroups: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var app: Self { + .init(rawValue: "app") + } + + public static var betaRecruitmentCriteria: Self { + .init(rawValue: "betaRecruitmentCriteria") + } + + public static var betaRecruitmentCriterionCompatibleBuildCheck: Self { + .init(rawValue: "betaRecruitmentCriterionCompatibleBuildCheck") + } + + public static var betaTesters: Self { + .init(rawValue: "betaTesters") + } + + public static var builds: Self { + .init(rawValue: "builds") + } + + public static var createdDate: Self { + .init(rawValue: "createdDate") + } + + public static var feedbackEnabled: Self { + .init(rawValue: "feedbackEnabled") + } + + public static var hasAccessToAllBuilds: Self { + .init(rawValue: "hasAccessToAllBuilds") + } + + public static var iosBuildsAvailableForAppleSiliconMac: Self { + .init(rawValue: "iosBuildsAvailableForAppleSiliconMac") + } + + public static var iosBuildsAvailableForAppleVision: Self { + .init(rawValue: "iosBuildsAvailableForAppleVision") } + public static var isInternalGroup: Self { + .init(rawValue: "isInternalGroup") + } + + public static var name: Self { + .init(rawValue: "name") + } + + public static var publicLink: Self { + .init(rawValue: "publicLink") + } + + public static var publicLinkEnabled: Self { + .init(rawValue: "publicLinkEnabled") + } + + public static var publicLinkId: Self { + .init(rawValue: "publicLinkId") + } + + public static var publicLinkLimit: Self { + .init(rawValue: "publicLinkLimit") + } + + public static var publicLinkLimitEnabled: Self { + .init(rawValue: "publicLinkLimitEnabled") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "app": self = .app - case "betaTesters": self = .betaTesters - case "builds": self = .builds - case "createdDate": self = .createdDate - case "feedbackEnabled": self = .feedbackEnabled - case "hasAccessToAllBuilds": self = .hasAccessToAllBuilds - case "iosBuildsAvailableForAppleSiliconMac": self = .iosBuildsAvailableForAppleSiliconMac - case "isInternalGroup": self = .isInternalGroup - case "name": self = .name - case "publicLink": self = .publicLink - case "publicLinkEnabled": self = .publicLinkEnabled - case "publicLinkId": self = .publicLinkId - case "publicLinkLimit": self = .publicLinkLimit - case "publicLinkLimitEnabled": self = .publicLinkLimitEnabled - default: self = .unknown(rawValue) - } - } - } - - public enum BetaTesters: Hashable, Codable, RawRepresentable { - case apps - case betaGroups - case builds - case email - case firstName - case inviteType - case lastName - case unknown(String) - - public var rawValue: String { - switch self { - case .apps: return "apps" - case .betaGroups: return "betaGroups" - case .builds: return "builds" - case .email: return "email" - case .firstName: return "firstName" - case .inviteType: return "inviteType" - case .lastName: return "lastName" - case .unknown(let rawValue): return rawValue - } + self.rawValue = rawValue + } + } + + public struct BetaTesters: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var apps: Self { + .init(rawValue: "apps") + } + + public static var betaGroups: Self { + .init(rawValue: "betaGroups") + } + + public static var builds: Self { + .init(rawValue: "builds") + } + + public static var email: Self { + .init(rawValue: "email") + } + + public static var firstName: Self { + .init(rawValue: "firstName") + } + + public static var inviteType: Self { + .init(rawValue: "inviteType") + } + + public static var lastName: Self { + .init(rawValue: "lastName") } + public static var state: Self { + .init(rawValue: "state") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "apps": self = .apps - case "betaGroups": self = .betaGroups - case "builds": self = .builds - case "email": self = .email - case "firstName": self = .firstName - case "inviteType": self = .inviteType - case "lastName": self = .lastName - default: self = .unknown(rawValue) - } - } - } - - public enum Builds: Hashable, Codable, RawRepresentable { - case app - case appEncryptionDeclaration - case appStoreVersion - case betaAppReviewSubmission - case betaBuildLocalizations - case betaGroups - case buildAudienceType - case buildBetaDetail - case buildBundles - case computedMinMacOsVersion - case diagnosticSignatures - case expirationDate - case expired - case iconAssetToken - case icons - case individualTesters - case lsMinimumSystemVersion - case minOsVersion - case perfPowerMetrics - case preReleaseVersion - case processingState - case uploadedDate - case usesNonExemptEncryption - case version - case unknown(String) - - public var rawValue: String { - switch self { - case .app: return "app" - case .appEncryptionDeclaration: return "appEncryptionDeclaration" - case .appStoreVersion: return "appStoreVersion" - case .betaAppReviewSubmission: return "betaAppReviewSubmission" - case .betaBuildLocalizations: return "betaBuildLocalizations" - case .betaGroups: return "betaGroups" - case .buildAudienceType: return "buildAudienceType" - case .buildBetaDetail: return "buildBetaDetail" - case .buildBundles: return "buildBundles" - case .computedMinMacOsVersion: return "computedMinMacOsVersion" - case .diagnosticSignatures: return "diagnosticSignatures" - case .expirationDate: return "expirationDate" - case .expired: return "expired" - case .iconAssetToken: return "iconAssetToken" - case .icons: return "icons" - case .individualTesters: return "individualTesters" - case .lsMinimumSystemVersion: return "lsMinimumSystemVersion" - case .minOsVersion: return "minOsVersion" - case .perfPowerMetrics: return "perfPowerMetrics" - case .preReleaseVersion: return "preReleaseVersion" - case .processingState: return "processingState" - case .uploadedDate: return "uploadedDate" - case .usesNonExemptEncryption: return "usesNonExemptEncryption" - case .version: return "version" - case .unknown(let rawValue): return rawValue - } + self.rawValue = rawValue + } + } + + public struct Builds: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var app: Self { + .init(rawValue: "app") + } + + public static var appEncryptionDeclaration: Self { + .init(rawValue: "appEncryptionDeclaration") + } + + public static var appStoreVersion: Self { + .init(rawValue: "appStoreVersion") + } + + public static var betaAppReviewSubmission: Self { + .init(rawValue: "betaAppReviewSubmission") + } + + public static var betaBuildLocalizations: Self { + .init(rawValue: "betaBuildLocalizations") + } + + public static var betaGroups: Self { + .init(rawValue: "betaGroups") + } + + public static var buildAudienceType: Self { + .init(rawValue: "buildAudienceType") + } + + public static var buildBetaDetail: Self { + .init(rawValue: "buildBetaDetail") + } + + public static var buildBundles: Self { + .init(rawValue: "buildBundles") + } + + public static var computedMinMacOsVersion: Self { + .init(rawValue: "computedMinMacOsVersion") + } + + public static var computedMinVisionOsVersion: Self { + .init(rawValue: "computedMinVisionOsVersion") + } + + public static var diagnosticSignatures: Self { + .init(rawValue: "diagnosticSignatures") + } + + public static var expirationDate: Self { + .init(rawValue: "expirationDate") + } + + public static var expired: Self { + .init(rawValue: "expired") + } + + public static var iconAssetToken: Self { + .init(rawValue: "iconAssetToken") + } + + public static var icons: Self { + .init(rawValue: "icons") + } + + public static var individualTesters: Self { + .init(rawValue: "individualTesters") + } + + public static var lsMinimumSystemVersion: Self { + .init(rawValue: "lsMinimumSystemVersion") + } + + public static var minOsVersion: Self { + .init(rawValue: "minOsVersion") + } + + public static var perfPowerMetrics: Self { + .init(rawValue: "perfPowerMetrics") + } + + public static var preReleaseVersion: Self { + .init(rawValue: "preReleaseVersion") + } + + public static var processingState: Self { + .init(rawValue: "processingState") + } + + public static var uploadedDate: Self { + .init(rawValue: "uploadedDate") + } + + public static var usesNonExemptEncryption: Self { + .init(rawValue: "usesNonExemptEncryption") + } + + public static var version: Self { + .init(rawValue: "version") + } + + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "app": self = .app - case "appEncryptionDeclaration": self = .appEncryptionDeclaration - case "appStoreVersion": self = .appStoreVersion - case "betaAppReviewSubmission": self = .betaAppReviewSubmission - case "betaBuildLocalizations": self = .betaBuildLocalizations - case "betaGroups": self = .betaGroups - case "buildAudienceType": self = .buildAudienceType - case "buildBetaDetail": self = .buildBetaDetail - case "buildBundles": self = .buildBundles - case "computedMinMacOsVersion": self = .computedMinMacOsVersion - case "diagnosticSignatures": self = .diagnosticSignatures - case "expirationDate": self = .expirationDate - case "expired": self = .expired - case "iconAssetToken": self = .iconAssetToken - case "icons": self = .icons - case "individualTesters": self = .individualTesters - case "lsMinimumSystemVersion": self = .lsMinimumSystemVersion - case "minOsVersion": self = .minOsVersion - case "perfPowerMetrics": self = .perfPowerMetrics - case "preReleaseVersion": self = .preReleaseVersion - case "processingState": self = .processingState - case "uploadedDate": self = .uploadedDate - case "usesNonExemptEncryption": self = .usesNonExemptEncryption - case "version": self = .version - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } @@ -488,25 +613,23 @@ extension V1.BetaTesters.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum InviteType: Hashable, Codable, RawRepresentable { - case email - case publicLink - case unknown(String) + public struct InviteType: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var email: Self { + .init(rawValue: "EMAIL") + } + + public static var publicLink: Self { + .init(rawValue: "PUBLIC_LINK") + } - public var rawValue: String { - switch self { - case .email: return "EMAIL" - case .publicLink: return "PUBLIC_LINK" - case .unknown(let rawValue): return rawValue - } + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "EMAIL": self = .email - case "PUBLIC_LINK": self = .publicLink - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } @@ -559,28 +682,27 @@ extension V1.BetaTesters.GET { } } - public enum Include: Hashable, Codable, RawRepresentable { - case apps - case betaGroups - case builds - case unknown(String) + public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var apps: Self { + .init(rawValue: "apps") + } - public var rawValue: String { - switch self { - case .apps: return "apps" - case .betaGroups: return "betaGroups" - case .builds: return "builds" - case .unknown(let rawValue): return rawValue - } + public static var betaGroups: Self { + .init(rawValue: "betaGroups") + } + + public static var builds: Self { + .init(rawValue: "builds") } + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "apps": self = .apps - case "betaGroups": self = .betaGroups - case "builds": self = .builds - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } @@ -621,43 +743,55 @@ extension V1.BetaTesters.GET { } } - public enum Sort: Hashable, Codable, RawRepresentable { - case email - case emailDesc - case firstName - case firstNameDesc - case inviteType - case inviteTypeDesc - case lastName - case lastNameDesc - case unknown(String) - - public var rawValue: String { - switch self { - case .email: return "email" - case .emailDesc: return "-email" - case .firstName: return "firstName" - case .firstNameDesc: return "-firstName" - case .inviteType: return "inviteType" - case .inviteTypeDesc: return "-inviteType" - case .lastName: return "lastName" - case .lastNameDesc: return "-lastName" - case .unknown(let rawValue): return rawValue - } + public struct Sort: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var email: Self { + .init(rawValue: "email") + } + + public static var emailDesc: Self { + .init(rawValue: "-email") + } + + public static var firstName: Self { + .init(rawValue: "firstName") + } + + public static var firstNameDesc: Self { + .init(rawValue: "-firstName") } + public static var inviteType: Self { + .init(rawValue: "inviteType") + } + + public static var inviteTypeDesc: Self { + .init(rawValue: "-inviteType") + } + + public static var lastName: Self { + .init(rawValue: "lastName") + } + + public static var lastNameDesc: Self { + .init(rawValue: "-lastName") + } + + public static var state: Self { + .init(rawValue: "state") + } + + public static var stateDesc: Self { + .init(rawValue: "-state") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "email": self = .email - case "-email": self = .emailDesc - case "firstName": self = .firstName - case "-firstName": self = .firstNameDesc - case "inviteType": self = .inviteType - case "-inviteType": self = .inviteTypeDesc - case "lastName": self = .lastName - case "-lastName": self = .lastNameDesc - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaTesters/BetaTesters.POST.51a9871.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaTesters/BetaTesters.POST.51a9871.generated.swift index fa35ae2e..bc065c07 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaTesters/BetaTesters.POST.51a9871.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaTesters/BetaTesters.POST.51a9871.generated.swift @@ -41,8 +41,11 @@ extension V1.BetaTesters { /// - Returns: **201**, Single BetaTester as `BetaTesterResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **422**, Unprocessable request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -56,12 +59,21 @@ extension V1.BetaTesters { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 409: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 422: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaTesters/ById/Apps/BetaTestersByIdApps.GET.9b53491.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaTesters/ById/Apps/BetaTestersByIdApps.GET.9b53491.generated.swift index 124edb70..b0f0fc7c 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaTesters/ById/Apps/BetaTestersByIdApps.GET.9b53491.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaTesters/ById/Apps/BetaTestersByIdApps.GET.9b53491.generated.swift @@ -44,8 +44,10 @@ extension V1.BetaTesters.ById.Apps { /// - Returns: **200**, List of Apps with get as `AppsWithoutIncludesResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -59,12 +61,18 @@ extension V1.BetaTesters.ById.Apps { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 404: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -87,151 +95,215 @@ extension V1.BetaTesters.ById.Apps.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum Apps: Hashable, Codable, RawRepresentable { - case appAvailability - case appClips - case appCustomProductPages - case appEncryptionDeclarations - case appEvents - case appInfos - case appPricePoints - case appPriceSchedule - case appStoreVersionExperimentsV2 - case appStoreVersions - case availableInNewTerritories - case availableTerritories - case betaAppLocalizations - case betaAppReviewDetail - case betaGroups - case betaLicenseAgreement - case betaTesters - case builds - case bundleId - case ciProduct - case contentRightsDeclaration - case customerReviews - case endUserLicenseAgreement - case gameCenterDetail - case gameCenterEnabledVersions - case inAppPurchases - case inAppPurchasesV2 - case isOrEverWasMadeForKids - case name - case perfPowerMetrics - case preOrder - case preReleaseVersions - case pricePoints - case prices - case primaryLocale - case promotedPurchases - case reviewSubmissions - case sku - case subscriptionGracePeriod - case subscriptionGroups - case subscriptionStatusUrl - case subscriptionStatusUrlForSandbox - case subscriptionStatusUrlVersion - case subscriptionStatusUrlVersionForSandbox - case unknown(String) - - public var rawValue: String { - switch self { - case .appAvailability: return "appAvailability" - case .appClips: return "appClips" - case .appCustomProductPages: return "appCustomProductPages" - case .appEncryptionDeclarations: return "appEncryptionDeclarations" - case .appEvents: return "appEvents" - case .appInfos: return "appInfos" - case .appPricePoints: return "appPricePoints" - case .appPriceSchedule: return "appPriceSchedule" - case .appStoreVersionExperimentsV2: return "appStoreVersionExperimentsV2" - case .appStoreVersions: return "appStoreVersions" - case .availableInNewTerritories: return "availableInNewTerritories" - case .availableTerritories: return "availableTerritories" - case .betaAppLocalizations: return "betaAppLocalizations" - case .betaAppReviewDetail: return "betaAppReviewDetail" - case .betaGroups: return "betaGroups" - case .betaLicenseAgreement: return "betaLicenseAgreement" - case .betaTesters: return "betaTesters" - case .builds: return "builds" - case .bundleId: return "bundleId" - case .ciProduct: return "ciProduct" - case .contentRightsDeclaration: return "contentRightsDeclaration" - case .customerReviews: return "customerReviews" - case .endUserLicenseAgreement: return "endUserLicenseAgreement" - case .gameCenterDetail: return "gameCenterDetail" - case .gameCenterEnabledVersions: return "gameCenterEnabledVersions" - case .inAppPurchases: return "inAppPurchases" - case .inAppPurchasesV2: return "inAppPurchasesV2" - case .isOrEverWasMadeForKids: return "isOrEverWasMadeForKids" - case .name: return "name" - case .perfPowerMetrics: return "perfPowerMetrics" - case .preOrder: return "preOrder" - case .preReleaseVersions: return "preReleaseVersions" - case .pricePoints: return "pricePoints" - case .prices: return "prices" - case .primaryLocale: return "primaryLocale" - case .promotedPurchases: return "promotedPurchases" - case .reviewSubmissions: return "reviewSubmissions" - case .sku: return "sku" - case .subscriptionGracePeriod: return "subscriptionGracePeriod" - case .subscriptionGroups: return "subscriptionGroups" - case .subscriptionStatusUrl: return "subscriptionStatusUrl" - case .subscriptionStatusUrlForSandbox: return "subscriptionStatusUrlForSandbox" - case .subscriptionStatusUrlVersion: return "subscriptionStatusUrlVersion" - case .subscriptionStatusUrlVersionForSandbox: return "subscriptionStatusUrlVersionForSandbox" - case .unknown(let rawValue): return rawValue - } + public struct Apps: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var accessibilityDeclarations: Self { + .init(rawValue: "accessibilityDeclarations") + } + + public static var accessibilityUrl: Self { + .init(rawValue: "accessibilityUrl") + } + + public static var alternativeDistributionKey: Self { + .init(rawValue: "alternativeDistributionKey") + } + + public static var analyticsReportRequests: Self { + .init(rawValue: "analyticsReportRequests") + } + + public static var appAvailabilityV2: Self { + .init(rawValue: "appAvailabilityV2") + } + + public static var appClips: Self { + .init(rawValue: "appClips") } + public static var appCustomProductPages: Self { + .init(rawValue: "appCustomProductPages") + } + + public static var appEncryptionDeclarations: Self { + .init(rawValue: "appEncryptionDeclarations") + } + + public static var appEvents: Self { + .init(rawValue: "appEvents") + } + + public static var appInfos: Self { + .init(rawValue: "appInfos") + } + + public static var appPricePoints: Self { + .init(rawValue: "appPricePoints") + } + + public static var appPriceSchedule: Self { + .init(rawValue: "appPriceSchedule") + } + + public static var appStoreVersionExperimentsV2: Self { + .init(rawValue: "appStoreVersionExperimentsV2") + } + + public static var appStoreVersions: Self { + .init(rawValue: "appStoreVersions") + } + + public static var backgroundAssets: Self { + .init(rawValue: "backgroundAssets") + } + + public static var betaAppLocalizations: Self { + .init(rawValue: "betaAppLocalizations") + } + + public static var betaAppReviewDetail: Self { + .init(rawValue: "betaAppReviewDetail") + } + + public static var betaFeedbackCrashSubmissions: Self { + .init(rawValue: "betaFeedbackCrashSubmissions") + } + + public static var betaFeedbackScreenshotSubmissions: Self { + .init(rawValue: "betaFeedbackScreenshotSubmissions") + } + + public static var betaGroups: Self { + .init(rawValue: "betaGroups") + } + + public static var betaLicenseAgreement: Self { + .init(rawValue: "betaLicenseAgreement") + } + + public static var betaTesters: Self { + .init(rawValue: "betaTesters") + } + + public static var builds: Self { + .init(rawValue: "builds") + } + + public static var bundleId: Self { + .init(rawValue: "bundleId") + } + + public static var ciProduct: Self { + .init(rawValue: "ciProduct") + } + + public static var contentRightsDeclaration: Self { + .init(rawValue: "contentRightsDeclaration") + } + + public static var customerReviewSummarizations: Self { + .init(rawValue: "customerReviewSummarizations") + } + + public static var customerReviews: Self { + .init(rawValue: "customerReviews") + } + + public static var endUserLicenseAgreement: Self { + .init(rawValue: "endUserLicenseAgreement") + } + + public static var gameCenterDetail: Self { + .init(rawValue: "gameCenterDetail") + } + + public static var gameCenterEnabledVersions: Self { + .init(rawValue: "gameCenterEnabledVersions") + } + + public static var inAppPurchases: Self { + .init(rawValue: "inAppPurchases") + } + + public static var inAppPurchasesV2: Self { + .init(rawValue: "inAppPurchasesV2") + } + + public static var isOrEverWasMadeForKids: Self { + .init(rawValue: "isOrEverWasMadeForKids") + } + + public static var marketplaceSearchDetail: Self { + .init(rawValue: "marketplaceSearchDetail") + } + + public static var name: Self { + .init(rawValue: "name") + } + + public static var perfPowerMetrics: Self { + .init(rawValue: "perfPowerMetrics") + } + + public static var preReleaseVersions: Self { + .init(rawValue: "preReleaseVersions") + } + + public static var primaryLocale: Self { + .init(rawValue: "primaryLocale") + } + + public static var promotedPurchases: Self { + .init(rawValue: "promotedPurchases") + } + + public static var reviewSubmissions: Self { + .init(rawValue: "reviewSubmissions") + } + + public static var sku: Self { + .init(rawValue: "sku") + } + + public static var streamlinedPurchasingEnabled: Self { + .init(rawValue: "streamlinedPurchasingEnabled") + } + + public static var subscriptionGracePeriod: Self { + .init(rawValue: "subscriptionGracePeriod") + } + + public static var subscriptionGroups: Self { + .init(rawValue: "subscriptionGroups") + } + + public static var subscriptionStatusUrl: Self { + .init(rawValue: "subscriptionStatusUrl") + } + + public static var subscriptionStatusUrlForSandbox: Self { + .init(rawValue: "subscriptionStatusUrlForSandbox") + } + + public static var subscriptionStatusUrlVersion: Self { + .init(rawValue: "subscriptionStatusUrlVersion") + } + + public static var subscriptionStatusUrlVersionForSandbox: Self { + .init(rawValue: "subscriptionStatusUrlVersionForSandbox") + } + + public static var webhooks: Self { + .init(rawValue: "webhooks") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "appAvailability": self = .appAvailability - case "appClips": self = .appClips - case "appCustomProductPages": self = .appCustomProductPages - case "appEncryptionDeclarations": self = .appEncryptionDeclarations - case "appEvents": self = .appEvents - case "appInfos": self = .appInfos - case "appPricePoints": self = .appPricePoints - case "appPriceSchedule": self = .appPriceSchedule - case "appStoreVersionExperimentsV2": self = .appStoreVersionExperimentsV2 - case "appStoreVersions": self = .appStoreVersions - case "availableInNewTerritories": self = .availableInNewTerritories - case "availableTerritories": self = .availableTerritories - case "betaAppLocalizations": self = .betaAppLocalizations - case "betaAppReviewDetail": self = .betaAppReviewDetail - case "betaGroups": self = .betaGroups - case "betaLicenseAgreement": self = .betaLicenseAgreement - case "betaTesters": self = .betaTesters - case "builds": self = .builds - case "bundleId": self = .bundleId - case "ciProduct": self = .ciProduct - case "contentRightsDeclaration": self = .contentRightsDeclaration - case "customerReviews": self = .customerReviews - case "endUserLicenseAgreement": self = .endUserLicenseAgreement - case "gameCenterDetail": self = .gameCenterDetail - case "gameCenterEnabledVersions": self = .gameCenterEnabledVersions - case "inAppPurchases": self = .inAppPurchases - case "inAppPurchasesV2": self = .inAppPurchasesV2 - case "isOrEverWasMadeForKids": self = .isOrEverWasMadeForKids - case "name": self = .name - case "perfPowerMetrics": self = .perfPowerMetrics - case "preOrder": self = .preOrder - case "preReleaseVersions": self = .preReleaseVersions - case "pricePoints": self = .pricePoints - case "prices": self = .prices - case "primaryLocale": self = .primaryLocale - case "promotedPurchases": self = .promotedPurchases - case "reviewSubmissions": self = .reviewSubmissions - case "sku": self = .sku - case "subscriptionGracePeriod": self = .subscriptionGracePeriod - case "subscriptionGroups": self = .subscriptionGroups - case "subscriptionStatusUrl": self = .subscriptionStatusUrl - case "subscriptionStatusUrlForSandbox": self = .subscriptionStatusUrlForSandbox - case "subscriptionStatusUrlVersion": self = .subscriptionStatusUrlVersion - case "subscriptionStatusUrlVersionForSandbox": self = .subscriptionStatusUrlVersionForSandbox - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaTesters/ById/BetaGroups/BetaTestersByIdBetaGroups.GET.cf12194.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaTesters/ById/BetaGroups/BetaTestersByIdBetaGroups.GET.cf12194.generated.swift index b98f762b..c1b36d4a 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaTesters/ById/BetaGroups/BetaTestersByIdBetaGroups.GET.cf12194.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaTesters/ById/BetaGroups/BetaTestersByIdBetaGroups.GET.cf12194.generated.swift @@ -44,8 +44,10 @@ extension V1.BetaTesters.ById.BetaGroups { /// - Returns: **200**, List of BetaGroups with get as `BetaGroupsWithoutIncludesResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -59,12 +61,18 @@ extension V1.BetaTesters.ById.BetaGroups { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 404: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -87,61 +95,83 @@ extension V1.BetaTesters.ById.BetaGroups.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum BetaGroups: Hashable, Codable, RawRepresentable { - case app - case betaTesters - case builds - case createdDate - case feedbackEnabled - case hasAccessToAllBuilds - case iosBuildsAvailableForAppleSiliconMac - case isInternalGroup - case name - case publicLink - case publicLinkEnabled - case publicLinkId - case publicLinkLimit - case publicLinkLimitEnabled - case unknown(String) - - public var rawValue: String { - switch self { - case .app: return "app" - case .betaTesters: return "betaTesters" - case .builds: return "builds" - case .createdDate: return "createdDate" - case .feedbackEnabled: return "feedbackEnabled" - case .hasAccessToAllBuilds: return "hasAccessToAllBuilds" - case .iosBuildsAvailableForAppleSiliconMac: return "iosBuildsAvailableForAppleSiliconMac" - case .isInternalGroup: return "isInternalGroup" - case .name: return "name" - case .publicLink: return "publicLink" - case .publicLinkEnabled: return "publicLinkEnabled" - case .publicLinkId: return "publicLinkId" - case .publicLinkLimit: return "publicLinkLimit" - case .publicLinkLimitEnabled: return "publicLinkLimitEnabled" - case .unknown(let rawValue): return rawValue - } + public struct BetaGroups: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var app: Self { + .init(rawValue: "app") + } + + public static var betaRecruitmentCriteria: Self { + .init(rawValue: "betaRecruitmentCriteria") + } + + public static var betaRecruitmentCriterionCompatibleBuildCheck: Self { + .init(rawValue: "betaRecruitmentCriterionCompatibleBuildCheck") + } + + public static var betaTesters: Self { + .init(rawValue: "betaTesters") + } + + public static var builds: Self { + .init(rawValue: "builds") + } + + public static var createdDate: Self { + .init(rawValue: "createdDate") + } + + public static var feedbackEnabled: Self { + .init(rawValue: "feedbackEnabled") + } + + public static var hasAccessToAllBuilds: Self { + .init(rawValue: "hasAccessToAllBuilds") + } + + public static var iosBuildsAvailableForAppleSiliconMac: Self { + .init(rawValue: "iosBuildsAvailableForAppleSiliconMac") } + public static var iosBuildsAvailableForAppleVision: Self { + .init(rawValue: "iosBuildsAvailableForAppleVision") + } + + public static var isInternalGroup: Self { + .init(rawValue: "isInternalGroup") + } + + public static var name: Self { + .init(rawValue: "name") + } + + public static var publicLink: Self { + .init(rawValue: "publicLink") + } + + public static var publicLinkEnabled: Self { + .init(rawValue: "publicLinkEnabled") + } + + public static var publicLinkId: Self { + .init(rawValue: "publicLinkId") + } + + public static var publicLinkLimit: Self { + .init(rawValue: "publicLinkLimit") + } + + public static var publicLinkLimitEnabled: Self { + .init(rawValue: "publicLinkLimitEnabled") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "app": self = .app - case "betaTesters": self = .betaTesters - case "builds": self = .builds - case "createdDate": self = .createdDate - case "feedbackEnabled": self = .feedbackEnabled - case "hasAccessToAllBuilds": self = .hasAccessToAllBuilds - case "iosBuildsAvailableForAppleSiliconMac": self = .iosBuildsAvailableForAppleSiliconMac - case "isInternalGroup": self = .isInternalGroup - case "name": self = .name - case "publicLink": self = .publicLink - case "publicLinkEnabled": self = .publicLinkEnabled - case "publicLinkId": self = .publicLinkId - case "publicLinkLimit": self = .publicLinkLimit - case "publicLinkLimitEnabled": self = .publicLinkLimitEnabled - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaTesters/ById/BetaTestersById.DELETE.6ca796e.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaTesters/ById/BetaTestersById.DELETE.6ca796e.generated.swift index e33730e1..7977426a 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaTesters/ById/BetaTestersById.DELETE.6ca796e.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaTesters/ById/BetaTestersById.DELETE.6ca796e.generated.swift @@ -31,12 +31,12 @@ extension V1.BetaTesters.ById { return urlRequest } - /// - Returns: **202**, Accepted for future completion - /// - Returns: **204**, Success (no content) /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -44,15 +44,12 @@ extension V1.BetaTesters.ById { } switch urlResponse.statusCode { - case 202: - return - - case 204: - return - case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) @@ -62,6 +59,9 @@ extension V1.BetaTesters.ById { case 409: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaTesters/ById/BetaTestersById.GET.6ca796e.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaTesters/ById/BetaTestersById.GET.6ca796e.generated.swift index 0fa2d972..b3589070 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaTesters/ById/BetaTestersById.GET.6ca796e.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaTesters/ById/BetaTestersById.GET.6ca796e.generated.swift @@ -56,8 +56,10 @@ extension V1.BetaTesters.ById { /// - Returns: **200**, Single BetaTester as `BetaTesterResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -71,12 +73,18 @@ extension V1.BetaTesters.ById { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 404: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -101,334 +109,451 @@ extension V1.BetaTesters.ById.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum Apps: Hashable, Codable, RawRepresentable { - case appAvailability - case appClips - case appCustomProductPages - case appEncryptionDeclarations - case appEvents - case appInfos - case appPricePoints - case appPriceSchedule - case appStoreVersionExperimentsV2 - case appStoreVersions - case availableInNewTerritories - case availableTerritories - case betaAppLocalizations - case betaAppReviewDetail - case betaGroups - case betaLicenseAgreement - case betaTesters - case builds - case bundleId - case ciProduct - case contentRightsDeclaration - case customerReviews - case endUserLicenseAgreement - case gameCenterDetail - case gameCenterEnabledVersions - case inAppPurchases - case inAppPurchasesV2 - case isOrEverWasMadeForKids - case name - case perfPowerMetrics - case preOrder - case preReleaseVersions - case pricePoints - case prices - case primaryLocale - case promotedPurchases - case reviewSubmissions - case sku - case subscriptionGracePeriod - case subscriptionGroups - case subscriptionStatusUrl - case subscriptionStatusUrlForSandbox - case subscriptionStatusUrlVersion - case subscriptionStatusUrlVersionForSandbox - case unknown(String) - - public var rawValue: String { - switch self { - case .appAvailability: return "appAvailability" - case .appClips: return "appClips" - case .appCustomProductPages: return "appCustomProductPages" - case .appEncryptionDeclarations: return "appEncryptionDeclarations" - case .appEvents: return "appEvents" - case .appInfos: return "appInfos" - case .appPricePoints: return "appPricePoints" - case .appPriceSchedule: return "appPriceSchedule" - case .appStoreVersionExperimentsV2: return "appStoreVersionExperimentsV2" - case .appStoreVersions: return "appStoreVersions" - case .availableInNewTerritories: return "availableInNewTerritories" - case .availableTerritories: return "availableTerritories" - case .betaAppLocalizations: return "betaAppLocalizations" - case .betaAppReviewDetail: return "betaAppReviewDetail" - case .betaGroups: return "betaGroups" - case .betaLicenseAgreement: return "betaLicenseAgreement" - case .betaTesters: return "betaTesters" - case .builds: return "builds" - case .bundleId: return "bundleId" - case .ciProduct: return "ciProduct" - case .contentRightsDeclaration: return "contentRightsDeclaration" - case .customerReviews: return "customerReviews" - case .endUserLicenseAgreement: return "endUserLicenseAgreement" - case .gameCenterDetail: return "gameCenterDetail" - case .gameCenterEnabledVersions: return "gameCenterEnabledVersions" - case .inAppPurchases: return "inAppPurchases" - case .inAppPurchasesV2: return "inAppPurchasesV2" - case .isOrEverWasMadeForKids: return "isOrEverWasMadeForKids" - case .name: return "name" - case .perfPowerMetrics: return "perfPowerMetrics" - case .preOrder: return "preOrder" - case .preReleaseVersions: return "preReleaseVersions" - case .pricePoints: return "pricePoints" - case .prices: return "prices" - case .primaryLocale: return "primaryLocale" - case .promotedPurchases: return "promotedPurchases" - case .reviewSubmissions: return "reviewSubmissions" - case .sku: return "sku" - case .subscriptionGracePeriod: return "subscriptionGracePeriod" - case .subscriptionGroups: return "subscriptionGroups" - case .subscriptionStatusUrl: return "subscriptionStatusUrl" - case .subscriptionStatusUrlForSandbox: return "subscriptionStatusUrlForSandbox" - case .subscriptionStatusUrlVersion: return "subscriptionStatusUrlVersion" - case .subscriptionStatusUrlVersionForSandbox: return "subscriptionStatusUrlVersionForSandbox" - case .unknown(let rawValue): return rawValue - } + public struct Apps: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var accessibilityDeclarations: Self { + .init(rawValue: "accessibilityDeclarations") + } + + public static var accessibilityUrl: Self { + .init(rawValue: "accessibilityUrl") + } + + public static var alternativeDistributionKey: Self { + .init(rawValue: "alternativeDistributionKey") + } + + public static var analyticsReportRequests: Self { + .init(rawValue: "analyticsReportRequests") + } + + public static var appAvailabilityV2: Self { + .init(rawValue: "appAvailabilityV2") + } + + public static var appClips: Self { + .init(rawValue: "appClips") + } + + public static var appCustomProductPages: Self { + .init(rawValue: "appCustomProductPages") + } + + public static var appEncryptionDeclarations: Self { + .init(rawValue: "appEncryptionDeclarations") + } + + public static var appEvents: Self { + .init(rawValue: "appEvents") + } + + public static var appInfos: Self { + .init(rawValue: "appInfos") + } + + public static var appPricePoints: Self { + .init(rawValue: "appPricePoints") + } + + public static var appPriceSchedule: Self { + .init(rawValue: "appPriceSchedule") + } + + public static var appStoreVersionExperimentsV2: Self { + .init(rawValue: "appStoreVersionExperimentsV2") + } + + public static var appStoreVersions: Self { + .init(rawValue: "appStoreVersions") + } + + public static var backgroundAssets: Self { + .init(rawValue: "backgroundAssets") + } + + public static var betaAppLocalizations: Self { + .init(rawValue: "betaAppLocalizations") + } + + public static var betaAppReviewDetail: Self { + .init(rawValue: "betaAppReviewDetail") + } + + public static var betaFeedbackCrashSubmissions: Self { + .init(rawValue: "betaFeedbackCrashSubmissions") + } + + public static var betaFeedbackScreenshotSubmissions: Self { + .init(rawValue: "betaFeedbackScreenshotSubmissions") + } + + public static var betaGroups: Self { + .init(rawValue: "betaGroups") + } + + public static var betaLicenseAgreement: Self { + .init(rawValue: "betaLicenseAgreement") + } + + public static var betaTesters: Self { + .init(rawValue: "betaTesters") + } + + public static var builds: Self { + .init(rawValue: "builds") + } + + public static var bundleId: Self { + .init(rawValue: "bundleId") + } + + public static var ciProduct: Self { + .init(rawValue: "ciProduct") + } + + public static var contentRightsDeclaration: Self { + .init(rawValue: "contentRightsDeclaration") } + public static var customerReviewSummarizations: Self { + .init(rawValue: "customerReviewSummarizations") + } + + public static var customerReviews: Self { + .init(rawValue: "customerReviews") + } + + public static var endUserLicenseAgreement: Self { + .init(rawValue: "endUserLicenseAgreement") + } + + public static var gameCenterDetail: Self { + .init(rawValue: "gameCenterDetail") + } + + public static var gameCenterEnabledVersions: Self { + .init(rawValue: "gameCenterEnabledVersions") + } + + public static var inAppPurchases: Self { + .init(rawValue: "inAppPurchases") + } + + public static var inAppPurchasesV2: Self { + .init(rawValue: "inAppPurchasesV2") + } + + public static var isOrEverWasMadeForKids: Self { + .init(rawValue: "isOrEverWasMadeForKids") + } + + public static var marketplaceSearchDetail: Self { + .init(rawValue: "marketplaceSearchDetail") + } + + public static var name: Self { + .init(rawValue: "name") + } + + public static var perfPowerMetrics: Self { + .init(rawValue: "perfPowerMetrics") + } + + public static var preReleaseVersions: Self { + .init(rawValue: "preReleaseVersions") + } + + public static var primaryLocale: Self { + .init(rawValue: "primaryLocale") + } + + public static var promotedPurchases: Self { + .init(rawValue: "promotedPurchases") + } + + public static var reviewSubmissions: Self { + .init(rawValue: "reviewSubmissions") + } + + public static var sku: Self { + .init(rawValue: "sku") + } + + public static var streamlinedPurchasingEnabled: Self { + .init(rawValue: "streamlinedPurchasingEnabled") + } + + public static var subscriptionGracePeriod: Self { + .init(rawValue: "subscriptionGracePeriod") + } + + public static var subscriptionGroups: Self { + .init(rawValue: "subscriptionGroups") + } + + public static var subscriptionStatusUrl: Self { + .init(rawValue: "subscriptionStatusUrl") + } + + public static var subscriptionStatusUrlForSandbox: Self { + .init(rawValue: "subscriptionStatusUrlForSandbox") + } + + public static var subscriptionStatusUrlVersion: Self { + .init(rawValue: "subscriptionStatusUrlVersion") + } + + public static var subscriptionStatusUrlVersionForSandbox: Self { + .init(rawValue: "subscriptionStatusUrlVersionForSandbox") + } + + public static var webhooks: Self { + .init(rawValue: "webhooks") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "appAvailability": self = .appAvailability - case "appClips": self = .appClips - case "appCustomProductPages": self = .appCustomProductPages - case "appEncryptionDeclarations": self = .appEncryptionDeclarations - case "appEvents": self = .appEvents - case "appInfos": self = .appInfos - case "appPricePoints": self = .appPricePoints - case "appPriceSchedule": self = .appPriceSchedule - case "appStoreVersionExperimentsV2": self = .appStoreVersionExperimentsV2 - case "appStoreVersions": self = .appStoreVersions - case "availableInNewTerritories": self = .availableInNewTerritories - case "availableTerritories": self = .availableTerritories - case "betaAppLocalizations": self = .betaAppLocalizations - case "betaAppReviewDetail": self = .betaAppReviewDetail - case "betaGroups": self = .betaGroups - case "betaLicenseAgreement": self = .betaLicenseAgreement - case "betaTesters": self = .betaTesters - case "builds": self = .builds - case "bundleId": self = .bundleId - case "ciProduct": self = .ciProduct - case "contentRightsDeclaration": self = .contentRightsDeclaration - case "customerReviews": self = .customerReviews - case "endUserLicenseAgreement": self = .endUserLicenseAgreement - case "gameCenterDetail": self = .gameCenterDetail - case "gameCenterEnabledVersions": self = .gameCenterEnabledVersions - case "inAppPurchases": self = .inAppPurchases - case "inAppPurchasesV2": self = .inAppPurchasesV2 - case "isOrEverWasMadeForKids": self = .isOrEverWasMadeForKids - case "name": self = .name - case "perfPowerMetrics": self = .perfPowerMetrics - case "preOrder": self = .preOrder - case "preReleaseVersions": self = .preReleaseVersions - case "pricePoints": self = .pricePoints - case "prices": self = .prices - case "primaryLocale": self = .primaryLocale - case "promotedPurchases": self = .promotedPurchases - case "reviewSubmissions": self = .reviewSubmissions - case "sku": self = .sku - case "subscriptionGracePeriod": self = .subscriptionGracePeriod - case "subscriptionGroups": self = .subscriptionGroups - case "subscriptionStatusUrl": self = .subscriptionStatusUrl - case "subscriptionStatusUrlForSandbox": self = .subscriptionStatusUrlForSandbox - case "subscriptionStatusUrlVersion": self = .subscriptionStatusUrlVersion - case "subscriptionStatusUrlVersionForSandbox": self = .subscriptionStatusUrlVersionForSandbox - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum BetaGroups: Hashable, Codable, RawRepresentable { - case app - case betaTesters - case builds - case createdDate - case feedbackEnabled - case hasAccessToAllBuilds - case iosBuildsAvailableForAppleSiliconMac - case isInternalGroup - case name - case publicLink - case publicLinkEnabled - case publicLinkId - case publicLinkLimit - case publicLinkLimitEnabled - case unknown(String) - - public var rawValue: String { - switch self { - case .app: return "app" - case .betaTesters: return "betaTesters" - case .builds: return "builds" - case .createdDate: return "createdDate" - case .feedbackEnabled: return "feedbackEnabled" - case .hasAccessToAllBuilds: return "hasAccessToAllBuilds" - case .iosBuildsAvailableForAppleSiliconMac: return "iosBuildsAvailableForAppleSiliconMac" - case .isInternalGroup: return "isInternalGroup" - case .name: return "name" - case .publicLink: return "publicLink" - case .publicLinkEnabled: return "publicLinkEnabled" - case .publicLinkId: return "publicLinkId" - case .publicLinkLimit: return "publicLinkLimit" - case .publicLinkLimitEnabled: return "publicLinkLimitEnabled" - case .unknown(let rawValue): return rawValue - } + public struct BetaGroups: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var app: Self { + .init(rawValue: "app") + } + + public static var betaRecruitmentCriteria: Self { + .init(rawValue: "betaRecruitmentCriteria") + } + + public static var betaRecruitmentCriterionCompatibleBuildCheck: Self { + .init(rawValue: "betaRecruitmentCriterionCompatibleBuildCheck") + } + + public static var betaTesters: Self { + .init(rawValue: "betaTesters") + } + + public static var builds: Self { + .init(rawValue: "builds") + } + + public static var createdDate: Self { + .init(rawValue: "createdDate") + } + + public static var feedbackEnabled: Self { + .init(rawValue: "feedbackEnabled") + } + + public static var hasAccessToAllBuilds: Self { + .init(rawValue: "hasAccessToAllBuilds") + } + + public static var iosBuildsAvailableForAppleSiliconMac: Self { + .init(rawValue: "iosBuildsAvailableForAppleSiliconMac") + } + + public static var iosBuildsAvailableForAppleVision: Self { + .init(rawValue: "iosBuildsAvailableForAppleVision") + } + + public static var isInternalGroup: Self { + .init(rawValue: "isInternalGroup") + } + + public static var name: Self { + .init(rawValue: "name") + } + + public static var publicLink: Self { + .init(rawValue: "publicLink") + } + + public static var publicLinkEnabled: Self { + .init(rawValue: "publicLinkEnabled") + } + + public static var publicLinkId: Self { + .init(rawValue: "publicLinkId") + } + + public static var publicLinkLimit: Self { + .init(rawValue: "publicLinkLimit") } + public static var publicLinkLimitEnabled: Self { + .init(rawValue: "publicLinkLimitEnabled") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "app": self = .app - case "betaTesters": self = .betaTesters - case "builds": self = .builds - case "createdDate": self = .createdDate - case "feedbackEnabled": self = .feedbackEnabled - case "hasAccessToAllBuilds": self = .hasAccessToAllBuilds - case "iosBuildsAvailableForAppleSiliconMac": self = .iosBuildsAvailableForAppleSiliconMac - case "isInternalGroup": self = .isInternalGroup - case "name": self = .name - case "publicLink": self = .publicLink - case "publicLinkEnabled": self = .publicLinkEnabled - case "publicLinkId": self = .publicLinkId - case "publicLinkLimit": self = .publicLinkLimit - case "publicLinkLimitEnabled": self = .publicLinkLimitEnabled - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum BetaTesters: Hashable, Codable, RawRepresentable { - case apps - case betaGroups - case builds - case email - case firstName - case inviteType - case lastName - case unknown(String) - - public var rawValue: String { - switch self { - case .apps: return "apps" - case .betaGroups: return "betaGroups" - case .builds: return "builds" - case .email: return "email" - case .firstName: return "firstName" - case .inviteType: return "inviteType" - case .lastName: return "lastName" - case .unknown(let rawValue): return rawValue - } + public struct BetaTesters: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var apps: Self { + .init(rawValue: "apps") + } + + public static var betaGroups: Self { + .init(rawValue: "betaGroups") } + public static var builds: Self { + .init(rawValue: "builds") + } + + public static var email: Self { + .init(rawValue: "email") + } + + public static var firstName: Self { + .init(rawValue: "firstName") + } + + public static var inviteType: Self { + .init(rawValue: "inviteType") + } + + public static var lastName: Self { + .init(rawValue: "lastName") + } + + public static var state: Self { + .init(rawValue: "state") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "apps": self = .apps - case "betaGroups": self = .betaGroups - case "builds": self = .builds - case "email": self = .email - case "firstName": self = .firstName - case "inviteType": self = .inviteType - case "lastName": self = .lastName - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum Builds: Hashable, Codable, RawRepresentable { - case app - case appEncryptionDeclaration - case appStoreVersion - case betaAppReviewSubmission - case betaBuildLocalizations - case betaGroups - case buildAudienceType - case buildBetaDetail - case buildBundles - case computedMinMacOsVersion - case diagnosticSignatures - case expirationDate - case expired - case iconAssetToken - case icons - case individualTesters - case lsMinimumSystemVersion - case minOsVersion - case perfPowerMetrics - case preReleaseVersion - case processingState - case uploadedDate - case usesNonExemptEncryption - case version - case unknown(String) - - public var rawValue: String { - switch self { - case .app: return "app" - case .appEncryptionDeclaration: return "appEncryptionDeclaration" - case .appStoreVersion: return "appStoreVersion" - case .betaAppReviewSubmission: return "betaAppReviewSubmission" - case .betaBuildLocalizations: return "betaBuildLocalizations" - case .betaGroups: return "betaGroups" - case .buildAudienceType: return "buildAudienceType" - case .buildBetaDetail: return "buildBetaDetail" - case .buildBundles: return "buildBundles" - case .computedMinMacOsVersion: return "computedMinMacOsVersion" - case .diagnosticSignatures: return "diagnosticSignatures" - case .expirationDate: return "expirationDate" - case .expired: return "expired" - case .iconAssetToken: return "iconAssetToken" - case .icons: return "icons" - case .individualTesters: return "individualTesters" - case .lsMinimumSystemVersion: return "lsMinimumSystemVersion" - case .minOsVersion: return "minOsVersion" - case .perfPowerMetrics: return "perfPowerMetrics" - case .preReleaseVersion: return "preReleaseVersion" - case .processingState: return "processingState" - case .uploadedDate: return "uploadedDate" - case .usesNonExemptEncryption: return "usesNonExemptEncryption" - case .version: return "version" - case .unknown(let rawValue): return rawValue - } + public struct Builds: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var app: Self { + .init(rawValue: "app") + } + + public static var appEncryptionDeclaration: Self { + .init(rawValue: "appEncryptionDeclaration") + } + + public static var appStoreVersion: Self { + .init(rawValue: "appStoreVersion") + } + + public static var betaAppReviewSubmission: Self { + .init(rawValue: "betaAppReviewSubmission") + } + + public static var betaBuildLocalizations: Self { + .init(rawValue: "betaBuildLocalizations") + } + + public static var betaGroups: Self { + .init(rawValue: "betaGroups") + } + + public static var buildAudienceType: Self { + .init(rawValue: "buildAudienceType") + } + + public static var buildBetaDetail: Self { + .init(rawValue: "buildBetaDetail") + } + + public static var buildBundles: Self { + .init(rawValue: "buildBundles") + } + + public static var computedMinMacOsVersion: Self { + .init(rawValue: "computedMinMacOsVersion") + } + + public static var computedMinVisionOsVersion: Self { + .init(rawValue: "computedMinVisionOsVersion") + } + + public static var diagnosticSignatures: Self { + .init(rawValue: "diagnosticSignatures") + } + + public static var expirationDate: Self { + .init(rawValue: "expirationDate") + } + + public static var expired: Self { + .init(rawValue: "expired") + } + + public static var iconAssetToken: Self { + .init(rawValue: "iconAssetToken") + } + + public static var icons: Self { + .init(rawValue: "icons") + } + + public static var individualTesters: Self { + .init(rawValue: "individualTesters") } + public static var lsMinimumSystemVersion: Self { + .init(rawValue: "lsMinimumSystemVersion") + } + + public static var minOsVersion: Self { + .init(rawValue: "minOsVersion") + } + + public static var perfPowerMetrics: Self { + .init(rawValue: "perfPowerMetrics") + } + + public static var preReleaseVersion: Self { + .init(rawValue: "preReleaseVersion") + } + + public static var processingState: Self { + .init(rawValue: "processingState") + } + + public static var uploadedDate: Self { + .init(rawValue: "uploadedDate") + } + + public static var usesNonExemptEncryption: Self { + .init(rawValue: "usesNonExemptEncryption") + } + + public static var version: Self { + .init(rawValue: "version") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "app": self = .app - case "appEncryptionDeclaration": self = .appEncryptionDeclaration - case "appStoreVersion": self = .appStoreVersion - case "betaAppReviewSubmission": self = .betaAppReviewSubmission - case "betaBuildLocalizations": self = .betaBuildLocalizations - case "betaGroups": self = .betaGroups - case "buildAudienceType": self = .buildAudienceType - case "buildBetaDetail": self = .buildBetaDetail - case "buildBundles": self = .buildBundles - case "computedMinMacOsVersion": self = .computedMinMacOsVersion - case "diagnosticSignatures": self = .diagnosticSignatures - case "expirationDate": self = .expirationDate - case "expired": self = .expired - case "iconAssetToken": self = .iconAssetToken - case "icons": self = .icons - case "individualTesters": self = .individualTesters - case "lsMinimumSystemVersion": self = .lsMinimumSystemVersion - case "minOsVersion": self = .minOsVersion - case "perfPowerMetrics": self = .perfPowerMetrics - case "preReleaseVersion": self = .preReleaseVersion - case "processingState": self = .processingState - case "uploadedDate": self = .uploadedDate - case "usesNonExemptEncryption": self = .usesNonExemptEncryption - case "version": self = .version - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } @@ -461,28 +586,27 @@ extension V1.BetaTesters.ById.GET { } } - public enum Include: Hashable, Codable, RawRepresentable { - case apps - case betaGroups - case builds - case unknown(String) + public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var apps: Self { + .init(rawValue: "apps") + } - public var rawValue: String { - switch self { - case .apps: return "apps" - case .betaGroups: return "betaGroups" - case .builds: return "builds" - case .unknown(let rawValue): return rawValue - } + public static var betaGroups: Self { + .init(rawValue: "betaGroups") } + public static var builds: Self { + .init(rawValue: "builds") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "apps": self = .apps - case "betaGroups": self = .betaGroups - case "builds": self = .builds - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaTesters/ById/Builds/BetaTestersByIdBuilds.GET.72cb8ed.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaTesters/ById/Builds/BetaTestersByIdBuilds.GET.72cb8ed.generated.swift index c6037782..e4302d9d 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaTesters/ById/Builds/BetaTestersByIdBuilds.GET.72cb8ed.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaTesters/ById/Builds/BetaTestersByIdBuilds.GET.72cb8ed.generated.swift @@ -44,8 +44,10 @@ extension V1.BetaTesters.ById.Builds { /// - Returns: **200**, List of Builds with get as `BuildsWithoutIncludesResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -59,12 +61,18 @@ extension V1.BetaTesters.ById.Builds { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 404: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -87,91 +95,115 @@ extension V1.BetaTesters.ById.Builds.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum Builds: Hashable, Codable, RawRepresentable { - case app - case appEncryptionDeclaration - case appStoreVersion - case betaAppReviewSubmission - case betaBuildLocalizations - case betaGroups - case buildAudienceType - case buildBetaDetail - case buildBundles - case computedMinMacOsVersion - case diagnosticSignatures - case expirationDate - case expired - case iconAssetToken - case icons - case individualTesters - case lsMinimumSystemVersion - case minOsVersion - case perfPowerMetrics - case preReleaseVersion - case processingState - case uploadedDate - case usesNonExemptEncryption - case version - case unknown(String) - - public var rawValue: String { - switch self { - case .app: return "app" - case .appEncryptionDeclaration: return "appEncryptionDeclaration" - case .appStoreVersion: return "appStoreVersion" - case .betaAppReviewSubmission: return "betaAppReviewSubmission" - case .betaBuildLocalizations: return "betaBuildLocalizations" - case .betaGroups: return "betaGroups" - case .buildAudienceType: return "buildAudienceType" - case .buildBetaDetail: return "buildBetaDetail" - case .buildBundles: return "buildBundles" - case .computedMinMacOsVersion: return "computedMinMacOsVersion" - case .diagnosticSignatures: return "diagnosticSignatures" - case .expirationDate: return "expirationDate" - case .expired: return "expired" - case .iconAssetToken: return "iconAssetToken" - case .icons: return "icons" - case .individualTesters: return "individualTesters" - case .lsMinimumSystemVersion: return "lsMinimumSystemVersion" - case .minOsVersion: return "minOsVersion" - case .perfPowerMetrics: return "perfPowerMetrics" - case .preReleaseVersion: return "preReleaseVersion" - case .processingState: return "processingState" - case .uploadedDate: return "uploadedDate" - case .usesNonExemptEncryption: return "usesNonExemptEncryption" - case .version: return "version" - case .unknown(let rawValue): return rawValue - } + public struct Builds: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var app: Self { + .init(rawValue: "app") + } + + public static var appEncryptionDeclaration: Self { + .init(rawValue: "appEncryptionDeclaration") + } + + public static var appStoreVersion: Self { + .init(rawValue: "appStoreVersion") + } + + public static var betaAppReviewSubmission: Self { + .init(rawValue: "betaAppReviewSubmission") + } + + public static var betaBuildLocalizations: Self { + .init(rawValue: "betaBuildLocalizations") + } + + public static var betaGroups: Self { + .init(rawValue: "betaGroups") + } + + public static var buildAudienceType: Self { + .init(rawValue: "buildAudienceType") + } + + public static var buildBetaDetail: Self { + .init(rawValue: "buildBetaDetail") + } + + public static var buildBundles: Self { + .init(rawValue: "buildBundles") + } + + public static var computedMinMacOsVersion: Self { + .init(rawValue: "computedMinMacOsVersion") + } + + public static var computedMinVisionOsVersion: Self { + .init(rawValue: "computedMinVisionOsVersion") + } + + public static var diagnosticSignatures: Self { + .init(rawValue: "diagnosticSignatures") + } + + public static var expirationDate: Self { + .init(rawValue: "expirationDate") } + public static var expired: Self { + .init(rawValue: "expired") + } + + public static var iconAssetToken: Self { + .init(rawValue: "iconAssetToken") + } + + public static var icons: Self { + .init(rawValue: "icons") + } + + public static var individualTesters: Self { + .init(rawValue: "individualTesters") + } + + public static var lsMinimumSystemVersion: Self { + .init(rawValue: "lsMinimumSystemVersion") + } + + public static var minOsVersion: Self { + .init(rawValue: "minOsVersion") + } + + public static var perfPowerMetrics: Self { + .init(rawValue: "perfPowerMetrics") + } + + public static var preReleaseVersion: Self { + .init(rawValue: "preReleaseVersion") + } + + public static var processingState: Self { + .init(rawValue: "processingState") + } + + public static var uploadedDate: Self { + .init(rawValue: "uploadedDate") + } + + public static var usesNonExemptEncryption: Self { + .init(rawValue: "usesNonExemptEncryption") + } + + public static var version: Self { + .init(rawValue: "version") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "app": self = .app - case "appEncryptionDeclaration": self = .appEncryptionDeclaration - case "appStoreVersion": self = .appStoreVersion - case "betaAppReviewSubmission": self = .betaAppReviewSubmission - case "betaBuildLocalizations": self = .betaBuildLocalizations - case "betaGroups": self = .betaGroups - case "buildAudienceType": self = .buildAudienceType - case "buildBetaDetail": self = .buildBetaDetail - case "buildBundles": self = .buildBundles - case "computedMinMacOsVersion": self = .computedMinMacOsVersion - case "diagnosticSignatures": self = .diagnosticSignatures - case "expirationDate": self = .expirationDate - case "expired": self = .expired - case "iconAssetToken": self = .iconAssetToken - case "icons": self = .icons - case "individualTesters": self = .individualTesters - case "lsMinimumSystemVersion": self = .lsMinimumSystemVersion - case "minOsVersion": self = .minOsVersion - case "perfPowerMetrics": self = .perfPowerMetrics - case "preReleaseVersion": self = .preReleaseVersion - case "processingState": self = .processingState - case "uploadedDate": self = .uploadedDate - case "usesNonExemptEncryption": self = .usesNonExemptEncryption - case "version": self = .version - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaTesters/ById/Metrics/BetaTesterUsages/BetaTestersByIdMetricsBetaTesterUsages.GET.33b9bfc.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaTesters/ById/Metrics/BetaTesterUsages/BetaTestersByIdMetricsBetaTesterUsages.GET.33b9bfc.generated.swift index 432e1cfd..dd51012c 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaTesters/ById/Metrics/BetaTesterUsages/BetaTestersByIdMetricsBetaTesterUsages.GET.33b9bfc.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaTesters/ById/Metrics/BetaTesterUsages/BetaTestersByIdMetricsBetaTesterUsages.GET.33b9bfc.generated.swift @@ -46,8 +46,10 @@ extension V1.BetaTesters.ById.Metrics.BetaTesterUsages { /// - Returns: **200**, Metrics data response as `BetaTesterUsagesV1MetricResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -61,12 +63,18 @@ extension V1.BetaTesters.ById.Metrics.BetaTesterUsages { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 404: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -82,7 +90,7 @@ extension V1.BetaTesters.ById.Metrics.BetaTesterUsages.GET { public var limit: Int? /// the duration of the reporting period - public var period: String? + public var period: Period? public struct Filter: Hashable { public subscript (_ relation: Relation) -> T { @@ -93,7 +101,7 @@ extension V1.BetaTesters.ById.Metrics.BetaTesterUsages.GET { private var values: [AnyHashable: AnyHashable] = [:] public struct Relation: Hashable { - /// filter by 'apps' relationship dimension + /// filter by 'apps' relationship dimension **(required)** public static var apps: Relation { .init(key: "filter[apps]") } @@ -105,6 +113,34 @@ extension V1.BetaTesters.ById.Metrics.BetaTesterUsages.GET { } } } + + public struct Period: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var p30D: Self { + .init(rawValue: "P30D") + } + + public static var p365D: Self { + .init(rawValue: "P365D") + } + + public static var p7D: Self { + .init(rawValue: "P7D") + } + + public static var p90D: Self { + .init(rawValue: "P90D") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaTesters/ById/Relationships/Apps/BetaTestersByIdRelationshipsApps.DELETE.bfe586b.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaTesters/ById/Relationships/Apps/BetaTestersByIdRelationshipsApps.DELETE.bfe586b.generated.swift index 31619a39..4a134e37 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaTesters/ById/Relationships/Apps/BetaTestersByIdRelationshipsApps.DELETE.bfe586b.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaTesters/ById/Relationships/Apps/BetaTestersByIdRelationshipsApps.DELETE.bfe586b.generated.swift @@ -31,11 +31,12 @@ extension V1.BetaTesters.ById.Relationships.Apps { return urlRequest } - /// - Returns: **202**, Accepted for future completion - /// - Returns: **204**, Success (no content) + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **422**, Unprocessable request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -43,11 +44,8 @@ extension V1.BetaTesters.ById.Relationships.Apps { } switch urlResponse.statusCode { - case 202: - return - - case 204: - return + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) @@ -58,6 +56,12 @@ extension V1.BetaTesters.ById.Relationships.Apps { case 409: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 422: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaTesters/ById/Relationships/Apps/BetaTestersByIdRelationshipsApps.GET.bfe586b.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaTesters/ById/Relationships/Apps/BetaTestersByIdRelationshipsApps.GET.bfe586b.generated.swift index a9d748d1..52383aa2 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaTesters/ById/Relationships/Apps/BetaTestersByIdRelationshipsApps.GET.bfe586b.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaTesters/ById/Relationships/Apps/BetaTestersByIdRelationshipsApps.GET.bfe586b.generated.swift @@ -42,8 +42,10 @@ extension V1.BetaTesters.ById.Relationships.Apps { /// - Returns: **200**, List of related linkages as `BetaTesterAppsLinkagesResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -57,12 +59,18 @@ extension V1.BetaTesters.ById.Relationships.Apps { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 404: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaTesters/ById/Relationships/BetaGroups/BetaTestersByIdRelationshipsBetaGroups.DELETE.0ad1815.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaTesters/ById/Relationships/BetaGroups/BetaTestersByIdRelationshipsBetaGroups.DELETE.0ad1815.generated.swift index 0e918cb2..96c17746 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaTesters/ById/Relationships/BetaGroups/BetaTestersByIdRelationshipsBetaGroups.DELETE.0ad1815.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaTesters/ById/Relationships/BetaGroups/BetaTestersByIdRelationshipsBetaGroups.DELETE.0ad1815.generated.swift @@ -31,10 +31,12 @@ extension V1.BetaTesters.ById.Relationships.BetaGroups { return urlRequest } - /// - Returns: **204**, Success (no content) + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **422**, Unprocessable request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -42,8 +44,8 @@ extension V1.BetaTesters.ById.Relationships.BetaGroups { } switch urlResponse.statusCode { - case 204: - return + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) @@ -54,6 +56,12 @@ extension V1.BetaTesters.ById.Relationships.BetaGroups { case 409: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 422: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaTesters/ById/Relationships/BetaGroups/BetaTestersByIdRelationshipsBetaGroups.GET.0ad1815.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaTesters/ById/Relationships/BetaGroups/BetaTestersByIdRelationshipsBetaGroups.GET.0ad1815.generated.swift index dc689aa6..47b50807 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaTesters/ById/Relationships/BetaGroups/BetaTestersByIdRelationshipsBetaGroups.GET.0ad1815.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaTesters/ById/Relationships/BetaGroups/BetaTestersByIdRelationshipsBetaGroups.GET.0ad1815.generated.swift @@ -42,8 +42,10 @@ extension V1.BetaTesters.ById.Relationships.BetaGroups { /// - Returns: **200**, List of related linkages as `BetaTesterBetaGroupsLinkagesResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -57,12 +59,18 @@ extension V1.BetaTesters.ById.Relationships.BetaGroups { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 404: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaTesters/ById/Relationships/BetaGroups/BetaTestersByIdRelationshipsBetaGroups.POST.0ad1815.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaTesters/ById/Relationships/BetaGroups/BetaTestersByIdRelationshipsBetaGroups.POST.0ad1815.generated.swift index a5250941..e01feec1 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaTesters/ById/Relationships/BetaGroups/BetaTestersByIdRelationshipsBetaGroups.POST.0ad1815.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaTesters/ById/Relationships/BetaGroups/BetaTestersByIdRelationshipsBetaGroups.POST.0ad1815.generated.swift @@ -46,10 +46,12 @@ extension V1.BetaTesters.ById.Relationships.BetaGroups { return urlRequest } - /// - Returns: **204**, Success (no content) + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **422**, Unprocessable request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -57,8 +59,8 @@ extension V1.BetaTesters.ById.Relationships.BetaGroups { } switch urlResponse.statusCode { - case 204: - return + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) @@ -69,6 +71,12 @@ extension V1.BetaTesters.ById.Relationships.BetaGroups { case 409: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 422: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaTesters/ById/Relationships/Builds/BetaTestersByIdRelationshipsBuilds.DELETE.63f4bb8.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaTesters/ById/Relationships/Builds/BetaTestersByIdRelationshipsBuilds.DELETE.63f4bb8.generated.swift index 42160214..0015f26f 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaTesters/ById/Relationships/Builds/BetaTestersByIdRelationshipsBuilds.DELETE.63f4bb8.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaTesters/ById/Relationships/Builds/BetaTestersByIdRelationshipsBuilds.DELETE.63f4bb8.generated.swift @@ -31,10 +31,12 @@ extension V1.BetaTesters.ById.Relationships.Builds { return urlRequest } - /// - Returns: **204**, Success (no content) + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **422**, Unprocessable request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -42,8 +44,8 @@ extension V1.BetaTesters.ById.Relationships.Builds { } switch urlResponse.statusCode { - case 204: - return + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) @@ -54,6 +56,12 @@ extension V1.BetaTesters.ById.Relationships.Builds { case 409: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 422: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaTesters/ById/Relationships/Builds/BetaTestersByIdRelationshipsBuilds.GET.63f4bb8.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaTesters/ById/Relationships/Builds/BetaTestersByIdRelationshipsBuilds.GET.63f4bb8.generated.swift index 6867ba0d..8145e384 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaTesters/ById/Relationships/Builds/BetaTestersByIdRelationshipsBuilds.GET.63f4bb8.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaTesters/ById/Relationships/Builds/BetaTestersByIdRelationshipsBuilds.GET.63f4bb8.generated.swift @@ -42,8 +42,10 @@ extension V1.BetaTesters.ById.Relationships.Builds { /// - Returns: **200**, List of related linkages as `BetaTesterBuildsLinkagesResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -57,12 +59,18 @@ extension V1.BetaTesters.ById.Relationships.Builds { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 404: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaTesters/ById/Relationships/Builds/BetaTestersByIdRelationshipsBuilds.POST.63f4bb8.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaTesters/ById/Relationships/Builds/BetaTestersByIdRelationshipsBuilds.POST.63f4bb8.generated.swift index f2ed59a4..45a7ae94 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaTesters/ById/Relationships/Builds/BetaTestersByIdRelationshipsBuilds.POST.63f4bb8.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BetaTesters/ById/Relationships/Builds/BetaTestersByIdRelationshipsBuilds.POST.63f4bb8.generated.swift @@ -46,10 +46,12 @@ extension V1.BetaTesters.ById.Relationships.Builds { return urlRequest } - /// - Returns: **204**, Success (no content) + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **422**, Unprocessable request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -57,8 +59,8 @@ extension V1.BetaTesters.ById.Relationships.Builds { } switch urlResponse.statusCode { - case 204: - return + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) @@ -69,6 +71,12 @@ extension V1.BetaTesters.ById.Relationships.Builds { case 409: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 422: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BuildBetaDetails/BuildBetaDetails.GET.32db9cd.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BuildBetaDetails/BuildBetaDetails.GET.32db9cd.generated.swift index 650e905f..e1276839 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BuildBetaDetails/BuildBetaDetails.GET.32db9cd.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BuildBetaDetails/BuildBetaDetails.GET.32db9cd.generated.swift @@ -49,7 +49,9 @@ extension V1.BuildBetaDetails { /// - Returns: **200**, List of BuildBetaDetails as `BuildBetaDetailsResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -63,9 +65,15 @@ extension V1.BuildBetaDetails { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -93,119 +101,143 @@ extension V1.BuildBetaDetails.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum BuildBetaDetails: Hashable, Codable, RawRepresentable { - case autoNotifyEnabled - case build - case externalBuildState - case internalBuildState - case unknown(String) + public struct BuildBetaDetails: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var autoNotifyEnabled: Self { + .init(rawValue: "autoNotifyEnabled") + } + + public static var build: Self { + .init(rawValue: "build") + } + + public static var externalBuildState: Self { + .init(rawValue: "externalBuildState") + } - public var rawValue: String { - switch self { - case .autoNotifyEnabled: return "autoNotifyEnabled" - case .build: return "build" - case .externalBuildState: return "externalBuildState" - case .internalBuildState: return "internalBuildState" - case .unknown(let rawValue): return rawValue - } + public static var internalBuildState: Self { + .init(rawValue: "internalBuildState") } + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "autoNotifyEnabled": self = .autoNotifyEnabled - case "build": self = .build - case "externalBuildState": self = .externalBuildState - case "internalBuildState": self = .internalBuildState - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum Builds: Hashable, Codable, RawRepresentable { - case app - case appEncryptionDeclaration - case appStoreVersion - case betaAppReviewSubmission - case betaBuildLocalizations - case betaGroups - case buildAudienceType - case buildBetaDetail - case buildBundles - case computedMinMacOsVersion - case diagnosticSignatures - case expirationDate - case expired - case iconAssetToken - case icons - case individualTesters - case lsMinimumSystemVersion - case minOsVersion - case perfPowerMetrics - case preReleaseVersion - case processingState - case uploadedDate - case usesNonExemptEncryption - case version - case unknown(String) - - public var rawValue: String { - switch self { - case .app: return "app" - case .appEncryptionDeclaration: return "appEncryptionDeclaration" - case .appStoreVersion: return "appStoreVersion" - case .betaAppReviewSubmission: return "betaAppReviewSubmission" - case .betaBuildLocalizations: return "betaBuildLocalizations" - case .betaGroups: return "betaGroups" - case .buildAudienceType: return "buildAudienceType" - case .buildBetaDetail: return "buildBetaDetail" - case .buildBundles: return "buildBundles" - case .computedMinMacOsVersion: return "computedMinMacOsVersion" - case .diagnosticSignatures: return "diagnosticSignatures" - case .expirationDate: return "expirationDate" - case .expired: return "expired" - case .iconAssetToken: return "iconAssetToken" - case .icons: return "icons" - case .individualTesters: return "individualTesters" - case .lsMinimumSystemVersion: return "lsMinimumSystemVersion" - case .minOsVersion: return "minOsVersion" - case .perfPowerMetrics: return "perfPowerMetrics" - case .preReleaseVersion: return "preReleaseVersion" - case .processingState: return "processingState" - case .uploadedDate: return "uploadedDate" - case .usesNonExemptEncryption: return "usesNonExemptEncryption" - case .version: return "version" - case .unknown(let rawValue): return rawValue - } + public struct Builds: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var app: Self { + .init(rawValue: "app") + } + + public static var appEncryptionDeclaration: Self { + .init(rawValue: "appEncryptionDeclaration") + } + + public static var appStoreVersion: Self { + .init(rawValue: "appStoreVersion") + } + + public static var betaAppReviewSubmission: Self { + .init(rawValue: "betaAppReviewSubmission") + } + + public static var betaBuildLocalizations: Self { + .init(rawValue: "betaBuildLocalizations") + } + + public static var betaGroups: Self { + .init(rawValue: "betaGroups") + } + + public static var buildAudienceType: Self { + .init(rawValue: "buildAudienceType") + } + + public static var buildBetaDetail: Self { + .init(rawValue: "buildBetaDetail") + } + + public static var buildBundles: Self { + .init(rawValue: "buildBundles") + } + + public static var computedMinMacOsVersion: Self { + .init(rawValue: "computedMinMacOsVersion") + } + + public static var computedMinVisionOsVersion: Self { + .init(rawValue: "computedMinVisionOsVersion") + } + + public static var diagnosticSignatures: Self { + .init(rawValue: "diagnosticSignatures") } + public static var expirationDate: Self { + .init(rawValue: "expirationDate") + } + + public static var expired: Self { + .init(rawValue: "expired") + } + + public static var iconAssetToken: Self { + .init(rawValue: "iconAssetToken") + } + + public static var icons: Self { + .init(rawValue: "icons") + } + + public static var individualTesters: Self { + .init(rawValue: "individualTesters") + } + + public static var lsMinimumSystemVersion: Self { + .init(rawValue: "lsMinimumSystemVersion") + } + + public static var minOsVersion: Self { + .init(rawValue: "minOsVersion") + } + + public static var perfPowerMetrics: Self { + .init(rawValue: "perfPowerMetrics") + } + + public static var preReleaseVersion: Self { + .init(rawValue: "preReleaseVersion") + } + + public static var processingState: Self { + .init(rawValue: "processingState") + } + + public static var uploadedDate: Self { + .init(rawValue: "uploadedDate") + } + + public static var usesNonExemptEncryption: Self { + .init(rawValue: "usesNonExemptEncryption") + } + + public static var version: Self { + .init(rawValue: "version") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "app": self = .app - case "appEncryptionDeclaration": self = .appEncryptionDeclaration - case "appStoreVersion": self = .appStoreVersion - case "betaAppReviewSubmission": self = .betaAppReviewSubmission - case "betaBuildLocalizations": self = .betaBuildLocalizations - case "betaGroups": self = .betaGroups - case "buildAudienceType": self = .buildAudienceType - case "buildBetaDetail": self = .buildBetaDetail - case "buildBundles": self = .buildBundles - case "computedMinMacOsVersion": self = .computedMinMacOsVersion - case "diagnosticSignatures": self = .diagnosticSignatures - case "expirationDate": self = .expirationDate - case "expired": self = .expired - case "iconAssetToken": self = .iconAssetToken - case "icons": self = .icons - case "individualTesters": self = .individualTesters - case "lsMinimumSystemVersion": self = .lsMinimumSystemVersion - case "minOsVersion": self = .minOsVersion - case "perfPowerMetrics": self = .perfPowerMetrics - case "preReleaseVersion": self = .preReleaseVersion - case "processingState": self = .processingState - case "uploadedDate": self = .uploadedDate - case "usesNonExemptEncryption": self = .usesNonExemptEncryption - case "version": self = .version - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } @@ -255,22 +287,19 @@ extension V1.BuildBetaDetails.GET { } } - public enum Include: Hashable, Codable, RawRepresentable { - case build - case unknown(String) + public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var build: Self { + .init(rawValue: "build") + } - public var rawValue: String { - switch self { - case .build: return "build" - case .unknown(let rawValue): return rawValue - } + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "build": self = .build - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BuildBetaDetails/ById/BuildBetaDetailsById.GET.0d487b2.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BuildBetaDetails/ById/BuildBetaDetailsById.GET.0d487b2.generated.swift index 663a6938..a29402a5 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BuildBetaDetails/ById/BuildBetaDetailsById.GET.0d487b2.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BuildBetaDetails/ById/BuildBetaDetailsById.GET.0d487b2.generated.swift @@ -46,8 +46,10 @@ extension V1.BuildBetaDetails.ById { /// - Returns: **200**, Single BuildBetaDetail as `BuildBetaDetailResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -61,12 +63,18 @@ extension V1.BuildBetaDetails.ById { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 404: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -89,119 +97,143 @@ extension V1.BuildBetaDetails.ById.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum BuildBetaDetails: Hashable, Codable, RawRepresentable { - case autoNotifyEnabled - case build - case externalBuildState - case internalBuildState - case unknown(String) + public struct BuildBetaDetails: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var autoNotifyEnabled: Self { + .init(rawValue: "autoNotifyEnabled") + } + + public static var build: Self { + .init(rawValue: "build") + } + + public static var externalBuildState: Self { + .init(rawValue: "externalBuildState") + } - public var rawValue: String { - switch self { - case .autoNotifyEnabled: return "autoNotifyEnabled" - case .build: return "build" - case .externalBuildState: return "externalBuildState" - case .internalBuildState: return "internalBuildState" - case .unknown(let rawValue): return rawValue - } + public static var internalBuildState: Self { + .init(rawValue: "internalBuildState") } + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "autoNotifyEnabled": self = .autoNotifyEnabled - case "build": self = .build - case "externalBuildState": self = .externalBuildState - case "internalBuildState": self = .internalBuildState - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum Builds: Hashable, Codable, RawRepresentable { - case app - case appEncryptionDeclaration - case appStoreVersion - case betaAppReviewSubmission - case betaBuildLocalizations - case betaGroups - case buildAudienceType - case buildBetaDetail - case buildBundles - case computedMinMacOsVersion - case diagnosticSignatures - case expirationDate - case expired - case iconAssetToken - case icons - case individualTesters - case lsMinimumSystemVersion - case minOsVersion - case perfPowerMetrics - case preReleaseVersion - case processingState - case uploadedDate - case usesNonExemptEncryption - case version - case unknown(String) - - public var rawValue: String { - switch self { - case .app: return "app" - case .appEncryptionDeclaration: return "appEncryptionDeclaration" - case .appStoreVersion: return "appStoreVersion" - case .betaAppReviewSubmission: return "betaAppReviewSubmission" - case .betaBuildLocalizations: return "betaBuildLocalizations" - case .betaGroups: return "betaGroups" - case .buildAudienceType: return "buildAudienceType" - case .buildBetaDetail: return "buildBetaDetail" - case .buildBundles: return "buildBundles" - case .computedMinMacOsVersion: return "computedMinMacOsVersion" - case .diagnosticSignatures: return "diagnosticSignatures" - case .expirationDate: return "expirationDate" - case .expired: return "expired" - case .iconAssetToken: return "iconAssetToken" - case .icons: return "icons" - case .individualTesters: return "individualTesters" - case .lsMinimumSystemVersion: return "lsMinimumSystemVersion" - case .minOsVersion: return "minOsVersion" - case .perfPowerMetrics: return "perfPowerMetrics" - case .preReleaseVersion: return "preReleaseVersion" - case .processingState: return "processingState" - case .uploadedDate: return "uploadedDate" - case .usesNonExemptEncryption: return "usesNonExemptEncryption" - case .version: return "version" - case .unknown(let rawValue): return rawValue - } + public struct Builds: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var app: Self { + .init(rawValue: "app") + } + + public static var appEncryptionDeclaration: Self { + .init(rawValue: "appEncryptionDeclaration") + } + + public static var appStoreVersion: Self { + .init(rawValue: "appStoreVersion") + } + + public static var betaAppReviewSubmission: Self { + .init(rawValue: "betaAppReviewSubmission") + } + + public static var betaBuildLocalizations: Self { + .init(rawValue: "betaBuildLocalizations") + } + + public static var betaGroups: Self { + .init(rawValue: "betaGroups") + } + + public static var buildAudienceType: Self { + .init(rawValue: "buildAudienceType") + } + + public static var buildBetaDetail: Self { + .init(rawValue: "buildBetaDetail") + } + + public static var buildBundles: Self { + .init(rawValue: "buildBundles") + } + + public static var computedMinMacOsVersion: Self { + .init(rawValue: "computedMinMacOsVersion") + } + + public static var computedMinVisionOsVersion: Self { + .init(rawValue: "computedMinVisionOsVersion") + } + + public static var diagnosticSignatures: Self { + .init(rawValue: "diagnosticSignatures") } + public static var expirationDate: Self { + .init(rawValue: "expirationDate") + } + + public static var expired: Self { + .init(rawValue: "expired") + } + + public static var iconAssetToken: Self { + .init(rawValue: "iconAssetToken") + } + + public static var icons: Self { + .init(rawValue: "icons") + } + + public static var individualTesters: Self { + .init(rawValue: "individualTesters") + } + + public static var lsMinimumSystemVersion: Self { + .init(rawValue: "lsMinimumSystemVersion") + } + + public static var minOsVersion: Self { + .init(rawValue: "minOsVersion") + } + + public static var perfPowerMetrics: Self { + .init(rawValue: "perfPowerMetrics") + } + + public static var preReleaseVersion: Self { + .init(rawValue: "preReleaseVersion") + } + + public static var processingState: Self { + .init(rawValue: "processingState") + } + + public static var uploadedDate: Self { + .init(rawValue: "uploadedDate") + } + + public static var usesNonExemptEncryption: Self { + .init(rawValue: "usesNonExemptEncryption") + } + + public static var version: Self { + .init(rawValue: "version") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "app": self = .app - case "appEncryptionDeclaration": self = .appEncryptionDeclaration - case "appStoreVersion": self = .appStoreVersion - case "betaAppReviewSubmission": self = .betaAppReviewSubmission - case "betaBuildLocalizations": self = .betaBuildLocalizations - case "betaGroups": self = .betaGroups - case "buildAudienceType": self = .buildAudienceType - case "buildBetaDetail": self = .buildBetaDetail - case "buildBundles": self = .buildBundles - case "computedMinMacOsVersion": self = .computedMinMacOsVersion - case "diagnosticSignatures": self = .diagnosticSignatures - case "expirationDate": self = .expirationDate - case "expired": self = .expired - case "iconAssetToken": self = .iconAssetToken - case "icons": self = .icons - case "individualTesters": self = .individualTesters - case "lsMinimumSystemVersion": self = .lsMinimumSystemVersion - case "minOsVersion": self = .minOsVersion - case "perfPowerMetrics": self = .perfPowerMetrics - case "preReleaseVersion": self = .preReleaseVersion - case "processingState": self = .processingState - case "uploadedDate": self = .uploadedDate - case "usesNonExemptEncryption": self = .usesNonExemptEncryption - case "version": self = .version - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } @@ -224,22 +256,19 @@ extension V1.BuildBetaDetails.ById.GET { } } - public enum Include: Hashable, Codable, RawRepresentable { - case build - case unknown(String) + public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var build: Self { + .init(rawValue: "build") + } - public var rawValue: String { - switch self { - case .build: return "build" - case .unknown(let rawValue): return rawValue - } + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "build": self = .build - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BuildBetaDetails/ById/BuildBetaDetailsById.PATCH.0d487b2.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BuildBetaDetails/ById/BuildBetaDetailsById.PATCH.0d487b2.generated.swift index ae1e5402..bb8cde32 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BuildBetaDetails/ById/BuildBetaDetailsById.PATCH.0d487b2.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BuildBetaDetails/ById/BuildBetaDetailsById.PATCH.0d487b2.generated.swift @@ -48,9 +48,12 @@ extension V1.BuildBetaDetails.ById { /// - Returns: **200**, Single BuildBetaDetail as `BuildBetaDetailResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **422**, Unprocessable request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -64,6 +67,9 @@ extension V1.BuildBetaDetails.ById { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) @@ -73,6 +79,12 @@ extension V1.BuildBetaDetails.ById { case 409: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 422: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BuildBetaNotifications/BuildBetaNotifications.POST.d0f3109.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BuildBetaNotifications/BuildBetaNotifications.POST.d0f3109.generated.swift index a3aca7b0..925af867 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BuildBetaNotifications/BuildBetaNotifications.POST.d0f3109.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BuildBetaNotifications/BuildBetaNotifications.POST.d0f3109.generated.swift @@ -41,8 +41,11 @@ extension V1.BuildBetaNotifications { /// - Returns: **201**, Single BuildBetaNotification as `BuildBetaNotificationResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **422**, Unprocessable request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -56,12 +59,21 @@ extension V1.BuildBetaNotifications { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 409: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 422: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BuildBundles/ById/AppClipDomainCacheStatus/BuildBundlesByIdAppClipDomainCacheStatus.GET.b82a4a8.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BuildBundles/ById/AppClipDomainCacheStatus/BuildBundlesByIdAppClipDomainCacheStatus.GET.b82a4a8.generated.swift index ecede805..37dbcc9c 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BuildBundles/ById/AppClipDomainCacheStatus/BuildBundlesByIdAppClipDomainCacheStatus.GET.b82a4a8.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BuildBundles/ById/AppClipDomainCacheStatus/BuildBundlesByIdAppClipDomainCacheStatus.GET.b82a4a8.generated.swift @@ -42,8 +42,10 @@ extension V1.BuildBundles.ById.AppClipDomainCacheStatus { /// - Returns: **200**, Single AppClipDomainStatus as `AppClipDomainStatusResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -57,12 +59,18 @@ extension V1.BuildBundles.ById.AppClipDomainCacheStatus { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 404: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -82,25 +90,23 @@ extension V1.BuildBundles.ById.AppClipDomainCacheStatus.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum AppClipDomainStatuses: Hashable, Codable, RawRepresentable { - case domains - case lastUpdatedDate - case unknown(String) - - public var rawValue: String { - switch self { - case .domains: return "domains" - case .lastUpdatedDate: return "lastUpdatedDate" - case .unknown(let rawValue): return rawValue - } + public struct AppClipDomainStatuses: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var domains: Self { + .init(rawValue: "domains") } + public static var lastUpdatedDate: Self { + .init(rawValue: "lastUpdatedDate") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "domains": self = .domains - case "lastUpdatedDate": self = .lastUpdatedDate - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BuildBundles/ById/AppClipDomainDebugStatus/BuildBundlesByIdAppClipDomainDebugStatus.GET.50671f8.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BuildBundles/ById/AppClipDomainDebugStatus/BuildBundlesByIdAppClipDomainDebugStatus.GET.50671f8.generated.swift index ba909f9d..bd8048d5 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BuildBundles/ById/AppClipDomainDebugStatus/BuildBundlesByIdAppClipDomainDebugStatus.GET.50671f8.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BuildBundles/ById/AppClipDomainDebugStatus/BuildBundlesByIdAppClipDomainDebugStatus.GET.50671f8.generated.swift @@ -42,8 +42,10 @@ extension V1.BuildBundles.ById.AppClipDomainDebugStatus { /// - Returns: **200**, Single AppClipDomainStatus as `AppClipDomainStatusResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -57,12 +59,18 @@ extension V1.BuildBundles.ById.AppClipDomainDebugStatus { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 404: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -82,25 +90,23 @@ extension V1.BuildBundles.ById.AppClipDomainDebugStatus.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum AppClipDomainStatuses: Hashable, Codable, RawRepresentable { - case domains - case lastUpdatedDate - case unknown(String) - - public var rawValue: String { - switch self { - case .domains: return "domains" - case .lastUpdatedDate: return "lastUpdatedDate" - case .unknown(let rawValue): return rawValue - } + public struct AppClipDomainStatuses: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var domains: Self { + .init(rawValue: "domains") } + public static var lastUpdatedDate: Self { + .init(rawValue: "lastUpdatedDate") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "domains": self = .domains - case "lastUpdatedDate": self = .lastUpdatedDate - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BuildBundles/ById/BetaAppClipInvocations/BuildBundlesByIdBetaAppClipInvocations.GET.aab33f0.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BuildBundles/ById/BetaAppClipInvocations/BuildBundlesByIdBetaAppClipInvocations.GET.aab33f0.generated.swift index 590acea9..a39d8e51 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BuildBundles/ById/BetaAppClipInvocations/BuildBundlesByIdBetaAppClipInvocations.GET.aab33f0.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BuildBundles/ById/BetaAppClipInvocations/BuildBundlesByIdBetaAppClipInvocations.GET.aab33f0.generated.swift @@ -50,8 +50,10 @@ extension V1.BuildBundles.ById.BetaAppClipInvocations { /// - Returns: **200**, List of BetaAppClipInvocations as `BetaAppClipInvocationsResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -65,12 +67,18 @@ extension V1.BuildBundles.ById.BetaAppClipInvocations { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 404: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -96,53 +104,43 @@ extension V1.BuildBundles.ById.BetaAppClipInvocations.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum BetaAppClipInvocationLocalizations: Hashable, Codable, RawRepresentable { - case betaAppClipInvocation - case locale - case title - case unknown(String) - - public var rawValue: String { - switch self { - case .betaAppClipInvocation: return "betaAppClipInvocation" - case .locale: return "locale" - case .title: return "title" - case .unknown(let rawValue): return rawValue - } + public struct BetaAppClipInvocationLocalizations: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var locale: Self { + .init(rawValue: "locale") } + public static var title: Self { + .init(rawValue: "title") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "betaAppClipInvocation": self = .betaAppClipInvocation - case "locale": self = .locale - case "title": self = .title - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum BetaAppClipInvocations: Hashable, Codable, RawRepresentable { - case betaAppClipInvocationLocalizations - case buildBundle - case url - case unknown(String) - - public var rawValue: String { - switch self { - case .betaAppClipInvocationLocalizations: return "betaAppClipInvocationLocalizations" - case .buildBundle: return "buildBundle" - case .url: return "url" - case .unknown(let rawValue): return rawValue - } + public struct BetaAppClipInvocations: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var betaAppClipInvocationLocalizations: Self { + .init(rawValue: "betaAppClipInvocationLocalizations") } + public static var url: Self { + .init(rawValue: "url") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "betaAppClipInvocationLocalizations": self = .betaAppClipInvocationLocalizations - case "buildBundle": self = .buildBundle - case "url": self = .url - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } @@ -165,22 +163,19 @@ extension V1.BuildBundles.ById.BetaAppClipInvocations.GET { } } - public enum Include: Hashable, Codable, RawRepresentable { - case betaAppClipInvocationLocalizations - case unknown(String) + public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var betaAppClipInvocationLocalizations: Self { + .init(rawValue: "betaAppClipInvocationLocalizations") + } - public var rawValue: String { - switch self { - case .betaAppClipInvocationLocalizations: return "betaAppClipInvocationLocalizations" - case .unknown(let rawValue): return rawValue - } + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "betaAppClipInvocationLocalizations": self = .betaAppClipInvocationLocalizations - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BuildBundles/ById/BuildBundleFileSizes/BuildBundlesByIdBuildBundleFileSizes.GET.4cd28f0.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BuildBundles/ById/BuildBundleFileSizes/BuildBundlesByIdBuildBundleFileSizes.GET.4cd28f0.generated.swift index a0b12773..ad3897cc 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BuildBundles/ById/BuildBundleFileSizes/BuildBundlesByIdBuildBundleFileSizes.GET.4cd28f0.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BuildBundles/ById/BuildBundleFileSizes/BuildBundlesByIdBuildBundleFileSizes.GET.4cd28f0.generated.swift @@ -44,8 +44,10 @@ extension V1.BuildBundles.ById.BuildBundleFileSizes { /// - Returns: **200**, List of BuildBundleFileSizes as `BuildBundleFileSizesResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -59,12 +61,18 @@ extension V1.BuildBundles.ById.BuildBundleFileSizes { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 404: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -87,31 +95,31 @@ extension V1.BuildBundles.ById.BuildBundleFileSizes.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum BuildBundleFileSizes: Hashable, Codable, RawRepresentable { - case deviceModel - case downloadBytes - case installBytes - case osVersion - case unknown(String) - - public var rawValue: String { - switch self { - case .deviceModel: return "deviceModel" - case .downloadBytes: return "downloadBytes" - case .installBytes: return "installBytes" - case .osVersion: return "osVersion" - case .unknown(let rawValue): return rawValue - } + public struct BuildBundleFileSizes: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var deviceModel: Self { + .init(rawValue: "deviceModel") } + public static var downloadBytes: Self { + .init(rawValue: "downloadBytes") + } + + public static var installBytes: Self { + .init(rawValue: "installBytes") + } + + public static var osVersion: Self { + .init(rawValue: "osVersion") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "deviceModel": self = .deviceModel - case "downloadBytes": self = .downloadBytes - case "installBytes": self = .installBytes - case "osVersion": self = .osVersion - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BuildBundles/ById/Relationships/AppClipDomainCacheStatus/BuildBundlesByIdRelationshipsAppClipDomainCacheStatus.GET.73cfe9b.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BuildBundles/ById/Relationships/AppClipDomainCacheStatus/BuildBundlesByIdRelationshipsAppClipDomainCacheStatus.GET.73cfe9b.generated.swift new file mode 100644 index 00000000..9c562e78 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BuildBundles/ById/Relationships/AppClipDomainCacheStatus/BuildBundlesByIdRelationshipsAppClipDomainCacheStatus.GET.73cfe9b.generated.swift @@ -0,0 +1,86 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.BuildBundles.ById.Relationships.AppClipDomainCacheStatus { + public struct GET: Endpoint { + public typealias Response = BuildBundleAppClipDomainCacheStatusLinkageResponse + + public var path: String { + "/v1/buildBundles/\(id)/relationships/appClipDomainCacheStatus" + } + + /// the id of the requested resource + public var id: String + + public var parameters: Parameters = Parameters() + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + components?.queryItems = [ + + ].filter { $0.value != nil } + if components?.queryItems?.isEmpty ?? false { + components?.queryItems = nil + } + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "GET" + return urlRequest + } + + /// - Returns: **200**, Related linkage as `BuildBundleAppClipDomainCacheStatusLinkageResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(BuildBundleAppClipDomainCacheStatusLinkageResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +extension V1.BuildBundles.ById.Relationships.AppClipDomainCacheStatus.GET { + public struct Parameters: Hashable { + + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BuildBundles/ById/Relationships/AppClipDomainDebugStatus/BuildBundlesByIdRelationshipsAppClipDomainDebugStatus.GET.a611700.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BuildBundles/ById/Relationships/AppClipDomainDebugStatus/BuildBundlesByIdRelationshipsAppClipDomainDebugStatus.GET.a611700.generated.swift new file mode 100644 index 00000000..550fa46d --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BuildBundles/ById/Relationships/AppClipDomainDebugStatus/BuildBundlesByIdRelationshipsAppClipDomainDebugStatus.GET.a611700.generated.swift @@ -0,0 +1,86 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.BuildBundles.ById.Relationships.AppClipDomainDebugStatus { + public struct GET: Endpoint { + public typealias Response = BuildBundleAppClipDomainDebugStatusLinkageResponse + + public var path: String { + "/v1/buildBundles/\(id)/relationships/appClipDomainDebugStatus" + } + + /// the id of the requested resource + public var id: String + + public var parameters: Parameters = Parameters() + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + components?.queryItems = [ + + ].filter { $0.value != nil } + if components?.queryItems?.isEmpty ?? false { + components?.queryItems = nil + } + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "GET" + return urlRequest + } + + /// - Returns: **200**, Related linkage as `BuildBundleAppClipDomainDebugStatusLinkageResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(BuildBundleAppClipDomainDebugStatusLinkageResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +extension V1.BuildBundles.ById.Relationships.AppClipDomainDebugStatus.GET { + public struct Parameters: Hashable { + + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BuildBundles/ById/Relationships/BetaAppClipInvocations/BuildBundlesByIdRelationshipsBetaAppClipInvocations.GET.04d4dbe.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BuildBundles/ById/Relationships/BetaAppClipInvocations/BuildBundlesByIdRelationshipsBetaAppClipInvocations.GET.04d4dbe.generated.swift new file mode 100644 index 00000000..393818b6 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BuildBundles/ById/Relationships/BetaAppClipInvocations/BuildBundlesByIdRelationshipsBetaAppClipInvocations.GET.04d4dbe.generated.swift @@ -0,0 +1,88 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.BuildBundles.ById.Relationships.BetaAppClipInvocations { + public struct GET: Endpoint { + public typealias Response = BuildBundleBetaAppClipInvocationsLinkagesResponse + + public var path: String { + "/v1/buildBundles/\(id)/relationships/betaAppClipInvocations" + } + + /// the id of the requested resource + public var id: String + + public var parameters: Parameters = Parameters() + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + components?.queryItems = [ + URLQueryItem(name: "limit", + value: parameters.limit.map { "\($0)" }) + ].filter { $0.value != nil } + if components?.queryItems?.isEmpty ?? false { + components?.queryItems = nil + } + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "GET" + return urlRequest + } + + /// - Returns: **200**, List of related linkages as `BuildBundleBetaAppClipInvocationsLinkagesResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(BuildBundleBetaAppClipInvocationsLinkagesResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +extension V1.BuildBundles.ById.Relationships.BetaAppClipInvocations.GET { + public struct Parameters: Hashable { + /// maximum resources per page + public var limit: Int? + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BuildBundles/ById/Relationships/BuildBundleFileSizes/BuildBundlesByIdRelationshipsBuildBundleFileSizes.GET.767e45c.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BuildBundles/ById/Relationships/BuildBundleFileSizes/BuildBundlesByIdRelationshipsBuildBundleFileSizes.GET.767e45c.generated.swift new file mode 100644 index 00000000..2f0a858c --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BuildBundles/ById/Relationships/BuildBundleFileSizes/BuildBundlesByIdRelationshipsBuildBundleFileSizes.GET.767e45c.generated.swift @@ -0,0 +1,88 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.BuildBundles.ById.Relationships.BuildBundleFileSizes { + public struct GET: Endpoint { + public typealias Response = BuildBundleBuildBundleFileSizesLinkagesResponse + + public var path: String { + "/v1/buildBundles/\(id)/relationships/buildBundleFileSizes" + } + + /// the id of the requested resource + public var id: String + + public var parameters: Parameters = Parameters() + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + components?.queryItems = [ + URLQueryItem(name: "limit", + value: parameters.limit.map { "\($0)" }) + ].filter { $0.value != nil } + if components?.queryItems?.isEmpty ?? false { + components?.queryItems = nil + } + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "GET" + return urlRequest + } + + /// - Returns: **200**, List of related linkages as `BuildBundleBuildBundleFileSizesLinkagesResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(BuildBundleBuildBundleFileSizesLinkagesResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +extension V1.BuildBundles.ById.Relationships.BuildBundleFileSizes.GET { + public struct Parameters: Hashable { + /// maximum resources per page + public var limit: Int? + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Builds/Builds.GET.b0093ba.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Builds/Builds.GET.b0093ba.generated.swift index bf10af69..6d940bab 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Builds/Builds.GET.b0093ba.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Builds/Builds.GET.b0093ba.generated.swift @@ -25,6 +25,8 @@ extension V1.Builds { components?.path = path components?.queryItems = [ + URLQueryItem(name: "exists[usesNonExemptEncryption]", + value: parameters.exists[.usesNonExemptEncryption].map { "\($0)" }), URLQueryItem(name: "fields[appEncryptionDeclarations]", value: parameters.fields[.appEncryptionDeclarations]?.map { "\($0)" }.joined(separator: ",")), URLQueryItem(name: "fields[appStoreVersions]", @@ -43,10 +45,6 @@ extension V1.Builds { value: parameters.fields[.buildIcons]?.map { "\($0)" }.joined(separator: ",")), URLQueryItem(name: "fields[builds]", value: parameters.fields[.builds]?.map { "\($0)" }.joined(separator: ",")), - URLQueryItem(name: "fields[diagnosticSignatures]", - value: parameters.fields[.diagnosticSignatures]?.map { "\($0)" }.joined(separator: ",")), - URLQueryItem(name: "fields[perfPowerMetrics]", - value: parameters.fields[.perfPowerMetrics]?.map { "\($0)" }.joined(separator: ",")), URLQueryItem(name: "fields[preReleaseVersions]", value: parameters.fields[.preReleaseVersions]?.map { "\($0)" }.joined(separator: ",")), URLQueryItem(name: "filter[appStoreVersion]", @@ -103,7 +101,9 @@ extension V1.Builds { /// - Returns: **200**, List of Builds as `BuildsResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -117,9 +117,15 @@ extension V1.Builds { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -129,6 +135,8 @@ extension V1.Builds { extension V1.Builds.GET { public struct Parameters: Hashable { + public var exists: Exists = Exists() + public var fields: Fields = Fields() public var filter: Filter = Filter() @@ -142,7 +150,7 @@ extension V1.Builds.GET { /// comma-separated list of sort expressions; resources will be sorted as specified public var sort: [Sort]? - public struct Fields: Hashable { + public struct Exists: Hashable { public subscript (_ relation: Relation) -> T { get { values[relation]?.base as! T } set { values[relation] = AnyHashable(newValue) } @@ -150,603 +158,713 @@ extension V1.Builds.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum AppEncryptionDeclarations: Hashable, Codable, RawRepresentable { - case app - case appDescription - case appEncryptionDeclarationDocument - case appEncryptionDeclarationState - case availableOnFrenchStore - case builds - case codeValue - case containsProprietaryCryptography - case containsThirdPartyCryptography - case createdDate - case documentName - case documentType - case documentUrl - case exempt - case platform - case uploadedDate - case usesEncryption - case unknown(String) - - public var rawValue: String { - switch self { - case .app: return "app" - case .appDescription: return "appDescription" - case .appEncryptionDeclarationDocument: return "appEncryptionDeclarationDocument" - case .appEncryptionDeclarationState: return "appEncryptionDeclarationState" - case .availableOnFrenchStore: return "availableOnFrenchStore" - case .builds: return "builds" - case .codeValue: return "codeValue" - case .containsProprietaryCryptography: return "containsProprietaryCryptography" - case .containsThirdPartyCryptography: return "containsThirdPartyCryptography" - case .createdDate: return "createdDate" - case .documentName: return "documentName" - case .documentType: return "documentType" - case .documentUrl: return "documentUrl" - case .exempt: return "exempt" - case .platform: return "platform" - case .uploadedDate: return "uploadedDate" - case .usesEncryption: return "usesEncryption" - case .unknown(let rawValue): return rawValue - } + public struct Relation: Hashable { + /// filter by attribute 'usesNonExemptEncryption' + public static var usesNonExemptEncryption: Relation { + .init(key: "exists[usesNonExemptEncryption]") } - public init(rawValue: String) { - switch rawValue { - case "app": self = .app - case "appDescription": self = .appDescription - case "appEncryptionDeclarationDocument": self = .appEncryptionDeclarationDocument - case "appEncryptionDeclarationState": self = .appEncryptionDeclarationState - case "availableOnFrenchStore": self = .availableOnFrenchStore - case "builds": self = .builds - case "codeValue": self = .codeValue - case "containsProprietaryCryptography": self = .containsProprietaryCryptography - case "containsThirdPartyCryptography": self = .containsThirdPartyCryptography - case "createdDate": self = .createdDate - case "documentName": self = .documentName - case "documentType": self = .documentType - case "documentUrl": self = .documentUrl - case "exempt": self = .exempt - case "platform": self = .platform - case "uploadedDate": self = .uploadedDate - case "usesEncryption": self = .usesEncryption - default: self = .unknown(rawValue) - } + internal let key: String + + public func hash(into hasher: inout Hasher) { + hasher.combine(key) } } + } + + public struct Fields: Hashable { + public subscript (_ relation: Relation) -> T { + get { values[relation]?.base as! T } + set { values[relation] = AnyHashable(newValue) } + } + + private var values: [AnyHashable: AnyHashable] = [:] - public enum AppStoreVersions: Hashable, Codable, RawRepresentable { - case ageRatingDeclaration - case app - case appClipDefaultExperience - case appStoreReviewDetail - case appStoreState - case appStoreVersionExperiments - case appStoreVersionExperimentsV2 - case appStoreVersionLocalizations - case appStoreVersionPhasedRelease - case appStoreVersionSubmission - case build - case copyright - case createdDate - case customerReviews - case downloadable - case earliestReleaseDate - case platform - case releaseType - case routingAppCoverage - case versionString - case unknown(String) - - public var rawValue: String { - switch self { - case .ageRatingDeclaration: return "ageRatingDeclaration" - case .app: return "app" - case .appClipDefaultExperience: return "appClipDefaultExperience" - case .appStoreReviewDetail: return "appStoreReviewDetail" - case .appStoreState: return "appStoreState" - case .appStoreVersionExperiments: return "appStoreVersionExperiments" - case .appStoreVersionExperimentsV2: return "appStoreVersionExperimentsV2" - case .appStoreVersionLocalizations: return "appStoreVersionLocalizations" - case .appStoreVersionPhasedRelease: return "appStoreVersionPhasedRelease" - case .appStoreVersionSubmission: return "appStoreVersionSubmission" - case .build: return "build" - case .copyright: return "copyright" - case .createdDate: return "createdDate" - case .customerReviews: return "customerReviews" - case .downloadable: return "downloadable" - case .earliestReleaseDate: return "earliestReleaseDate" - case .platform: return "platform" - case .releaseType: return "releaseType" - case .routingAppCoverage: return "routingAppCoverage" - case .versionString: return "versionString" - case .unknown(let rawValue): return rawValue - } + public struct AppEncryptionDeclarations: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var app: Self { + .init(rawValue: "app") } - public init(rawValue: String) { - switch rawValue { - case "ageRatingDeclaration": self = .ageRatingDeclaration - case "app": self = .app - case "appClipDefaultExperience": self = .appClipDefaultExperience - case "appStoreReviewDetail": self = .appStoreReviewDetail - case "appStoreState": self = .appStoreState - case "appStoreVersionExperiments": self = .appStoreVersionExperiments - case "appStoreVersionExperimentsV2": self = .appStoreVersionExperimentsV2 - case "appStoreVersionLocalizations": self = .appStoreVersionLocalizations - case "appStoreVersionPhasedRelease": self = .appStoreVersionPhasedRelease - case "appStoreVersionSubmission": self = .appStoreVersionSubmission - case "build": self = .build - case "copyright": self = .copyright - case "createdDate": self = .createdDate - case "customerReviews": self = .customerReviews - case "downloadable": self = .downloadable - case "earliestReleaseDate": self = .earliestReleaseDate - case "platform": self = .platform - case "releaseType": self = .releaseType - case "routingAppCoverage": self = .routingAppCoverage - case "versionString": self = .versionString - default: self = .unknown(rawValue) - } + public static var appDescription: Self { + .init(rawValue: "appDescription") + } + + public static var appEncryptionDeclarationDocument: Self { + .init(rawValue: "appEncryptionDeclarationDocument") + } + + public static var appEncryptionDeclarationState: Self { + .init(rawValue: "appEncryptionDeclarationState") + } + + public static var availableOnFrenchStore: Self { + .init(rawValue: "availableOnFrenchStore") + } + + public static var builds: Self { + .init(rawValue: "builds") + } + + public static var codeValue: Self { + .init(rawValue: "codeValue") + } + + public static var containsProprietaryCryptography: Self { + .init(rawValue: "containsProprietaryCryptography") + } + + public static var containsThirdPartyCryptography: Self { + .init(rawValue: "containsThirdPartyCryptography") + } + + public static var createdDate: Self { + .init(rawValue: "createdDate") + } + + public static var documentName: Self { + .init(rawValue: "documentName") + } + + public static var documentType: Self { + .init(rawValue: "documentType") + } + + public static var documentUrl: Self { + .init(rawValue: "documentUrl") + } + + public static var exempt: Self { + .init(rawValue: "exempt") } - } - public enum Apps: Hashable, Codable, RawRepresentable { - case appAvailability - case appClips - case appCustomProductPages - case appEncryptionDeclarations - case appEvents - case appInfos - case appPricePoints - case appPriceSchedule - case appStoreVersionExperimentsV2 - case appStoreVersions - case availableInNewTerritories - case availableTerritories - case betaAppLocalizations - case betaAppReviewDetail - case betaGroups - case betaLicenseAgreement - case betaTesters - case builds - case bundleId - case ciProduct - case contentRightsDeclaration - case customerReviews - case endUserLicenseAgreement - case gameCenterDetail - case gameCenterEnabledVersions - case inAppPurchases - case inAppPurchasesV2 - case isOrEverWasMadeForKids - case name - case perfPowerMetrics - case preOrder - case preReleaseVersions - case pricePoints - case prices - case primaryLocale - case promotedPurchases - case reviewSubmissions - case sku - case subscriptionGracePeriod - case subscriptionGroups - case subscriptionStatusUrl - case subscriptionStatusUrlForSandbox - case subscriptionStatusUrlVersion - case subscriptionStatusUrlVersionForSandbox - case unknown(String) - - public var rawValue: String { - switch self { - case .appAvailability: return "appAvailability" - case .appClips: return "appClips" - case .appCustomProductPages: return "appCustomProductPages" - case .appEncryptionDeclarations: return "appEncryptionDeclarations" - case .appEvents: return "appEvents" - case .appInfos: return "appInfos" - case .appPricePoints: return "appPricePoints" - case .appPriceSchedule: return "appPriceSchedule" - case .appStoreVersionExperimentsV2: return "appStoreVersionExperimentsV2" - case .appStoreVersions: return "appStoreVersions" - case .availableInNewTerritories: return "availableInNewTerritories" - case .availableTerritories: return "availableTerritories" - case .betaAppLocalizations: return "betaAppLocalizations" - case .betaAppReviewDetail: return "betaAppReviewDetail" - case .betaGroups: return "betaGroups" - case .betaLicenseAgreement: return "betaLicenseAgreement" - case .betaTesters: return "betaTesters" - case .builds: return "builds" - case .bundleId: return "bundleId" - case .ciProduct: return "ciProduct" - case .contentRightsDeclaration: return "contentRightsDeclaration" - case .customerReviews: return "customerReviews" - case .endUserLicenseAgreement: return "endUserLicenseAgreement" - case .gameCenterDetail: return "gameCenterDetail" - case .gameCenterEnabledVersions: return "gameCenterEnabledVersions" - case .inAppPurchases: return "inAppPurchases" - case .inAppPurchasesV2: return "inAppPurchasesV2" - case .isOrEverWasMadeForKids: return "isOrEverWasMadeForKids" - case .name: return "name" - case .perfPowerMetrics: return "perfPowerMetrics" - case .preOrder: return "preOrder" - case .preReleaseVersions: return "preReleaseVersions" - case .pricePoints: return "pricePoints" - case .prices: return "prices" - case .primaryLocale: return "primaryLocale" - case .promotedPurchases: return "promotedPurchases" - case .reviewSubmissions: return "reviewSubmissions" - case .sku: return "sku" - case .subscriptionGracePeriod: return "subscriptionGracePeriod" - case .subscriptionGroups: return "subscriptionGroups" - case .subscriptionStatusUrl: return "subscriptionStatusUrl" - case .subscriptionStatusUrlForSandbox: return "subscriptionStatusUrlForSandbox" - case .subscriptionStatusUrlVersion: return "subscriptionStatusUrlVersion" - case .subscriptionStatusUrlVersionForSandbox: return "subscriptionStatusUrlVersionForSandbox" - case .unknown(let rawValue): return rawValue - } + public static var platform: Self { + .init(rawValue: "platform") } + public static var uploadedDate: Self { + .init(rawValue: "uploadedDate") + } + + public static var usesEncryption: Self { + .init(rawValue: "usesEncryption") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "appAvailability": self = .appAvailability - case "appClips": self = .appClips - case "appCustomProductPages": self = .appCustomProductPages - case "appEncryptionDeclarations": self = .appEncryptionDeclarations - case "appEvents": self = .appEvents - case "appInfos": self = .appInfos - case "appPricePoints": self = .appPricePoints - case "appPriceSchedule": self = .appPriceSchedule - case "appStoreVersionExperimentsV2": self = .appStoreVersionExperimentsV2 - case "appStoreVersions": self = .appStoreVersions - case "availableInNewTerritories": self = .availableInNewTerritories - case "availableTerritories": self = .availableTerritories - case "betaAppLocalizations": self = .betaAppLocalizations - case "betaAppReviewDetail": self = .betaAppReviewDetail - case "betaGroups": self = .betaGroups - case "betaLicenseAgreement": self = .betaLicenseAgreement - case "betaTesters": self = .betaTesters - case "builds": self = .builds - case "bundleId": self = .bundleId - case "ciProduct": self = .ciProduct - case "contentRightsDeclaration": self = .contentRightsDeclaration - case "customerReviews": self = .customerReviews - case "endUserLicenseAgreement": self = .endUserLicenseAgreement - case "gameCenterDetail": self = .gameCenterDetail - case "gameCenterEnabledVersions": self = .gameCenterEnabledVersions - case "inAppPurchases": self = .inAppPurchases - case "inAppPurchasesV2": self = .inAppPurchasesV2 - case "isOrEverWasMadeForKids": self = .isOrEverWasMadeForKids - case "name": self = .name - case "perfPowerMetrics": self = .perfPowerMetrics - case "preOrder": self = .preOrder - case "preReleaseVersions": self = .preReleaseVersions - case "pricePoints": self = .pricePoints - case "prices": self = .prices - case "primaryLocale": self = .primaryLocale - case "promotedPurchases": self = .promotedPurchases - case "reviewSubmissions": self = .reviewSubmissions - case "sku": self = .sku - case "subscriptionGracePeriod": self = .subscriptionGracePeriod - case "subscriptionGroups": self = .subscriptionGroups - case "subscriptionStatusUrl": self = .subscriptionStatusUrl - case "subscriptionStatusUrlForSandbox": self = .subscriptionStatusUrlForSandbox - case "subscriptionStatusUrlVersion": self = .subscriptionStatusUrlVersion - case "subscriptionStatusUrlVersionForSandbox": self = .subscriptionStatusUrlVersionForSandbox - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum BetaAppReviewSubmissions: Hashable, Codable, RawRepresentable { - case betaReviewState - case build - case submittedDate - case unknown(String) + public struct AppStoreVersions: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var ageRatingDeclaration: Self { + .init(rawValue: "ageRatingDeclaration") + } + + public static var alternativeDistributionPackage: Self { + .init(rawValue: "alternativeDistributionPackage") + } + + public static var app: Self { + .init(rawValue: "app") + } + + public static var appClipDefaultExperience: Self { + .init(rawValue: "appClipDefaultExperience") + } + + public static var appStoreReviewDetail: Self { + .init(rawValue: "appStoreReviewDetail") + } + + public static var appStoreState: Self { + .init(rawValue: "appStoreState") + } + + public static var appStoreVersionExperiments: Self { + .init(rawValue: "appStoreVersionExperiments") + } + + public static var appStoreVersionExperimentsV2: Self { + .init(rawValue: "appStoreVersionExperimentsV2") + } + + public static var appStoreVersionLocalizations: Self { + .init(rawValue: "appStoreVersionLocalizations") + } + + public static var appStoreVersionPhasedRelease: Self { + .init(rawValue: "appStoreVersionPhasedRelease") + } + + public static var appStoreVersionSubmission: Self { + .init(rawValue: "appStoreVersionSubmission") + } + + public static var appVersionState: Self { + .init(rawValue: "appVersionState") + } + + public static var build: Self { + .init(rawValue: "build") + } + + public static var copyright: Self { + .init(rawValue: "copyright") + } + + public static var createdDate: Self { + .init(rawValue: "createdDate") + } + + public static var customerReviews: Self { + .init(rawValue: "customerReviews") + } + + public static var downloadable: Self { + .init(rawValue: "downloadable") + } + + public static var earliestReleaseDate: Self { + .init(rawValue: "earliestReleaseDate") + } + + public static var gameCenterAppVersion: Self { + .init(rawValue: "gameCenterAppVersion") + } + + public static var platform: Self { + .init(rawValue: "platform") + } + + public static var releaseType: Self { + .init(rawValue: "releaseType") + } + + public static var reviewType: Self { + .init(rawValue: "reviewType") + } + + public static var routingAppCoverage: Self { + .init(rawValue: "routingAppCoverage") + } + + public static var usesIdfa: Self { + .init(rawValue: "usesIdfa") + } + + public static var versionString: Self { + .init(rawValue: "versionString") + } - public var rawValue: String { - switch self { - case .betaReviewState: return "betaReviewState" - case .build: return "build" - case .submittedDate: return "submittedDate" - case .unknown(let rawValue): return rawValue - } + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "betaReviewState": self = .betaReviewState - case "build": self = .build - case "submittedDate": self = .submittedDate - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum BetaBuildLocalizations: Hashable, Codable, RawRepresentable { - case build - case locale - case whatsNew - case unknown(String) + public struct Apps: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var accessibilityDeclarations: Self { + .init(rawValue: "accessibilityDeclarations") + } + + public static var accessibilityUrl: Self { + .init(rawValue: "accessibilityUrl") + } + + public static var alternativeDistributionKey: Self { + .init(rawValue: "alternativeDistributionKey") + } + + public static var analyticsReportRequests: Self { + .init(rawValue: "analyticsReportRequests") + } + + public static var appAvailabilityV2: Self { + .init(rawValue: "appAvailabilityV2") + } + + public static var appClips: Self { + .init(rawValue: "appClips") + } + + public static var appCustomProductPages: Self { + .init(rawValue: "appCustomProductPages") + } + + public static var appEncryptionDeclarations: Self { + .init(rawValue: "appEncryptionDeclarations") + } + + public static var appEvents: Self { + .init(rawValue: "appEvents") + } + + public static var appInfos: Self { + .init(rawValue: "appInfos") + } + + public static var appPricePoints: Self { + .init(rawValue: "appPricePoints") + } + + public static var appPriceSchedule: Self { + .init(rawValue: "appPriceSchedule") + } + + public static var appStoreVersionExperimentsV2: Self { + .init(rawValue: "appStoreVersionExperimentsV2") + } + + public static var appStoreVersions: Self { + .init(rawValue: "appStoreVersions") + } + + public static var backgroundAssets: Self { + .init(rawValue: "backgroundAssets") + } + + public static var betaAppLocalizations: Self { + .init(rawValue: "betaAppLocalizations") + } + + public static var betaAppReviewDetail: Self { + .init(rawValue: "betaAppReviewDetail") + } + + public static var betaFeedbackCrashSubmissions: Self { + .init(rawValue: "betaFeedbackCrashSubmissions") + } + + public static var betaFeedbackScreenshotSubmissions: Self { + .init(rawValue: "betaFeedbackScreenshotSubmissions") + } + + public static var betaGroups: Self { + .init(rawValue: "betaGroups") + } + + public static var betaLicenseAgreement: Self { + .init(rawValue: "betaLicenseAgreement") + } + + public static var betaTesters: Self { + .init(rawValue: "betaTesters") + } + + public static var builds: Self { + .init(rawValue: "builds") + } + + public static var bundleId: Self { + .init(rawValue: "bundleId") + } + + public static var ciProduct: Self { + .init(rawValue: "ciProduct") + } + + public static var contentRightsDeclaration: Self { + .init(rawValue: "contentRightsDeclaration") + } + + public static var customerReviewSummarizations: Self { + .init(rawValue: "customerReviewSummarizations") + } + + public static var customerReviews: Self { + .init(rawValue: "customerReviews") + } + + public static var endUserLicenseAgreement: Self { + .init(rawValue: "endUserLicenseAgreement") + } + + public static var gameCenterDetail: Self { + .init(rawValue: "gameCenterDetail") + } + + public static var gameCenterEnabledVersions: Self { + .init(rawValue: "gameCenterEnabledVersions") + } + + public static var inAppPurchases: Self { + .init(rawValue: "inAppPurchases") + } + + public static var inAppPurchasesV2: Self { + .init(rawValue: "inAppPurchasesV2") + } + + public static var isOrEverWasMadeForKids: Self { + .init(rawValue: "isOrEverWasMadeForKids") + } + + public static var marketplaceSearchDetail: Self { + .init(rawValue: "marketplaceSearchDetail") + } + + public static var name: Self { + .init(rawValue: "name") + } + + public static var perfPowerMetrics: Self { + .init(rawValue: "perfPowerMetrics") + } + + public static var preReleaseVersions: Self { + .init(rawValue: "preReleaseVersions") + } + + public static var primaryLocale: Self { + .init(rawValue: "primaryLocale") + } + + public static var promotedPurchases: Self { + .init(rawValue: "promotedPurchases") + } + + public static var reviewSubmissions: Self { + .init(rawValue: "reviewSubmissions") + } + + public static var sku: Self { + .init(rawValue: "sku") + } + + public static var streamlinedPurchasingEnabled: Self { + .init(rawValue: "streamlinedPurchasingEnabled") + } - public var rawValue: String { - switch self { - case .build: return "build" - case .locale: return "locale" - case .whatsNew: return "whatsNew" - case .unknown(let rawValue): return rawValue - } + public static var subscriptionGracePeriod: Self { + .init(rawValue: "subscriptionGracePeriod") } + public static var subscriptionGroups: Self { + .init(rawValue: "subscriptionGroups") + } + + public static var subscriptionStatusUrl: Self { + .init(rawValue: "subscriptionStatusUrl") + } + + public static var subscriptionStatusUrlForSandbox: Self { + .init(rawValue: "subscriptionStatusUrlForSandbox") + } + + public static var subscriptionStatusUrlVersion: Self { + .init(rawValue: "subscriptionStatusUrlVersion") + } + + public static var subscriptionStatusUrlVersionForSandbox: Self { + .init(rawValue: "subscriptionStatusUrlVersionForSandbox") + } + + public static var webhooks: Self { + .init(rawValue: "webhooks") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "build": self = .build - case "locale": self = .locale - case "whatsNew": self = .whatsNew - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum BetaTesters: Hashable, Codable, RawRepresentable { - case apps - case betaGroups - case builds - case email - case firstName - case inviteType - case lastName - case unknown(String) - - public var rawValue: String { - switch self { - case .apps: return "apps" - case .betaGroups: return "betaGroups" - case .builds: return "builds" - case .email: return "email" - case .firstName: return "firstName" - case .inviteType: return "inviteType" - case .lastName: return "lastName" - case .unknown(let rawValue): return rawValue - } + public struct BetaAppReviewSubmissions: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var betaReviewState: Self { + .init(rawValue: "betaReviewState") + } + + public static var build: Self { + .init(rawValue: "build") + } + + public static var submittedDate: Self { + .init(rawValue: "submittedDate") + } + + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "apps": self = .apps - case "betaGroups": self = .betaGroups - case "builds": self = .builds - case "email": self = .email - case "firstName": self = .firstName - case "inviteType": self = .inviteType - case "lastName": self = .lastName - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum BuildBetaDetails: Hashable, Codable, RawRepresentable { - case autoNotifyEnabled - case build - case externalBuildState - case internalBuildState - case unknown(String) + public struct BetaBuildLocalizations: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var build: Self { + .init(rawValue: "build") + } + + public static var locale: Self { + .init(rawValue: "locale") + } + + public static var whatsNew: Self { + .init(rawValue: "whatsNew") + } - public var rawValue: String { - switch self { - case .autoNotifyEnabled: return "autoNotifyEnabled" - case .build: return "build" - case .externalBuildState: return "externalBuildState" - case .internalBuildState: return "internalBuildState" - case .unknown(let rawValue): return rawValue - } + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "autoNotifyEnabled": self = .autoNotifyEnabled - case "build": self = .build - case "externalBuildState": self = .externalBuildState - case "internalBuildState": self = .internalBuildState - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum BuildIcons: Hashable, Codable, RawRepresentable { - case iconAsset - case iconType - case name - case unknown(String) + public struct BetaTesters: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var apps: Self { + .init(rawValue: "apps") + } + + public static var betaGroups: Self { + .init(rawValue: "betaGroups") + } + + public static var builds: Self { + .init(rawValue: "builds") + } + + public static var email: Self { + .init(rawValue: "email") + } + + public static var firstName: Self { + .init(rawValue: "firstName") + } + + public static var inviteType: Self { + .init(rawValue: "inviteType") + } + + public static var lastName: Self { + .init(rawValue: "lastName") + } + + public static var state: Self { + .init(rawValue: "state") + } - public var rawValue: String { - switch self { - case .iconAsset: return "iconAsset" - case .iconType: return "iconType" - case .name: return "name" - case .unknown(let rawValue): return rawValue - } + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "iconAsset": self = .iconAsset - case "iconType": self = .iconType - case "name": self = .name - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum Builds: Hashable, Codable, RawRepresentable { - case app - case appEncryptionDeclaration - case appStoreVersion - case betaAppReviewSubmission - case betaBuildLocalizations - case betaGroups - case buildAudienceType - case buildBetaDetail - case buildBundles - case computedMinMacOsVersion - case diagnosticSignatures - case expirationDate - case expired - case iconAssetToken - case icons - case individualTesters - case lsMinimumSystemVersion - case minOsVersion - case perfPowerMetrics - case preReleaseVersion - case processingState - case uploadedDate - case usesNonExemptEncryption - case version - case unknown(String) - - public var rawValue: String { - switch self { - case .app: return "app" - case .appEncryptionDeclaration: return "appEncryptionDeclaration" - case .appStoreVersion: return "appStoreVersion" - case .betaAppReviewSubmission: return "betaAppReviewSubmission" - case .betaBuildLocalizations: return "betaBuildLocalizations" - case .betaGroups: return "betaGroups" - case .buildAudienceType: return "buildAudienceType" - case .buildBetaDetail: return "buildBetaDetail" - case .buildBundles: return "buildBundles" - case .computedMinMacOsVersion: return "computedMinMacOsVersion" - case .diagnosticSignatures: return "diagnosticSignatures" - case .expirationDate: return "expirationDate" - case .expired: return "expired" - case .iconAssetToken: return "iconAssetToken" - case .icons: return "icons" - case .individualTesters: return "individualTesters" - case .lsMinimumSystemVersion: return "lsMinimumSystemVersion" - case .minOsVersion: return "minOsVersion" - case .perfPowerMetrics: return "perfPowerMetrics" - case .preReleaseVersion: return "preReleaseVersion" - case .processingState: return "processingState" - case .uploadedDate: return "uploadedDate" - case .usesNonExemptEncryption: return "usesNonExemptEncryption" - case .version: return "version" - case .unknown(let rawValue): return rawValue - } + public struct BuildBetaDetails: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var autoNotifyEnabled: Self { + .init(rawValue: "autoNotifyEnabled") + } + + public static var build: Self { + .init(rawValue: "build") + } + + public static var externalBuildState: Self { + .init(rawValue: "externalBuildState") } + public static var internalBuildState: Self { + .init(rawValue: "internalBuildState") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "app": self = .app - case "appEncryptionDeclaration": self = .appEncryptionDeclaration - case "appStoreVersion": self = .appStoreVersion - case "betaAppReviewSubmission": self = .betaAppReviewSubmission - case "betaBuildLocalizations": self = .betaBuildLocalizations - case "betaGroups": self = .betaGroups - case "buildAudienceType": self = .buildAudienceType - case "buildBetaDetail": self = .buildBetaDetail - case "buildBundles": self = .buildBundles - case "computedMinMacOsVersion": self = .computedMinMacOsVersion - case "diagnosticSignatures": self = .diagnosticSignatures - case "expirationDate": self = .expirationDate - case "expired": self = .expired - case "iconAssetToken": self = .iconAssetToken - case "icons": self = .icons - case "individualTesters": self = .individualTesters - case "lsMinimumSystemVersion": self = .lsMinimumSystemVersion - case "minOsVersion": self = .minOsVersion - case "perfPowerMetrics": self = .perfPowerMetrics - case "preReleaseVersion": self = .preReleaseVersion - case "processingState": self = .processingState - case "uploadedDate": self = .uploadedDate - case "usesNonExemptEncryption": self = .usesNonExemptEncryption - case "version": self = .version - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum DiagnosticSignatures: Hashable, Codable, RawRepresentable { - case diagnosticType - case logs - case signature - case weight - case unknown(String) + public struct BuildIcons: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var iconAsset: Self { + .init(rawValue: "iconAsset") + } + + public static var iconType: Self { + .init(rawValue: "iconType") + } + + public static var name: Self { + .init(rawValue: "name") + } - public var rawValue: String { - switch self { - case .diagnosticType: return "diagnosticType" - case .logs: return "logs" - case .signature: return "signature" - case .weight: return "weight" - case .unknown(let rawValue): return rawValue - } + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "diagnosticType": self = .diagnosticType - case "logs": self = .logs - case "signature": self = .signature - case "weight": self = .weight - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum PerfPowerMetrics: Hashable, Codable, RawRepresentable { - case deviceType - case metricType - case platform - case unknown(String) + public struct Builds: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var app: Self { + .init(rawValue: "app") + } + + public static var appEncryptionDeclaration: Self { + .init(rawValue: "appEncryptionDeclaration") + } + + public static var appStoreVersion: Self { + .init(rawValue: "appStoreVersion") + } + + public static var betaAppReviewSubmission: Self { + .init(rawValue: "betaAppReviewSubmission") + } + + public static var betaBuildLocalizations: Self { + .init(rawValue: "betaBuildLocalizations") + } + + public static var betaGroups: Self { + .init(rawValue: "betaGroups") + } + + public static var buildAudienceType: Self { + .init(rawValue: "buildAudienceType") + } - public var rawValue: String { - switch self { - case .deviceType: return "deviceType" - case .metricType: return "metricType" - case .platform: return "platform" - case .unknown(let rawValue): return rawValue - } + public static var buildBetaDetail: Self { + .init(rawValue: "buildBetaDetail") } + public static var buildBundles: Self { + .init(rawValue: "buildBundles") + } + + public static var computedMinMacOsVersion: Self { + .init(rawValue: "computedMinMacOsVersion") + } + + public static var computedMinVisionOsVersion: Self { + .init(rawValue: "computedMinVisionOsVersion") + } + + public static var diagnosticSignatures: Self { + .init(rawValue: "diagnosticSignatures") + } + + public static var expirationDate: Self { + .init(rawValue: "expirationDate") + } + + public static var expired: Self { + .init(rawValue: "expired") + } + + public static var iconAssetToken: Self { + .init(rawValue: "iconAssetToken") + } + + public static var icons: Self { + .init(rawValue: "icons") + } + + public static var individualTesters: Self { + .init(rawValue: "individualTesters") + } + + public static var lsMinimumSystemVersion: Self { + .init(rawValue: "lsMinimumSystemVersion") + } + + public static var minOsVersion: Self { + .init(rawValue: "minOsVersion") + } + + public static var perfPowerMetrics: Self { + .init(rawValue: "perfPowerMetrics") + } + + public static var preReleaseVersion: Self { + .init(rawValue: "preReleaseVersion") + } + + public static var processingState: Self { + .init(rawValue: "processingState") + } + + public static var uploadedDate: Self { + .init(rawValue: "uploadedDate") + } + + public static var usesNonExemptEncryption: Self { + .init(rawValue: "usesNonExemptEncryption") + } + + public static var version: Self { + .init(rawValue: "version") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "deviceType": self = .deviceType - case "metricType": self = .metricType - case "platform": self = .platform - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum PreReleaseVersions: Hashable, Codable, RawRepresentable { - case app - case builds - case platform - case version - case unknown(String) + public struct PreReleaseVersions: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var app: Self { + .init(rawValue: "app") + } + + public static var builds: Self { + .init(rawValue: "builds") + } + + public static var platform: Self { + .init(rawValue: "platform") + } + + public static var version: Self { + .init(rawValue: "version") + } - public var rawValue: String { - switch self { - case .app: return "app" - case .builds: return "builds" - case .platform: return "platform" - case .version: return "version" - case .unknown(let rawValue): return rawValue - } + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "app": self = .app - case "builds": self = .builds - case "platform": self = .platform - case "version": self = .version - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } @@ -796,16 +914,6 @@ extension V1.Builds.GET { .init(key: "fields[builds]") } - /// the fields to include for returned resources of type diagnosticSignatures - public static var diagnosticSignatures: Relation<[DiagnosticSignatures]?> { - .init(key: "fields[diagnosticSignatures]") - } - - /// the fields to include for returned resources of type perfPowerMetrics - public static var perfPowerMetrics: Relation<[PerfPowerMetrics]?> { - .init(key: "fields[perfPowerMetrics]") - } - /// the fields to include for returned resources of type preReleaseVersions public static var preReleaseVersions: Relation<[PreReleaseVersions]?> { .init(key: "fields[preReleaseVersions]") @@ -827,106 +935,107 @@ extension V1.Builds.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum BetaAppReviewSubmissionBetaReviewState: Hashable, Codable, RawRepresentable { - case approved - case inReview - case rejected - case waitingForReview - case unknown(String) + public struct BetaAppReviewSubmissionBetaReviewState: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var approved: Self { + .init(rawValue: "APPROVED") + } + + public static var inReview: Self { + .init(rawValue: "IN_REVIEW") + } + + public static var rejected: Self { + .init(rawValue: "REJECTED") + } + + public static var waitingForReview: Self { + .init(rawValue: "WAITING_FOR_REVIEW") + } - public var rawValue: String { - switch self { - case .approved: return "APPROVED" - case .inReview: return "IN_REVIEW" - case .rejected: return "REJECTED" - case .waitingForReview: return "WAITING_FOR_REVIEW" - case .unknown(let rawValue): return rawValue - } + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "APPROVED": self = .approved - case "IN_REVIEW": self = .inReview - case "REJECTED": self = .rejected - case "WAITING_FOR_REVIEW": self = .waitingForReview - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum BuildAudienceType: Hashable, Codable, RawRepresentable { - case appStoreEligible - case internalOnly - case unknown(String) + public struct BuildAudienceType: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var appStoreEligible: Self { + .init(rawValue: "APP_STORE_ELIGIBLE") + } - public var rawValue: String { - switch self { - case .appStoreEligible: return "APP_STORE_ELIGIBLE" - case .internalOnly: return "INTERNAL_ONLY" - case .unknown(let rawValue): return rawValue - } + public static var internalOnly: Self { + .init(rawValue: "INTERNAL_ONLY") } + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "APP_STORE_ELIGIBLE": self = .appStoreEligible - case "INTERNAL_ONLY": self = .internalOnly - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum PreReleaseVersionPlatform: Hashable, Codable, RawRepresentable { - case iOS - case macOS - case tvOS - case unknown(String) + public struct PreReleaseVersionPlatform: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var iOS: Self { + .init(rawValue: "IOS") + } + + public static var macOS: Self { + .init(rawValue: "MAC_OS") + } - public var rawValue: String { - switch self { - case .iOS: return "IOS" - case .macOS: return "MAC_OS" - case .tvOS: return "TV_OS" - case .unknown(let rawValue): return rawValue - } + public static var tvOS: Self { + .init(rawValue: "TV_OS") } + public static var visionOS: Self { + .init(rawValue: "VISION_OS") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "IOS": self = .iOS - case "MAC_OS": self = .macOS - case "TV_OS": self = .tvOS - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum ProcessingState: Hashable, Codable, RawRepresentable { - case failed - case invalid - case processing - case valid - case unknown(String) + public struct ProcessingState: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var failed: Self { + .init(rawValue: "FAILED") + } + + public static var invalid: Self { + .init(rawValue: "INVALID") + } + + public static var processing: Self { + .init(rawValue: "PROCESSING") + } + + public static var valid: Self { + .init(rawValue: "VALID") + } - public var rawValue: String { - switch self { - case .failed: return "FAILED" - case .invalid: return "INVALID" - case .processing: return "PROCESSING" - case .valid: return "VALID" - case .unknown(let rawValue): return rawValue - } + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "FAILED": self = .failed - case "INVALID": self = .invalid - case "PROCESSING": self = .processing - case "VALID": self = .valid - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } @@ -1004,52 +1113,59 @@ extension V1.Builds.GET { } } - public enum Include: Hashable, Codable, RawRepresentable { - case app - case appEncryptionDeclaration - case appStoreVersion - case betaAppReviewSubmission - case betaBuildLocalizations - case betaGroups - case buildBetaDetail - case buildBundles - case icons - case individualTesters - case preReleaseVersion - case unknown(String) - - public var rawValue: String { - switch self { - case .app: return "app" - case .appEncryptionDeclaration: return "appEncryptionDeclaration" - case .appStoreVersion: return "appStoreVersion" - case .betaAppReviewSubmission: return "betaAppReviewSubmission" - case .betaBuildLocalizations: return "betaBuildLocalizations" - case .betaGroups: return "betaGroups" - case .buildBetaDetail: return "buildBetaDetail" - case .buildBundles: return "buildBundles" - case .icons: return "icons" - case .individualTesters: return "individualTesters" - case .preReleaseVersion: return "preReleaseVersion" - case .unknown(let rawValue): return rawValue - } + public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var app: Self { + .init(rawValue: "app") + } + + public static var appEncryptionDeclaration: Self { + .init(rawValue: "appEncryptionDeclaration") + } + + public static var appStoreVersion: Self { + .init(rawValue: "appStoreVersion") + } + + public static var betaAppReviewSubmission: Self { + .init(rawValue: "betaAppReviewSubmission") + } + + public static var betaBuildLocalizations: Self { + .init(rawValue: "betaBuildLocalizations") + } + + public static var betaGroups: Self { + .init(rawValue: "betaGroups") + } + + public static var buildBetaDetail: Self { + .init(rawValue: "buildBetaDetail") + } + + public static var buildBundles: Self { + .init(rawValue: "buildBundles") + } + + public static var icons: Self { + .init(rawValue: "icons") } + public static var individualTesters: Self { + .init(rawValue: "individualTesters") + } + + public static var preReleaseVersion: Self { + .init(rawValue: "preReleaseVersion") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "app": self = .app - case "appEncryptionDeclaration": self = .appEncryptionDeclaration - case "appStoreVersion": self = .appStoreVersion - case "betaAppReviewSubmission": self = .betaAppReviewSubmission - case "betaBuildLocalizations": self = .betaBuildLocalizations - case "betaGroups": self = .betaGroups - case "buildBetaDetail": self = .buildBetaDetail - case "buildBundles": self = .buildBundles - case "icons": self = .icons - case "individualTesters": self = .individualTesters - case "preReleaseVersion": self = .preReleaseVersion - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } @@ -1100,37 +1216,39 @@ extension V1.Builds.GET { } } - public enum Sort: Hashable, Codable, RawRepresentable { - case preReleaseVersion - case preReleaseVersionDesc - case uploadedDate - case uploadedDateDesc - case version - case versionDesc - case unknown(String) - - public var rawValue: String { - switch self { - case .preReleaseVersion: return "preReleaseVersion" - case .preReleaseVersionDesc: return "-preReleaseVersion" - case .uploadedDate: return "uploadedDate" - case .uploadedDateDesc: return "-uploadedDate" - case .version: return "version" - case .versionDesc: return "-version" - case .unknown(let rawValue): return rawValue - } + public struct Sort: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var preReleaseVersion: Self { + .init(rawValue: "preReleaseVersion") } + public static var preReleaseVersionDesc: Self { + .init(rawValue: "-preReleaseVersion") + } + + public static var uploadedDate: Self { + .init(rawValue: "uploadedDate") + } + + public static var uploadedDateDesc: Self { + .init(rawValue: "-uploadedDate") + } + + public static var version: Self { + .init(rawValue: "version") + } + + public static var versionDesc: Self { + .init(rawValue: "-version") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "preReleaseVersion": self = .preReleaseVersion - case "-preReleaseVersion": self = .preReleaseVersionDesc - case "uploadedDate": self = .uploadedDate - case "-uploadedDate": self = .uploadedDateDesc - case "version": self = .version - case "-version": self = .versionDesc - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Builds/ById/App/BuildsByIdApp.GET.138c119.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Builds/ById/App/BuildsByIdApp.GET.138c119.generated.swift index 43f3e0fa..28f7e0c1 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Builds/ById/App/BuildsByIdApp.GET.138c119.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Builds/ById/App/BuildsByIdApp.GET.138c119.generated.swift @@ -42,8 +42,10 @@ extension V1.Builds.ById.App { /// - Returns: **200**, Single App with get as `AppWithoutIncludesResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -57,12 +59,18 @@ extension V1.Builds.ById.App { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 404: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -82,151 +90,215 @@ extension V1.Builds.ById.App.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum Apps: Hashable, Codable, RawRepresentable { - case appAvailability - case appClips - case appCustomProductPages - case appEncryptionDeclarations - case appEvents - case appInfos - case appPricePoints - case appPriceSchedule - case appStoreVersionExperimentsV2 - case appStoreVersions - case availableInNewTerritories - case availableTerritories - case betaAppLocalizations - case betaAppReviewDetail - case betaGroups - case betaLicenseAgreement - case betaTesters - case builds - case bundleId - case ciProduct - case contentRightsDeclaration - case customerReviews - case endUserLicenseAgreement - case gameCenterDetail - case gameCenterEnabledVersions - case inAppPurchases - case inAppPurchasesV2 - case isOrEverWasMadeForKids - case name - case perfPowerMetrics - case preOrder - case preReleaseVersions - case pricePoints - case prices - case primaryLocale - case promotedPurchases - case reviewSubmissions - case sku - case subscriptionGracePeriod - case subscriptionGroups - case subscriptionStatusUrl - case subscriptionStatusUrlForSandbox - case subscriptionStatusUrlVersion - case subscriptionStatusUrlVersionForSandbox - case unknown(String) - - public var rawValue: String { - switch self { - case .appAvailability: return "appAvailability" - case .appClips: return "appClips" - case .appCustomProductPages: return "appCustomProductPages" - case .appEncryptionDeclarations: return "appEncryptionDeclarations" - case .appEvents: return "appEvents" - case .appInfos: return "appInfos" - case .appPricePoints: return "appPricePoints" - case .appPriceSchedule: return "appPriceSchedule" - case .appStoreVersionExperimentsV2: return "appStoreVersionExperimentsV2" - case .appStoreVersions: return "appStoreVersions" - case .availableInNewTerritories: return "availableInNewTerritories" - case .availableTerritories: return "availableTerritories" - case .betaAppLocalizations: return "betaAppLocalizations" - case .betaAppReviewDetail: return "betaAppReviewDetail" - case .betaGroups: return "betaGroups" - case .betaLicenseAgreement: return "betaLicenseAgreement" - case .betaTesters: return "betaTesters" - case .builds: return "builds" - case .bundleId: return "bundleId" - case .ciProduct: return "ciProduct" - case .contentRightsDeclaration: return "contentRightsDeclaration" - case .customerReviews: return "customerReviews" - case .endUserLicenseAgreement: return "endUserLicenseAgreement" - case .gameCenterDetail: return "gameCenterDetail" - case .gameCenterEnabledVersions: return "gameCenterEnabledVersions" - case .inAppPurchases: return "inAppPurchases" - case .inAppPurchasesV2: return "inAppPurchasesV2" - case .isOrEverWasMadeForKids: return "isOrEverWasMadeForKids" - case .name: return "name" - case .perfPowerMetrics: return "perfPowerMetrics" - case .preOrder: return "preOrder" - case .preReleaseVersions: return "preReleaseVersions" - case .pricePoints: return "pricePoints" - case .prices: return "prices" - case .primaryLocale: return "primaryLocale" - case .promotedPurchases: return "promotedPurchases" - case .reviewSubmissions: return "reviewSubmissions" - case .sku: return "sku" - case .subscriptionGracePeriod: return "subscriptionGracePeriod" - case .subscriptionGroups: return "subscriptionGroups" - case .subscriptionStatusUrl: return "subscriptionStatusUrl" - case .subscriptionStatusUrlForSandbox: return "subscriptionStatusUrlForSandbox" - case .subscriptionStatusUrlVersion: return "subscriptionStatusUrlVersion" - case .subscriptionStatusUrlVersionForSandbox: return "subscriptionStatusUrlVersionForSandbox" - case .unknown(let rawValue): return rawValue - } + public struct Apps: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var accessibilityDeclarations: Self { + .init(rawValue: "accessibilityDeclarations") + } + + public static var accessibilityUrl: Self { + .init(rawValue: "accessibilityUrl") + } + + public static var alternativeDistributionKey: Self { + .init(rawValue: "alternativeDistributionKey") + } + + public static var analyticsReportRequests: Self { + .init(rawValue: "analyticsReportRequests") + } + + public static var appAvailabilityV2: Self { + .init(rawValue: "appAvailabilityV2") + } + + public static var appClips: Self { + .init(rawValue: "appClips") } + public static var appCustomProductPages: Self { + .init(rawValue: "appCustomProductPages") + } + + public static var appEncryptionDeclarations: Self { + .init(rawValue: "appEncryptionDeclarations") + } + + public static var appEvents: Self { + .init(rawValue: "appEvents") + } + + public static var appInfos: Self { + .init(rawValue: "appInfos") + } + + public static var appPricePoints: Self { + .init(rawValue: "appPricePoints") + } + + public static var appPriceSchedule: Self { + .init(rawValue: "appPriceSchedule") + } + + public static var appStoreVersionExperimentsV2: Self { + .init(rawValue: "appStoreVersionExperimentsV2") + } + + public static var appStoreVersions: Self { + .init(rawValue: "appStoreVersions") + } + + public static var backgroundAssets: Self { + .init(rawValue: "backgroundAssets") + } + + public static var betaAppLocalizations: Self { + .init(rawValue: "betaAppLocalizations") + } + + public static var betaAppReviewDetail: Self { + .init(rawValue: "betaAppReviewDetail") + } + + public static var betaFeedbackCrashSubmissions: Self { + .init(rawValue: "betaFeedbackCrashSubmissions") + } + + public static var betaFeedbackScreenshotSubmissions: Self { + .init(rawValue: "betaFeedbackScreenshotSubmissions") + } + + public static var betaGroups: Self { + .init(rawValue: "betaGroups") + } + + public static var betaLicenseAgreement: Self { + .init(rawValue: "betaLicenseAgreement") + } + + public static var betaTesters: Self { + .init(rawValue: "betaTesters") + } + + public static var builds: Self { + .init(rawValue: "builds") + } + + public static var bundleId: Self { + .init(rawValue: "bundleId") + } + + public static var ciProduct: Self { + .init(rawValue: "ciProduct") + } + + public static var contentRightsDeclaration: Self { + .init(rawValue: "contentRightsDeclaration") + } + + public static var customerReviewSummarizations: Self { + .init(rawValue: "customerReviewSummarizations") + } + + public static var customerReviews: Self { + .init(rawValue: "customerReviews") + } + + public static var endUserLicenseAgreement: Self { + .init(rawValue: "endUserLicenseAgreement") + } + + public static var gameCenterDetail: Self { + .init(rawValue: "gameCenterDetail") + } + + public static var gameCenterEnabledVersions: Self { + .init(rawValue: "gameCenterEnabledVersions") + } + + public static var inAppPurchases: Self { + .init(rawValue: "inAppPurchases") + } + + public static var inAppPurchasesV2: Self { + .init(rawValue: "inAppPurchasesV2") + } + + public static var isOrEverWasMadeForKids: Self { + .init(rawValue: "isOrEverWasMadeForKids") + } + + public static var marketplaceSearchDetail: Self { + .init(rawValue: "marketplaceSearchDetail") + } + + public static var name: Self { + .init(rawValue: "name") + } + + public static var perfPowerMetrics: Self { + .init(rawValue: "perfPowerMetrics") + } + + public static var preReleaseVersions: Self { + .init(rawValue: "preReleaseVersions") + } + + public static var primaryLocale: Self { + .init(rawValue: "primaryLocale") + } + + public static var promotedPurchases: Self { + .init(rawValue: "promotedPurchases") + } + + public static var reviewSubmissions: Self { + .init(rawValue: "reviewSubmissions") + } + + public static var sku: Self { + .init(rawValue: "sku") + } + + public static var streamlinedPurchasingEnabled: Self { + .init(rawValue: "streamlinedPurchasingEnabled") + } + + public static var subscriptionGracePeriod: Self { + .init(rawValue: "subscriptionGracePeriod") + } + + public static var subscriptionGroups: Self { + .init(rawValue: "subscriptionGroups") + } + + public static var subscriptionStatusUrl: Self { + .init(rawValue: "subscriptionStatusUrl") + } + + public static var subscriptionStatusUrlForSandbox: Self { + .init(rawValue: "subscriptionStatusUrlForSandbox") + } + + public static var subscriptionStatusUrlVersion: Self { + .init(rawValue: "subscriptionStatusUrlVersion") + } + + public static var subscriptionStatusUrlVersionForSandbox: Self { + .init(rawValue: "subscriptionStatusUrlVersionForSandbox") + } + + public static var webhooks: Self { + .init(rawValue: "webhooks") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "appAvailability": self = .appAvailability - case "appClips": self = .appClips - case "appCustomProductPages": self = .appCustomProductPages - case "appEncryptionDeclarations": self = .appEncryptionDeclarations - case "appEvents": self = .appEvents - case "appInfos": self = .appInfos - case "appPricePoints": self = .appPricePoints - case "appPriceSchedule": self = .appPriceSchedule - case "appStoreVersionExperimentsV2": self = .appStoreVersionExperimentsV2 - case "appStoreVersions": self = .appStoreVersions - case "availableInNewTerritories": self = .availableInNewTerritories - case "availableTerritories": self = .availableTerritories - case "betaAppLocalizations": self = .betaAppLocalizations - case "betaAppReviewDetail": self = .betaAppReviewDetail - case "betaGroups": self = .betaGroups - case "betaLicenseAgreement": self = .betaLicenseAgreement - case "betaTesters": self = .betaTesters - case "builds": self = .builds - case "bundleId": self = .bundleId - case "ciProduct": self = .ciProduct - case "contentRightsDeclaration": self = .contentRightsDeclaration - case "customerReviews": self = .customerReviews - case "endUserLicenseAgreement": self = .endUserLicenseAgreement - case "gameCenterDetail": self = .gameCenterDetail - case "gameCenterEnabledVersions": self = .gameCenterEnabledVersions - case "inAppPurchases": self = .inAppPurchases - case "inAppPurchasesV2": self = .inAppPurchasesV2 - case "isOrEverWasMadeForKids": self = .isOrEverWasMadeForKids - case "name": self = .name - case "perfPowerMetrics": self = .perfPowerMetrics - case "preOrder": self = .preOrder - case "preReleaseVersions": self = .preReleaseVersions - case "pricePoints": self = .pricePoints - case "prices": self = .prices - case "primaryLocale": self = .primaryLocale - case "promotedPurchases": self = .promotedPurchases - case "reviewSubmissions": self = .reviewSubmissions - case "sku": self = .sku - case "subscriptionGracePeriod": self = .subscriptionGracePeriod - case "subscriptionGroups": self = .subscriptionGroups - case "subscriptionStatusUrl": self = .subscriptionStatusUrl - case "subscriptionStatusUrlForSandbox": self = .subscriptionStatusUrlForSandbox - case "subscriptionStatusUrlVersion": self = .subscriptionStatusUrlVersion - case "subscriptionStatusUrlVersionForSandbox": self = .subscriptionStatusUrlVersionForSandbox - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Builds/ById/AppEncryptionDeclaration/BuildsByIdAppEncryptionDeclaration.GET.97e52a7.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Builds/ById/AppEncryptionDeclaration/BuildsByIdAppEncryptionDeclaration.GET.97e52a7.generated.swift index ef874ad9..fa4e87df 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Builds/ById/AppEncryptionDeclaration/BuildsByIdAppEncryptionDeclaration.GET.97e52a7.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Builds/ById/AppEncryptionDeclaration/BuildsByIdAppEncryptionDeclaration.GET.97e52a7.generated.swift @@ -42,8 +42,10 @@ extension V1.Builds.ById.AppEncryptionDeclaration { /// - Returns: **200**, Single AppEncryptionDeclaration with get as `AppEncryptionDeclarationWithoutIncludesResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -57,12 +59,18 @@ extension V1.Builds.ById.AppEncryptionDeclaration { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 404: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -82,70 +90,83 @@ extension V1.Builds.ById.AppEncryptionDeclaration.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum AppEncryptionDeclarations: Hashable, Codable, RawRepresentable { - case app - case appDescription - case appEncryptionDeclarationDocument - case appEncryptionDeclarationState - case availableOnFrenchStore - case builds - case codeValue - case containsProprietaryCryptography - case containsThirdPartyCryptography - case createdDate - case documentName - case documentType - case documentUrl - case exempt - case platform - case uploadedDate - case usesEncryption - case unknown(String) - - public var rawValue: String { - switch self { - case .app: return "app" - case .appDescription: return "appDescription" - case .appEncryptionDeclarationDocument: return "appEncryptionDeclarationDocument" - case .appEncryptionDeclarationState: return "appEncryptionDeclarationState" - case .availableOnFrenchStore: return "availableOnFrenchStore" - case .builds: return "builds" - case .codeValue: return "codeValue" - case .containsProprietaryCryptography: return "containsProprietaryCryptography" - case .containsThirdPartyCryptography: return "containsThirdPartyCryptography" - case .createdDate: return "createdDate" - case .documentName: return "documentName" - case .documentType: return "documentType" - case .documentUrl: return "documentUrl" - case .exempt: return "exempt" - case .platform: return "platform" - case .uploadedDate: return "uploadedDate" - case .usesEncryption: return "usesEncryption" - case .unknown(let rawValue): return rawValue - } + public struct AppEncryptionDeclarations: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var app: Self { + .init(rawValue: "app") + } + + public static var appDescription: Self { + .init(rawValue: "appDescription") + } + + public static var appEncryptionDeclarationDocument: Self { + .init(rawValue: "appEncryptionDeclarationDocument") + } + + public static var appEncryptionDeclarationState: Self { + .init(rawValue: "appEncryptionDeclarationState") + } + + public static var availableOnFrenchStore: Self { + .init(rawValue: "availableOnFrenchStore") + } + + public static var builds: Self { + .init(rawValue: "builds") + } + + public static var codeValue: Self { + .init(rawValue: "codeValue") + } + + public static var containsProprietaryCryptography: Self { + .init(rawValue: "containsProprietaryCryptography") + } + + public static var containsThirdPartyCryptography: Self { + .init(rawValue: "containsThirdPartyCryptography") } + public static var createdDate: Self { + .init(rawValue: "createdDate") + } + + public static var documentName: Self { + .init(rawValue: "documentName") + } + + public static var documentType: Self { + .init(rawValue: "documentType") + } + + public static var documentUrl: Self { + .init(rawValue: "documentUrl") + } + + public static var exempt: Self { + .init(rawValue: "exempt") + } + + public static var platform: Self { + .init(rawValue: "platform") + } + + public static var uploadedDate: Self { + .init(rawValue: "uploadedDate") + } + + public static var usesEncryption: Self { + .init(rawValue: "usesEncryption") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "app": self = .app - case "appDescription": self = .appDescription - case "appEncryptionDeclarationDocument": self = .appEncryptionDeclarationDocument - case "appEncryptionDeclarationState": self = .appEncryptionDeclarationState - case "availableOnFrenchStore": self = .availableOnFrenchStore - case "builds": self = .builds - case "codeValue": self = .codeValue - case "containsProprietaryCryptography": self = .containsProprietaryCryptography - case "containsThirdPartyCryptography": self = .containsThirdPartyCryptography - case "createdDate": self = .createdDate - case "documentName": self = .documentName - case "documentType": self = .documentType - case "documentUrl": self = .documentUrl - case "exempt": self = .exempt - case "platform": self = .platform - case "uploadedDate": self = .uploadedDate - case "usesEncryption": self = .usesEncryption - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Builds/ById/AppStoreVersion/BuildsByIdAppStoreVersion.GET.42e9c68.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Builds/ById/AppStoreVersion/BuildsByIdAppStoreVersion.GET.42e9c68.generated.swift index e4b7f30d..1be75ec5 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Builds/ById/AppStoreVersion/BuildsByIdAppStoreVersion.GET.42e9c68.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Builds/ById/AppStoreVersion/BuildsByIdAppStoreVersion.GET.42e9c68.generated.swift @@ -30,6 +30,8 @@ extension V1.Builds.ById.AppStoreVersion { components?.queryItems = [ URLQueryItem(name: "fields[ageRatingDeclarations]", value: parameters.fields[.ageRatingDeclarations]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "fields[alternativeDistributionPackages]", + value: parameters.fields[.alternativeDistributionPackages]?.map { "\($0)" }.joined(separator: ",")), URLQueryItem(name: "fields[appClipDefaultExperiences]", value: parameters.fields[.appClipDefaultExperiences]?.map { "\($0)" }.joined(separator: ",")), URLQueryItem(name: "fields[appStoreReviewDetails]", @@ -48,6 +50,8 @@ extension V1.Builds.ById.AppStoreVersion { value: parameters.fields[.apps]?.map { "\($0)" }.joined(separator: ",")), URLQueryItem(name: "fields[builds]", value: parameters.fields[.builds]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "fields[gameCenterAppVersions]", + value: parameters.fields[.gameCenterAppVersions]?.map { "\($0)" }.joined(separator: ",")), URLQueryItem(name: "fields[routingAppCoverages]", value: parameters.fields[.routingAppCoverages]?.map { "\($0)" }.joined(separator: ",")), URLQueryItem(name: "include", @@ -70,8 +74,10 @@ extension V1.Builds.ById.AppStoreVersion { /// - Returns: **200**, Single AppStoreVersion as `AppStoreVersionResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -85,12 +91,18 @@ extension V1.Builds.ById.AppStoreVersion { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 404: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -115,650 +127,835 @@ extension V1.Builds.ById.AppStoreVersion.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum AgeRatingDeclarations: Hashable, Codable, RawRepresentable { - case alcoholTobaccoOrDrugUseOrReferences - case contests - case gambling - case gamblingAndContests - case gamblingSimulated - case horrorOrFearThemes - case kidsAgeBand - case matureOrSuggestiveThemes - case medicalOrTreatmentInformation - case profanityOrCrudeHumor - case seventeenPlus - case sexualContentGraphicAndNudity - case sexualContentOrNudity - case unrestrictedWebAccess - case violenceCartoonOrFantasy - case violenceRealistic - case violenceRealisticProlongedGraphicOrSadistic - case unknown(String) - - public var rawValue: String { - switch self { - case .alcoholTobaccoOrDrugUseOrReferences: return "alcoholTobaccoOrDrugUseOrReferences" - case .contests: return "contests" - case .gambling: return "gambling" - case .gamblingAndContests: return "gamblingAndContests" - case .gamblingSimulated: return "gamblingSimulated" - case .horrorOrFearThemes: return "horrorOrFearThemes" - case .kidsAgeBand: return "kidsAgeBand" - case .matureOrSuggestiveThemes: return "matureOrSuggestiveThemes" - case .medicalOrTreatmentInformation: return "medicalOrTreatmentInformation" - case .profanityOrCrudeHumor: return "profanityOrCrudeHumor" - case .seventeenPlus: return "seventeenPlus" - case .sexualContentGraphicAndNudity: return "sexualContentGraphicAndNudity" - case .sexualContentOrNudity: return "sexualContentOrNudity" - case .unrestrictedWebAccess: return "unrestrictedWebAccess" - case .violenceCartoonOrFantasy: return "violenceCartoonOrFantasy" - case .violenceRealistic: return "violenceRealistic" - case .violenceRealisticProlongedGraphicOrSadistic: return "violenceRealisticProlongedGraphicOrSadistic" - case .unknown(let rawValue): return rawValue - } + public struct AgeRatingDeclarations: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var alcoholTobaccoOrDrugUseOrReferences: Self { + .init(rawValue: "alcoholTobaccoOrDrugUseOrReferences") + } + + public static var contests: Self { + .init(rawValue: "contests") + } + + public static var gambling: Self { + .init(rawValue: "gambling") + } + + public static var gamblingSimulated: Self { + .init(rawValue: "gamblingSimulated") + } + + public static var horrorOrFearThemes: Self { + .init(rawValue: "horrorOrFearThemes") + } + + public static var kidsAgeBand: Self { + .init(rawValue: "kidsAgeBand") + } + + public static var koreaAgeRatingOverride: Self { + .init(rawValue: "koreaAgeRatingOverride") + } + + public static var lootBox: Self { + .init(rawValue: "lootBox") + } + + public static var matureOrSuggestiveThemes: Self { + .init(rawValue: "matureOrSuggestiveThemes") + } + + public static var medicalOrTreatmentInformation: Self { + .init(rawValue: "medicalOrTreatmentInformation") + } + + public static var profanityOrCrudeHumor: Self { + .init(rawValue: "profanityOrCrudeHumor") + } + + public static var sexualContentGraphicAndNudity: Self { + .init(rawValue: "sexualContentGraphicAndNudity") + } + + public static var sexualContentOrNudity: Self { + .init(rawValue: "sexualContentOrNudity") + } + + public static var unrestrictedWebAccess: Self { + .init(rawValue: "unrestrictedWebAccess") + } + + public static var violenceCartoonOrFantasy: Self { + .init(rawValue: "violenceCartoonOrFantasy") + } + + public static var violenceRealistic: Self { + .init(rawValue: "violenceRealistic") } + public static var violenceRealisticProlongedGraphicOrSadistic: Self { + .init(rawValue: "violenceRealisticProlongedGraphicOrSadistic") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "alcoholTobaccoOrDrugUseOrReferences": self = .alcoholTobaccoOrDrugUseOrReferences - case "contests": self = .contests - case "gambling": self = .gambling - case "gamblingAndContests": self = .gamblingAndContests - case "gamblingSimulated": self = .gamblingSimulated - case "horrorOrFearThemes": self = .horrorOrFearThemes - case "kidsAgeBand": self = .kidsAgeBand - case "matureOrSuggestiveThemes": self = .matureOrSuggestiveThemes - case "medicalOrTreatmentInformation": self = .medicalOrTreatmentInformation - case "profanityOrCrudeHumor": self = .profanityOrCrudeHumor - case "seventeenPlus": self = .seventeenPlus - case "sexualContentGraphicAndNudity": self = .sexualContentGraphicAndNudity - case "sexualContentOrNudity": self = .sexualContentOrNudity - case "unrestrictedWebAccess": self = .unrestrictedWebAccess - case "violenceCartoonOrFantasy": self = .violenceCartoonOrFantasy - case "violenceRealistic": self = .violenceRealistic - case "violenceRealisticProlongedGraphicOrSadistic": self = .violenceRealisticProlongedGraphicOrSadistic - default: self = .unknown(rawValue) - } - } - } - - public enum AppClipDefaultExperiences: Hashable, Codable, RawRepresentable { - case action - case appClip - case appClipAppStoreReviewDetail - case appClipDefaultExperienceLocalizations - case appClipDefaultExperienceTemplate - case releaseWithAppStoreVersion - case unknown(String) - - public var rawValue: String { - switch self { - case .action: return "action" - case .appClip: return "appClip" - case .appClipAppStoreReviewDetail: return "appClipAppStoreReviewDetail" - case .appClipDefaultExperienceLocalizations: return "appClipDefaultExperienceLocalizations" - case .appClipDefaultExperienceTemplate: return "appClipDefaultExperienceTemplate" - case .releaseWithAppStoreVersion: return "releaseWithAppStoreVersion" - case .unknown(let rawValue): return rawValue - } + self.rawValue = rawValue } + } + + public struct AlternativeDistributionPackages: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var versions: Self { + .init(rawValue: "versions") + } + + public var description: String { + rawValue + } + + public var rawValue: String public init(rawValue: String) { - switch rawValue { - case "action": self = .action - case "appClip": self = .appClip - case "appClipAppStoreReviewDetail": self = .appClipAppStoreReviewDetail - case "appClipDefaultExperienceLocalizations": self = .appClipDefaultExperienceLocalizations - case "appClipDefaultExperienceTemplate": self = .appClipDefaultExperienceTemplate - case "releaseWithAppStoreVersion": self = .releaseWithAppStoreVersion - default: self = .unknown(rawValue) - } - } - } - - public enum AppStoreReviewDetails: Hashable, Codable, RawRepresentable { - case appStoreReviewAttachments - case appStoreVersion - case contactEmail - case contactFirstName - case contactLastName - case contactPhone - case demoAccountName - case demoAccountPassword - case demoAccountRequired - case notes - case unknown(String) - - public var rawValue: String { - switch self { - case .appStoreReviewAttachments: return "appStoreReviewAttachments" - case .appStoreVersion: return "appStoreVersion" - case .contactEmail: return "contactEmail" - case .contactFirstName: return "contactFirstName" - case .contactLastName: return "contactLastName" - case .contactPhone: return "contactPhone" - case .demoAccountName: return "demoAccountName" - case .demoAccountPassword: return "demoAccountPassword" - case .demoAccountRequired: return "demoAccountRequired" - case .notes: return "notes" - case .unknown(let rawValue): return rawValue - } + self.rawValue = rawValue + } + } + + public struct AppClipDefaultExperiences: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var action: Self { + .init(rawValue: "action") + } + + public static var appClip: Self { + .init(rawValue: "appClip") + } + + public static var appClipAppStoreReviewDetail: Self { + .init(rawValue: "appClipAppStoreReviewDetail") + } + + public static var appClipDefaultExperienceLocalizations: Self { + .init(rawValue: "appClipDefaultExperienceLocalizations") } + public static var releaseWithAppStoreVersion: Self { + .init(rawValue: "releaseWithAppStoreVersion") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "appStoreReviewAttachments": self = .appStoreReviewAttachments - case "appStoreVersion": self = .appStoreVersion - case "contactEmail": self = .contactEmail - case "contactFirstName": self = .contactFirstName - case "contactLastName": self = .contactLastName - case "contactPhone": self = .contactPhone - case "demoAccountName": self = .demoAccountName - case "demoAccountPassword": self = .demoAccountPassword - case "demoAccountRequired": self = .demoAccountRequired - case "notes": self = .notes - default: self = .unknown(rawValue) - } - } - } - - public enum AppStoreVersionExperiments: Hashable, Codable, RawRepresentable { - case app - case appStoreVersion - case appStoreVersionExperimentTreatments - case controlVersions - case endDate - case latestControlVersion - case name - case platform - case reviewRequired - case startDate - case started - case state - case trafficProportion - case unknown(String) - - public var rawValue: String { - switch self { - case .app: return "app" - case .appStoreVersion: return "appStoreVersion" - case .appStoreVersionExperimentTreatments: return "appStoreVersionExperimentTreatments" - case .controlVersions: return "controlVersions" - case .endDate: return "endDate" - case .latestControlVersion: return "latestControlVersion" - case .name: return "name" - case .platform: return "platform" - case .reviewRequired: return "reviewRequired" - case .startDate: return "startDate" - case .started: return "started" - case .state: return "state" - case .trafficProportion: return "trafficProportion" - case .unknown(let rawValue): return rawValue - } + self.rawValue = rawValue + } + } + + public struct AppStoreReviewDetails: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var appStoreReviewAttachments: Self { + .init(rawValue: "appStoreReviewAttachments") + } + + public static var appStoreVersion: Self { + .init(rawValue: "appStoreVersion") + } + + public static var contactEmail: Self { + .init(rawValue: "contactEmail") + } + + public static var contactFirstName: Self { + .init(rawValue: "contactFirstName") } + public static var contactLastName: Self { + .init(rawValue: "contactLastName") + } + + public static var contactPhone: Self { + .init(rawValue: "contactPhone") + } + + public static var demoAccountName: Self { + .init(rawValue: "demoAccountName") + } + + public static var demoAccountPassword: Self { + .init(rawValue: "demoAccountPassword") + } + + public static var demoAccountRequired: Self { + .init(rawValue: "demoAccountRequired") + } + + public static var notes: Self { + .init(rawValue: "notes") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "app": self = .app - case "appStoreVersion": self = .appStoreVersion - case "appStoreVersionExperimentTreatments": self = .appStoreVersionExperimentTreatments - case "controlVersions": self = .controlVersions - case "endDate": self = .endDate - case "latestControlVersion": self = .latestControlVersion - case "name": self = .name - case "platform": self = .platform - case "reviewRequired": self = .reviewRequired - case "startDate": self = .startDate - case "started": self = .started - case "state": self = .state - case "trafficProportion": self = .trafficProportion - default: self = .unknown(rawValue) - } - } - } - - public enum AppStoreVersionLocalizations: Hashable, Codable, RawRepresentable { - case appPreviewSets - case appScreenshotSets - case appStoreVersion - case description - case keywords - case locale - case marketingUrl - case promotionalText - case supportUrl - case whatsNew - case unknown(String) - - public var rawValue: String { - switch self { - case .appPreviewSets: return "appPreviewSets" - case .appScreenshotSets: return "appScreenshotSets" - case .appStoreVersion: return "appStoreVersion" - case .description: return "description" - case .keywords: return "keywords" - case .locale: return "locale" - case .marketingUrl: return "marketingUrl" - case .promotionalText: return "promotionalText" - case .supportUrl: return "supportUrl" - case .whatsNew: return "whatsNew" - case .unknown(let rawValue): return rawValue - } + self.rawValue = rawValue + } + } + + public struct AppStoreVersionExperiments: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var app: Self { + .init(rawValue: "app") + } + + public static var appStoreVersion: Self { + .init(rawValue: "appStoreVersion") + } + + public static var appStoreVersionExperimentTreatments: Self { + .init(rawValue: "appStoreVersionExperimentTreatments") + } + + public static var controlVersions: Self { + .init(rawValue: "controlVersions") + } + + public static var endDate: Self { + .init(rawValue: "endDate") } + public static var latestControlVersion: Self { + .init(rawValue: "latestControlVersion") + } + + public static var name: Self { + .init(rawValue: "name") + } + + public static var platform: Self { + .init(rawValue: "platform") + } + + public static var reviewRequired: Self { + .init(rawValue: "reviewRequired") + } + + public static var startDate: Self { + .init(rawValue: "startDate") + } + + public static var state: Self { + .init(rawValue: "state") + } + + public static var trafficProportion: Self { + .init(rawValue: "trafficProportion") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "appPreviewSets": self = .appPreviewSets - case "appScreenshotSets": self = .appScreenshotSets - case "appStoreVersion": self = .appStoreVersion - case "description": self = .description - case "keywords": self = .keywords - case "locale": self = .locale - case "marketingUrl": self = .marketingUrl - case "promotionalText": self = .promotionalText - case "supportUrl": self = .supportUrl - case "whatsNew": self = .whatsNew - default: self = .unknown(rawValue) - } - } - } - - public enum AppStoreVersionPhasedReleases: Hashable, Codable, RawRepresentable { - case appStoreVersion - case currentDayNumber - case phasedReleaseState - case startDate - case totalPauseDuration - case unknown(String) - - public var rawValue: String { - switch self { - case .appStoreVersion: return "appStoreVersion" - case .currentDayNumber: return "currentDayNumber" - case .phasedReleaseState: return "phasedReleaseState" - case .startDate: return "startDate" - case .totalPauseDuration: return "totalPauseDuration" - case .unknown(let rawValue): return rawValue - } + self.rawValue = rawValue + } + } + + public struct AppStoreVersionLocalizations: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var appPreviewSets: Self { + .init(rawValue: "appPreviewSets") + } + + public static var appScreenshotSets: Self { + .init(rawValue: "appScreenshotSets") + } + + public static var appStoreVersion: Self { + .init(rawValue: "appStoreVersion") + } + + public static var description: Self { + .init(rawValue: "description") + } + + public static var keywords: Self { + .init(rawValue: "keywords") + } + + public static var locale: Self { + .init(rawValue: "locale") + } + + public static var marketingUrl: Self { + .init(rawValue: "marketingUrl") + } + + public static var promotionalText: Self { + .init(rawValue: "promotionalText") + } + + public static var supportUrl: Self { + .init(rawValue: "supportUrl") + } + + public static var whatsNew: Self { + .init(rawValue: "whatsNew") + } + + public var description: String { + rawValue } + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct AppStoreVersionPhasedReleases: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var currentDayNumber: Self { + .init(rawValue: "currentDayNumber") + } + + public static var phasedReleaseState: Self { + .init(rawValue: "phasedReleaseState") + } + + public static var startDate: Self { + .init(rawValue: "startDate") + } + + public static var totalPauseDuration: Self { + .init(rawValue: "totalPauseDuration") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "appStoreVersion": self = .appStoreVersion - case "currentDayNumber": self = .currentDayNumber - case "phasedReleaseState": self = .phasedReleaseState - case "startDate": self = .startDate - case "totalPauseDuration": self = .totalPauseDuration - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum AppStoreVersionSubmissions: Hashable, Codable, RawRepresentable { - case appStoreVersion - case unknown(String) + public struct AppStoreVersionSubmissions: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var appStoreVersion: Self { + .init(rawValue: "appStoreVersion") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct AppStoreVersions: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var ageRatingDeclaration: Self { + .init(rawValue: "ageRatingDeclaration") + } + + public static var alternativeDistributionPackage: Self { + .init(rawValue: "alternativeDistributionPackage") + } + + public static var app: Self { + .init(rawValue: "app") + } + + public static var appClipDefaultExperience: Self { + .init(rawValue: "appClipDefaultExperience") + } + + public static var appStoreReviewDetail: Self { + .init(rawValue: "appStoreReviewDetail") + } + + public static var appStoreState: Self { + .init(rawValue: "appStoreState") + } + + public static var appStoreVersionExperiments: Self { + .init(rawValue: "appStoreVersionExperiments") + } + + public static var appStoreVersionExperimentsV2: Self { + .init(rawValue: "appStoreVersionExperimentsV2") + } - public var rawValue: String { - switch self { - case .appStoreVersion: return "appStoreVersion" - case .unknown(let rawValue): return rawValue - } + public static var appStoreVersionLocalizations: Self { + .init(rawValue: "appStoreVersionLocalizations") } + public static var appStoreVersionPhasedRelease: Self { + .init(rawValue: "appStoreVersionPhasedRelease") + } + + public static var appStoreVersionSubmission: Self { + .init(rawValue: "appStoreVersionSubmission") + } + + public static var appVersionState: Self { + .init(rawValue: "appVersionState") + } + + public static var build: Self { + .init(rawValue: "build") + } + + public static var copyright: Self { + .init(rawValue: "copyright") + } + + public static var createdDate: Self { + .init(rawValue: "createdDate") + } + + public static var customerReviews: Self { + .init(rawValue: "customerReviews") + } + + public static var downloadable: Self { + .init(rawValue: "downloadable") + } + + public static var earliestReleaseDate: Self { + .init(rawValue: "earliestReleaseDate") + } + + public static var gameCenterAppVersion: Self { + .init(rawValue: "gameCenterAppVersion") + } + + public static var platform: Self { + .init(rawValue: "platform") + } + + public static var releaseType: Self { + .init(rawValue: "releaseType") + } + + public static var reviewType: Self { + .init(rawValue: "reviewType") + } + + public static var routingAppCoverage: Self { + .init(rawValue: "routingAppCoverage") + } + + public static var usesIdfa: Self { + .init(rawValue: "usesIdfa") + } + + public static var versionString: Self { + .init(rawValue: "versionString") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "appStoreVersion": self = .appStoreVersion - default: self = .unknown(rawValue) - } - } - } - - public enum AppStoreVersions: Hashable, Codable, RawRepresentable { - case ageRatingDeclaration - case app - case appClipDefaultExperience - case appStoreReviewDetail - case appStoreState - case appStoreVersionExperiments - case appStoreVersionExperimentsV2 - case appStoreVersionLocalizations - case appStoreVersionPhasedRelease - case appStoreVersionSubmission - case build - case copyright - case createdDate - case customerReviews - case downloadable - case earliestReleaseDate - case platform - case releaseType - case routingAppCoverage - case versionString - case unknown(String) - - public var rawValue: String { - switch self { - case .ageRatingDeclaration: return "ageRatingDeclaration" - case .app: return "app" - case .appClipDefaultExperience: return "appClipDefaultExperience" - case .appStoreReviewDetail: return "appStoreReviewDetail" - case .appStoreState: return "appStoreState" - case .appStoreVersionExperiments: return "appStoreVersionExperiments" - case .appStoreVersionExperimentsV2: return "appStoreVersionExperimentsV2" - case .appStoreVersionLocalizations: return "appStoreVersionLocalizations" - case .appStoreVersionPhasedRelease: return "appStoreVersionPhasedRelease" - case .appStoreVersionSubmission: return "appStoreVersionSubmission" - case .build: return "build" - case .copyright: return "copyright" - case .createdDate: return "createdDate" - case .customerReviews: return "customerReviews" - case .downloadable: return "downloadable" - case .earliestReleaseDate: return "earliestReleaseDate" - case .platform: return "platform" - case .releaseType: return "releaseType" - case .routingAppCoverage: return "routingAppCoverage" - case .versionString: return "versionString" - case .unknown(let rawValue): return rawValue - } + self.rawValue = rawValue + } + } + + public struct Apps: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var accessibilityDeclarations: Self { + .init(rawValue: "accessibilityDeclarations") + } + + public static var accessibilityUrl: Self { + .init(rawValue: "accessibilityUrl") + } + + public static var alternativeDistributionKey: Self { + .init(rawValue: "alternativeDistributionKey") + } + + public static var analyticsReportRequests: Self { + .init(rawValue: "analyticsReportRequests") + } + + public static var appAvailabilityV2: Self { + .init(rawValue: "appAvailabilityV2") + } + + public static var appClips: Self { + .init(rawValue: "appClips") + } + + public static var appCustomProductPages: Self { + .init(rawValue: "appCustomProductPages") + } + + public static var appEncryptionDeclarations: Self { + .init(rawValue: "appEncryptionDeclarations") + } + + public static var appEvents: Self { + .init(rawValue: "appEvents") + } + + public static var appInfos: Self { + .init(rawValue: "appInfos") + } + + public static var appPricePoints: Self { + .init(rawValue: "appPricePoints") + } + + public static var appPriceSchedule: Self { + .init(rawValue: "appPriceSchedule") + } + + public static var appStoreVersionExperimentsV2: Self { + .init(rawValue: "appStoreVersionExperimentsV2") + } + + public static var appStoreVersions: Self { + .init(rawValue: "appStoreVersions") + } + + public static var backgroundAssets: Self { + .init(rawValue: "backgroundAssets") } + public static var betaAppLocalizations: Self { + .init(rawValue: "betaAppLocalizations") + } + + public static var betaAppReviewDetail: Self { + .init(rawValue: "betaAppReviewDetail") + } + + public static var betaFeedbackCrashSubmissions: Self { + .init(rawValue: "betaFeedbackCrashSubmissions") + } + + public static var betaFeedbackScreenshotSubmissions: Self { + .init(rawValue: "betaFeedbackScreenshotSubmissions") + } + + public static var betaGroups: Self { + .init(rawValue: "betaGroups") + } + + public static var betaLicenseAgreement: Self { + .init(rawValue: "betaLicenseAgreement") + } + + public static var betaTesters: Self { + .init(rawValue: "betaTesters") + } + + public static var builds: Self { + .init(rawValue: "builds") + } + + public static var bundleId: Self { + .init(rawValue: "bundleId") + } + + public static var ciProduct: Self { + .init(rawValue: "ciProduct") + } + + public static var contentRightsDeclaration: Self { + .init(rawValue: "contentRightsDeclaration") + } + + public static var customerReviewSummarizations: Self { + .init(rawValue: "customerReviewSummarizations") + } + + public static var customerReviews: Self { + .init(rawValue: "customerReviews") + } + + public static var endUserLicenseAgreement: Self { + .init(rawValue: "endUserLicenseAgreement") + } + + public static var gameCenterDetail: Self { + .init(rawValue: "gameCenterDetail") + } + + public static var gameCenterEnabledVersions: Self { + .init(rawValue: "gameCenterEnabledVersions") + } + + public static var inAppPurchases: Self { + .init(rawValue: "inAppPurchases") + } + + public static var inAppPurchasesV2: Self { + .init(rawValue: "inAppPurchasesV2") + } + + public static var isOrEverWasMadeForKids: Self { + .init(rawValue: "isOrEverWasMadeForKids") + } + + public static var marketplaceSearchDetail: Self { + .init(rawValue: "marketplaceSearchDetail") + } + + public static var name: Self { + .init(rawValue: "name") + } + + public static var perfPowerMetrics: Self { + .init(rawValue: "perfPowerMetrics") + } + + public static var preReleaseVersions: Self { + .init(rawValue: "preReleaseVersions") + } + + public static var primaryLocale: Self { + .init(rawValue: "primaryLocale") + } + + public static var promotedPurchases: Self { + .init(rawValue: "promotedPurchases") + } + + public static var reviewSubmissions: Self { + .init(rawValue: "reviewSubmissions") + } + + public static var sku: Self { + .init(rawValue: "sku") + } + + public static var streamlinedPurchasingEnabled: Self { + .init(rawValue: "streamlinedPurchasingEnabled") + } + + public static var subscriptionGracePeriod: Self { + .init(rawValue: "subscriptionGracePeriod") + } + + public static var subscriptionGroups: Self { + .init(rawValue: "subscriptionGroups") + } + + public static var subscriptionStatusUrl: Self { + .init(rawValue: "subscriptionStatusUrl") + } + + public static var subscriptionStatusUrlForSandbox: Self { + .init(rawValue: "subscriptionStatusUrlForSandbox") + } + + public static var subscriptionStatusUrlVersion: Self { + .init(rawValue: "subscriptionStatusUrlVersion") + } + + public static var subscriptionStatusUrlVersionForSandbox: Self { + .init(rawValue: "subscriptionStatusUrlVersionForSandbox") + } + + public static var webhooks: Self { + .init(rawValue: "webhooks") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "ageRatingDeclaration": self = .ageRatingDeclaration - case "app": self = .app - case "appClipDefaultExperience": self = .appClipDefaultExperience - case "appStoreReviewDetail": self = .appStoreReviewDetail - case "appStoreState": self = .appStoreState - case "appStoreVersionExperiments": self = .appStoreVersionExperiments - case "appStoreVersionExperimentsV2": self = .appStoreVersionExperimentsV2 - case "appStoreVersionLocalizations": self = .appStoreVersionLocalizations - case "appStoreVersionPhasedRelease": self = .appStoreVersionPhasedRelease - case "appStoreVersionSubmission": self = .appStoreVersionSubmission - case "build": self = .build - case "copyright": self = .copyright - case "createdDate": self = .createdDate - case "customerReviews": self = .customerReviews - case "downloadable": self = .downloadable - case "earliestReleaseDate": self = .earliestReleaseDate - case "platform": self = .platform - case "releaseType": self = .releaseType - case "routingAppCoverage": self = .routingAppCoverage - case "versionString": self = .versionString - default: self = .unknown(rawValue) - } - } - } - - public enum Apps: Hashable, Codable, RawRepresentable { - case appAvailability - case appClips - case appCustomProductPages - case appEncryptionDeclarations - case appEvents - case appInfos - case appPricePoints - case appPriceSchedule - case appStoreVersionExperimentsV2 - case appStoreVersions - case availableInNewTerritories - case availableTerritories - case betaAppLocalizations - case betaAppReviewDetail - case betaGroups - case betaLicenseAgreement - case betaTesters - case builds - case bundleId - case ciProduct - case contentRightsDeclaration - case customerReviews - case endUserLicenseAgreement - case gameCenterDetail - case gameCenterEnabledVersions - case inAppPurchases - case inAppPurchasesV2 - case isOrEverWasMadeForKids - case name - case perfPowerMetrics - case preOrder - case preReleaseVersions - case pricePoints - case prices - case primaryLocale - case promotedPurchases - case reviewSubmissions - case sku - case subscriptionGracePeriod - case subscriptionGroups - case subscriptionStatusUrl - case subscriptionStatusUrlForSandbox - case subscriptionStatusUrlVersion - case subscriptionStatusUrlVersionForSandbox - case unknown(String) - - public var rawValue: String { - switch self { - case .appAvailability: return "appAvailability" - case .appClips: return "appClips" - case .appCustomProductPages: return "appCustomProductPages" - case .appEncryptionDeclarations: return "appEncryptionDeclarations" - case .appEvents: return "appEvents" - case .appInfos: return "appInfos" - case .appPricePoints: return "appPricePoints" - case .appPriceSchedule: return "appPriceSchedule" - case .appStoreVersionExperimentsV2: return "appStoreVersionExperimentsV2" - case .appStoreVersions: return "appStoreVersions" - case .availableInNewTerritories: return "availableInNewTerritories" - case .availableTerritories: return "availableTerritories" - case .betaAppLocalizations: return "betaAppLocalizations" - case .betaAppReviewDetail: return "betaAppReviewDetail" - case .betaGroups: return "betaGroups" - case .betaLicenseAgreement: return "betaLicenseAgreement" - case .betaTesters: return "betaTesters" - case .builds: return "builds" - case .bundleId: return "bundleId" - case .ciProduct: return "ciProduct" - case .contentRightsDeclaration: return "contentRightsDeclaration" - case .customerReviews: return "customerReviews" - case .endUserLicenseAgreement: return "endUserLicenseAgreement" - case .gameCenterDetail: return "gameCenterDetail" - case .gameCenterEnabledVersions: return "gameCenterEnabledVersions" - case .inAppPurchases: return "inAppPurchases" - case .inAppPurchasesV2: return "inAppPurchasesV2" - case .isOrEverWasMadeForKids: return "isOrEverWasMadeForKids" - case .name: return "name" - case .perfPowerMetrics: return "perfPowerMetrics" - case .preOrder: return "preOrder" - case .preReleaseVersions: return "preReleaseVersions" - case .pricePoints: return "pricePoints" - case .prices: return "prices" - case .primaryLocale: return "primaryLocale" - case .promotedPurchases: return "promotedPurchases" - case .reviewSubmissions: return "reviewSubmissions" - case .sku: return "sku" - case .subscriptionGracePeriod: return "subscriptionGracePeriod" - case .subscriptionGroups: return "subscriptionGroups" - case .subscriptionStatusUrl: return "subscriptionStatusUrl" - case .subscriptionStatusUrlForSandbox: return "subscriptionStatusUrlForSandbox" - case .subscriptionStatusUrlVersion: return "subscriptionStatusUrlVersion" - case .subscriptionStatusUrlVersionForSandbox: return "subscriptionStatusUrlVersionForSandbox" - case .unknown(let rawValue): return rawValue - } + self.rawValue = rawValue + } + } + + public struct Builds: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var app: Self { + .init(rawValue: "app") + } + + public static var appEncryptionDeclaration: Self { + .init(rawValue: "appEncryptionDeclaration") + } + + public static var appStoreVersion: Self { + .init(rawValue: "appStoreVersion") } + public static var betaAppReviewSubmission: Self { + .init(rawValue: "betaAppReviewSubmission") + } + + public static var betaBuildLocalizations: Self { + .init(rawValue: "betaBuildLocalizations") + } + + public static var betaGroups: Self { + .init(rawValue: "betaGroups") + } + + public static var buildAudienceType: Self { + .init(rawValue: "buildAudienceType") + } + + public static var buildBetaDetail: Self { + .init(rawValue: "buildBetaDetail") + } + + public static var buildBundles: Self { + .init(rawValue: "buildBundles") + } + + public static var computedMinMacOsVersion: Self { + .init(rawValue: "computedMinMacOsVersion") + } + + public static var computedMinVisionOsVersion: Self { + .init(rawValue: "computedMinVisionOsVersion") + } + + public static var diagnosticSignatures: Self { + .init(rawValue: "diagnosticSignatures") + } + + public static var expirationDate: Self { + .init(rawValue: "expirationDate") + } + + public static var expired: Self { + .init(rawValue: "expired") + } + + public static var iconAssetToken: Self { + .init(rawValue: "iconAssetToken") + } + + public static var icons: Self { + .init(rawValue: "icons") + } + + public static var individualTesters: Self { + .init(rawValue: "individualTesters") + } + + public static var lsMinimumSystemVersion: Self { + .init(rawValue: "lsMinimumSystemVersion") + } + + public static var minOsVersion: Self { + .init(rawValue: "minOsVersion") + } + + public static var perfPowerMetrics: Self { + .init(rawValue: "perfPowerMetrics") + } + + public static var preReleaseVersion: Self { + .init(rawValue: "preReleaseVersion") + } + + public static var processingState: Self { + .init(rawValue: "processingState") + } + + public static var uploadedDate: Self { + .init(rawValue: "uploadedDate") + } + + public static var usesNonExemptEncryption: Self { + .init(rawValue: "usesNonExemptEncryption") + } + + public static var version: Self { + .init(rawValue: "version") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "appAvailability": self = .appAvailability - case "appClips": self = .appClips - case "appCustomProductPages": self = .appCustomProductPages - case "appEncryptionDeclarations": self = .appEncryptionDeclarations - case "appEvents": self = .appEvents - case "appInfos": self = .appInfos - case "appPricePoints": self = .appPricePoints - case "appPriceSchedule": self = .appPriceSchedule - case "appStoreVersionExperimentsV2": self = .appStoreVersionExperimentsV2 - case "appStoreVersions": self = .appStoreVersions - case "availableInNewTerritories": self = .availableInNewTerritories - case "availableTerritories": self = .availableTerritories - case "betaAppLocalizations": self = .betaAppLocalizations - case "betaAppReviewDetail": self = .betaAppReviewDetail - case "betaGroups": self = .betaGroups - case "betaLicenseAgreement": self = .betaLicenseAgreement - case "betaTesters": self = .betaTesters - case "builds": self = .builds - case "bundleId": self = .bundleId - case "ciProduct": self = .ciProduct - case "contentRightsDeclaration": self = .contentRightsDeclaration - case "customerReviews": self = .customerReviews - case "endUserLicenseAgreement": self = .endUserLicenseAgreement - case "gameCenterDetail": self = .gameCenterDetail - case "gameCenterEnabledVersions": self = .gameCenterEnabledVersions - case "inAppPurchases": self = .inAppPurchases - case "inAppPurchasesV2": self = .inAppPurchasesV2 - case "isOrEverWasMadeForKids": self = .isOrEverWasMadeForKids - case "name": self = .name - case "perfPowerMetrics": self = .perfPowerMetrics - case "preOrder": self = .preOrder - case "preReleaseVersions": self = .preReleaseVersions - case "pricePoints": self = .pricePoints - case "prices": self = .prices - case "primaryLocale": self = .primaryLocale - case "promotedPurchases": self = .promotedPurchases - case "reviewSubmissions": self = .reviewSubmissions - case "sku": self = .sku - case "subscriptionGracePeriod": self = .subscriptionGracePeriod - case "subscriptionGroups": self = .subscriptionGroups - case "subscriptionStatusUrl": self = .subscriptionStatusUrl - case "subscriptionStatusUrlForSandbox": self = .subscriptionStatusUrlForSandbox - case "subscriptionStatusUrlVersion": self = .subscriptionStatusUrlVersion - case "subscriptionStatusUrlVersionForSandbox": self = .subscriptionStatusUrlVersionForSandbox - default: self = .unknown(rawValue) - } - } - } - - public enum Builds: Hashable, Codable, RawRepresentable { - case app - case appEncryptionDeclaration - case appStoreVersion - case betaAppReviewSubmission - case betaBuildLocalizations - case betaGroups - case buildAudienceType - case buildBetaDetail - case buildBundles - case computedMinMacOsVersion - case diagnosticSignatures - case expirationDate - case expired - case iconAssetToken - case icons - case individualTesters - case lsMinimumSystemVersion - case minOsVersion - case perfPowerMetrics - case preReleaseVersion - case processingState - case uploadedDate - case usesNonExemptEncryption - case version - case unknown(String) - - public var rawValue: String { - switch self { - case .app: return "app" - case .appEncryptionDeclaration: return "appEncryptionDeclaration" - case .appStoreVersion: return "appStoreVersion" - case .betaAppReviewSubmission: return "betaAppReviewSubmission" - case .betaBuildLocalizations: return "betaBuildLocalizations" - case .betaGroups: return "betaGroups" - case .buildAudienceType: return "buildAudienceType" - case .buildBetaDetail: return "buildBetaDetail" - case .buildBundles: return "buildBundles" - case .computedMinMacOsVersion: return "computedMinMacOsVersion" - case .diagnosticSignatures: return "diagnosticSignatures" - case .expirationDate: return "expirationDate" - case .expired: return "expired" - case .iconAssetToken: return "iconAssetToken" - case .icons: return "icons" - case .individualTesters: return "individualTesters" - case .lsMinimumSystemVersion: return "lsMinimumSystemVersion" - case .minOsVersion: return "minOsVersion" - case .perfPowerMetrics: return "perfPowerMetrics" - case .preReleaseVersion: return "preReleaseVersion" - case .processingState: return "processingState" - case .uploadedDate: return "uploadedDate" - case .usesNonExemptEncryption: return "usesNonExemptEncryption" - case .version: return "version" - case .unknown(let rawValue): return rawValue - } + self.rawValue = rawValue + } + } + + public struct GameCenterAppVersions: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var appStoreVersion: Self { + .init(rawValue: "appStoreVersion") + } + + public static var compatibilityVersions: Self { + .init(rawValue: "compatibilityVersions") + } + + public static var enabled: Self { + .init(rawValue: "enabled") + } + + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "app": self = .app - case "appEncryptionDeclaration": self = .appEncryptionDeclaration - case "appStoreVersion": self = .appStoreVersion - case "betaAppReviewSubmission": self = .betaAppReviewSubmission - case "betaBuildLocalizations": self = .betaBuildLocalizations - case "betaGroups": self = .betaGroups - case "buildAudienceType": self = .buildAudienceType - case "buildBetaDetail": self = .buildBetaDetail - case "buildBundles": self = .buildBundles - case "computedMinMacOsVersion": self = .computedMinMacOsVersion - case "diagnosticSignatures": self = .diagnosticSignatures - case "expirationDate": self = .expirationDate - case "expired": self = .expired - case "iconAssetToken": self = .iconAssetToken - case "icons": self = .icons - case "individualTesters": self = .individualTesters - case "lsMinimumSystemVersion": self = .lsMinimumSystemVersion - case "minOsVersion": self = .minOsVersion - case "perfPowerMetrics": self = .perfPowerMetrics - case "preReleaseVersion": self = .preReleaseVersion - case "processingState": self = .processingState - case "uploadedDate": self = .uploadedDate - case "usesNonExemptEncryption": self = .usesNonExemptEncryption - case "version": self = .version - default: self = .unknown(rawValue) - } - } - } - - public enum RoutingAppCoverages: Hashable, Codable, RawRepresentable { - case appStoreVersion - case assetDeliveryState - case fileName - case fileSize - case sourceFileChecksum - case uploadOperations - case uploaded - case unknown(String) - - public var rawValue: String { - switch self { - case .appStoreVersion: return "appStoreVersion" - case .assetDeliveryState: return "assetDeliveryState" - case .fileName: return "fileName" - case .fileSize: return "fileSize" - case .sourceFileChecksum: return "sourceFileChecksum" - case .uploadOperations: return "uploadOperations" - case .uploaded: return "uploaded" - case .unknown(let rawValue): return rawValue - } + self.rawValue = rawValue + } + } + + public struct RoutingAppCoverages: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var appStoreVersion: Self { + .init(rawValue: "appStoreVersion") } + public static var assetDeliveryState: Self { + .init(rawValue: "assetDeliveryState") + } + + public static var fileName: Self { + .init(rawValue: "fileName") + } + + public static var fileSize: Self { + .init(rawValue: "fileSize") + } + + public static var sourceFileChecksum: Self { + .init(rawValue: "sourceFileChecksum") + } + + public static var uploadOperations: Self { + .init(rawValue: "uploadOperations") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "appStoreVersion": self = .appStoreVersion - case "assetDeliveryState": self = .assetDeliveryState - case "fileName": self = .fileName - case "fileSize": self = .fileSize - case "sourceFileChecksum": self = .sourceFileChecksum - case "uploadOperations": self = .uploadOperations - case "uploaded": self = .uploaded - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } @@ -768,6 +965,11 @@ extension V1.Builds.ById.AppStoreVersion.GET { .init(key: "fields[ageRatingDeclarations]") } + /// the fields to include for returned resources of type alternativeDistributionPackages + public static var alternativeDistributionPackages: Relation<[AlternativeDistributionPackages]?> { + .init(key: "fields[alternativeDistributionPackages]") + } + /// the fields to include for returned resources of type appClipDefaultExperiences public static var appClipDefaultExperiences: Relation<[AppClipDefaultExperiences]?> { .init(key: "fields[appClipDefaultExperiences]") @@ -813,6 +1015,11 @@ extension V1.Builds.ById.AppStoreVersion.GET { .init(key: "fields[builds]") } + /// the fields to include for returned resources of type gameCenterAppVersions + public static var gameCenterAppVersions: Relation<[GameCenterAppVersions]?> { + .init(key: "fields[gameCenterAppVersions]") + } + /// the fields to include for returned resources of type routingAppCoverages public static var routingAppCoverages: Relation<[RoutingAppCoverages]?> { .init(key: "fields[routingAppCoverages]") @@ -826,52 +1033,67 @@ extension V1.Builds.ById.AppStoreVersion.GET { } } - public enum Include: Hashable, Codable, RawRepresentable { - case ageRatingDeclaration - case app - case appClipDefaultExperience - case appStoreReviewDetail - case appStoreVersionExperiments - case appStoreVersionExperimentsV2 - case appStoreVersionLocalizations - case appStoreVersionPhasedRelease - case appStoreVersionSubmission - case build - case routingAppCoverage - case unknown(String) - - public var rawValue: String { - switch self { - case .ageRatingDeclaration: return "ageRatingDeclaration" - case .app: return "app" - case .appClipDefaultExperience: return "appClipDefaultExperience" - case .appStoreReviewDetail: return "appStoreReviewDetail" - case .appStoreVersionExperiments: return "appStoreVersionExperiments" - case .appStoreVersionExperimentsV2: return "appStoreVersionExperimentsV2" - case .appStoreVersionLocalizations: return "appStoreVersionLocalizations" - case .appStoreVersionPhasedRelease: return "appStoreVersionPhasedRelease" - case .appStoreVersionSubmission: return "appStoreVersionSubmission" - case .build: return "build" - case .routingAppCoverage: return "routingAppCoverage" - case .unknown(let rawValue): return rawValue - } + public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var ageRatingDeclaration: Self { + .init(rawValue: "ageRatingDeclaration") + } + + public static var alternativeDistributionPackage: Self { + .init(rawValue: "alternativeDistributionPackage") } + public static var app: Self { + .init(rawValue: "app") + } + + public static var appClipDefaultExperience: Self { + .init(rawValue: "appClipDefaultExperience") + } + + public static var appStoreReviewDetail: Self { + .init(rawValue: "appStoreReviewDetail") + } + + public static var appStoreVersionExperiments: Self { + .init(rawValue: "appStoreVersionExperiments") + } + + public static var appStoreVersionExperimentsV2: Self { + .init(rawValue: "appStoreVersionExperimentsV2") + } + + public static var appStoreVersionLocalizations: Self { + .init(rawValue: "appStoreVersionLocalizations") + } + + public static var appStoreVersionPhasedRelease: Self { + .init(rawValue: "appStoreVersionPhasedRelease") + } + + public static var appStoreVersionSubmission: Self { + .init(rawValue: "appStoreVersionSubmission") + } + + public static var build: Self { + .init(rawValue: "build") + } + + public static var gameCenterAppVersion: Self { + .init(rawValue: "gameCenterAppVersion") + } + + public static var routingAppCoverage: Self { + .init(rawValue: "routingAppCoverage") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "ageRatingDeclaration": self = .ageRatingDeclaration - case "app": self = .app - case "appClipDefaultExperience": self = .appClipDefaultExperience - case "appStoreReviewDetail": self = .appStoreReviewDetail - case "appStoreVersionExperiments": self = .appStoreVersionExperiments - case "appStoreVersionExperimentsV2": self = .appStoreVersionExperimentsV2 - case "appStoreVersionLocalizations": self = .appStoreVersionLocalizations - case "appStoreVersionPhasedRelease": self = .appStoreVersionPhasedRelease - case "appStoreVersionSubmission": self = .appStoreVersionSubmission - case "build": self = .build - case "routingAppCoverage": self = .routingAppCoverage - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Builds/ById/BetaAppReviewSubmission/BuildsByIdBetaAppReviewSubmission.GET.f3df835.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Builds/ById/BetaAppReviewSubmission/BuildsByIdBetaAppReviewSubmission.GET.f3df835.generated.swift index ac05244b..3aa0cc82 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Builds/ById/BetaAppReviewSubmission/BuildsByIdBetaAppReviewSubmission.GET.f3df835.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Builds/ById/BetaAppReviewSubmission/BuildsByIdBetaAppReviewSubmission.GET.f3df835.generated.swift @@ -42,8 +42,10 @@ extension V1.Builds.ById.BetaAppReviewSubmission { /// - Returns: **200**, Single BetaAppReviewSubmission with get as `BetaAppReviewSubmissionWithoutIncludesResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -57,12 +59,18 @@ extension V1.Builds.ById.BetaAppReviewSubmission { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 404: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -82,28 +90,27 @@ extension V1.Builds.ById.BetaAppReviewSubmission.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum BetaAppReviewSubmissions: Hashable, Codable, RawRepresentable { - case betaReviewState - case build - case submittedDate - case unknown(String) - - public var rawValue: String { - switch self { - case .betaReviewState: return "betaReviewState" - case .build: return "build" - case .submittedDate: return "submittedDate" - case .unknown(let rawValue): return rawValue - } + public struct BetaAppReviewSubmissions: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var betaReviewState: Self { + .init(rawValue: "betaReviewState") + } + + public static var build: Self { + .init(rawValue: "build") } + public static var submittedDate: Self { + .init(rawValue: "submittedDate") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "betaReviewState": self = .betaReviewState - case "build": self = .build - case "submittedDate": self = .submittedDate - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Builds/ById/BetaBuildLocalizations/BuildsByIdBetaBuildLocalizations.GET.441a524.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Builds/ById/BetaBuildLocalizations/BuildsByIdBetaBuildLocalizations.GET.441a524.generated.swift index 0d2bdb97..59cc3361 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Builds/ById/BetaBuildLocalizations/BuildsByIdBetaBuildLocalizations.GET.441a524.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Builds/ById/BetaBuildLocalizations/BuildsByIdBetaBuildLocalizations.GET.441a524.generated.swift @@ -44,8 +44,10 @@ extension V1.Builds.ById.BetaBuildLocalizations { /// - Returns: **200**, List of BetaBuildLocalizations with get as `BetaBuildLocalizationsWithoutIncludesResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -59,12 +61,18 @@ extension V1.Builds.ById.BetaBuildLocalizations { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 404: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -87,28 +95,27 @@ extension V1.Builds.ById.BetaBuildLocalizations.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum BetaBuildLocalizations: Hashable, Codable, RawRepresentable { - case build - case locale - case whatsNew - case unknown(String) - - public var rawValue: String { - switch self { - case .build: return "build" - case .locale: return "locale" - case .whatsNew: return "whatsNew" - case .unknown(let rawValue): return rawValue - } + public struct BetaBuildLocalizations: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var build: Self { + .init(rawValue: "build") + } + + public static var locale: Self { + .init(rawValue: "locale") } + public static var whatsNew: Self { + .init(rawValue: "whatsNew") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "build": self = .build - case "locale": self = .locale - case "whatsNew": self = .whatsNew - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Builds/ById/BuildBetaDetail/BuildsByIdBuildBetaDetail.GET.e3302fd.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Builds/ById/BuildBetaDetail/BuildsByIdBuildBetaDetail.GET.e3302fd.generated.swift index aa841ce6..be2a8468 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Builds/ById/BuildBetaDetail/BuildsByIdBuildBetaDetail.GET.e3302fd.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Builds/ById/BuildBetaDetail/BuildsByIdBuildBetaDetail.GET.e3302fd.generated.swift @@ -8,7 +8,7 @@ import FoundationNetworking extension V1.Builds.ById.BuildBetaDetail { public struct GET: Endpoint { - public typealias Response = BuildBetaDetailWithoutIncludesResponse + public typealias Response = BuildBetaDetailResponse public var path: String { "/v1/builds/\(id)/buildBetaDetail" @@ -29,7 +29,11 @@ extension V1.Builds.ById.BuildBetaDetail { components?.queryItems = [ URLQueryItem(name: "fields[buildBetaDetails]", - value: parameters.fields[.buildBetaDetails]?.map { "\($0)" }.joined(separator: ",")) + value: parameters.fields[.buildBetaDetails]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "fields[builds]", + value: parameters.fields[.builds]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "include", + value: parameters.include?.map { "\($0)" }.joined(separator: ",")) ].filter { $0.value != nil } if components?.queryItems?.isEmpty ?? false { components?.queryItems = nil @@ -40,10 +44,12 @@ extension V1.Builds.ById.BuildBetaDetail { return urlRequest } - /// - Returns: **200**, Single BuildBetaDetail with get as `BuildBetaDetailWithoutIncludesResponse` + /// - Returns: **200**, Single BuildBetaDetail as `BuildBetaDetailResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -52,17 +58,23 @@ extension V1.Builds.ById.BuildBetaDetail { switch urlResponse.statusCode { case 200: - return try jsonDecoder.decode(BuildBetaDetailWithoutIncludesResponse.self, from: data) + return try jsonDecoder.decode(BuildBetaDetailResponse.self, from: data) case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 404: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -74,6 +86,9 @@ extension V1.Builds.ById.BuildBetaDetail.GET { public struct Parameters: Hashable { public var fields: Fields = Fields() + /// comma-separated list of relationships to include + public var include: [Include]? + public struct Fields: Hashable { public subscript (_ relation: Relation) -> T { get { values[relation]?.base as! T } @@ -82,31 +97,143 @@ extension V1.Builds.ById.BuildBetaDetail.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum BuildBetaDetails: Hashable, Codable, RawRepresentable { - case autoNotifyEnabled - case build - case externalBuildState - case internalBuildState - case unknown(String) + public struct BuildBetaDetails: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var autoNotifyEnabled: Self { + .init(rawValue: "autoNotifyEnabled") + } + + public static var build: Self { + .init(rawValue: "build") + } + + public static var externalBuildState: Self { + .init(rawValue: "externalBuildState") + } + + public static var internalBuildState: Self { + .init(rawValue: "internalBuildState") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct Builds: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var app: Self { + .init(rawValue: "app") + } + + public static var appEncryptionDeclaration: Self { + .init(rawValue: "appEncryptionDeclaration") + } + + public static var appStoreVersion: Self { + .init(rawValue: "appStoreVersion") + } + + public static var betaAppReviewSubmission: Self { + .init(rawValue: "betaAppReviewSubmission") + } + + public static var betaBuildLocalizations: Self { + .init(rawValue: "betaBuildLocalizations") + } + + public static var betaGroups: Self { + .init(rawValue: "betaGroups") + } + + public static var buildAudienceType: Self { + .init(rawValue: "buildAudienceType") + } + + public static var buildBetaDetail: Self { + .init(rawValue: "buildBetaDetail") + } + + public static var buildBundles: Self { + .init(rawValue: "buildBundles") + } + + public static var computedMinMacOsVersion: Self { + .init(rawValue: "computedMinMacOsVersion") + } + + public static var computedMinVisionOsVersion: Self { + .init(rawValue: "computedMinVisionOsVersion") + } + + public static var diagnosticSignatures: Self { + .init(rawValue: "diagnosticSignatures") + } + + public static var expirationDate: Self { + .init(rawValue: "expirationDate") + } + + public static var expired: Self { + .init(rawValue: "expired") + } + + public static var iconAssetToken: Self { + .init(rawValue: "iconAssetToken") + } + + public static var icons: Self { + .init(rawValue: "icons") + } + + public static var individualTesters: Self { + .init(rawValue: "individualTesters") + } + + public static var lsMinimumSystemVersion: Self { + .init(rawValue: "lsMinimumSystemVersion") + } + + public static var minOsVersion: Self { + .init(rawValue: "minOsVersion") + } + + public static var perfPowerMetrics: Self { + .init(rawValue: "perfPowerMetrics") + } + + public static var preReleaseVersion: Self { + .init(rawValue: "preReleaseVersion") + } + + public static var processingState: Self { + .init(rawValue: "processingState") + } + + public static var uploadedDate: Self { + .init(rawValue: "uploadedDate") + } - public var rawValue: String { - switch self { - case .autoNotifyEnabled: return "autoNotifyEnabled" - case .build: return "build" - case .externalBuildState: return "externalBuildState" - case .internalBuildState: return "internalBuildState" - case .unknown(let rawValue): return rawValue - } + public static var usesNonExemptEncryption: Self { + .init(rawValue: "usesNonExemptEncryption") } + public static var version: Self { + .init(rawValue: "version") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "autoNotifyEnabled": self = .autoNotifyEnabled - case "build": self = .build - case "externalBuildState": self = .externalBuildState - case "internalBuildState": self = .internalBuildState - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } @@ -116,6 +243,11 @@ extension V1.Builds.ById.BuildBetaDetail.GET { .init(key: "fields[buildBetaDetails]") } + /// the fields to include for returned resources of type builds + public static var builds: Relation<[Builds]?> { + .init(key: "fields[builds]") + } + internal let key: String public func hash(into hasher: inout Hasher) { @@ -123,6 +255,22 @@ extension V1.Builds.ById.BuildBetaDetail.GET { } } } + + public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var build: Self { + .init(rawValue: "build") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Builds/ById/BuildsById.GET.30b1941.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Builds/ById/BuildsById.GET.30b1941.generated.swift index 86d0a346..f9ef6133 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Builds/ById/BuildsById.GET.30b1941.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Builds/ById/BuildsById.GET.30b1941.generated.swift @@ -46,10 +46,6 @@ extension V1.Builds.ById { value: parameters.fields[.buildIcons]?.map { "\($0)" }.joined(separator: ",")), URLQueryItem(name: "fields[builds]", value: parameters.fields[.builds]?.map { "\($0)" }.joined(separator: ",")), - URLQueryItem(name: "fields[diagnosticSignatures]", - value: parameters.fields[.diagnosticSignatures]?.map { "\($0)" }.joined(separator: ",")), - URLQueryItem(name: "fields[perfPowerMetrics]", - value: parameters.fields[.perfPowerMetrics]?.map { "\($0)" }.joined(separator: ",")), URLQueryItem(name: "fields[preReleaseVersions]", value: parameters.fields[.preReleaseVersions]?.map { "\($0)" }.joined(separator: ",")), URLQueryItem(name: "include", @@ -76,8 +72,10 @@ extension V1.Builds.ById { /// - Returns: **200**, Single Build as `BuildResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -91,12 +89,18 @@ extension V1.Builds.ById { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 404: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -121,603 +125,691 @@ extension V1.Builds.ById.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum AppEncryptionDeclarations: Hashable, Codable, RawRepresentable { - case app - case appDescription - case appEncryptionDeclarationDocument - case appEncryptionDeclarationState - case availableOnFrenchStore - case builds - case codeValue - case containsProprietaryCryptography - case containsThirdPartyCryptography - case createdDate - case documentName - case documentType - case documentUrl - case exempt - case platform - case uploadedDate - case usesEncryption - case unknown(String) - - public var rawValue: String { - switch self { - case .app: return "app" - case .appDescription: return "appDescription" - case .appEncryptionDeclarationDocument: return "appEncryptionDeclarationDocument" - case .appEncryptionDeclarationState: return "appEncryptionDeclarationState" - case .availableOnFrenchStore: return "availableOnFrenchStore" - case .builds: return "builds" - case .codeValue: return "codeValue" - case .containsProprietaryCryptography: return "containsProprietaryCryptography" - case .containsThirdPartyCryptography: return "containsThirdPartyCryptography" - case .createdDate: return "createdDate" - case .documentName: return "documentName" - case .documentType: return "documentType" - case .documentUrl: return "documentUrl" - case .exempt: return "exempt" - case .platform: return "platform" - case .uploadedDate: return "uploadedDate" - case .usesEncryption: return "usesEncryption" - case .unknown(let rawValue): return rawValue - } + public struct AppEncryptionDeclarations: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var app: Self { + .init(rawValue: "app") } - public init(rawValue: String) { - switch rawValue { - case "app": self = .app - case "appDescription": self = .appDescription - case "appEncryptionDeclarationDocument": self = .appEncryptionDeclarationDocument - case "appEncryptionDeclarationState": self = .appEncryptionDeclarationState - case "availableOnFrenchStore": self = .availableOnFrenchStore - case "builds": self = .builds - case "codeValue": self = .codeValue - case "containsProprietaryCryptography": self = .containsProprietaryCryptography - case "containsThirdPartyCryptography": self = .containsThirdPartyCryptography - case "createdDate": self = .createdDate - case "documentName": self = .documentName - case "documentType": self = .documentType - case "documentUrl": self = .documentUrl - case "exempt": self = .exempt - case "platform": self = .platform - case "uploadedDate": self = .uploadedDate - case "usesEncryption": self = .usesEncryption - default: self = .unknown(rawValue) - } + public static var appDescription: Self { + .init(rawValue: "appDescription") } - } - public enum AppStoreVersions: Hashable, Codable, RawRepresentable { - case ageRatingDeclaration - case app - case appClipDefaultExperience - case appStoreReviewDetail - case appStoreState - case appStoreVersionExperiments - case appStoreVersionExperimentsV2 - case appStoreVersionLocalizations - case appStoreVersionPhasedRelease - case appStoreVersionSubmission - case build - case copyright - case createdDate - case customerReviews - case downloadable - case earliestReleaseDate - case platform - case releaseType - case routingAppCoverage - case versionString - case unknown(String) - - public var rawValue: String { - switch self { - case .ageRatingDeclaration: return "ageRatingDeclaration" - case .app: return "app" - case .appClipDefaultExperience: return "appClipDefaultExperience" - case .appStoreReviewDetail: return "appStoreReviewDetail" - case .appStoreState: return "appStoreState" - case .appStoreVersionExperiments: return "appStoreVersionExperiments" - case .appStoreVersionExperimentsV2: return "appStoreVersionExperimentsV2" - case .appStoreVersionLocalizations: return "appStoreVersionLocalizations" - case .appStoreVersionPhasedRelease: return "appStoreVersionPhasedRelease" - case .appStoreVersionSubmission: return "appStoreVersionSubmission" - case .build: return "build" - case .copyright: return "copyright" - case .createdDate: return "createdDate" - case .customerReviews: return "customerReviews" - case .downloadable: return "downloadable" - case .earliestReleaseDate: return "earliestReleaseDate" - case .platform: return "platform" - case .releaseType: return "releaseType" - case .routingAppCoverage: return "routingAppCoverage" - case .versionString: return "versionString" - case .unknown(let rawValue): return rawValue - } + public static var appEncryptionDeclarationDocument: Self { + .init(rawValue: "appEncryptionDeclarationDocument") } - public init(rawValue: String) { - switch rawValue { - case "ageRatingDeclaration": self = .ageRatingDeclaration - case "app": self = .app - case "appClipDefaultExperience": self = .appClipDefaultExperience - case "appStoreReviewDetail": self = .appStoreReviewDetail - case "appStoreState": self = .appStoreState - case "appStoreVersionExperiments": self = .appStoreVersionExperiments - case "appStoreVersionExperimentsV2": self = .appStoreVersionExperimentsV2 - case "appStoreVersionLocalizations": self = .appStoreVersionLocalizations - case "appStoreVersionPhasedRelease": self = .appStoreVersionPhasedRelease - case "appStoreVersionSubmission": self = .appStoreVersionSubmission - case "build": self = .build - case "copyright": self = .copyright - case "createdDate": self = .createdDate - case "customerReviews": self = .customerReviews - case "downloadable": self = .downloadable - case "earliestReleaseDate": self = .earliestReleaseDate - case "platform": self = .platform - case "releaseType": self = .releaseType - case "routingAppCoverage": self = .routingAppCoverage - case "versionString": self = .versionString - default: self = .unknown(rawValue) - } + public static var appEncryptionDeclarationState: Self { + .init(rawValue: "appEncryptionDeclarationState") + } + + public static var availableOnFrenchStore: Self { + .init(rawValue: "availableOnFrenchStore") + } + + public static var builds: Self { + .init(rawValue: "builds") + } + + public static var codeValue: Self { + .init(rawValue: "codeValue") + } + + public static var containsProprietaryCryptography: Self { + .init(rawValue: "containsProprietaryCryptography") + } + + public static var containsThirdPartyCryptography: Self { + .init(rawValue: "containsThirdPartyCryptography") + } + + public static var createdDate: Self { + .init(rawValue: "createdDate") } - } - public enum Apps: Hashable, Codable, RawRepresentable { - case appAvailability - case appClips - case appCustomProductPages - case appEncryptionDeclarations - case appEvents - case appInfos - case appPricePoints - case appPriceSchedule - case appStoreVersionExperimentsV2 - case appStoreVersions - case availableInNewTerritories - case availableTerritories - case betaAppLocalizations - case betaAppReviewDetail - case betaGroups - case betaLicenseAgreement - case betaTesters - case builds - case bundleId - case ciProduct - case contentRightsDeclaration - case customerReviews - case endUserLicenseAgreement - case gameCenterDetail - case gameCenterEnabledVersions - case inAppPurchases - case inAppPurchasesV2 - case isOrEverWasMadeForKids - case name - case perfPowerMetrics - case preOrder - case preReleaseVersions - case pricePoints - case prices - case primaryLocale - case promotedPurchases - case reviewSubmissions - case sku - case subscriptionGracePeriod - case subscriptionGroups - case subscriptionStatusUrl - case subscriptionStatusUrlForSandbox - case subscriptionStatusUrlVersion - case subscriptionStatusUrlVersionForSandbox - case unknown(String) - - public var rawValue: String { - switch self { - case .appAvailability: return "appAvailability" - case .appClips: return "appClips" - case .appCustomProductPages: return "appCustomProductPages" - case .appEncryptionDeclarations: return "appEncryptionDeclarations" - case .appEvents: return "appEvents" - case .appInfos: return "appInfos" - case .appPricePoints: return "appPricePoints" - case .appPriceSchedule: return "appPriceSchedule" - case .appStoreVersionExperimentsV2: return "appStoreVersionExperimentsV2" - case .appStoreVersions: return "appStoreVersions" - case .availableInNewTerritories: return "availableInNewTerritories" - case .availableTerritories: return "availableTerritories" - case .betaAppLocalizations: return "betaAppLocalizations" - case .betaAppReviewDetail: return "betaAppReviewDetail" - case .betaGroups: return "betaGroups" - case .betaLicenseAgreement: return "betaLicenseAgreement" - case .betaTesters: return "betaTesters" - case .builds: return "builds" - case .bundleId: return "bundleId" - case .ciProduct: return "ciProduct" - case .contentRightsDeclaration: return "contentRightsDeclaration" - case .customerReviews: return "customerReviews" - case .endUserLicenseAgreement: return "endUserLicenseAgreement" - case .gameCenterDetail: return "gameCenterDetail" - case .gameCenterEnabledVersions: return "gameCenterEnabledVersions" - case .inAppPurchases: return "inAppPurchases" - case .inAppPurchasesV2: return "inAppPurchasesV2" - case .isOrEverWasMadeForKids: return "isOrEverWasMadeForKids" - case .name: return "name" - case .perfPowerMetrics: return "perfPowerMetrics" - case .preOrder: return "preOrder" - case .preReleaseVersions: return "preReleaseVersions" - case .pricePoints: return "pricePoints" - case .prices: return "prices" - case .primaryLocale: return "primaryLocale" - case .promotedPurchases: return "promotedPurchases" - case .reviewSubmissions: return "reviewSubmissions" - case .sku: return "sku" - case .subscriptionGracePeriod: return "subscriptionGracePeriod" - case .subscriptionGroups: return "subscriptionGroups" - case .subscriptionStatusUrl: return "subscriptionStatusUrl" - case .subscriptionStatusUrlForSandbox: return "subscriptionStatusUrlForSandbox" - case .subscriptionStatusUrlVersion: return "subscriptionStatusUrlVersion" - case .subscriptionStatusUrlVersionForSandbox: return "subscriptionStatusUrlVersionForSandbox" - case .unknown(let rawValue): return rawValue - } + public static var documentName: Self { + .init(rawValue: "documentName") } + public static var documentType: Self { + .init(rawValue: "documentType") + } + + public static var documentUrl: Self { + .init(rawValue: "documentUrl") + } + + public static var exempt: Self { + .init(rawValue: "exempt") + } + + public static var platform: Self { + .init(rawValue: "platform") + } + + public static var uploadedDate: Self { + .init(rawValue: "uploadedDate") + } + + public static var usesEncryption: Self { + .init(rawValue: "usesEncryption") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "appAvailability": self = .appAvailability - case "appClips": self = .appClips - case "appCustomProductPages": self = .appCustomProductPages - case "appEncryptionDeclarations": self = .appEncryptionDeclarations - case "appEvents": self = .appEvents - case "appInfos": self = .appInfos - case "appPricePoints": self = .appPricePoints - case "appPriceSchedule": self = .appPriceSchedule - case "appStoreVersionExperimentsV2": self = .appStoreVersionExperimentsV2 - case "appStoreVersions": self = .appStoreVersions - case "availableInNewTerritories": self = .availableInNewTerritories - case "availableTerritories": self = .availableTerritories - case "betaAppLocalizations": self = .betaAppLocalizations - case "betaAppReviewDetail": self = .betaAppReviewDetail - case "betaGroups": self = .betaGroups - case "betaLicenseAgreement": self = .betaLicenseAgreement - case "betaTesters": self = .betaTesters - case "builds": self = .builds - case "bundleId": self = .bundleId - case "ciProduct": self = .ciProduct - case "contentRightsDeclaration": self = .contentRightsDeclaration - case "customerReviews": self = .customerReviews - case "endUserLicenseAgreement": self = .endUserLicenseAgreement - case "gameCenterDetail": self = .gameCenterDetail - case "gameCenterEnabledVersions": self = .gameCenterEnabledVersions - case "inAppPurchases": self = .inAppPurchases - case "inAppPurchasesV2": self = .inAppPurchasesV2 - case "isOrEverWasMadeForKids": self = .isOrEverWasMadeForKids - case "name": self = .name - case "perfPowerMetrics": self = .perfPowerMetrics - case "preOrder": self = .preOrder - case "preReleaseVersions": self = .preReleaseVersions - case "pricePoints": self = .pricePoints - case "prices": self = .prices - case "primaryLocale": self = .primaryLocale - case "promotedPurchases": self = .promotedPurchases - case "reviewSubmissions": self = .reviewSubmissions - case "sku": self = .sku - case "subscriptionGracePeriod": self = .subscriptionGracePeriod - case "subscriptionGroups": self = .subscriptionGroups - case "subscriptionStatusUrl": self = .subscriptionStatusUrl - case "subscriptionStatusUrlForSandbox": self = .subscriptionStatusUrlForSandbox - case "subscriptionStatusUrlVersion": self = .subscriptionStatusUrlVersion - case "subscriptionStatusUrlVersionForSandbox": self = .subscriptionStatusUrlVersionForSandbox - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum BetaAppReviewSubmissions: Hashable, Codable, RawRepresentable { - case betaReviewState - case build - case submittedDate - case unknown(String) + public struct AppStoreVersions: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var ageRatingDeclaration: Self { + .init(rawValue: "ageRatingDeclaration") + } + + public static var alternativeDistributionPackage: Self { + .init(rawValue: "alternativeDistributionPackage") + } + + public static var app: Self { + .init(rawValue: "app") + } + + public static var appClipDefaultExperience: Self { + .init(rawValue: "appClipDefaultExperience") + } + + public static var appStoreReviewDetail: Self { + .init(rawValue: "appStoreReviewDetail") + } + + public static var appStoreState: Self { + .init(rawValue: "appStoreState") + } + + public static var appStoreVersionExperiments: Self { + .init(rawValue: "appStoreVersionExperiments") + } + + public static var appStoreVersionExperimentsV2: Self { + .init(rawValue: "appStoreVersionExperimentsV2") + } + + public static var appStoreVersionLocalizations: Self { + .init(rawValue: "appStoreVersionLocalizations") + } + + public static var appStoreVersionPhasedRelease: Self { + .init(rawValue: "appStoreVersionPhasedRelease") + } + + public static var appStoreVersionSubmission: Self { + .init(rawValue: "appStoreVersionSubmission") + } + + public static var appVersionState: Self { + .init(rawValue: "appVersionState") + } + + public static var build: Self { + .init(rawValue: "build") + } + + public static var copyright: Self { + .init(rawValue: "copyright") + } + + public static var createdDate: Self { + .init(rawValue: "createdDate") + } + + public static var customerReviews: Self { + .init(rawValue: "customerReviews") + } + + public static var downloadable: Self { + .init(rawValue: "downloadable") + } + + public static var earliestReleaseDate: Self { + .init(rawValue: "earliestReleaseDate") + } + + public static var gameCenterAppVersion: Self { + .init(rawValue: "gameCenterAppVersion") + } + + public static var platform: Self { + .init(rawValue: "platform") + } + + public static var releaseType: Self { + .init(rawValue: "releaseType") + } + + public static var reviewType: Self { + .init(rawValue: "reviewType") + } + + public static var routingAppCoverage: Self { + .init(rawValue: "routingAppCoverage") + } + + public static var usesIdfa: Self { + .init(rawValue: "usesIdfa") + } + + public static var versionString: Self { + .init(rawValue: "versionString") + } - public var rawValue: String { - switch self { - case .betaReviewState: return "betaReviewState" - case .build: return "build" - case .submittedDate: return "submittedDate" - case .unknown(let rawValue): return rawValue - } + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "betaReviewState": self = .betaReviewState - case "build": self = .build - case "submittedDate": self = .submittedDate - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum BetaBuildLocalizations: Hashable, Codable, RawRepresentable { - case build - case locale - case whatsNew - case unknown(String) + public struct Apps: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var accessibilityDeclarations: Self { + .init(rawValue: "accessibilityDeclarations") + } + + public static var accessibilityUrl: Self { + .init(rawValue: "accessibilityUrl") + } + + public static var alternativeDistributionKey: Self { + .init(rawValue: "alternativeDistributionKey") + } + + public static var analyticsReportRequests: Self { + .init(rawValue: "analyticsReportRequests") + } + + public static var appAvailabilityV2: Self { + .init(rawValue: "appAvailabilityV2") + } + + public static var appClips: Self { + .init(rawValue: "appClips") + } + + public static var appCustomProductPages: Self { + .init(rawValue: "appCustomProductPages") + } + + public static var appEncryptionDeclarations: Self { + .init(rawValue: "appEncryptionDeclarations") + } + + public static var appEvents: Self { + .init(rawValue: "appEvents") + } + + public static var appInfos: Self { + .init(rawValue: "appInfos") + } + + public static var appPricePoints: Self { + .init(rawValue: "appPricePoints") + } + + public static var appPriceSchedule: Self { + .init(rawValue: "appPriceSchedule") + } + + public static var appStoreVersionExperimentsV2: Self { + .init(rawValue: "appStoreVersionExperimentsV2") + } + + public static var appStoreVersions: Self { + .init(rawValue: "appStoreVersions") + } + + public static var backgroundAssets: Self { + .init(rawValue: "backgroundAssets") + } + + public static var betaAppLocalizations: Self { + .init(rawValue: "betaAppLocalizations") + } + + public static var betaAppReviewDetail: Self { + .init(rawValue: "betaAppReviewDetail") + } + + public static var betaFeedbackCrashSubmissions: Self { + .init(rawValue: "betaFeedbackCrashSubmissions") + } + + public static var betaFeedbackScreenshotSubmissions: Self { + .init(rawValue: "betaFeedbackScreenshotSubmissions") + } + + public static var betaGroups: Self { + .init(rawValue: "betaGroups") + } + + public static var betaLicenseAgreement: Self { + .init(rawValue: "betaLicenseAgreement") + } + + public static var betaTesters: Self { + .init(rawValue: "betaTesters") + } + + public static var builds: Self { + .init(rawValue: "builds") + } + + public static var bundleId: Self { + .init(rawValue: "bundleId") + } + + public static var ciProduct: Self { + .init(rawValue: "ciProduct") + } + + public static var contentRightsDeclaration: Self { + .init(rawValue: "contentRightsDeclaration") + } + + public static var customerReviewSummarizations: Self { + .init(rawValue: "customerReviewSummarizations") + } + + public static var customerReviews: Self { + .init(rawValue: "customerReviews") + } + + public static var endUserLicenseAgreement: Self { + .init(rawValue: "endUserLicenseAgreement") + } + + public static var gameCenterDetail: Self { + .init(rawValue: "gameCenterDetail") + } + + public static var gameCenterEnabledVersions: Self { + .init(rawValue: "gameCenterEnabledVersions") + } + + public static var inAppPurchases: Self { + .init(rawValue: "inAppPurchases") + } + + public static var inAppPurchasesV2: Self { + .init(rawValue: "inAppPurchasesV2") + } + + public static var isOrEverWasMadeForKids: Self { + .init(rawValue: "isOrEverWasMadeForKids") + } + + public static var marketplaceSearchDetail: Self { + .init(rawValue: "marketplaceSearchDetail") + } + + public static var name: Self { + .init(rawValue: "name") + } + + public static var perfPowerMetrics: Self { + .init(rawValue: "perfPowerMetrics") + } + + public static var preReleaseVersions: Self { + .init(rawValue: "preReleaseVersions") + } + + public static var primaryLocale: Self { + .init(rawValue: "primaryLocale") + } + + public static var promotedPurchases: Self { + .init(rawValue: "promotedPurchases") + } + + public static var reviewSubmissions: Self { + .init(rawValue: "reviewSubmissions") + } + + public static var sku: Self { + .init(rawValue: "sku") + } + + public static var streamlinedPurchasingEnabled: Self { + .init(rawValue: "streamlinedPurchasingEnabled") + } + + public static var subscriptionGracePeriod: Self { + .init(rawValue: "subscriptionGracePeriod") + } + + public static var subscriptionGroups: Self { + .init(rawValue: "subscriptionGroups") + } + + public static var subscriptionStatusUrl: Self { + .init(rawValue: "subscriptionStatusUrl") + } + + public static var subscriptionStatusUrlForSandbox: Self { + .init(rawValue: "subscriptionStatusUrlForSandbox") + } + + public static var subscriptionStatusUrlVersion: Self { + .init(rawValue: "subscriptionStatusUrlVersion") + } + + public static var subscriptionStatusUrlVersionForSandbox: Self { + .init(rawValue: "subscriptionStatusUrlVersionForSandbox") + } + + public static var webhooks: Self { + .init(rawValue: "webhooks") + } - public var rawValue: String { - switch self { - case .build: return "build" - case .locale: return "locale" - case .whatsNew: return "whatsNew" - case .unknown(let rawValue): return rawValue - } + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "build": self = .build - case "locale": self = .locale - case "whatsNew": self = .whatsNew - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum BetaTesters: Hashable, Codable, RawRepresentable { - case apps - case betaGroups - case builds - case email - case firstName - case inviteType - case lastName - case unknown(String) - - public var rawValue: String { - switch self { - case .apps: return "apps" - case .betaGroups: return "betaGroups" - case .builds: return "builds" - case .email: return "email" - case .firstName: return "firstName" - case .inviteType: return "inviteType" - case .lastName: return "lastName" - case .unknown(let rawValue): return rawValue - } + public struct BetaAppReviewSubmissions: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var betaReviewState: Self { + .init(rawValue: "betaReviewState") + } + + public static var build: Self { + .init(rawValue: "build") + } + + public static var submittedDate: Self { + .init(rawValue: "submittedDate") + } + + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "apps": self = .apps - case "betaGroups": self = .betaGroups - case "builds": self = .builds - case "email": self = .email - case "firstName": self = .firstName - case "inviteType": self = .inviteType - case "lastName": self = .lastName - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum BuildBetaDetails: Hashable, Codable, RawRepresentable { - case autoNotifyEnabled - case build - case externalBuildState - case internalBuildState - case unknown(String) + public struct BetaBuildLocalizations: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var build: Self { + .init(rawValue: "build") + } + + public static var locale: Self { + .init(rawValue: "locale") + } - public var rawValue: String { - switch self { - case .autoNotifyEnabled: return "autoNotifyEnabled" - case .build: return "build" - case .externalBuildState: return "externalBuildState" - case .internalBuildState: return "internalBuildState" - case .unknown(let rawValue): return rawValue - } + public static var whatsNew: Self { + .init(rawValue: "whatsNew") } + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "autoNotifyEnabled": self = .autoNotifyEnabled - case "build": self = .build - case "externalBuildState": self = .externalBuildState - case "internalBuildState": self = .internalBuildState - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum BuildIcons: Hashable, Codable, RawRepresentable { - case iconAsset - case iconType - case name - case unknown(String) + public struct BetaTesters: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var apps: Self { + .init(rawValue: "apps") + } + + public static var betaGroups: Self { + .init(rawValue: "betaGroups") + } + + public static var builds: Self { + .init(rawValue: "builds") + } + + public static var email: Self { + .init(rawValue: "email") + } + + public static var firstName: Self { + .init(rawValue: "firstName") + } + + public static var inviteType: Self { + .init(rawValue: "inviteType") + } + + public static var lastName: Self { + .init(rawValue: "lastName") + } + + public static var state: Self { + .init(rawValue: "state") + } - public var rawValue: String { - switch self { - case .iconAsset: return "iconAsset" - case .iconType: return "iconType" - case .name: return "name" - case .unknown(let rawValue): return rawValue - } + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "iconAsset": self = .iconAsset - case "iconType": self = .iconType - case "name": self = .name - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum Builds: Hashable, Codable, RawRepresentable { - case app - case appEncryptionDeclaration - case appStoreVersion - case betaAppReviewSubmission - case betaBuildLocalizations - case betaGroups - case buildAudienceType - case buildBetaDetail - case buildBundles - case computedMinMacOsVersion - case diagnosticSignatures - case expirationDate - case expired - case iconAssetToken - case icons - case individualTesters - case lsMinimumSystemVersion - case minOsVersion - case perfPowerMetrics - case preReleaseVersion - case processingState - case uploadedDate - case usesNonExemptEncryption - case version - case unknown(String) - - public var rawValue: String { - switch self { - case .app: return "app" - case .appEncryptionDeclaration: return "appEncryptionDeclaration" - case .appStoreVersion: return "appStoreVersion" - case .betaAppReviewSubmission: return "betaAppReviewSubmission" - case .betaBuildLocalizations: return "betaBuildLocalizations" - case .betaGroups: return "betaGroups" - case .buildAudienceType: return "buildAudienceType" - case .buildBetaDetail: return "buildBetaDetail" - case .buildBundles: return "buildBundles" - case .computedMinMacOsVersion: return "computedMinMacOsVersion" - case .diagnosticSignatures: return "diagnosticSignatures" - case .expirationDate: return "expirationDate" - case .expired: return "expired" - case .iconAssetToken: return "iconAssetToken" - case .icons: return "icons" - case .individualTesters: return "individualTesters" - case .lsMinimumSystemVersion: return "lsMinimumSystemVersion" - case .minOsVersion: return "minOsVersion" - case .perfPowerMetrics: return "perfPowerMetrics" - case .preReleaseVersion: return "preReleaseVersion" - case .processingState: return "processingState" - case .uploadedDate: return "uploadedDate" - case .usesNonExemptEncryption: return "usesNonExemptEncryption" - case .version: return "version" - case .unknown(let rawValue): return rawValue - } + public struct BuildBetaDetails: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var autoNotifyEnabled: Self { + .init(rawValue: "autoNotifyEnabled") + } + + public static var build: Self { + .init(rawValue: "build") + } + + public static var externalBuildState: Self { + .init(rawValue: "externalBuildState") } + public static var internalBuildState: Self { + .init(rawValue: "internalBuildState") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "app": self = .app - case "appEncryptionDeclaration": self = .appEncryptionDeclaration - case "appStoreVersion": self = .appStoreVersion - case "betaAppReviewSubmission": self = .betaAppReviewSubmission - case "betaBuildLocalizations": self = .betaBuildLocalizations - case "betaGroups": self = .betaGroups - case "buildAudienceType": self = .buildAudienceType - case "buildBetaDetail": self = .buildBetaDetail - case "buildBundles": self = .buildBundles - case "computedMinMacOsVersion": self = .computedMinMacOsVersion - case "diagnosticSignatures": self = .diagnosticSignatures - case "expirationDate": self = .expirationDate - case "expired": self = .expired - case "iconAssetToken": self = .iconAssetToken - case "icons": self = .icons - case "individualTesters": self = .individualTesters - case "lsMinimumSystemVersion": self = .lsMinimumSystemVersion - case "minOsVersion": self = .minOsVersion - case "perfPowerMetrics": self = .perfPowerMetrics - case "preReleaseVersion": self = .preReleaseVersion - case "processingState": self = .processingState - case "uploadedDate": self = .uploadedDate - case "usesNonExemptEncryption": self = .usesNonExemptEncryption - case "version": self = .version - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum DiagnosticSignatures: Hashable, Codable, RawRepresentable { - case diagnosticType - case logs - case signature - case weight - case unknown(String) + public struct BuildIcons: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var iconAsset: Self { + .init(rawValue: "iconAsset") + } + + public static var iconType: Self { + .init(rawValue: "iconType") + } + + public static var name: Self { + .init(rawValue: "name") + } - public var rawValue: String { - switch self { - case .diagnosticType: return "diagnosticType" - case .logs: return "logs" - case .signature: return "signature" - case .weight: return "weight" - case .unknown(let rawValue): return rawValue - } + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "diagnosticType": self = .diagnosticType - case "logs": self = .logs - case "signature": self = .signature - case "weight": self = .weight - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum PerfPowerMetrics: Hashable, Codable, RawRepresentable { - case deviceType - case metricType - case platform - case unknown(String) + public struct Builds: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var app: Self { + .init(rawValue: "app") + } + + public static var appEncryptionDeclaration: Self { + .init(rawValue: "appEncryptionDeclaration") + } + + public static var appStoreVersion: Self { + .init(rawValue: "appStoreVersion") + } + + public static var betaAppReviewSubmission: Self { + .init(rawValue: "betaAppReviewSubmission") + } + + public static var betaBuildLocalizations: Self { + .init(rawValue: "betaBuildLocalizations") + } + + public static var betaGroups: Self { + .init(rawValue: "betaGroups") + } + + public static var buildAudienceType: Self { + .init(rawValue: "buildAudienceType") + } + + public static var buildBetaDetail: Self { + .init(rawValue: "buildBetaDetail") + } + + public static var buildBundles: Self { + .init(rawValue: "buildBundles") + } + + public static var computedMinMacOsVersion: Self { + .init(rawValue: "computedMinMacOsVersion") + } + + public static var computedMinVisionOsVersion: Self { + .init(rawValue: "computedMinVisionOsVersion") + } + + public static var diagnosticSignatures: Self { + .init(rawValue: "diagnosticSignatures") + } + + public static var expirationDate: Self { + .init(rawValue: "expirationDate") + } + + public static var expired: Self { + .init(rawValue: "expired") + } + + public static var iconAssetToken: Self { + .init(rawValue: "iconAssetToken") + } + + public static var icons: Self { + .init(rawValue: "icons") + } + + public static var individualTesters: Self { + .init(rawValue: "individualTesters") + } + + public static var lsMinimumSystemVersion: Self { + .init(rawValue: "lsMinimumSystemVersion") + } + + public static var minOsVersion: Self { + .init(rawValue: "minOsVersion") + } + + public static var perfPowerMetrics: Self { + .init(rawValue: "perfPowerMetrics") + } + + public static var preReleaseVersion: Self { + .init(rawValue: "preReleaseVersion") + } + + public static var processingState: Self { + .init(rawValue: "processingState") + } - public var rawValue: String { - switch self { - case .deviceType: return "deviceType" - case .metricType: return "metricType" - case .platform: return "platform" - case .unknown(let rawValue): return rawValue - } + public static var uploadedDate: Self { + .init(rawValue: "uploadedDate") } + public static var usesNonExemptEncryption: Self { + .init(rawValue: "usesNonExemptEncryption") + } + + public static var version: Self { + .init(rawValue: "version") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "deviceType": self = .deviceType - case "metricType": self = .metricType - case "platform": self = .platform - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum PreReleaseVersions: Hashable, Codable, RawRepresentable { - case app - case builds - case platform - case version - case unknown(String) + public struct PreReleaseVersions: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var app: Self { + .init(rawValue: "app") + } + + public static var builds: Self { + .init(rawValue: "builds") + } + + public static var platform: Self { + .init(rawValue: "platform") + } - public var rawValue: String { - switch self { - case .app: return "app" - case .builds: return "builds" - case .platform: return "platform" - case .version: return "version" - case .unknown(let rawValue): return rawValue - } + public static var version: Self { + .init(rawValue: "version") } + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "app": self = .app - case "builds": self = .builds - case "platform": self = .platform - case "version": self = .version - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } @@ -767,16 +859,6 @@ extension V1.Builds.ById.GET { .init(key: "fields[builds]") } - /// the fields to include for returned resources of type diagnosticSignatures - public static var diagnosticSignatures: Relation<[DiagnosticSignatures]?> { - .init(key: "fields[diagnosticSignatures]") - } - - /// the fields to include for returned resources of type perfPowerMetrics - public static var perfPowerMetrics: Relation<[PerfPowerMetrics]?> { - .init(key: "fields[perfPowerMetrics]") - } - /// the fields to include for returned resources of type preReleaseVersions public static var preReleaseVersions: Relation<[PreReleaseVersions]?> { .init(key: "fields[preReleaseVersions]") @@ -790,52 +872,59 @@ extension V1.Builds.ById.GET { } } - public enum Include: Hashable, Codable, RawRepresentable { - case app - case appEncryptionDeclaration - case appStoreVersion - case betaAppReviewSubmission - case betaBuildLocalizations - case betaGroups - case buildBetaDetail - case buildBundles - case icons - case individualTesters - case preReleaseVersion - case unknown(String) - - public var rawValue: String { - switch self { - case .app: return "app" - case .appEncryptionDeclaration: return "appEncryptionDeclaration" - case .appStoreVersion: return "appStoreVersion" - case .betaAppReviewSubmission: return "betaAppReviewSubmission" - case .betaBuildLocalizations: return "betaBuildLocalizations" - case .betaGroups: return "betaGroups" - case .buildBetaDetail: return "buildBetaDetail" - case .buildBundles: return "buildBundles" - case .icons: return "icons" - case .individualTesters: return "individualTesters" - case .preReleaseVersion: return "preReleaseVersion" - case .unknown(let rawValue): return rawValue - } + public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var app: Self { + .init(rawValue: "app") } + public static var appEncryptionDeclaration: Self { + .init(rawValue: "appEncryptionDeclaration") + } + + public static var appStoreVersion: Self { + .init(rawValue: "appStoreVersion") + } + + public static var betaAppReviewSubmission: Self { + .init(rawValue: "betaAppReviewSubmission") + } + + public static var betaBuildLocalizations: Self { + .init(rawValue: "betaBuildLocalizations") + } + + public static var betaGroups: Self { + .init(rawValue: "betaGroups") + } + + public static var buildBetaDetail: Self { + .init(rawValue: "buildBetaDetail") + } + + public static var buildBundles: Self { + .init(rawValue: "buildBundles") + } + + public static var icons: Self { + .init(rawValue: "icons") + } + + public static var individualTesters: Self { + .init(rawValue: "individualTesters") + } + + public static var preReleaseVersion: Self { + .init(rawValue: "preReleaseVersion") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "app": self = .app - case "appEncryptionDeclaration": self = .appEncryptionDeclaration - case "appStoreVersion": self = .appStoreVersion - case "betaAppReviewSubmission": self = .betaAppReviewSubmission - case "betaBuildLocalizations": self = .betaBuildLocalizations - case "betaGroups": self = .betaGroups - case "buildBetaDetail": self = .buildBetaDetail - case "buildBundles": self = .buildBundles - case "icons": self = .icons - case "individualTesters": self = .individualTesters - case "preReleaseVersion": self = .preReleaseVersion - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Builds/ById/BuildsById.PATCH.30b1941.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Builds/ById/BuildsById.PATCH.30b1941.generated.swift index 94487c0d..50898ce0 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Builds/ById/BuildsById.PATCH.30b1941.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Builds/ById/BuildsById.PATCH.30b1941.generated.swift @@ -48,9 +48,12 @@ extension V1.Builds.ById { /// - Returns: **200**, Single Build as `BuildResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **422**, Unprocessable request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -64,6 +67,9 @@ extension V1.Builds.ById { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) @@ -73,6 +79,12 @@ extension V1.Builds.ById { case 409: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 422: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Builds/ById/DiagnosticSignatures/BuildsByIdDiagnosticSignatures.GET.c65dda0.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Builds/ById/DiagnosticSignatures/BuildsByIdDiagnosticSignatures.GET.c65dda0.generated.swift index 4ab6bd86..79ecd5ca 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Builds/ById/DiagnosticSignatures/BuildsByIdDiagnosticSignatures.GET.c65dda0.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Builds/ById/DiagnosticSignatures/BuildsByIdDiagnosticSignatures.GET.c65dda0.generated.swift @@ -46,8 +46,10 @@ extension V1.Builds.ById.DiagnosticSignatures { /// - Returns: **200**, List of DiagnosticSignatures as `DiagnosticSignaturesResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -61,12 +63,18 @@ extension V1.Builds.ById.DiagnosticSignatures { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 404: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -91,31 +99,35 @@ extension V1.Builds.ById.DiagnosticSignatures.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum DiagnosticSignatures: Hashable, Codable, RawRepresentable { - case diagnosticType - case logs - case signature - case weight - case unknown(String) + public struct DiagnosticSignatures: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var diagnosticType: Self { + .init(rawValue: "diagnosticType") + } + + public static var insight: Self { + .init(rawValue: "insight") + } + + public static var logs: Self { + .init(rawValue: "logs") + } + + public static var signature: Self { + .init(rawValue: "signature") + } + + public static var weight: Self { + .init(rawValue: "weight") + } - public var rawValue: String { - switch self { - case .diagnosticType: return "diagnosticType" - case .logs: return "logs" - case .signature: return "signature" - case .weight: return "weight" - case .unknown(let rawValue): return rawValue - } + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "diagnosticType": self = .diagnosticType - case "logs": self = .logs - case "signature": self = .signature - case "weight": self = .weight - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } @@ -141,25 +153,27 @@ extension V1.Builds.ById.DiagnosticSignatures.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum DiagnosticType: Hashable, Codable, RawRepresentable { - case diskWrites - case hangs - case unknown(String) + public struct DiagnosticType: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var diskWrites: Self { + .init(rawValue: "DISK_WRITES") + } + + public static var hangs: Self { + .init(rawValue: "HANGS") + } - public var rawValue: String { - switch self { - case .diskWrites: return "DISK_WRITES" - case .hangs: return "HANGS" - case .unknown(let rawValue): return rawValue - } + public static var launches: Self { + .init(rawValue: "LAUNCHES") } + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "DISK_WRITES": self = .diskWrites - case "HANGS": self = .hangs - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Builds/ById/Icons/BuildsByIdIcons.GET.07cf3e1.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Builds/ById/Icons/BuildsByIdIcons.GET.07cf3e1.generated.swift index 9bd2fbec..4653c893 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Builds/ById/Icons/BuildsByIdIcons.GET.07cf3e1.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Builds/ById/Icons/BuildsByIdIcons.GET.07cf3e1.generated.swift @@ -44,8 +44,10 @@ extension V1.Builds.ById.Icons { /// - Returns: **200**, List of BuildIcons with get as `BuildIconsWithoutIncludesResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -59,12 +61,18 @@ extension V1.Builds.ById.Icons { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 404: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -87,28 +95,27 @@ extension V1.Builds.ById.Icons.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum BuildIcons: Hashable, Codable, RawRepresentable { - case iconAsset - case iconType - case name - case unknown(String) - - public var rawValue: String { - switch self { - case .iconAsset: return "iconAsset" - case .iconType: return "iconType" - case .name: return "name" - case .unknown(let rawValue): return rawValue - } + public struct BuildIcons: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var iconAsset: Self { + .init(rawValue: "iconAsset") + } + + public static var iconType: Self { + .init(rawValue: "iconType") } + public static var name: Self { + .init(rawValue: "name") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "iconAsset": self = .iconAsset - case "iconType": self = .iconType - case "name": self = .name - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Builds/ById/IndividualTesters/BuildsByIdIndividualTesters.GET.f50d3ad.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Builds/ById/IndividualTesters/BuildsByIdIndividualTesters.GET.f50d3ad.generated.swift index cf13cd34..54c7f8f5 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Builds/ById/IndividualTesters/BuildsByIdIndividualTesters.GET.f50d3ad.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Builds/ById/IndividualTesters/BuildsByIdIndividualTesters.GET.f50d3ad.generated.swift @@ -44,8 +44,10 @@ extension V1.Builds.ById.IndividualTesters { /// - Returns: **200**, List of BetaTesters with get as `BetaTestersWithoutIncludesResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -59,12 +61,18 @@ extension V1.Builds.ById.IndividualTesters { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 404: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -87,40 +95,47 @@ extension V1.Builds.ById.IndividualTesters.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum BetaTesters: Hashable, Codable, RawRepresentable { - case apps - case betaGroups - case builds - case email - case firstName - case inviteType - case lastName - case unknown(String) - - public var rawValue: String { - switch self { - case .apps: return "apps" - case .betaGroups: return "betaGroups" - case .builds: return "builds" - case .email: return "email" - case .firstName: return "firstName" - case .inviteType: return "inviteType" - case .lastName: return "lastName" - case .unknown(let rawValue): return rawValue - } + public struct BetaTesters: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var apps: Self { + .init(rawValue: "apps") + } + + public static var betaGroups: Self { + .init(rawValue: "betaGroups") } + public static var builds: Self { + .init(rawValue: "builds") + } + + public static var email: Self { + .init(rawValue: "email") + } + + public static var firstName: Self { + .init(rawValue: "firstName") + } + + public static var inviteType: Self { + .init(rawValue: "inviteType") + } + + public static var lastName: Self { + .init(rawValue: "lastName") + } + + public static var state: Self { + .init(rawValue: "state") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "apps": self = .apps - case "betaGroups": self = .betaGroups - case "builds": self = .builds - case "email": self = .email - case "firstName": self = .firstName - case "inviteType": self = .inviteType - case "lastName": self = .lastName - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Builds/ById/Metrics/BetaBuildUsages/BuildsByIdMetricsBetaBuildUsages.GET.bc353b3.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Builds/ById/Metrics/BetaBuildUsages/BuildsByIdMetricsBetaBuildUsages.GET.bc353b3.generated.swift index 87d57f60..6948eac4 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Builds/ById/Metrics/BetaBuildUsages/BuildsByIdMetricsBetaBuildUsages.GET.bc353b3.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Builds/ById/Metrics/BetaBuildUsages/BuildsByIdMetricsBetaBuildUsages.GET.bc353b3.generated.swift @@ -42,8 +42,10 @@ extension V1.Builds.ById.Metrics.BetaBuildUsages { /// - Returns: **200**, Metrics data response as `BetaBuildUsagesV1MetricResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -57,12 +59,18 @@ extension V1.Builds.ById.Metrics.BetaBuildUsages { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 404: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Builds/ById/PerfPowerMetrics/BuildsByIdPerfPowerMetrics.GET.5ad0e3a.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Builds/ById/PerfPowerMetrics/BuildsByIdPerfPowerMetrics.GET.5ad0e3a.generated.swift index e4cf7c02..c4d90da2 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Builds/ById/PerfPowerMetrics/BuildsByIdPerfPowerMetrics.GET.5ad0e3a.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Builds/ById/PerfPowerMetrics/BuildsByIdPerfPowerMetrics.GET.5ad0e3a.generated.swift @@ -46,8 +46,10 @@ extension V1.Builds.ById.PerfPowerMetrics { /// - Returns: **200**, List of PerfPowerMetrics as `XcodeMetrics` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -61,12 +63,18 @@ extension V1.Builds.ById.PerfPowerMetrics { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 404: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -86,59 +94,59 @@ extension V1.Builds.ById.PerfPowerMetrics.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum MetricType: Hashable, Codable, RawRepresentable { - case animation - case battery - case disk - case hang - case launch - case memory - case termination - case unknown(String) - - public var rawValue: String { - switch self { - case .animation: return "ANIMATION" - case .battery: return "BATTERY" - case .disk: return "DISK" - case .hang: return "HANG" - case .launch: return "LAUNCH" - case .memory: return "MEMORY" - case .termination: return "TERMINATION" - case .unknown(let rawValue): return rawValue - } + public struct MetricType: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var animation: Self { + .init(rawValue: "ANIMATION") + } + + public static var battery: Self { + .init(rawValue: "BATTERY") } + public static var disk: Self { + .init(rawValue: "DISK") + } + + public static var hang: Self { + .init(rawValue: "HANG") + } + + public static var launch: Self { + .init(rawValue: "LAUNCH") + } + + public static var memory: Self { + .init(rawValue: "MEMORY") + } + + public static var termination: Self { + .init(rawValue: "TERMINATION") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "ANIMATION": self = .animation - case "BATTERY": self = .battery - case "DISK": self = .disk - case "HANG": self = .hang - case "LAUNCH": self = .launch - case "MEMORY": self = .memory - case "TERMINATION": self = .termination - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum Platform: Hashable, Codable, RawRepresentable { - case iOS - case unknown(String) + public struct Platform: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var iOS: Self { + .init(rawValue: "IOS") + } - public var rawValue: String { - switch self { - case .iOS: return "IOS" - case .unknown(let rawValue): return rawValue - } + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "IOS": self = .iOS - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Builds/ById/PreReleaseVersion/BuildsByIdPreReleaseVersion.GET.a38831a.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Builds/ById/PreReleaseVersion/BuildsByIdPreReleaseVersion.GET.a38831a.generated.swift index 0bbd7158..9b633cd2 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Builds/ById/PreReleaseVersion/BuildsByIdPreReleaseVersion.GET.a38831a.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Builds/ById/PreReleaseVersion/BuildsByIdPreReleaseVersion.GET.a38831a.generated.swift @@ -42,8 +42,10 @@ extension V1.Builds.ById.PreReleaseVersion { /// - Returns: **200**, Single PrereleaseVersion with get as `PrereleaseVersionWithoutIncludesResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -57,12 +59,18 @@ extension V1.Builds.ById.PreReleaseVersion { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 404: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -82,31 +90,31 @@ extension V1.Builds.ById.PreReleaseVersion.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum PreReleaseVersions: Hashable, Codable, RawRepresentable { - case app - case builds - case platform - case version - case unknown(String) - - public var rawValue: String { - switch self { - case .app: return "app" - case .builds: return "builds" - case .platform: return "platform" - case .version: return "version" - case .unknown(let rawValue): return rawValue - } + public struct PreReleaseVersions: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var app: Self { + .init(rawValue: "app") } + public static var builds: Self { + .init(rawValue: "builds") + } + + public static var platform: Self { + .init(rawValue: "platform") + } + + public static var version: Self { + .init(rawValue: "version") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "app": self = .app - case "builds": self = .builds - case "platform": self = .platform - case "version": self = .version - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Builds/ById/Relationships/App/BuildsByIdRelationshipsApp.GET.ddadfc8.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Builds/ById/Relationships/App/BuildsByIdRelationshipsApp.GET.ddadfc8.generated.swift new file mode 100644 index 00000000..bf702ffa --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Builds/ById/Relationships/App/BuildsByIdRelationshipsApp.GET.ddadfc8.generated.swift @@ -0,0 +1,86 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.Builds.ById.Relationships.App { + public struct GET: Endpoint { + public typealias Response = BuildAppLinkageResponse + + public var path: String { + "/v1/builds/\(id)/relationships/app" + } + + /// the id of the requested resource + public var id: String + + public var parameters: Parameters = Parameters() + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + components?.queryItems = [ + + ].filter { $0.value != nil } + if components?.queryItems?.isEmpty ?? false { + components?.queryItems = nil + } + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "GET" + return urlRequest + } + + /// - Returns: **200**, Related linkage as `BuildAppLinkageResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(BuildAppLinkageResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +extension V1.Builds.ById.Relationships.App.GET { + public struct Parameters: Hashable { + + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Builds/ById/Relationships/AppEncryptionDeclaration/BuildsByIdRelationshipsAppEncryptionDeclaration.GET.44e79a0.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Builds/ById/Relationships/AppEncryptionDeclaration/BuildsByIdRelationshipsAppEncryptionDeclaration.GET.44e79a0.generated.swift index becb6a42..057c3914 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Builds/ById/Relationships/AppEncryptionDeclaration/BuildsByIdRelationshipsAppEncryptionDeclaration.GET.44e79a0.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Builds/ById/Relationships/AppEncryptionDeclaration/BuildsByIdRelationshipsAppEncryptionDeclaration.GET.44e79a0.generated.swift @@ -41,8 +41,10 @@ extension V1.Builds.ById.Relationships.AppEncryptionDeclaration { /// - Returns: **200**, Related linkage as `BuildAppEncryptionDeclarationLinkageResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -56,12 +58,18 @@ extension V1.Builds.ById.Relationships.AppEncryptionDeclaration { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 404: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Builds/ById/Relationships/AppEncryptionDeclaration/BuildsByIdRelationshipsAppEncryptionDeclaration.PATCH.44e79a0.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Builds/ById/Relationships/AppEncryptionDeclaration/BuildsByIdRelationshipsAppEncryptionDeclaration.PATCH.44e79a0.generated.swift index 0a608f73..91eae257 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Builds/ById/Relationships/AppEncryptionDeclaration/BuildsByIdRelationshipsAppEncryptionDeclaration.PATCH.44e79a0.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Builds/ById/Relationships/AppEncryptionDeclaration/BuildsByIdRelationshipsAppEncryptionDeclaration.PATCH.44e79a0.generated.swift @@ -46,10 +46,12 @@ extension V1.Builds.ById.Relationships.AppEncryptionDeclaration { return urlRequest } - /// - Returns: **204**, Success (no content) + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **422**, Unprocessable request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -57,8 +59,8 @@ extension V1.Builds.ById.Relationships.AppEncryptionDeclaration { } switch urlResponse.statusCode { - case 204: - return + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) @@ -69,6 +71,12 @@ extension V1.Builds.ById.Relationships.AppEncryptionDeclaration { case 409: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 422: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Builds/ById/Relationships/AppStoreVersion/BuildsByIdRelationshipsAppStoreVersion.GET.880b286.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Builds/ById/Relationships/AppStoreVersion/BuildsByIdRelationshipsAppStoreVersion.GET.880b286.generated.swift new file mode 100644 index 00000000..1ea77649 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Builds/ById/Relationships/AppStoreVersion/BuildsByIdRelationshipsAppStoreVersion.GET.880b286.generated.swift @@ -0,0 +1,86 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.Builds.ById.Relationships.AppStoreVersion { + public struct GET: Endpoint { + public typealias Response = BuildAppStoreVersionLinkageResponse + + public var path: String { + "/v1/builds/\(id)/relationships/appStoreVersion" + } + + /// the id of the requested resource + public var id: String + + public var parameters: Parameters = Parameters() + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + components?.queryItems = [ + + ].filter { $0.value != nil } + if components?.queryItems?.isEmpty ?? false { + components?.queryItems = nil + } + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "GET" + return urlRequest + } + + /// - Returns: **200**, Related linkage as `BuildAppStoreVersionLinkageResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(BuildAppStoreVersionLinkageResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +extension V1.Builds.ById.Relationships.AppStoreVersion.GET { + public struct Parameters: Hashable { + + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Builds/ById/Relationships/BetaAppReviewSubmission/BuildsByIdRelationshipsBetaAppReviewSubmission.GET.085d4eb.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Builds/ById/Relationships/BetaAppReviewSubmission/BuildsByIdRelationshipsBetaAppReviewSubmission.GET.085d4eb.generated.swift new file mode 100644 index 00000000..b0ade89a --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Builds/ById/Relationships/BetaAppReviewSubmission/BuildsByIdRelationshipsBetaAppReviewSubmission.GET.085d4eb.generated.swift @@ -0,0 +1,86 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.Builds.ById.Relationships.BetaAppReviewSubmission { + public struct GET: Endpoint { + public typealias Response = BuildBetaAppReviewSubmissionLinkageResponse + + public var path: String { + "/v1/builds/\(id)/relationships/betaAppReviewSubmission" + } + + /// the id of the requested resource + public var id: String + + public var parameters: Parameters = Parameters() + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + components?.queryItems = [ + + ].filter { $0.value != nil } + if components?.queryItems?.isEmpty ?? false { + components?.queryItems = nil + } + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "GET" + return urlRequest + } + + /// - Returns: **200**, Related linkage as `BuildBetaAppReviewSubmissionLinkageResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(BuildBetaAppReviewSubmissionLinkageResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +extension V1.Builds.ById.Relationships.BetaAppReviewSubmission.GET { + public struct Parameters: Hashable { + + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Builds/ById/Relationships/BetaBuildLocalizations/BuildsByIdRelationshipsBetaBuildLocalizations.GET.42f541c.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Builds/ById/Relationships/BetaBuildLocalizations/BuildsByIdRelationshipsBetaBuildLocalizations.GET.42f541c.generated.swift new file mode 100644 index 00000000..0ee0c728 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Builds/ById/Relationships/BetaBuildLocalizations/BuildsByIdRelationshipsBetaBuildLocalizations.GET.42f541c.generated.swift @@ -0,0 +1,88 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.Builds.ById.Relationships.BetaBuildLocalizations { + public struct GET: Endpoint { + public typealias Response = BuildBetaBuildLocalizationsLinkagesResponse + + public var path: String { + "/v1/builds/\(id)/relationships/betaBuildLocalizations" + } + + /// the id of the requested resource + public var id: String + + public var parameters: Parameters = Parameters() + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + components?.queryItems = [ + URLQueryItem(name: "limit", + value: parameters.limit.map { "\($0)" }) + ].filter { $0.value != nil } + if components?.queryItems?.isEmpty ?? false { + components?.queryItems = nil + } + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "GET" + return urlRequest + } + + /// - Returns: **200**, List of related linkages as `BuildBetaBuildLocalizationsLinkagesResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(BuildBetaBuildLocalizationsLinkagesResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +extension V1.Builds.ById.Relationships.BetaBuildLocalizations.GET { + public struct Parameters: Hashable { + /// maximum resources per page + public var limit: Int? + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Builds/ById/Relationships/BetaGroups/BuildsByIdRelationshipsBetaGroups.DELETE.aaa7e70.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Builds/ById/Relationships/BetaGroups/BuildsByIdRelationshipsBetaGroups.DELETE.aaa7e70.generated.swift index 6516aba1..aa4ebb05 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Builds/ById/Relationships/BetaGroups/BuildsByIdRelationshipsBetaGroups.DELETE.aaa7e70.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Builds/ById/Relationships/BetaGroups/BuildsByIdRelationshipsBetaGroups.DELETE.aaa7e70.generated.swift @@ -31,10 +31,12 @@ extension V1.Builds.ById.Relationships.BetaGroups { return urlRequest } - /// - Returns: **204**, Success (no content) + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **422**, Unprocessable request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -42,8 +44,8 @@ extension V1.Builds.ById.Relationships.BetaGroups { } switch urlResponse.statusCode { - case 204: - return + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) @@ -54,6 +56,12 @@ extension V1.Builds.ById.Relationships.BetaGroups { case 409: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 422: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Builds/ById/Relationships/BetaGroups/BuildsByIdRelationshipsBetaGroups.POST.aaa7e70.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Builds/ById/Relationships/BetaGroups/BuildsByIdRelationshipsBetaGroups.POST.aaa7e70.generated.swift index becd8478..1d9d9b20 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Builds/ById/Relationships/BetaGroups/BuildsByIdRelationshipsBetaGroups.POST.aaa7e70.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Builds/ById/Relationships/BetaGroups/BuildsByIdRelationshipsBetaGroups.POST.aaa7e70.generated.swift @@ -46,10 +46,12 @@ extension V1.Builds.ById.Relationships.BetaGroups { return urlRequest } - /// - Returns: **204**, Success (no content) + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **422**, Unprocessable request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -57,8 +59,8 @@ extension V1.Builds.ById.Relationships.BetaGroups { } switch urlResponse.statusCode { - case 204: - return + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) @@ -69,6 +71,12 @@ extension V1.Builds.ById.Relationships.BetaGroups { case 409: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 422: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Builds/ById/Relationships/BuildBetaDetail/BuildsByIdRelationshipsBuildBetaDetail.GET.e49c469.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Builds/ById/Relationships/BuildBetaDetail/BuildsByIdRelationshipsBuildBetaDetail.GET.e49c469.generated.swift new file mode 100644 index 00000000..d89df0ed --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Builds/ById/Relationships/BuildBetaDetail/BuildsByIdRelationshipsBuildBetaDetail.GET.e49c469.generated.swift @@ -0,0 +1,86 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.Builds.ById.Relationships.BuildBetaDetail { + public struct GET: Endpoint { + public typealias Response = BuildBuildBetaDetailLinkageResponse + + public var path: String { + "/v1/builds/\(id)/relationships/buildBetaDetail" + } + + /// the id of the requested resource + public var id: String + + public var parameters: Parameters = Parameters() + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + components?.queryItems = [ + + ].filter { $0.value != nil } + if components?.queryItems?.isEmpty ?? false { + components?.queryItems = nil + } + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "GET" + return urlRequest + } + + /// - Returns: **200**, Related linkage as `BuildBuildBetaDetailLinkageResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(BuildBuildBetaDetailLinkageResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +extension V1.Builds.ById.Relationships.BuildBetaDetail.GET { + public struct Parameters: Hashable { + + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Builds/ById/Relationships/DiagnosticSignatures/BuildsByIdRelationshipsDiagnosticSignatures.GET.c96c92f.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Builds/ById/Relationships/DiagnosticSignatures/BuildsByIdRelationshipsDiagnosticSignatures.GET.c96c92f.generated.swift new file mode 100644 index 00000000..f68aebcb --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Builds/ById/Relationships/DiagnosticSignatures/BuildsByIdRelationshipsDiagnosticSignatures.GET.c96c92f.generated.swift @@ -0,0 +1,88 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.Builds.ById.Relationships.DiagnosticSignatures { + public struct GET: Endpoint { + public typealias Response = BuildDiagnosticSignaturesLinkagesResponse + + public var path: String { + "/v1/builds/\(id)/relationships/diagnosticSignatures" + } + + /// the id of the requested resource + public var id: String + + public var parameters: Parameters = Parameters() + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + components?.queryItems = [ + URLQueryItem(name: "limit", + value: parameters.limit.map { "\($0)" }) + ].filter { $0.value != nil } + if components?.queryItems?.isEmpty ?? false { + components?.queryItems = nil + } + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "GET" + return urlRequest + } + + /// - Returns: **200**, List of related linkages as `BuildDiagnosticSignaturesLinkagesResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(BuildDiagnosticSignaturesLinkagesResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +extension V1.Builds.ById.Relationships.DiagnosticSignatures.GET { + public struct Parameters: Hashable { + /// maximum resources per page + public var limit: Int? + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Builds/ById/Relationships/Icons/BuildsByIdRelationshipsIcons.GET.b993946.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Builds/ById/Relationships/Icons/BuildsByIdRelationshipsIcons.GET.b993946.generated.swift new file mode 100644 index 00000000..dc279093 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Builds/ById/Relationships/Icons/BuildsByIdRelationshipsIcons.GET.b993946.generated.swift @@ -0,0 +1,88 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.Builds.ById.Relationships.Icons { + public struct GET: Endpoint { + public typealias Response = BuildIconsLinkagesResponse + + public var path: String { + "/v1/builds/\(id)/relationships/icons" + } + + /// the id of the requested resource + public var id: String + + public var parameters: Parameters = Parameters() + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + components?.queryItems = [ + URLQueryItem(name: "limit", + value: parameters.limit.map { "\($0)" }) + ].filter { $0.value != nil } + if components?.queryItems?.isEmpty ?? false { + components?.queryItems = nil + } + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "GET" + return urlRequest + } + + /// - Returns: **200**, List of related linkages as `BuildIconsLinkagesResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(BuildIconsLinkagesResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +extension V1.Builds.ById.Relationships.Icons.GET { + public struct Parameters: Hashable { + /// maximum resources per page + public var limit: Int? + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Builds/ById/Relationships/IndividualTesters/BuildsByIdRelationshipsIndividualTesters.DELETE.d176ffd.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Builds/ById/Relationships/IndividualTesters/BuildsByIdRelationshipsIndividualTesters.DELETE.d176ffd.generated.swift index 5ce8af77..f1366262 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Builds/ById/Relationships/IndividualTesters/BuildsByIdRelationshipsIndividualTesters.DELETE.d176ffd.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Builds/ById/Relationships/IndividualTesters/BuildsByIdRelationshipsIndividualTesters.DELETE.d176ffd.generated.swift @@ -31,10 +31,12 @@ extension V1.Builds.ById.Relationships.IndividualTesters { return urlRequest } - /// - Returns: **204**, Success (no content) + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **422**, Unprocessable request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -42,8 +44,8 @@ extension V1.Builds.ById.Relationships.IndividualTesters { } switch urlResponse.statusCode { - case 204: - return + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) @@ -54,6 +56,12 @@ extension V1.Builds.ById.Relationships.IndividualTesters { case 409: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 422: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Builds/ById/Relationships/IndividualTesters/BuildsByIdRelationshipsIndividualTesters.GET.d176ffd.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Builds/ById/Relationships/IndividualTesters/BuildsByIdRelationshipsIndividualTesters.GET.d176ffd.generated.swift index 527c7210..7da4b1cf 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Builds/ById/Relationships/IndividualTesters/BuildsByIdRelationshipsIndividualTesters.GET.d176ffd.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Builds/ById/Relationships/IndividualTesters/BuildsByIdRelationshipsIndividualTesters.GET.d176ffd.generated.swift @@ -42,8 +42,10 @@ extension V1.Builds.ById.Relationships.IndividualTesters { /// - Returns: **200**, List of related linkages as `BuildIndividualTestersLinkagesResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -57,12 +59,18 @@ extension V1.Builds.ById.Relationships.IndividualTesters { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 404: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Builds/ById/Relationships/IndividualTesters/BuildsByIdRelationshipsIndividualTesters.POST.d176ffd.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Builds/ById/Relationships/IndividualTesters/BuildsByIdRelationshipsIndividualTesters.POST.d176ffd.generated.swift index e6c7aa26..426714f2 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Builds/ById/Relationships/IndividualTesters/BuildsByIdRelationshipsIndividualTesters.POST.d176ffd.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Builds/ById/Relationships/IndividualTesters/BuildsByIdRelationshipsIndividualTesters.POST.d176ffd.generated.swift @@ -46,10 +46,12 @@ extension V1.Builds.ById.Relationships.IndividualTesters { return urlRequest } - /// - Returns: **204**, Success (no content) + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **422**, Unprocessable request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -57,8 +59,8 @@ extension V1.Builds.ById.Relationships.IndividualTesters { } switch urlResponse.statusCode { - case 204: - return + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) @@ -69,6 +71,12 @@ extension V1.Builds.ById.Relationships.IndividualTesters { case 409: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 422: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Builds/ById/Relationships/PreReleaseVersion/BuildsByIdRelationshipsPreReleaseVersion.GET.098a261.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Builds/ById/Relationships/PreReleaseVersion/BuildsByIdRelationshipsPreReleaseVersion.GET.098a261.generated.swift new file mode 100644 index 00000000..057df326 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Builds/ById/Relationships/PreReleaseVersion/BuildsByIdRelationshipsPreReleaseVersion.GET.098a261.generated.swift @@ -0,0 +1,86 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.Builds.ById.Relationships.PreReleaseVersion { + public struct GET: Endpoint { + public typealias Response = BuildPreReleaseVersionLinkageResponse + + public var path: String { + "/v1/builds/\(id)/relationships/preReleaseVersion" + } + + /// the id of the requested resource + public var id: String + + public var parameters: Parameters = Parameters() + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + components?.queryItems = [ + + ].filter { $0.value != nil } + if components?.queryItems?.isEmpty ?? false { + components?.queryItems = nil + } + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "GET" + return urlRequest + } + + /// - Returns: **200**, Related linkage as `BuildPreReleaseVersionLinkageResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(BuildPreReleaseVersionLinkageResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +extension V1.Builds.ById.Relationships.PreReleaseVersion.GET { + public struct Parameters: Hashable { + + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BundleIdCapabilities/BundleIdCapabilities.POST.110b1c5.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BundleIdCapabilities/BundleIdCapabilities.POST.110b1c5.generated.swift index 68589802..8a955a1f 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BundleIdCapabilities/BundleIdCapabilities.POST.110b1c5.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BundleIdCapabilities/BundleIdCapabilities.POST.110b1c5.generated.swift @@ -41,8 +41,11 @@ extension V1.BundleIdCapabilities { /// - Returns: **201**, Single BundleIdCapability as `BundleIdCapabilityResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **422**, Unprocessable request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -56,12 +59,21 @@ extension V1.BundleIdCapabilities { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 409: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 422: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BundleIdCapabilities/ById/BundleIdCapabilitiesById.DELETE.2e41da5.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BundleIdCapabilities/ById/BundleIdCapabilitiesById.DELETE.2e41da5.generated.swift index eeea7485..fc25582f 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BundleIdCapabilities/ById/BundleIdCapabilitiesById.DELETE.2e41da5.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BundleIdCapabilities/ById/BundleIdCapabilitiesById.DELETE.2e41da5.generated.swift @@ -31,11 +31,12 @@ extension V1.BundleIdCapabilities.ById { return urlRequest } - /// - Returns: **204**, Success (no content) /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -43,12 +44,12 @@ extension V1.BundleIdCapabilities.ById { } switch urlResponse.statusCode { - case 204: - return - case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) @@ -58,6 +59,9 @@ extension V1.BundleIdCapabilities.ById { case 409: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BundleIdCapabilities/ById/BundleIdCapabilitiesById.PATCH.2e41da5.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BundleIdCapabilities/ById/BundleIdCapabilitiesById.PATCH.2e41da5.generated.swift index 613e4715..22076527 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BundleIdCapabilities/ById/BundleIdCapabilitiesById.PATCH.2e41da5.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BundleIdCapabilities/ById/BundleIdCapabilitiesById.PATCH.2e41da5.generated.swift @@ -48,9 +48,12 @@ extension V1.BundleIdCapabilities.ById { /// - Returns: **200**, Single BundleIdCapability as `BundleIdCapabilityResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **422**, Unprocessable request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -64,6 +67,9 @@ extension V1.BundleIdCapabilities.ById { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) @@ -73,6 +79,12 @@ extension V1.BundleIdCapabilities.ById { case 409: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 422: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BundleIds/BundleIds.GET.e1a0630.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BundleIds/BundleIds.GET.e1a0630.generated.swift index eeed7c10..f12c779f 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BundleIds/BundleIds.GET.e1a0630.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BundleIds/BundleIds.GET.e1a0630.generated.swift @@ -65,7 +65,9 @@ extension V1.BundleIds { /// - Returns: **200**, List of BundleIds as `BundleIdsResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -79,9 +81,15 @@ extension V1.BundleIds { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -112,262 +120,331 @@ extension V1.BundleIds.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum Apps: Hashable, Codable, RawRepresentable { - case appAvailability - case appClips - case appCustomProductPages - case appEncryptionDeclarations - case appEvents - case appInfos - case appPricePoints - case appPriceSchedule - case appStoreVersionExperimentsV2 - case appStoreVersions - case availableInNewTerritories - case availableTerritories - case betaAppLocalizations - case betaAppReviewDetail - case betaGroups - case betaLicenseAgreement - case betaTesters - case builds - case bundleId - case ciProduct - case contentRightsDeclaration - case customerReviews - case endUserLicenseAgreement - case gameCenterDetail - case gameCenterEnabledVersions - case inAppPurchases - case inAppPurchasesV2 - case isOrEverWasMadeForKids - case name - case perfPowerMetrics - case preOrder - case preReleaseVersions - case pricePoints - case prices - case primaryLocale - case promotedPurchases - case reviewSubmissions - case sku - case subscriptionGracePeriod - case subscriptionGroups - case subscriptionStatusUrl - case subscriptionStatusUrlForSandbox - case subscriptionStatusUrlVersion - case subscriptionStatusUrlVersionForSandbox - case unknown(String) - - public var rawValue: String { - switch self { - case .appAvailability: return "appAvailability" - case .appClips: return "appClips" - case .appCustomProductPages: return "appCustomProductPages" - case .appEncryptionDeclarations: return "appEncryptionDeclarations" - case .appEvents: return "appEvents" - case .appInfos: return "appInfos" - case .appPricePoints: return "appPricePoints" - case .appPriceSchedule: return "appPriceSchedule" - case .appStoreVersionExperimentsV2: return "appStoreVersionExperimentsV2" - case .appStoreVersions: return "appStoreVersions" - case .availableInNewTerritories: return "availableInNewTerritories" - case .availableTerritories: return "availableTerritories" - case .betaAppLocalizations: return "betaAppLocalizations" - case .betaAppReviewDetail: return "betaAppReviewDetail" - case .betaGroups: return "betaGroups" - case .betaLicenseAgreement: return "betaLicenseAgreement" - case .betaTesters: return "betaTesters" - case .builds: return "builds" - case .bundleId: return "bundleId" - case .ciProduct: return "ciProduct" - case .contentRightsDeclaration: return "contentRightsDeclaration" - case .customerReviews: return "customerReviews" - case .endUserLicenseAgreement: return "endUserLicenseAgreement" - case .gameCenterDetail: return "gameCenterDetail" - case .gameCenterEnabledVersions: return "gameCenterEnabledVersions" - case .inAppPurchases: return "inAppPurchases" - case .inAppPurchasesV2: return "inAppPurchasesV2" - case .isOrEverWasMadeForKids: return "isOrEverWasMadeForKids" - case .name: return "name" - case .perfPowerMetrics: return "perfPowerMetrics" - case .preOrder: return "preOrder" - case .preReleaseVersions: return "preReleaseVersions" - case .pricePoints: return "pricePoints" - case .prices: return "prices" - case .primaryLocale: return "primaryLocale" - case .promotedPurchases: return "promotedPurchases" - case .reviewSubmissions: return "reviewSubmissions" - case .sku: return "sku" - case .subscriptionGracePeriod: return "subscriptionGracePeriod" - case .subscriptionGroups: return "subscriptionGroups" - case .subscriptionStatusUrl: return "subscriptionStatusUrl" - case .subscriptionStatusUrlForSandbox: return "subscriptionStatusUrlForSandbox" - case .subscriptionStatusUrlVersion: return "subscriptionStatusUrlVersion" - case .subscriptionStatusUrlVersionForSandbox: return "subscriptionStatusUrlVersionForSandbox" - case .unknown(let rawValue): return rawValue - } + public struct Apps: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var accessibilityDeclarations: Self { + .init(rawValue: "accessibilityDeclarations") + } + + public static var accessibilityUrl: Self { + .init(rawValue: "accessibilityUrl") + } + + public static var alternativeDistributionKey: Self { + .init(rawValue: "alternativeDistributionKey") + } + + public static var analyticsReportRequests: Self { + .init(rawValue: "analyticsReportRequests") + } + + public static var appAvailabilityV2: Self { + .init(rawValue: "appAvailabilityV2") + } + + public static var appClips: Self { + .init(rawValue: "appClips") + } + + public static var appCustomProductPages: Self { + .init(rawValue: "appCustomProductPages") + } + + public static var appEncryptionDeclarations: Self { + .init(rawValue: "appEncryptionDeclarations") + } + + public static var appEvents: Self { + .init(rawValue: "appEvents") + } + + public static var appInfos: Self { + .init(rawValue: "appInfos") + } + + public static var appPricePoints: Self { + .init(rawValue: "appPricePoints") + } + + public static var appPriceSchedule: Self { + .init(rawValue: "appPriceSchedule") + } + + public static var appStoreVersionExperimentsV2: Self { + .init(rawValue: "appStoreVersionExperimentsV2") + } + + public static var appStoreVersions: Self { + .init(rawValue: "appStoreVersions") + } + + public static var backgroundAssets: Self { + .init(rawValue: "backgroundAssets") + } + + public static var betaAppLocalizations: Self { + .init(rawValue: "betaAppLocalizations") + } + + public static var betaAppReviewDetail: Self { + .init(rawValue: "betaAppReviewDetail") + } + + public static var betaFeedbackCrashSubmissions: Self { + .init(rawValue: "betaFeedbackCrashSubmissions") + } + + public static var betaFeedbackScreenshotSubmissions: Self { + .init(rawValue: "betaFeedbackScreenshotSubmissions") + } + + public static var betaGroups: Self { + .init(rawValue: "betaGroups") + } + + public static var betaLicenseAgreement: Self { + .init(rawValue: "betaLicenseAgreement") + } + + public static var betaTesters: Self { + .init(rawValue: "betaTesters") + } + + public static var builds: Self { + .init(rawValue: "builds") + } + + public static var bundleId: Self { + .init(rawValue: "bundleId") + } + + public static var ciProduct: Self { + .init(rawValue: "ciProduct") + } + + public static var contentRightsDeclaration: Self { + .init(rawValue: "contentRightsDeclaration") + } + + public static var customerReviewSummarizations: Self { + .init(rawValue: "customerReviewSummarizations") + } + + public static var customerReviews: Self { + .init(rawValue: "customerReviews") + } + + public static var endUserLicenseAgreement: Self { + .init(rawValue: "endUserLicenseAgreement") + } + + public static var gameCenterDetail: Self { + .init(rawValue: "gameCenterDetail") + } + + public static var gameCenterEnabledVersions: Self { + .init(rawValue: "gameCenterEnabledVersions") + } + + public static var inAppPurchases: Self { + .init(rawValue: "inAppPurchases") + } + + public static var inAppPurchasesV2: Self { + .init(rawValue: "inAppPurchasesV2") + } + + public static var isOrEverWasMadeForKids: Self { + .init(rawValue: "isOrEverWasMadeForKids") + } + + public static var marketplaceSearchDetail: Self { + .init(rawValue: "marketplaceSearchDetail") + } + + public static var name: Self { + .init(rawValue: "name") + } + + public static var perfPowerMetrics: Self { + .init(rawValue: "perfPowerMetrics") + } + + public static var preReleaseVersions: Self { + .init(rawValue: "preReleaseVersions") + } + + public static var primaryLocale: Self { + .init(rawValue: "primaryLocale") + } + + public static var promotedPurchases: Self { + .init(rawValue: "promotedPurchases") + } + + public static var reviewSubmissions: Self { + .init(rawValue: "reviewSubmissions") + } + + public static var sku: Self { + .init(rawValue: "sku") + } + + public static var streamlinedPurchasingEnabled: Self { + .init(rawValue: "streamlinedPurchasingEnabled") + } + + public static var subscriptionGracePeriod: Self { + .init(rawValue: "subscriptionGracePeriod") + } + + public static var subscriptionGroups: Self { + .init(rawValue: "subscriptionGroups") + } + + public static var subscriptionStatusUrl: Self { + .init(rawValue: "subscriptionStatusUrl") + } + + public static var subscriptionStatusUrlForSandbox: Self { + .init(rawValue: "subscriptionStatusUrlForSandbox") + } + + public static var subscriptionStatusUrlVersion: Self { + .init(rawValue: "subscriptionStatusUrlVersion") + } + + public static var subscriptionStatusUrlVersionForSandbox: Self { + .init(rawValue: "subscriptionStatusUrlVersionForSandbox") + } + + public static var webhooks: Self { + .init(rawValue: "webhooks") + } + + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "appAvailability": self = .appAvailability - case "appClips": self = .appClips - case "appCustomProductPages": self = .appCustomProductPages - case "appEncryptionDeclarations": self = .appEncryptionDeclarations - case "appEvents": self = .appEvents - case "appInfos": self = .appInfos - case "appPricePoints": self = .appPricePoints - case "appPriceSchedule": self = .appPriceSchedule - case "appStoreVersionExperimentsV2": self = .appStoreVersionExperimentsV2 - case "appStoreVersions": self = .appStoreVersions - case "availableInNewTerritories": self = .availableInNewTerritories - case "availableTerritories": self = .availableTerritories - case "betaAppLocalizations": self = .betaAppLocalizations - case "betaAppReviewDetail": self = .betaAppReviewDetail - case "betaGroups": self = .betaGroups - case "betaLicenseAgreement": self = .betaLicenseAgreement - case "betaTesters": self = .betaTesters - case "builds": self = .builds - case "bundleId": self = .bundleId - case "ciProduct": self = .ciProduct - case "contentRightsDeclaration": self = .contentRightsDeclaration - case "customerReviews": self = .customerReviews - case "endUserLicenseAgreement": self = .endUserLicenseAgreement - case "gameCenterDetail": self = .gameCenterDetail - case "gameCenterEnabledVersions": self = .gameCenterEnabledVersions - case "inAppPurchases": self = .inAppPurchases - case "inAppPurchasesV2": self = .inAppPurchasesV2 - case "isOrEverWasMadeForKids": self = .isOrEverWasMadeForKids - case "name": self = .name - case "perfPowerMetrics": self = .perfPowerMetrics - case "preOrder": self = .preOrder - case "preReleaseVersions": self = .preReleaseVersions - case "pricePoints": self = .pricePoints - case "prices": self = .prices - case "primaryLocale": self = .primaryLocale - case "promotedPurchases": self = .promotedPurchases - case "reviewSubmissions": self = .reviewSubmissions - case "sku": self = .sku - case "subscriptionGracePeriod": self = .subscriptionGracePeriod - case "subscriptionGroups": self = .subscriptionGroups - case "subscriptionStatusUrl": self = .subscriptionStatusUrl - case "subscriptionStatusUrlForSandbox": self = .subscriptionStatusUrlForSandbox - case "subscriptionStatusUrlVersion": self = .subscriptionStatusUrlVersion - case "subscriptionStatusUrlVersionForSandbox": self = .subscriptionStatusUrlVersionForSandbox - default: self = .unknown(rawValue) - } - } - } - - public enum BundleIdCapabilities: Hashable, Codable, RawRepresentable { - case bundleId - case capabilityType - case settings - case unknown(String) - - public var rawValue: String { - switch self { - case .bundleId: return "bundleId" - case .capabilityType: return "capabilityType" - case .settings: return "settings" - case .unknown(let rawValue): return rawValue - } + self.rawValue = rawValue + } + } + + public struct BundleIdCapabilities: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var capabilityType: Self { + .init(rawValue: "capabilityType") + } + + public static var settings: Self { + .init(rawValue: "settings") } + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "bundleId": self = .bundleId - case "capabilityType": self = .capabilityType - case "settings": self = .settings - default: self = .unknown(rawValue) - } - } - } - - public enum BundleIds: Hashable, Codable, RawRepresentable { - case app - case bundleIdCapabilities - case identifier - case name - case platform - case profiles - case seedId - case unknown(String) - - public var rawValue: String { - switch self { - case .app: return "app" - case .bundleIdCapabilities: return "bundleIdCapabilities" - case .identifier: return "identifier" - case .name: return "name" - case .platform: return "platform" - case .profiles: return "profiles" - case .seedId: return "seedId" - case .unknown(let rawValue): return rawValue - } + self.rawValue = rawValue + } + } + + public struct BundleIds: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var app: Self { + .init(rawValue: "app") + } + + public static var bundleIdCapabilities: Self { + .init(rawValue: "bundleIdCapabilities") + } + + public static var identifier: Self { + .init(rawValue: "identifier") + } + + public static var name: Self { + .init(rawValue: "name") } + public static var platform: Self { + .init(rawValue: "platform") + } + + public static var profiles: Self { + .init(rawValue: "profiles") + } + + public static var seedId: Self { + .init(rawValue: "seedId") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "app": self = .app - case "bundleIdCapabilities": self = .bundleIdCapabilities - case "identifier": self = .identifier - case "name": self = .name - case "platform": self = .platform - case "profiles": self = .profiles - case "seedId": self = .seedId - default: self = .unknown(rawValue) - } - } - } - - public enum Profiles: Hashable, Codable, RawRepresentable { - case bundleId - case certificates - case createdDate - case devices - case expirationDate - case name - case platform - case profileContent - case profileState - case profileType - case uuid - case unknown(String) - - public var rawValue: String { - switch self { - case .bundleId: return "bundleId" - case .certificates: return "certificates" - case .createdDate: return "createdDate" - case .devices: return "devices" - case .expirationDate: return "expirationDate" - case .name: return "name" - case .platform: return "platform" - case .profileContent: return "profileContent" - case .profileState: return "profileState" - case .profileType: return "profileType" - case .uuid: return "uuid" - case .unknown(let rawValue): return rawValue - } + self.rawValue = rawValue + } + } + + public struct Profiles: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var bundleId: Self { + .init(rawValue: "bundleId") + } + + public static var certificates: Self { + .init(rawValue: "certificates") + } + + public static var createdDate: Self { + .init(rawValue: "createdDate") + } + + public static var devices: Self { + .init(rawValue: "devices") + } + + public static var expirationDate: Self { + .init(rawValue: "expirationDate") + } + + public static var name: Self { + .init(rawValue: "name") + } + + public static var platform: Self { + .init(rawValue: "platform") } + public static var profileContent: Self { + .init(rawValue: "profileContent") + } + + public static var profileState: Self { + .init(rawValue: "profileState") + } + + public static var profileType: Self { + .init(rawValue: "profileType") + } + + public static var uuid: Self { + .init(rawValue: "uuid") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "bundleId": self = .bundleId - case "certificates": self = .certificates - case "createdDate": self = .createdDate - case "devices": self = .devices - case "expirationDate": self = .expirationDate - case "name": self = .name - case "platform": self = .platform - case "profileContent": self = .profileContent - case "profileState": self = .profileState - case "profileType": self = .profileType - case "uuid": self = .uuid - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } @@ -408,25 +485,27 @@ extension V1.BundleIds.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum Platform: Hashable, Codable, RawRepresentable { - case iOS - case macOS - case unknown(String) + public struct Platform: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var iOS: Self { + .init(rawValue: "IOS") + } + + public static var macOS: Self { + .init(rawValue: "MAC_OS") + } + + public static var universal: Self { + .init(rawValue: "UNIVERSAL") + } - public var rawValue: String { - switch self { - case .iOS: return "IOS" - case .macOS: return "MAC_OS" - case .unknown(let rawValue): return rawValue - } + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "IOS": self = .iOS - case "MAC_OS": self = .macOS - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } @@ -464,28 +543,27 @@ extension V1.BundleIds.GET { } } - public enum Include: Hashable, Codable, RawRepresentable { - case app - case bundleIdCapabilities - case profiles - case unknown(String) + public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var app: Self { + .init(rawValue: "app") + } + + public static var bundleIdCapabilities: Self { + .init(rawValue: "bundleIdCapabilities") + } - public var rawValue: String { - switch self { - case .app: return "app" - case .bundleIdCapabilities: return "bundleIdCapabilities" - case .profiles: return "profiles" - case .unknown(let rawValue): return rawValue - } + public static var profiles: Self { + .init(rawValue: "profiles") } + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "app": self = .app - case "bundleIdCapabilities": self = .bundleIdCapabilities - case "profiles": self = .profiles - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } @@ -521,49 +599,55 @@ extension V1.BundleIds.GET { } } - public enum Sort: Hashable, Codable, RawRepresentable { - case id - case idDesc - case identifier - case identifierDesc - case name - case nameDesc - case platform - case platformDesc - case seedId - case seedIdDesc - case unknown(String) - - public var rawValue: String { - switch self { - case .id: return "id" - case .idDesc: return "-id" - case .identifier: return "identifier" - case .identifierDesc: return "-identifier" - case .name: return "name" - case .nameDesc: return "-name" - case .platform: return "platform" - case .platformDesc: return "-platform" - case .seedId: return "seedId" - case .seedIdDesc: return "-seedId" - case .unknown(let rawValue): return rawValue - } + public struct Sort: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var id: Self { + .init(rawValue: "id") + } + + public static var idDesc: Self { + .init(rawValue: "-id") + } + + public static var identifier: Self { + .init(rawValue: "identifier") + } + + public static var identifierDesc: Self { + .init(rawValue: "-identifier") + } + + public static var name: Self { + .init(rawValue: "name") + } + + public static var nameDesc: Self { + .init(rawValue: "-name") } + public static var platform: Self { + .init(rawValue: "platform") + } + + public static var platformDesc: Self { + .init(rawValue: "-platform") + } + + public static var seedId: Self { + .init(rawValue: "seedId") + } + + public static var seedIdDesc: Self { + .init(rawValue: "-seedId") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "id": self = .id - case "-id": self = .idDesc - case "identifier": self = .identifier - case "-identifier": self = .identifierDesc - case "name": self = .name - case "-name": self = .nameDesc - case "platform": self = .platform - case "-platform": self = .platformDesc - case "seedId": self = .seedId - case "-seedId": self = .seedIdDesc - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BundleIds/BundleIds.POST.e1a0630.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BundleIds/BundleIds.POST.e1a0630.generated.swift index 95bb6bb5..90223276 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BundleIds/BundleIds.POST.e1a0630.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BundleIds/BundleIds.POST.e1a0630.generated.swift @@ -41,8 +41,11 @@ extension V1.BundleIds { /// - Returns: **201**, Single BundleId as `BundleIdResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **422**, Unprocessable request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -56,12 +59,21 @@ extension V1.BundleIds { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 409: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 422: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BundleIds/ById/App/BundleIdsByIdApp.GET.febfeff.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BundleIds/ById/App/BundleIdsByIdApp.GET.febfeff.generated.swift index ed332a92..1ffebbae 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BundleIds/ById/App/BundleIdsByIdApp.GET.febfeff.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BundleIds/ById/App/BundleIdsByIdApp.GET.febfeff.generated.swift @@ -42,8 +42,10 @@ extension V1.BundleIds.ById.App { /// - Returns: **200**, Single App with get as `AppWithoutIncludesResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -57,12 +59,18 @@ extension V1.BundleIds.ById.App { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 404: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -82,151 +90,215 @@ extension V1.BundleIds.ById.App.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum Apps: Hashable, Codable, RawRepresentable { - case appAvailability - case appClips - case appCustomProductPages - case appEncryptionDeclarations - case appEvents - case appInfos - case appPricePoints - case appPriceSchedule - case appStoreVersionExperimentsV2 - case appStoreVersions - case availableInNewTerritories - case availableTerritories - case betaAppLocalizations - case betaAppReviewDetail - case betaGroups - case betaLicenseAgreement - case betaTesters - case builds - case bundleId - case ciProduct - case contentRightsDeclaration - case customerReviews - case endUserLicenseAgreement - case gameCenterDetail - case gameCenterEnabledVersions - case inAppPurchases - case inAppPurchasesV2 - case isOrEverWasMadeForKids - case name - case perfPowerMetrics - case preOrder - case preReleaseVersions - case pricePoints - case prices - case primaryLocale - case promotedPurchases - case reviewSubmissions - case sku - case subscriptionGracePeriod - case subscriptionGroups - case subscriptionStatusUrl - case subscriptionStatusUrlForSandbox - case subscriptionStatusUrlVersion - case subscriptionStatusUrlVersionForSandbox - case unknown(String) - - public var rawValue: String { - switch self { - case .appAvailability: return "appAvailability" - case .appClips: return "appClips" - case .appCustomProductPages: return "appCustomProductPages" - case .appEncryptionDeclarations: return "appEncryptionDeclarations" - case .appEvents: return "appEvents" - case .appInfos: return "appInfos" - case .appPricePoints: return "appPricePoints" - case .appPriceSchedule: return "appPriceSchedule" - case .appStoreVersionExperimentsV2: return "appStoreVersionExperimentsV2" - case .appStoreVersions: return "appStoreVersions" - case .availableInNewTerritories: return "availableInNewTerritories" - case .availableTerritories: return "availableTerritories" - case .betaAppLocalizations: return "betaAppLocalizations" - case .betaAppReviewDetail: return "betaAppReviewDetail" - case .betaGroups: return "betaGroups" - case .betaLicenseAgreement: return "betaLicenseAgreement" - case .betaTesters: return "betaTesters" - case .builds: return "builds" - case .bundleId: return "bundleId" - case .ciProduct: return "ciProduct" - case .contentRightsDeclaration: return "contentRightsDeclaration" - case .customerReviews: return "customerReviews" - case .endUserLicenseAgreement: return "endUserLicenseAgreement" - case .gameCenterDetail: return "gameCenterDetail" - case .gameCenterEnabledVersions: return "gameCenterEnabledVersions" - case .inAppPurchases: return "inAppPurchases" - case .inAppPurchasesV2: return "inAppPurchasesV2" - case .isOrEverWasMadeForKids: return "isOrEverWasMadeForKids" - case .name: return "name" - case .perfPowerMetrics: return "perfPowerMetrics" - case .preOrder: return "preOrder" - case .preReleaseVersions: return "preReleaseVersions" - case .pricePoints: return "pricePoints" - case .prices: return "prices" - case .primaryLocale: return "primaryLocale" - case .promotedPurchases: return "promotedPurchases" - case .reviewSubmissions: return "reviewSubmissions" - case .sku: return "sku" - case .subscriptionGracePeriod: return "subscriptionGracePeriod" - case .subscriptionGroups: return "subscriptionGroups" - case .subscriptionStatusUrl: return "subscriptionStatusUrl" - case .subscriptionStatusUrlForSandbox: return "subscriptionStatusUrlForSandbox" - case .subscriptionStatusUrlVersion: return "subscriptionStatusUrlVersion" - case .subscriptionStatusUrlVersionForSandbox: return "subscriptionStatusUrlVersionForSandbox" - case .unknown(let rawValue): return rawValue - } + public struct Apps: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var accessibilityDeclarations: Self { + .init(rawValue: "accessibilityDeclarations") + } + + public static var accessibilityUrl: Self { + .init(rawValue: "accessibilityUrl") + } + + public static var alternativeDistributionKey: Self { + .init(rawValue: "alternativeDistributionKey") + } + + public static var analyticsReportRequests: Self { + .init(rawValue: "analyticsReportRequests") + } + + public static var appAvailabilityV2: Self { + .init(rawValue: "appAvailabilityV2") + } + + public static var appClips: Self { + .init(rawValue: "appClips") } + public static var appCustomProductPages: Self { + .init(rawValue: "appCustomProductPages") + } + + public static var appEncryptionDeclarations: Self { + .init(rawValue: "appEncryptionDeclarations") + } + + public static var appEvents: Self { + .init(rawValue: "appEvents") + } + + public static var appInfos: Self { + .init(rawValue: "appInfos") + } + + public static var appPricePoints: Self { + .init(rawValue: "appPricePoints") + } + + public static var appPriceSchedule: Self { + .init(rawValue: "appPriceSchedule") + } + + public static var appStoreVersionExperimentsV2: Self { + .init(rawValue: "appStoreVersionExperimentsV2") + } + + public static var appStoreVersions: Self { + .init(rawValue: "appStoreVersions") + } + + public static var backgroundAssets: Self { + .init(rawValue: "backgroundAssets") + } + + public static var betaAppLocalizations: Self { + .init(rawValue: "betaAppLocalizations") + } + + public static var betaAppReviewDetail: Self { + .init(rawValue: "betaAppReviewDetail") + } + + public static var betaFeedbackCrashSubmissions: Self { + .init(rawValue: "betaFeedbackCrashSubmissions") + } + + public static var betaFeedbackScreenshotSubmissions: Self { + .init(rawValue: "betaFeedbackScreenshotSubmissions") + } + + public static var betaGroups: Self { + .init(rawValue: "betaGroups") + } + + public static var betaLicenseAgreement: Self { + .init(rawValue: "betaLicenseAgreement") + } + + public static var betaTesters: Self { + .init(rawValue: "betaTesters") + } + + public static var builds: Self { + .init(rawValue: "builds") + } + + public static var bundleId: Self { + .init(rawValue: "bundleId") + } + + public static var ciProduct: Self { + .init(rawValue: "ciProduct") + } + + public static var contentRightsDeclaration: Self { + .init(rawValue: "contentRightsDeclaration") + } + + public static var customerReviewSummarizations: Self { + .init(rawValue: "customerReviewSummarizations") + } + + public static var customerReviews: Self { + .init(rawValue: "customerReviews") + } + + public static var endUserLicenseAgreement: Self { + .init(rawValue: "endUserLicenseAgreement") + } + + public static var gameCenterDetail: Self { + .init(rawValue: "gameCenterDetail") + } + + public static var gameCenterEnabledVersions: Self { + .init(rawValue: "gameCenterEnabledVersions") + } + + public static var inAppPurchases: Self { + .init(rawValue: "inAppPurchases") + } + + public static var inAppPurchasesV2: Self { + .init(rawValue: "inAppPurchasesV2") + } + + public static var isOrEverWasMadeForKids: Self { + .init(rawValue: "isOrEverWasMadeForKids") + } + + public static var marketplaceSearchDetail: Self { + .init(rawValue: "marketplaceSearchDetail") + } + + public static var name: Self { + .init(rawValue: "name") + } + + public static var perfPowerMetrics: Self { + .init(rawValue: "perfPowerMetrics") + } + + public static var preReleaseVersions: Self { + .init(rawValue: "preReleaseVersions") + } + + public static var primaryLocale: Self { + .init(rawValue: "primaryLocale") + } + + public static var promotedPurchases: Self { + .init(rawValue: "promotedPurchases") + } + + public static var reviewSubmissions: Self { + .init(rawValue: "reviewSubmissions") + } + + public static var sku: Self { + .init(rawValue: "sku") + } + + public static var streamlinedPurchasingEnabled: Self { + .init(rawValue: "streamlinedPurchasingEnabled") + } + + public static var subscriptionGracePeriod: Self { + .init(rawValue: "subscriptionGracePeriod") + } + + public static var subscriptionGroups: Self { + .init(rawValue: "subscriptionGroups") + } + + public static var subscriptionStatusUrl: Self { + .init(rawValue: "subscriptionStatusUrl") + } + + public static var subscriptionStatusUrlForSandbox: Self { + .init(rawValue: "subscriptionStatusUrlForSandbox") + } + + public static var subscriptionStatusUrlVersion: Self { + .init(rawValue: "subscriptionStatusUrlVersion") + } + + public static var subscriptionStatusUrlVersionForSandbox: Self { + .init(rawValue: "subscriptionStatusUrlVersionForSandbox") + } + + public static var webhooks: Self { + .init(rawValue: "webhooks") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "appAvailability": self = .appAvailability - case "appClips": self = .appClips - case "appCustomProductPages": self = .appCustomProductPages - case "appEncryptionDeclarations": self = .appEncryptionDeclarations - case "appEvents": self = .appEvents - case "appInfos": self = .appInfos - case "appPricePoints": self = .appPricePoints - case "appPriceSchedule": self = .appPriceSchedule - case "appStoreVersionExperimentsV2": self = .appStoreVersionExperimentsV2 - case "appStoreVersions": self = .appStoreVersions - case "availableInNewTerritories": self = .availableInNewTerritories - case "availableTerritories": self = .availableTerritories - case "betaAppLocalizations": self = .betaAppLocalizations - case "betaAppReviewDetail": self = .betaAppReviewDetail - case "betaGroups": self = .betaGroups - case "betaLicenseAgreement": self = .betaLicenseAgreement - case "betaTesters": self = .betaTesters - case "builds": self = .builds - case "bundleId": self = .bundleId - case "ciProduct": self = .ciProduct - case "contentRightsDeclaration": self = .contentRightsDeclaration - case "customerReviews": self = .customerReviews - case "endUserLicenseAgreement": self = .endUserLicenseAgreement - case "gameCenterDetail": self = .gameCenterDetail - case "gameCenterEnabledVersions": self = .gameCenterEnabledVersions - case "inAppPurchases": self = .inAppPurchases - case "inAppPurchasesV2": self = .inAppPurchasesV2 - case "isOrEverWasMadeForKids": self = .isOrEverWasMadeForKids - case "name": self = .name - case "perfPowerMetrics": self = .perfPowerMetrics - case "preOrder": self = .preOrder - case "preReleaseVersions": self = .preReleaseVersions - case "pricePoints": self = .pricePoints - case "prices": self = .prices - case "primaryLocale": self = .primaryLocale - case "promotedPurchases": self = .promotedPurchases - case "reviewSubmissions": self = .reviewSubmissions - case "sku": self = .sku - case "subscriptionGracePeriod": self = .subscriptionGracePeriod - case "subscriptionGroups": self = .subscriptionGroups - case "subscriptionStatusUrl": self = .subscriptionStatusUrl - case "subscriptionStatusUrlForSandbox": self = .subscriptionStatusUrlForSandbox - case "subscriptionStatusUrlVersion": self = .subscriptionStatusUrlVersion - case "subscriptionStatusUrlVersionForSandbox": self = .subscriptionStatusUrlVersionForSandbox - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BundleIds/ById/BundleIdCapabilities/BundleIdsByIdBundleIdCapabilities.GET.9ffe45d.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BundleIds/ById/BundleIdCapabilities/BundleIdsByIdBundleIdCapabilities.GET.9ffe45d.generated.swift index 697639f2..16d99ea1 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BundleIds/ById/BundleIdCapabilities/BundleIdsByIdBundleIdCapabilities.GET.9ffe45d.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BundleIds/ById/BundleIdCapabilities/BundleIdsByIdBundleIdCapabilities.GET.9ffe45d.generated.swift @@ -44,8 +44,10 @@ extension V1.BundleIds.ById.BundleIdCapabilities { /// - Returns: **200**, List of BundleIdCapabilities with get as `BundleIdCapabilitiesWithoutIncludesResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -59,12 +61,18 @@ extension V1.BundleIds.ById.BundleIdCapabilities { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 404: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -87,28 +95,23 @@ extension V1.BundleIds.ById.BundleIdCapabilities.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum BundleIdCapabilities: Hashable, Codable, RawRepresentable { - case bundleId - case capabilityType - case settings - case unknown(String) - - public var rawValue: String { - switch self { - case .bundleId: return "bundleId" - case .capabilityType: return "capabilityType" - case .settings: return "settings" - case .unknown(let rawValue): return rawValue - } + public struct BundleIdCapabilities: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var capabilityType: Self { + .init(rawValue: "capabilityType") } + public static var settings: Self { + .init(rawValue: "settings") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "bundleId": self = .bundleId - case "capabilityType": self = .capabilityType - case "settings": self = .settings - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BundleIds/ById/BundleIdsById.DELETE.8901881.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BundleIds/ById/BundleIdsById.DELETE.8901881.generated.swift index c5af7755..3d82179d 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BundleIds/ById/BundleIdsById.DELETE.8901881.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BundleIds/ById/BundleIdsById.DELETE.8901881.generated.swift @@ -31,11 +31,12 @@ extension V1.BundleIds.ById { return urlRequest } - /// - Returns: **204**, Success (no content) /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -43,12 +44,12 @@ extension V1.BundleIds.ById { } switch urlResponse.statusCode { - case 204: - return - case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) @@ -58,6 +59,9 @@ extension V1.BundleIds.ById { case 409: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BundleIds/ById/BundleIdsById.GET.8901881.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BundleIds/ById/BundleIdsById.GET.8901881.generated.swift index 9ecb64b1..c906afd1 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BundleIds/ById/BundleIdsById.GET.8901881.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BundleIds/ById/BundleIdsById.GET.8901881.generated.swift @@ -54,8 +54,10 @@ extension V1.BundleIds.ById { /// - Returns: **200**, Single BundleId as `BundleIdResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -69,12 +71,18 @@ extension V1.BundleIds.ById { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 404: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -99,262 +107,331 @@ extension V1.BundleIds.ById.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum Apps: Hashable, Codable, RawRepresentable { - case appAvailability - case appClips - case appCustomProductPages - case appEncryptionDeclarations - case appEvents - case appInfos - case appPricePoints - case appPriceSchedule - case appStoreVersionExperimentsV2 - case appStoreVersions - case availableInNewTerritories - case availableTerritories - case betaAppLocalizations - case betaAppReviewDetail - case betaGroups - case betaLicenseAgreement - case betaTesters - case builds - case bundleId - case ciProduct - case contentRightsDeclaration - case customerReviews - case endUserLicenseAgreement - case gameCenterDetail - case gameCenterEnabledVersions - case inAppPurchases - case inAppPurchasesV2 - case isOrEverWasMadeForKids - case name - case perfPowerMetrics - case preOrder - case preReleaseVersions - case pricePoints - case prices - case primaryLocale - case promotedPurchases - case reviewSubmissions - case sku - case subscriptionGracePeriod - case subscriptionGroups - case subscriptionStatusUrl - case subscriptionStatusUrlForSandbox - case subscriptionStatusUrlVersion - case subscriptionStatusUrlVersionForSandbox - case unknown(String) - - public var rawValue: String { - switch self { - case .appAvailability: return "appAvailability" - case .appClips: return "appClips" - case .appCustomProductPages: return "appCustomProductPages" - case .appEncryptionDeclarations: return "appEncryptionDeclarations" - case .appEvents: return "appEvents" - case .appInfos: return "appInfos" - case .appPricePoints: return "appPricePoints" - case .appPriceSchedule: return "appPriceSchedule" - case .appStoreVersionExperimentsV2: return "appStoreVersionExperimentsV2" - case .appStoreVersions: return "appStoreVersions" - case .availableInNewTerritories: return "availableInNewTerritories" - case .availableTerritories: return "availableTerritories" - case .betaAppLocalizations: return "betaAppLocalizations" - case .betaAppReviewDetail: return "betaAppReviewDetail" - case .betaGroups: return "betaGroups" - case .betaLicenseAgreement: return "betaLicenseAgreement" - case .betaTesters: return "betaTesters" - case .builds: return "builds" - case .bundleId: return "bundleId" - case .ciProduct: return "ciProduct" - case .contentRightsDeclaration: return "contentRightsDeclaration" - case .customerReviews: return "customerReviews" - case .endUserLicenseAgreement: return "endUserLicenseAgreement" - case .gameCenterDetail: return "gameCenterDetail" - case .gameCenterEnabledVersions: return "gameCenterEnabledVersions" - case .inAppPurchases: return "inAppPurchases" - case .inAppPurchasesV2: return "inAppPurchasesV2" - case .isOrEverWasMadeForKids: return "isOrEverWasMadeForKids" - case .name: return "name" - case .perfPowerMetrics: return "perfPowerMetrics" - case .preOrder: return "preOrder" - case .preReleaseVersions: return "preReleaseVersions" - case .pricePoints: return "pricePoints" - case .prices: return "prices" - case .primaryLocale: return "primaryLocale" - case .promotedPurchases: return "promotedPurchases" - case .reviewSubmissions: return "reviewSubmissions" - case .sku: return "sku" - case .subscriptionGracePeriod: return "subscriptionGracePeriod" - case .subscriptionGroups: return "subscriptionGroups" - case .subscriptionStatusUrl: return "subscriptionStatusUrl" - case .subscriptionStatusUrlForSandbox: return "subscriptionStatusUrlForSandbox" - case .subscriptionStatusUrlVersion: return "subscriptionStatusUrlVersion" - case .subscriptionStatusUrlVersionForSandbox: return "subscriptionStatusUrlVersionForSandbox" - case .unknown(let rawValue): return rawValue - } + public struct Apps: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var accessibilityDeclarations: Self { + .init(rawValue: "accessibilityDeclarations") + } + + public static var accessibilityUrl: Self { + .init(rawValue: "accessibilityUrl") + } + + public static var alternativeDistributionKey: Self { + .init(rawValue: "alternativeDistributionKey") + } + + public static var analyticsReportRequests: Self { + .init(rawValue: "analyticsReportRequests") + } + + public static var appAvailabilityV2: Self { + .init(rawValue: "appAvailabilityV2") + } + + public static var appClips: Self { + .init(rawValue: "appClips") + } + + public static var appCustomProductPages: Self { + .init(rawValue: "appCustomProductPages") + } + + public static var appEncryptionDeclarations: Self { + .init(rawValue: "appEncryptionDeclarations") + } + + public static var appEvents: Self { + .init(rawValue: "appEvents") + } + + public static var appInfos: Self { + .init(rawValue: "appInfos") + } + + public static var appPricePoints: Self { + .init(rawValue: "appPricePoints") + } + + public static var appPriceSchedule: Self { + .init(rawValue: "appPriceSchedule") + } + + public static var appStoreVersionExperimentsV2: Self { + .init(rawValue: "appStoreVersionExperimentsV2") + } + + public static var appStoreVersions: Self { + .init(rawValue: "appStoreVersions") + } + + public static var backgroundAssets: Self { + .init(rawValue: "backgroundAssets") + } + + public static var betaAppLocalizations: Self { + .init(rawValue: "betaAppLocalizations") + } + + public static var betaAppReviewDetail: Self { + .init(rawValue: "betaAppReviewDetail") + } + + public static var betaFeedbackCrashSubmissions: Self { + .init(rawValue: "betaFeedbackCrashSubmissions") + } + + public static var betaFeedbackScreenshotSubmissions: Self { + .init(rawValue: "betaFeedbackScreenshotSubmissions") + } + + public static var betaGroups: Self { + .init(rawValue: "betaGroups") + } + + public static var betaLicenseAgreement: Self { + .init(rawValue: "betaLicenseAgreement") + } + + public static var betaTesters: Self { + .init(rawValue: "betaTesters") + } + + public static var builds: Self { + .init(rawValue: "builds") + } + + public static var bundleId: Self { + .init(rawValue: "bundleId") + } + + public static var ciProduct: Self { + .init(rawValue: "ciProduct") + } + + public static var contentRightsDeclaration: Self { + .init(rawValue: "contentRightsDeclaration") + } + + public static var customerReviewSummarizations: Self { + .init(rawValue: "customerReviewSummarizations") + } + + public static var customerReviews: Self { + .init(rawValue: "customerReviews") + } + + public static var endUserLicenseAgreement: Self { + .init(rawValue: "endUserLicenseAgreement") + } + + public static var gameCenterDetail: Self { + .init(rawValue: "gameCenterDetail") + } + + public static var gameCenterEnabledVersions: Self { + .init(rawValue: "gameCenterEnabledVersions") + } + + public static var inAppPurchases: Self { + .init(rawValue: "inAppPurchases") + } + + public static var inAppPurchasesV2: Self { + .init(rawValue: "inAppPurchasesV2") + } + + public static var isOrEverWasMadeForKids: Self { + .init(rawValue: "isOrEverWasMadeForKids") + } + + public static var marketplaceSearchDetail: Self { + .init(rawValue: "marketplaceSearchDetail") + } + + public static var name: Self { + .init(rawValue: "name") + } + + public static var perfPowerMetrics: Self { + .init(rawValue: "perfPowerMetrics") + } + + public static var preReleaseVersions: Self { + .init(rawValue: "preReleaseVersions") } + public static var primaryLocale: Self { + .init(rawValue: "primaryLocale") + } + + public static var promotedPurchases: Self { + .init(rawValue: "promotedPurchases") + } + + public static var reviewSubmissions: Self { + .init(rawValue: "reviewSubmissions") + } + + public static var sku: Self { + .init(rawValue: "sku") + } + + public static var streamlinedPurchasingEnabled: Self { + .init(rawValue: "streamlinedPurchasingEnabled") + } + + public static var subscriptionGracePeriod: Self { + .init(rawValue: "subscriptionGracePeriod") + } + + public static var subscriptionGroups: Self { + .init(rawValue: "subscriptionGroups") + } + + public static var subscriptionStatusUrl: Self { + .init(rawValue: "subscriptionStatusUrl") + } + + public static var subscriptionStatusUrlForSandbox: Self { + .init(rawValue: "subscriptionStatusUrlForSandbox") + } + + public static var subscriptionStatusUrlVersion: Self { + .init(rawValue: "subscriptionStatusUrlVersion") + } + + public static var subscriptionStatusUrlVersionForSandbox: Self { + .init(rawValue: "subscriptionStatusUrlVersionForSandbox") + } + + public static var webhooks: Self { + .init(rawValue: "webhooks") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "appAvailability": self = .appAvailability - case "appClips": self = .appClips - case "appCustomProductPages": self = .appCustomProductPages - case "appEncryptionDeclarations": self = .appEncryptionDeclarations - case "appEvents": self = .appEvents - case "appInfos": self = .appInfos - case "appPricePoints": self = .appPricePoints - case "appPriceSchedule": self = .appPriceSchedule - case "appStoreVersionExperimentsV2": self = .appStoreVersionExperimentsV2 - case "appStoreVersions": self = .appStoreVersions - case "availableInNewTerritories": self = .availableInNewTerritories - case "availableTerritories": self = .availableTerritories - case "betaAppLocalizations": self = .betaAppLocalizations - case "betaAppReviewDetail": self = .betaAppReviewDetail - case "betaGroups": self = .betaGroups - case "betaLicenseAgreement": self = .betaLicenseAgreement - case "betaTesters": self = .betaTesters - case "builds": self = .builds - case "bundleId": self = .bundleId - case "ciProduct": self = .ciProduct - case "contentRightsDeclaration": self = .contentRightsDeclaration - case "customerReviews": self = .customerReviews - case "endUserLicenseAgreement": self = .endUserLicenseAgreement - case "gameCenterDetail": self = .gameCenterDetail - case "gameCenterEnabledVersions": self = .gameCenterEnabledVersions - case "inAppPurchases": self = .inAppPurchases - case "inAppPurchasesV2": self = .inAppPurchasesV2 - case "isOrEverWasMadeForKids": self = .isOrEverWasMadeForKids - case "name": self = .name - case "perfPowerMetrics": self = .perfPowerMetrics - case "preOrder": self = .preOrder - case "preReleaseVersions": self = .preReleaseVersions - case "pricePoints": self = .pricePoints - case "prices": self = .prices - case "primaryLocale": self = .primaryLocale - case "promotedPurchases": self = .promotedPurchases - case "reviewSubmissions": self = .reviewSubmissions - case "sku": self = .sku - case "subscriptionGracePeriod": self = .subscriptionGracePeriod - case "subscriptionGroups": self = .subscriptionGroups - case "subscriptionStatusUrl": self = .subscriptionStatusUrl - case "subscriptionStatusUrlForSandbox": self = .subscriptionStatusUrlForSandbox - case "subscriptionStatusUrlVersion": self = .subscriptionStatusUrlVersion - case "subscriptionStatusUrlVersionForSandbox": self = .subscriptionStatusUrlVersionForSandbox - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum BundleIdCapabilities: Hashable, Codable, RawRepresentable { - case bundleId - case capabilityType - case settings - case unknown(String) + public struct BundleIdCapabilities: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var capabilityType: Self { + .init(rawValue: "capabilityType") + } + + public static var settings: Self { + .init(rawValue: "settings") + } - public var rawValue: String { - switch self { - case .bundleId: return "bundleId" - case .capabilityType: return "capabilityType" - case .settings: return "settings" - case .unknown(let rawValue): return rawValue - } + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "bundleId": self = .bundleId - case "capabilityType": self = .capabilityType - case "settings": self = .settings - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum BundleIds: Hashable, Codable, RawRepresentable { - case app - case bundleIdCapabilities - case identifier - case name - case platform - case profiles - case seedId - case unknown(String) - - public var rawValue: String { - switch self { - case .app: return "app" - case .bundleIdCapabilities: return "bundleIdCapabilities" - case .identifier: return "identifier" - case .name: return "name" - case .platform: return "platform" - case .profiles: return "profiles" - case .seedId: return "seedId" - case .unknown(let rawValue): return rawValue - } + public struct BundleIds: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var app: Self { + .init(rawValue: "app") + } + + public static var bundleIdCapabilities: Self { + .init(rawValue: "bundleIdCapabilities") + } + + public static var identifier: Self { + .init(rawValue: "identifier") + } + + public static var name: Self { + .init(rawValue: "name") + } + + public static var platform: Self { + .init(rawValue: "platform") } + public static var profiles: Self { + .init(rawValue: "profiles") + } + + public static var seedId: Self { + .init(rawValue: "seedId") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "app": self = .app - case "bundleIdCapabilities": self = .bundleIdCapabilities - case "identifier": self = .identifier - case "name": self = .name - case "platform": self = .platform - case "profiles": self = .profiles - case "seedId": self = .seedId - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum Profiles: Hashable, Codable, RawRepresentable { - case bundleId - case certificates - case createdDate - case devices - case expirationDate - case name - case platform - case profileContent - case profileState - case profileType - case uuid - case unknown(String) - - public var rawValue: String { - switch self { - case .bundleId: return "bundleId" - case .certificates: return "certificates" - case .createdDate: return "createdDate" - case .devices: return "devices" - case .expirationDate: return "expirationDate" - case .name: return "name" - case .platform: return "platform" - case .profileContent: return "profileContent" - case .profileState: return "profileState" - case .profileType: return "profileType" - case .uuid: return "uuid" - case .unknown(let rawValue): return rawValue - } + public struct Profiles: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var bundleId: Self { + .init(rawValue: "bundleId") + } + + public static var certificates: Self { + .init(rawValue: "certificates") + } + + public static var createdDate: Self { + .init(rawValue: "createdDate") + } + + public static var devices: Self { + .init(rawValue: "devices") + } + + public static var expirationDate: Self { + .init(rawValue: "expirationDate") + } + + public static var name: Self { + .init(rawValue: "name") + } + + public static var platform: Self { + .init(rawValue: "platform") } + public static var profileContent: Self { + .init(rawValue: "profileContent") + } + + public static var profileState: Self { + .init(rawValue: "profileState") + } + + public static var profileType: Self { + .init(rawValue: "profileType") + } + + public static var uuid: Self { + .init(rawValue: "uuid") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "bundleId": self = .bundleId - case "certificates": self = .certificates - case "createdDate": self = .createdDate - case "devices": self = .devices - case "expirationDate": self = .expirationDate - case "name": self = .name - case "platform": self = .platform - case "profileContent": self = .profileContent - case "profileState": self = .profileState - case "profileType": self = .profileType - case "uuid": self = .uuid - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } @@ -387,28 +464,27 @@ extension V1.BundleIds.ById.GET { } } - public enum Include: Hashable, Codable, RawRepresentable { - case app - case bundleIdCapabilities - case profiles - case unknown(String) + public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var app: Self { + .init(rawValue: "app") + } - public var rawValue: String { - switch self { - case .app: return "app" - case .bundleIdCapabilities: return "bundleIdCapabilities" - case .profiles: return "profiles" - case .unknown(let rawValue): return rawValue - } + public static var bundleIdCapabilities: Self { + .init(rawValue: "bundleIdCapabilities") + } + + public static var profiles: Self { + .init(rawValue: "profiles") } + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "app": self = .app - case "bundleIdCapabilities": self = .bundleIdCapabilities - case "profiles": self = .profiles - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BundleIds/ById/BundleIdsById.PATCH.8901881.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BundleIds/ById/BundleIdsById.PATCH.8901881.generated.swift index 7e7630e5..1a29aeac 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BundleIds/ById/BundleIdsById.PATCH.8901881.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BundleIds/ById/BundleIdsById.PATCH.8901881.generated.swift @@ -48,9 +48,12 @@ extension V1.BundleIds.ById { /// - Returns: **200**, Single BundleId as `BundleIdResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **422**, Unprocessable request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -64,6 +67,9 @@ extension V1.BundleIds.ById { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) @@ -73,6 +79,12 @@ extension V1.BundleIds.ById { case 409: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 422: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BundleIds/ById/Profiles/BundleIdsByIdProfiles.GET.eb15301.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BundleIds/ById/Profiles/BundleIdsByIdProfiles.GET.eb15301.generated.swift index 1b6fc86b..cfa77470 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BundleIds/ById/Profiles/BundleIdsByIdProfiles.GET.eb15301.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BundleIds/ById/Profiles/BundleIdsByIdProfiles.GET.eb15301.generated.swift @@ -44,8 +44,10 @@ extension V1.BundleIds.ById.Profiles { /// - Returns: **200**, List of Profiles with get as `ProfilesWithoutIncludesResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -59,12 +61,18 @@ extension V1.BundleIds.ById.Profiles { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 404: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -87,52 +95,59 @@ extension V1.BundleIds.ById.Profiles.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum Profiles: Hashable, Codable, RawRepresentable { - case bundleId - case certificates - case createdDate - case devices - case expirationDate - case name - case platform - case profileContent - case profileState - case profileType - case uuid - case unknown(String) - - public var rawValue: String { - switch self { - case .bundleId: return "bundleId" - case .certificates: return "certificates" - case .createdDate: return "createdDate" - case .devices: return "devices" - case .expirationDate: return "expirationDate" - case .name: return "name" - case .platform: return "platform" - case .profileContent: return "profileContent" - case .profileState: return "profileState" - case .profileType: return "profileType" - case .uuid: return "uuid" - case .unknown(let rawValue): return rawValue - } + public struct Profiles: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var bundleId: Self { + .init(rawValue: "bundleId") + } + + public static var certificates: Self { + .init(rawValue: "certificates") + } + + public static var createdDate: Self { + .init(rawValue: "createdDate") + } + + public static var devices: Self { + .init(rawValue: "devices") + } + + public static var expirationDate: Self { + .init(rawValue: "expirationDate") + } + + public static var name: Self { + .init(rawValue: "name") } + public static var platform: Self { + .init(rawValue: "platform") + } + + public static var profileContent: Self { + .init(rawValue: "profileContent") + } + + public static var profileState: Self { + .init(rawValue: "profileState") + } + + public static var profileType: Self { + .init(rawValue: "profileType") + } + + public static var uuid: Self { + .init(rawValue: "uuid") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "bundleId": self = .bundleId - case "certificates": self = .certificates - case "createdDate": self = .createdDate - case "devices": self = .devices - case "expirationDate": self = .expirationDate - case "name": self = .name - case "platform": self = .platform - case "profileContent": self = .profileContent - case "profileState": self = .profileState - case "profileType": self = .profileType - case "uuid": self = .uuid - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BundleIds/ById/Relationships/App/BundleIdsByIdRelationshipsApp.GET.f6f27e8.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BundleIds/ById/Relationships/App/BundleIdsByIdRelationshipsApp.GET.f6f27e8.generated.swift new file mode 100644 index 00000000..5571e755 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BundleIds/ById/Relationships/App/BundleIdsByIdRelationshipsApp.GET.f6f27e8.generated.swift @@ -0,0 +1,86 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.BundleIds.ById.Relationships.App { + public struct GET: Endpoint { + public typealias Response = BundleIdAppLinkageResponse + + public var path: String { + "/v1/bundleIds/\(id)/relationships/app" + } + + /// the id of the requested resource + public var id: String + + public var parameters: Parameters = Parameters() + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + components?.queryItems = [ + + ].filter { $0.value != nil } + if components?.queryItems?.isEmpty ?? false { + components?.queryItems = nil + } + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "GET" + return urlRequest + } + + /// - Returns: **200**, Related linkage as `BundleIdAppLinkageResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(BundleIdAppLinkageResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +extension V1.BundleIds.ById.Relationships.App.GET { + public struct Parameters: Hashable { + + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BundleIds/ById/Relationships/BundleIdCapabilities/BundleIdsByIdRelationshipsBundleIdCapabilities.GET.88cb282.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BundleIds/ById/Relationships/BundleIdCapabilities/BundleIdsByIdRelationshipsBundleIdCapabilities.GET.88cb282.generated.swift new file mode 100644 index 00000000..cf1ff924 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BundleIds/ById/Relationships/BundleIdCapabilities/BundleIdsByIdRelationshipsBundleIdCapabilities.GET.88cb282.generated.swift @@ -0,0 +1,88 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.BundleIds.ById.Relationships.BundleIdCapabilities { + public struct GET: Endpoint { + public typealias Response = BundleIdBundleIdCapabilitiesLinkagesResponse + + public var path: String { + "/v1/bundleIds/\(id)/relationships/bundleIdCapabilities" + } + + /// the id of the requested resource + public var id: String + + public var parameters: Parameters = Parameters() + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + components?.queryItems = [ + URLQueryItem(name: "limit", + value: parameters.limit.map { "\($0)" }) + ].filter { $0.value != nil } + if components?.queryItems?.isEmpty ?? false { + components?.queryItems = nil + } + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "GET" + return urlRequest + } + + /// - Returns: **200**, List of related linkages as `BundleIdBundleIdCapabilitiesLinkagesResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(BundleIdBundleIdCapabilitiesLinkagesResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +extension V1.BundleIds.ById.Relationships.BundleIdCapabilities.GET { + public struct Parameters: Hashable { + /// maximum resources per page + public var limit: Int? + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BundleIds/ById/Relationships/Profiles/BundleIdsByIdRelationshipsProfiles.GET.e44ec5a.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BundleIds/ById/Relationships/Profiles/BundleIdsByIdRelationshipsProfiles.GET.e44ec5a.generated.swift new file mode 100644 index 00000000..5d2826b6 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/BundleIds/ById/Relationships/Profiles/BundleIdsByIdRelationshipsProfiles.GET.e44ec5a.generated.swift @@ -0,0 +1,88 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.BundleIds.ById.Relationships.Profiles { + public struct GET: Endpoint { + public typealias Response = BundleIdProfilesLinkagesResponse + + public var path: String { + "/v1/bundleIds/\(id)/relationships/profiles" + } + + /// the id of the requested resource + public var id: String + + public var parameters: Parameters = Parameters() + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + components?.queryItems = [ + URLQueryItem(name: "limit", + value: parameters.limit.map { "\($0)" }) + ].filter { $0.value != nil } + if components?.queryItems?.isEmpty ?? false { + components?.queryItems = nil + } + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "GET" + return urlRequest + } + + /// - Returns: **200**, List of related linkages as `BundleIdProfilesLinkagesResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(BundleIdProfilesLinkagesResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +extension V1.BundleIds.ById.Relationships.Profiles.GET { + public struct Parameters: Hashable { + /// maximum resources per page + public var limit: Int? + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Certificates/ById/CertificatesById.DELETE.21ec8ea.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Certificates/ById/CertificatesById.DELETE.21ec8ea.generated.swift index 891f3265..fdc67e24 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Certificates/ById/CertificatesById.DELETE.21ec8ea.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Certificates/ById/CertificatesById.DELETE.21ec8ea.generated.swift @@ -31,11 +31,12 @@ extension V1.Certificates.ById { return urlRequest } - /// - Returns: **204**, Success (no content) /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -43,12 +44,12 @@ extension V1.Certificates.ById { } switch urlResponse.statusCode { - case 204: - return - case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) @@ -58,6 +59,9 @@ extension V1.Certificates.ById { case 409: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Certificates/ById/CertificatesById.GET.21ec8ea.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Certificates/ById/CertificatesById.GET.21ec8ea.generated.swift index d9149a0c..0a295b58 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Certificates/ById/CertificatesById.GET.21ec8ea.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Certificates/ById/CertificatesById.GET.21ec8ea.generated.swift @@ -29,7 +29,11 @@ extension V1.Certificates.ById { components?.queryItems = [ URLQueryItem(name: "fields[certificates]", - value: parameters.fields[.certificates]?.map { "\($0)" }.joined(separator: ",")) + value: parameters.fields[.certificates]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "fields[passTypeIds]", + value: parameters.fields[.passTypeIds]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "include", + value: parameters.include?.map { "\($0)" }.joined(separator: ",")) ].filter { $0.value != nil } if components?.queryItems?.isEmpty ?? false { components?.queryItems = nil @@ -42,8 +46,10 @@ extension V1.Certificates.ById { /// - Returns: **200**, Single Certificate as `CertificateResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -57,12 +63,18 @@ extension V1.Certificates.ById { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 404: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -74,6 +86,9 @@ extension V1.Certificates.ById.GET { public struct Parameters: Hashable { public var fields: Fields = Fields() + /// comma-separated list of relationships to include + public var include: [Include]? + public struct Fields: Hashable { public subscript (_ relation: Relation) -> T { get { values[relation]?.base as! T } @@ -82,43 +97,75 @@ extension V1.Certificates.ById.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum Certificates: Hashable, Codable, RawRepresentable { - case certificateContent - case certificateType - case csrContent - case displayName - case expirationDate - case name - case platform - case serialNumber - case unknown(String) - - public var rawValue: String { - switch self { - case .certificateContent: return "certificateContent" - case .certificateType: return "certificateType" - case .csrContent: return "csrContent" - case .displayName: return "displayName" - case .expirationDate: return "expirationDate" - case .name: return "name" - case .platform: return "platform" - case .serialNumber: return "serialNumber" - case .unknown(let rawValue): return rawValue - } + public struct Certificates: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var activated: Self { + .init(rawValue: "activated") + } + + public static var certificateContent: Self { + .init(rawValue: "certificateContent") + } + + public static var certificateType: Self { + .init(rawValue: "certificateType") + } + + public static var displayName: Self { + .init(rawValue: "displayName") + } + + public static var expirationDate: Self { + .init(rawValue: "expirationDate") + } + + public static var name: Self { + .init(rawValue: "name") + } + + public static var passTypeId: Self { + .init(rawValue: "passTypeId") + } + + public static var platform: Self { + .init(rawValue: "platform") + } + + public static var serialNumber: Self { + .init(rawValue: "serialNumber") } + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "certificateContent": self = .certificateContent - case "certificateType": self = .certificateType - case "csrContent": self = .csrContent - case "displayName": self = .displayName - case "expirationDate": self = .expirationDate - case "name": self = .name - case "platform": self = .platform - case "serialNumber": self = .serialNumber - default: self = .unknown(rawValue) - } + self.rawValue = rawValue + } + } + + public struct PassTypeIds: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var certificates: Self { + .init(rawValue: "certificates") + } + + public static var identifier: Self { + .init(rawValue: "identifier") + } + + public static var name: Self { + .init(rawValue: "name") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue } } @@ -128,6 +175,11 @@ extension V1.Certificates.ById.GET { .init(key: "fields[certificates]") } + /// the fields to include for returned resources of type passTypeIds + public static var passTypeIds: Relation<[PassTypeIds]?> { + .init(key: "fields[passTypeIds]") + } + internal let key: String public func hash(into hasher: inout Hasher) { @@ -135,6 +187,22 @@ extension V1.Certificates.ById.GET { } } } + + public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var passTypeId: Self { + .init(rawValue: "passTypeId") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Certificates/ById/CertificatesById.PATCH.21ec8ea.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Certificates/ById/CertificatesById.PATCH.21ec8ea.generated.swift new file mode 100644 index 00000000..6dcfe8d7 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Certificates/ById/CertificatesById.PATCH.21ec8ea.generated.swift @@ -0,0 +1,95 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.Certificates.ById { + public struct PATCH: Endpoint { + public typealias Parameters = CertificateUpdateRequest + public typealias Response = CertificateResponse + + public var path: String { + "/v1/certificates/\(id)" + } + + /// the id of the requested resource + public var id: String + + /// Certificate representation + public var parameters: Parameters + + public init( + id: String, + parameters: Parameters + ) { + self.id = id + self.parameters = parameters + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "PATCH" + + var jsonEncoder: JSONEncoder { + let encoder = JSONEncoder() + return encoder + } + + urlRequest?.httpBody = try jsonEncoder.encode(parameters) + urlRequest?.setValue("application/json", forHTTPHeaderField: "Content-Type") + return urlRequest + } + + /// - Returns: **200**, Single Certificate as `CertificateResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **422**, Unprocessable request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(CertificateResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 409: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 422: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Certificates/ById/PassTypeId/CertificatesByIdPassTypeId.GET.30b9657.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Certificates/ById/PassTypeId/CertificatesByIdPassTypeId.GET.30b9657.generated.swift new file mode 100644 index 00000000..cffd9080 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Certificates/ById/PassTypeId/CertificatesByIdPassTypeId.GET.30b9657.generated.swift @@ -0,0 +1,235 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.Certificates.ById.PassTypeId { + public struct GET: Endpoint { + public typealias Response = PassTypeIdResponse + + public var path: String { + "/v1/certificates/\(id)/passTypeId" + } + + /// the id of the requested resource + public var id: String + + public var parameters: Parameters = Parameters() + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + components?.queryItems = [ + URLQueryItem(name: "fields[certificates]", + value: parameters.fields[.certificates]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "fields[passTypeIds]", + value: parameters.fields[.passTypeIds]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "include", + value: parameters.include?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "limit[certificates]", + value: parameters.limit[.certificates].map { "\($0)" }) + ].filter { $0.value != nil } + if components?.queryItems?.isEmpty ?? false { + components?.queryItems = nil + } + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "GET" + return urlRequest + } + + /// - Returns: **200**, Single PassTypeId as `PassTypeIdResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(PassTypeIdResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +extension V1.Certificates.ById.PassTypeId.GET { + public struct Parameters: Hashable { + public var fields: Fields = Fields() + + /// comma-separated list of relationships to include + public var include: [Include]? + + public var limit: Limit = Limit() + + public struct Fields: Hashable { + public subscript (_ relation: Relation) -> T { + get { values[relation]?.base as! T } + set { values[relation] = AnyHashable(newValue) } + } + + private var values: [AnyHashable: AnyHashable] = [:] + + public struct Certificates: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var activated: Self { + .init(rawValue: "activated") + } + + public static var certificateContent: Self { + .init(rawValue: "certificateContent") + } + + public static var certificateType: Self { + .init(rawValue: "certificateType") + } + + public static var displayName: Self { + .init(rawValue: "displayName") + } + + public static var expirationDate: Self { + .init(rawValue: "expirationDate") + } + + public static var name: Self { + .init(rawValue: "name") + } + + public static var passTypeId: Self { + .init(rawValue: "passTypeId") + } + + public static var platform: Self { + .init(rawValue: "platform") + } + + public static var serialNumber: Self { + .init(rawValue: "serialNumber") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct PassTypeIds: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var certificates: Self { + .init(rawValue: "certificates") + } + + public static var identifier: Self { + .init(rawValue: "identifier") + } + + public static var name: Self { + .init(rawValue: "name") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct Relation: Hashable { + /// the fields to include for returned resources of type certificates + public static var certificates: Relation<[Certificates]?> { + .init(key: "fields[certificates]") + } + + /// the fields to include for returned resources of type passTypeIds + public static var passTypeIds: Relation<[PassTypeIds]?> { + .init(key: "fields[passTypeIds]") + } + + internal let key: String + + public func hash(into hasher: inout Hasher) { + hasher.combine(key) + } + } + } + + public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var certificates: Self { + .init(rawValue: "certificates") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct Limit: Hashable { + public subscript (_ relation: Relation) -> T { + get { values[relation]?.base as! T } + set { values[relation] = AnyHashable(newValue) } + } + + private var values: [AnyHashable: AnyHashable] = [:] + + public struct Relation: Hashable { + /// maximum number of related certificates returned (when they are included) + public static var certificates: Relation { + .init(key: "limit[certificates]") + } + + internal let key: String + + public func hash(into hasher: inout Hasher) { + hasher.combine(key) + } + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Certificates/ById/Relationships/PassTypeId/CertificatesByIdRelationshipsPassTypeId.GET.c9dc999.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Certificates/ById/Relationships/PassTypeId/CertificatesByIdRelationshipsPassTypeId.GET.c9dc999.generated.swift new file mode 100644 index 00000000..d261d4c9 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Certificates/ById/Relationships/PassTypeId/CertificatesByIdRelationshipsPassTypeId.GET.c9dc999.generated.swift @@ -0,0 +1,86 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.Certificates.ById.Relationships.PassTypeId { + public struct GET: Endpoint { + public typealias Response = CertificatePassTypeIdLinkageResponse + + public var path: String { + "/v1/certificates/\(id)/relationships/passTypeId" + } + + /// the id of the requested resource + public var id: String + + public var parameters: Parameters = Parameters() + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + components?.queryItems = [ + + ].filter { $0.value != nil } + if components?.queryItems?.isEmpty ?? false { + components?.queryItems = nil + } + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "GET" + return urlRequest + } + + /// - Returns: **200**, Related linkage as `CertificatePassTypeIdLinkageResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(CertificatePassTypeIdLinkageResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +extension V1.Certificates.ById.Relationships.PassTypeId.GET { + public struct Parameters: Hashable { + + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Certificates/Certificates.GET.859127b.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Certificates/Certificates.GET.859127b.generated.swift index af2e72d0..3cbe2503 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Certificates/Certificates.GET.859127b.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Certificates/Certificates.GET.859127b.generated.swift @@ -27,6 +27,8 @@ extension V1.Certificates { components?.queryItems = [ URLQueryItem(name: "fields[certificates]", value: parameters.fields[.certificates]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "fields[passTypeIds]", + value: parameters.fields[.passTypeIds]?.map { "\($0)" }.joined(separator: ",")), URLQueryItem(name: "filter[certificateType]", value: parameters.filter[.certificateType]?.map { "\($0)" }.joined(separator: ",")), URLQueryItem(name: "filter[displayName]", @@ -35,6 +37,8 @@ extension V1.Certificates { value: parameters.filter[.id]?.map { "\($0)" }.joined(separator: ",")), URLQueryItem(name: "filter[serialNumber]", value: parameters.filter[.serialNumber]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "include", + value: parameters.include?.map { "\($0)" }.joined(separator: ",")), URLQueryItem(name: "limit", value: parameters.limit.map { "\($0)" }), URLQueryItem(name: "sort", @@ -51,7 +55,9 @@ extension V1.Certificates { /// - Returns: **200**, List of Certificates as `CertificatesResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -65,9 +71,15 @@ extension V1.Certificates { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -81,6 +93,9 @@ extension V1.Certificates.GET { public var filter: Filter = Filter() + /// comma-separated list of relationships to include + public var include: [Include]? + /// maximum resources per page public var limit: Int? @@ -95,43 +110,75 @@ extension V1.Certificates.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum Certificates: Hashable, Codable, RawRepresentable { - case certificateContent - case certificateType - case csrContent - case displayName - case expirationDate - case name - case platform - case serialNumber - case unknown(String) - - public var rawValue: String { - switch self { - case .certificateContent: return "certificateContent" - case .certificateType: return "certificateType" - case .csrContent: return "csrContent" - case .displayName: return "displayName" - case .expirationDate: return "expirationDate" - case .name: return "name" - case .platform: return "platform" - case .serialNumber: return "serialNumber" - case .unknown(let rawValue): return rawValue - } + public struct Certificates: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var activated: Self { + .init(rawValue: "activated") + } + + public static var certificateContent: Self { + .init(rawValue: "certificateContent") + } + + public static var certificateType: Self { + .init(rawValue: "certificateType") + } + + public static var displayName: Self { + .init(rawValue: "displayName") + } + + public static var expirationDate: Self { + .init(rawValue: "expirationDate") + } + + public static var name: Self { + .init(rawValue: "name") + } + + public static var passTypeId: Self { + .init(rawValue: "passTypeId") + } + + public static var platform: Self { + .init(rawValue: "platform") + } + + public static var serialNumber: Self { + .init(rawValue: "serialNumber") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct PassTypeIds: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var certificates: Self { + .init(rawValue: "certificates") } + public static var identifier: Self { + .init(rawValue: "identifier") + } + + public static var name: Self { + .init(rawValue: "name") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "certificateContent": self = .certificateContent - case "certificateType": self = .certificateType - case "csrContent": self = .csrContent - case "displayName": self = .displayName - case "expirationDate": self = .expirationDate - case "name": self = .name - case "platform": self = .platform - case "serialNumber": self = .serialNumber - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } @@ -141,6 +188,11 @@ extension V1.Certificates.GET { .init(key: "fields[certificates]") } + /// the fields to include for returned resources of type passTypeIds + public static var passTypeIds: Relation<[PassTypeIds]?> { + .init(key: "fields[passTypeIds]") + } + internal let key: String public func hash(into hasher: inout Hasher) { @@ -157,52 +209,87 @@ extension V1.Certificates.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum CertificateType: Hashable, Codable, RawRepresentable { - case developerIdApplication - case developerIdKext - case development - case distribution - case iOSDevelopment - case iOSDistribution - case macAppDevelopment - case macAppDistribution - case macInstallerDistribution - case passTypeId - case passTypeIdWithNfc - case unknown(String) - - public var rawValue: String { - switch self { - case .developerIdApplication: return "DEVELOPER_ID_APPLICATION" - case .developerIdKext: return "DEVELOPER_ID_KEXT" - case .development: return "DEVELOPMENT" - case .distribution: return "DISTRIBUTION" - case .iOSDevelopment: return "IOS_DEVELOPMENT" - case .iOSDistribution: return "IOS_DISTRIBUTION" - case .macAppDevelopment: return "MAC_APP_DEVELOPMENT" - case .macAppDistribution: return "MAC_APP_DISTRIBUTION" - case .macInstallerDistribution: return "MAC_INSTALLER_DISTRIBUTION" - case .passTypeId: return "PASS_TYPE_ID" - case .passTypeIdWithNfc: return "PASS_TYPE_ID_WITH_NFC" - case .unknown(let rawValue): return rawValue - } + public struct CertificateType: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var applePay: Self { + .init(rawValue: "APPLE_PAY") + } + + public static var applePayMerchantIdentity: Self { + .init(rawValue: "APPLE_PAY_MERCHANT_IDENTITY") + } + + public static var applePayPspIdentity: Self { + .init(rawValue: "APPLE_PAY_PSP_IDENTITY") + } + + public static var applePayRsa: Self { + .init(rawValue: "APPLE_PAY_RSA") + } + + public static var developerIdApplication: Self { + .init(rawValue: "DEVELOPER_ID_APPLICATION") + } + + public static var developerIdApplicationG2: Self { + .init(rawValue: "DEVELOPER_ID_APPLICATION_G2") + } + + public static var developerIdKext: Self { + .init(rawValue: "DEVELOPER_ID_KEXT") + } + + public static var developerIdKextG2: Self { + .init(rawValue: "DEVELOPER_ID_KEXT_G2") + } + + public static var development: Self { + .init(rawValue: "DEVELOPMENT") + } + + public static var distribution: Self { + .init(rawValue: "DISTRIBUTION") + } + + public static var iOSDevelopment: Self { + .init(rawValue: "IOS_DEVELOPMENT") + } + + public static var iOSDistribution: Self { + .init(rawValue: "IOS_DISTRIBUTION") + } + + public static var identityAccess: Self { + .init(rawValue: "IDENTITY_ACCESS") + } + + public static var macAppDevelopment: Self { + .init(rawValue: "MAC_APP_DEVELOPMENT") } + public static var macAppDistribution: Self { + .init(rawValue: "MAC_APP_DISTRIBUTION") + } + + public static var macInstallerDistribution: Self { + .init(rawValue: "MAC_INSTALLER_DISTRIBUTION") + } + + public static var passTypeId: Self { + .init(rawValue: "PASS_TYPE_ID") + } + + public static var passTypeIdWithNfc: Self { + .init(rawValue: "PASS_TYPE_ID_WITH_NFC") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "DEVELOPER_ID_APPLICATION": self = .developerIdApplication - case "DEVELOPER_ID_KEXT": self = .developerIdKext - case "DEVELOPMENT": self = .development - case "DISTRIBUTION": self = .distribution - case "IOS_DEVELOPMENT": self = .iOSDevelopment - case "IOS_DISTRIBUTION": self = .iOSDistribution - case "MAC_APP_DEVELOPMENT": self = .macAppDevelopment - case "MAC_APP_DISTRIBUTION": self = .macAppDistribution - case "MAC_INSTALLER_DISTRIBUTION": self = .macInstallerDistribution - case "PASS_TYPE_ID": self = .passTypeId - case "PASS_TYPE_ID_WITH_NFC": self = .passTypeIdWithNfc - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } @@ -235,43 +322,63 @@ extension V1.Certificates.GET { } } - public enum Sort: Hashable, Codable, RawRepresentable { - case certificateType - case certificateTypeDesc - case displayName - case displayNameDesc - case id - case idDesc - case serialNumber - case serialNumberDesc - case unknown(String) - - public var rawValue: String { - switch self { - case .certificateType: return "certificateType" - case .certificateTypeDesc: return "-certificateType" - case .displayName: return "displayName" - case .displayNameDesc: return "-displayName" - case .id: return "id" - case .idDesc: return "-id" - case .serialNumber: return "serialNumber" - case .serialNumberDesc: return "-serialNumber" - case .unknown(let rawValue): return rawValue - } + public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var passTypeId: Self { + .init(rawValue: "passTypeId") + } + + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "certificateType": self = .certificateType - case "-certificateType": self = .certificateTypeDesc - case "displayName": self = .displayName - case "-displayName": self = .displayNameDesc - case "id": self = .id - case "-id": self = .idDesc - case "serialNumber": self = .serialNumber - case "-serialNumber": self = .serialNumberDesc - default: self = .unknown(rawValue) - } + self.rawValue = rawValue + } + } + + public struct Sort: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var certificateType: Self { + .init(rawValue: "certificateType") + } + + public static var certificateTypeDesc: Self { + .init(rawValue: "-certificateType") + } + + public static var displayName: Self { + .init(rawValue: "displayName") + } + + public static var displayNameDesc: Self { + .init(rawValue: "-displayName") + } + + public static var id: Self { + .init(rawValue: "id") + } + + public static var idDesc: Self { + .init(rawValue: "-id") + } + + public static var serialNumber: Self { + .init(rawValue: "serialNumber") + } + + public static var serialNumberDesc: Self { + .init(rawValue: "-serialNumber") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue } } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Certificates/Certificates.POST.859127b.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Certificates/Certificates.POST.859127b.generated.swift index b0196b25..d4f8c829 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Certificates/Certificates.POST.859127b.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Certificates/Certificates.POST.859127b.generated.swift @@ -41,8 +41,11 @@ extension V1.Certificates { /// - Returns: **201**, Single Certificate as `CertificateResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **422**, Unprocessable request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -56,12 +59,21 @@ extension V1.Certificates { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 409: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 422: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/CiArtifacts/ById/CiArtifactsById.GET.9d9880f.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/CiArtifacts/ById/CiArtifactsById.GET.9d9880f.generated.swift index 81fea2e9..be179b0e 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/CiArtifacts/ById/CiArtifactsById.GET.9d9880f.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/CiArtifacts/ById/CiArtifactsById.GET.9d9880f.generated.swift @@ -42,8 +42,10 @@ extension V1.CiArtifacts.ById { /// - Returns: **200**, Single CiArtifact as `CiArtifactResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -57,12 +59,18 @@ extension V1.CiArtifacts.ById { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 404: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -82,31 +90,31 @@ extension V1.CiArtifacts.ById.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum CiArtifacts: Hashable, Codable, RawRepresentable { - case downloadUrl - case fileName - case fileSize - case fileType - case unknown(String) - - public var rawValue: String { - switch self { - case .downloadUrl: return "downloadUrl" - case .fileName: return "fileName" - case .fileSize: return "fileSize" - case .fileType: return "fileType" - case .unknown(let rawValue): return rawValue - } + public struct CiArtifacts: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var downloadUrl: Self { + .init(rawValue: "downloadUrl") } + public static var fileName: Self { + .init(rawValue: "fileName") + } + + public static var fileSize: Self { + .init(rawValue: "fileSize") + } + + public static var fileType: Self { + .init(rawValue: "fileType") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "downloadUrl": self = .downloadUrl - case "fileName": self = .fileName - case "fileSize": self = .fileSize - case "fileType": self = .fileType - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/CiBuildActions/ById/Artifacts/CiBuildActionsByIdArtifacts.GET.236354c.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/CiBuildActions/ById/Artifacts/CiBuildActionsByIdArtifacts.GET.236354c.generated.swift index db93459f..5be48ee4 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/CiBuildActions/ById/Artifacts/CiBuildActionsByIdArtifacts.GET.236354c.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/CiBuildActions/ById/Artifacts/CiBuildActionsByIdArtifacts.GET.236354c.generated.swift @@ -44,8 +44,10 @@ extension V1.CiBuildActions.ById.Artifacts { /// - Returns: **200**, List of CiArtifacts as `CiArtifactsResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -59,12 +61,18 @@ extension V1.CiBuildActions.ById.Artifacts { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 404: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -87,31 +95,31 @@ extension V1.CiBuildActions.ById.Artifacts.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum CiArtifacts: Hashable, Codable, RawRepresentable { - case downloadUrl - case fileName - case fileSize - case fileType - case unknown(String) - - public var rawValue: String { - switch self { - case .downloadUrl: return "downloadUrl" - case .fileName: return "fileName" - case .fileSize: return "fileSize" - case .fileType: return "fileType" - case .unknown(let rawValue): return rawValue - } + public struct CiArtifacts: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var downloadUrl: Self { + .init(rawValue: "downloadUrl") } + public static var fileName: Self { + .init(rawValue: "fileName") + } + + public static var fileSize: Self { + .init(rawValue: "fileSize") + } + + public static var fileType: Self { + .init(rawValue: "fileType") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "downloadUrl": self = .downloadUrl - case "fileName": self = .fileName - case "fileSize": self = .fileSize - case "fileType": self = .fileType - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/CiBuildActions/ById/BuildRun/CiBuildActionsByIdBuildRun.GET.5902374.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/CiBuildActions/ById/BuildRun/CiBuildActionsByIdBuildRun.GET.5902374.generated.swift index 356565bb..712e193d 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/CiBuildActions/ById/BuildRun/CiBuildActionsByIdBuildRun.GET.5902374.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/CiBuildActions/ById/BuildRun/CiBuildActionsByIdBuildRun.GET.5902374.generated.swift @@ -56,8 +56,10 @@ extension V1.CiBuildActions.ById.BuildRun { /// - Returns: **200**, Single CiBuildRun as `CiBuildRunResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -71,12 +73,18 @@ extension V1.CiBuildActions.ById.BuildRun { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 404: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -101,363 +109,435 @@ extension V1.CiBuildActions.ById.BuildRun.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum Builds: Hashable, Codable, RawRepresentable { - case app - case appEncryptionDeclaration - case appStoreVersion - case betaAppReviewSubmission - case betaBuildLocalizations - case betaGroups - case buildAudienceType - case buildBetaDetail - case buildBundles - case computedMinMacOsVersion - case diagnosticSignatures - case expirationDate - case expired - case iconAssetToken - case icons - case individualTesters - case lsMinimumSystemVersion - case minOsVersion - case perfPowerMetrics - case preReleaseVersion - case processingState - case uploadedDate - case usesNonExemptEncryption - case version - case unknown(String) - - public var rawValue: String { - switch self { - case .app: return "app" - case .appEncryptionDeclaration: return "appEncryptionDeclaration" - case .appStoreVersion: return "appStoreVersion" - case .betaAppReviewSubmission: return "betaAppReviewSubmission" - case .betaBuildLocalizations: return "betaBuildLocalizations" - case .betaGroups: return "betaGroups" - case .buildAudienceType: return "buildAudienceType" - case .buildBetaDetail: return "buildBetaDetail" - case .buildBundles: return "buildBundles" - case .computedMinMacOsVersion: return "computedMinMacOsVersion" - case .diagnosticSignatures: return "diagnosticSignatures" - case .expirationDate: return "expirationDate" - case .expired: return "expired" - case .iconAssetToken: return "iconAssetToken" - case .icons: return "icons" - case .individualTesters: return "individualTesters" - case .lsMinimumSystemVersion: return "lsMinimumSystemVersion" - case .minOsVersion: return "minOsVersion" - case .perfPowerMetrics: return "perfPowerMetrics" - case .preReleaseVersion: return "preReleaseVersion" - case .processingState: return "processingState" - case .uploadedDate: return "uploadedDate" - case .usesNonExemptEncryption: return "usesNonExemptEncryption" - case .version: return "version" - case .unknown(let rawValue): return rawValue - } + public struct Builds: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var app: Self { + .init(rawValue: "app") + } + + public static var appEncryptionDeclaration: Self { + .init(rawValue: "appEncryptionDeclaration") + } + + public static var appStoreVersion: Self { + .init(rawValue: "appStoreVersion") + } + + public static var betaAppReviewSubmission: Self { + .init(rawValue: "betaAppReviewSubmission") + } + + public static var betaBuildLocalizations: Self { + .init(rawValue: "betaBuildLocalizations") + } + + public static var betaGroups: Self { + .init(rawValue: "betaGroups") + } + + public static var buildAudienceType: Self { + .init(rawValue: "buildAudienceType") + } + + public static var buildBetaDetail: Self { + .init(rawValue: "buildBetaDetail") + } + + public static var buildBundles: Self { + .init(rawValue: "buildBundles") + } + + public static var computedMinMacOsVersion: Self { + .init(rawValue: "computedMinMacOsVersion") + } + + public static var computedMinVisionOsVersion: Self { + .init(rawValue: "computedMinVisionOsVersion") + } + + public static var diagnosticSignatures: Self { + .init(rawValue: "diagnosticSignatures") + } + + public static var expirationDate: Self { + .init(rawValue: "expirationDate") + } + + public static var expired: Self { + .init(rawValue: "expired") + } + + public static var iconAssetToken: Self { + .init(rawValue: "iconAssetToken") + } + + public static var icons: Self { + .init(rawValue: "icons") + } + + public static var individualTesters: Self { + .init(rawValue: "individualTesters") + } + + public static var lsMinimumSystemVersion: Self { + .init(rawValue: "lsMinimumSystemVersion") + } + + public static var minOsVersion: Self { + .init(rawValue: "minOsVersion") + } + + public static var perfPowerMetrics: Self { + .init(rawValue: "perfPowerMetrics") + } + + public static var preReleaseVersion: Self { + .init(rawValue: "preReleaseVersion") + } + + public static var processingState: Self { + .init(rawValue: "processingState") + } + + public static var uploadedDate: Self { + .init(rawValue: "uploadedDate") + } + + public static var usesNonExemptEncryption: Self { + .init(rawValue: "usesNonExemptEncryption") + } + + public static var version: Self { + .init(rawValue: "version") } + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "app": self = .app - case "appEncryptionDeclaration": self = .appEncryptionDeclaration - case "appStoreVersion": self = .appStoreVersion - case "betaAppReviewSubmission": self = .betaAppReviewSubmission - case "betaBuildLocalizations": self = .betaBuildLocalizations - case "betaGroups": self = .betaGroups - case "buildAudienceType": self = .buildAudienceType - case "buildBetaDetail": self = .buildBetaDetail - case "buildBundles": self = .buildBundles - case "computedMinMacOsVersion": self = .computedMinMacOsVersion - case "diagnosticSignatures": self = .diagnosticSignatures - case "expirationDate": self = .expirationDate - case "expired": self = .expired - case "iconAssetToken": self = .iconAssetToken - case "icons": self = .icons - case "individualTesters": self = .individualTesters - case "lsMinimumSystemVersion": self = .lsMinimumSystemVersion - case "minOsVersion": self = .minOsVersion - case "perfPowerMetrics": self = .perfPowerMetrics - case "preReleaseVersion": self = .preReleaseVersion - case "processingState": self = .processingState - case "uploadedDate": self = .uploadedDate - case "usesNonExemptEncryption": self = .usesNonExemptEncryption - case "version": self = .version - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum CiBuildRuns: Hashable, Codable, RawRepresentable { - case actions - case buildRun - case builds - case cancelReason - case clean - case completionStatus - case createdDate - case destinationBranch - case destinationCommit - case executionProgress - case finishedDate - case isPullRequestBuild - case issueCounts - case number - case product - case pullRequest - case sourceBranchOrTag - case sourceCommit - case startReason - case startedDate - case workflow - case unknown(String) - - public var rawValue: String { - switch self { - case .actions: return "actions" - case .buildRun: return "buildRun" - case .builds: return "builds" - case .cancelReason: return "cancelReason" - case .clean: return "clean" - case .completionStatus: return "completionStatus" - case .createdDate: return "createdDate" - case .destinationBranch: return "destinationBranch" - case .destinationCommit: return "destinationCommit" - case .executionProgress: return "executionProgress" - case .finishedDate: return "finishedDate" - case .isPullRequestBuild: return "isPullRequestBuild" - case .issueCounts: return "issueCounts" - case .number: return "number" - case .product: return "product" - case .pullRequest: return "pullRequest" - case .sourceBranchOrTag: return "sourceBranchOrTag" - case .sourceCommit: return "sourceCommit" - case .startReason: return "startReason" - case .startedDate: return "startedDate" - case .workflow: return "workflow" - case .unknown(let rawValue): return rawValue - } + public struct CiBuildRuns: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var actions: Self { + .init(rawValue: "actions") + } + + public static var builds: Self { + .init(rawValue: "builds") + } + + public static var cancelReason: Self { + .init(rawValue: "cancelReason") + } + + public static var completionStatus: Self { + .init(rawValue: "completionStatus") + } + + public static var createdDate: Self { + .init(rawValue: "createdDate") + } + + public static var destinationBranch: Self { + .init(rawValue: "destinationBranch") } + public static var destinationCommit: Self { + .init(rawValue: "destinationCommit") + } + + public static var executionProgress: Self { + .init(rawValue: "executionProgress") + } + + public static var finishedDate: Self { + .init(rawValue: "finishedDate") + } + + public static var isPullRequestBuild: Self { + .init(rawValue: "isPullRequestBuild") + } + + public static var issueCounts: Self { + .init(rawValue: "issueCounts") + } + + public static var number: Self { + .init(rawValue: "number") + } + + public static var product: Self { + .init(rawValue: "product") + } + + public static var pullRequest: Self { + .init(rawValue: "pullRequest") + } + + public static var sourceBranchOrTag: Self { + .init(rawValue: "sourceBranchOrTag") + } + + public static var sourceCommit: Self { + .init(rawValue: "sourceCommit") + } + + public static var startReason: Self { + .init(rawValue: "startReason") + } + + public static var startedDate: Self { + .init(rawValue: "startedDate") + } + + public static var workflow: Self { + .init(rawValue: "workflow") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "actions": self = .actions - case "buildRun": self = .buildRun - case "builds": self = .builds - case "cancelReason": self = .cancelReason - case "clean": self = .clean - case "completionStatus": self = .completionStatus - case "createdDate": self = .createdDate - case "destinationBranch": self = .destinationBranch - case "destinationCommit": self = .destinationCommit - case "executionProgress": self = .executionProgress - case "finishedDate": self = .finishedDate - case "isPullRequestBuild": self = .isPullRequestBuild - case "issueCounts": self = .issueCounts - case "number": self = .number - case "product": self = .product - case "pullRequest": self = .pullRequest - case "sourceBranchOrTag": self = .sourceBranchOrTag - case "sourceCommit": self = .sourceCommit - case "startReason": self = .startReason - case "startedDate": self = .startedDate - case "workflow": self = .workflow - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum CiProducts: Hashable, Codable, RawRepresentable { - case additionalRepositories - case app - case buildRuns - case bundleId - case createdDate - case name - case primaryRepositories - case productType - case workflows - case unknown(String) - - public var rawValue: String { - switch self { - case .additionalRepositories: return "additionalRepositories" - case .app: return "app" - case .buildRuns: return "buildRuns" - case .bundleId: return "bundleId" - case .createdDate: return "createdDate" - case .name: return "name" - case .primaryRepositories: return "primaryRepositories" - case .productType: return "productType" - case .workflows: return "workflows" - case .unknown(let rawValue): return rawValue - } + public struct CiProducts: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var additionalRepositories: Self { + .init(rawValue: "additionalRepositories") + } + + public static var app: Self { + .init(rawValue: "app") + } + + public static var buildRuns: Self { + .init(rawValue: "buildRuns") + } + + public static var bundleId: Self { + .init(rawValue: "bundleId") } + public static var createdDate: Self { + .init(rawValue: "createdDate") + } + + public static var name: Self { + .init(rawValue: "name") + } + + public static var primaryRepositories: Self { + .init(rawValue: "primaryRepositories") + } + + public static var productType: Self { + .init(rawValue: "productType") + } + + public static var workflows: Self { + .init(rawValue: "workflows") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "additionalRepositories": self = .additionalRepositories - case "app": self = .app - case "buildRuns": self = .buildRuns - case "bundleId": self = .bundleId - case "createdDate": self = .createdDate - case "name": self = .name - case "primaryRepositories": self = .primaryRepositories - case "productType": self = .productType - case "workflows": self = .workflows - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum CiWorkflows: Hashable, Codable, RawRepresentable { - case actions - case branchStartCondition - case buildRuns - case clean - case containerFilePath - case description - case isEnabled - case isLockedForEditing - case lastModifiedDate - case macOsVersion - case name - case product - case pullRequestStartCondition - case repository - case scheduledStartCondition - case tagStartCondition - case xcodeVersion - case unknown(String) - - public var rawValue: String { - switch self { - case .actions: return "actions" - case .branchStartCondition: return "branchStartCondition" - case .buildRuns: return "buildRuns" - case .clean: return "clean" - case .containerFilePath: return "containerFilePath" - case .description: return "description" - case .isEnabled: return "isEnabled" - case .isLockedForEditing: return "isLockedForEditing" - case .lastModifiedDate: return "lastModifiedDate" - case .macOsVersion: return "macOsVersion" - case .name: return "name" - case .product: return "product" - case .pullRequestStartCondition: return "pullRequestStartCondition" - case .repository: return "repository" - case .scheduledStartCondition: return "scheduledStartCondition" - case .tagStartCondition: return "tagStartCondition" - case .xcodeVersion: return "xcodeVersion" - case .unknown(let rawValue): return rawValue - } + public struct CiWorkflows: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var actions: Self { + .init(rawValue: "actions") + } + + public static var branchStartCondition: Self { + .init(rawValue: "branchStartCondition") + } + + public static var buildRuns: Self { + .init(rawValue: "buildRuns") + } + + public static var clean: Self { + .init(rawValue: "clean") + } + + public static var containerFilePath: Self { + .init(rawValue: "containerFilePath") + } + + public static var description: Self { + .init(rawValue: "description") + } + + public static var isEnabled: Self { + .init(rawValue: "isEnabled") + } + + public static var isLockedForEditing: Self { + .init(rawValue: "isLockedForEditing") + } + + public static var lastModifiedDate: Self { + .init(rawValue: "lastModifiedDate") } + public static var macOsVersion: Self { + .init(rawValue: "macOsVersion") + } + + public static var manualBranchStartCondition: Self { + .init(rawValue: "manualBranchStartCondition") + } + + public static var manualPullRequestStartCondition: Self { + .init(rawValue: "manualPullRequestStartCondition") + } + + public static var manualTagStartCondition: Self { + .init(rawValue: "manualTagStartCondition") + } + + public static var name: Self { + .init(rawValue: "name") + } + + public static var product: Self { + .init(rawValue: "product") + } + + public static var pullRequestStartCondition: Self { + .init(rawValue: "pullRequestStartCondition") + } + + public static var repository: Self { + .init(rawValue: "repository") + } + + public static var scheduledStartCondition: Self { + .init(rawValue: "scheduledStartCondition") + } + + public static var tagStartCondition: Self { + .init(rawValue: "tagStartCondition") + } + + public static var xcodeVersion: Self { + .init(rawValue: "xcodeVersion") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "actions": self = .actions - case "branchStartCondition": self = .branchStartCondition - case "buildRuns": self = .buildRuns - case "clean": self = .clean - case "containerFilePath": self = .containerFilePath - case "description": self = .description - case "isEnabled": self = .isEnabled - case "isLockedForEditing": self = .isLockedForEditing - case "lastModifiedDate": self = .lastModifiedDate - case "macOsVersion": self = .macOsVersion - case "name": self = .name - case "product": self = .product - case "pullRequestStartCondition": self = .pullRequestStartCondition - case "repository": self = .repository - case "scheduledStartCondition": self = .scheduledStartCondition - case "tagStartCondition": self = .tagStartCondition - case "xcodeVersion": self = .xcodeVersion - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum ScmGitReferences: Hashable, Codable, RawRepresentable { - case canonicalName - case isDeleted - case kind - case name - case repository - case unknown(String) - - public var rawValue: String { - switch self { - case .canonicalName: return "canonicalName" - case .isDeleted: return "isDeleted" - case .kind: return "kind" - case .name: return "name" - case .repository: return "repository" - case .unknown(let rawValue): return rawValue - } + public struct ScmGitReferences: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var canonicalName: Self { + .init(rawValue: "canonicalName") } + public static var isDeleted: Self { + .init(rawValue: "isDeleted") + } + + public static var kind: Self { + .init(rawValue: "kind") + } + + public static var name: Self { + .init(rawValue: "name") + } + + public static var repository: Self { + .init(rawValue: "repository") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "canonicalName": self = .canonicalName - case "isDeleted": self = .isDeleted - case "kind": self = .kind - case "name": self = .name - case "repository": self = .repository - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum ScmPullRequests: Hashable, Codable, RawRepresentable { - case destinationBranchName - case destinationRepositoryName - case destinationRepositoryOwner - case isClosed - case isCrossRepository - case number - case repository - case sourceBranchName - case sourceRepositoryName - case sourceRepositoryOwner - case title - case webUrl - case unknown(String) - - public var rawValue: String { - switch self { - case .destinationBranchName: return "destinationBranchName" - case .destinationRepositoryName: return "destinationRepositoryName" - case .destinationRepositoryOwner: return "destinationRepositoryOwner" - case .isClosed: return "isClosed" - case .isCrossRepository: return "isCrossRepository" - case .number: return "number" - case .repository: return "repository" - case .sourceBranchName: return "sourceBranchName" - case .sourceRepositoryName: return "sourceRepositoryName" - case .sourceRepositoryOwner: return "sourceRepositoryOwner" - case .title: return "title" - case .webUrl: return "webUrl" - case .unknown(let rawValue): return rawValue - } + public struct ScmPullRequests: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var destinationBranchName: Self { + .init(rawValue: "destinationBranchName") + } + + public static var destinationRepositoryName: Self { + .init(rawValue: "destinationRepositoryName") } + public static var destinationRepositoryOwner: Self { + .init(rawValue: "destinationRepositoryOwner") + } + + public static var isClosed: Self { + .init(rawValue: "isClosed") + } + + public static var isCrossRepository: Self { + .init(rawValue: "isCrossRepository") + } + + public static var number: Self { + .init(rawValue: "number") + } + + public static var repository: Self { + .init(rawValue: "repository") + } + + public static var sourceBranchName: Self { + .init(rawValue: "sourceBranchName") + } + + public static var sourceRepositoryName: Self { + .init(rawValue: "sourceRepositoryName") + } + + public static var sourceRepositoryOwner: Self { + .init(rawValue: "sourceRepositoryOwner") + } + + public static var title: Self { + .init(rawValue: "title") + } + + public static var webUrl: Self { + .init(rawValue: "webUrl") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "destinationBranchName": self = .destinationBranchName - case "destinationRepositoryName": self = .destinationRepositoryName - case "destinationRepositoryOwner": self = .destinationRepositoryOwner - case "isClosed": self = .isClosed - case "isCrossRepository": self = .isCrossRepository - case "number": self = .number - case "repository": self = .repository - case "sourceBranchName": self = .sourceBranchName - case "sourceRepositoryName": self = .sourceRepositoryName - case "sourceRepositoryOwner": self = .sourceRepositoryOwner - case "title": self = .title - case "webUrl": self = .webUrl - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } @@ -500,37 +580,39 @@ extension V1.CiBuildActions.ById.BuildRun.GET { } } - public enum Include: Hashable, Codable, RawRepresentable { - case builds - case destinationBranch - case product - case pullRequest - case sourceBranchOrTag - case workflow - case unknown(String) - - public var rawValue: String { - switch self { - case .builds: return "builds" - case .destinationBranch: return "destinationBranch" - case .product: return "product" - case .pullRequest: return "pullRequest" - case .sourceBranchOrTag: return "sourceBranchOrTag" - case .workflow: return "workflow" - case .unknown(let rawValue): return rawValue - } + public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var builds: Self { + .init(rawValue: "builds") + } + + public static var destinationBranch: Self { + .init(rawValue: "destinationBranch") } + public static var product: Self { + .init(rawValue: "product") + } + + public static var pullRequest: Self { + .init(rawValue: "pullRequest") + } + + public static var sourceBranchOrTag: Self { + .init(rawValue: "sourceBranchOrTag") + } + + public static var workflow: Self { + .init(rawValue: "workflow") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "builds": self = .builds - case "destinationBranch": self = .destinationBranch - case "product": self = .product - case "pullRequest": self = .pullRequest - case "sourceBranchOrTag": self = .sourceBranchOrTag - case "workflow": self = .workflow - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/CiBuildActions/ById/CiBuildActionsById.GET.4bf84b5.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/CiBuildActions/ById/CiBuildActionsById.GET.4bf84b5.generated.swift index 82890bf4..87aaa6ce 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/CiBuildActions/ById/CiBuildActionsById.GET.4bf84b5.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/CiBuildActions/ById/CiBuildActionsById.GET.4bf84b5.generated.swift @@ -28,16 +28,10 @@ extension V1.CiBuildActions.ById { components?.path = path components?.queryItems = [ - URLQueryItem(name: "fields[ciArtifacts]", - value: parameters.fields[.ciArtifacts]?.map { "\($0)" }.joined(separator: ",")), URLQueryItem(name: "fields[ciBuildActions]", value: parameters.fields[.ciBuildActions]?.map { "\($0)" }.joined(separator: ",")), URLQueryItem(name: "fields[ciBuildRuns]", value: parameters.fields[.ciBuildRuns]?.map { "\($0)" }.joined(separator: ",")), - URLQueryItem(name: "fields[ciIssues]", - value: parameters.fields[.ciIssues]?.map { "\($0)" }.joined(separator: ",")), - URLQueryItem(name: "fields[ciTestResults]", - value: parameters.fields[.ciTestResults]?.map { "\($0)" }.joined(separator: ",")), URLQueryItem(name: "include", value: parameters.include?.map { "\($0)" }.joined(separator: ",")) ].filter { $0.value != nil } @@ -52,8 +46,10 @@ extension V1.CiBuildActions.ById { /// - Returns: **200**, Single CiBuildAction as `CiBuildActionResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -67,12 +63,18 @@ extension V1.CiBuildActions.ById { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 404: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -95,233 +97,155 @@ extension V1.CiBuildActions.ById.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum CiArtifacts: Hashable, Codable, RawRepresentable { - case downloadUrl - case fileName - case fileSize - case fileType - case unknown(String) + public struct CiBuildActions: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var actionType: Self { + .init(rawValue: "actionType") + } - public var rawValue: String { - switch self { - case .downloadUrl: return "downloadUrl" - case .fileName: return "fileName" - case .fileSize: return "fileSize" - case .fileType: return "fileType" - case .unknown(let rawValue): return rawValue - } + public static var artifacts: Self { + .init(rawValue: "artifacts") } - public init(rawValue: String) { - switch rawValue { - case "downloadUrl": self = .downloadUrl - case "fileName": self = .fileName - case "fileSize": self = .fileSize - case "fileType": self = .fileType - default: self = .unknown(rawValue) - } + public static var buildRun: Self { + .init(rawValue: "buildRun") } - } - public enum CiBuildActions: Hashable, Codable, RawRepresentable { - case actionType - case artifacts - case buildRun - case completionStatus - case executionProgress - case finishedDate - case isRequiredToPass - case issueCounts - case issues - case name - case startedDate - case testResults - case unknown(String) - - public var rawValue: String { - switch self { - case .actionType: return "actionType" - case .artifacts: return "artifacts" - case .buildRun: return "buildRun" - case .completionStatus: return "completionStatus" - case .executionProgress: return "executionProgress" - case .finishedDate: return "finishedDate" - case .isRequiredToPass: return "isRequiredToPass" - case .issueCounts: return "issueCounts" - case .issues: return "issues" - case .name: return "name" - case .startedDate: return "startedDate" - case .testResults: return "testResults" - case .unknown(let rawValue): return rawValue - } + public static var completionStatus: Self { + .init(rawValue: "completionStatus") } - public init(rawValue: String) { - switch rawValue { - case "actionType": self = .actionType - case "artifacts": self = .artifacts - case "buildRun": self = .buildRun - case "completionStatus": self = .completionStatus - case "executionProgress": self = .executionProgress - case "finishedDate": self = .finishedDate - case "isRequiredToPass": self = .isRequiredToPass - case "issueCounts": self = .issueCounts - case "issues": self = .issues - case "name": self = .name - case "startedDate": self = .startedDate - case "testResults": self = .testResults - default: self = .unknown(rawValue) - } + public static var executionProgress: Self { + .init(rawValue: "executionProgress") } - } - public enum CiBuildRuns: Hashable, Codable, RawRepresentable { - case actions - case buildRun - case builds - case cancelReason - case clean - case completionStatus - case createdDate - case destinationBranch - case destinationCommit - case executionProgress - case finishedDate - case isPullRequestBuild - case issueCounts - case number - case product - case pullRequest - case sourceBranchOrTag - case sourceCommit - case startReason - case startedDate - case workflow - case unknown(String) - - public var rawValue: String { - switch self { - case .actions: return "actions" - case .buildRun: return "buildRun" - case .builds: return "builds" - case .cancelReason: return "cancelReason" - case .clean: return "clean" - case .completionStatus: return "completionStatus" - case .createdDate: return "createdDate" - case .destinationBranch: return "destinationBranch" - case .destinationCommit: return "destinationCommit" - case .executionProgress: return "executionProgress" - case .finishedDate: return "finishedDate" - case .isPullRequestBuild: return "isPullRequestBuild" - case .issueCounts: return "issueCounts" - case .number: return "number" - case .product: return "product" - case .pullRequest: return "pullRequest" - case .sourceBranchOrTag: return "sourceBranchOrTag" - case .sourceCommit: return "sourceCommit" - case .startReason: return "startReason" - case .startedDate: return "startedDate" - case .workflow: return "workflow" - case .unknown(let rawValue): return rawValue - } + public static var finishedDate: Self { + .init(rawValue: "finishedDate") } - public init(rawValue: String) { - switch rawValue { - case "actions": self = .actions - case "buildRun": self = .buildRun - case "builds": self = .builds - case "cancelReason": self = .cancelReason - case "clean": self = .clean - case "completionStatus": self = .completionStatus - case "createdDate": self = .createdDate - case "destinationBranch": self = .destinationBranch - case "destinationCommit": self = .destinationCommit - case "executionProgress": self = .executionProgress - case "finishedDate": self = .finishedDate - case "isPullRequestBuild": self = .isPullRequestBuild - case "issueCounts": self = .issueCounts - case "number": self = .number - case "product": self = .product - case "pullRequest": self = .pullRequest - case "sourceBranchOrTag": self = .sourceBranchOrTag - case "sourceCommit": self = .sourceCommit - case "startReason": self = .startReason - case "startedDate": self = .startedDate - case "workflow": self = .workflow - default: self = .unknown(rawValue) - } + public static var isRequiredToPass: Self { + .init(rawValue: "isRequiredToPass") } - } - public enum CiIssues: Hashable, Codable, RawRepresentable { - case category - case fileSource - case issueType - case message - case unknown(String) + public static var issueCounts: Self { + .init(rawValue: "issueCounts") + } + + public static var issues: Self { + .init(rawValue: "issues") + } + + public static var name: Self { + .init(rawValue: "name") + } + + public static var startedDate: Self { + .init(rawValue: "startedDate") + } - public var rawValue: String { - switch self { - case .category: return "category" - case .fileSource: return "fileSource" - case .issueType: return "issueType" - case .message: return "message" - case .unknown(let rawValue): return rawValue - } + public static var testResults: Self { + .init(rawValue: "testResults") } + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "category": self = .category - case "fileSource": self = .fileSource - case "issueType": self = .issueType - case "message": self = .message - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum CiTestResults: Hashable, Codable, RawRepresentable { - case className - case destinationTestResults - case fileSource - case message - case name - case status - case unknown(String) - - public var rawValue: String { - switch self { - case .className: return "className" - case .destinationTestResults: return "destinationTestResults" - case .fileSource: return "fileSource" - case .message: return "message" - case .name: return "name" - case .status: return "status" - case .unknown(let rawValue): return rawValue - } + public struct CiBuildRuns: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var actions: Self { + .init(rawValue: "actions") + } + + public static var builds: Self { + .init(rawValue: "builds") + } + + public static var cancelReason: Self { + .init(rawValue: "cancelReason") + } + + public static var completionStatus: Self { + .init(rawValue: "completionStatus") + } + + public static var createdDate: Self { + .init(rawValue: "createdDate") + } + + public static var destinationBranch: Self { + .init(rawValue: "destinationBranch") + } + + public static var destinationCommit: Self { + .init(rawValue: "destinationCommit") + } + + public static var executionProgress: Self { + .init(rawValue: "executionProgress") } + public static var finishedDate: Self { + .init(rawValue: "finishedDate") + } + + public static var isPullRequestBuild: Self { + .init(rawValue: "isPullRequestBuild") + } + + public static var issueCounts: Self { + .init(rawValue: "issueCounts") + } + + public static var number: Self { + .init(rawValue: "number") + } + + public static var product: Self { + .init(rawValue: "product") + } + + public static var pullRequest: Self { + .init(rawValue: "pullRequest") + } + + public static var sourceBranchOrTag: Self { + .init(rawValue: "sourceBranchOrTag") + } + + public static var sourceCommit: Self { + .init(rawValue: "sourceCommit") + } + + public static var startReason: Self { + .init(rawValue: "startReason") + } + + public static var startedDate: Self { + .init(rawValue: "startedDate") + } + + public static var workflow: Self { + .init(rawValue: "workflow") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "className": self = .className - case "destinationTestResults": self = .destinationTestResults - case "fileSource": self = .fileSource - case "message": self = .message - case "name": self = .name - case "status": self = .status - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } public struct Relation: Hashable { - /// the fields to include for returned resources of type ciArtifacts - public static var ciArtifacts: Relation<[CiArtifacts]?> { - .init(key: "fields[ciArtifacts]") - } - /// the fields to include for returned resources of type ciBuildActions public static var ciBuildActions: Relation<[CiBuildActions]?> { .init(key: "fields[ciBuildActions]") @@ -332,16 +256,6 @@ extension V1.CiBuildActions.ById.GET { .init(key: "fields[ciBuildRuns]") } - /// the fields to include for returned resources of type ciIssues - public static var ciIssues: Relation<[CiIssues]?> { - .init(key: "fields[ciIssues]") - } - - /// the fields to include for returned resources of type ciTestResults - public static var ciTestResults: Relation<[CiTestResults]?> { - .init(key: "fields[ciTestResults]") - } - internal let key: String public func hash(into hasher: inout Hasher) { @@ -350,22 +264,19 @@ extension V1.CiBuildActions.ById.GET { } } - public enum Include: Hashable, Codable, RawRepresentable { - case buildRun - case unknown(String) + public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var buildRun: Self { + .init(rawValue: "buildRun") + } - public var rawValue: String { - switch self { - case .buildRun: return "buildRun" - case .unknown(let rawValue): return rawValue - } + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "buildRun": self = .buildRun - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/CiBuildActions/ById/Issues/CiBuildActionsByIdIssues.GET.0045118.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/CiBuildActions/ById/Issues/CiBuildActionsByIdIssues.GET.0045118.generated.swift index 1121e147..4690bc28 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/CiBuildActions/ById/Issues/CiBuildActionsByIdIssues.GET.0045118.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/CiBuildActions/ById/Issues/CiBuildActionsByIdIssues.GET.0045118.generated.swift @@ -44,8 +44,10 @@ extension V1.CiBuildActions.ById.Issues { /// - Returns: **200**, List of CiIssues as `CiIssuesResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -59,12 +61,18 @@ extension V1.CiBuildActions.ById.Issues { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 404: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -87,31 +95,31 @@ extension V1.CiBuildActions.ById.Issues.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum CiIssues: Hashable, Codable, RawRepresentable { - case category - case fileSource - case issueType - case message - case unknown(String) - - public var rawValue: String { - switch self { - case .category: return "category" - case .fileSource: return "fileSource" - case .issueType: return "issueType" - case .message: return "message" - case .unknown(let rawValue): return rawValue - } + public struct CiIssues: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var category: Self { + .init(rawValue: "category") } + public static var fileSource: Self { + .init(rawValue: "fileSource") + } + + public static var issueType: Self { + .init(rawValue: "issueType") + } + + public static var message: Self { + .init(rawValue: "message") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "category": self = .category - case "fileSource": self = .fileSource - case "issueType": self = .issueType - case "message": self = .message - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/CiBuildActions/ById/Relationships/Artifacts/CiBuildActionsByIdRelationshipsArtifacts.GET.aea731d.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/CiBuildActions/ById/Relationships/Artifacts/CiBuildActionsByIdRelationshipsArtifacts.GET.aea731d.generated.swift new file mode 100644 index 00000000..05b6c1bc --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/CiBuildActions/ById/Relationships/Artifacts/CiBuildActionsByIdRelationshipsArtifacts.GET.aea731d.generated.swift @@ -0,0 +1,88 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.CiBuildActions.ById.Relationships.Artifacts { + public struct GET: Endpoint { + public typealias Response = CiBuildActionArtifactsLinkagesResponse + + public var path: String { + "/v1/ciBuildActions/\(id)/relationships/artifacts" + } + + /// the id of the requested resource + public var id: String + + public var parameters: Parameters = Parameters() + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + components?.queryItems = [ + URLQueryItem(name: "limit", + value: parameters.limit.map { "\($0)" }) + ].filter { $0.value != nil } + if components?.queryItems?.isEmpty ?? false { + components?.queryItems = nil + } + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "GET" + return urlRequest + } + + /// - Returns: **200**, List of related linkages as `CiBuildActionArtifactsLinkagesResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(CiBuildActionArtifactsLinkagesResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +extension V1.CiBuildActions.ById.Relationships.Artifacts.GET { + public struct Parameters: Hashable { + /// maximum resources per page + public var limit: Int? + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/CiBuildActions/ById/Relationships/BuildRun/CiBuildActionsByIdRelationshipsBuildRun.GET.1a8a104.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/CiBuildActions/ById/Relationships/BuildRun/CiBuildActionsByIdRelationshipsBuildRun.GET.1a8a104.generated.swift new file mode 100644 index 00000000..74dad711 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/CiBuildActions/ById/Relationships/BuildRun/CiBuildActionsByIdRelationshipsBuildRun.GET.1a8a104.generated.swift @@ -0,0 +1,86 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.CiBuildActions.ById.Relationships.BuildRun { + public struct GET: Endpoint { + public typealias Response = CiBuildActionBuildRunLinkageResponse + + public var path: String { + "/v1/ciBuildActions/\(id)/relationships/buildRun" + } + + /// the id of the requested resource + public var id: String + + public var parameters: Parameters = Parameters() + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + components?.queryItems = [ + + ].filter { $0.value != nil } + if components?.queryItems?.isEmpty ?? false { + components?.queryItems = nil + } + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "GET" + return urlRequest + } + + /// - Returns: **200**, Related linkage as `CiBuildActionBuildRunLinkageResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(CiBuildActionBuildRunLinkageResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +extension V1.CiBuildActions.ById.Relationships.BuildRun.GET { + public struct Parameters: Hashable { + + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/CiBuildActions/ById/Relationships/Issues/CiBuildActionsByIdRelationshipsIssues.GET.a13c06f.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/CiBuildActions/ById/Relationships/Issues/CiBuildActionsByIdRelationshipsIssues.GET.a13c06f.generated.swift new file mode 100644 index 00000000..09de11a6 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/CiBuildActions/ById/Relationships/Issues/CiBuildActionsByIdRelationshipsIssues.GET.a13c06f.generated.swift @@ -0,0 +1,88 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.CiBuildActions.ById.Relationships.Issues { + public struct GET: Endpoint { + public typealias Response = CiBuildActionIssuesLinkagesResponse + + public var path: String { + "/v1/ciBuildActions/\(id)/relationships/issues" + } + + /// the id of the requested resource + public var id: String + + public var parameters: Parameters = Parameters() + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + components?.queryItems = [ + URLQueryItem(name: "limit", + value: parameters.limit.map { "\($0)" }) + ].filter { $0.value != nil } + if components?.queryItems?.isEmpty ?? false { + components?.queryItems = nil + } + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "GET" + return urlRequest + } + + /// - Returns: **200**, List of related linkages as `CiBuildActionIssuesLinkagesResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(CiBuildActionIssuesLinkagesResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +extension V1.CiBuildActions.ById.Relationships.Issues.GET { + public struct Parameters: Hashable { + /// maximum resources per page + public var limit: Int? + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/CiBuildActions/ById/Relationships/TestResults/CiBuildActionsByIdRelationshipsTestResults.GET.3a9c66f.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/CiBuildActions/ById/Relationships/TestResults/CiBuildActionsByIdRelationshipsTestResults.GET.3a9c66f.generated.swift new file mode 100644 index 00000000..be65cd8a --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/CiBuildActions/ById/Relationships/TestResults/CiBuildActionsByIdRelationshipsTestResults.GET.3a9c66f.generated.swift @@ -0,0 +1,88 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.CiBuildActions.ById.Relationships.TestResults { + public struct GET: Endpoint { + public typealias Response = CiBuildActionTestResultsLinkagesResponse + + public var path: String { + "/v1/ciBuildActions/\(id)/relationships/testResults" + } + + /// the id of the requested resource + public var id: String + + public var parameters: Parameters = Parameters() + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + components?.queryItems = [ + URLQueryItem(name: "limit", + value: parameters.limit.map { "\($0)" }) + ].filter { $0.value != nil } + if components?.queryItems?.isEmpty ?? false { + components?.queryItems = nil + } + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "GET" + return urlRequest + } + + /// - Returns: **200**, List of related linkages as `CiBuildActionTestResultsLinkagesResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(CiBuildActionTestResultsLinkagesResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +extension V1.CiBuildActions.ById.Relationships.TestResults.GET { + public struct Parameters: Hashable { + /// maximum resources per page + public var limit: Int? + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/CiBuildActions/ById/TestResults/CiBuildActionsByIdTestResults.GET.32bf0e9.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/CiBuildActions/ById/TestResults/CiBuildActionsByIdTestResults.GET.32bf0e9.generated.swift index 90d41ab8..306087c4 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/CiBuildActions/ById/TestResults/CiBuildActionsByIdTestResults.GET.32bf0e9.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/CiBuildActions/ById/TestResults/CiBuildActionsByIdTestResults.GET.32bf0e9.generated.swift @@ -44,8 +44,10 @@ extension V1.CiBuildActions.ById.TestResults { /// - Returns: **200**, List of CiTestResults as `CiTestResultsResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -59,12 +61,18 @@ extension V1.CiBuildActions.ById.TestResults { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 404: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -87,37 +95,39 @@ extension V1.CiBuildActions.ById.TestResults.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum CiTestResults: Hashable, Codable, RawRepresentable { - case className - case destinationTestResults - case fileSource - case message - case name - case status - case unknown(String) - - public var rawValue: String { - switch self { - case .className: return "className" - case .destinationTestResults: return "destinationTestResults" - case .fileSource: return "fileSource" - case .message: return "message" - case .name: return "name" - case .status: return "status" - case .unknown(let rawValue): return rawValue - } + public struct CiTestResults: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var className: Self { + .init(rawValue: "className") } + public static var destinationTestResults: Self { + .init(rawValue: "destinationTestResults") + } + + public static var fileSource: Self { + .init(rawValue: "fileSource") + } + + public static var message: Self { + .init(rawValue: "message") + } + + public static var name: Self { + .init(rawValue: "name") + } + + public static var status: Self { + .init(rawValue: "status") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "className": self = .className - case "destinationTestResults": self = .destinationTestResults - case "fileSource": self = .fileSource - case "message": self = .message - case "name": self = .name - case "status": self = .status - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/CiBuildRuns/ById/Actions/CiBuildRunsByIdActions.GET.78a25ca.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/CiBuildRuns/ById/Actions/CiBuildRunsByIdActions.GET.78a25ca.generated.swift index b0b723b1..c87ef2ac 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/CiBuildRuns/ById/Actions/CiBuildRunsByIdActions.GET.78a25ca.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/CiBuildRuns/ById/Actions/CiBuildRunsByIdActions.GET.78a25ca.generated.swift @@ -48,8 +48,10 @@ extension V1.CiBuildRuns.ById.Actions { /// - Returns: **200**, List of CiBuildActions as `CiBuildActionsResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -63,12 +65,18 @@ extension V1.CiBuildRuns.ById.Actions { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 404: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -94,134 +102,151 @@ extension V1.CiBuildRuns.ById.Actions.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum CiBuildActions: Hashable, Codable, RawRepresentable { - case actionType - case artifacts - case buildRun - case completionStatus - case executionProgress - case finishedDate - case isRequiredToPass - case issueCounts - case issues - case name - case startedDate - case testResults - case unknown(String) - - public var rawValue: String { - switch self { - case .actionType: return "actionType" - case .artifacts: return "artifacts" - case .buildRun: return "buildRun" - case .completionStatus: return "completionStatus" - case .executionProgress: return "executionProgress" - case .finishedDate: return "finishedDate" - case .isRequiredToPass: return "isRequiredToPass" - case .issueCounts: return "issueCounts" - case .issues: return "issues" - case .name: return "name" - case .startedDate: return "startedDate" - case .testResults: return "testResults" - case .unknown(let rawValue): return rawValue - } + public struct CiBuildActions: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var actionType: Self { + .init(rawValue: "actionType") + } + + public static var artifacts: Self { + .init(rawValue: "artifacts") + } + + public static var buildRun: Self { + .init(rawValue: "buildRun") + } + + public static var completionStatus: Self { + .init(rawValue: "completionStatus") + } + + public static var executionProgress: Self { + .init(rawValue: "executionProgress") + } + + public static var finishedDate: Self { + .init(rawValue: "finishedDate") + } + + public static var isRequiredToPass: Self { + .init(rawValue: "isRequiredToPass") + } + + public static var issueCounts: Self { + .init(rawValue: "issueCounts") } + public static var issues: Self { + .init(rawValue: "issues") + } + + public static var name: Self { + .init(rawValue: "name") + } + + public static var startedDate: Self { + .init(rawValue: "startedDate") + } + + public static var testResults: Self { + .init(rawValue: "testResults") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "actionType": self = .actionType - case "artifacts": self = .artifacts - case "buildRun": self = .buildRun - case "completionStatus": self = .completionStatus - case "executionProgress": self = .executionProgress - case "finishedDate": self = .finishedDate - case "isRequiredToPass": self = .isRequiredToPass - case "issueCounts": self = .issueCounts - case "issues": self = .issues - case "name": self = .name - case "startedDate": self = .startedDate - case "testResults": self = .testResults - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum CiBuildRuns: Hashable, Codable, RawRepresentable { - case actions - case buildRun - case builds - case cancelReason - case clean - case completionStatus - case createdDate - case destinationBranch - case destinationCommit - case executionProgress - case finishedDate - case isPullRequestBuild - case issueCounts - case number - case product - case pullRequest - case sourceBranchOrTag - case sourceCommit - case startReason - case startedDate - case workflow - case unknown(String) - - public var rawValue: String { - switch self { - case .actions: return "actions" - case .buildRun: return "buildRun" - case .builds: return "builds" - case .cancelReason: return "cancelReason" - case .clean: return "clean" - case .completionStatus: return "completionStatus" - case .createdDate: return "createdDate" - case .destinationBranch: return "destinationBranch" - case .destinationCommit: return "destinationCommit" - case .executionProgress: return "executionProgress" - case .finishedDate: return "finishedDate" - case .isPullRequestBuild: return "isPullRequestBuild" - case .issueCounts: return "issueCounts" - case .number: return "number" - case .product: return "product" - case .pullRequest: return "pullRequest" - case .sourceBranchOrTag: return "sourceBranchOrTag" - case .sourceCommit: return "sourceCommit" - case .startReason: return "startReason" - case .startedDate: return "startedDate" - case .workflow: return "workflow" - case .unknown(let rawValue): return rawValue - } + public struct CiBuildRuns: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var actions: Self { + .init(rawValue: "actions") + } + + public static var builds: Self { + .init(rawValue: "builds") + } + + public static var cancelReason: Self { + .init(rawValue: "cancelReason") + } + + public static var completionStatus: Self { + .init(rawValue: "completionStatus") + } + + public static var createdDate: Self { + .init(rawValue: "createdDate") + } + + public static var destinationBranch: Self { + .init(rawValue: "destinationBranch") + } + + public static var destinationCommit: Self { + .init(rawValue: "destinationCommit") + } + + public static var executionProgress: Self { + .init(rawValue: "executionProgress") + } + + public static var finishedDate: Self { + .init(rawValue: "finishedDate") + } + + public static var isPullRequestBuild: Self { + .init(rawValue: "isPullRequestBuild") + } + + public static var issueCounts: Self { + .init(rawValue: "issueCounts") + } + + public static var number: Self { + .init(rawValue: "number") + } + + public static var product: Self { + .init(rawValue: "product") + } + + public static var pullRequest: Self { + .init(rawValue: "pullRequest") + } + + public static var sourceBranchOrTag: Self { + .init(rawValue: "sourceBranchOrTag") + } + + public static var sourceCommit: Self { + .init(rawValue: "sourceCommit") + } + + public static var startReason: Self { + .init(rawValue: "startReason") + } + + public static var startedDate: Self { + .init(rawValue: "startedDate") } + public static var workflow: Self { + .init(rawValue: "workflow") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "actions": self = .actions - case "buildRun": self = .buildRun - case "builds": self = .builds - case "cancelReason": self = .cancelReason - case "clean": self = .clean - case "completionStatus": self = .completionStatus - case "createdDate": self = .createdDate - case "destinationBranch": self = .destinationBranch - case "destinationCommit": self = .destinationCommit - case "executionProgress": self = .executionProgress - case "finishedDate": self = .finishedDate - case "isPullRequestBuild": self = .isPullRequestBuild - case "issueCounts": self = .issueCounts - case "number": self = .number - case "product": self = .product - case "pullRequest": self = .pullRequest - case "sourceBranchOrTag": self = .sourceBranchOrTag - case "sourceCommit": self = .sourceCommit - case "startReason": self = .startReason - case "startedDate": self = .startedDate - case "workflow": self = .workflow - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } @@ -244,22 +269,19 @@ extension V1.CiBuildRuns.ById.Actions.GET { } } - public enum Include: Hashable, Codable, RawRepresentable { - case buildRun - case unknown(String) + public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var buildRun: Self { + .init(rawValue: "buildRun") + } - public var rawValue: String { - switch self { - case .buildRun: return "buildRun" - case .unknown(let rawValue): return rawValue - } + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "buildRun": self = .buildRun - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/CiBuildRuns/ById/Builds/CiBuildRunsByIdBuilds.GET.d851595.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/CiBuildRuns/ById/Builds/CiBuildRunsByIdBuilds.GET.d851595.generated.swift index b09e8c6e..36efd1f7 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/CiBuildRuns/ById/Builds/CiBuildRunsByIdBuilds.GET.d851595.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/CiBuildRuns/ById/Builds/CiBuildRunsByIdBuilds.GET.d851595.generated.swift @@ -28,6 +28,8 @@ extension V1.CiBuildRuns.ById.Builds { components?.path = path components?.queryItems = [ + URLQueryItem(name: "exists[usesNonExemptEncryption]", + value: parameters.exists[.usesNonExemptEncryption].map { "\($0)" }), URLQueryItem(name: "fields[appEncryptionDeclarations]", value: parameters.fields[.appEncryptionDeclarations]?.map { "\($0)" }.joined(separator: ",")), URLQueryItem(name: "fields[appStoreVersions]", @@ -106,8 +108,10 @@ extension V1.CiBuildRuns.ById.Builds { /// - Returns: **200**, List of Builds as `BuildsResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -121,12 +125,18 @@ extension V1.CiBuildRuns.ById.Builds { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 404: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -136,6 +146,8 @@ extension V1.CiBuildRuns.ById.Builds { extension V1.CiBuildRuns.ById.Builds.GET { public struct Parameters: Hashable { + public var exists: Exists = Exists() + public var fields: Fields = Fields() public var filter: Filter = Filter() @@ -149,6 +161,28 @@ extension V1.CiBuildRuns.ById.Builds.GET { /// comma-separated list of sort expressions; resources will be sorted as specified public var sort: [Sort]? + public struct Exists: Hashable { + public subscript (_ relation: Relation) -> T { + get { values[relation]?.base as! T } + set { values[relation] = AnyHashable(newValue) } + } + + private var values: [AnyHashable: AnyHashable] = [:] + + public struct Relation: Hashable { + /// filter by attribute 'usesNonExemptEncryption' + public static var usesNonExemptEncryption: Relation { + .init(key: "exists[usesNonExemptEncryption]") + } + + internal let key: String + + public func hash(into hasher: inout Hasher) { + hasher.combine(key) + } + } + } + public struct Fields: Hashable { public subscript (_ relation: Relation) -> T { get { values[relation]?.base as! T } @@ -157,687 +191,875 @@ extension V1.CiBuildRuns.ById.Builds.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum AppEncryptionDeclarations: Hashable, Codable, RawRepresentable { - case app - case appDescription - case appEncryptionDeclarationDocument - case appEncryptionDeclarationState - case availableOnFrenchStore - case builds - case codeValue - case containsProprietaryCryptography - case containsThirdPartyCryptography - case createdDate - case documentName - case documentType - case documentUrl - case exempt - case platform - case uploadedDate - case usesEncryption - case unknown(String) - - public var rawValue: String { - switch self { - case .app: return "app" - case .appDescription: return "appDescription" - case .appEncryptionDeclarationDocument: return "appEncryptionDeclarationDocument" - case .appEncryptionDeclarationState: return "appEncryptionDeclarationState" - case .availableOnFrenchStore: return "availableOnFrenchStore" - case .builds: return "builds" - case .codeValue: return "codeValue" - case .containsProprietaryCryptography: return "containsProprietaryCryptography" - case .containsThirdPartyCryptography: return "containsThirdPartyCryptography" - case .createdDate: return "createdDate" - case .documentName: return "documentName" - case .documentType: return "documentType" - case .documentUrl: return "documentUrl" - case .exempt: return "exempt" - case .platform: return "platform" - case .uploadedDate: return "uploadedDate" - case .usesEncryption: return "usesEncryption" - case .unknown(let rawValue): return rawValue - } + public struct AppEncryptionDeclarations: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var app: Self { + .init(rawValue: "app") + } + + public static var appDescription: Self { + .init(rawValue: "appDescription") + } + + public static var appEncryptionDeclarationDocument: Self { + .init(rawValue: "appEncryptionDeclarationDocument") + } + + public static var appEncryptionDeclarationState: Self { + .init(rawValue: "appEncryptionDeclarationState") + } + + public static var availableOnFrenchStore: Self { + .init(rawValue: "availableOnFrenchStore") + } + + public static var builds: Self { + .init(rawValue: "builds") + } + + public static var codeValue: Self { + .init(rawValue: "codeValue") + } + + public static var containsProprietaryCryptography: Self { + .init(rawValue: "containsProprietaryCryptography") + } + + public static var containsThirdPartyCryptography: Self { + .init(rawValue: "containsThirdPartyCryptography") + } + + public static var createdDate: Self { + .init(rawValue: "createdDate") + } + + public static var documentName: Self { + .init(rawValue: "documentName") + } + + public static var documentType: Self { + .init(rawValue: "documentType") + } + + public static var documentUrl: Self { + .init(rawValue: "documentUrl") + } + + public static var exempt: Self { + .init(rawValue: "exempt") + } + + public static var platform: Self { + .init(rawValue: "platform") + } + + public static var uploadedDate: Self { + .init(rawValue: "uploadedDate") + } + + public static var usesEncryption: Self { + .init(rawValue: "usesEncryption") + } + + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "app": self = .app - case "appDescription": self = .appDescription - case "appEncryptionDeclarationDocument": self = .appEncryptionDeclarationDocument - case "appEncryptionDeclarationState": self = .appEncryptionDeclarationState - case "availableOnFrenchStore": self = .availableOnFrenchStore - case "builds": self = .builds - case "codeValue": self = .codeValue - case "containsProprietaryCryptography": self = .containsProprietaryCryptography - case "containsThirdPartyCryptography": self = .containsThirdPartyCryptography - case "createdDate": self = .createdDate - case "documentName": self = .documentName - case "documentType": self = .documentType - case "documentUrl": self = .documentUrl - case "exempt": self = .exempt - case "platform": self = .platform - case "uploadedDate": self = .uploadedDate - case "usesEncryption": self = .usesEncryption - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum AppStoreVersions: Hashable, Codable, RawRepresentable { - case ageRatingDeclaration - case app - case appClipDefaultExperience - case appStoreReviewDetail - case appStoreState - case appStoreVersionExperiments - case appStoreVersionExperimentsV2 - case appStoreVersionLocalizations - case appStoreVersionPhasedRelease - case appStoreVersionSubmission - case build - case copyright - case createdDate - case customerReviews - case downloadable - case earliestReleaseDate - case platform - case releaseType - case routingAppCoverage - case versionString - case unknown(String) - - public var rawValue: String { - switch self { - case .ageRatingDeclaration: return "ageRatingDeclaration" - case .app: return "app" - case .appClipDefaultExperience: return "appClipDefaultExperience" - case .appStoreReviewDetail: return "appStoreReviewDetail" - case .appStoreState: return "appStoreState" - case .appStoreVersionExperiments: return "appStoreVersionExperiments" - case .appStoreVersionExperimentsV2: return "appStoreVersionExperimentsV2" - case .appStoreVersionLocalizations: return "appStoreVersionLocalizations" - case .appStoreVersionPhasedRelease: return "appStoreVersionPhasedRelease" - case .appStoreVersionSubmission: return "appStoreVersionSubmission" - case .build: return "build" - case .copyright: return "copyright" - case .createdDate: return "createdDate" - case .customerReviews: return "customerReviews" - case .downloadable: return "downloadable" - case .earliestReleaseDate: return "earliestReleaseDate" - case .platform: return "platform" - case .releaseType: return "releaseType" - case .routingAppCoverage: return "routingAppCoverage" - case .versionString: return "versionString" - case .unknown(let rawValue): return rawValue - } + public struct AppStoreVersions: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var ageRatingDeclaration: Self { + .init(rawValue: "ageRatingDeclaration") + } + + public static var alternativeDistributionPackage: Self { + .init(rawValue: "alternativeDistributionPackage") + } + + public static var app: Self { + .init(rawValue: "app") + } + + public static var appClipDefaultExperience: Self { + .init(rawValue: "appClipDefaultExperience") + } + + public static var appStoreReviewDetail: Self { + .init(rawValue: "appStoreReviewDetail") + } + + public static var appStoreState: Self { + .init(rawValue: "appStoreState") + } + + public static var appStoreVersionExperiments: Self { + .init(rawValue: "appStoreVersionExperiments") + } + + public static var appStoreVersionExperimentsV2: Self { + .init(rawValue: "appStoreVersionExperimentsV2") + } + + public static var appStoreVersionLocalizations: Self { + .init(rawValue: "appStoreVersionLocalizations") + } + + public static var appStoreVersionPhasedRelease: Self { + .init(rawValue: "appStoreVersionPhasedRelease") + } + + public static var appStoreVersionSubmission: Self { + .init(rawValue: "appStoreVersionSubmission") + } + + public static var appVersionState: Self { + .init(rawValue: "appVersionState") + } + + public static var build: Self { + .init(rawValue: "build") + } + + public static var copyright: Self { + .init(rawValue: "copyright") + } + + public static var createdDate: Self { + .init(rawValue: "createdDate") } + public static var customerReviews: Self { + .init(rawValue: "customerReviews") + } + + public static var downloadable: Self { + .init(rawValue: "downloadable") + } + + public static var earliestReleaseDate: Self { + .init(rawValue: "earliestReleaseDate") + } + + public static var gameCenterAppVersion: Self { + .init(rawValue: "gameCenterAppVersion") + } + + public static var platform: Self { + .init(rawValue: "platform") + } + + public static var releaseType: Self { + .init(rawValue: "releaseType") + } + + public static var reviewType: Self { + .init(rawValue: "reviewType") + } + + public static var routingAppCoverage: Self { + .init(rawValue: "routingAppCoverage") + } + + public static var usesIdfa: Self { + .init(rawValue: "usesIdfa") + } + + public static var versionString: Self { + .init(rawValue: "versionString") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "ageRatingDeclaration": self = .ageRatingDeclaration - case "app": self = .app - case "appClipDefaultExperience": self = .appClipDefaultExperience - case "appStoreReviewDetail": self = .appStoreReviewDetail - case "appStoreState": self = .appStoreState - case "appStoreVersionExperiments": self = .appStoreVersionExperiments - case "appStoreVersionExperimentsV2": self = .appStoreVersionExperimentsV2 - case "appStoreVersionLocalizations": self = .appStoreVersionLocalizations - case "appStoreVersionPhasedRelease": self = .appStoreVersionPhasedRelease - case "appStoreVersionSubmission": self = .appStoreVersionSubmission - case "build": self = .build - case "copyright": self = .copyright - case "createdDate": self = .createdDate - case "customerReviews": self = .customerReviews - case "downloadable": self = .downloadable - case "earliestReleaseDate": self = .earliestReleaseDate - case "platform": self = .platform - case "releaseType": self = .releaseType - case "routingAppCoverage": self = .routingAppCoverage - case "versionString": self = .versionString - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum Apps: Hashable, Codable, RawRepresentable { - case appAvailability - case appClips - case appCustomProductPages - case appEncryptionDeclarations - case appEvents - case appInfos - case appPricePoints - case appPriceSchedule - case appStoreVersionExperimentsV2 - case appStoreVersions - case availableInNewTerritories - case availableTerritories - case betaAppLocalizations - case betaAppReviewDetail - case betaGroups - case betaLicenseAgreement - case betaTesters - case builds - case bundleId - case ciProduct - case contentRightsDeclaration - case customerReviews - case endUserLicenseAgreement - case gameCenterDetail - case gameCenterEnabledVersions - case inAppPurchases - case inAppPurchasesV2 - case isOrEverWasMadeForKids - case name - case perfPowerMetrics - case preOrder - case preReleaseVersions - case pricePoints - case prices - case primaryLocale - case promotedPurchases - case reviewSubmissions - case sku - case subscriptionGracePeriod - case subscriptionGroups - case subscriptionStatusUrl - case subscriptionStatusUrlForSandbox - case subscriptionStatusUrlVersion - case subscriptionStatusUrlVersionForSandbox - case unknown(String) - - public var rawValue: String { - switch self { - case .appAvailability: return "appAvailability" - case .appClips: return "appClips" - case .appCustomProductPages: return "appCustomProductPages" - case .appEncryptionDeclarations: return "appEncryptionDeclarations" - case .appEvents: return "appEvents" - case .appInfos: return "appInfos" - case .appPricePoints: return "appPricePoints" - case .appPriceSchedule: return "appPriceSchedule" - case .appStoreVersionExperimentsV2: return "appStoreVersionExperimentsV2" - case .appStoreVersions: return "appStoreVersions" - case .availableInNewTerritories: return "availableInNewTerritories" - case .availableTerritories: return "availableTerritories" - case .betaAppLocalizations: return "betaAppLocalizations" - case .betaAppReviewDetail: return "betaAppReviewDetail" - case .betaGroups: return "betaGroups" - case .betaLicenseAgreement: return "betaLicenseAgreement" - case .betaTesters: return "betaTesters" - case .builds: return "builds" - case .bundleId: return "bundleId" - case .ciProduct: return "ciProduct" - case .contentRightsDeclaration: return "contentRightsDeclaration" - case .customerReviews: return "customerReviews" - case .endUserLicenseAgreement: return "endUserLicenseAgreement" - case .gameCenterDetail: return "gameCenterDetail" - case .gameCenterEnabledVersions: return "gameCenterEnabledVersions" - case .inAppPurchases: return "inAppPurchases" - case .inAppPurchasesV2: return "inAppPurchasesV2" - case .isOrEverWasMadeForKids: return "isOrEverWasMadeForKids" - case .name: return "name" - case .perfPowerMetrics: return "perfPowerMetrics" - case .preOrder: return "preOrder" - case .preReleaseVersions: return "preReleaseVersions" - case .pricePoints: return "pricePoints" - case .prices: return "prices" - case .primaryLocale: return "primaryLocale" - case .promotedPurchases: return "promotedPurchases" - case .reviewSubmissions: return "reviewSubmissions" - case .sku: return "sku" - case .subscriptionGracePeriod: return "subscriptionGracePeriod" - case .subscriptionGroups: return "subscriptionGroups" - case .subscriptionStatusUrl: return "subscriptionStatusUrl" - case .subscriptionStatusUrlForSandbox: return "subscriptionStatusUrlForSandbox" - case .subscriptionStatusUrlVersion: return "subscriptionStatusUrlVersion" - case .subscriptionStatusUrlVersionForSandbox: return "subscriptionStatusUrlVersionForSandbox" - case .unknown(let rawValue): return rawValue - } + public struct Apps: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var accessibilityDeclarations: Self { + .init(rawValue: "accessibilityDeclarations") + } + + public static var accessibilityUrl: Self { + .init(rawValue: "accessibilityUrl") + } + + public static var alternativeDistributionKey: Self { + .init(rawValue: "alternativeDistributionKey") + } + + public static var analyticsReportRequests: Self { + .init(rawValue: "analyticsReportRequests") } + public static var appAvailabilityV2: Self { + .init(rawValue: "appAvailabilityV2") + } + + public static var appClips: Self { + .init(rawValue: "appClips") + } + + public static var appCustomProductPages: Self { + .init(rawValue: "appCustomProductPages") + } + + public static var appEncryptionDeclarations: Self { + .init(rawValue: "appEncryptionDeclarations") + } + + public static var appEvents: Self { + .init(rawValue: "appEvents") + } + + public static var appInfos: Self { + .init(rawValue: "appInfos") + } + + public static var appPricePoints: Self { + .init(rawValue: "appPricePoints") + } + + public static var appPriceSchedule: Self { + .init(rawValue: "appPriceSchedule") + } + + public static var appStoreVersionExperimentsV2: Self { + .init(rawValue: "appStoreVersionExperimentsV2") + } + + public static var appStoreVersions: Self { + .init(rawValue: "appStoreVersions") + } + + public static var backgroundAssets: Self { + .init(rawValue: "backgroundAssets") + } + + public static var betaAppLocalizations: Self { + .init(rawValue: "betaAppLocalizations") + } + + public static var betaAppReviewDetail: Self { + .init(rawValue: "betaAppReviewDetail") + } + + public static var betaFeedbackCrashSubmissions: Self { + .init(rawValue: "betaFeedbackCrashSubmissions") + } + + public static var betaFeedbackScreenshotSubmissions: Self { + .init(rawValue: "betaFeedbackScreenshotSubmissions") + } + + public static var betaGroups: Self { + .init(rawValue: "betaGroups") + } + + public static var betaLicenseAgreement: Self { + .init(rawValue: "betaLicenseAgreement") + } + + public static var betaTesters: Self { + .init(rawValue: "betaTesters") + } + + public static var builds: Self { + .init(rawValue: "builds") + } + + public static var bundleId: Self { + .init(rawValue: "bundleId") + } + + public static var ciProduct: Self { + .init(rawValue: "ciProduct") + } + + public static var contentRightsDeclaration: Self { + .init(rawValue: "contentRightsDeclaration") + } + + public static var customerReviewSummarizations: Self { + .init(rawValue: "customerReviewSummarizations") + } + + public static var customerReviews: Self { + .init(rawValue: "customerReviews") + } + + public static var endUserLicenseAgreement: Self { + .init(rawValue: "endUserLicenseAgreement") + } + + public static var gameCenterDetail: Self { + .init(rawValue: "gameCenterDetail") + } + + public static var gameCenterEnabledVersions: Self { + .init(rawValue: "gameCenterEnabledVersions") + } + + public static var inAppPurchases: Self { + .init(rawValue: "inAppPurchases") + } + + public static var inAppPurchasesV2: Self { + .init(rawValue: "inAppPurchasesV2") + } + + public static var isOrEverWasMadeForKids: Self { + .init(rawValue: "isOrEverWasMadeForKids") + } + + public static var marketplaceSearchDetail: Self { + .init(rawValue: "marketplaceSearchDetail") + } + + public static var name: Self { + .init(rawValue: "name") + } + + public static var perfPowerMetrics: Self { + .init(rawValue: "perfPowerMetrics") + } + + public static var preReleaseVersions: Self { + .init(rawValue: "preReleaseVersions") + } + + public static var primaryLocale: Self { + .init(rawValue: "primaryLocale") + } + + public static var promotedPurchases: Self { + .init(rawValue: "promotedPurchases") + } + + public static var reviewSubmissions: Self { + .init(rawValue: "reviewSubmissions") + } + + public static var sku: Self { + .init(rawValue: "sku") + } + + public static var streamlinedPurchasingEnabled: Self { + .init(rawValue: "streamlinedPurchasingEnabled") + } + + public static var subscriptionGracePeriod: Self { + .init(rawValue: "subscriptionGracePeriod") + } + + public static var subscriptionGroups: Self { + .init(rawValue: "subscriptionGroups") + } + + public static var subscriptionStatusUrl: Self { + .init(rawValue: "subscriptionStatusUrl") + } + + public static var subscriptionStatusUrlForSandbox: Self { + .init(rawValue: "subscriptionStatusUrlForSandbox") + } + + public static var subscriptionStatusUrlVersion: Self { + .init(rawValue: "subscriptionStatusUrlVersion") + } + + public static var subscriptionStatusUrlVersionForSandbox: Self { + .init(rawValue: "subscriptionStatusUrlVersionForSandbox") + } + + public static var webhooks: Self { + .init(rawValue: "webhooks") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "appAvailability": self = .appAvailability - case "appClips": self = .appClips - case "appCustomProductPages": self = .appCustomProductPages - case "appEncryptionDeclarations": self = .appEncryptionDeclarations - case "appEvents": self = .appEvents - case "appInfos": self = .appInfos - case "appPricePoints": self = .appPricePoints - case "appPriceSchedule": self = .appPriceSchedule - case "appStoreVersionExperimentsV2": self = .appStoreVersionExperimentsV2 - case "appStoreVersions": self = .appStoreVersions - case "availableInNewTerritories": self = .availableInNewTerritories - case "availableTerritories": self = .availableTerritories - case "betaAppLocalizations": self = .betaAppLocalizations - case "betaAppReviewDetail": self = .betaAppReviewDetail - case "betaGroups": self = .betaGroups - case "betaLicenseAgreement": self = .betaLicenseAgreement - case "betaTesters": self = .betaTesters - case "builds": self = .builds - case "bundleId": self = .bundleId - case "ciProduct": self = .ciProduct - case "contentRightsDeclaration": self = .contentRightsDeclaration - case "customerReviews": self = .customerReviews - case "endUserLicenseAgreement": self = .endUserLicenseAgreement - case "gameCenterDetail": self = .gameCenterDetail - case "gameCenterEnabledVersions": self = .gameCenterEnabledVersions - case "inAppPurchases": self = .inAppPurchases - case "inAppPurchasesV2": self = .inAppPurchasesV2 - case "isOrEverWasMadeForKids": self = .isOrEverWasMadeForKids - case "name": self = .name - case "perfPowerMetrics": self = .perfPowerMetrics - case "preOrder": self = .preOrder - case "preReleaseVersions": self = .preReleaseVersions - case "pricePoints": self = .pricePoints - case "prices": self = .prices - case "primaryLocale": self = .primaryLocale - case "promotedPurchases": self = .promotedPurchases - case "reviewSubmissions": self = .reviewSubmissions - case "sku": self = .sku - case "subscriptionGracePeriod": self = .subscriptionGracePeriod - case "subscriptionGroups": self = .subscriptionGroups - case "subscriptionStatusUrl": self = .subscriptionStatusUrl - case "subscriptionStatusUrlForSandbox": self = .subscriptionStatusUrlForSandbox - case "subscriptionStatusUrlVersion": self = .subscriptionStatusUrlVersion - case "subscriptionStatusUrlVersionForSandbox": self = .subscriptionStatusUrlVersionForSandbox - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum BetaAppReviewSubmissions: Hashable, Codable, RawRepresentable { - case betaReviewState - case build - case submittedDate - case unknown(String) + public struct BetaAppReviewSubmissions: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var betaReviewState: Self { + .init(rawValue: "betaReviewState") + } + + public static var build: Self { + .init(rawValue: "build") + } - public var rawValue: String { - switch self { - case .betaReviewState: return "betaReviewState" - case .build: return "build" - case .submittedDate: return "submittedDate" - case .unknown(let rawValue): return rawValue - } + public static var submittedDate: Self { + .init(rawValue: "submittedDate") } + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "betaReviewState": self = .betaReviewState - case "build": self = .build - case "submittedDate": self = .submittedDate - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum BetaBuildLocalizations: Hashable, Codable, RawRepresentable { - case build - case locale - case whatsNew - case unknown(String) + public struct BetaBuildLocalizations: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var build: Self { + .init(rawValue: "build") + } - public var rawValue: String { - switch self { - case .build: return "build" - case .locale: return "locale" - case .whatsNew: return "whatsNew" - case .unknown(let rawValue): return rawValue - } + public static var locale: Self { + .init(rawValue: "locale") } + public static var whatsNew: Self { + .init(rawValue: "whatsNew") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "build": self = .build - case "locale": self = .locale - case "whatsNew": self = .whatsNew - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum BetaGroups: Hashable, Codable, RawRepresentable { - case app - case betaTesters - case builds - case createdDate - case feedbackEnabled - case hasAccessToAllBuilds - case iosBuildsAvailableForAppleSiliconMac - case isInternalGroup - case name - case publicLink - case publicLinkEnabled - case publicLinkId - case publicLinkLimit - case publicLinkLimitEnabled - case unknown(String) - - public var rawValue: String { - switch self { - case .app: return "app" - case .betaTesters: return "betaTesters" - case .builds: return "builds" - case .createdDate: return "createdDate" - case .feedbackEnabled: return "feedbackEnabled" - case .hasAccessToAllBuilds: return "hasAccessToAllBuilds" - case .iosBuildsAvailableForAppleSiliconMac: return "iosBuildsAvailableForAppleSiliconMac" - case .isInternalGroup: return "isInternalGroup" - case .name: return "name" - case .publicLink: return "publicLink" - case .publicLinkEnabled: return "publicLinkEnabled" - case .publicLinkId: return "publicLinkId" - case .publicLinkLimit: return "publicLinkLimit" - case .publicLinkLimitEnabled: return "publicLinkLimitEnabled" - case .unknown(let rawValue): return rawValue - } + public struct BetaGroups: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var app: Self { + .init(rawValue: "app") + } + + public static var betaRecruitmentCriteria: Self { + .init(rawValue: "betaRecruitmentCriteria") } + public static var betaRecruitmentCriterionCompatibleBuildCheck: Self { + .init(rawValue: "betaRecruitmentCriterionCompatibleBuildCheck") + } + + public static var betaTesters: Self { + .init(rawValue: "betaTesters") + } + + public static var builds: Self { + .init(rawValue: "builds") + } + + public static var createdDate: Self { + .init(rawValue: "createdDate") + } + + public static var feedbackEnabled: Self { + .init(rawValue: "feedbackEnabled") + } + + public static var hasAccessToAllBuilds: Self { + .init(rawValue: "hasAccessToAllBuilds") + } + + public static var iosBuildsAvailableForAppleSiliconMac: Self { + .init(rawValue: "iosBuildsAvailableForAppleSiliconMac") + } + + public static var iosBuildsAvailableForAppleVision: Self { + .init(rawValue: "iosBuildsAvailableForAppleVision") + } + + public static var isInternalGroup: Self { + .init(rawValue: "isInternalGroup") + } + + public static var name: Self { + .init(rawValue: "name") + } + + public static var publicLink: Self { + .init(rawValue: "publicLink") + } + + public static var publicLinkEnabled: Self { + .init(rawValue: "publicLinkEnabled") + } + + public static var publicLinkId: Self { + .init(rawValue: "publicLinkId") + } + + public static var publicLinkLimit: Self { + .init(rawValue: "publicLinkLimit") + } + + public static var publicLinkLimitEnabled: Self { + .init(rawValue: "publicLinkLimitEnabled") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "app": self = .app - case "betaTesters": self = .betaTesters - case "builds": self = .builds - case "createdDate": self = .createdDate - case "feedbackEnabled": self = .feedbackEnabled - case "hasAccessToAllBuilds": self = .hasAccessToAllBuilds - case "iosBuildsAvailableForAppleSiliconMac": self = .iosBuildsAvailableForAppleSiliconMac - case "isInternalGroup": self = .isInternalGroup - case "name": self = .name - case "publicLink": self = .publicLink - case "publicLinkEnabled": self = .publicLinkEnabled - case "publicLinkId": self = .publicLinkId - case "publicLinkLimit": self = .publicLinkLimit - case "publicLinkLimitEnabled": self = .publicLinkLimitEnabled - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum BetaTesters: Hashable, Codable, RawRepresentable { - case apps - case betaGroups - case builds - case email - case firstName - case inviteType - case lastName - case unknown(String) - - public var rawValue: String { - switch self { - case .apps: return "apps" - case .betaGroups: return "betaGroups" - case .builds: return "builds" - case .email: return "email" - case .firstName: return "firstName" - case .inviteType: return "inviteType" - case .lastName: return "lastName" - case .unknown(let rawValue): return rawValue - } + public struct BetaTesters: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var apps: Self { + .init(rawValue: "apps") + } + + public static var betaGroups: Self { + .init(rawValue: "betaGroups") + } + + public static var builds: Self { + .init(rawValue: "builds") + } + + public static var email: Self { + .init(rawValue: "email") + } + + public static var firstName: Self { + .init(rawValue: "firstName") + } + + public static var inviteType: Self { + .init(rawValue: "inviteType") } + public static var lastName: Self { + .init(rawValue: "lastName") + } + + public static var state: Self { + .init(rawValue: "state") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "apps": self = .apps - case "betaGroups": self = .betaGroups - case "builds": self = .builds - case "email": self = .email - case "firstName": self = .firstName - case "inviteType": self = .inviteType - case "lastName": self = .lastName - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum BuildBetaDetails: Hashable, Codable, RawRepresentable { - case autoNotifyEnabled - case build - case externalBuildState - case internalBuildState - case unknown(String) + public struct BuildBetaDetails: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var autoNotifyEnabled: Self { + .init(rawValue: "autoNotifyEnabled") + } - public var rawValue: String { - switch self { - case .autoNotifyEnabled: return "autoNotifyEnabled" - case .build: return "build" - case .externalBuildState: return "externalBuildState" - case .internalBuildState: return "internalBuildState" - case .unknown(let rawValue): return rawValue - } + public static var build: Self { + .init(rawValue: "build") } + public static var externalBuildState: Self { + .init(rawValue: "externalBuildState") + } + + public static var internalBuildState: Self { + .init(rawValue: "internalBuildState") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "autoNotifyEnabled": self = .autoNotifyEnabled - case "build": self = .build - case "externalBuildState": self = .externalBuildState - case "internalBuildState": self = .internalBuildState - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum BuildBundles: Hashable, Codable, RawRepresentable { - case appClipDomainCacheStatus - case appClipDomainDebugStatus - case betaAppClipInvocations - case buildBundleFileSizes - case bundleId - case bundleType - case dSYMUrl - case deviceProtocols - case entitlements - case fileName - case hasOnDemandResources - case hasPrerenderedIcon - case hasSirikit - case includesSymbols - case isIosBuildMacAppStoreCompatible - case locales - case platformBuild - case requiredCapabilities - case sdkBuild - case supportedArchitectures - case usesLocationServices - case unknown(String) - - public var rawValue: String { - switch self { - case .appClipDomainCacheStatus: return "appClipDomainCacheStatus" - case .appClipDomainDebugStatus: return "appClipDomainDebugStatus" - case .betaAppClipInvocations: return "betaAppClipInvocations" - case .buildBundleFileSizes: return "buildBundleFileSizes" - case .bundleId: return "bundleId" - case .bundleType: return "bundleType" - case .dSYMUrl: return "dSYMUrl" - case .deviceProtocols: return "deviceProtocols" - case .entitlements: return "entitlements" - case .fileName: return "fileName" - case .hasOnDemandResources: return "hasOnDemandResources" - case .hasPrerenderedIcon: return "hasPrerenderedIcon" - case .hasSirikit: return "hasSirikit" - case .includesSymbols: return "includesSymbols" - case .isIosBuildMacAppStoreCompatible: return "isIosBuildMacAppStoreCompatible" - case .locales: return "locales" - case .platformBuild: return "platformBuild" - case .requiredCapabilities: return "requiredCapabilities" - case .sdkBuild: return "sdkBuild" - case .supportedArchitectures: return "supportedArchitectures" - case .usesLocationServices: return "usesLocationServices" - case .unknown(let rawValue): return rawValue - } + public struct BuildBundles: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var appClipDomainCacheStatus: Self { + .init(rawValue: "appClipDomainCacheStatus") + } + + public static var appClipDomainDebugStatus: Self { + .init(rawValue: "appClipDomainDebugStatus") + } + + public static var baDownloadAllowance: Self { + .init(rawValue: "baDownloadAllowance") + } + + public static var baMaxInstallSize: Self { + .init(rawValue: "baMaxInstallSize") + } + + public static var betaAppClipInvocations: Self { + .init(rawValue: "betaAppClipInvocations") + } + + public static var buildBundleFileSizes: Self { + .init(rawValue: "buildBundleFileSizes") + } + + public static var bundleId: Self { + .init(rawValue: "bundleId") + } + + public static var bundleType: Self { + .init(rawValue: "bundleType") + } + + public static var dSYMUrl: Self { + .init(rawValue: "dSYMUrl") + } + + public static var deviceProtocols: Self { + .init(rawValue: "deviceProtocols") + } + + public static var entitlements: Self { + .init(rawValue: "entitlements") + } + + public static var fileName: Self { + .init(rawValue: "fileName") + } + + public static var hasOnDemandResources: Self { + .init(rawValue: "hasOnDemandResources") + } + + public static var hasPrerenderedIcon: Self { + .init(rawValue: "hasPrerenderedIcon") + } + + public static var hasSirikit: Self { + .init(rawValue: "hasSirikit") + } + + public static var includesSymbols: Self { + .init(rawValue: "includesSymbols") + } + + public static var isIosBuildMacAppStoreCompatible: Self { + .init(rawValue: "isIosBuildMacAppStoreCompatible") + } + + public static var locales: Self { + .init(rawValue: "locales") + } + + public static var platformBuild: Self { + .init(rawValue: "platformBuild") } + public static var requiredCapabilities: Self { + .init(rawValue: "requiredCapabilities") + } + + public static var sdkBuild: Self { + .init(rawValue: "sdkBuild") + } + + public static var supportedArchitectures: Self { + .init(rawValue: "supportedArchitectures") + } + + public static var usesLocationServices: Self { + .init(rawValue: "usesLocationServices") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "appClipDomainCacheStatus": self = .appClipDomainCacheStatus - case "appClipDomainDebugStatus": self = .appClipDomainDebugStatus - case "betaAppClipInvocations": self = .betaAppClipInvocations - case "buildBundleFileSizes": self = .buildBundleFileSizes - case "bundleId": self = .bundleId - case "bundleType": self = .bundleType - case "dSYMUrl": self = .dSYMUrl - case "deviceProtocols": self = .deviceProtocols - case "entitlements": self = .entitlements - case "fileName": self = .fileName - case "hasOnDemandResources": self = .hasOnDemandResources - case "hasPrerenderedIcon": self = .hasPrerenderedIcon - case "hasSirikit": self = .hasSirikit - case "includesSymbols": self = .includesSymbols - case "isIosBuildMacAppStoreCompatible": self = .isIosBuildMacAppStoreCompatible - case "locales": self = .locales - case "platformBuild": self = .platformBuild - case "requiredCapabilities": self = .requiredCapabilities - case "sdkBuild": self = .sdkBuild - case "supportedArchitectures": self = .supportedArchitectures - case "usesLocationServices": self = .usesLocationServices - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum BuildIcons: Hashable, Codable, RawRepresentable { - case iconAsset - case iconType - case name - case unknown(String) + public struct BuildIcons: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var iconAsset: Self { + .init(rawValue: "iconAsset") + } - public var rawValue: String { - switch self { - case .iconAsset: return "iconAsset" - case .iconType: return "iconType" - case .name: return "name" - case .unknown(let rawValue): return rawValue - } + public static var iconType: Self { + .init(rawValue: "iconType") } + public static var name: Self { + .init(rawValue: "name") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "iconAsset": self = .iconAsset - case "iconType": self = .iconType - case "name": self = .name - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum Builds: Hashable, Codable, RawRepresentable { - case app - case appEncryptionDeclaration - case appStoreVersion - case betaAppReviewSubmission - case betaBuildLocalizations - case betaGroups - case buildAudienceType - case buildBetaDetail - case buildBundles - case computedMinMacOsVersion - case diagnosticSignatures - case expirationDate - case expired - case iconAssetToken - case icons - case individualTesters - case lsMinimumSystemVersion - case minOsVersion - case perfPowerMetrics - case preReleaseVersion - case processingState - case uploadedDate - case usesNonExemptEncryption - case version - case unknown(String) - - public var rawValue: String { - switch self { - case .app: return "app" - case .appEncryptionDeclaration: return "appEncryptionDeclaration" - case .appStoreVersion: return "appStoreVersion" - case .betaAppReviewSubmission: return "betaAppReviewSubmission" - case .betaBuildLocalizations: return "betaBuildLocalizations" - case .betaGroups: return "betaGroups" - case .buildAudienceType: return "buildAudienceType" - case .buildBetaDetail: return "buildBetaDetail" - case .buildBundles: return "buildBundles" - case .computedMinMacOsVersion: return "computedMinMacOsVersion" - case .diagnosticSignatures: return "diagnosticSignatures" - case .expirationDate: return "expirationDate" - case .expired: return "expired" - case .iconAssetToken: return "iconAssetToken" - case .icons: return "icons" - case .individualTesters: return "individualTesters" - case .lsMinimumSystemVersion: return "lsMinimumSystemVersion" - case .minOsVersion: return "minOsVersion" - case .perfPowerMetrics: return "perfPowerMetrics" - case .preReleaseVersion: return "preReleaseVersion" - case .processingState: return "processingState" - case .uploadedDate: return "uploadedDate" - case .usesNonExemptEncryption: return "usesNonExemptEncryption" - case .version: return "version" - case .unknown(let rawValue): return rawValue - } + public struct Builds: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var app: Self { + .init(rawValue: "app") + } + + public static var appEncryptionDeclaration: Self { + .init(rawValue: "appEncryptionDeclaration") + } + + public static var appStoreVersion: Self { + .init(rawValue: "appStoreVersion") + } + + public static var betaAppReviewSubmission: Self { + .init(rawValue: "betaAppReviewSubmission") + } + + public static var betaBuildLocalizations: Self { + .init(rawValue: "betaBuildLocalizations") + } + + public static var betaGroups: Self { + .init(rawValue: "betaGroups") + } + + public static var buildAudienceType: Self { + .init(rawValue: "buildAudienceType") } + public static var buildBetaDetail: Self { + .init(rawValue: "buildBetaDetail") + } + + public static var buildBundles: Self { + .init(rawValue: "buildBundles") + } + + public static var computedMinMacOsVersion: Self { + .init(rawValue: "computedMinMacOsVersion") + } + + public static var computedMinVisionOsVersion: Self { + .init(rawValue: "computedMinVisionOsVersion") + } + + public static var diagnosticSignatures: Self { + .init(rawValue: "diagnosticSignatures") + } + + public static var expirationDate: Self { + .init(rawValue: "expirationDate") + } + + public static var expired: Self { + .init(rawValue: "expired") + } + + public static var iconAssetToken: Self { + .init(rawValue: "iconAssetToken") + } + + public static var icons: Self { + .init(rawValue: "icons") + } + + public static var individualTesters: Self { + .init(rawValue: "individualTesters") + } + + public static var lsMinimumSystemVersion: Self { + .init(rawValue: "lsMinimumSystemVersion") + } + + public static var minOsVersion: Self { + .init(rawValue: "minOsVersion") + } + + public static var perfPowerMetrics: Self { + .init(rawValue: "perfPowerMetrics") + } + + public static var preReleaseVersion: Self { + .init(rawValue: "preReleaseVersion") + } + + public static var processingState: Self { + .init(rawValue: "processingState") + } + + public static var uploadedDate: Self { + .init(rawValue: "uploadedDate") + } + + public static var usesNonExemptEncryption: Self { + .init(rawValue: "usesNonExemptEncryption") + } + + public static var version: Self { + .init(rawValue: "version") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "app": self = .app - case "appEncryptionDeclaration": self = .appEncryptionDeclaration - case "appStoreVersion": self = .appStoreVersion - case "betaAppReviewSubmission": self = .betaAppReviewSubmission - case "betaBuildLocalizations": self = .betaBuildLocalizations - case "betaGroups": self = .betaGroups - case "buildAudienceType": self = .buildAudienceType - case "buildBetaDetail": self = .buildBetaDetail - case "buildBundles": self = .buildBundles - case "computedMinMacOsVersion": self = .computedMinMacOsVersion - case "diagnosticSignatures": self = .diagnosticSignatures - case "expirationDate": self = .expirationDate - case "expired": self = .expired - case "iconAssetToken": self = .iconAssetToken - case "icons": self = .icons - case "individualTesters": self = .individualTesters - case "lsMinimumSystemVersion": self = .lsMinimumSystemVersion - case "minOsVersion": self = .minOsVersion - case "perfPowerMetrics": self = .perfPowerMetrics - case "preReleaseVersion": self = .preReleaseVersion - case "processingState": self = .processingState - case "uploadedDate": self = .uploadedDate - case "usesNonExemptEncryption": self = .usesNonExemptEncryption - case "version": self = .version - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum PreReleaseVersions: Hashable, Codable, RawRepresentable { - case app - case builds - case platform - case version - case unknown(String) + public struct PreReleaseVersions: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var app: Self { + .init(rawValue: "app") + } + + public static var builds: Self { + .init(rawValue: "builds") + } + + public static var platform: Self { + .init(rawValue: "platform") + } - public var rawValue: String { - switch self { - case .app: return "app" - case .builds: return "builds" - case .platform: return "platform" - case .version: return "version" - case .unknown(let rawValue): return rawValue - } + public static var version: Self { + .init(rawValue: "version") } + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "app": self = .app - case "builds": self = .builds - case "platform": self = .platform - case "version": self = .version - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } @@ -918,106 +1140,107 @@ extension V1.CiBuildRuns.ById.Builds.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum BetaAppReviewSubmissionBetaReviewState: Hashable, Codable, RawRepresentable { - case approved - case inReview - case rejected - case waitingForReview - case unknown(String) + public struct BetaAppReviewSubmissionBetaReviewState: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var approved: Self { + .init(rawValue: "APPROVED") + } + + public static var inReview: Self { + .init(rawValue: "IN_REVIEW") + } + + public static var rejected: Self { + .init(rawValue: "REJECTED") + } + + public static var waitingForReview: Self { + .init(rawValue: "WAITING_FOR_REVIEW") + } - public var rawValue: String { - switch self { - case .approved: return "APPROVED" - case .inReview: return "IN_REVIEW" - case .rejected: return "REJECTED" - case .waitingForReview: return "WAITING_FOR_REVIEW" - case .unknown(let rawValue): return rawValue - } + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "APPROVED": self = .approved - case "IN_REVIEW": self = .inReview - case "REJECTED": self = .rejected - case "WAITING_FOR_REVIEW": self = .waitingForReview - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum BuildAudienceType: Hashable, Codable, RawRepresentable { - case appStoreEligible - case internalOnly - case unknown(String) + public struct BuildAudienceType: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var appStoreEligible: Self { + .init(rawValue: "APP_STORE_ELIGIBLE") + } + + public static var internalOnly: Self { + .init(rawValue: "INTERNAL_ONLY") + } - public var rawValue: String { - switch self { - case .appStoreEligible: return "APP_STORE_ELIGIBLE" - case .internalOnly: return "INTERNAL_ONLY" - case .unknown(let rawValue): return rawValue - } + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "APP_STORE_ELIGIBLE": self = .appStoreEligible - case "INTERNAL_ONLY": self = .internalOnly - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum PreReleaseVersionPlatform: Hashable, Codable, RawRepresentable { - case iOS - case macOS - case tvOS - case unknown(String) + public struct PreReleaseVersionPlatform: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var iOS: Self { + .init(rawValue: "IOS") + } + + public static var macOS: Self { + .init(rawValue: "MAC_OS") + } + + public static var tvOS: Self { + .init(rawValue: "TV_OS") + } + + public static var visionOS: Self { + .init(rawValue: "VISION_OS") + } - public var rawValue: String { - switch self { - case .iOS: return "IOS" - case .macOS: return "MAC_OS" - case .tvOS: return "TV_OS" - case .unknown(let rawValue): return rawValue - } + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "IOS": self = .iOS - case "MAC_OS": self = .macOS - case "TV_OS": self = .tvOS - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum ProcessingState: Hashable, Codable, RawRepresentable { - case failed - case invalid - case processing - case valid - case unknown(String) + public struct ProcessingState: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var failed: Self { + .init(rawValue: "FAILED") + } + + public static var invalid: Self { + .init(rawValue: "INVALID") + } - public var rawValue: String { - switch self { - case .failed: return "FAILED" - case .invalid: return "INVALID" - case .processing: return "PROCESSING" - case .valid: return "VALID" - case .unknown(let rawValue): return rawValue - } + public static var processing: Self { + .init(rawValue: "PROCESSING") } + public static var valid: Self { + .init(rawValue: "VALID") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "FAILED": self = .failed - case "INVALID": self = .invalid - case "PROCESSING": self = .processing - case "VALID": self = .valid - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } @@ -1095,52 +1318,59 @@ extension V1.CiBuildRuns.ById.Builds.GET { } } - public enum Include: Hashable, Codable, RawRepresentable { - case app - case appEncryptionDeclaration - case appStoreVersion - case betaAppReviewSubmission - case betaBuildLocalizations - case betaGroups - case buildBetaDetail - case buildBundles - case icons - case individualTesters - case preReleaseVersion - case unknown(String) - - public var rawValue: String { - switch self { - case .app: return "app" - case .appEncryptionDeclaration: return "appEncryptionDeclaration" - case .appStoreVersion: return "appStoreVersion" - case .betaAppReviewSubmission: return "betaAppReviewSubmission" - case .betaBuildLocalizations: return "betaBuildLocalizations" - case .betaGroups: return "betaGroups" - case .buildBetaDetail: return "buildBetaDetail" - case .buildBundles: return "buildBundles" - case .icons: return "icons" - case .individualTesters: return "individualTesters" - case .preReleaseVersion: return "preReleaseVersion" - case .unknown(let rawValue): return rawValue - } + public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var app: Self { + .init(rawValue: "app") + } + + public static var appEncryptionDeclaration: Self { + .init(rawValue: "appEncryptionDeclaration") + } + + public static var appStoreVersion: Self { + .init(rawValue: "appStoreVersion") } + public static var betaAppReviewSubmission: Self { + .init(rawValue: "betaAppReviewSubmission") + } + + public static var betaBuildLocalizations: Self { + .init(rawValue: "betaBuildLocalizations") + } + + public static var betaGroups: Self { + .init(rawValue: "betaGroups") + } + + public static var buildBetaDetail: Self { + .init(rawValue: "buildBetaDetail") + } + + public static var buildBundles: Self { + .init(rawValue: "buildBundles") + } + + public static var icons: Self { + .init(rawValue: "icons") + } + + public static var individualTesters: Self { + .init(rawValue: "individualTesters") + } + + public static var preReleaseVersion: Self { + .init(rawValue: "preReleaseVersion") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "app": self = .app - case "appEncryptionDeclaration": self = .appEncryptionDeclaration - case "appStoreVersion": self = .appStoreVersion - case "betaAppReviewSubmission": self = .betaAppReviewSubmission - case "betaBuildLocalizations": self = .betaBuildLocalizations - case "betaGroups": self = .betaGroups - case "buildBetaDetail": self = .buildBetaDetail - case "buildBundles": self = .buildBundles - case "icons": self = .icons - case "individualTesters": self = .individualTesters - case "preReleaseVersion": self = .preReleaseVersion - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } @@ -1191,37 +1421,39 @@ extension V1.CiBuildRuns.ById.Builds.GET { } } - public enum Sort: Hashable, Codable, RawRepresentable { - case preReleaseVersion - case preReleaseVersionDesc - case uploadedDate - case uploadedDateDesc - case version - case versionDesc - case unknown(String) - - public var rawValue: String { - switch self { - case .preReleaseVersion: return "preReleaseVersion" - case .preReleaseVersionDesc: return "-preReleaseVersion" - case .uploadedDate: return "uploadedDate" - case .uploadedDateDesc: return "-uploadedDate" - case .version: return "version" - case .versionDesc: return "-version" - case .unknown(let rawValue): return rawValue - } + public struct Sort: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var preReleaseVersion: Self { + .init(rawValue: "preReleaseVersion") } + public static var preReleaseVersionDesc: Self { + .init(rawValue: "-preReleaseVersion") + } + + public static var uploadedDate: Self { + .init(rawValue: "uploadedDate") + } + + public static var uploadedDateDesc: Self { + .init(rawValue: "-uploadedDate") + } + + public static var version: Self { + .init(rawValue: "version") + } + + public static var versionDesc: Self { + .init(rawValue: "-version") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "preReleaseVersion": self = .preReleaseVersion - case "-preReleaseVersion": self = .preReleaseVersionDesc - case "uploadedDate": self = .uploadedDate - case "-uploadedDate": self = .uploadedDateDesc - case "version": self = .version - case "-version": self = .versionDesc - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/CiBuildRuns/ById/CiBuildRunsById.GET.223226a.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/CiBuildRuns/ById/CiBuildRunsById.GET.223226a.generated.swift index 74e2976b..317fd9f9 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/CiBuildRuns/ById/CiBuildRunsById.GET.223226a.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/CiBuildRuns/ById/CiBuildRunsById.GET.223226a.generated.swift @@ -30,8 +30,6 @@ extension V1.CiBuildRuns.ById { components?.queryItems = [ URLQueryItem(name: "fields[builds]", value: parameters.fields[.builds]?.map { "\($0)" }.joined(separator: ",")), - URLQueryItem(name: "fields[ciBuildActions]", - value: parameters.fields[.ciBuildActions]?.map { "\($0)" }.joined(separator: ",")), URLQueryItem(name: "fields[ciBuildRuns]", value: parameters.fields[.ciBuildRuns]?.map { "\($0)" }.joined(separator: ",")), URLQueryItem(name: "include", @@ -50,8 +48,10 @@ extension V1.CiBuildRuns.ById { /// - Returns: **200**, Single CiBuildRun as `CiBuildRunResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -65,12 +65,18 @@ extension V1.CiBuildRuns.ById { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 404: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -95,222 +101,203 @@ extension V1.CiBuildRuns.ById.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum Builds: Hashable, Codable, RawRepresentable { - case app - case appEncryptionDeclaration - case appStoreVersion - case betaAppReviewSubmission - case betaBuildLocalizations - case betaGroups - case buildAudienceType - case buildBetaDetail - case buildBundles - case computedMinMacOsVersion - case diagnosticSignatures - case expirationDate - case expired - case iconAssetToken - case icons - case individualTesters - case lsMinimumSystemVersion - case minOsVersion - case perfPowerMetrics - case preReleaseVersion - case processingState - case uploadedDate - case usesNonExemptEncryption - case version - case unknown(String) - - public var rawValue: String { - switch self { - case .app: return "app" - case .appEncryptionDeclaration: return "appEncryptionDeclaration" - case .appStoreVersion: return "appStoreVersion" - case .betaAppReviewSubmission: return "betaAppReviewSubmission" - case .betaBuildLocalizations: return "betaBuildLocalizations" - case .betaGroups: return "betaGroups" - case .buildAudienceType: return "buildAudienceType" - case .buildBetaDetail: return "buildBetaDetail" - case .buildBundles: return "buildBundles" - case .computedMinMacOsVersion: return "computedMinMacOsVersion" - case .diagnosticSignatures: return "diagnosticSignatures" - case .expirationDate: return "expirationDate" - case .expired: return "expired" - case .iconAssetToken: return "iconAssetToken" - case .icons: return "icons" - case .individualTesters: return "individualTesters" - case .lsMinimumSystemVersion: return "lsMinimumSystemVersion" - case .minOsVersion: return "minOsVersion" - case .perfPowerMetrics: return "perfPowerMetrics" - case .preReleaseVersion: return "preReleaseVersion" - case .processingState: return "processingState" - case .uploadedDate: return "uploadedDate" - case .usesNonExemptEncryption: return "usesNonExemptEncryption" - case .version: return "version" - case .unknown(let rawValue): return rawValue - } + public struct Builds: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var app: Self { + .init(rawValue: "app") } - public init(rawValue: String) { - switch rawValue { - case "app": self = .app - case "appEncryptionDeclaration": self = .appEncryptionDeclaration - case "appStoreVersion": self = .appStoreVersion - case "betaAppReviewSubmission": self = .betaAppReviewSubmission - case "betaBuildLocalizations": self = .betaBuildLocalizations - case "betaGroups": self = .betaGroups - case "buildAudienceType": self = .buildAudienceType - case "buildBetaDetail": self = .buildBetaDetail - case "buildBundles": self = .buildBundles - case "computedMinMacOsVersion": self = .computedMinMacOsVersion - case "diagnosticSignatures": self = .diagnosticSignatures - case "expirationDate": self = .expirationDate - case "expired": self = .expired - case "iconAssetToken": self = .iconAssetToken - case "icons": self = .icons - case "individualTesters": self = .individualTesters - case "lsMinimumSystemVersion": self = .lsMinimumSystemVersion - case "minOsVersion": self = .minOsVersion - case "perfPowerMetrics": self = .perfPowerMetrics - case "preReleaseVersion": self = .preReleaseVersion - case "processingState": self = .processingState - case "uploadedDate": self = .uploadedDate - case "usesNonExemptEncryption": self = .usesNonExemptEncryption - case "version": self = .version - default: self = .unknown(rawValue) - } + public static var appEncryptionDeclaration: Self { + .init(rawValue: "appEncryptionDeclaration") + } + + public static var appStoreVersion: Self { + .init(rawValue: "appStoreVersion") + } + + public static var betaAppReviewSubmission: Self { + .init(rawValue: "betaAppReviewSubmission") + } + + public static var betaBuildLocalizations: Self { + .init(rawValue: "betaBuildLocalizations") + } + + public static var betaGroups: Self { + .init(rawValue: "betaGroups") + } + + public static var buildAudienceType: Self { + .init(rawValue: "buildAudienceType") + } + + public static var buildBetaDetail: Self { + .init(rawValue: "buildBetaDetail") + } + + public static var buildBundles: Self { + .init(rawValue: "buildBundles") + } + + public static var computedMinMacOsVersion: Self { + .init(rawValue: "computedMinMacOsVersion") + } + + public static var computedMinVisionOsVersion: Self { + .init(rawValue: "computedMinVisionOsVersion") + } + + public static var diagnosticSignatures: Self { + .init(rawValue: "diagnosticSignatures") + } + + public static var expirationDate: Self { + .init(rawValue: "expirationDate") } - } - public enum CiBuildActions: Hashable, Codable, RawRepresentable { - case actionType - case artifacts - case buildRun - case completionStatus - case executionProgress - case finishedDate - case isRequiredToPass - case issueCounts - case issues - case name - case startedDate - case testResults - case unknown(String) - - public var rawValue: String { - switch self { - case .actionType: return "actionType" - case .artifacts: return "artifacts" - case .buildRun: return "buildRun" - case .completionStatus: return "completionStatus" - case .executionProgress: return "executionProgress" - case .finishedDate: return "finishedDate" - case .isRequiredToPass: return "isRequiredToPass" - case .issueCounts: return "issueCounts" - case .issues: return "issues" - case .name: return "name" - case .startedDate: return "startedDate" - case .testResults: return "testResults" - case .unknown(let rawValue): return rawValue - } + public static var expired: Self { + .init(rawValue: "expired") } + public static var iconAssetToken: Self { + .init(rawValue: "iconAssetToken") + } + + public static var icons: Self { + .init(rawValue: "icons") + } + + public static var individualTesters: Self { + .init(rawValue: "individualTesters") + } + + public static var lsMinimumSystemVersion: Self { + .init(rawValue: "lsMinimumSystemVersion") + } + + public static var minOsVersion: Self { + .init(rawValue: "minOsVersion") + } + + public static var perfPowerMetrics: Self { + .init(rawValue: "perfPowerMetrics") + } + + public static var preReleaseVersion: Self { + .init(rawValue: "preReleaseVersion") + } + + public static var processingState: Self { + .init(rawValue: "processingState") + } + + public static var uploadedDate: Self { + .init(rawValue: "uploadedDate") + } + + public static var usesNonExemptEncryption: Self { + .init(rawValue: "usesNonExemptEncryption") + } + + public static var version: Self { + .init(rawValue: "version") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "actionType": self = .actionType - case "artifacts": self = .artifacts - case "buildRun": self = .buildRun - case "completionStatus": self = .completionStatus - case "executionProgress": self = .executionProgress - case "finishedDate": self = .finishedDate - case "isRequiredToPass": self = .isRequiredToPass - case "issueCounts": self = .issueCounts - case "issues": self = .issues - case "name": self = .name - case "startedDate": self = .startedDate - case "testResults": self = .testResults - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum CiBuildRuns: Hashable, Codable, RawRepresentable { - case actions - case buildRun - case builds - case cancelReason - case clean - case completionStatus - case createdDate - case destinationBranch - case destinationCommit - case executionProgress - case finishedDate - case isPullRequestBuild - case issueCounts - case number - case product - case pullRequest - case sourceBranchOrTag - case sourceCommit - case startReason - case startedDate - case workflow - case unknown(String) - - public var rawValue: String { - switch self { - case .actions: return "actions" - case .buildRun: return "buildRun" - case .builds: return "builds" - case .cancelReason: return "cancelReason" - case .clean: return "clean" - case .completionStatus: return "completionStatus" - case .createdDate: return "createdDate" - case .destinationBranch: return "destinationBranch" - case .destinationCommit: return "destinationCommit" - case .executionProgress: return "executionProgress" - case .finishedDate: return "finishedDate" - case .isPullRequestBuild: return "isPullRequestBuild" - case .issueCounts: return "issueCounts" - case .number: return "number" - case .product: return "product" - case .pullRequest: return "pullRequest" - case .sourceBranchOrTag: return "sourceBranchOrTag" - case .sourceCommit: return "sourceCommit" - case .startReason: return "startReason" - case .startedDate: return "startedDate" - case .workflow: return "workflow" - case .unknown(let rawValue): return rawValue - } + public struct CiBuildRuns: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var actions: Self { + .init(rawValue: "actions") + } + + public static var builds: Self { + .init(rawValue: "builds") } + public static var cancelReason: Self { + .init(rawValue: "cancelReason") + } + + public static var completionStatus: Self { + .init(rawValue: "completionStatus") + } + + public static var createdDate: Self { + .init(rawValue: "createdDate") + } + + public static var destinationBranch: Self { + .init(rawValue: "destinationBranch") + } + + public static var destinationCommit: Self { + .init(rawValue: "destinationCommit") + } + + public static var executionProgress: Self { + .init(rawValue: "executionProgress") + } + + public static var finishedDate: Self { + .init(rawValue: "finishedDate") + } + + public static var isPullRequestBuild: Self { + .init(rawValue: "isPullRequestBuild") + } + + public static var issueCounts: Self { + .init(rawValue: "issueCounts") + } + + public static var number: Self { + .init(rawValue: "number") + } + + public static var product: Self { + .init(rawValue: "product") + } + + public static var pullRequest: Self { + .init(rawValue: "pullRequest") + } + + public static var sourceBranchOrTag: Self { + .init(rawValue: "sourceBranchOrTag") + } + + public static var sourceCommit: Self { + .init(rawValue: "sourceCommit") + } + + public static var startReason: Self { + .init(rawValue: "startReason") + } + + public static var startedDate: Self { + .init(rawValue: "startedDate") + } + + public static var workflow: Self { + .init(rawValue: "workflow") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "actions": self = .actions - case "buildRun": self = .buildRun - case "builds": self = .builds - case "cancelReason": self = .cancelReason - case "clean": self = .clean - case "completionStatus": self = .completionStatus - case "createdDate": self = .createdDate - case "destinationBranch": self = .destinationBranch - case "destinationCommit": self = .destinationCommit - case "executionProgress": self = .executionProgress - case "finishedDate": self = .finishedDate - case "isPullRequestBuild": self = .isPullRequestBuild - case "issueCounts": self = .issueCounts - case "number": self = .number - case "product": self = .product - case "pullRequest": self = .pullRequest - case "sourceBranchOrTag": self = .sourceBranchOrTag - case "sourceCommit": self = .sourceCommit - case "startReason": self = .startReason - case "startedDate": self = .startedDate - case "workflow": self = .workflow - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } @@ -320,11 +307,6 @@ extension V1.CiBuildRuns.ById.GET { .init(key: "fields[builds]") } - /// the fields to include for returned resources of type ciBuildActions - public static var ciBuildActions: Relation<[CiBuildActions]?> { - .init(key: "fields[ciBuildActions]") - } - /// the fields to include for returned resources of type ciBuildRuns public static var ciBuildRuns: Relation<[CiBuildRuns]?> { .init(key: "fields[ciBuildRuns]") @@ -338,37 +320,39 @@ extension V1.CiBuildRuns.ById.GET { } } - public enum Include: Hashable, Codable, RawRepresentable { - case builds - case destinationBranch - case product - case pullRequest - case sourceBranchOrTag - case workflow - case unknown(String) - - public var rawValue: String { - switch self { - case .builds: return "builds" - case .destinationBranch: return "destinationBranch" - case .product: return "product" - case .pullRequest: return "pullRequest" - case .sourceBranchOrTag: return "sourceBranchOrTag" - case .workflow: return "workflow" - case .unknown(let rawValue): return rawValue - } + public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var builds: Self { + .init(rawValue: "builds") } + public static var destinationBranch: Self { + .init(rawValue: "destinationBranch") + } + + public static var product: Self { + .init(rawValue: "product") + } + + public static var pullRequest: Self { + .init(rawValue: "pullRequest") + } + + public static var sourceBranchOrTag: Self { + .init(rawValue: "sourceBranchOrTag") + } + + public static var workflow: Self { + .init(rawValue: "workflow") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "builds": self = .builds - case "destinationBranch": self = .destinationBranch - case "product": self = .product - case "pullRequest": self = .pullRequest - case "sourceBranchOrTag": self = .sourceBranchOrTag - case "workflow": self = .workflow - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/CiBuildRuns/ById/Relationships/Actions/CiBuildRunsByIdRelationshipsActions.GET.abff178.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/CiBuildRuns/ById/Relationships/Actions/CiBuildRunsByIdRelationshipsActions.GET.abff178.generated.swift new file mode 100644 index 00000000..772e05d9 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/CiBuildRuns/ById/Relationships/Actions/CiBuildRunsByIdRelationshipsActions.GET.abff178.generated.swift @@ -0,0 +1,88 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.CiBuildRuns.ById.Relationships.Actions { + public struct GET: Endpoint { + public typealias Response = CiBuildRunActionsLinkagesResponse + + public var path: String { + "/v1/ciBuildRuns/\(id)/relationships/actions" + } + + /// the id of the requested resource + public var id: String + + public var parameters: Parameters = Parameters() + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + components?.queryItems = [ + URLQueryItem(name: "limit", + value: parameters.limit.map { "\($0)" }) + ].filter { $0.value != nil } + if components?.queryItems?.isEmpty ?? false { + components?.queryItems = nil + } + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "GET" + return urlRequest + } + + /// - Returns: **200**, List of related linkages as `CiBuildRunActionsLinkagesResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(CiBuildRunActionsLinkagesResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +extension V1.CiBuildRuns.ById.Relationships.Actions.GET { + public struct Parameters: Hashable { + /// maximum resources per page + public var limit: Int? + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/CiBuildRuns/ById/Relationships/Builds/CiBuildRunsByIdRelationshipsBuilds.GET.9919e76.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/CiBuildRuns/ById/Relationships/Builds/CiBuildRunsByIdRelationshipsBuilds.GET.9919e76.generated.swift new file mode 100644 index 00000000..f09c27d4 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/CiBuildRuns/ById/Relationships/Builds/CiBuildRunsByIdRelationshipsBuilds.GET.9919e76.generated.swift @@ -0,0 +1,88 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.CiBuildRuns.ById.Relationships.Builds { + public struct GET: Endpoint { + public typealias Response = CiBuildRunBuildsLinkagesResponse + + public var path: String { + "/v1/ciBuildRuns/\(id)/relationships/builds" + } + + /// the id of the requested resource + public var id: String + + public var parameters: Parameters = Parameters() + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + components?.queryItems = [ + URLQueryItem(name: "limit", + value: parameters.limit.map { "\($0)" }) + ].filter { $0.value != nil } + if components?.queryItems?.isEmpty ?? false { + components?.queryItems = nil + } + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "GET" + return urlRequest + } + + /// - Returns: **200**, List of related linkages as `CiBuildRunBuildsLinkagesResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(CiBuildRunBuildsLinkagesResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +extension V1.CiBuildRuns.ById.Relationships.Builds.GET { + public struct Parameters: Hashable { + /// maximum resources per page + public var limit: Int? + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/CiBuildRuns/CiBuildRuns.POST.e7c5671.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/CiBuildRuns/CiBuildRuns.POST.e7c5671.generated.swift index 65925b4e..7981b426 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/CiBuildRuns/CiBuildRuns.POST.e7c5671.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/CiBuildRuns/CiBuildRuns.POST.e7c5671.generated.swift @@ -41,8 +41,11 @@ extension V1.CiBuildRuns { /// - Returns: **201**, Single CiBuildRun as `CiBuildRunResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **422**, Unprocessable request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -56,12 +59,21 @@ extension V1.CiBuildRuns { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 409: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 422: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/CiIssues/ById/CiIssuesById.GET.6cfdfb0.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/CiIssues/ById/CiIssuesById.GET.6cfdfb0.generated.swift index 9c96abf2..c849d325 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/CiIssues/ById/CiIssuesById.GET.6cfdfb0.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/CiIssues/ById/CiIssuesById.GET.6cfdfb0.generated.swift @@ -42,8 +42,10 @@ extension V1.CiIssues.ById { /// - Returns: **200**, Single CiIssue as `CiIssueResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -57,12 +59,18 @@ extension V1.CiIssues.ById { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 404: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -82,31 +90,31 @@ extension V1.CiIssues.ById.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum CiIssues: Hashable, Codable, RawRepresentable { - case category - case fileSource - case issueType - case message - case unknown(String) - - public var rawValue: String { - switch self { - case .category: return "category" - case .fileSource: return "fileSource" - case .issueType: return "issueType" - case .message: return "message" - case .unknown(let rawValue): return rawValue - } + public struct CiIssues: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var category: Self { + .init(rawValue: "category") } + public static var fileSource: Self { + .init(rawValue: "fileSource") + } + + public static var issueType: Self { + .init(rawValue: "issueType") + } + + public static var message: Self { + .init(rawValue: "message") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "category": self = .category - case "fileSource": self = .fileSource - case "issueType": self = .issueType - case "message": self = .message - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/CiMacOsVersions/ById/CiMacOsVersionsById.GET.f853409.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/CiMacOsVersions/ById/CiMacOsVersionsById.GET.f853409.generated.swift index ba79061e..374f3a6a 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/CiMacOsVersions/ById/CiMacOsVersionsById.GET.f853409.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/CiMacOsVersions/ById/CiMacOsVersionsById.GET.f853409.generated.swift @@ -48,8 +48,10 @@ extension V1.CiMacOsVersions.ById { /// - Returns: **200**, Single CiMacOsVersion as `CiMacOsVersionResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -63,12 +65,18 @@ extension V1.CiMacOsVersions.ById { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 404: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -93,56 +101,55 @@ extension V1.CiMacOsVersions.ById.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum CiMacOsVersions: Hashable, Codable, RawRepresentable { - case name - case version - case xcodeVersions - case unknown(String) + public struct CiMacOsVersions: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var name: Self { + .init(rawValue: "name") + } - public var rawValue: String { - switch self { - case .name: return "name" - case .version: return "version" - case .xcodeVersions: return "xcodeVersions" - case .unknown(let rawValue): return rawValue - } + public static var version: Self { + .init(rawValue: "version") } + public static var xcodeVersions: Self { + .init(rawValue: "xcodeVersions") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "name": self = .name - case "version": self = .version - case "xcodeVersions": self = .xcodeVersions - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum CiXcodeVersions: Hashable, Codable, RawRepresentable { - case macOsVersions - case name - case testDestinations - case version - case unknown(String) + public struct CiXcodeVersions: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var macOsVersions: Self { + .init(rawValue: "macOsVersions") + } + + public static var name: Self { + .init(rawValue: "name") + } + + public static var testDestinations: Self { + .init(rawValue: "testDestinations") + } + + public static var version: Self { + .init(rawValue: "version") + } - public var rawValue: String { - switch self { - case .macOsVersions: return "macOsVersions" - case .name: return "name" - case .testDestinations: return "testDestinations" - case .version: return "version" - case .unknown(let rawValue): return rawValue - } + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "macOsVersions": self = .macOsVersions - case "name": self = .name - case "testDestinations": self = .testDestinations - case "version": self = .version - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } @@ -165,22 +172,19 @@ extension V1.CiMacOsVersions.ById.GET { } } - public enum Include: Hashable, Codable, RawRepresentable { - case xcodeVersions - case unknown(String) + public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var xcodeVersions: Self { + .init(rawValue: "xcodeVersions") + } - public var rawValue: String { - switch self { - case .xcodeVersions: return "xcodeVersions" - case .unknown(let rawValue): return rawValue - } + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "xcodeVersions": self = .xcodeVersions - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/CiMacOsVersions/ById/Relationships/XcodeVersions/CiMacOsVersionsByIdRelationshipsXcodeVersions.GET.6ebd18b.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/CiMacOsVersions/ById/Relationships/XcodeVersions/CiMacOsVersionsByIdRelationshipsXcodeVersions.GET.6ebd18b.generated.swift new file mode 100644 index 00000000..d49fcb49 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/CiMacOsVersions/ById/Relationships/XcodeVersions/CiMacOsVersionsByIdRelationshipsXcodeVersions.GET.6ebd18b.generated.swift @@ -0,0 +1,88 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.CiMacOsVersions.ById.Relationships.XcodeVersions { + public struct GET: Endpoint { + public typealias Response = CiMacOsVersionXcodeVersionsLinkagesResponse + + public var path: String { + "/v1/ciMacOsVersions/\(id)/relationships/xcodeVersions" + } + + /// the id of the requested resource + public var id: String + + public var parameters: Parameters = Parameters() + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + components?.queryItems = [ + URLQueryItem(name: "limit", + value: parameters.limit.map { "\($0)" }) + ].filter { $0.value != nil } + if components?.queryItems?.isEmpty ?? false { + components?.queryItems = nil + } + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "GET" + return urlRequest + } + + /// - Returns: **200**, List of related linkages as `CiMacOsVersionXcodeVersionsLinkagesResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(CiMacOsVersionXcodeVersionsLinkagesResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +extension V1.CiMacOsVersions.ById.Relationships.XcodeVersions.GET { + public struct Parameters: Hashable { + /// maximum resources per page + public var limit: Int? + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/CiMacOsVersions/ById/XcodeVersions/CiMacOsVersionsByIdXcodeVersions.GET.ebe1db8.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/CiMacOsVersions/ById/XcodeVersions/CiMacOsVersionsByIdXcodeVersions.GET.ebe1db8.generated.swift index 2aef81ff..5e168e22 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/CiMacOsVersions/ById/XcodeVersions/CiMacOsVersionsByIdXcodeVersions.GET.ebe1db8.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/CiMacOsVersions/ById/XcodeVersions/CiMacOsVersionsByIdXcodeVersions.GET.ebe1db8.generated.swift @@ -50,8 +50,10 @@ extension V1.CiMacOsVersions.ById.XcodeVersions { /// - Returns: **200**, List of CiXcodeVersions as `CiXcodeVersionsResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -65,12 +67,18 @@ extension V1.CiMacOsVersions.ById.XcodeVersions { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 404: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -96,56 +104,55 @@ extension V1.CiMacOsVersions.ById.XcodeVersions.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum CiMacOsVersions: Hashable, Codable, RawRepresentable { - case name - case version - case xcodeVersions - case unknown(String) + public struct CiMacOsVersions: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var name: Self { + .init(rawValue: "name") + } - public var rawValue: String { - switch self { - case .name: return "name" - case .version: return "version" - case .xcodeVersions: return "xcodeVersions" - case .unknown(let rawValue): return rawValue - } + public static var version: Self { + .init(rawValue: "version") } + public static var xcodeVersions: Self { + .init(rawValue: "xcodeVersions") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "name": self = .name - case "version": self = .version - case "xcodeVersions": self = .xcodeVersions - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum CiXcodeVersions: Hashable, Codable, RawRepresentable { - case macOsVersions - case name - case testDestinations - case version - case unknown(String) + public struct CiXcodeVersions: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var macOsVersions: Self { + .init(rawValue: "macOsVersions") + } + + public static var name: Self { + .init(rawValue: "name") + } + + public static var testDestinations: Self { + .init(rawValue: "testDestinations") + } + + public static var version: Self { + .init(rawValue: "version") + } - public var rawValue: String { - switch self { - case .macOsVersions: return "macOsVersions" - case .name: return "name" - case .testDestinations: return "testDestinations" - case .version: return "version" - case .unknown(let rawValue): return rawValue - } + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "macOsVersions": self = .macOsVersions - case "name": self = .name - case "testDestinations": self = .testDestinations - case "version": self = .version - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } @@ -168,22 +175,19 @@ extension V1.CiMacOsVersions.ById.XcodeVersions.GET { } } - public enum Include: Hashable, Codable, RawRepresentable { - case macOsVersions - case unknown(String) + public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var macOsVersions: Self { + .init(rawValue: "macOsVersions") + } - public var rawValue: String { - switch self { - case .macOsVersions: return "macOsVersions" - case .unknown(let rawValue): return rawValue - } + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "macOsVersions": self = .macOsVersions - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/CiMacOsVersions/CiMacOsVersions.GET.7fc0431.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/CiMacOsVersions/CiMacOsVersions.GET.7fc0431.generated.swift index 3b9dba15..09ad5850 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/CiMacOsVersions/CiMacOsVersions.GET.7fc0431.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/CiMacOsVersions/CiMacOsVersions.GET.7fc0431.generated.swift @@ -47,7 +47,9 @@ extension V1.CiMacOsVersions { /// - Returns: **200**, List of CiMacOsVersions as `CiMacOsVersionsResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -61,9 +63,15 @@ extension V1.CiMacOsVersions { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -89,56 +97,55 @@ extension V1.CiMacOsVersions.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum CiMacOsVersions: Hashable, Codable, RawRepresentable { - case name - case version - case xcodeVersions - case unknown(String) + public struct CiMacOsVersions: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var name: Self { + .init(rawValue: "name") + } - public var rawValue: String { - switch self { - case .name: return "name" - case .version: return "version" - case .xcodeVersions: return "xcodeVersions" - case .unknown(let rawValue): return rawValue - } + public static var version: Self { + .init(rawValue: "version") } + public static var xcodeVersions: Self { + .init(rawValue: "xcodeVersions") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "name": self = .name - case "version": self = .version - case "xcodeVersions": self = .xcodeVersions - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum CiXcodeVersions: Hashable, Codable, RawRepresentable { - case macOsVersions - case name - case testDestinations - case version - case unknown(String) + public struct CiXcodeVersions: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var macOsVersions: Self { + .init(rawValue: "macOsVersions") + } + + public static var name: Self { + .init(rawValue: "name") + } + + public static var testDestinations: Self { + .init(rawValue: "testDestinations") + } + + public static var version: Self { + .init(rawValue: "version") + } - public var rawValue: String { - switch self { - case .macOsVersions: return "macOsVersions" - case .name: return "name" - case .testDestinations: return "testDestinations" - case .version: return "version" - case .unknown(let rawValue): return rawValue - } + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "macOsVersions": self = .macOsVersions - case "name": self = .name - case "testDestinations": self = .testDestinations - case "version": self = .version - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } @@ -161,22 +168,19 @@ extension V1.CiMacOsVersions.GET { } } - public enum Include: Hashable, Codable, RawRepresentable { - case xcodeVersions - case unknown(String) + public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var xcodeVersions: Self { + .init(rawValue: "xcodeVersions") + } - public var rawValue: String { - switch self { - case .xcodeVersions: return "xcodeVersions" - case .unknown(let rawValue): return rawValue - } + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "xcodeVersions": self = .xcodeVersions - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/CiProducts/ById/AdditionalRepositories/CiProductsByIdAdditionalRepositories.GET.a06cfdf.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/CiProducts/ById/AdditionalRepositories/CiProductsByIdAdditionalRepositories.GET.a06cfdf.generated.swift index f4476ea0..cbc85245 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/CiProducts/ById/AdditionalRepositories/CiProductsByIdAdditionalRepositories.GET.a06cfdf.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/CiProducts/ById/AdditionalRepositories/CiProductsByIdAdditionalRepositories.GET.a06cfdf.generated.swift @@ -52,8 +52,10 @@ extension V1.CiProducts.ById.AdditionalRepositories { /// - Returns: **200**, List of ScmRepositories as `ScmRepositoriesResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -67,12 +69,18 @@ extension V1.CiProducts.ById.AdditionalRepositories { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 404: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -100,102 +108,107 @@ extension V1.CiProducts.ById.AdditionalRepositories.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum ScmGitReferences: Hashable, Codable, RawRepresentable { - case canonicalName - case isDeleted - case kind - case name - case repository - case unknown(String) - - public var rawValue: String { - switch self { - case .canonicalName: return "canonicalName" - case .isDeleted: return "isDeleted" - case .kind: return "kind" - case .name: return "name" - case .repository: return "repository" - case .unknown(let rawValue): return rawValue - } + public struct ScmGitReferences: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var canonicalName: Self { + .init(rawValue: "canonicalName") + } + + public static var isDeleted: Self { + .init(rawValue: "isDeleted") + } + + public static var kind: Self { + .init(rawValue: "kind") + } + + public static var name: Self { + .init(rawValue: "name") + } + + public static var repository: Self { + .init(rawValue: "repository") } + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "canonicalName": self = .canonicalName - case "isDeleted": self = .isDeleted - case "kind": self = .kind - case "name": self = .name - case "repository": self = .repository - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum ScmProviders: Hashable, Codable, RawRepresentable { - case repositories - case scmProviderType - case url - case unknown(String) - - public var rawValue: String { - switch self { - case .repositories: return "repositories" - case .scmProviderType: return "scmProviderType" - case .url: return "url" - case .unknown(let rawValue): return rawValue - } + public struct ScmProviders: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var repositories: Self { + .init(rawValue: "repositories") + } + + public static var scmProviderType: Self { + .init(rawValue: "scmProviderType") + } + + public static var url: Self { + .init(rawValue: "url") + } + + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "repositories": self = .repositories - case "scmProviderType": self = .scmProviderType - case "url": self = .url - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum ScmRepositories: Hashable, Codable, RawRepresentable { - case defaultBranch - case gitReferences - case httpCloneUrl - case lastAccessedDate - case ownerName - case pullRequests - case repositoryName - case scmProvider - case sshCloneUrl - case unknown(String) - - public var rawValue: String { - switch self { - case .defaultBranch: return "defaultBranch" - case .gitReferences: return "gitReferences" - case .httpCloneUrl: return "httpCloneUrl" - case .lastAccessedDate: return "lastAccessedDate" - case .ownerName: return "ownerName" - case .pullRequests: return "pullRequests" - case .repositoryName: return "repositoryName" - case .scmProvider: return "scmProvider" - case .sshCloneUrl: return "sshCloneUrl" - case .unknown(let rawValue): return rawValue - } + public struct ScmRepositories: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var defaultBranch: Self { + .init(rawValue: "defaultBranch") + } + + public static var gitReferences: Self { + .init(rawValue: "gitReferences") } + public static var httpCloneUrl: Self { + .init(rawValue: "httpCloneUrl") + } + + public static var lastAccessedDate: Self { + .init(rawValue: "lastAccessedDate") + } + + public static var ownerName: Self { + .init(rawValue: "ownerName") + } + + public static var pullRequests: Self { + .init(rawValue: "pullRequests") + } + + public static var repositoryName: Self { + .init(rawValue: "repositoryName") + } + + public static var scmProvider: Self { + .init(rawValue: "scmProvider") + } + + public static var sshCloneUrl: Self { + .init(rawValue: "sshCloneUrl") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "defaultBranch": self = .defaultBranch - case "gitReferences": self = .gitReferences - case "httpCloneUrl": self = .httpCloneUrl - case "lastAccessedDate": self = .lastAccessedDate - case "ownerName": self = .ownerName - case "pullRequests": self = .pullRequests - case "repositoryName": self = .repositoryName - case "scmProvider": self = .scmProvider - case "sshCloneUrl": self = .sshCloneUrl - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } @@ -245,25 +258,23 @@ extension V1.CiProducts.ById.AdditionalRepositories.GET { } } - public enum Include: Hashable, Codable, RawRepresentable { - case defaultBranch - case scmProvider - case unknown(String) + public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var defaultBranch: Self { + .init(rawValue: "defaultBranch") + } - public var rawValue: String { - switch self { - case .defaultBranch: return "defaultBranch" - case .scmProvider: return "scmProvider" - case .unknown(let rawValue): return rawValue - } + public static var scmProvider: Self { + .init(rawValue: "scmProvider") + } + + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "defaultBranch": self = .defaultBranch - case "scmProvider": self = .scmProvider - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/CiProducts/ById/App/CiProductsByIdApp.GET.a65f4ca.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/CiProducts/ById/App/CiProductsByIdApp.GET.a65f4ca.generated.swift index d896b6bf..e4467754 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/CiProducts/ById/App/CiProductsByIdApp.GET.a65f4ca.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/CiProducts/ById/App/CiProductsByIdApp.GET.a65f4ca.generated.swift @@ -38,10 +38,6 @@ extension V1.CiProducts.ById.App { value: parameters.fields[.appEvents]?.map { "\($0)" }.joined(separator: ",")), URLQueryItem(name: "fields[appInfos]", value: parameters.fields[.appInfos]?.map { "\($0)" }.joined(separator: ",")), - URLQueryItem(name: "fields[appPreOrders]", - value: parameters.fields[.appPreOrders]?.map { "\($0)" }.joined(separator: ",")), - URLQueryItem(name: "fields[appPrices]", - value: parameters.fields[.appPrices]?.map { "\($0)" }.joined(separator: ",")), URLQueryItem(name: "fields[appStoreVersionExperiments]", value: parameters.fields[.appStoreVersionExperiments]?.map { "\($0)" }.joined(separator: ",")), URLQueryItem(name: "fields[appStoreVersions]", @@ -78,8 +74,6 @@ extension V1.CiProducts.ById.App { value: parameters.fields[.subscriptionGracePeriods]?.map { "\($0)" }.joined(separator: ",")), URLQueryItem(name: "fields[subscriptionGroups]", value: parameters.fields[.subscriptionGroups]?.map { "\($0)" }.joined(separator: ",")), - URLQueryItem(name: "fields[territories]", - value: parameters.fields[.territories]?.map { "\($0)" }.joined(separator: ",")), URLQueryItem(name: "include", value: parameters.include?.map { "\($0)" }.joined(separator: ",")), URLQueryItem(name: "limit[appClips]", @@ -96,8 +90,6 @@ extension V1.CiProducts.ById.App { value: parameters.limit[.appStoreVersionExperimentsV2].map { "\($0)" }), URLQueryItem(name: "limit[appStoreVersions]", value: parameters.limit[.appStoreVersions].map { "\($0)" }), - URLQueryItem(name: "limit[availableTerritories]", - value: parameters.limit[.availableTerritories].map { "\($0)" }), URLQueryItem(name: "limit[betaAppLocalizations]", value: parameters.limit[.betaAppLocalizations].map { "\($0)" }), URLQueryItem(name: "limit[betaGroups]", @@ -112,8 +104,6 @@ extension V1.CiProducts.ById.App { value: parameters.limit[.inAppPurchases].map { "\($0)" }), URLQueryItem(name: "limit[preReleaseVersions]", value: parameters.limit[.preReleaseVersions].map { "\($0)" }), - URLQueryItem(name: "limit[prices]", - value: parameters.limit[.prices].map { "\($0)" }), URLQueryItem(name: "limit[promotedPurchases]", value: parameters.limit[.promotedPurchases].map { "\($0)" }), URLQueryItem(name: "limit[reviewSubmissions]", @@ -132,8 +122,10 @@ extension V1.CiProducts.ById.App { /// - Returns: **200**, Single App as `AppResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -147,12 +139,18 @@ extension V1.CiProducts.ById.App { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 404: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -160,1243 +158,1404 @@ extension V1.CiProducts.ById.App { } } -extension V1.CiProducts.ById.App.GET { - public struct Parameters: Hashable { - public var fields: Fields = Fields() +extension V1.CiProducts.ById.App.GET { + public struct Parameters: Hashable { + public var fields: Fields = Fields() + + /// comma-separated list of relationships to include + public var include: [Include]? + + public var limit: Limit = Limit() + + public struct Fields: Hashable { + public subscript (_ relation: Relation) -> T { + get { values[relation]?.base as! T } + set { values[relation] = AnyHashable(newValue) } + } + + private var values: [AnyHashable: AnyHashable] = [:] + + public struct AppClips: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var app: Self { + .init(rawValue: "app") + } + + public static var appClipAdvancedExperiences: Self { + .init(rawValue: "appClipAdvancedExperiences") + } + + public static var appClipDefaultExperiences: Self { + .init(rawValue: "appClipDefaultExperiences") + } + + public static var bundleId: Self { + .init(rawValue: "bundleId") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct AppCustomProductPages: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var app: Self { + .init(rawValue: "app") + } + + public static var appCustomProductPageVersions: Self { + .init(rawValue: "appCustomProductPageVersions") + } + + public static var name: Self { + .init(rawValue: "name") + } + + public static var url: Self { + .init(rawValue: "url") + } + + public static var visible: Self { + .init(rawValue: "visible") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct AppEncryptionDeclarations: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var app: Self { + .init(rawValue: "app") + } + + public static var appDescription: Self { + .init(rawValue: "appDescription") + } + + public static var appEncryptionDeclarationDocument: Self { + .init(rawValue: "appEncryptionDeclarationDocument") + } + + public static var appEncryptionDeclarationState: Self { + .init(rawValue: "appEncryptionDeclarationState") + } + + public static var availableOnFrenchStore: Self { + .init(rawValue: "availableOnFrenchStore") + } + + public static var builds: Self { + .init(rawValue: "builds") + } + + public static var codeValue: Self { + .init(rawValue: "codeValue") + } + + public static var containsProprietaryCryptography: Self { + .init(rawValue: "containsProprietaryCryptography") + } + + public static var containsThirdPartyCryptography: Self { + .init(rawValue: "containsThirdPartyCryptography") + } + + public static var createdDate: Self { + .init(rawValue: "createdDate") + } + + public static var documentName: Self { + .init(rawValue: "documentName") + } + + public static var documentType: Self { + .init(rawValue: "documentType") + } + + public static var documentUrl: Self { + .init(rawValue: "documentUrl") + } + + public static var exempt: Self { + .init(rawValue: "exempt") + } + + public static var platform: Self { + .init(rawValue: "platform") + } + + public static var uploadedDate: Self { + .init(rawValue: "uploadedDate") + } + + public static var usesEncryption: Self { + .init(rawValue: "usesEncryption") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct AppEvents: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var archivedTerritorySchedules: Self { + .init(rawValue: "archivedTerritorySchedules") + } + + public static var badge: Self { + .init(rawValue: "badge") + } + + public static var deepLink: Self { + .init(rawValue: "deepLink") + } + + public static var eventState: Self { + .init(rawValue: "eventState") + } + + public static var localizations: Self { + .init(rawValue: "localizations") + } + + public static var primaryLocale: Self { + .init(rawValue: "primaryLocale") + } + + public static var priority: Self { + .init(rawValue: "priority") + } + + public static var purchaseRequirement: Self { + .init(rawValue: "purchaseRequirement") + } + + public static var purpose: Self { + .init(rawValue: "purpose") + } + + public static var referenceName: Self { + .init(rawValue: "referenceName") + } + + public static var territorySchedules: Self { + .init(rawValue: "territorySchedules") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct AppInfos: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var ageRatingDeclaration: Self { + .init(rawValue: "ageRatingDeclaration") + } + + public static var app: Self { + .init(rawValue: "app") + } + + public static var appInfoLocalizations: Self { + .init(rawValue: "appInfoLocalizations") + } + + public static var appStoreAgeRating: Self { + .init(rawValue: "appStoreAgeRating") + } + + public static var appStoreState: Self { + .init(rawValue: "appStoreState") + } + + public static var australiaAgeRating: Self { + .init(rawValue: "australiaAgeRating") + } + + public static var brazilAgeRating: Self { + .init(rawValue: "brazilAgeRating") + } + + public static var brazilAgeRatingV2: Self { + .init(rawValue: "brazilAgeRatingV2") + } + + public static var franceAgeRating: Self { + .init(rawValue: "franceAgeRating") + } + + public static var kidsAgeBand: Self { + .init(rawValue: "kidsAgeBand") + } + + public static var koreaAgeRating: Self { + .init(rawValue: "koreaAgeRating") + } + + public static var primaryCategory: Self { + .init(rawValue: "primaryCategory") + } + + public static var primarySubcategoryOne: Self { + .init(rawValue: "primarySubcategoryOne") + } + + public static var primarySubcategoryTwo: Self { + .init(rawValue: "primarySubcategoryTwo") + } + + public static var secondaryCategory: Self { + .init(rawValue: "secondaryCategory") + } + + public static var secondarySubcategoryOne: Self { + .init(rawValue: "secondarySubcategoryOne") + } + + public static var secondarySubcategoryTwo: Self { + .init(rawValue: "secondarySubcategoryTwo") + } + + public static var state: Self { + .init(rawValue: "state") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct AppStoreVersionExperiments: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var app: Self { + .init(rawValue: "app") + } + + public static var appStoreVersionExperimentTreatments: Self { + .init(rawValue: "appStoreVersionExperimentTreatments") + } + + public static var controlVersions: Self { + .init(rawValue: "controlVersions") + } + + public static var endDate: Self { + .init(rawValue: "endDate") + } + + public static var latestControlVersion: Self { + .init(rawValue: "latestControlVersion") + } + + public static var name: Self { + .init(rawValue: "name") + } + + public static var platform: Self { + .init(rawValue: "platform") + } + + public static var reviewRequired: Self { + .init(rawValue: "reviewRequired") + } + + public static var startDate: Self { + .init(rawValue: "startDate") + } + + public static var state: Self { + .init(rawValue: "state") + } + + public static var trafficProportion: Self { + .init(rawValue: "trafficProportion") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct AppStoreVersions: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var ageRatingDeclaration: Self { + .init(rawValue: "ageRatingDeclaration") + } + + public static var alternativeDistributionPackage: Self { + .init(rawValue: "alternativeDistributionPackage") + } + + public static var app: Self { + .init(rawValue: "app") + } + + public static var appClipDefaultExperience: Self { + .init(rawValue: "appClipDefaultExperience") + } + + public static var appStoreReviewDetail: Self { + .init(rawValue: "appStoreReviewDetail") + } + + public static var appStoreState: Self { + .init(rawValue: "appStoreState") + } + + public static var appStoreVersionExperiments: Self { + .init(rawValue: "appStoreVersionExperiments") + } + + public static var appStoreVersionExperimentsV2: Self { + .init(rawValue: "appStoreVersionExperimentsV2") + } + + public static var appStoreVersionLocalizations: Self { + .init(rawValue: "appStoreVersionLocalizations") + } + + public static var appStoreVersionPhasedRelease: Self { + .init(rawValue: "appStoreVersionPhasedRelease") + } + + public static var appStoreVersionSubmission: Self { + .init(rawValue: "appStoreVersionSubmission") + } + + public static var appVersionState: Self { + .init(rawValue: "appVersionState") + } + + public static var build: Self { + .init(rawValue: "build") + } + + public static var copyright: Self { + .init(rawValue: "copyright") + } + + public static var createdDate: Self { + .init(rawValue: "createdDate") + } + + public static var customerReviews: Self { + .init(rawValue: "customerReviews") + } + + public static var downloadable: Self { + .init(rawValue: "downloadable") + } + + public static var earliestReleaseDate: Self { + .init(rawValue: "earliestReleaseDate") + } + + public static var gameCenterAppVersion: Self { + .init(rawValue: "gameCenterAppVersion") + } + + public static var platform: Self { + .init(rawValue: "platform") + } + + public static var releaseType: Self { + .init(rawValue: "releaseType") + } + + public static var reviewType: Self { + .init(rawValue: "reviewType") + } + + public static var routingAppCoverage: Self { + .init(rawValue: "routingAppCoverage") + } + + public static var usesIdfa: Self { + .init(rawValue: "usesIdfa") + } + + public static var versionString: Self { + .init(rawValue: "versionString") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct Apps: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var accessibilityDeclarations: Self { + .init(rawValue: "accessibilityDeclarations") + } + + public static var accessibilityUrl: Self { + .init(rawValue: "accessibilityUrl") + } + + public static var alternativeDistributionKey: Self { + .init(rawValue: "alternativeDistributionKey") + } + + public static var analyticsReportRequests: Self { + .init(rawValue: "analyticsReportRequests") + } + + public static var appAvailabilityV2: Self { + .init(rawValue: "appAvailabilityV2") + } + + public static var appClips: Self { + .init(rawValue: "appClips") + } + + public static var appCustomProductPages: Self { + .init(rawValue: "appCustomProductPages") + } + + public static var appEncryptionDeclarations: Self { + .init(rawValue: "appEncryptionDeclarations") + } + + public static var appEvents: Self { + .init(rawValue: "appEvents") + } + + public static var appInfos: Self { + .init(rawValue: "appInfos") + } + + public static var appPricePoints: Self { + .init(rawValue: "appPricePoints") + } + + public static var appPriceSchedule: Self { + .init(rawValue: "appPriceSchedule") + } + + public static var appStoreVersionExperimentsV2: Self { + .init(rawValue: "appStoreVersionExperimentsV2") + } + + public static var appStoreVersions: Self { + .init(rawValue: "appStoreVersions") + } + + public static var backgroundAssets: Self { + .init(rawValue: "backgroundAssets") + } + + public static var betaAppLocalizations: Self { + .init(rawValue: "betaAppLocalizations") + } + + public static var betaAppReviewDetail: Self { + .init(rawValue: "betaAppReviewDetail") + } + + public static var betaFeedbackCrashSubmissions: Self { + .init(rawValue: "betaFeedbackCrashSubmissions") + } + + public static var betaFeedbackScreenshotSubmissions: Self { + .init(rawValue: "betaFeedbackScreenshotSubmissions") + } + + public static var betaGroups: Self { + .init(rawValue: "betaGroups") + } + + public static var betaLicenseAgreement: Self { + .init(rawValue: "betaLicenseAgreement") + } + + public static var betaTesters: Self { + .init(rawValue: "betaTesters") + } + + public static var builds: Self { + .init(rawValue: "builds") + } + + public static var bundleId: Self { + .init(rawValue: "bundleId") + } + + public static var ciProduct: Self { + .init(rawValue: "ciProduct") + } + + public static var contentRightsDeclaration: Self { + .init(rawValue: "contentRightsDeclaration") + } + + public static var customerReviewSummarizations: Self { + .init(rawValue: "customerReviewSummarizations") + } + + public static var customerReviews: Self { + .init(rawValue: "customerReviews") + } + + public static var endUserLicenseAgreement: Self { + .init(rawValue: "endUserLicenseAgreement") + } + + public static var gameCenterDetail: Self { + .init(rawValue: "gameCenterDetail") + } + + public static var gameCenterEnabledVersions: Self { + .init(rawValue: "gameCenterEnabledVersions") + } + + public static var inAppPurchases: Self { + .init(rawValue: "inAppPurchases") + } + + public static var inAppPurchasesV2: Self { + .init(rawValue: "inAppPurchasesV2") + } + + public static var isOrEverWasMadeForKids: Self { + .init(rawValue: "isOrEverWasMadeForKids") + } + + public static var marketplaceSearchDetail: Self { + .init(rawValue: "marketplaceSearchDetail") + } + + public static var name: Self { + .init(rawValue: "name") + } + + public static var perfPowerMetrics: Self { + .init(rawValue: "perfPowerMetrics") + } + + public static var preReleaseVersions: Self { + .init(rawValue: "preReleaseVersions") + } + + public static var primaryLocale: Self { + .init(rawValue: "primaryLocale") + } + + public static var promotedPurchases: Self { + .init(rawValue: "promotedPurchases") + } + + public static var reviewSubmissions: Self { + .init(rawValue: "reviewSubmissions") + } + + public static var sku: Self { + .init(rawValue: "sku") + } + + public static var streamlinedPurchasingEnabled: Self { + .init(rawValue: "streamlinedPurchasingEnabled") + } + + public static var subscriptionGracePeriod: Self { + .init(rawValue: "subscriptionGracePeriod") + } + + public static var subscriptionGroups: Self { + .init(rawValue: "subscriptionGroups") + } + + public static var subscriptionStatusUrl: Self { + .init(rawValue: "subscriptionStatusUrl") + } + + public static var subscriptionStatusUrlForSandbox: Self { + .init(rawValue: "subscriptionStatusUrlForSandbox") + } + + public static var subscriptionStatusUrlVersion: Self { + .init(rawValue: "subscriptionStatusUrlVersion") + } + + public static var subscriptionStatusUrlVersionForSandbox: Self { + .init(rawValue: "subscriptionStatusUrlVersionForSandbox") + } + + public static var webhooks: Self { + .init(rawValue: "webhooks") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct BetaAppLocalizations: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var app: Self { + .init(rawValue: "app") + } + + public static var description: Self { + .init(rawValue: "description") + } + + public static var feedbackEmail: Self { + .init(rawValue: "feedbackEmail") + } + + public static var locale: Self { + .init(rawValue: "locale") + } + + public static var marketingUrl: Self { + .init(rawValue: "marketingUrl") + } + + public static var privacyPolicyUrl: Self { + .init(rawValue: "privacyPolicyUrl") + } + + public static var tvOsPrivacyPolicy: Self { + .init(rawValue: "tvOsPrivacyPolicy") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct BetaAppReviewDetails: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var app: Self { + .init(rawValue: "app") + } + + public static var contactEmail: Self { + .init(rawValue: "contactEmail") + } + + public static var contactFirstName: Self { + .init(rawValue: "contactFirstName") + } + + public static var contactLastName: Self { + .init(rawValue: "contactLastName") + } + + public static var contactPhone: Self { + .init(rawValue: "contactPhone") + } + + public static var demoAccountName: Self { + .init(rawValue: "demoAccountName") + } + + public static var demoAccountPassword: Self { + .init(rawValue: "demoAccountPassword") + } + + public static var demoAccountRequired: Self { + .init(rawValue: "demoAccountRequired") + } + + public static var notes: Self { + .init(rawValue: "notes") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct BetaGroups: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var app: Self { + .init(rawValue: "app") + } + + public static var betaRecruitmentCriteria: Self { + .init(rawValue: "betaRecruitmentCriteria") + } + + public static var betaRecruitmentCriterionCompatibleBuildCheck: Self { + .init(rawValue: "betaRecruitmentCriterionCompatibleBuildCheck") + } + + public static var betaTesters: Self { + .init(rawValue: "betaTesters") + } + + public static var builds: Self { + .init(rawValue: "builds") + } + + public static var createdDate: Self { + .init(rawValue: "createdDate") + } + + public static var feedbackEnabled: Self { + .init(rawValue: "feedbackEnabled") + } + + public static var hasAccessToAllBuilds: Self { + .init(rawValue: "hasAccessToAllBuilds") + } + + public static var iosBuildsAvailableForAppleSiliconMac: Self { + .init(rawValue: "iosBuildsAvailableForAppleSiliconMac") + } + + public static var iosBuildsAvailableForAppleVision: Self { + .init(rawValue: "iosBuildsAvailableForAppleVision") + } + + public static var isInternalGroup: Self { + .init(rawValue: "isInternalGroup") + } + + public static var name: Self { + .init(rawValue: "name") + } + + public static var publicLink: Self { + .init(rawValue: "publicLink") + } + + public static var publicLinkEnabled: Self { + .init(rawValue: "publicLinkEnabled") + } + + public static var publicLinkId: Self { + .init(rawValue: "publicLinkId") + } + + public static var publicLinkLimit: Self { + .init(rawValue: "publicLinkLimit") + } - /// comma-separated list of relationships to include - public var include: [Include]? + public static var publicLinkLimitEnabled: Self { + .init(rawValue: "publicLinkLimitEnabled") + } - public var limit: Limit = Limit() + public var description: String { + rawValue + } - public struct Fields: Hashable { - public subscript (_ relation: Relation) -> T { - get { values[relation]?.base as! T } - set { values[relation] = AnyHashable(newValue) } + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } } - private var values: [AnyHashable: AnyHashable] = [:] + public struct BetaLicenseAgreements: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var agreementText: Self { + .init(rawValue: "agreementText") + } - public enum AppClips: Hashable, Codable, RawRepresentable { - case app - case appClipAdvancedExperiences - case appClipDefaultExperiences - case bundleId - case unknown(String) + public static var app: Self { + .init(rawValue: "app") + } - public var rawValue: String { - switch self { - case .app: return "app" - case .appClipAdvancedExperiences: return "appClipAdvancedExperiences" - case .appClipDefaultExperiences: return "appClipDefaultExperiences" - case .bundleId: return "bundleId" - case .unknown(let rawValue): return rawValue - } + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "app": self = .app - case "appClipAdvancedExperiences": self = .appClipAdvancedExperiences - case "appClipDefaultExperiences": self = .appClipDefaultExperiences - case "bundleId": self = .bundleId - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum AppCustomProductPages: Hashable, Codable, RawRepresentable { - case app - case appCustomProductPageVersions - case appStoreVersionTemplate - case customProductPageTemplate - case name - case url - case visible - case unknown(String) - - public var rawValue: String { - switch self { - case .app: return "app" - case .appCustomProductPageVersions: return "appCustomProductPageVersions" - case .appStoreVersionTemplate: return "appStoreVersionTemplate" - case .customProductPageTemplate: return "customProductPageTemplate" - case .name: return "name" - case .url: return "url" - case .visible: return "visible" - case .unknown(let rawValue): return rawValue - } + public struct Builds: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var app: Self { + .init(rawValue: "app") } - public init(rawValue: String) { - switch rawValue { - case "app": self = .app - case "appCustomProductPageVersions": self = .appCustomProductPageVersions - case "appStoreVersionTemplate": self = .appStoreVersionTemplate - case "customProductPageTemplate": self = .customProductPageTemplate - case "name": self = .name - case "url": self = .url - case "visible": self = .visible - default: self = .unknown(rawValue) - } + public static var appEncryptionDeclaration: Self { + .init(rawValue: "appEncryptionDeclaration") } - } - public enum AppEncryptionDeclarations: Hashable, Codable, RawRepresentable { - case app - case appDescription - case appEncryptionDeclarationDocument - case appEncryptionDeclarationState - case availableOnFrenchStore - case builds - case codeValue - case containsProprietaryCryptography - case containsThirdPartyCryptography - case createdDate - case documentName - case documentType - case documentUrl - case exempt - case platform - case uploadedDate - case usesEncryption - case unknown(String) - - public var rawValue: String { - switch self { - case .app: return "app" - case .appDescription: return "appDescription" - case .appEncryptionDeclarationDocument: return "appEncryptionDeclarationDocument" - case .appEncryptionDeclarationState: return "appEncryptionDeclarationState" - case .availableOnFrenchStore: return "availableOnFrenchStore" - case .builds: return "builds" - case .codeValue: return "codeValue" - case .containsProprietaryCryptography: return "containsProprietaryCryptography" - case .containsThirdPartyCryptography: return "containsThirdPartyCryptography" - case .createdDate: return "createdDate" - case .documentName: return "documentName" - case .documentType: return "documentType" - case .documentUrl: return "documentUrl" - case .exempt: return "exempt" - case .platform: return "platform" - case .uploadedDate: return "uploadedDate" - case .usesEncryption: return "usesEncryption" - case .unknown(let rawValue): return rawValue - } + public static var appStoreVersion: Self { + .init(rawValue: "appStoreVersion") } - public init(rawValue: String) { - switch rawValue { - case "app": self = .app - case "appDescription": self = .appDescription - case "appEncryptionDeclarationDocument": self = .appEncryptionDeclarationDocument - case "appEncryptionDeclarationState": self = .appEncryptionDeclarationState - case "availableOnFrenchStore": self = .availableOnFrenchStore - case "builds": self = .builds - case "codeValue": self = .codeValue - case "containsProprietaryCryptography": self = .containsProprietaryCryptography - case "containsThirdPartyCryptography": self = .containsThirdPartyCryptography - case "createdDate": self = .createdDate - case "documentName": self = .documentName - case "documentType": self = .documentType - case "documentUrl": self = .documentUrl - case "exempt": self = .exempt - case "platform": self = .platform - case "uploadedDate": self = .uploadedDate - case "usesEncryption": self = .usesEncryption - default: self = .unknown(rawValue) - } + public static var betaAppReviewSubmission: Self { + .init(rawValue: "betaAppReviewSubmission") } - } - public enum AppEvents: Hashable, Codable, RawRepresentable { - case app - case archivedTerritorySchedules - case badge - case deepLink - case eventState - case localizations - case primaryLocale - case priority - case purchaseRequirement - case purpose - case referenceName - case territorySchedules - case unknown(String) - - public var rawValue: String { - switch self { - case .app: return "app" - case .archivedTerritorySchedules: return "archivedTerritorySchedules" - case .badge: return "badge" - case .deepLink: return "deepLink" - case .eventState: return "eventState" - case .localizations: return "localizations" - case .primaryLocale: return "primaryLocale" - case .priority: return "priority" - case .purchaseRequirement: return "purchaseRequirement" - case .purpose: return "purpose" - case .referenceName: return "referenceName" - case .territorySchedules: return "territorySchedules" - case .unknown(let rawValue): return rawValue - } + public static var betaBuildLocalizations: Self { + .init(rawValue: "betaBuildLocalizations") } - public init(rawValue: String) { - switch rawValue { - case "app": self = .app - case "archivedTerritorySchedules": self = .archivedTerritorySchedules - case "badge": self = .badge - case "deepLink": self = .deepLink - case "eventState": self = .eventState - case "localizations": self = .localizations - case "primaryLocale": self = .primaryLocale - case "priority": self = .priority - case "purchaseRequirement": self = .purchaseRequirement - case "purpose": self = .purpose - case "referenceName": self = .referenceName - case "territorySchedules": self = .territorySchedules - default: self = .unknown(rawValue) - } + public static var betaGroups: Self { + .init(rawValue: "betaGroups") } - } - public enum AppInfos: Hashable, Codable, RawRepresentable { - case ageRatingDeclaration - case app - case appInfoLocalizations - case appStoreAgeRating - case appStoreState - case brazilAgeRating - case brazilAgeRatingV2 - case kidsAgeBand - case primaryCategory - case primarySubcategoryOne - case primarySubcategoryTwo - case secondaryCategory - case secondarySubcategoryOne - case secondarySubcategoryTwo - case unknown(String) - - public var rawValue: String { - switch self { - case .ageRatingDeclaration: return "ageRatingDeclaration" - case .app: return "app" - case .appInfoLocalizations: return "appInfoLocalizations" - case .appStoreAgeRating: return "appStoreAgeRating" - case .appStoreState: return "appStoreState" - case .brazilAgeRating: return "brazilAgeRating" - case .brazilAgeRatingV2: return "brazilAgeRatingV2" - case .kidsAgeBand: return "kidsAgeBand" - case .primaryCategory: return "primaryCategory" - case .primarySubcategoryOne: return "primarySubcategoryOne" - case .primarySubcategoryTwo: return "primarySubcategoryTwo" - case .secondaryCategory: return "secondaryCategory" - case .secondarySubcategoryOne: return "secondarySubcategoryOne" - case .secondarySubcategoryTwo: return "secondarySubcategoryTwo" - case .unknown(let rawValue): return rawValue - } + public static var buildAudienceType: Self { + .init(rawValue: "buildAudienceType") } - public init(rawValue: String) { - switch rawValue { - case "ageRatingDeclaration": self = .ageRatingDeclaration - case "app": self = .app - case "appInfoLocalizations": self = .appInfoLocalizations - case "appStoreAgeRating": self = .appStoreAgeRating - case "appStoreState": self = .appStoreState - case "brazilAgeRating": self = .brazilAgeRating - case "brazilAgeRatingV2": self = .brazilAgeRatingV2 - case "kidsAgeBand": self = .kidsAgeBand - case "primaryCategory": self = .primaryCategory - case "primarySubcategoryOne": self = .primarySubcategoryOne - case "primarySubcategoryTwo": self = .primarySubcategoryTwo - case "secondaryCategory": self = .secondaryCategory - case "secondarySubcategoryOne": self = .secondarySubcategoryOne - case "secondarySubcategoryTwo": self = .secondarySubcategoryTwo - default: self = .unknown(rawValue) - } + public static var buildBetaDetail: Self { + .init(rawValue: "buildBetaDetail") } - } - public enum AppPreOrders: Hashable, Codable, RawRepresentable { - case app - case appReleaseDate - case preOrderAvailableDate - case unknown(String) + public static var buildBundles: Self { + .init(rawValue: "buildBundles") + } - public var rawValue: String { - switch self { - case .app: return "app" - case .appReleaseDate: return "appReleaseDate" - case .preOrderAvailableDate: return "preOrderAvailableDate" - case .unknown(let rawValue): return rawValue - } + public static var computedMinMacOsVersion: Self { + .init(rawValue: "computedMinMacOsVersion") } - public init(rawValue: String) { - switch rawValue { - case "app": self = .app - case "appReleaseDate": self = .appReleaseDate - case "preOrderAvailableDate": self = .preOrderAvailableDate - default: self = .unknown(rawValue) - } + public static var computedMinVisionOsVersion: Self { + .init(rawValue: "computedMinVisionOsVersion") + } + + public static var diagnosticSignatures: Self { + .init(rawValue: "diagnosticSignatures") } - } - public enum AppPrices: Hashable, Codable, RawRepresentable { - case app - case priceTier - case unknown(String) + public static var expirationDate: Self { + .init(rawValue: "expirationDate") + } - public var rawValue: String { - switch self { - case .app: return "app" - case .priceTier: return "priceTier" - case .unknown(let rawValue): return rawValue - } + public static var expired: Self { + .init(rawValue: "expired") } - public init(rawValue: String) { - switch rawValue { - case "app": self = .app - case "priceTier": self = .priceTier - default: self = .unknown(rawValue) - } + public static var iconAssetToken: Self { + .init(rawValue: "iconAssetToken") } - } - public enum AppStoreVersionExperiments: Hashable, Codable, RawRepresentable { - case app - case appStoreVersionExperimentTreatments - case controlVersions - case endDate - case latestControlVersion - case name - case platform - case reviewRequired - case startDate - case started - case state - case trafficProportion - case unknown(String) - - public var rawValue: String { - switch self { - case .app: return "app" - case .appStoreVersionExperimentTreatments: return "appStoreVersionExperimentTreatments" - case .controlVersions: return "controlVersions" - case .endDate: return "endDate" - case .latestControlVersion: return "latestControlVersion" - case .name: return "name" - case .platform: return "platform" - case .reviewRequired: return "reviewRequired" - case .startDate: return "startDate" - case .started: return "started" - case .state: return "state" - case .trafficProportion: return "trafficProportion" - case .unknown(let rawValue): return rawValue - } + public static var icons: Self { + .init(rawValue: "icons") } - public init(rawValue: String) { - switch rawValue { - case "app": self = .app - case "appStoreVersionExperimentTreatments": self = .appStoreVersionExperimentTreatments - case "controlVersions": self = .controlVersions - case "endDate": self = .endDate - case "latestControlVersion": self = .latestControlVersion - case "name": self = .name - case "platform": self = .platform - case "reviewRequired": self = .reviewRequired - case "startDate": self = .startDate - case "started": self = .started - case "state": self = .state - case "trafficProportion": self = .trafficProportion - default: self = .unknown(rawValue) - } + public static var individualTesters: Self { + .init(rawValue: "individualTesters") } - } - public enum AppStoreVersions: Hashable, Codable, RawRepresentable { - case ageRatingDeclaration - case app - case appClipDefaultExperience - case appStoreReviewDetail - case appStoreState - case appStoreVersionExperiments - case appStoreVersionExperimentsV2 - case appStoreVersionLocalizations - case appStoreVersionPhasedRelease - case appStoreVersionSubmission - case build - case copyright - case createdDate - case customerReviews - case downloadable - case earliestReleaseDate - case platform - case releaseType - case routingAppCoverage - case versionString - case unknown(String) - - public var rawValue: String { - switch self { - case .ageRatingDeclaration: return "ageRatingDeclaration" - case .app: return "app" - case .appClipDefaultExperience: return "appClipDefaultExperience" - case .appStoreReviewDetail: return "appStoreReviewDetail" - case .appStoreState: return "appStoreState" - case .appStoreVersionExperiments: return "appStoreVersionExperiments" - case .appStoreVersionExperimentsV2: return "appStoreVersionExperimentsV2" - case .appStoreVersionLocalizations: return "appStoreVersionLocalizations" - case .appStoreVersionPhasedRelease: return "appStoreVersionPhasedRelease" - case .appStoreVersionSubmission: return "appStoreVersionSubmission" - case .build: return "build" - case .copyright: return "copyright" - case .createdDate: return "createdDate" - case .customerReviews: return "customerReviews" - case .downloadable: return "downloadable" - case .earliestReleaseDate: return "earliestReleaseDate" - case .platform: return "platform" - case .releaseType: return "releaseType" - case .routingAppCoverage: return "routingAppCoverage" - case .versionString: return "versionString" - case .unknown(let rawValue): return rawValue - } + public static var lsMinimumSystemVersion: Self { + .init(rawValue: "lsMinimumSystemVersion") } - public init(rawValue: String) { - switch rawValue { - case "ageRatingDeclaration": self = .ageRatingDeclaration - case "app": self = .app - case "appClipDefaultExperience": self = .appClipDefaultExperience - case "appStoreReviewDetail": self = .appStoreReviewDetail - case "appStoreState": self = .appStoreState - case "appStoreVersionExperiments": self = .appStoreVersionExperiments - case "appStoreVersionExperimentsV2": self = .appStoreVersionExperimentsV2 - case "appStoreVersionLocalizations": self = .appStoreVersionLocalizations - case "appStoreVersionPhasedRelease": self = .appStoreVersionPhasedRelease - case "appStoreVersionSubmission": self = .appStoreVersionSubmission - case "build": self = .build - case "copyright": self = .copyright - case "createdDate": self = .createdDate - case "customerReviews": self = .customerReviews - case "downloadable": self = .downloadable - case "earliestReleaseDate": self = .earliestReleaseDate - case "platform": self = .platform - case "releaseType": self = .releaseType - case "routingAppCoverage": self = .routingAppCoverage - case "versionString": self = .versionString - default: self = .unknown(rawValue) - } + public static var minOsVersion: Self { + .init(rawValue: "minOsVersion") } - } - public enum Apps: Hashable, Codable, RawRepresentable { - case appAvailability - case appClips - case appCustomProductPages - case appEncryptionDeclarations - case appEvents - case appInfos - case appPricePoints - case appPriceSchedule - case appStoreVersionExperimentsV2 - case appStoreVersions - case availableInNewTerritories - case availableTerritories - case betaAppLocalizations - case betaAppReviewDetail - case betaGroups - case betaLicenseAgreement - case betaTesters - case builds - case bundleId - case ciProduct - case contentRightsDeclaration - case customerReviews - case endUserLicenseAgreement - case gameCenterDetail - case gameCenterEnabledVersions - case inAppPurchases - case inAppPurchasesV2 - case isOrEverWasMadeForKids - case name - case perfPowerMetrics - case preOrder - case preReleaseVersions - case pricePoints - case prices - case primaryLocale - case promotedPurchases - case reviewSubmissions - case sku - case subscriptionGracePeriod - case subscriptionGroups - case subscriptionStatusUrl - case subscriptionStatusUrlForSandbox - case subscriptionStatusUrlVersion - case subscriptionStatusUrlVersionForSandbox - case unknown(String) - - public var rawValue: String { - switch self { - case .appAvailability: return "appAvailability" - case .appClips: return "appClips" - case .appCustomProductPages: return "appCustomProductPages" - case .appEncryptionDeclarations: return "appEncryptionDeclarations" - case .appEvents: return "appEvents" - case .appInfos: return "appInfos" - case .appPricePoints: return "appPricePoints" - case .appPriceSchedule: return "appPriceSchedule" - case .appStoreVersionExperimentsV2: return "appStoreVersionExperimentsV2" - case .appStoreVersions: return "appStoreVersions" - case .availableInNewTerritories: return "availableInNewTerritories" - case .availableTerritories: return "availableTerritories" - case .betaAppLocalizations: return "betaAppLocalizations" - case .betaAppReviewDetail: return "betaAppReviewDetail" - case .betaGroups: return "betaGroups" - case .betaLicenseAgreement: return "betaLicenseAgreement" - case .betaTesters: return "betaTesters" - case .builds: return "builds" - case .bundleId: return "bundleId" - case .ciProduct: return "ciProduct" - case .contentRightsDeclaration: return "contentRightsDeclaration" - case .customerReviews: return "customerReviews" - case .endUserLicenseAgreement: return "endUserLicenseAgreement" - case .gameCenterDetail: return "gameCenterDetail" - case .gameCenterEnabledVersions: return "gameCenterEnabledVersions" - case .inAppPurchases: return "inAppPurchases" - case .inAppPurchasesV2: return "inAppPurchasesV2" - case .isOrEverWasMadeForKids: return "isOrEverWasMadeForKids" - case .name: return "name" - case .perfPowerMetrics: return "perfPowerMetrics" - case .preOrder: return "preOrder" - case .preReleaseVersions: return "preReleaseVersions" - case .pricePoints: return "pricePoints" - case .prices: return "prices" - case .primaryLocale: return "primaryLocale" - case .promotedPurchases: return "promotedPurchases" - case .reviewSubmissions: return "reviewSubmissions" - case .sku: return "sku" - case .subscriptionGracePeriod: return "subscriptionGracePeriod" - case .subscriptionGroups: return "subscriptionGroups" - case .subscriptionStatusUrl: return "subscriptionStatusUrl" - case .subscriptionStatusUrlForSandbox: return "subscriptionStatusUrlForSandbox" - case .subscriptionStatusUrlVersion: return "subscriptionStatusUrlVersion" - case .subscriptionStatusUrlVersionForSandbox: return "subscriptionStatusUrlVersionForSandbox" - case .unknown(let rawValue): return rawValue - } + public static var perfPowerMetrics: Self { + .init(rawValue: "perfPowerMetrics") } - public init(rawValue: String) { - switch rawValue { - case "appAvailability": self = .appAvailability - case "appClips": self = .appClips - case "appCustomProductPages": self = .appCustomProductPages - case "appEncryptionDeclarations": self = .appEncryptionDeclarations - case "appEvents": self = .appEvents - case "appInfos": self = .appInfos - case "appPricePoints": self = .appPricePoints - case "appPriceSchedule": self = .appPriceSchedule - case "appStoreVersionExperimentsV2": self = .appStoreVersionExperimentsV2 - case "appStoreVersions": self = .appStoreVersions - case "availableInNewTerritories": self = .availableInNewTerritories - case "availableTerritories": self = .availableTerritories - case "betaAppLocalizations": self = .betaAppLocalizations - case "betaAppReviewDetail": self = .betaAppReviewDetail - case "betaGroups": self = .betaGroups - case "betaLicenseAgreement": self = .betaLicenseAgreement - case "betaTesters": self = .betaTesters - case "builds": self = .builds - case "bundleId": self = .bundleId - case "ciProduct": self = .ciProduct - case "contentRightsDeclaration": self = .contentRightsDeclaration - case "customerReviews": self = .customerReviews - case "endUserLicenseAgreement": self = .endUserLicenseAgreement - case "gameCenterDetail": self = .gameCenterDetail - case "gameCenterEnabledVersions": self = .gameCenterEnabledVersions - case "inAppPurchases": self = .inAppPurchases - case "inAppPurchasesV2": self = .inAppPurchasesV2 - case "isOrEverWasMadeForKids": self = .isOrEverWasMadeForKids - case "name": self = .name - case "perfPowerMetrics": self = .perfPowerMetrics - case "preOrder": self = .preOrder - case "preReleaseVersions": self = .preReleaseVersions - case "pricePoints": self = .pricePoints - case "prices": self = .prices - case "primaryLocale": self = .primaryLocale - case "promotedPurchases": self = .promotedPurchases - case "reviewSubmissions": self = .reviewSubmissions - case "sku": self = .sku - case "subscriptionGracePeriod": self = .subscriptionGracePeriod - case "subscriptionGroups": self = .subscriptionGroups - case "subscriptionStatusUrl": self = .subscriptionStatusUrl - case "subscriptionStatusUrlForSandbox": self = .subscriptionStatusUrlForSandbox - case "subscriptionStatusUrlVersion": self = .subscriptionStatusUrlVersion - case "subscriptionStatusUrlVersionForSandbox": self = .subscriptionStatusUrlVersionForSandbox - default: self = .unknown(rawValue) - } + public static var preReleaseVersion: Self { + .init(rawValue: "preReleaseVersion") } - } - public enum BetaAppLocalizations: Hashable, Codable, RawRepresentable { - case app - case description - case feedbackEmail - case locale - case marketingUrl - case privacyPolicyUrl - case tvOsPrivacyPolicy - case unknown(String) - - public var rawValue: String { - switch self { - case .app: return "app" - case .description: return "description" - case .feedbackEmail: return "feedbackEmail" - case .locale: return "locale" - case .marketingUrl: return "marketingUrl" - case .privacyPolicyUrl: return "privacyPolicyUrl" - case .tvOsPrivacyPolicy: return "tvOsPrivacyPolicy" - case .unknown(let rawValue): return rawValue - } + public static var processingState: Self { + .init(rawValue: "processingState") } - public init(rawValue: String) { - switch rawValue { - case "app": self = .app - case "description": self = .description - case "feedbackEmail": self = .feedbackEmail - case "locale": self = .locale - case "marketingUrl": self = .marketingUrl - case "privacyPolicyUrl": self = .privacyPolicyUrl - case "tvOsPrivacyPolicy": self = .tvOsPrivacyPolicy - default: self = .unknown(rawValue) - } + public static var uploadedDate: Self { + .init(rawValue: "uploadedDate") } - } - public enum BetaAppReviewDetails: Hashable, Codable, RawRepresentable { - case app - case contactEmail - case contactFirstName - case contactLastName - case contactPhone - case demoAccountName - case demoAccountPassword - case demoAccountRequired - case notes - case unknown(String) - - public var rawValue: String { - switch self { - case .app: return "app" - case .contactEmail: return "contactEmail" - case .contactFirstName: return "contactFirstName" - case .contactLastName: return "contactLastName" - case .contactPhone: return "contactPhone" - case .demoAccountName: return "demoAccountName" - case .demoAccountPassword: return "demoAccountPassword" - case .demoAccountRequired: return "demoAccountRequired" - case .notes: return "notes" - case .unknown(let rawValue): return rawValue - } + public static var usesNonExemptEncryption: Self { + .init(rawValue: "usesNonExemptEncryption") } - public init(rawValue: String) { - switch rawValue { - case "app": self = .app - case "contactEmail": self = .contactEmail - case "contactFirstName": self = .contactFirstName - case "contactLastName": self = .contactLastName - case "contactPhone": self = .contactPhone - case "demoAccountName": self = .demoAccountName - case "demoAccountPassword": self = .demoAccountPassword - case "demoAccountRequired": self = .demoAccountRequired - case "notes": self = .notes - default: self = .unknown(rawValue) - } + public static var version: Self { + .init(rawValue: "version") } - } - public enum BetaGroups: Hashable, Codable, RawRepresentable { - case app - case betaTesters - case builds - case createdDate - case feedbackEnabled - case hasAccessToAllBuilds - case iosBuildsAvailableForAppleSiliconMac - case isInternalGroup - case name - case publicLink - case publicLinkEnabled - case publicLinkId - case publicLinkLimit - case publicLinkLimitEnabled - case unknown(String) - - public var rawValue: String { - switch self { - case .app: return "app" - case .betaTesters: return "betaTesters" - case .builds: return "builds" - case .createdDate: return "createdDate" - case .feedbackEnabled: return "feedbackEnabled" - case .hasAccessToAllBuilds: return "hasAccessToAllBuilds" - case .iosBuildsAvailableForAppleSiliconMac: return "iosBuildsAvailableForAppleSiliconMac" - case .isInternalGroup: return "isInternalGroup" - case .name: return "name" - case .publicLink: return "publicLink" - case .publicLinkEnabled: return "publicLinkEnabled" - case .publicLinkId: return "publicLinkId" - case .publicLinkLimit: return "publicLinkLimit" - case .publicLinkLimitEnabled: return "publicLinkLimitEnabled" - case .unknown(let rawValue): return rawValue - } + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "app": self = .app - case "betaTesters": self = .betaTesters - case "builds": self = .builds - case "createdDate": self = .createdDate - case "feedbackEnabled": self = .feedbackEnabled - case "hasAccessToAllBuilds": self = .hasAccessToAllBuilds - case "iosBuildsAvailableForAppleSiliconMac": self = .iosBuildsAvailableForAppleSiliconMac - case "isInternalGroup": self = .isInternalGroup - case "name": self = .name - case "publicLink": self = .publicLink - case "publicLinkEnabled": self = .publicLinkEnabled - case "publicLinkId": self = .publicLinkId - case "publicLinkLimit": self = .publicLinkLimit - case "publicLinkLimitEnabled": self = .publicLinkLimitEnabled - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum BetaLicenseAgreements: Hashable, Codable, RawRepresentable { - case agreementText - case app - case unknown(String) + public struct CiProducts: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var additionalRepositories: Self { + .init(rawValue: "additionalRepositories") + } + + public static var app: Self { + .init(rawValue: "app") + } - public var rawValue: String { - switch self { - case .agreementText: return "agreementText" - case .app: return "app" - case .unknown(let rawValue): return rawValue - } + public static var buildRuns: Self { + .init(rawValue: "buildRuns") } - public init(rawValue: String) { - switch rawValue { - case "agreementText": self = .agreementText - case "app": self = .app - default: self = .unknown(rawValue) - } + public static var bundleId: Self { + .init(rawValue: "bundleId") } - } - public enum Builds: Hashable, Codable, RawRepresentable { - case app - case appEncryptionDeclaration - case appStoreVersion - case betaAppReviewSubmission - case betaBuildLocalizations - case betaGroups - case buildAudienceType - case buildBetaDetail - case buildBundles - case computedMinMacOsVersion - case diagnosticSignatures - case expirationDate - case expired - case iconAssetToken - case icons - case individualTesters - case lsMinimumSystemVersion - case minOsVersion - case perfPowerMetrics - case preReleaseVersion - case processingState - case uploadedDate - case usesNonExemptEncryption - case version - case unknown(String) - - public var rawValue: String { - switch self { - case .app: return "app" - case .appEncryptionDeclaration: return "appEncryptionDeclaration" - case .appStoreVersion: return "appStoreVersion" - case .betaAppReviewSubmission: return "betaAppReviewSubmission" - case .betaBuildLocalizations: return "betaBuildLocalizations" - case .betaGroups: return "betaGroups" - case .buildAudienceType: return "buildAudienceType" - case .buildBetaDetail: return "buildBetaDetail" - case .buildBundles: return "buildBundles" - case .computedMinMacOsVersion: return "computedMinMacOsVersion" - case .diagnosticSignatures: return "diagnosticSignatures" - case .expirationDate: return "expirationDate" - case .expired: return "expired" - case .iconAssetToken: return "iconAssetToken" - case .icons: return "icons" - case .individualTesters: return "individualTesters" - case .lsMinimumSystemVersion: return "lsMinimumSystemVersion" - case .minOsVersion: return "minOsVersion" - case .perfPowerMetrics: return "perfPowerMetrics" - case .preReleaseVersion: return "preReleaseVersion" - case .processingState: return "processingState" - case .uploadedDate: return "uploadedDate" - case .usesNonExemptEncryption: return "usesNonExemptEncryption" - case .version: return "version" - case .unknown(let rawValue): return rawValue - } + public static var createdDate: Self { + .init(rawValue: "createdDate") } - public init(rawValue: String) { - switch rawValue { - case "app": self = .app - case "appEncryptionDeclaration": self = .appEncryptionDeclaration - case "appStoreVersion": self = .appStoreVersion - case "betaAppReviewSubmission": self = .betaAppReviewSubmission - case "betaBuildLocalizations": self = .betaBuildLocalizations - case "betaGroups": self = .betaGroups - case "buildAudienceType": self = .buildAudienceType - case "buildBetaDetail": self = .buildBetaDetail - case "buildBundles": self = .buildBundles - case "computedMinMacOsVersion": self = .computedMinMacOsVersion - case "diagnosticSignatures": self = .diagnosticSignatures - case "expirationDate": self = .expirationDate - case "expired": self = .expired - case "iconAssetToken": self = .iconAssetToken - case "icons": self = .icons - case "individualTesters": self = .individualTesters - case "lsMinimumSystemVersion": self = .lsMinimumSystemVersion - case "minOsVersion": self = .minOsVersion - case "perfPowerMetrics": self = .perfPowerMetrics - case "preReleaseVersion": self = .preReleaseVersion - case "processingState": self = .processingState - case "uploadedDate": self = .uploadedDate - case "usesNonExemptEncryption": self = .usesNonExemptEncryption - case "version": self = .version - default: self = .unknown(rawValue) - } + public static var name: Self { + .init(rawValue: "name") } - } - public enum CiProducts: Hashable, Codable, RawRepresentable { - case additionalRepositories - case app - case buildRuns - case bundleId - case createdDate - case name - case primaryRepositories - case productType - case workflows - case unknown(String) - - public var rawValue: String { - switch self { - case .additionalRepositories: return "additionalRepositories" - case .app: return "app" - case .buildRuns: return "buildRuns" - case .bundleId: return "bundleId" - case .createdDate: return "createdDate" - case .name: return "name" - case .primaryRepositories: return "primaryRepositories" - case .productType: return "productType" - case .workflows: return "workflows" - case .unknown(let rawValue): return rawValue - } + public static var primaryRepositories: Self { + .init(rawValue: "primaryRepositories") } - public init(rawValue: String) { - switch rawValue { - case "additionalRepositories": self = .additionalRepositories - case "app": self = .app - case "buildRuns": self = .buildRuns - case "bundleId": self = .bundleId - case "createdDate": self = .createdDate - case "name": self = .name - case "primaryRepositories": self = .primaryRepositories - case "productType": self = .productType - case "workflows": self = .workflows - default: self = .unknown(rawValue) - } + public static var productType: Self { + .init(rawValue: "productType") } - } - public enum EndUserLicenseAgreements: Hashable, Codable, RawRepresentable { - case agreementText - case app - case territories - case unknown(String) + public static var workflows: Self { + .init(rawValue: "workflows") + } - public var rawValue: String { - switch self { - case .agreementText: return "agreementText" - case .app: return "app" - case .territories: return "territories" - case .unknown(let rawValue): return rawValue - } + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "agreementText": self = .agreementText - case "app": self = .app - case "territories": self = .territories - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum GameCenterDetails: Hashable, Codable, RawRepresentable { - case achievementReleases - case app - case arcadeEnabled - case challengeEnabled - case defaultGroupLeaderboard - case defaultLeaderboard - case gameCenterAchievements - case gameCenterAppVersions - case gameCenterGroup - case gameCenterLeaderboardSets - case gameCenterLeaderboards - case leaderboardReleases - case leaderboardSetReleases - case unknown(String) - - public var rawValue: String { - switch self { - case .achievementReleases: return "achievementReleases" - case .app: return "app" - case .arcadeEnabled: return "arcadeEnabled" - case .challengeEnabled: return "challengeEnabled" - case .defaultGroupLeaderboard: return "defaultGroupLeaderboard" - case .defaultLeaderboard: return "defaultLeaderboard" - case .gameCenterAchievements: return "gameCenterAchievements" - case .gameCenterAppVersions: return "gameCenterAppVersions" - case .gameCenterGroup: return "gameCenterGroup" - case .gameCenterLeaderboardSets: return "gameCenterLeaderboardSets" - case .gameCenterLeaderboards: return "gameCenterLeaderboards" - case .leaderboardReleases: return "leaderboardReleases" - case .leaderboardSetReleases: return "leaderboardSetReleases" - case .unknown(let rawValue): return rawValue - } + public struct EndUserLicenseAgreements: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var agreementText: Self { + .init(rawValue: "agreementText") + } + + public static var app: Self { + .init(rawValue: "app") + } + + public static var territories: Self { + .init(rawValue: "territories") + } + + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "achievementReleases": self = .achievementReleases - case "app": self = .app - case "arcadeEnabled": self = .arcadeEnabled - case "challengeEnabled": self = .challengeEnabled - case "defaultGroupLeaderboard": self = .defaultGroupLeaderboard - case "defaultLeaderboard": self = .defaultLeaderboard - case "gameCenterAchievements": self = .gameCenterAchievements - case "gameCenterAppVersions": self = .gameCenterAppVersions - case "gameCenterGroup": self = .gameCenterGroup - case "gameCenterLeaderboardSets": self = .gameCenterLeaderboardSets - case "gameCenterLeaderboards": self = .gameCenterLeaderboards - case "leaderboardReleases": self = .leaderboardReleases - case "leaderboardSetReleases": self = .leaderboardSetReleases - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum GameCenterEnabledVersions: Hashable, Codable, RawRepresentable { - case app - case compatibleVersions - case iconAsset - case platform - case versionString - case unknown(String) - - public var rawValue: String { - switch self { - case .app: return "app" - case .compatibleVersions: return "compatibleVersions" - case .iconAsset: return "iconAsset" - case .platform: return "platform" - case .versionString: return "versionString" - case .unknown(let rawValue): return rawValue - } + public struct GameCenterDetails: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var achievementReleases: Self { + .init(rawValue: "achievementReleases") + } + + public static var activityReleases: Self { + .init(rawValue: "activityReleases") + } + + public static var app: Self { + .init(rawValue: "app") + } + + public static var arcadeEnabled: Self { + .init(rawValue: "arcadeEnabled") + } + + public static var challengeEnabled: Self { + .init(rawValue: "challengeEnabled") + } + + public static var challengeReleases: Self { + .init(rawValue: "challengeReleases") + } + + public static var challengesMinimumPlatformVersions: Self { + .init(rawValue: "challengesMinimumPlatformVersions") + } + + public static var defaultGroupLeaderboard: Self { + .init(rawValue: "defaultGroupLeaderboard") + } + + public static var defaultLeaderboard: Self { + .init(rawValue: "defaultLeaderboard") + } + + public static var gameCenterAchievements: Self { + .init(rawValue: "gameCenterAchievements") + } + + public static var gameCenterActivities: Self { + .init(rawValue: "gameCenterActivities") + } + + public static var gameCenterAppVersions: Self { + .init(rawValue: "gameCenterAppVersions") + } + + public static var gameCenterChallenges: Self { + .init(rawValue: "gameCenterChallenges") + } + + public static var gameCenterGroup: Self { + .init(rawValue: "gameCenterGroup") + } + + public static var gameCenterLeaderboardSets: Self { + .init(rawValue: "gameCenterLeaderboardSets") + } + + public static var gameCenterLeaderboards: Self { + .init(rawValue: "gameCenterLeaderboards") + } + + public static var leaderboardReleases: Self { + .init(rawValue: "leaderboardReleases") + } + + public static var leaderboardSetReleases: Self { + .init(rawValue: "leaderboardSetReleases") + } + + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "app": self = .app - case "compatibleVersions": self = .compatibleVersions - case "iconAsset": self = .iconAsset - case "platform": self = .platform - case "versionString": self = .versionString - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum InAppPurchases: Hashable, Codable, RawRepresentable { - case app - case appStoreReviewScreenshot - case apps - case availableInAllTerritories - case content - case contentHosting - case familySharable - case iapPriceSchedule - case inAppPurchaseAvailability - case inAppPurchaseLocalizations - case inAppPurchaseType - case name - case pricePoints - case productId - case promotedPurchase - case referenceName - case reviewNote - case state - case unknown(String) - - public var rawValue: String { - switch self { - case .app: return "app" - case .appStoreReviewScreenshot: return "appStoreReviewScreenshot" - case .apps: return "apps" - case .availableInAllTerritories: return "availableInAllTerritories" - case .content: return "content" - case .contentHosting: return "contentHosting" - case .familySharable: return "familySharable" - case .iapPriceSchedule: return "iapPriceSchedule" - case .inAppPurchaseAvailability: return "inAppPurchaseAvailability" - case .inAppPurchaseLocalizations: return "inAppPurchaseLocalizations" - case .inAppPurchaseType: return "inAppPurchaseType" - case .name: return "name" - case .pricePoints: return "pricePoints" - case .productId: return "productId" - case .promotedPurchase: return "promotedPurchase" - case .referenceName: return "referenceName" - case .reviewNote: return "reviewNote" - case .state: return "state" - case .unknown(let rawValue): return rawValue - } + public struct GameCenterEnabledVersions: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var app: Self { + .init(rawValue: "app") + } + + public static var compatibleVersions: Self { + .init(rawValue: "compatibleVersions") + } + + public static var iconAsset: Self { + .init(rawValue: "iconAsset") + } + + public static var platform: Self { + .init(rawValue: "platform") + } + + public static var versionString: Self { + .init(rawValue: "versionString") + } + + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "app": self = .app - case "appStoreReviewScreenshot": self = .appStoreReviewScreenshot - case "apps": self = .apps - case "availableInAllTerritories": self = .availableInAllTerritories - case "content": self = .content - case "contentHosting": self = .contentHosting - case "familySharable": self = .familySharable - case "iapPriceSchedule": self = .iapPriceSchedule - case "inAppPurchaseAvailability": self = .inAppPurchaseAvailability - case "inAppPurchaseLocalizations": self = .inAppPurchaseLocalizations - case "inAppPurchaseType": self = .inAppPurchaseType - case "name": self = .name - case "pricePoints": self = .pricePoints - case "productId": self = .productId - case "promotedPurchase": self = .promotedPurchase - case "referenceName": self = .referenceName - case "reviewNote": self = .reviewNote - case "state": self = .state - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum PreReleaseVersions: Hashable, Codable, RawRepresentable { - case app - case builds - case platform - case version - case unknown(String) + public struct InAppPurchases: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var appStoreReviewScreenshot: Self { + .init(rawValue: "appStoreReviewScreenshot") + } + + public static var apps: Self { + .init(rawValue: "apps") + } + + public static var content: Self { + .init(rawValue: "content") + } + + public static var contentHosting: Self { + .init(rawValue: "contentHosting") + } + + public static var familySharable: Self { + .init(rawValue: "familySharable") + } + + public static var iapPriceSchedule: Self { + .init(rawValue: "iapPriceSchedule") + } + + public static var images: Self { + .init(rawValue: "images") + } + + public static var inAppPurchaseAvailability: Self { + .init(rawValue: "inAppPurchaseAvailability") + } + + public static var inAppPurchaseLocalizations: Self { + .init(rawValue: "inAppPurchaseLocalizations") + } + + public static var inAppPurchaseType: Self { + .init(rawValue: "inAppPurchaseType") + } + + public static var name: Self { + .init(rawValue: "name") + } + + public static var pricePoints: Self { + .init(rawValue: "pricePoints") + } + + public static var productId: Self { + .init(rawValue: "productId") + } + + public static var promotedPurchase: Self { + .init(rawValue: "promotedPurchase") + } + + public static var referenceName: Self { + .init(rawValue: "referenceName") + } + + public static var reviewNote: Self { + .init(rawValue: "reviewNote") + } + + public static var state: Self { + .init(rawValue: "state") + } - public var rawValue: String { - switch self { - case .app: return "app" - case .builds: return "builds" - case .platform: return "platform" - case .version: return "version" - case .unknown(let rawValue): return rawValue - } + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "app": self = .app - case "builds": self = .builds - case "platform": self = .platform - case "version": self = .version - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum PromotedPurchases: Hashable, Codable, RawRepresentable { - case app - case enabled - case inAppPurchaseV2 - case promotionImages - case state - case subscription - case visibleForAllUsers - case unknown(String) - - public var rawValue: String { - switch self { - case .app: return "app" - case .enabled: return "enabled" - case .inAppPurchaseV2: return "inAppPurchaseV2" - case .promotionImages: return "promotionImages" - case .state: return "state" - case .subscription: return "subscription" - case .visibleForAllUsers: return "visibleForAllUsers" - case .unknown(let rawValue): return rawValue - } + public struct PreReleaseVersions: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var app: Self { + .init(rawValue: "app") + } + + public static var builds: Self { + .init(rawValue: "builds") + } + + public static var platform: Self { + .init(rawValue: "platform") + } + + public static var version: Self { + .init(rawValue: "version") + } + + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "app": self = .app - case "enabled": self = .enabled - case "inAppPurchaseV2": self = .inAppPurchaseV2 - case "promotionImages": self = .promotionImages - case "state": self = .state - case "subscription": self = .subscription - case "visibleForAllUsers": self = .visibleForAllUsers - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum ReviewSubmissions: Hashable, Codable, RawRepresentable { - case app - case appStoreVersionForReview - case canceled - case items - case lastUpdatedByActor - case platform - case state - case submitted - case submittedByActor - case submittedDate - case unknown(String) - - public var rawValue: String { - switch self { - case .app: return "app" - case .appStoreVersionForReview: return "appStoreVersionForReview" - case .canceled: return "canceled" - case .items: return "items" - case .lastUpdatedByActor: return "lastUpdatedByActor" - case .platform: return "platform" - case .state: return "state" - case .submitted: return "submitted" - case .submittedByActor: return "submittedByActor" - case .submittedDate: return "submittedDate" - case .unknown(let rawValue): return rawValue - } + public struct PromotedPurchases: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var enabled: Self { + .init(rawValue: "enabled") + } + + public static var inAppPurchaseV2: Self { + .init(rawValue: "inAppPurchaseV2") + } + + public static var state: Self { + .init(rawValue: "state") } + public static var subscription: Self { + .init(rawValue: "subscription") + } + + public static var visibleForAllUsers: Self { + .init(rawValue: "visibleForAllUsers") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "app": self = .app - case "appStoreVersionForReview": self = .appStoreVersionForReview - case "canceled": self = .canceled - case "items": self = .items - case "lastUpdatedByActor": self = .lastUpdatedByActor - case "platform": self = .platform - case "state": self = .state - case "submitted": self = .submitted - case "submittedByActor": self = .submittedByActor - case "submittedDate": self = .submittedDate - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum SubscriptionGracePeriods: Hashable, Codable, RawRepresentable { - case duration - case optIn - case renewalType - case sandboxOptIn - case unknown(String) + public struct ReviewSubmissions: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var app: Self { + .init(rawValue: "app") + } + + public static var appStoreVersionForReview: Self { + .init(rawValue: "appStoreVersionForReview") + } + + public static var items: Self { + .init(rawValue: "items") + } + + public static var lastUpdatedByActor: Self { + .init(rawValue: "lastUpdatedByActor") + } + + public static var platform: Self { + .init(rawValue: "platform") + } + + public static var state: Self { + .init(rawValue: "state") + } + + public static var submittedByActor: Self { + .init(rawValue: "submittedByActor") + } + + public static var submittedDate: Self { + .init(rawValue: "submittedDate") + } - public var rawValue: String { - switch self { - case .duration: return "duration" - case .optIn: return "optIn" - case .renewalType: return "renewalType" - case .sandboxOptIn: return "sandboxOptIn" - case .unknown(let rawValue): return rawValue - } + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "duration": self = .duration - case "optIn": self = .optIn - case "renewalType": self = .renewalType - case "sandboxOptIn": self = .sandboxOptIn - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum SubscriptionGroups: Hashable, Codable, RawRepresentable { - case app - case referenceName - case subscriptionGroupLocalizations - case subscriptions - case unknown(String) + public struct SubscriptionGracePeriods: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var duration: Self { + .init(rawValue: "duration") + } + + public static var optIn: Self { + .init(rawValue: "optIn") + } + + public static var renewalType: Self { + .init(rawValue: "renewalType") + } + + public static var sandboxOptIn: Self { + .init(rawValue: "sandboxOptIn") + } - public var rawValue: String { - switch self { - case .app: return "app" - case .referenceName: return "referenceName" - case .subscriptionGroupLocalizations: return "subscriptionGroupLocalizations" - case .subscriptions: return "subscriptions" - case .unknown(let rawValue): return rawValue - } + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "app": self = .app - case "referenceName": self = .referenceName - case "subscriptionGroupLocalizations": self = .subscriptionGroupLocalizations - case "subscriptions": self = .subscriptions - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum Territories: Hashable, Codable, RawRepresentable { - case currency - case unknown(String) + public struct SubscriptionGroups: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var referenceName: Self { + .init(rawValue: "referenceName") + } + + public static var subscriptionGroupLocalizations: Self { + .init(rawValue: "subscriptionGroupLocalizations") + } + + public static var subscriptions: Self { + .init(rawValue: "subscriptions") + } - public var rawValue: String { - switch self { - case .currency: return "currency" - case .unknown(let rawValue): return rawValue - } + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "currency": self = .currency - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } @@ -1426,16 +1585,6 @@ extension V1.CiProducts.ById.App.GET { .init(key: "fields[appInfos]") } - /// the fields to include for returned resources of type appPreOrders - public static var appPreOrders: Relation<[AppPreOrders]?> { - .init(key: "fields[appPreOrders]") - } - - /// the fields to include for returned resources of type appPrices - public static var appPrices: Relation<[AppPrices]?> { - .init(key: "fields[appPrices]") - } - /// the fields to include for returned resources of type appStoreVersionExperiments public static var appStoreVersionExperiments: Relation<[AppStoreVersionExperiments]?> { .init(key: "fields[appStoreVersionExperiments]") @@ -1526,11 +1675,6 @@ extension V1.CiProducts.ById.App.GET { .init(key: "fields[subscriptionGroups]") } - /// the fields to include for returned resources of type territories - public static var territories: Relation<[Territories]?> { - .init(key: "fields[territories]") - } - internal let key: String public func hash(into hasher: inout Hasher) { @@ -1539,97 +1683,107 @@ extension V1.CiProducts.ById.App.GET { } } - public enum Include: Hashable, Codable, RawRepresentable { - case appClips - case appCustomProductPages - case appEncryptionDeclarations - case appEvents - case appInfos - case appStoreVersionExperimentsV2 - case appStoreVersions - case availableTerritories - case betaAppLocalizations - case betaAppReviewDetail - case betaGroups - case betaLicenseAgreement - case builds - case ciProduct - case endUserLicenseAgreement - case gameCenterDetail - case gameCenterEnabledVersions - case inAppPurchases - case inAppPurchasesV2 - case preOrder - case preReleaseVersions - case prices - case promotedPurchases - case reviewSubmissions - case subscriptionGracePeriod - case subscriptionGroups - case unknown(String) - - public var rawValue: String { - switch self { - case .appClips: return "appClips" - case .appCustomProductPages: return "appCustomProductPages" - case .appEncryptionDeclarations: return "appEncryptionDeclarations" - case .appEvents: return "appEvents" - case .appInfos: return "appInfos" - case .appStoreVersionExperimentsV2: return "appStoreVersionExperimentsV2" - case .appStoreVersions: return "appStoreVersions" - case .availableTerritories: return "availableTerritories" - case .betaAppLocalizations: return "betaAppLocalizations" - case .betaAppReviewDetail: return "betaAppReviewDetail" - case .betaGroups: return "betaGroups" - case .betaLicenseAgreement: return "betaLicenseAgreement" - case .builds: return "builds" - case .ciProduct: return "ciProduct" - case .endUserLicenseAgreement: return "endUserLicenseAgreement" - case .gameCenterDetail: return "gameCenterDetail" - case .gameCenterEnabledVersions: return "gameCenterEnabledVersions" - case .inAppPurchases: return "inAppPurchases" - case .inAppPurchasesV2: return "inAppPurchasesV2" - case .preOrder: return "preOrder" - case .preReleaseVersions: return "preReleaseVersions" - case .prices: return "prices" - case .promotedPurchases: return "promotedPurchases" - case .reviewSubmissions: return "reviewSubmissions" - case .subscriptionGracePeriod: return "subscriptionGracePeriod" - case .subscriptionGroups: return "subscriptionGroups" - case .unknown(let rawValue): return rawValue - } + public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var appClips: Self { + .init(rawValue: "appClips") + } + + public static var appCustomProductPages: Self { + .init(rawValue: "appCustomProductPages") + } + + public static var appEncryptionDeclarations: Self { + .init(rawValue: "appEncryptionDeclarations") + } + + public static var appEvents: Self { + .init(rawValue: "appEvents") + } + + public static var appInfos: Self { + .init(rawValue: "appInfos") + } + + public static var appStoreVersionExperimentsV2: Self { + .init(rawValue: "appStoreVersionExperimentsV2") + } + + public static var appStoreVersions: Self { + .init(rawValue: "appStoreVersions") + } + + public static var betaAppLocalizations: Self { + .init(rawValue: "betaAppLocalizations") + } + + public static var betaAppReviewDetail: Self { + .init(rawValue: "betaAppReviewDetail") + } + + public static var betaGroups: Self { + .init(rawValue: "betaGroups") + } + + public static var betaLicenseAgreement: Self { + .init(rawValue: "betaLicenseAgreement") } + public static var builds: Self { + .init(rawValue: "builds") + } + + public static var ciProduct: Self { + .init(rawValue: "ciProduct") + } + + public static var endUserLicenseAgreement: Self { + .init(rawValue: "endUserLicenseAgreement") + } + + public static var gameCenterDetail: Self { + .init(rawValue: "gameCenterDetail") + } + + public static var gameCenterEnabledVersions: Self { + .init(rawValue: "gameCenterEnabledVersions") + } + + public static var inAppPurchases: Self { + .init(rawValue: "inAppPurchases") + } + + public static var inAppPurchasesV2: Self { + .init(rawValue: "inAppPurchasesV2") + } + + public static var preReleaseVersions: Self { + .init(rawValue: "preReleaseVersions") + } + + public static var promotedPurchases: Self { + .init(rawValue: "promotedPurchases") + } + + public static var reviewSubmissions: Self { + .init(rawValue: "reviewSubmissions") + } + + public static var subscriptionGracePeriod: Self { + .init(rawValue: "subscriptionGracePeriod") + } + + public static var subscriptionGroups: Self { + .init(rawValue: "subscriptionGroups") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "appClips": self = .appClips - case "appCustomProductPages": self = .appCustomProductPages - case "appEncryptionDeclarations": self = .appEncryptionDeclarations - case "appEvents": self = .appEvents - case "appInfos": self = .appInfos - case "appStoreVersionExperimentsV2": self = .appStoreVersionExperimentsV2 - case "appStoreVersions": self = .appStoreVersions - case "availableTerritories": self = .availableTerritories - case "betaAppLocalizations": self = .betaAppLocalizations - case "betaAppReviewDetail": self = .betaAppReviewDetail - case "betaGroups": self = .betaGroups - case "betaLicenseAgreement": self = .betaLicenseAgreement - case "builds": self = .builds - case "ciProduct": self = .ciProduct - case "endUserLicenseAgreement": self = .endUserLicenseAgreement - case "gameCenterDetail": self = .gameCenterDetail - case "gameCenterEnabledVersions": self = .gameCenterEnabledVersions - case "inAppPurchases": self = .inAppPurchases - case "inAppPurchasesV2": self = .inAppPurchasesV2 - case "preOrder": self = .preOrder - case "preReleaseVersions": self = .preReleaseVersions - case "prices": self = .prices - case "promotedPurchases": self = .promotedPurchases - case "reviewSubmissions": self = .reviewSubmissions - case "subscriptionGracePeriod": self = .subscriptionGracePeriod - case "subscriptionGroups": self = .subscriptionGroups - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } @@ -1677,11 +1831,6 @@ extension V1.CiProducts.ById.App.GET { .init(key: "limit[appStoreVersions]") } - /// maximum number of related availableTerritories returned (when they are included) - public static var availableTerritories: Relation { - .init(key: "limit[availableTerritories]") - } - /// maximum number of related betaAppLocalizations returned (when they are included) public static var betaAppLocalizations: Relation { .init(key: "limit[betaAppLocalizations]") @@ -1717,11 +1866,6 @@ extension V1.CiProducts.ById.App.GET { .init(key: "limit[preReleaseVersions]") } - /// maximum number of related prices returned (when they are included) - public static var prices: Relation { - .init(key: "limit[prices]") - } - /// maximum number of related promotedPurchases returned (when they are included) public static var promotedPurchases: Relation { .init(key: "limit[promotedPurchases]") diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/CiProducts/ById/BuildRuns/CiProductsByIdBuildRuns.GET.259afcd.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/CiProducts/ById/BuildRuns/CiProductsByIdBuildRuns.GET.259afcd.generated.swift index 5e581edb..2b0c9203 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/CiProducts/ById/BuildRuns/CiProductsByIdBuildRuns.GET.259afcd.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/CiProducts/ById/BuildRuns/CiProductsByIdBuildRuns.GET.259afcd.generated.swift @@ -47,7 +47,9 @@ extension V1.CiProducts.ById.BuildRuns { URLQueryItem(name: "limit[builds]", value: parameters.limit[.builds].map { "\($0)" }), URLQueryItem(name: "limit", - value: parameters.limit[].map { "\($0)" }) + value: parameters.limit[].map { "\($0)" }), + URLQueryItem(name: "sort", + value: parameters.sort?.map { "\($0)" }.joined(separator: ",")) ].filter { $0.value != nil } if components?.queryItems?.isEmpty ?? false { components?.queryItems = nil @@ -60,8 +62,10 @@ extension V1.CiProducts.ById.BuildRuns { /// - Returns: **200**, List of CiBuildRuns as `CiBuildRunsResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -75,12 +79,18 @@ extension V1.CiProducts.ById.BuildRuns { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 404: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -100,6 +110,9 @@ extension V1.CiProducts.ById.BuildRuns.GET { /// maximum resources per page public var limit: Limit = Limit() + /// comma-separated list of sort expressions; resources will be sorted as specified + public var sort: [Sort]? + public struct Fields: Hashable { public subscript (_ relation: Relation) -> T { get { values[relation]?.base as! T } @@ -108,363 +121,435 @@ extension V1.CiProducts.ById.BuildRuns.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum Builds: Hashable, Codable, RawRepresentable { - case app - case appEncryptionDeclaration - case appStoreVersion - case betaAppReviewSubmission - case betaBuildLocalizations - case betaGroups - case buildAudienceType - case buildBetaDetail - case buildBundles - case computedMinMacOsVersion - case diagnosticSignatures - case expirationDate - case expired - case iconAssetToken - case icons - case individualTesters - case lsMinimumSystemVersion - case minOsVersion - case perfPowerMetrics - case preReleaseVersion - case processingState - case uploadedDate - case usesNonExemptEncryption - case version - case unknown(String) - - public var rawValue: String { - switch self { - case .app: return "app" - case .appEncryptionDeclaration: return "appEncryptionDeclaration" - case .appStoreVersion: return "appStoreVersion" - case .betaAppReviewSubmission: return "betaAppReviewSubmission" - case .betaBuildLocalizations: return "betaBuildLocalizations" - case .betaGroups: return "betaGroups" - case .buildAudienceType: return "buildAudienceType" - case .buildBetaDetail: return "buildBetaDetail" - case .buildBundles: return "buildBundles" - case .computedMinMacOsVersion: return "computedMinMacOsVersion" - case .diagnosticSignatures: return "diagnosticSignatures" - case .expirationDate: return "expirationDate" - case .expired: return "expired" - case .iconAssetToken: return "iconAssetToken" - case .icons: return "icons" - case .individualTesters: return "individualTesters" - case .lsMinimumSystemVersion: return "lsMinimumSystemVersion" - case .minOsVersion: return "minOsVersion" - case .perfPowerMetrics: return "perfPowerMetrics" - case .preReleaseVersion: return "preReleaseVersion" - case .processingState: return "processingState" - case .uploadedDate: return "uploadedDate" - case .usesNonExemptEncryption: return "usesNonExemptEncryption" - case .version: return "version" - case .unknown(let rawValue): return rawValue - } + public struct Builds: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var app: Self { + .init(rawValue: "app") + } + + public static var appEncryptionDeclaration: Self { + .init(rawValue: "appEncryptionDeclaration") + } + + public static var appStoreVersion: Self { + .init(rawValue: "appStoreVersion") + } + + public static var betaAppReviewSubmission: Self { + .init(rawValue: "betaAppReviewSubmission") + } + + public static var betaBuildLocalizations: Self { + .init(rawValue: "betaBuildLocalizations") + } + + public static var betaGroups: Self { + .init(rawValue: "betaGroups") + } + + public static var buildAudienceType: Self { + .init(rawValue: "buildAudienceType") + } + + public static var buildBetaDetail: Self { + .init(rawValue: "buildBetaDetail") + } + + public static var buildBundles: Self { + .init(rawValue: "buildBundles") + } + + public static var computedMinMacOsVersion: Self { + .init(rawValue: "computedMinMacOsVersion") + } + + public static var computedMinVisionOsVersion: Self { + .init(rawValue: "computedMinVisionOsVersion") + } + + public static var diagnosticSignatures: Self { + .init(rawValue: "diagnosticSignatures") + } + + public static var expirationDate: Self { + .init(rawValue: "expirationDate") + } + + public static var expired: Self { + .init(rawValue: "expired") + } + + public static var iconAssetToken: Self { + .init(rawValue: "iconAssetToken") + } + + public static var icons: Self { + .init(rawValue: "icons") + } + + public static var individualTesters: Self { + .init(rawValue: "individualTesters") + } + + public static var lsMinimumSystemVersion: Self { + .init(rawValue: "lsMinimumSystemVersion") + } + + public static var minOsVersion: Self { + .init(rawValue: "minOsVersion") + } + + public static var perfPowerMetrics: Self { + .init(rawValue: "perfPowerMetrics") + } + + public static var preReleaseVersion: Self { + .init(rawValue: "preReleaseVersion") + } + + public static var processingState: Self { + .init(rawValue: "processingState") + } + + public static var uploadedDate: Self { + .init(rawValue: "uploadedDate") + } + + public static var usesNonExemptEncryption: Self { + .init(rawValue: "usesNonExemptEncryption") + } + + public static var version: Self { + .init(rawValue: "version") + } + + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "app": self = .app - case "appEncryptionDeclaration": self = .appEncryptionDeclaration - case "appStoreVersion": self = .appStoreVersion - case "betaAppReviewSubmission": self = .betaAppReviewSubmission - case "betaBuildLocalizations": self = .betaBuildLocalizations - case "betaGroups": self = .betaGroups - case "buildAudienceType": self = .buildAudienceType - case "buildBetaDetail": self = .buildBetaDetail - case "buildBundles": self = .buildBundles - case "computedMinMacOsVersion": self = .computedMinMacOsVersion - case "diagnosticSignatures": self = .diagnosticSignatures - case "expirationDate": self = .expirationDate - case "expired": self = .expired - case "iconAssetToken": self = .iconAssetToken - case "icons": self = .icons - case "individualTesters": self = .individualTesters - case "lsMinimumSystemVersion": self = .lsMinimumSystemVersion - case "minOsVersion": self = .minOsVersion - case "perfPowerMetrics": self = .perfPowerMetrics - case "preReleaseVersion": self = .preReleaseVersion - case "processingState": self = .processingState - case "uploadedDate": self = .uploadedDate - case "usesNonExemptEncryption": self = .usesNonExemptEncryption - case "version": self = .version - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum CiBuildRuns: Hashable, Codable, RawRepresentable { - case actions - case buildRun - case builds - case cancelReason - case clean - case completionStatus - case createdDate - case destinationBranch - case destinationCommit - case executionProgress - case finishedDate - case isPullRequestBuild - case issueCounts - case number - case product - case pullRequest - case sourceBranchOrTag - case sourceCommit - case startReason - case startedDate - case workflow - case unknown(String) - - public var rawValue: String { - switch self { - case .actions: return "actions" - case .buildRun: return "buildRun" - case .builds: return "builds" - case .cancelReason: return "cancelReason" - case .clean: return "clean" - case .completionStatus: return "completionStatus" - case .createdDate: return "createdDate" - case .destinationBranch: return "destinationBranch" - case .destinationCommit: return "destinationCommit" - case .executionProgress: return "executionProgress" - case .finishedDate: return "finishedDate" - case .isPullRequestBuild: return "isPullRequestBuild" - case .issueCounts: return "issueCounts" - case .number: return "number" - case .product: return "product" - case .pullRequest: return "pullRequest" - case .sourceBranchOrTag: return "sourceBranchOrTag" - case .sourceCommit: return "sourceCommit" - case .startReason: return "startReason" - case .startedDate: return "startedDate" - case .workflow: return "workflow" - case .unknown(let rawValue): return rawValue - } + public struct CiBuildRuns: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var actions: Self { + .init(rawValue: "actions") + } + + public static var builds: Self { + .init(rawValue: "builds") + } + + public static var cancelReason: Self { + .init(rawValue: "cancelReason") + } + + public static var completionStatus: Self { + .init(rawValue: "completionStatus") + } + + public static var createdDate: Self { + .init(rawValue: "createdDate") + } + + public static var destinationBranch: Self { + .init(rawValue: "destinationBranch") + } + + public static var destinationCommit: Self { + .init(rawValue: "destinationCommit") + } + + public static var executionProgress: Self { + .init(rawValue: "executionProgress") + } + + public static var finishedDate: Self { + .init(rawValue: "finishedDate") + } + + public static var isPullRequestBuild: Self { + .init(rawValue: "isPullRequestBuild") + } + + public static var issueCounts: Self { + .init(rawValue: "issueCounts") + } + + public static var number: Self { + .init(rawValue: "number") + } + + public static var product: Self { + .init(rawValue: "product") + } + + public static var pullRequest: Self { + .init(rawValue: "pullRequest") } + public static var sourceBranchOrTag: Self { + .init(rawValue: "sourceBranchOrTag") + } + + public static var sourceCommit: Self { + .init(rawValue: "sourceCommit") + } + + public static var startReason: Self { + .init(rawValue: "startReason") + } + + public static var startedDate: Self { + .init(rawValue: "startedDate") + } + + public static var workflow: Self { + .init(rawValue: "workflow") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "actions": self = .actions - case "buildRun": self = .buildRun - case "builds": self = .builds - case "cancelReason": self = .cancelReason - case "clean": self = .clean - case "completionStatus": self = .completionStatus - case "createdDate": self = .createdDate - case "destinationBranch": self = .destinationBranch - case "destinationCommit": self = .destinationCommit - case "executionProgress": self = .executionProgress - case "finishedDate": self = .finishedDate - case "isPullRequestBuild": self = .isPullRequestBuild - case "issueCounts": self = .issueCounts - case "number": self = .number - case "product": self = .product - case "pullRequest": self = .pullRequest - case "sourceBranchOrTag": self = .sourceBranchOrTag - case "sourceCommit": self = .sourceCommit - case "startReason": self = .startReason - case "startedDate": self = .startedDate - case "workflow": self = .workflow - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum CiProducts: Hashable, Codable, RawRepresentable { - case additionalRepositories - case app - case buildRuns - case bundleId - case createdDate - case name - case primaryRepositories - case productType - case workflows - case unknown(String) - - public var rawValue: String { - switch self { - case .additionalRepositories: return "additionalRepositories" - case .app: return "app" - case .buildRuns: return "buildRuns" - case .bundleId: return "bundleId" - case .createdDate: return "createdDate" - case .name: return "name" - case .primaryRepositories: return "primaryRepositories" - case .productType: return "productType" - case .workflows: return "workflows" - case .unknown(let rawValue): return rawValue - } + public struct CiProducts: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var additionalRepositories: Self { + .init(rawValue: "additionalRepositories") + } + + public static var app: Self { + .init(rawValue: "app") + } + + public static var buildRuns: Self { + .init(rawValue: "buildRuns") + } + + public static var bundleId: Self { + .init(rawValue: "bundleId") + } + + public static var createdDate: Self { + .init(rawValue: "createdDate") + } + + public static var name: Self { + .init(rawValue: "name") + } + + public static var primaryRepositories: Self { + .init(rawValue: "primaryRepositories") + } + + public static var productType: Self { + .init(rawValue: "productType") } + public static var workflows: Self { + .init(rawValue: "workflows") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "additionalRepositories": self = .additionalRepositories - case "app": self = .app - case "buildRuns": self = .buildRuns - case "bundleId": self = .bundleId - case "createdDate": self = .createdDate - case "name": self = .name - case "primaryRepositories": self = .primaryRepositories - case "productType": self = .productType - case "workflows": self = .workflows - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum CiWorkflows: Hashable, Codable, RawRepresentable { - case actions - case branchStartCondition - case buildRuns - case clean - case containerFilePath - case description - case isEnabled - case isLockedForEditing - case lastModifiedDate - case macOsVersion - case name - case product - case pullRequestStartCondition - case repository - case scheduledStartCondition - case tagStartCondition - case xcodeVersion - case unknown(String) - - public var rawValue: String { - switch self { - case .actions: return "actions" - case .branchStartCondition: return "branchStartCondition" - case .buildRuns: return "buildRuns" - case .clean: return "clean" - case .containerFilePath: return "containerFilePath" - case .description: return "description" - case .isEnabled: return "isEnabled" - case .isLockedForEditing: return "isLockedForEditing" - case .lastModifiedDate: return "lastModifiedDate" - case .macOsVersion: return "macOsVersion" - case .name: return "name" - case .product: return "product" - case .pullRequestStartCondition: return "pullRequestStartCondition" - case .repository: return "repository" - case .scheduledStartCondition: return "scheduledStartCondition" - case .tagStartCondition: return "tagStartCondition" - case .xcodeVersion: return "xcodeVersion" - case .unknown(let rawValue): return rawValue - } + public struct CiWorkflows: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var actions: Self { + .init(rawValue: "actions") + } + + public static var branchStartCondition: Self { + .init(rawValue: "branchStartCondition") + } + + public static var buildRuns: Self { + .init(rawValue: "buildRuns") + } + + public static var clean: Self { + .init(rawValue: "clean") + } + + public static var containerFilePath: Self { + .init(rawValue: "containerFilePath") + } + + public static var description: Self { + .init(rawValue: "description") + } + + public static var isEnabled: Self { + .init(rawValue: "isEnabled") + } + + public static var isLockedForEditing: Self { + .init(rawValue: "isLockedForEditing") + } + + public static var lastModifiedDate: Self { + .init(rawValue: "lastModifiedDate") + } + + public static var macOsVersion: Self { + .init(rawValue: "macOsVersion") + } + + public static var manualBranchStartCondition: Self { + .init(rawValue: "manualBranchStartCondition") + } + + public static var manualPullRequestStartCondition: Self { + .init(rawValue: "manualPullRequestStartCondition") } + public static var manualTagStartCondition: Self { + .init(rawValue: "manualTagStartCondition") + } + + public static var name: Self { + .init(rawValue: "name") + } + + public static var product: Self { + .init(rawValue: "product") + } + + public static var pullRequestStartCondition: Self { + .init(rawValue: "pullRequestStartCondition") + } + + public static var repository: Self { + .init(rawValue: "repository") + } + + public static var scheduledStartCondition: Self { + .init(rawValue: "scheduledStartCondition") + } + + public static var tagStartCondition: Self { + .init(rawValue: "tagStartCondition") + } + + public static var xcodeVersion: Self { + .init(rawValue: "xcodeVersion") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "actions": self = .actions - case "branchStartCondition": self = .branchStartCondition - case "buildRuns": self = .buildRuns - case "clean": self = .clean - case "containerFilePath": self = .containerFilePath - case "description": self = .description - case "isEnabled": self = .isEnabled - case "isLockedForEditing": self = .isLockedForEditing - case "lastModifiedDate": self = .lastModifiedDate - case "macOsVersion": self = .macOsVersion - case "name": self = .name - case "product": self = .product - case "pullRequestStartCondition": self = .pullRequestStartCondition - case "repository": self = .repository - case "scheduledStartCondition": self = .scheduledStartCondition - case "tagStartCondition": self = .tagStartCondition - case "xcodeVersion": self = .xcodeVersion - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum ScmGitReferences: Hashable, Codable, RawRepresentable { - case canonicalName - case isDeleted - case kind - case name - case repository - case unknown(String) - - public var rawValue: String { - switch self { - case .canonicalName: return "canonicalName" - case .isDeleted: return "isDeleted" - case .kind: return "kind" - case .name: return "name" - case .repository: return "repository" - case .unknown(let rawValue): return rawValue - } + public struct ScmGitReferences: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var canonicalName: Self { + .init(rawValue: "canonicalName") + } + + public static var isDeleted: Self { + .init(rawValue: "isDeleted") + } + + public static var kind: Self { + .init(rawValue: "kind") + } + + public static var name: Self { + .init(rawValue: "name") + } + + public static var repository: Self { + .init(rawValue: "repository") } + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "canonicalName": self = .canonicalName - case "isDeleted": self = .isDeleted - case "kind": self = .kind - case "name": self = .name - case "repository": self = .repository - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum ScmPullRequests: Hashable, Codable, RawRepresentable { - case destinationBranchName - case destinationRepositoryName - case destinationRepositoryOwner - case isClosed - case isCrossRepository - case number - case repository - case sourceBranchName - case sourceRepositoryName - case sourceRepositoryOwner - case title - case webUrl - case unknown(String) - - public var rawValue: String { - switch self { - case .destinationBranchName: return "destinationBranchName" - case .destinationRepositoryName: return "destinationRepositoryName" - case .destinationRepositoryOwner: return "destinationRepositoryOwner" - case .isClosed: return "isClosed" - case .isCrossRepository: return "isCrossRepository" - case .number: return "number" - case .repository: return "repository" - case .sourceBranchName: return "sourceBranchName" - case .sourceRepositoryName: return "sourceRepositoryName" - case .sourceRepositoryOwner: return "sourceRepositoryOwner" - case .title: return "title" - case .webUrl: return "webUrl" - case .unknown(let rawValue): return rawValue - } + public struct ScmPullRequests: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var destinationBranchName: Self { + .init(rawValue: "destinationBranchName") + } + + public static var destinationRepositoryName: Self { + .init(rawValue: "destinationRepositoryName") + } + + public static var destinationRepositoryOwner: Self { + .init(rawValue: "destinationRepositoryOwner") + } + + public static var isClosed: Self { + .init(rawValue: "isClosed") + } + + public static var isCrossRepository: Self { + .init(rawValue: "isCrossRepository") + } + + public static var number: Self { + .init(rawValue: "number") + } + + public static var repository: Self { + .init(rawValue: "repository") + } + + public static var sourceBranchName: Self { + .init(rawValue: "sourceBranchName") + } + + public static var sourceRepositoryName: Self { + .init(rawValue: "sourceRepositoryName") + } + + public static var sourceRepositoryOwner: Self { + .init(rawValue: "sourceRepositoryOwner") + } + + public static var title: Self { + .init(rawValue: "title") + } + + public static var webUrl: Self { + .init(rawValue: "webUrl") + } + + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "destinationBranchName": self = .destinationBranchName - case "destinationRepositoryName": self = .destinationRepositoryName - case "destinationRepositoryOwner": self = .destinationRepositoryOwner - case "isClosed": self = .isClosed - case "isCrossRepository": self = .isCrossRepository - case "number": self = .number - case "repository": self = .repository - case "sourceBranchName": self = .sourceBranchName - case "sourceRepositoryName": self = .sourceRepositoryName - case "sourceRepositoryOwner": self = .sourceRepositoryOwner - case "title": self = .title - case "webUrl": self = .webUrl - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } @@ -529,37 +614,39 @@ extension V1.CiProducts.ById.BuildRuns.GET { } } - public enum Include: Hashable, Codable, RawRepresentable { - case builds - case destinationBranch - case product - case pullRequest - case sourceBranchOrTag - case workflow - case unknown(String) - - public var rawValue: String { - switch self { - case .builds: return "builds" - case .destinationBranch: return "destinationBranch" - case .product: return "product" - case .pullRequest: return "pullRequest" - case .sourceBranchOrTag: return "sourceBranchOrTag" - case .workflow: return "workflow" - case .unknown(let rawValue): return rawValue - } + public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var builds: Self { + .init(rawValue: "builds") + } + + public static var destinationBranch: Self { + .init(rawValue: "destinationBranch") + } + + public static var product: Self { + .init(rawValue: "product") + } + + public static var pullRequest: Self { + .init(rawValue: "pullRequest") + } + + public static var sourceBranchOrTag: Self { + .init(rawValue: "sourceBranchOrTag") + } + + public static var workflow: Self { + .init(rawValue: "workflow") + } + + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "builds": self = .builds - case "destinationBranch": self = .destinationBranch - case "product": self = .product - case "pullRequest": self = .pullRequest - case "sourceBranchOrTag": self = .sourceBranchOrTag - case "workflow": self = .workflow - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } @@ -589,6 +676,26 @@ extension V1.CiProducts.ById.BuildRuns.GET { } } } + + public struct Sort: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var number: Self { + .init(rawValue: "number") + } + + public static var numberDesc: Self { + .init(rawValue: "-number") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/CiProducts/ById/CiProductsById.DELETE.3ba4a0b.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/CiProducts/ById/CiProductsById.DELETE.3ba4a0b.generated.swift index 8a9ebf9b..2ae5d5f5 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/CiProducts/ById/CiProductsById.DELETE.3ba4a0b.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/CiProducts/ById/CiProductsById.DELETE.3ba4a0b.generated.swift @@ -31,11 +31,12 @@ extension V1.CiProducts.ById { return urlRequest } - /// - Returns: **204**, Success (no content) /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -43,12 +44,12 @@ extension V1.CiProducts.ById { } switch urlResponse.statusCode { - case 204: - return - case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) @@ -58,6 +59,9 @@ extension V1.CiProducts.ById { case 409: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/CiProducts/ById/CiProductsById.GET.3ba4a0b.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/CiProducts/ById/CiProductsById.GET.3ba4a0b.generated.swift index fc2f044d..0e674dac 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/CiProducts/ById/CiProductsById.GET.3ba4a0b.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/CiProducts/ById/CiProductsById.GET.3ba4a0b.generated.swift @@ -30,12 +30,8 @@ extension V1.CiProducts.ById { components?.queryItems = [ URLQueryItem(name: "fields[apps]", value: parameters.fields[.apps]?.map { "\($0)" }.joined(separator: ",")), - URLQueryItem(name: "fields[ciBuildRuns]", - value: parameters.fields[.ciBuildRuns]?.map { "\($0)" }.joined(separator: ",")), URLQueryItem(name: "fields[ciProducts]", value: parameters.fields[.ciProducts]?.map { "\($0)" }.joined(separator: ",")), - URLQueryItem(name: "fields[ciWorkflows]", - value: parameters.fields[.ciWorkflows]?.map { "\($0)" }.joined(separator: ",")), URLQueryItem(name: "fields[scmRepositories]", value: parameters.fields[.scmRepositories]?.map { "\($0)" }.joined(separator: ",")), URLQueryItem(name: "include", @@ -54,8 +50,10 @@ extension V1.CiProducts.ById { /// - Returns: **200**, Single CiProduct as `CiProductResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -69,12 +67,18 @@ extension V1.CiProducts.ById { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 404: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -99,383 +103,311 @@ extension V1.CiProducts.ById.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum Apps: Hashable, Codable, RawRepresentable { - case appAvailability - case appClips - case appCustomProductPages - case appEncryptionDeclarations - case appEvents - case appInfos - case appPricePoints - case appPriceSchedule - case appStoreVersionExperimentsV2 - case appStoreVersions - case availableInNewTerritories - case availableTerritories - case betaAppLocalizations - case betaAppReviewDetail - case betaGroups - case betaLicenseAgreement - case betaTesters - case builds - case bundleId - case ciProduct - case contentRightsDeclaration - case customerReviews - case endUserLicenseAgreement - case gameCenterDetail - case gameCenterEnabledVersions - case inAppPurchases - case inAppPurchasesV2 - case isOrEverWasMadeForKids - case name - case perfPowerMetrics - case preOrder - case preReleaseVersions - case pricePoints - case prices - case primaryLocale - case promotedPurchases - case reviewSubmissions - case sku - case subscriptionGracePeriod - case subscriptionGroups - case subscriptionStatusUrl - case subscriptionStatusUrlForSandbox - case subscriptionStatusUrlVersion - case subscriptionStatusUrlVersionForSandbox - case unknown(String) - - public var rawValue: String { - switch self { - case .appAvailability: return "appAvailability" - case .appClips: return "appClips" - case .appCustomProductPages: return "appCustomProductPages" - case .appEncryptionDeclarations: return "appEncryptionDeclarations" - case .appEvents: return "appEvents" - case .appInfos: return "appInfos" - case .appPricePoints: return "appPricePoints" - case .appPriceSchedule: return "appPriceSchedule" - case .appStoreVersionExperimentsV2: return "appStoreVersionExperimentsV2" - case .appStoreVersions: return "appStoreVersions" - case .availableInNewTerritories: return "availableInNewTerritories" - case .availableTerritories: return "availableTerritories" - case .betaAppLocalizations: return "betaAppLocalizations" - case .betaAppReviewDetail: return "betaAppReviewDetail" - case .betaGroups: return "betaGroups" - case .betaLicenseAgreement: return "betaLicenseAgreement" - case .betaTesters: return "betaTesters" - case .builds: return "builds" - case .bundleId: return "bundleId" - case .ciProduct: return "ciProduct" - case .contentRightsDeclaration: return "contentRightsDeclaration" - case .customerReviews: return "customerReviews" - case .endUserLicenseAgreement: return "endUserLicenseAgreement" - case .gameCenterDetail: return "gameCenterDetail" - case .gameCenterEnabledVersions: return "gameCenterEnabledVersions" - case .inAppPurchases: return "inAppPurchases" - case .inAppPurchasesV2: return "inAppPurchasesV2" - case .isOrEverWasMadeForKids: return "isOrEverWasMadeForKids" - case .name: return "name" - case .perfPowerMetrics: return "perfPowerMetrics" - case .preOrder: return "preOrder" - case .preReleaseVersions: return "preReleaseVersions" - case .pricePoints: return "pricePoints" - case .prices: return "prices" - case .primaryLocale: return "primaryLocale" - case .promotedPurchases: return "promotedPurchases" - case .reviewSubmissions: return "reviewSubmissions" - case .sku: return "sku" - case .subscriptionGracePeriod: return "subscriptionGracePeriod" - case .subscriptionGroups: return "subscriptionGroups" - case .subscriptionStatusUrl: return "subscriptionStatusUrl" - case .subscriptionStatusUrlForSandbox: return "subscriptionStatusUrlForSandbox" - case .subscriptionStatusUrlVersion: return "subscriptionStatusUrlVersion" - case .subscriptionStatusUrlVersionForSandbox: return "subscriptionStatusUrlVersionForSandbox" - case .unknown(let rawValue): return rawValue - } + public struct Apps: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var accessibilityDeclarations: Self { + .init(rawValue: "accessibilityDeclarations") } - public init(rawValue: String) { - switch rawValue { - case "appAvailability": self = .appAvailability - case "appClips": self = .appClips - case "appCustomProductPages": self = .appCustomProductPages - case "appEncryptionDeclarations": self = .appEncryptionDeclarations - case "appEvents": self = .appEvents - case "appInfos": self = .appInfos - case "appPricePoints": self = .appPricePoints - case "appPriceSchedule": self = .appPriceSchedule - case "appStoreVersionExperimentsV2": self = .appStoreVersionExperimentsV2 - case "appStoreVersions": self = .appStoreVersions - case "availableInNewTerritories": self = .availableInNewTerritories - case "availableTerritories": self = .availableTerritories - case "betaAppLocalizations": self = .betaAppLocalizations - case "betaAppReviewDetail": self = .betaAppReviewDetail - case "betaGroups": self = .betaGroups - case "betaLicenseAgreement": self = .betaLicenseAgreement - case "betaTesters": self = .betaTesters - case "builds": self = .builds - case "bundleId": self = .bundleId - case "ciProduct": self = .ciProduct - case "contentRightsDeclaration": self = .contentRightsDeclaration - case "customerReviews": self = .customerReviews - case "endUserLicenseAgreement": self = .endUserLicenseAgreement - case "gameCenterDetail": self = .gameCenterDetail - case "gameCenterEnabledVersions": self = .gameCenterEnabledVersions - case "inAppPurchases": self = .inAppPurchases - case "inAppPurchasesV2": self = .inAppPurchasesV2 - case "isOrEverWasMadeForKids": self = .isOrEverWasMadeForKids - case "name": self = .name - case "perfPowerMetrics": self = .perfPowerMetrics - case "preOrder": self = .preOrder - case "preReleaseVersions": self = .preReleaseVersions - case "pricePoints": self = .pricePoints - case "prices": self = .prices - case "primaryLocale": self = .primaryLocale - case "promotedPurchases": self = .promotedPurchases - case "reviewSubmissions": self = .reviewSubmissions - case "sku": self = .sku - case "subscriptionGracePeriod": self = .subscriptionGracePeriod - case "subscriptionGroups": self = .subscriptionGroups - case "subscriptionStatusUrl": self = .subscriptionStatusUrl - case "subscriptionStatusUrlForSandbox": self = .subscriptionStatusUrlForSandbox - case "subscriptionStatusUrlVersion": self = .subscriptionStatusUrlVersion - case "subscriptionStatusUrlVersionForSandbox": self = .subscriptionStatusUrlVersionForSandbox - default: self = .unknown(rawValue) - } + public static var accessibilityUrl: Self { + .init(rawValue: "accessibilityUrl") } - } - public enum CiBuildRuns: Hashable, Codable, RawRepresentable { - case actions - case buildRun - case builds - case cancelReason - case clean - case completionStatus - case createdDate - case destinationBranch - case destinationCommit - case executionProgress - case finishedDate - case isPullRequestBuild - case issueCounts - case number - case product - case pullRequest - case sourceBranchOrTag - case sourceCommit - case startReason - case startedDate - case workflow - case unknown(String) - - public var rawValue: String { - switch self { - case .actions: return "actions" - case .buildRun: return "buildRun" - case .builds: return "builds" - case .cancelReason: return "cancelReason" - case .clean: return "clean" - case .completionStatus: return "completionStatus" - case .createdDate: return "createdDate" - case .destinationBranch: return "destinationBranch" - case .destinationCommit: return "destinationCommit" - case .executionProgress: return "executionProgress" - case .finishedDate: return "finishedDate" - case .isPullRequestBuild: return "isPullRequestBuild" - case .issueCounts: return "issueCounts" - case .number: return "number" - case .product: return "product" - case .pullRequest: return "pullRequest" - case .sourceBranchOrTag: return "sourceBranchOrTag" - case .sourceCommit: return "sourceCommit" - case .startReason: return "startReason" - case .startedDate: return "startedDate" - case .workflow: return "workflow" - case .unknown(let rawValue): return rawValue - } + public static var alternativeDistributionKey: Self { + .init(rawValue: "alternativeDistributionKey") } - public init(rawValue: String) { - switch rawValue { - case "actions": self = .actions - case "buildRun": self = .buildRun - case "builds": self = .builds - case "cancelReason": self = .cancelReason - case "clean": self = .clean - case "completionStatus": self = .completionStatus - case "createdDate": self = .createdDate - case "destinationBranch": self = .destinationBranch - case "destinationCommit": self = .destinationCommit - case "executionProgress": self = .executionProgress - case "finishedDate": self = .finishedDate - case "isPullRequestBuild": self = .isPullRequestBuild - case "issueCounts": self = .issueCounts - case "number": self = .number - case "product": self = .product - case "pullRequest": self = .pullRequest - case "sourceBranchOrTag": self = .sourceBranchOrTag - case "sourceCommit": self = .sourceCommit - case "startReason": self = .startReason - case "startedDate": self = .startedDate - case "workflow": self = .workflow - default: self = .unknown(rawValue) - } + public static var analyticsReportRequests: Self { + .init(rawValue: "analyticsReportRequests") + } + + public static var appAvailabilityV2: Self { + .init(rawValue: "appAvailabilityV2") + } + + public static var appClips: Self { + .init(rawValue: "appClips") + } + + public static var appCustomProductPages: Self { + .init(rawValue: "appCustomProductPages") + } + + public static var appEncryptionDeclarations: Self { + .init(rawValue: "appEncryptionDeclarations") + } + + public static var appEvents: Self { + .init(rawValue: "appEvents") + } + + public static var appInfos: Self { + .init(rawValue: "appInfos") + } + + public static var appPricePoints: Self { + .init(rawValue: "appPricePoints") + } + + public static var appPriceSchedule: Self { + .init(rawValue: "appPriceSchedule") + } + + public static var appStoreVersionExperimentsV2: Self { + .init(rawValue: "appStoreVersionExperimentsV2") + } + + public static var appStoreVersions: Self { + .init(rawValue: "appStoreVersions") + } + + public static var backgroundAssets: Self { + .init(rawValue: "backgroundAssets") + } + + public static var betaAppLocalizations: Self { + .init(rawValue: "betaAppLocalizations") + } + + public static var betaAppReviewDetail: Self { + .init(rawValue: "betaAppReviewDetail") + } + + public static var betaFeedbackCrashSubmissions: Self { + .init(rawValue: "betaFeedbackCrashSubmissions") + } + + public static var betaFeedbackScreenshotSubmissions: Self { + .init(rawValue: "betaFeedbackScreenshotSubmissions") + } + + public static var betaGroups: Self { + .init(rawValue: "betaGroups") + } + + public static var betaLicenseAgreement: Self { + .init(rawValue: "betaLicenseAgreement") + } + + public static var betaTesters: Self { + .init(rawValue: "betaTesters") + } + + public static var builds: Self { + .init(rawValue: "builds") + } + + public static var bundleId: Self { + .init(rawValue: "bundleId") + } + + public static var ciProduct: Self { + .init(rawValue: "ciProduct") + } + + public static var contentRightsDeclaration: Self { + .init(rawValue: "contentRightsDeclaration") + } + + public static var customerReviewSummarizations: Self { + .init(rawValue: "customerReviewSummarizations") + } + + public static var customerReviews: Self { + .init(rawValue: "customerReviews") + } + + public static var endUserLicenseAgreement: Self { + .init(rawValue: "endUserLicenseAgreement") + } + + public static var gameCenterDetail: Self { + .init(rawValue: "gameCenterDetail") + } + + public static var gameCenterEnabledVersions: Self { + .init(rawValue: "gameCenterEnabledVersions") + } + + public static var inAppPurchases: Self { + .init(rawValue: "inAppPurchases") + } + + public static var inAppPurchasesV2: Self { + .init(rawValue: "inAppPurchasesV2") + } + + public static var isOrEverWasMadeForKids: Self { + .init(rawValue: "isOrEverWasMadeForKids") + } + + public static var marketplaceSearchDetail: Self { + .init(rawValue: "marketplaceSearchDetail") + } + + public static var name: Self { + .init(rawValue: "name") + } + + public static var perfPowerMetrics: Self { + .init(rawValue: "perfPowerMetrics") + } + + public static var preReleaseVersions: Self { + .init(rawValue: "preReleaseVersions") } - } - public enum CiProducts: Hashable, Codable, RawRepresentable { - case additionalRepositories - case app - case buildRuns - case bundleId - case createdDate - case name - case primaryRepositories - case productType - case workflows - case unknown(String) - - public var rawValue: String { - switch self { - case .additionalRepositories: return "additionalRepositories" - case .app: return "app" - case .buildRuns: return "buildRuns" - case .bundleId: return "bundleId" - case .createdDate: return "createdDate" - case .name: return "name" - case .primaryRepositories: return "primaryRepositories" - case .productType: return "productType" - case .workflows: return "workflows" - case .unknown(let rawValue): return rawValue - } + public static var primaryLocale: Self { + .init(rawValue: "primaryLocale") } + public static var promotedPurchases: Self { + .init(rawValue: "promotedPurchases") + } + + public static var reviewSubmissions: Self { + .init(rawValue: "reviewSubmissions") + } + + public static var sku: Self { + .init(rawValue: "sku") + } + + public static var streamlinedPurchasingEnabled: Self { + .init(rawValue: "streamlinedPurchasingEnabled") + } + + public static var subscriptionGracePeriod: Self { + .init(rawValue: "subscriptionGracePeriod") + } + + public static var subscriptionGroups: Self { + .init(rawValue: "subscriptionGroups") + } + + public static var subscriptionStatusUrl: Self { + .init(rawValue: "subscriptionStatusUrl") + } + + public static var subscriptionStatusUrlForSandbox: Self { + .init(rawValue: "subscriptionStatusUrlForSandbox") + } + + public static var subscriptionStatusUrlVersion: Self { + .init(rawValue: "subscriptionStatusUrlVersion") + } + + public static var subscriptionStatusUrlVersionForSandbox: Self { + .init(rawValue: "subscriptionStatusUrlVersionForSandbox") + } + + public static var webhooks: Self { + .init(rawValue: "webhooks") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "additionalRepositories": self = .additionalRepositories - case "app": self = .app - case "buildRuns": self = .buildRuns - case "bundleId": self = .bundleId - case "createdDate": self = .createdDate - case "name": self = .name - case "primaryRepositories": self = .primaryRepositories - case "productType": self = .productType - case "workflows": self = .workflows - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum CiWorkflows: Hashable, Codable, RawRepresentable { - case actions - case branchStartCondition - case buildRuns - case clean - case containerFilePath - case description - case isEnabled - case isLockedForEditing - case lastModifiedDate - case macOsVersion - case name - case product - case pullRequestStartCondition - case repository - case scheduledStartCondition - case tagStartCondition - case xcodeVersion - case unknown(String) - - public var rawValue: String { - switch self { - case .actions: return "actions" - case .branchStartCondition: return "branchStartCondition" - case .buildRuns: return "buildRuns" - case .clean: return "clean" - case .containerFilePath: return "containerFilePath" - case .description: return "description" - case .isEnabled: return "isEnabled" - case .isLockedForEditing: return "isLockedForEditing" - case .lastModifiedDate: return "lastModifiedDate" - case .macOsVersion: return "macOsVersion" - case .name: return "name" - case .product: return "product" - case .pullRequestStartCondition: return "pullRequestStartCondition" - case .repository: return "repository" - case .scheduledStartCondition: return "scheduledStartCondition" - case .tagStartCondition: return "tagStartCondition" - case .xcodeVersion: return "xcodeVersion" - case .unknown(let rawValue): return rawValue - } + public struct CiProducts: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var additionalRepositories: Self { + .init(rawValue: "additionalRepositories") + } + + public static var app: Self { + .init(rawValue: "app") + } + + public static var buildRuns: Self { + .init(rawValue: "buildRuns") } + public static var bundleId: Self { + .init(rawValue: "bundleId") + } + + public static var createdDate: Self { + .init(rawValue: "createdDate") + } + + public static var name: Self { + .init(rawValue: "name") + } + + public static var primaryRepositories: Self { + .init(rawValue: "primaryRepositories") + } + + public static var productType: Self { + .init(rawValue: "productType") + } + + public static var workflows: Self { + .init(rawValue: "workflows") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "actions": self = .actions - case "branchStartCondition": self = .branchStartCondition - case "buildRuns": self = .buildRuns - case "clean": self = .clean - case "containerFilePath": self = .containerFilePath - case "description": self = .description - case "isEnabled": self = .isEnabled - case "isLockedForEditing": self = .isLockedForEditing - case "lastModifiedDate": self = .lastModifiedDate - case "macOsVersion": self = .macOsVersion - case "name": self = .name - case "product": self = .product - case "pullRequestStartCondition": self = .pullRequestStartCondition - case "repository": self = .repository - case "scheduledStartCondition": self = .scheduledStartCondition - case "tagStartCondition": self = .tagStartCondition - case "xcodeVersion": self = .xcodeVersion - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum ScmRepositories: Hashable, Codable, RawRepresentable { - case defaultBranch - case gitReferences - case httpCloneUrl - case lastAccessedDate - case ownerName - case pullRequests - case repositoryName - case scmProvider - case sshCloneUrl - case unknown(String) - - public var rawValue: String { - switch self { - case .defaultBranch: return "defaultBranch" - case .gitReferences: return "gitReferences" - case .httpCloneUrl: return "httpCloneUrl" - case .lastAccessedDate: return "lastAccessedDate" - case .ownerName: return "ownerName" - case .pullRequests: return "pullRequests" - case .repositoryName: return "repositoryName" - case .scmProvider: return "scmProvider" - case .sshCloneUrl: return "sshCloneUrl" - case .unknown(let rawValue): return rawValue - } + public struct ScmRepositories: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var defaultBranch: Self { + .init(rawValue: "defaultBranch") + } + + public static var gitReferences: Self { + .init(rawValue: "gitReferences") + } + + public static var httpCloneUrl: Self { + .init(rawValue: "httpCloneUrl") } + public static var lastAccessedDate: Self { + .init(rawValue: "lastAccessedDate") + } + + public static var ownerName: Self { + .init(rawValue: "ownerName") + } + + public static var pullRequests: Self { + .init(rawValue: "pullRequests") + } + + public static var repositoryName: Self { + .init(rawValue: "repositoryName") + } + + public static var scmProvider: Self { + .init(rawValue: "scmProvider") + } + + public static var sshCloneUrl: Self { + .init(rawValue: "sshCloneUrl") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "defaultBranch": self = .defaultBranch - case "gitReferences": self = .gitReferences - case "httpCloneUrl": self = .httpCloneUrl - case "lastAccessedDate": self = .lastAccessedDate - case "ownerName": self = .ownerName - case "pullRequests": self = .pullRequests - case "repositoryName": self = .repositoryName - case "scmProvider": self = .scmProvider - case "sshCloneUrl": self = .sshCloneUrl - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } @@ -485,21 +417,11 @@ extension V1.CiProducts.ById.GET { .init(key: "fields[apps]") } - /// the fields to include for returned resources of type ciBuildRuns - public static var ciBuildRuns: Relation<[CiBuildRuns]?> { - .init(key: "fields[ciBuildRuns]") - } - /// the fields to include for returned resources of type ciProducts public static var ciProducts: Relation<[CiProducts]?> { .init(key: "fields[ciProducts]") } - /// the fields to include for returned resources of type ciWorkflows - public static var ciWorkflows: Relation<[CiWorkflows]?> { - .init(key: "fields[ciWorkflows]") - } - /// the fields to include for returned resources of type scmRepositories public static var scmRepositories: Relation<[ScmRepositories]?> { .init(key: "fields[scmRepositories]") @@ -513,28 +435,27 @@ extension V1.CiProducts.ById.GET { } } - public enum Include: Hashable, Codable, RawRepresentable { - case app - case bundleId - case primaryRepositories - case unknown(String) + public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var app: Self { + .init(rawValue: "app") + } - public var rawValue: String { - switch self { - case .app: return "app" - case .bundleId: return "bundleId" - case .primaryRepositories: return "primaryRepositories" - case .unknown(let rawValue): return rawValue - } + public static var bundleId: Self { + .init(rawValue: "bundleId") + } + + public static var primaryRepositories: Self { + .init(rawValue: "primaryRepositories") } + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "app": self = .app - case "bundleId": self = .bundleId - case "primaryRepositories": self = .primaryRepositories - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/CiProducts/ById/PrimaryRepositories/CiProductsByIdPrimaryRepositories.GET.b6d021c.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/CiProducts/ById/PrimaryRepositories/CiProductsByIdPrimaryRepositories.GET.b6d021c.generated.swift index 5e6c8a43..4ec830d9 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/CiProducts/ById/PrimaryRepositories/CiProductsByIdPrimaryRepositories.GET.b6d021c.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/CiProducts/ById/PrimaryRepositories/CiProductsByIdPrimaryRepositories.GET.b6d021c.generated.swift @@ -52,8 +52,10 @@ extension V1.CiProducts.ById.PrimaryRepositories { /// - Returns: **200**, List of ScmRepositories as `ScmRepositoriesResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -67,12 +69,18 @@ extension V1.CiProducts.ById.PrimaryRepositories { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 404: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -100,102 +108,107 @@ extension V1.CiProducts.ById.PrimaryRepositories.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum ScmGitReferences: Hashable, Codable, RawRepresentable { - case canonicalName - case isDeleted - case kind - case name - case repository - case unknown(String) - - public var rawValue: String { - switch self { - case .canonicalName: return "canonicalName" - case .isDeleted: return "isDeleted" - case .kind: return "kind" - case .name: return "name" - case .repository: return "repository" - case .unknown(let rawValue): return rawValue - } + public struct ScmGitReferences: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var canonicalName: Self { + .init(rawValue: "canonicalName") + } + + public static var isDeleted: Self { + .init(rawValue: "isDeleted") + } + + public static var kind: Self { + .init(rawValue: "kind") + } + + public static var name: Self { + .init(rawValue: "name") + } + + public static var repository: Self { + .init(rawValue: "repository") } + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "canonicalName": self = .canonicalName - case "isDeleted": self = .isDeleted - case "kind": self = .kind - case "name": self = .name - case "repository": self = .repository - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum ScmProviders: Hashable, Codable, RawRepresentable { - case repositories - case scmProviderType - case url - case unknown(String) - - public var rawValue: String { - switch self { - case .repositories: return "repositories" - case .scmProviderType: return "scmProviderType" - case .url: return "url" - case .unknown(let rawValue): return rawValue - } + public struct ScmProviders: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var repositories: Self { + .init(rawValue: "repositories") + } + + public static var scmProviderType: Self { + .init(rawValue: "scmProviderType") + } + + public static var url: Self { + .init(rawValue: "url") + } + + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "repositories": self = .repositories - case "scmProviderType": self = .scmProviderType - case "url": self = .url - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum ScmRepositories: Hashable, Codable, RawRepresentable { - case defaultBranch - case gitReferences - case httpCloneUrl - case lastAccessedDate - case ownerName - case pullRequests - case repositoryName - case scmProvider - case sshCloneUrl - case unknown(String) - - public var rawValue: String { - switch self { - case .defaultBranch: return "defaultBranch" - case .gitReferences: return "gitReferences" - case .httpCloneUrl: return "httpCloneUrl" - case .lastAccessedDate: return "lastAccessedDate" - case .ownerName: return "ownerName" - case .pullRequests: return "pullRequests" - case .repositoryName: return "repositoryName" - case .scmProvider: return "scmProvider" - case .sshCloneUrl: return "sshCloneUrl" - case .unknown(let rawValue): return rawValue - } + public struct ScmRepositories: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var defaultBranch: Self { + .init(rawValue: "defaultBranch") + } + + public static var gitReferences: Self { + .init(rawValue: "gitReferences") } + public static var httpCloneUrl: Self { + .init(rawValue: "httpCloneUrl") + } + + public static var lastAccessedDate: Self { + .init(rawValue: "lastAccessedDate") + } + + public static var ownerName: Self { + .init(rawValue: "ownerName") + } + + public static var pullRequests: Self { + .init(rawValue: "pullRequests") + } + + public static var repositoryName: Self { + .init(rawValue: "repositoryName") + } + + public static var scmProvider: Self { + .init(rawValue: "scmProvider") + } + + public static var sshCloneUrl: Self { + .init(rawValue: "sshCloneUrl") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "defaultBranch": self = .defaultBranch - case "gitReferences": self = .gitReferences - case "httpCloneUrl": self = .httpCloneUrl - case "lastAccessedDate": self = .lastAccessedDate - case "ownerName": self = .ownerName - case "pullRequests": self = .pullRequests - case "repositoryName": self = .repositoryName - case "scmProvider": self = .scmProvider - case "sshCloneUrl": self = .sshCloneUrl - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } @@ -245,25 +258,23 @@ extension V1.CiProducts.ById.PrimaryRepositories.GET { } } - public enum Include: Hashable, Codable, RawRepresentable { - case defaultBranch - case scmProvider - case unknown(String) + public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var defaultBranch: Self { + .init(rawValue: "defaultBranch") + } - public var rawValue: String { - switch self { - case .defaultBranch: return "defaultBranch" - case .scmProvider: return "scmProvider" - case .unknown(let rawValue): return rawValue - } + public static var scmProvider: Self { + .init(rawValue: "scmProvider") + } + + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "defaultBranch": self = .defaultBranch - case "scmProvider": self = .scmProvider - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/CiProducts/ById/Relationships/AdditionalRepositories/CiProductsByIdRelationshipsAdditionalRepositories.GET.d3ee0c2.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/CiProducts/ById/Relationships/AdditionalRepositories/CiProductsByIdRelationshipsAdditionalRepositories.GET.d3ee0c2.generated.swift new file mode 100644 index 00000000..dfd2218c --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/CiProducts/ById/Relationships/AdditionalRepositories/CiProductsByIdRelationshipsAdditionalRepositories.GET.d3ee0c2.generated.swift @@ -0,0 +1,88 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.CiProducts.ById.Relationships.AdditionalRepositories { + public struct GET: Endpoint { + public typealias Response = CiProductAdditionalRepositoriesLinkagesResponse + + public var path: String { + "/v1/ciProducts/\(id)/relationships/additionalRepositories" + } + + /// the id of the requested resource + public var id: String + + public var parameters: Parameters = Parameters() + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + components?.queryItems = [ + URLQueryItem(name: "limit", + value: parameters.limit.map { "\($0)" }) + ].filter { $0.value != nil } + if components?.queryItems?.isEmpty ?? false { + components?.queryItems = nil + } + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "GET" + return urlRequest + } + + /// - Returns: **200**, List of related linkages as `CiProductAdditionalRepositoriesLinkagesResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(CiProductAdditionalRepositoriesLinkagesResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +extension V1.CiProducts.ById.Relationships.AdditionalRepositories.GET { + public struct Parameters: Hashable { + /// maximum resources per page + public var limit: Int? + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/CiProducts/ById/Relationships/App/CiProductsByIdRelationshipsApp.GET.17e2173.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/CiProducts/ById/Relationships/App/CiProductsByIdRelationshipsApp.GET.17e2173.generated.swift new file mode 100644 index 00000000..577abaa0 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/CiProducts/ById/Relationships/App/CiProductsByIdRelationshipsApp.GET.17e2173.generated.swift @@ -0,0 +1,86 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.CiProducts.ById.Relationships.App { + public struct GET: Endpoint { + public typealias Response = CiProductAppLinkageResponse + + public var path: String { + "/v1/ciProducts/\(id)/relationships/app" + } + + /// the id of the requested resource + public var id: String + + public var parameters: Parameters = Parameters() + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + components?.queryItems = [ + + ].filter { $0.value != nil } + if components?.queryItems?.isEmpty ?? false { + components?.queryItems = nil + } + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "GET" + return urlRequest + } + + /// - Returns: **200**, Related linkage as `CiProductAppLinkageResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(CiProductAppLinkageResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +extension V1.CiProducts.ById.Relationships.App.GET { + public struct Parameters: Hashable { + + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/CiProducts/ById/Relationships/BuildRuns/CiProductsByIdRelationshipsBuildRuns.GET.00b2def.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/CiProducts/ById/Relationships/BuildRuns/CiProductsByIdRelationshipsBuildRuns.GET.00b2def.generated.swift new file mode 100644 index 00000000..a2b190ab --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/CiProducts/ById/Relationships/BuildRuns/CiProductsByIdRelationshipsBuildRuns.GET.00b2def.generated.swift @@ -0,0 +1,88 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.CiProducts.ById.Relationships.BuildRuns { + public struct GET: Endpoint { + public typealias Response = CiProductBuildRunsLinkagesResponse + + public var path: String { + "/v1/ciProducts/\(id)/relationships/buildRuns" + } + + /// the id of the requested resource + public var id: String + + public var parameters: Parameters = Parameters() + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + components?.queryItems = [ + URLQueryItem(name: "limit", + value: parameters.limit.map { "\($0)" }) + ].filter { $0.value != nil } + if components?.queryItems?.isEmpty ?? false { + components?.queryItems = nil + } + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "GET" + return urlRequest + } + + /// - Returns: **200**, List of related linkages as `CiProductBuildRunsLinkagesResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(CiProductBuildRunsLinkagesResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +extension V1.CiProducts.ById.Relationships.BuildRuns.GET { + public struct Parameters: Hashable { + /// maximum resources per page + public var limit: Int? + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/CiProducts/ById/Relationships/PrimaryRepositories/CiProductsByIdRelationshipsPrimaryRepositories.GET.50480c9.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/CiProducts/ById/Relationships/PrimaryRepositories/CiProductsByIdRelationshipsPrimaryRepositories.GET.50480c9.generated.swift new file mode 100644 index 00000000..be778222 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/CiProducts/ById/Relationships/PrimaryRepositories/CiProductsByIdRelationshipsPrimaryRepositories.GET.50480c9.generated.swift @@ -0,0 +1,88 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.CiProducts.ById.Relationships.PrimaryRepositories { + public struct GET: Endpoint { + public typealias Response = CiProductPrimaryRepositoriesLinkagesResponse + + public var path: String { + "/v1/ciProducts/\(id)/relationships/primaryRepositories" + } + + /// the id of the requested resource + public var id: String + + public var parameters: Parameters = Parameters() + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + components?.queryItems = [ + URLQueryItem(name: "limit", + value: parameters.limit.map { "\($0)" }) + ].filter { $0.value != nil } + if components?.queryItems?.isEmpty ?? false { + components?.queryItems = nil + } + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "GET" + return urlRequest + } + + /// - Returns: **200**, List of related linkages as `CiProductPrimaryRepositoriesLinkagesResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(CiProductPrimaryRepositoriesLinkagesResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +extension V1.CiProducts.ById.Relationships.PrimaryRepositories.GET { + public struct Parameters: Hashable { + /// maximum resources per page + public var limit: Int? + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/CiProducts/ById/Relationships/Workflows/CiProductsByIdRelationshipsWorkflows.GET.f4038ab.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/CiProducts/ById/Relationships/Workflows/CiProductsByIdRelationshipsWorkflows.GET.f4038ab.generated.swift new file mode 100644 index 00000000..78554cd3 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/CiProducts/ById/Relationships/Workflows/CiProductsByIdRelationshipsWorkflows.GET.f4038ab.generated.swift @@ -0,0 +1,88 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.CiProducts.ById.Relationships.Workflows { + public struct GET: Endpoint { + public typealias Response = CiProductWorkflowsLinkagesResponse + + public var path: String { + "/v1/ciProducts/\(id)/relationships/workflows" + } + + /// the id of the requested resource + public var id: String + + public var parameters: Parameters = Parameters() + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + components?.queryItems = [ + URLQueryItem(name: "limit", + value: parameters.limit.map { "\($0)" }) + ].filter { $0.value != nil } + if components?.queryItems?.isEmpty ?? false { + components?.queryItems = nil + } + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "GET" + return urlRequest + } + + /// - Returns: **200**, List of related linkages as `CiProductWorkflowsLinkagesResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(CiProductWorkflowsLinkagesResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +extension V1.CiProducts.ById.Relationships.Workflows.GET { + public struct Parameters: Hashable { + /// maximum resources per page + public var limit: Int? + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/CiProducts/ById/Workflows/CiProductsByIdWorkflows.GET.1e256ab.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/CiProducts/ById/Workflows/CiProductsByIdWorkflows.GET.1e256ab.generated.swift index 0a0ded63..a6bac36c 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/CiProducts/ById/Workflows/CiProductsByIdWorkflows.GET.1e256ab.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/CiProducts/ById/Workflows/CiProductsByIdWorkflows.GET.1e256ab.generated.swift @@ -54,8 +54,10 @@ extension V1.CiProducts.ById.Workflows { /// - Returns: **200**, List of CiWorkflows as `CiWorkflowsResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -69,12 +71,18 @@ extension V1.CiProducts.ById.Workflows { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 404: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -100,209 +108,243 @@ extension V1.CiProducts.ById.Workflows.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum CiMacOsVersions: Hashable, Codable, RawRepresentable { - case name - case version - case xcodeVersions - case unknown(String) + public struct CiMacOsVersions: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var name: Self { + .init(rawValue: "name") + } + + public static var version: Self { + .init(rawValue: "version") + } + + public static var xcodeVersions: Self { + .init(rawValue: "xcodeVersions") + } - public var rawValue: String { - switch self { - case .name: return "name" - case .version: return "version" - case .xcodeVersions: return "xcodeVersions" - case .unknown(let rawValue): return rawValue - } + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "name": self = .name - case "version": self = .version - case "xcodeVersions": self = .xcodeVersions - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum CiProducts: Hashable, Codable, RawRepresentable { - case additionalRepositories - case app - case buildRuns - case bundleId - case createdDate - case name - case primaryRepositories - case productType - case workflows - case unknown(String) - - public var rawValue: String { - switch self { - case .additionalRepositories: return "additionalRepositories" - case .app: return "app" - case .buildRuns: return "buildRuns" - case .bundleId: return "bundleId" - case .createdDate: return "createdDate" - case .name: return "name" - case .primaryRepositories: return "primaryRepositories" - case .productType: return "productType" - case .workflows: return "workflows" - case .unknown(let rawValue): return rawValue - } + public struct CiProducts: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var additionalRepositories: Self { + .init(rawValue: "additionalRepositories") + } + + public static var app: Self { + .init(rawValue: "app") + } + + public static var buildRuns: Self { + .init(rawValue: "buildRuns") + } + + public static var bundleId: Self { + .init(rawValue: "bundleId") + } + + public static var createdDate: Self { + .init(rawValue: "createdDate") + } + + public static var name: Self { + .init(rawValue: "name") + } + + public static var primaryRepositories: Self { + .init(rawValue: "primaryRepositories") + } + + public static var productType: Self { + .init(rawValue: "productType") + } + + public static var workflows: Self { + .init(rawValue: "workflows") + } + + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "additionalRepositories": self = .additionalRepositories - case "app": self = .app - case "buildRuns": self = .buildRuns - case "bundleId": self = .bundleId - case "createdDate": self = .createdDate - case "name": self = .name - case "primaryRepositories": self = .primaryRepositories - case "productType": self = .productType - case "workflows": self = .workflows - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum CiWorkflows: Hashable, Codable, RawRepresentable { - case actions - case branchStartCondition - case buildRuns - case clean - case containerFilePath - case description - case isEnabled - case isLockedForEditing - case lastModifiedDate - case macOsVersion - case name - case product - case pullRequestStartCondition - case repository - case scheduledStartCondition - case tagStartCondition - case xcodeVersion - case unknown(String) - - public var rawValue: String { - switch self { - case .actions: return "actions" - case .branchStartCondition: return "branchStartCondition" - case .buildRuns: return "buildRuns" - case .clean: return "clean" - case .containerFilePath: return "containerFilePath" - case .description: return "description" - case .isEnabled: return "isEnabled" - case .isLockedForEditing: return "isLockedForEditing" - case .lastModifiedDate: return "lastModifiedDate" - case .macOsVersion: return "macOsVersion" - case .name: return "name" - case .product: return "product" - case .pullRequestStartCondition: return "pullRequestStartCondition" - case .repository: return "repository" - case .scheduledStartCondition: return "scheduledStartCondition" - case .tagStartCondition: return "tagStartCondition" - case .xcodeVersion: return "xcodeVersion" - case .unknown(let rawValue): return rawValue - } + public struct CiWorkflows: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var actions: Self { + .init(rawValue: "actions") + } + + public static var branchStartCondition: Self { + .init(rawValue: "branchStartCondition") + } + + public static var buildRuns: Self { + .init(rawValue: "buildRuns") + } + + public static var clean: Self { + .init(rawValue: "clean") + } + + public static var containerFilePath: Self { + .init(rawValue: "containerFilePath") + } + + public static var description: Self { + .init(rawValue: "description") + } + + public static var isEnabled: Self { + .init(rawValue: "isEnabled") + } + + public static var isLockedForEditing: Self { + .init(rawValue: "isLockedForEditing") + } + + public static var lastModifiedDate: Self { + .init(rawValue: "lastModifiedDate") + } + + public static var macOsVersion: Self { + .init(rawValue: "macOsVersion") + } + + public static var manualBranchStartCondition: Self { + .init(rawValue: "manualBranchStartCondition") + } + + public static var manualPullRequestStartCondition: Self { + .init(rawValue: "manualPullRequestStartCondition") + } + + public static var manualTagStartCondition: Self { + .init(rawValue: "manualTagStartCondition") + } + + public static var name: Self { + .init(rawValue: "name") + } + + public static var product: Self { + .init(rawValue: "product") + } + + public static var pullRequestStartCondition: Self { + .init(rawValue: "pullRequestStartCondition") + } + + public static var repository: Self { + .init(rawValue: "repository") } + public static var scheduledStartCondition: Self { + .init(rawValue: "scheduledStartCondition") + } + + public static var tagStartCondition: Self { + .init(rawValue: "tagStartCondition") + } + + public static var xcodeVersion: Self { + .init(rawValue: "xcodeVersion") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "actions": self = .actions - case "branchStartCondition": self = .branchStartCondition - case "buildRuns": self = .buildRuns - case "clean": self = .clean - case "containerFilePath": self = .containerFilePath - case "description": self = .description - case "isEnabled": self = .isEnabled - case "isLockedForEditing": self = .isLockedForEditing - case "lastModifiedDate": self = .lastModifiedDate - case "macOsVersion": self = .macOsVersion - case "name": self = .name - case "product": self = .product - case "pullRequestStartCondition": self = .pullRequestStartCondition - case "repository": self = .repository - case "scheduledStartCondition": self = .scheduledStartCondition - case "tagStartCondition": self = .tagStartCondition - case "xcodeVersion": self = .xcodeVersion - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum CiXcodeVersions: Hashable, Codable, RawRepresentable { - case macOsVersions - case name - case testDestinations - case version - case unknown(String) + public struct CiXcodeVersions: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var macOsVersions: Self { + .init(rawValue: "macOsVersions") + } + + public static var name: Self { + .init(rawValue: "name") + } + + public static var testDestinations: Self { + .init(rawValue: "testDestinations") + } - public var rawValue: String { - switch self { - case .macOsVersions: return "macOsVersions" - case .name: return "name" - case .testDestinations: return "testDestinations" - case .version: return "version" - case .unknown(let rawValue): return rawValue - } + public static var version: Self { + .init(rawValue: "version") } + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "macOsVersions": self = .macOsVersions - case "name": self = .name - case "testDestinations": self = .testDestinations - case "version": self = .version - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum ScmRepositories: Hashable, Codable, RawRepresentable { - case defaultBranch - case gitReferences - case httpCloneUrl - case lastAccessedDate - case ownerName - case pullRequests - case repositoryName - case scmProvider - case sshCloneUrl - case unknown(String) - - public var rawValue: String { - switch self { - case .defaultBranch: return "defaultBranch" - case .gitReferences: return "gitReferences" - case .httpCloneUrl: return "httpCloneUrl" - case .lastAccessedDate: return "lastAccessedDate" - case .ownerName: return "ownerName" - case .pullRequests: return "pullRequests" - case .repositoryName: return "repositoryName" - case .scmProvider: return "scmProvider" - case .sshCloneUrl: return "sshCloneUrl" - case .unknown(let rawValue): return rawValue - } + public struct ScmRepositories: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var defaultBranch: Self { + .init(rawValue: "defaultBranch") + } + + public static var gitReferences: Self { + .init(rawValue: "gitReferences") + } + + public static var httpCloneUrl: Self { + .init(rawValue: "httpCloneUrl") + } + + public static var lastAccessedDate: Self { + .init(rawValue: "lastAccessedDate") + } + + public static var ownerName: Self { + .init(rawValue: "ownerName") + } + + public static var pullRequests: Self { + .init(rawValue: "pullRequests") } + public static var repositoryName: Self { + .init(rawValue: "repositoryName") + } + + public static var scmProvider: Self { + .init(rawValue: "scmProvider") + } + + public static var sshCloneUrl: Self { + .init(rawValue: "sshCloneUrl") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "defaultBranch": self = .defaultBranch - case "gitReferences": self = .gitReferences - case "httpCloneUrl": self = .httpCloneUrl - case "lastAccessedDate": self = .lastAccessedDate - case "ownerName": self = .ownerName - case "pullRequests": self = .pullRequests - case "repositoryName": self = .repositoryName - case "scmProvider": self = .scmProvider - case "sshCloneUrl": self = .sshCloneUrl - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } @@ -340,31 +382,31 @@ extension V1.CiProducts.ById.Workflows.GET { } } - public enum Include: Hashable, Codable, RawRepresentable { - case macOsVersion - case product - case repository - case xcodeVersion - case unknown(String) - - public var rawValue: String { - switch self { - case .macOsVersion: return "macOsVersion" - case .product: return "product" - case .repository: return "repository" - case .xcodeVersion: return "xcodeVersion" - case .unknown(let rawValue): return rawValue - } + public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var macOsVersion: Self { + .init(rawValue: "macOsVersion") + } + + public static var product: Self { + .init(rawValue: "product") + } + + public static var repository: Self { + .init(rawValue: "repository") } + public static var xcodeVersion: Self { + .init(rawValue: "xcodeVersion") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "macOsVersion": self = .macOsVersion - case "product": self = .product - case "repository": self = .repository - case "xcodeVersion": self = .xcodeVersion - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/CiProducts/CiProducts.GET.56e2396.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/CiProducts/CiProducts.GET.56e2396.generated.swift index 918ff70a..51735342 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/CiProducts/CiProducts.GET.56e2396.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/CiProducts/CiProducts.GET.56e2396.generated.swift @@ -27,12 +27,8 @@ extension V1.CiProducts { components?.queryItems = [ URLQueryItem(name: "fields[apps]", value: parameters.fields[.apps]?.map { "\($0)" }.joined(separator: ",")), - URLQueryItem(name: "fields[ciBuildRuns]", - value: parameters.fields[.ciBuildRuns]?.map { "\($0)" }.joined(separator: ",")), URLQueryItem(name: "fields[ciProducts]", value: parameters.fields[.ciProducts]?.map { "\($0)" }.joined(separator: ",")), - URLQueryItem(name: "fields[ciWorkflows]", - value: parameters.fields[.ciWorkflows]?.map { "\($0)" }.joined(separator: ",")), URLQueryItem(name: "fields[scmRepositories]", value: parameters.fields[.scmRepositories]?.map { "\($0)" }.joined(separator: ",")), URLQueryItem(name: "filter[app]", @@ -57,7 +53,9 @@ extension V1.CiProducts { /// - Returns: **200**, List of CiProducts as `CiProductsResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -71,9 +69,15 @@ extension V1.CiProducts { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -101,383 +105,311 @@ extension V1.CiProducts.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum Apps: Hashable, Codable, RawRepresentable { - case appAvailability - case appClips - case appCustomProductPages - case appEncryptionDeclarations - case appEvents - case appInfos - case appPricePoints - case appPriceSchedule - case appStoreVersionExperimentsV2 - case appStoreVersions - case availableInNewTerritories - case availableTerritories - case betaAppLocalizations - case betaAppReviewDetail - case betaGroups - case betaLicenseAgreement - case betaTesters - case builds - case bundleId - case ciProduct - case contentRightsDeclaration - case customerReviews - case endUserLicenseAgreement - case gameCenterDetail - case gameCenterEnabledVersions - case inAppPurchases - case inAppPurchasesV2 - case isOrEverWasMadeForKids - case name - case perfPowerMetrics - case preOrder - case preReleaseVersions - case pricePoints - case prices - case primaryLocale - case promotedPurchases - case reviewSubmissions - case sku - case subscriptionGracePeriod - case subscriptionGroups - case subscriptionStatusUrl - case subscriptionStatusUrlForSandbox - case subscriptionStatusUrlVersion - case subscriptionStatusUrlVersionForSandbox - case unknown(String) - - public var rawValue: String { - switch self { - case .appAvailability: return "appAvailability" - case .appClips: return "appClips" - case .appCustomProductPages: return "appCustomProductPages" - case .appEncryptionDeclarations: return "appEncryptionDeclarations" - case .appEvents: return "appEvents" - case .appInfos: return "appInfos" - case .appPricePoints: return "appPricePoints" - case .appPriceSchedule: return "appPriceSchedule" - case .appStoreVersionExperimentsV2: return "appStoreVersionExperimentsV2" - case .appStoreVersions: return "appStoreVersions" - case .availableInNewTerritories: return "availableInNewTerritories" - case .availableTerritories: return "availableTerritories" - case .betaAppLocalizations: return "betaAppLocalizations" - case .betaAppReviewDetail: return "betaAppReviewDetail" - case .betaGroups: return "betaGroups" - case .betaLicenseAgreement: return "betaLicenseAgreement" - case .betaTesters: return "betaTesters" - case .builds: return "builds" - case .bundleId: return "bundleId" - case .ciProduct: return "ciProduct" - case .contentRightsDeclaration: return "contentRightsDeclaration" - case .customerReviews: return "customerReviews" - case .endUserLicenseAgreement: return "endUserLicenseAgreement" - case .gameCenterDetail: return "gameCenterDetail" - case .gameCenterEnabledVersions: return "gameCenterEnabledVersions" - case .inAppPurchases: return "inAppPurchases" - case .inAppPurchasesV2: return "inAppPurchasesV2" - case .isOrEverWasMadeForKids: return "isOrEverWasMadeForKids" - case .name: return "name" - case .perfPowerMetrics: return "perfPowerMetrics" - case .preOrder: return "preOrder" - case .preReleaseVersions: return "preReleaseVersions" - case .pricePoints: return "pricePoints" - case .prices: return "prices" - case .primaryLocale: return "primaryLocale" - case .promotedPurchases: return "promotedPurchases" - case .reviewSubmissions: return "reviewSubmissions" - case .sku: return "sku" - case .subscriptionGracePeriod: return "subscriptionGracePeriod" - case .subscriptionGroups: return "subscriptionGroups" - case .subscriptionStatusUrl: return "subscriptionStatusUrl" - case .subscriptionStatusUrlForSandbox: return "subscriptionStatusUrlForSandbox" - case .subscriptionStatusUrlVersion: return "subscriptionStatusUrlVersion" - case .subscriptionStatusUrlVersionForSandbox: return "subscriptionStatusUrlVersionForSandbox" - case .unknown(let rawValue): return rawValue - } + public struct Apps: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var accessibilityDeclarations: Self { + .init(rawValue: "accessibilityDeclarations") } - public init(rawValue: String) { - switch rawValue { - case "appAvailability": self = .appAvailability - case "appClips": self = .appClips - case "appCustomProductPages": self = .appCustomProductPages - case "appEncryptionDeclarations": self = .appEncryptionDeclarations - case "appEvents": self = .appEvents - case "appInfos": self = .appInfos - case "appPricePoints": self = .appPricePoints - case "appPriceSchedule": self = .appPriceSchedule - case "appStoreVersionExperimentsV2": self = .appStoreVersionExperimentsV2 - case "appStoreVersions": self = .appStoreVersions - case "availableInNewTerritories": self = .availableInNewTerritories - case "availableTerritories": self = .availableTerritories - case "betaAppLocalizations": self = .betaAppLocalizations - case "betaAppReviewDetail": self = .betaAppReviewDetail - case "betaGroups": self = .betaGroups - case "betaLicenseAgreement": self = .betaLicenseAgreement - case "betaTesters": self = .betaTesters - case "builds": self = .builds - case "bundleId": self = .bundleId - case "ciProduct": self = .ciProduct - case "contentRightsDeclaration": self = .contentRightsDeclaration - case "customerReviews": self = .customerReviews - case "endUserLicenseAgreement": self = .endUserLicenseAgreement - case "gameCenterDetail": self = .gameCenterDetail - case "gameCenterEnabledVersions": self = .gameCenterEnabledVersions - case "inAppPurchases": self = .inAppPurchases - case "inAppPurchasesV2": self = .inAppPurchasesV2 - case "isOrEverWasMadeForKids": self = .isOrEverWasMadeForKids - case "name": self = .name - case "perfPowerMetrics": self = .perfPowerMetrics - case "preOrder": self = .preOrder - case "preReleaseVersions": self = .preReleaseVersions - case "pricePoints": self = .pricePoints - case "prices": self = .prices - case "primaryLocale": self = .primaryLocale - case "promotedPurchases": self = .promotedPurchases - case "reviewSubmissions": self = .reviewSubmissions - case "sku": self = .sku - case "subscriptionGracePeriod": self = .subscriptionGracePeriod - case "subscriptionGroups": self = .subscriptionGroups - case "subscriptionStatusUrl": self = .subscriptionStatusUrl - case "subscriptionStatusUrlForSandbox": self = .subscriptionStatusUrlForSandbox - case "subscriptionStatusUrlVersion": self = .subscriptionStatusUrlVersion - case "subscriptionStatusUrlVersionForSandbox": self = .subscriptionStatusUrlVersionForSandbox - default: self = .unknown(rawValue) - } + public static var accessibilityUrl: Self { + .init(rawValue: "accessibilityUrl") } - } - public enum CiBuildRuns: Hashable, Codable, RawRepresentable { - case actions - case buildRun - case builds - case cancelReason - case clean - case completionStatus - case createdDate - case destinationBranch - case destinationCommit - case executionProgress - case finishedDate - case isPullRequestBuild - case issueCounts - case number - case product - case pullRequest - case sourceBranchOrTag - case sourceCommit - case startReason - case startedDate - case workflow - case unknown(String) - - public var rawValue: String { - switch self { - case .actions: return "actions" - case .buildRun: return "buildRun" - case .builds: return "builds" - case .cancelReason: return "cancelReason" - case .clean: return "clean" - case .completionStatus: return "completionStatus" - case .createdDate: return "createdDate" - case .destinationBranch: return "destinationBranch" - case .destinationCommit: return "destinationCommit" - case .executionProgress: return "executionProgress" - case .finishedDate: return "finishedDate" - case .isPullRequestBuild: return "isPullRequestBuild" - case .issueCounts: return "issueCounts" - case .number: return "number" - case .product: return "product" - case .pullRequest: return "pullRequest" - case .sourceBranchOrTag: return "sourceBranchOrTag" - case .sourceCommit: return "sourceCommit" - case .startReason: return "startReason" - case .startedDate: return "startedDate" - case .workflow: return "workflow" - case .unknown(let rawValue): return rawValue - } + public static var alternativeDistributionKey: Self { + .init(rawValue: "alternativeDistributionKey") } - public init(rawValue: String) { - switch rawValue { - case "actions": self = .actions - case "buildRun": self = .buildRun - case "builds": self = .builds - case "cancelReason": self = .cancelReason - case "clean": self = .clean - case "completionStatus": self = .completionStatus - case "createdDate": self = .createdDate - case "destinationBranch": self = .destinationBranch - case "destinationCommit": self = .destinationCommit - case "executionProgress": self = .executionProgress - case "finishedDate": self = .finishedDate - case "isPullRequestBuild": self = .isPullRequestBuild - case "issueCounts": self = .issueCounts - case "number": self = .number - case "product": self = .product - case "pullRequest": self = .pullRequest - case "sourceBranchOrTag": self = .sourceBranchOrTag - case "sourceCommit": self = .sourceCommit - case "startReason": self = .startReason - case "startedDate": self = .startedDate - case "workflow": self = .workflow - default: self = .unknown(rawValue) - } + public static var analyticsReportRequests: Self { + .init(rawValue: "analyticsReportRequests") + } + + public static var appAvailabilityV2: Self { + .init(rawValue: "appAvailabilityV2") + } + + public static var appClips: Self { + .init(rawValue: "appClips") + } + + public static var appCustomProductPages: Self { + .init(rawValue: "appCustomProductPages") + } + + public static var appEncryptionDeclarations: Self { + .init(rawValue: "appEncryptionDeclarations") + } + + public static var appEvents: Self { + .init(rawValue: "appEvents") + } + + public static var appInfos: Self { + .init(rawValue: "appInfos") + } + + public static var appPricePoints: Self { + .init(rawValue: "appPricePoints") + } + + public static var appPriceSchedule: Self { + .init(rawValue: "appPriceSchedule") + } + + public static var appStoreVersionExperimentsV2: Self { + .init(rawValue: "appStoreVersionExperimentsV2") + } + + public static var appStoreVersions: Self { + .init(rawValue: "appStoreVersions") + } + + public static var backgroundAssets: Self { + .init(rawValue: "backgroundAssets") + } + + public static var betaAppLocalizations: Self { + .init(rawValue: "betaAppLocalizations") + } + + public static var betaAppReviewDetail: Self { + .init(rawValue: "betaAppReviewDetail") + } + + public static var betaFeedbackCrashSubmissions: Self { + .init(rawValue: "betaFeedbackCrashSubmissions") + } + + public static var betaFeedbackScreenshotSubmissions: Self { + .init(rawValue: "betaFeedbackScreenshotSubmissions") + } + + public static var betaGroups: Self { + .init(rawValue: "betaGroups") + } + + public static var betaLicenseAgreement: Self { + .init(rawValue: "betaLicenseAgreement") + } + + public static var betaTesters: Self { + .init(rawValue: "betaTesters") + } + + public static var builds: Self { + .init(rawValue: "builds") + } + + public static var bundleId: Self { + .init(rawValue: "bundleId") + } + + public static var ciProduct: Self { + .init(rawValue: "ciProduct") + } + + public static var contentRightsDeclaration: Self { + .init(rawValue: "contentRightsDeclaration") + } + + public static var customerReviewSummarizations: Self { + .init(rawValue: "customerReviewSummarizations") + } + + public static var customerReviews: Self { + .init(rawValue: "customerReviews") + } + + public static var endUserLicenseAgreement: Self { + .init(rawValue: "endUserLicenseAgreement") + } + + public static var gameCenterDetail: Self { + .init(rawValue: "gameCenterDetail") + } + + public static var gameCenterEnabledVersions: Self { + .init(rawValue: "gameCenterEnabledVersions") + } + + public static var inAppPurchases: Self { + .init(rawValue: "inAppPurchases") + } + + public static var inAppPurchasesV2: Self { + .init(rawValue: "inAppPurchasesV2") + } + + public static var isOrEverWasMadeForKids: Self { + .init(rawValue: "isOrEverWasMadeForKids") + } + + public static var marketplaceSearchDetail: Self { + .init(rawValue: "marketplaceSearchDetail") + } + + public static var name: Self { + .init(rawValue: "name") + } + + public static var perfPowerMetrics: Self { + .init(rawValue: "perfPowerMetrics") + } + + public static var preReleaseVersions: Self { + .init(rawValue: "preReleaseVersions") + } + + public static var primaryLocale: Self { + .init(rawValue: "primaryLocale") } - } - public enum CiProducts: Hashable, Codable, RawRepresentable { - case additionalRepositories - case app - case buildRuns - case bundleId - case createdDate - case name - case primaryRepositories - case productType - case workflows - case unknown(String) - - public var rawValue: String { - switch self { - case .additionalRepositories: return "additionalRepositories" - case .app: return "app" - case .buildRuns: return "buildRuns" - case .bundleId: return "bundleId" - case .createdDate: return "createdDate" - case .name: return "name" - case .primaryRepositories: return "primaryRepositories" - case .productType: return "productType" - case .workflows: return "workflows" - case .unknown(let rawValue): return rawValue - } + public static var promotedPurchases: Self { + .init(rawValue: "promotedPurchases") } + public static var reviewSubmissions: Self { + .init(rawValue: "reviewSubmissions") + } + + public static var sku: Self { + .init(rawValue: "sku") + } + + public static var streamlinedPurchasingEnabled: Self { + .init(rawValue: "streamlinedPurchasingEnabled") + } + + public static var subscriptionGracePeriod: Self { + .init(rawValue: "subscriptionGracePeriod") + } + + public static var subscriptionGroups: Self { + .init(rawValue: "subscriptionGroups") + } + + public static var subscriptionStatusUrl: Self { + .init(rawValue: "subscriptionStatusUrl") + } + + public static var subscriptionStatusUrlForSandbox: Self { + .init(rawValue: "subscriptionStatusUrlForSandbox") + } + + public static var subscriptionStatusUrlVersion: Self { + .init(rawValue: "subscriptionStatusUrlVersion") + } + + public static var subscriptionStatusUrlVersionForSandbox: Self { + .init(rawValue: "subscriptionStatusUrlVersionForSandbox") + } + + public static var webhooks: Self { + .init(rawValue: "webhooks") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "additionalRepositories": self = .additionalRepositories - case "app": self = .app - case "buildRuns": self = .buildRuns - case "bundleId": self = .bundleId - case "createdDate": self = .createdDate - case "name": self = .name - case "primaryRepositories": self = .primaryRepositories - case "productType": self = .productType - case "workflows": self = .workflows - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum CiWorkflows: Hashable, Codable, RawRepresentable { - case actions - case branchStartCondition - case buildRuns - case clean - case containerFilePath - case description - case isEnabled - case isLockedForEditing - case lastModifiedDate - case macOsVersion - case name - case product - case pullRequestStartCondition - case repository - case scheduledStartCondition - case tagStartCondition - case xcodeVersion - case unknown(String) - - public var rawValue: String { - switch self { - case .actions: return "actions" - case .branchStartCondition: return "branchStartCondition" - case .buildRuns: return "buildRuns" - case .clean: return "clean" - case .containerFilePath: return "containerFilePath" - case .description: return "description" - case .isEnabled: return "isEnabled" - case .isLockedForEditing: return "isLockedForEditing" - case .lastModifiedDate: return "lastModifiedDate" - case .macOsVersion: return "macOsVersion" - case .name: return "name" - case .product: return "product" - case .pullRequestStartCondition: return "pullRequestStartCondition" - case .repository: return "repository" - case .scheduledStartCondition: return "scheduledStartCondition" - case .tagStartCondition: return "tagStartCondition" - case .xcodeVersion: return "xcodeVersion" - case .unknown(let rawValue): return rawValue - } + public struct CiProducts: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var additionalRepositories: Self { + .init(rawValue: "additionalRepositories") + } + + public static var app: Self { + .init(rawValue: "app") + } + + public static var buildRuns: Self { + .init(rawValue: "buildRuns") + } + + public static var bundleId: Self { + .init(rawValue: "bundleId") + } + + public static var createdDate: Self { + .init(rawValue: "createdDate") + } + + public static var name: Self { + .init(rawValue: "name") + } + + public static var primaryRepositories: Self { + .init(rawValue: "primaryRepositories") + } + + public static var productType: Self { + .init(rawValue: "productType") + } + + public static var workflows: Self { + .init(rawValue: "workflows") } + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "actions": self = .actions - case "branchStartCondition": self = .branchStartCondition - case "buildRuns": self = .buildRuns - case "clean": self = .clean - case "containerFilePath": self = .containerFilePath - case "description": self = .description - case "isEnabled": self = .isEnabled - case "isLockedForEditing": self = .isLockedForEditing - case "lastModifiedDate": self = .lastModifiedDate - case "macOsVersion": self = .macOsVersion - case "name": self = .name - case "product": self = .product - case "pullRequestStartCondition": self = .pullRequestStartCondition - case "repository": self = .repository - case "scheduledStartCondition": self = .scheduledStartCondition - case "tagStartCondition": self = .tagStartCondition - case "xcodeVersion": self = .xcodeVersion - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum ScmRepositories: Hashable, Codable, RawRepresentable { - case defaultBranch - case gitReferences - case httpCloneUrl - case lastAccessedDate - case ownerName - case pullRequests - case repositoryName - case scmProvider - case sshCloneUrl - case unknown(String) - - public var rawValue: String { - switch self { - case .defaultBranch: return "defaultBranch" - case .gitReferences: return "gitReferences" - case .httpCloneUrl: return "httpCloneUrl" - case .lastAccessedDate: return "lastAccessedDate" - case .ownerName: return "ownerName" - case .pullRequests: return "pullRequests" - case .repositoryName: return "repositoryName" - case .scmProvider: return "scmProvider" - case .sshCloneUrl: return "sshCloneUrl" - case .unknown(let rawValue): return rawValue - } + public struct ScmRepositories: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var defaultBranch: Self { + .init(rawValue: "defaultBranch") + } + + public static var gitReferences: Self { + .init(rawValue: "gitReferences") + } + + public static var httpCloneUrl: Self { + .init(rawValue: "httpCloneUrl") + } + + public static var lastAccessedDate: Self { + .init(rawValue: "lastAccessedDate") + } + + public static var ownerName: Self { + .init(rawValue: "ownerName") + } + + public static var pullRequests: Self { + .init(rawValue: "pullRequests") + } + + public static var repositoryName: Self { + .init(rawValue: "repositoryName") + } + + public static var scmProvider: Self { + .init(rawValue: "scmProvider") + } + + public static var sshCloneUrl: Self { + .init(rawValue: "sshCloneUrl") } + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "defaultBranch": self = .defaultBranch - case "gitReferences": self = .gitReferences - case "httpCloneUrl": self = .httpCloneUrl - case "lastAccessedDate": self = .lastAccessedDate - case "ownerName": self = .ownerName - case "pullRequests": self = .pullRequests - case "repositoryName": self = .repositoryName - case "scmProvider": self = .scmProvider - case "sshCloneUrl": self = .sshCloneUrl - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } @@ -487,21 +419,11 @@ extension V1.CiProducts.GET { .init(key: "fields[apps]") } - /// the fields to include for returned resources of type ciBuildRuns - public static var ciBuildRuns: Relation<[CiBuildRuns]?> { - .init(key: "fields[ciBuildRuns]") - } - /// the fields to include for returned resources of type ciProducts public static var ciProducts: Relation<[CiProducts]?> { .init(key: "fields[ciProducts]") } - /// the fields to include for returned resources of type ciWorkflows - public static var ciWorkflows: Relation<[CiWorkflows]?> { - .init(key: "fields[ciWorkflows]") - } - /// the fields to include for returned resources of type scmRepositories public static var scmRepositories: Relation<[ScmRepositories]?> { .init(key: "fields[scmRepositories]") @@ -523,25 +445,23 @@ extension V1.CiProducts.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum ProductType: Hashable, Codable, RawRepresentable { - case app - case framework - case unknown(String) + public struct ProductType: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var app: Self { + .init(rawValue: "APP") + } + + public static var framework: Self { + .init(rawValue: "FRAMEWORK") + } - public var rawValue: String { - switch self { - case .app: return "APP" - case .framework: return "FRAMEWORK" - case .unknown(let rawValue): return rawValue - } + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "APP": self = .app - case "FRAMEWORK": self = .framework - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } @@ -564,28 +484,27 @@ extension V1.CiProducts.GET { } } - public enum Include: Hashable, Codable, RawRepresentable { - case app - case bundleId - case primaryRepositories - case unknown(String) + public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var app: Self { + .init(rawValue: "app") + } - public var rawValue: String { - switch self { - case .app: return "app" - case .bundleId: return "bundleId" - case .primaryRepositories: return "primaryRepositories" - case .unknown(let rawValue): return rawValue - } + public static var bundleId: Self { + .init(rawValue: "bundleId") + } + + public static var primaryRepositories: Self { + .init(rawValue: "primaryRepositories") } + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "app": self = .app - case "bundleId": self = .bundleId - case "primaryRepositories": self = .primaryRepositories - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/CiTestResults/ById/CiTestResultsById.GET.1e23798.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/CiTestResults/ById/CiTestResultsById.GET.1e23798.generated.swift index 4518fce7..fca53d62 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/CiTestResults/ById/CiTestResultsById.GET.1e23798.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/CiTestResults/ById/CiTestResultsById.GET.1e23798.generated.swift @@ -42,8 +42,10 @@ extension V1.CiTestResults.ById { /// - Returns: **200**, Single CiTestResult as `CiTestResultResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -57,12 +59,18 @@ extension V1.CiTestResults.ById { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 404: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -82,37 +90,39 @@ extension V1.CiTestResults.ById.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum CiTestResults: Hashable, Codable, RawRepresentable { - case className - case destinationTestResults - case fileSource - case message - case name - case status - case unknown(String) - - public var rawValue: String { - switch self { - case .className: return "className" - case .destinationTestResults: return "destinationTestResults" - case .fileSource: return "fileSource" - case .message: return "message" - case .name: return "name" - case .status: return "status" - case .unknown(let rawValue): return rawValue - } + public struct CiTestResults: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var className: Self { + .init(rawValue: "className") } + public static var destinationTestResults: Self { + .init(rawValue: "destinationTestResults") + } + + public static var fileSource: Self { + .init(rawValue: "fileSource") + } + + public static var message: Self { + .init(rawValue: "message") + } + + public static var name: Self { + .init(rawValue: "name") + } + + public static var status: Self { + .init(rawValue: "status") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "className": self = .className - case "destinationTestResults": self = .destinationTestResults - case "fileSource": self = .fileSource - case "message": self = .message - case "name": self = .name - case "status": self = .status - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/CiWorkflows/ById/BuildRuns/CiWorkflowsByIdBuildRuns.GET.5c8de1d.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/CiWorkflows/ById/BuildRuns/CiWorkflowsByIdBuildRuns.GET.5c8de1d.generated.swift index 149172a5..95e387c4 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/CiWorkflows/ById/BuildRuns/CiWorkflowsByIdBuildRuns.GET.5c8de1d.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/CiWorkflows/ById/BuildRuns/CiWorkflowsByIdBuildRuns.GET.5c8de1d.generated.swift @@ -47,7 +47,9 @@ extension V1.CiWorkflows.ById.BuildRuns { URLQueryItem(name: "limit[builds]", value: parameters.limit[.builds].map { "\($0)" }), URLQueryItem(name: "limit", - value: parameters.limit[].map { "\($0)" }) + value: parameters.limit[].map { "\($0)" }), + URLQueryItem(name: "sort", + value: parameters.sort?.map { "\($0)" }.joined(separator: ",")) ].filter { $0.value != nil } if components?.queryItems?.isEmpty ?? false { components?.queryItems = nil @@ -60,8 +62,10 @@ extension V1.CiWorkflows.ById.BuildRuns { /// - Returns: **200**, List of CiBuildRuns as `CiBuildRunsResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -75,12 +79,18 @@ extension V1.CiWorkflows.ById.BuildRuns { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 404: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -100,6 +110,9 @@ extension V1.CiWorkflows.ById.BuildRuns.GET { /// maximum resources per page public var limit: Limit = Limit() + /// comma-separated list of sort expressions; resources will be sorted as specified + public var sort: [Sort]? + public struct Fields: Hashable { public subscript (_ relation: Relation) -> T { get { values[relation]?.base as! T } @@ -108,363 +121,435 @@ extension V1.CiWorkflows.ById.BuildRuns.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum Builds: Hashable, Codable, RawRepresentable { - case app - case appEncryptionDeclaration - case appStoreVersion - case betaAppReviewSubmission - case betaBuildLocalizations - case betaGroups - case buildAudienceType - case buildBetaDetail - case buildBundles - case computedMinMacOsVersion - case diagnosticSignatures - case expirationDate - case expired - case iconAssetToken - case icons - case individualTesters - case lsMinimumSystemVersion - case minOsVersion - case perfPowerMetrics - case preReleaseVersion - case processingState - case uploadedDate - case usesNonExemptEncryption - case version - case unknown(String) - - public var rawValue: String { - switch self { - case .app: return "app" - case .appEncryptionDeclaration: return "appEncryptionDeclaration" - case .appStoreVersion: return "appStoreVersion" - case .betaAppReviewSubmission: return "betaAppReviewSubmission" - case .betaBuildLocalizations: return "betaBuildLocalizations" - case .betaGroups: return "betaGroups" - case .buildAudienceType: return "buildAudienceType" - case .buildBetaDetail: return "buildBetaDetail" - case .buildBundles: return "buildBundles" - case .computedMinMacOsVersion: return "computedMinMacOsVersion" - case .diagnosticSignatures: return "diagnosticSignatures" - case .expirationDate: return "expirationDate" - case .expired: return "expired" - case .iconAssetToken: return "iconAssetToken" - case .icons: return "icons" - case .individualTesters: return "individualTesters" - case .lsMinimumSystemVersion: return "lsMinimumSystemVersion" - case .minOsVersion: return "minOsVersion" - case .perfPowerMetrics: return "perfPowerMetrics" - case .preReleaseVersion: return "preReleaseVersion" - case .processingState: return "processingState" - case .uploadedDate: return "uploadedDate" - case .usesNonExemptEncryption: return "usesNonExemptEncryption" - case .version: return "version" - case .unknown(let rawValue): return rawValue - } + public struct Builds: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var app: Self { + .init(rawValue: "app") + } + + public static var appEncryptionDeclaration: Self { + .init(rawValue: "appEncryptionDeclaration") + } + + public static var appStoreVersion: Self { + .init(rawValue: "appStoreVersion") + } + + public static var betaAppReviewSubmission: Self { + .init(rawValue: "betaAppReviewSubmission") + } + + public static var betaBuildLocalizations: Self { + .init(rawValue: "betaBuildLocalizations") + } + + public static var betaGroups: Self { + .init(rawValue: "betaGroups") + } + + public static var buildAudienceType: Self { + .init(rawValue: "buildAudienceType") + } + + public static var buildBetaDetail: Self { + .init(rawValue: "buildBetaDetail") + } + + public static var buildBundles: Self { + .init(rawValue: "buildBundles") + } + + public static var computedMinMacOsVersion: Self { + .init(rawValue: "computedMinMacOsVersion") + } + + public static var computedMinVisionOsVersion: Self { + .init(rawValue: "computedMinVisionOsVersion") + } + + public static var diagnosticSignatures: Self { + .init(rawValue: "diagnosticSignatures") + } + + public static var expirationDate: Self { + .init(rawValue: "expirationDate") + } + + public static var expired: Self { + .init(rawValue: "expired") + } + + public static var iconAssetToken: Self { + .init(rawValue: "iconAssetToken") + } + + public static var icons: Self { + .init(rawValue: "icons") + } + + public static var individualTesters: Self { + .init(rawValue: "individualTesters") + } + + public static var lsMinimumSystemVersion: Self { + .init(rawValue: "lsMinimumSystemVersion") + } + + public static var minOsVersion: Self { + .init(rawValue: "minOsVersion") + } + + public static var perfPowerMetrics: Self { + .init(rawValue: "perfPowerMetrics") + } + + public static var preReleaseVersion: Self { + .init(rawValue: "preReleaseVersion") + } + + public static var processingState: Self { + .init(rawValue: "processingState") + } + + public static var uploadedDate: Self { + .init(rawValue: "uploadedDate") + } + + public static var usesNonExemptEncryption: Self { + .init(rawValue: "usesNonExemptEncryption") + } + + public static var version: Self { + .init(rawValue: "version") + } + + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "app": self = .app - case "appEncryptionDeclaration": self = .appEncryptionDeclaration - case "appStoreVersion": self = .appStoreVersion - case "betaAppReviewSubmission": self = .betaAppReviewSubmission - case "betaBuildLocalizations": self = .betaBuildLocalizations - case "betaGroups": self = .betaGroups - case "buildAudienceType": self = .buildAudienceType - case "buildBetaDetail": self = .buildBetaDetail - case "buildBundles": self = .buildBundles - case "computedMinMacOsVersion": self = .computedMinMacOsVersion - case "diagnosticSignatures": self = .diagnosticSignatures - case "expirationDate": self = .expirationDate - case "expired": self = .expired - case "iconAssetToken": self = .iconAssetToken - case "icons": self = .icons - case "individualTesters": self = .individualTesters - case "lsMinimumSystemVersion": self = .lsMinimumSystemVersion - case "minOsVersion": self = .minOsVersion - case "perfPowerMetrics": self = .perfPowerMetrics - case "preReleaseVersion": self = .preReleaseVersion - case "processingState": self = .processingState - case "uploadedDate": self = .uploadedDate - case "usesNonExemptEncryption": self = .usesNonExemptEncryption - case "version": self = .version - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum CiBuildRuns: Hashable, Codable, RawRepresentable { - case actions - case buildRun - case builds - case cancelReason - case clean - case completionStatus - case createdDate - case destinationBranch - case destinationCommit - case executionProgress - case finishedDate - case isPullRequestBuild - case issueCounts - case number - case product - case pullRequest - case sourceBranchOrTag - case sourceCommit - case startReason - case startedDate - case workflow - case unknown(String) - - public var rawValue: String { - switch self { - case .actions: return "actions" - case .buildRun: return "buildRun" - case .builds: return "builds" - case .cancelReason: return "cancelReason" - case .clean: return "clean" - case .completionStatus: return "completionStatus" - case .createdDate: return "createdDate" - case .destinationBranch: return "destinationBranch" - case .destinationCommit: return "destinationCommit" - case .executionProgress: return "executionProgress" - case .finishedDate: return "finishedDate" - case .isPullRequestBuild: return "isPullRequestBuild" - case .issueCounts: return "issueCounts" - case .number: return "number" - case .product: return "product" - case .pullRequest: return "pullRequest" - case .sourceBranchOrTag: return "sourceBranchOrTag" - case .sourceCommit: return "sourceCommit" - case .startReason: return "startReason" - case .startedDate: return "startedDate" - case .workflow: return "workflow" - case .unknown(let rawValue): return rawValue - } + public struct CiBuildRuns: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var actions: Self { + .init(rawValue: "actions") + } + + public static var builds: Self { + .init(rawValue: "builds") + } + + public static var cancelReason: Self { + .init(rawValue: "cancelReason") + } + + public static var completionStatus: Self { + .init(rawValue: "completionStatus") + } + + public static var createdDate: Self { + .init(rawValue: "createdDate") + } + + public static var destinationBranch: Self { + .init(rawValue: "destinationBranch") + } + + public static var destinationCommit: Self { + .init(rawValue: "destinationCommit") + } + + public static var executionProgress: Self { + .init(rawValue: "executionProgress") + } + + public static var finishedDate: Self { + .init(rawValue: "finishedDate") + } + + public static var isPullRequestBuild: Self { + .init(rawValue: "isPullRequestBuild") + } + + public static var issueCounts: Self { + .init(rawValue: "issueCounts") + } + + public static var number: Self { + .init(rawValue: "number") + } + + public static var product: Self { + .init(rawValue: "product") + } + + public static var pullRequest: Self { + .init(rawValue: "pullRequest") } + public static var sourceBranchOrTag: Self { + .init(rawValue: "sourceBranchOrTag") + } + + public static var sourceCommit: Self { + .init(rawValue: "sourceCommit") + } + + public static var startReason: Self { + .init(rawValue: "startReason") + } + + public static var startedDate: Self { + .init(rawValue: "startedDate") + } + + public static var workflow: Self { + .init(rawValue: "workflow") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "actions": self = .actions - case "buildRun": self = .buildRun - case "builds": self = .builds - case "cancelReason": self = .cancelReason - case "clean": self = .clean - case "completionStatus": self = .completionStatus - case "createdDate": self = .createdDate - case "destinationBranch": self = .destinationBranch - case "destinationCommit": self = .destinationCommit - case "executionProgress": self = .executionProgress - case "finishedDate": self = .finishedDate - case "isPullRequestBuild": self = .isPullRequestBuild - case "issueCounts": self = .issueCounts - case "number": self = .number - case "product": self = .product - case "pullRequest": self = .pullRequest - case "sourceBranchOrTag": self = .sourceBranchOrTag - case "sourceCommit": self = .sourceCommit - case "startReason": self = .startReason - case "startedDate": self = .startedDate - case "workflow": self = .workflow - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum CiProducts: Hashable, Codable, RawRepresentable { - case additionalRepositories - case app - case buildRuns - case bundleId - case createdDate - case name - case primaryRepositories - case productType - case workflows - case unknown(String) - - public var rawValue: String { - switch self { - case .additionalRepositories: return "additionalRepositories" - case .app: return "app" - case .buildRuns: return "buildRuns" - case .bundleId: return "bundleId" - case .createdDate: return "createdDate" - case .name: return "name" - case .primaryRepositories: return "primaryRepositories" - case .productType: return "productType" - case .workflows: return "workflows" - case .unknown(let rawValue): return rawValue - } + public struct CiProducts: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var additionalRepositories: Self { + .init(rawValue: "additionalRepositories") + } + + public static var app: Self { + .init(rawValue: "app") + } + + public static var buildRuns: Self { + .init(rawValue: "buildRuns") + } + + public static var bundleId: Self { + .init(rawValue: "bundleId") + } + + public static var createdDate: Self { + .init(rawValue: "createdDate") + } + + public static var name: Self { + .init(rawValue: "name") + } + + public static var primaryRepositories: Self { + .init(rawValue: "primaryRepositories") + } + + public static var productType: Self { + .init(rawValue: "productType") } + public static var workflows: Self { + .init(rawValue: "workflows") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "additionalRepositories": self = .additionalRepositories - case "app": self = .app - case "buildRuns": self = .buildRuns - case "bundleId": self = .bundleId - case "createdDate": self = .createdDate - case "name": self = .name - case "primaryRepositories": self = .primaryRepositories - case "productType": self = .productType - case "workflows": self = .workflows - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum CiWorkflows: Hashable, Codable, RawRepresentable { - case actions - case branchStartCondition - case buildRuns - case clean - case containerFilePath - case description - case isEnabled - case isLockedForEditing - case lastModifiedDate - case macOsVersion - case name - case product - case pullRequestStartCondition - case repository - case scheduledStartCondition - case tagStartCondition - case xcodeVersion - case unknown(String) - - public var rawValue: String { - switch self { - case .actions: return "actions" - case .branchStartCondition: return "branchStartCondition" - case .buildRuns: return "buildRuns" - case .clean: return "clean" - case .containerFilePath: return "containerFilePath" - case .description: return "description" - case .isEnabled: return "isEnabled" - case .isLockedForEditing: return "isLockedForEditing" - case .lastModifiedDate: return "lastModifiedDate" - case .macOsVersion: return "macOsVersion" - case .name: return "name" - case .product: return "product" - case .pullRequestStartCondition: return "pullRequestStartCondition" - case .repository: return "repository" - case .scheduledStartCondition: return "scheduledStartCondition" - case .tagStartCondition: return "tagStartCondition" - case .xcodeVersion: return "xcodeVersion" - case .unknown(let rawValue): return rawValue - } + public struct CiWorkflows: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var actions: Self { + .init(rawValue: "actions") + } + + public static var branchStartCondition: Self { + .init(rawValue: "branchStartCondition") + } + + public static var buildRuns: Self { + .init(rawValue: "buildRuns") + } + + public static var clean: Self { + .init(rawValue: "clean") + } + + public static var containerFilePath: Self { + .init(rawValue: "containerFilePath") + } + + public static var description: Self { + .init(rawValue: "description") + } + + public static var isEnabled: Self { + .init(rawValue: "isEnabled") + } + + public static var isLockedForEditing: Self { + .init(rawValue: "isLockedForEditing") + } + + public static var lastModifiedDate: Self { + .init(rawValue: "lastModifiedDate") + } + + public static var macOsVersion: Self { + .init(rawValue: "macOsVersion") + } + + public static var manualBranchStartCondition: Self { + .init(rawValue: "manualBranchStartCondition") + } + + public static var manualPullRequestStartCondition: Self { + .init(rawValue: "manualPullRequestStartCondition") } + public static var manualTagStartCondition: Self { + .init(rawValue: "manualTagStartCondition") + } + + public static var name: Self { + .init(rawValue: "name") + } + + public static var product: Self { + .init(rawValue: "product") + } + + public static var pullRequestStartCondition: Self { + .init(rawValue: "pullRequestStartCondition") + } + + public static var repository: Self { + .init(rawValue: "repository") + } + + public static var scheduledStartCondition: Self { + .init(rawValue: "scheduledStartCondition") + } + + public static var tagStartCondition: Self { + .init(rawValue: "tagStartCondition") + } + + public static var xcodeVersion: Self { + .init(rawValue: "xcodeVersion") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "actions": self = .actions - case "branchStartCondition": self = .branchStartCondition - case "buildRuns": self = .buildRuns - case "clean": self = .clean - case "containerFilePath": self = .containerFilePath - case "description": self = .description - case "isEnabled": self = .isEnabled - case "isLockedForEditing": self = .isLockedForEditing - case "lastModifiedDate": self = .lastModifiedDate - case "macOsVersion": self = .macOsVersion - case "name": self = .name - case "product": self = .product - case "pullRequestStartCondition": self = .pullRequestStartCondition - case "repository": self = .repository - case "scheduledStartCondition": self = .scheduledStartCondition - case "tagStartCondition": self = .tagStartCondition - case "xcodeVersion": self = .xcodeVersion - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum ScmGitReferences: Hashable, Codable, RawRepresentable { - case canonicalName - case isDeleted - case kind - case name - case repository - case unknown(String) - - public var rawValue: String { - switch self { - case .canonicalName: return "canonicalName" - case .isDeleted: return "isDeleted" - case .kind: return "kind" - case .name: return "name" - case .repository: return "repository" - case .unknown(let rawValue): return rawValue - } + public struct ScmGitReferences: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var canonicalName: Self { + .init(rawValue: "canonicalName") + } + + public static var isDeleted: Self { + .init(rawValue: "isDeleted") + } + + public static var kind: Self { + .init(rawValue: "kind") + } + + public static var name: Self { + .init(rawValue: "name") + } + + public static var repository: Self { + .init(rawValue: "repository") } + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "canonicalName": self = .canonicalName - case "isDeleted": self = .isDeleted - case "kind": self = .kind - case "name": self = .name - case "repository": self = .repository - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum ScmPullRequests: Hashable, Codable, RawRepresentable { - case destinationBranchName - case destinationRepositoryName - case destinationRepositoryOwner - case isClosed - case isCrossRepository - case number - case repository - case sourceBranchName - case sourceRepositoryName - case sourceRepositoryOwner - case title - case webUrl - case unknown(String) - - public var rawValue: String { - switch self { - case .destinationBranchName: return "destinationBranchName" - case .destinationRepositoryName: return "destinationRepositoryName" - case .destinationRepositoryOwner: return "destinationRepositoryOwner" - case .isClosed: return "isClosed" - case .isCrossRepository: return "isCrossRepository" - case .number: return "number" - case .repository: return "repository" - case .sourceBranchName: return "sourceBranchName" - case .sourceRepositoryName: return "sourceRepositoryName" - case .sourceRepositoryOwner: return "sourceRepositoryOwner" - case .title: return "title" - case .webUrl: return "webUrl" - case .unknown(let rawValue): return rawValue - } + public struct ScmPullRequests: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var destinationBranchName: Self { + .init(rawValue: "destinationBranchName") + } + + public static var destinationRepositoryName: Self { + .init(rawValue: "destinationRepositoryName") + } + + public static var destinationRepositoryOwner: Self { + .init(rawValue: "destinationRepositoryOwner") + } + + public static var isClosed: Self { + .init(rawValue: "isClosed") + } + + public static var isCrossRepository: Self { + .init(rawValue: "isCrossRepository") + } + + public static var number: Self { + .init(rawValue: "number") + } + + public static var repository: Self { + .init(rawValue: "repository") + } + + public static var sourceBranchName: Self { + .init(rawValue: "sourceBranchName") + } + + public static var sourceRepositoryName: Self { + .init(rawValue: "sourceRepositoryName") + } + + public static var sourceRepositoryOwner: Self { + .init(rawValue: "sourceRepositoryOwner") + } + + public static var title: Self { + .init(rawValue: "title") + } + + public static var webUrl: Self { + .init(rawValue: "webUrl") + } + + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "destinationBranchName": self = .destinationBranchName - case "destinationRepositoryName": self = .destinationRepositoryName - case "destinationRepositoryOwner": self = .destinationRepositoryOwner - case "isClosed": self = .isClosed - case "isCrossRepository": self = .isCrossRepository - case "number": self = .number - case "repository": self = .repository - case "sourceBranchName": self = .sourceBranchName - case "sourceRepositoryName": self = .sourceRepositoryName - case "sourceRepositoryOwner": self = .sourceRepositoryOwner - case "title": self = .title - case "webUrl": self = .webUrl - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } @@ -529,37 +614,39 @@ extension V1.CiWorkflows.ById.BuildRuns.GET { } } - public enum Include: Hashable, Codable, RawRepresentable { - case builds - case destinationBranch - case product - case pullRequest - case sourceBranchOrTag - case workflow - case unknown(String) - - public var rawValue: String { - switch self { - case .builds: return "builds" - case .destinationBranch: return "destinationBranch" - case .product: return "product" - case .pullRequest: return "pullRequest" - case .sourceBranchOrTag: return "sourceBranchOrTag" - case .workflow: return "workflow" - case .unknown(let rawValue): return rawValue - } + public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var builds: Self { + .init(rawValue: "builds") + } + + public static var destinationBranch: Self { + .init(rawValue: "destinationBranch") + } + + public static var product: Self { + .init(rawValue: "product") + } + + public static var pullRequest: Self { + .init(rawValue: "pullRequest") + } + + public static var sourceBranchOrTag: Self { + .init(rawValue: "sourceBranchOrTag") + } + + public static var workflow: Self { + .init(rawValue: "workflow") + } + + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "builds": self = .builds - case "destinationBranch": self = .destinationBranch - case "product": self = .product - case "pullRequest": self = .pullRequest - case "sourceBranchOrTag": self = .sourceBranchOrTag - case "workflow": self = .workflow - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } @@ -589,6 +676,26 @@ extension V1.CiWorkflows.ById.BuildRuns.GET { } } } + + public struct Sort: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var number: Self { + .init(rawValue: "number") + } + + public static var numberDesc: Self { + .init(rawValue: "-number") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/CiWorkflows/ById/CiWorkflowsById.DELETE.c983433.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/CiWorkflows/ById/CiWorkflowsById.DELETE.c983433.generated.swift index b7f79c4d..65a70045 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/CiWorkflows/ById/CiWorkflowsById.DELETE.c983433.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/CiWorkflows/ById/CiWorkflowsById.DELETE.c983433.generated.swift @@ -31,11 +31,12 @@ extension V1.CiWorkflows.ById { return urlRequest } - /// - Returns: **204**, Success (no content) /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -43,12 +44,12 @@ extension V1.CiWorkflows.ById { } switch urlResponse.statusCode { - case 204: - return - case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) @@ -58,6 +59,9 @@ extension V1.CiWorkflows.ById { case 409: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/CiWorkflows/ById/CiWorkflowsById.GET.c983433.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/CiWorkflows/ById/CiWorkflowsById.GET.c983433.generated.swift index 17c4cc2b..c9bc1998 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/CiWorkflows/ById/CiWorkflowsById.GET.c983433.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/CiWorkflows/ById/CiWorkflowsById.GET.c983433.generated.swift @@ -28,8 +28,6 @@ extension V1.CiWorkflows.ById { components?.path = path components?.queryItems = [ - URLQueryItem(name: "fields[ciBuildRuns]", - value: parameters.fields[.ciBuildRuns]?.map { "\($0)" }.joined(separator: ",")), URLQueryItem(name: "fields[ciWorkflows]", value: parameters.fields[.ciWorkflows]?.map { "\($0)" }.joined(separator: ",")), URLQueryItem(name: "fields[scmRepositories]", @@ -48,8 +46,10 @@ extension V1.CiWorkflows.ById { /// - Returns: **200**, Single CiWorkflow as `CiWorkflowResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -63,12 +63,18 @@ extension V1.CiWorkflows.ById { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 404: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -91,201 +97,147 @@ extension V1.CiWorkflows.ById.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum CiBuildRuns: Hashable, Codable, RawRepresentable { - case actions - case buildRun - case builds - case cancelReason - case clean - case completionStatus - case createdDate - case destinationBranch - case destinationCommit - case executionProgress - case finishedDate - case isPullRequestBuild - case issueCounts - case number - case product - case pullRequest - case sourceBranchOrTag - case sourceCommit - case startReason - case startedDate - case workflow - case unknown(String) - - public var rawValue: String { - switch self { - case .actions: return "actions" - case .buildRun: return "buildRun" - case .builds: return "builds" - case .cancelReason: return "cancelReason" - case .clean: return "clean" - case .completionStatus: return "completionStatus" - case .createdDate: return "createdDate" - case .destinationBranch: return "destinationBranch" - case .destinationCommit: return "destinationCommit" - case .executionProgress: return "executionProgress" - case .finishedDate: return "finishedDate" - case .isPullRequestBuild: return "isPullRequestBuild" - case .issueCounts: return "issueCounts" - case .number: return "number" - case .product: return "product" - case .pullRequest: return "pullRequest" - case .sourceBranchOrTag: return "sourceBranchOrTag" - case .sourceCommit: return "sourceCommit" - case .startReason: return "startReason" - case .startedDate: return "startedDate" - case .workflow: return "workflow" - case .unknown(let rawValue): return rawValue - } + public struct CiWorkflows: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var actions: Self { + .init(rawValue: "actions") } - public init(rawValue: String) { - switch rawValue { - case "actions": self = .actions - case "buildRun": self = .buildRun - case "builds": self = .builds - case "cancelReason": self = .cancelReason - case "clean": self = .clean - case "completionStatus": self = .completionStatus - case "createdDate": self = .createdDate - case "destinationBranch": self = .destinationBranch - case "destinationCommit": self = .destinationCommit - case "executionProgress": self = .executionProgress - case "finishedDate": self = .finishedDate - case "isPullRequestBuild": self = .isPullRequestBuild - case "issueCounts": self = .issueCounts - case "number": self = .number - case "product": self = .product - case "pullRequest": self = .pullRequest - case "sourceBranchOrTag": self = .sourceBranchOrTag - case "sourceCommit": self = .sourceCommit - case "startReason": self = .startReason - case "startedDate": self = .startedDate - case "workflow": self = .workflow - default: self = .unknown(rawValue) - } + public static var branchStartCondition: Self { + .init(rawValue: "branchStartCondition") + } + + public static var buildRuns: Self { + .init(rawValue: "buildRuns") + } + + public static var clean: Self { + .init(rawValue: "clean") + } + + public static var containerFilePath: Self { + .init(rawValue: "containerFilePath") + } + + public static var description: Self { + .init(rawValue: "description") + } + + public static var isEnabled: Self { + .init(rawValue: "isEnabled") + } + + public static var isLockedForEditing: Self { + .init(rawValue: "isLockedForEditing") + } + + public static var lastModifiedDate: Self { + .init(rawValue: "lastModifiedDate") + } + + public static var macOsVersion: Self { + .init(rawValue: "macOsVersion") + } + + public static var manualBranchStartCondition: Self { + .init(rawValue: "manualBranchStartCondition") + } + + public static var manualPullRequestStartCondition: Self { + .init(rawValue: "manualPullRequestStartCondition") + } + + public static var manualTagStartCondition: Self { + .init(rawValue: "manualTagStartCondition") + } + + public static var name: Self { + .init(rawValue: "name") + } + + public static var product: Self { + .init(rawValue: "product") + } + + public static var pullRequestStartCondition: Self { + .init(rawValue: "pullRequestStartCondition") + } + + public static var repository: Self { + .init(rawValue: "repository") + } + + public static var scheduledStartCondition: Self { + .init(rawValue: "scheduledStartCondition") } - } - public enum CiWorkflows: Hashable, Codable, RawRepresentable { - case actions - case branchStartCondition - case buildRuns - case clean - case containerFilePath - case description - case isEnabled - case isLockedForEditing - case lastModifiedDate - case macOsVersion - case name - case product - case pullRequestStartCondition - case repository - case scheduledStartCondition - case tagStartCondition - case xcodeVersion - case unknown(String) - - public var rawValue: String { - switch self { - case .actions: return "actions" - case .branchStartCondition: return "branchStartCondition" - case .buildRuns: return "buildRuns" - case .clean: return "clean" - case .containerFilePath: return "containerFilePath" - case .description: return "description" - case .isEnabled: return "isEnabled" - case .isLockedForEditing: return "isLockedForEditing" - case .lastModifiedDate: return "lastModifiedDate" - case .macOsVersion: return "macOsVersion" - case .name: return "name" - case .product: return "product" - case .pullRequestStartCondition: return "pullRequestStartCondition" - case .repository: return "repository" - case .scheduledStartCondition: return "scheduledStartCondition" - case .tagStartCondition: return "tagStartCondition" - case .xcodeVersion: return "xcodeVersion" - case .unknown(let rawValue): return rawValue - } + public static var tagStartCondition: Self { + .init(rawValue: "tagStartCondition") } + public static var xcodeVersion: Self { + .init(rawValue: "xcodeVersion") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "actions": self = .actions - case "branchStartCondition": self = .branchStartCondition - case "buildRuns": self = .buildRuns - case "clean": self = .clean - case "containerFilePath": self = .containerFilePath - case "description": self = .description - case "isEnabled": self = .isEnabled - case "isLockedForEditing": self = .isLockedForEditing - case "lastModifiedDate": self = .lastModifiedDate - case "macOsVersion": self = .macOsVersion - case "name": self = .name - case "product": self = .product - case "pullRequestStartCondition": self = .pullRequestStartCondition - case "repository": self = .repository - case "scheduledStartCondition": self = .scheduledStartCondition - case "tagStartCondition": self = .tagStartCondition - case "xcodeVersion": self = .xcodeVersion - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum ScmRepositories: Hashable, Codable, RawRepresentable { - case defaultBranch - case gitReferences - case httpCloneUrl - case lastAccessedDate - case ownerName - case pullRequests - case repositoryName - case scmProvider - case sshCloneUrl - case unknown(String) - - public var rawValue: String { - switch self { - case .defaultBranch: return "defaultBranch" - case .gitReferences: return "gitReferences" - case .httpCloneUrl: return "httpCloneUrl" - case .lastAccessedDate: return "lastAccessedDate" - case .ownerName: return "ownerName" - case .pullRequests: return "pullRequests" - case .repositoryName: return "repositoryName" - case .scmProvider: return "scmProvider" - case .sshCloneUrl: return "sshCloneUrl" - case .unknown(let rawValue): return rawValue - } + public struct ScmRepositories: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var defaultBranch: Self { + .init(rawValue: "defaultBranch") + } + + public static var gitReferences: Self { + .init(rawValue: "gitReferences") + } + + public static var httpCloneUrl: Self { + .init(rawValue: "httpCloneUrl") + } + + public static var lastAccessedDate: Self { + .init(rawValue: "lastAccessedDate") + } + + public static var ownerName: Self { + .init(rawValue: "ownerName") + } + + public static var pullRequests: Self { + .init(rawValue: "pullRequests") + } + + public static var repositoryName: Self { + .init(rawValue: "repositoryName") + } + + public static var scmProvider: Self { + .init(rawValue: "scmProvider") } + public static var sshCloneUrl: Self { + .init(rawValue: "sshCloneUrl") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "defaultBranch": self = .defaultBranch - case "gitReferences": self = .gitReferences - case "httpCloneUrl": self = .httpCloneUrl - case "lastAccessedDate": self = .lastAccessedDate - case "ownerName": self = .ownerName - case "pullRequests": self = .pullRequests - case "repositoryName": self = .repositoryName - case "scmProvider": self = .scmProvider - case "sshCloneUrl": self = .sshCloneUrl - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } public struct Relation: Hashable { - /// the fields to include for returned resources of type ciBuildRuns - public static var ciBuildRuns: Relation<[CiBuildRuns]?> { - .init(key: "fields[ciBuildRuns]") - } - /// the fields to include for returned resources of type ciWorkflows public static var ciWorkflows: Relation<[CiWorkflows]?> { .init(key: "fields[ciWorkflows]") @@ -304,31 +256,31 @@ extension V1.CiWorkflows.ById.GET { } } - public enum Include: Hashable, Codable, RawRepresentable { - case macOsVersion - case product - case repository - case xcodeVersion - case unknown(String) - - public var rawValue: String { - switch self { - case .macOsVersion: return "macOsVersion" - case .product: return "product" - case .repository: return "repository" - case .xcodeVersion: return "xcodeVersion" - case .unknown(let rawValue): return rawValue - } + public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var macOsVersion: Self { + .init(rawValue: "macOsVersion") + } + + public static var product: Self { + .init(rawValue: "product") + } + + public static var repository: Self { + .init(rawValue: "repository") + } + + public static var xcodeVersion: Self { + .init(rawValue: "xcodeVersion") } + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "macOsVersion": self = .macOsVersion - case "product": self = .product - case "repository": self = .repository - case "xcodeVersion": self = .xcodeVersion - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/CiWorkflows/ById/CiWorkflowsById.PATCH.c983433.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/CiWorkflows/ById/CiWorkflowsById.PATCH.c983433.generated.swift index 5c0ef178..0164b2d6 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/CiWorkflows/ById/CiWorkflowsById.PATCH.c983433.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/CiWorkflows/ById/CiWorkflowsById.PATCH.c983433.generated.swift @@ -48,9 +48,12 @@ extension V1.CiWorkflows.ById { /// - Returns: **200**, Single CiWorkflow as `CiWorkflowResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **422**, Unprocessable request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -64,6 +67,9 @@ extension V1.CiWorkflows.ById { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) @@ -73,6 +79,12 @@ extension V1.CiWorkflows.ById { case 409: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 422: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/CiWorkflows/ById/Relationships/BuildRuns/CiWorkflowsByIdRelationshipsBuildRuns.GET.103eb12.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/CiWorkflows/ById/Relationships/BuildRuns/CiWorkflowsByIdRelationshipsBuildRuns.GET.103eb12.generated.swift new file mode 100644 index 00000000..fac42865 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/CiWorkflows/ById/Relationships/BuildRuns/CiWorkflowsByIdRelationshipsBuildRuns.GET.103eb12.generated.swift @@ -0,0 +1,88 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.CiWorkflows.ById.Relationships.BuildRuns { + public struct GET: Endpoint { + public typealias Response = CiWorkflowBuildRunsLinkagesResponse + + public var path: String { + "/v1/ciWorkflows/\(id)/relationships/buildRuns" + } + + /// the id of the requested resource + public var id: String + + public var parameters: Parameters = Parameters() + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + components?.queryItems = [ + URLQueryItem(name: "limit", + value: parameters.limit.map { "\($0)" }) + ].filter { $0.value != nil } + if components?.queryItems?.isEmpty ?? false { + components?.queryItems = nil + } + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "GET" + return urlRequest + } + + /// - Returns: **200**, List of related linkages as `CiWorkflowBuildRunsLinkagesResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(CiWorkflowBuildRunsLinkagesResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +extension V1.CiWorkflows.ById.Relationships.BuildRuns.GET { + public struct Parameters: Hashable { + /// maximum resources per page + public var limit: Int? + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/CiWorkflows/ById/Relationships/Repository/CiWorkflowsByIdRelationshipsRepository.GET.83706ea.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/CiWorkflows/ById/Relationships/Repository/CiWorkflowsByIdRelationshipsRepository.GET.83706ea.generated.swift new file mode 100644 index 00000000..bfbb8e3d --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/CiWorkflows/ById/Relationships/Repository/CiWorkflowsByIdRelationshipsRepository.GET.83706ea.generated.swift @@ -0,0 +1,86 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.CiWorkflows.ById.Relationships.Repository { + public struct GET: Endpoint { + public typealias Response = CiWorkflowRepositoryLinkageResponse + + public var path: String { + "/v1/ciWorkflows/\(id)/relationships/repository" + } + + /// the id of the requested resource + public var id: String + + public var parameters: Parameters = Parameters() + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + components?.queryItems = [ + + ].filter { $0.value != nil } + if components?.queryItems?.isEmpty ?? false { + components?.queryItems = nil + } + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "GET" + return urlRequest + } + + /// - Returns: **200**, Related linkage as `CiWorkflowRepositoryLinkageResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(CiWorkflowRepositoryLinkageResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +extension V1.CiWorkflows.ById.Relationships.Repository.GET { + public struct Parameters: Hashable { + + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/CiWorkflows/ById/Repository/CiWorkflowsByIdRepository.GET.2136fe4.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/CiWorkflows/ById/Repository/CiWorkflowsByIdRepository.GET.2136fe4.generated.swift index 2537d150..73cb3f24 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/CiWorkflows/ById/Repository/CiWorkflowsByIdRepository.GET.2136fe4.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/CiWorkflows/ById/Repository/CiWorkflowsByIdRepository.GET.2136fe4.generated.swift @@ -48,8 +48,10 @@ extension V1.CiWorkflows.ById.Repository { /// - Returns: **200**, Single ScmRepository as `ScmRepositoryResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -63,12 +65,18 @@ extension V1.CiWorkflows.ById.Repository { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 404: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -91,102 +99,107 @@ extension V1.CiWorkflows.ById.Repository.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum ScmGitReferences: Hashable, Codable, RawRepresentable { - case canonicalName - case isDeleted - case kind - case name - case repository - case unknown(String) - - public var rawValue: String { - switch self { - case .canonicalName: return "canonicalName" - case .isDeleted: return "isDeleted" - case .kind: return "kind" - case .name: return "name" - case .repository: return "repository" - case .unknown(let rawValue): return rawValue - } + public struct ScmGitReferences: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var canonicalName: Self { + .init(rawValue: "canonicalName") + } + + public static var isDeleted: Self { + .init(rawValue: "isDeleted") + } + + public static var kind: Self { + .init(rawValue: "kind") + } + + public static var name: Self { + .init(rawValue: "name") + } + + public static var repository: Self { + .init(rawValue: "repository") } + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "canonicalName": self = .canonicalName - case "isDeleted": self = .isDeleted - case "kind": self = .kind - case "name": self = .name - case "repository": self = .repository - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum ScmProviders: Hashable, Codable, RawRepresentable { - case repositories - case scmProviderType - case url - case unknown(String) + public struct ScmProviders: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var repositories: Self { + .init(rawValue: "repositories") + } + + public static var scmProviderType: Self { + .init(rawValue: "scmProviderType") + } - public var rawValue: String { - switch self { - case .repositories: return "repositories" - case .scmProviderType: return "scmProviderType" - case .url: return "url" - case .unknown(let rawValue): return rawValue - } + public static var url: Self { + .init(rawValue: "url") } + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "repositories": self = .repositories - case "scmProviderType": self = .scmProviderType - case "url": self = .url - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum ScmRepositories: Hashable, Codable, RawRepresentable { - case defaultBranch - case gitReferences - case httpCloneUrl - case lastAccessedDate - case ownerName - case pullRequests - case repositoryName - case scmProvider - case sshCloneUrl - case unknown(String) - - public var rawValue: String { - switch self { - case .defaultBranch: return "defaultBranch" - case .gitReferences: return "gitReferences" - case .httpCloneUrl: return "httpCloneUrl" - case .lastAccessedDate: return "lastAccessedDate" - case .ownerName: return "ownerName" - case .pullRequests: return "pullRequests" - case .repositoryName: return "repositoryName" - case .scmProvider: return "scmProvider" - case .sshCloneUrl: return "sshCloneUrl" - case .unknown(let rawValue): return rawValue - } + public struct ScmRepositories: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var defaultBranch: Self { + .init(rawValue: "defaultBranch") + } + + public static var gitReferences: Self { + .init(rawValue: "gitReferences") } + public static var httpCloneUrl: Self { + .init(rawValue: "httpCloneUrl") + } + + public static var lastAccessedDate: Self { + .init(rawValue: "lastAccessedDate") + } + + public static var ownerName: Self { + .init(rawValue: "ownerName") + } + + public static var pullRequests: Self { + .init(rawValue: "pullRequests") + } + + public static var repositoryName: Self { + .init(rawValue: "repositoryName") + } + + public static var scmProvider: Self { + .init(rawValue: "scmProvider") + } + + public static var sshCloneUrl: Self { + .init(rawValue: "sshCloneUrl") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "defaultBranch": self = .defaultBranch - case "gitReferences": self = .gitReferences - case "httpCloneUrl": self = .httpCloneUrl - case "lastAccessedDate": self = .lastAccessedDate - case "ownerName": self = .ownerName - case "pullRequests": self = .pullRequests - case "repositoryName": self = .repositoryName - case "scmProvider": self = .scmProvider - case "sshCloneUrl": self = .sshCloneUrl - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } @@ -214,25 +227,23 @@ extension V1.CiWorkflows.ById.Repository.GET { } } - public enum Include: Hashable, Codable, RawRepresentable { - case defaultBranch - case scmProvider - case unknown(String) + public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var defaultBranch: Self { + .init(rawValue: "defaultBranch") + } - public var rawValue: String { - switch self { - case .defaultBranch: return "defaultBranch" - case .scmProvider: return "scmProvider" - case .unknown(let rawValue): return rawValue - } + public static var scmProvider: Self { + .init(rawValue: "scmProvider") + } + + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "defaultBranch": self = .defaultBranch - case "scmProvider": self = .scmProvider - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/CiWorkflows/CiWorkflows.POST.469d47c.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/CiWorkflows/CiWorkflows.POST.469d47c.generated.swift index 2498694c..dead4c0a 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/CiWorkflows/CiWorkflows.POST.469d47c.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/CiWorkflows/CiWorkflows.POST.469d47c.generated.swift @@ -41,8 +41,11 @@ extension V1.CiWorkflows { /// - Returns: **201**, Single CiWorkflow as `CiWorkflowResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **422**, Unprocessable request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -56,12 +59,21 @@ extension V1.CiWorkflows { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 409: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 422: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/CiXcodeVersions/ById/CiXcodeVersionsById.GET.0412077.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/CiXcodeVersions/ById/CiXcodeVersionsById.GET.0412077.generated.swift index 1d794e99..21c45e02 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/CiXcodeVersions/ById/CiXcodeVersionsById.GET.0412077.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/CiXcodeVersions/ById/CiXcodeVersionsById.GET.0412077.generated.swift @@ -48,8 +48,10 @@ extension V1.CiXcodeVersions.ById { /// - Returns: **200**, Single CiXcodeVersion as `CiXcodeVersionResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -63,12 +65,18 @@ extension V1.CiXcodeVersions.ById { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 404: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -93,56 +101,55 @@ extension V1.CiXcodeVersions.ById.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum CiMacOsVersions: Hashable, Codable, RawRepresentable { - case name - case version - case xcodeVersions - case unknown(String) + public struct CiMacOsVersions: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var name: Self { + .init(rawValue: "name") + } - public var rawValue: String { - switch self { - case .name: return "name" - case .version: return "version" - case .xcodeVersions: return "xcodeVersions" - case .unknown(let rawValue): return rawValue - } + public static var version: Self { + .init(rawValue: "version") } + public static var xcodeVersions: Self { + .init(rawValue: "xcodeVersions") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "name": self = .name - case "version": self = .version - case "xcodeVersions": self = .xcodeVersions - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum CiXcodeVersions: Hashable, Codable, RawRepresentable { - case macOsVersions - case name - case testDestinations - case version - case unknown(String) + public struct CiXcodeVersions: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var macOsVersions: Self { + .init(rawValue: "macOsVersions") + } + + public static var name: Self { + .init(rawValue: "name") + } + + public static var testDestinations: Self { + .init(rawValue: "testDestinations") + } + + public static var version: Self { + .init(rawValue: "version") + } - public var rawValue: String { - switch self { - case .macOsVersions: return "macOsVersions" - case .name: return "name" - case .testDestinations: return "testDestinations" - case .version: return "version" - case .unknown(let rawValue): return rawValue - } + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "macOsVersions": self = .macOsVersions - case "name": self = .name - case "testDestinations": self = .testDestinations - case "version": self = .version - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } @@ -165,22 +172,19 @@ extension V1.CiXcodeVersions.ById.GET { } } - public enum Include: Hashable, Codable, RawRepresentable { - case macOsVersions - case unknown(String) + public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var macOsVersions: Self { + .init(rawValue: "macOsVersions") + } - public var rawValue: String { - switch self { - case .macOsVersions: return "macOsVersions" - case .unknown(let rawValue): return rawValue - } + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "macOsVersions": self = .macOsVersions - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/CiXcodeVersions/ById/MacOsVersions/CiXcodeVersionsByIdMacOsVersions.GET.f4f5a22.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/CiXcodeVersions/ById/MacOsVersions/CiXcodeVersionsByIdMacOsVersions.GET.f4f5a22.generated.swift index 2a412f27..9dec0b0e 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/CiXcodeVersions/ById/MacOsVersions/CiXcodeVersionsByIdMacOsVersions.GET.f4f5a22.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/CiXcodeVersions/ById/MacOsVersions/CiXcodeVersionsByIdMacOsVersions.GET.f4f5a22.generated.swift @@ -50,8 +50,10 @@ extension V1.CiXcodeVersions.ById.MacOsVersions { /// - Returns: **200**, List of CiMacOsVersions as `CiMacOsVersionsResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -65,12 +67,18 @@ extension V1.CiXcodeVersions.ById.MacOsVersions { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 404: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -96,56 +104,55 @@ extension V1.CiXcodeVersions.ById.MacOsVersions.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum CiMacOsVersions: Hashable, Codable, RawRepresentable { - case name - case version - case xcodeVersions - case unknown(String) + public struct CiMacOsVersions: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var name: Self { + .init(rawValue: "name") + } - public var rawValue: String { - switch self { - case .name: return "name" - case .version: return "version" - case .xcodeVersions: return "xcodeVersions" - case .unknown(let rawValue): return rawValue - } + public static var version: Self { + .init(rawValue: "version") } + public static var xcodeVersions: Self { + .init(rawValue: "xcodeVersions") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "name": self = .name - case "version": self = .version - case "xcodeVersions": self = .xcodeVersions - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum CiXcodeVersions: Hashable, Codable, RawRepresentable { - case macOsVersions - case name - case testDestinations - case version - case unknown(String) + public struct CiXcodeVersions: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var macOsVersions: Self { + .init(rawValue: "macOsVersions") + } + + public static var name: Self { + .init(rawValue: "name") + } + + public static var testDestinations: Self { + .init(rawValue: "testDestinations") + } + + public static var version: Self { + .init(rawValue: "version") + } - public var rawValue: String { - switch self { - case .macOsVersions: return "macOsVersions" - case .name: return "name" - case .testDestinations: return "testDestinations" - case .version: return "version" - case .unknown(let rawValue): return rawValue - } + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "macOsVersions": self = .macOsVersions - case "name": self = .name - case "testDestinations": self = .testDestinations - case "version": self = .version - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } @@ -168,22 +175,19 @@ extension V1.CiXcodeVersions.ById.MacOsVersions.GET { } } - public enum Include: Hashable, Codable, RawRepresentable { - case xcodeVersions - case unknown(String) + public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var xcodeVersions: Self { + .init(rawValue: "xcodeVersions") + } - public var rawValue: String { - switch self { - case .xcodeVersions: return "xcodeVersions" - case .unknown(let rawValue): return rawValue - } + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "xcodeVersions": self = .xcodeVersions - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/CiXcodeVersions/ById/Relationships/MacOsVersions/CiXcodeVersionsByIdRelationshipsMacOsVersions.GET.f0f805d.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/CiXcodeVersions/ById/Relationships/MacOsVersions/CiXcodeVersionsByIdRelationshipsMacOsVersions.GET.f0f805d.generated.swift new file mode 100644 index 00000000..8f3fbca9 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/CiXcodeVersions/ById/Relationships/MacOsVersions/CiXcodeVersionsByIdRelationshipsMacOsVersions.GET.f0f805d.generated.swift @@ -0,0 +1,88 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.CiXcodeVersions.ById.Relationships.MacOsVersions { + public struct GET: Endpoint { + public typealias Response = CiXcodeVersionMacOsVersionsLinkagesResponse + + public var path: String { + "/v1/ciXcodeVersions/\(id)/relationships/macOsVersions" + } + + /// the id of the requested resource + public var id: String + + public var parameters: Parameters = Parameters() + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + components?.queryItems = [ + URLQueryItem(name: "limit", + value: parameters.limit.map { "\($0)" }) + ].filter { $0.value != nil } + if components?.queryItems?.isEmpty ?? false { + components?.queryItems = nil + } + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "GET" + return urlRequest + } + + /// - Returns: **200**, List of related linkages as `CiXcodeVersionMacOsVersionsLinkagesResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(CiXcodeVersionMacOsVersionsLinkagesResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +extension V1.CiXcodeVersions.ById.Relationships.MacOsVersions.GET { + public struct Parameters: Hashable { + /// maximum resources per page + public var limit: Int? + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/CiXcodeVersions/CiXcodeVersions.GET.da7360c.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/CiXcodeVersions/CiXcodeVersions.GET.da7360c.generated.swift index fe5bb98f..740d5c1d 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/CiXcodeVersions/CiXcodeVersions.GET.da7360c.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/CiXcodeVersions/CiXcodeVersions.GET.da7360c.generated.swift @@ -47,7 +47,9 @@ extension V1.CiXcodeVersions { /// - Returns: **200**, List of CiXcodeVersions as `CiXcodeVersionsResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -61,9 +63,15 @@ extension V1.CiXcodeVersions { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -89,56 +97,55 @@ extension V1.CiXcodeVersions.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum CiMacOsVersions: Hashable, Codable, RawRepresentable { - case name - case version - case xcodeVersions - case unknown(String) + public struct CiMacOsVersions: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var name: Self { + .init(rawValue: "name") + } - public var rawValue: String { - switch self { - case .name: return "name" - case .version: return "version" - case .xcodeVersions: return "xcodeVersions" - case .unknown(let rawValue): return rawValue - } + public static var version: Self { + .init(rawValue: "version") } + public static var xcodeVersions: Self { + .init(rawValue: "xcodeVersions") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "name": self = .name - case "version": self = .version - case "xcodeVersions": self = .xcodeVersions - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum CiXcodeVersions: Hashable, Codable, RawRepresentable { - case macOsVersions - case name - case testDestinations - case version - case unknown(String) + public struct CiXcodeVersions: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var macOsVersions: Self { + .init(rawValue: "macOsVersions") + } + + public static var name: Self { + .init(rawValue: "name") + } + + public static var testDestinations: Self { + .init(rawValue: "testDestinations") + } + + public static var version: Self { + .init(rawValue: "version") + } - public var rawValue: String { - switch self { - case .macOsVersions: return "macOsVersions" - case .name: return "name" - case .testDestinations: return "testDestinations" - case .version: return "version" - case .unknown(let rawValue): return rawValue - } + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "macOsVersions": self = .macOsVersions - case "name": self = .name - case "testDestinations": self = .testDestinations - case "version": self = .version - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } @@ -161,22 +168,19 @@ extension V1.CiXcodeVersions.GET { } } - public enum Include: Hashable, Codable, RawRepresentable { - case macOsVersions - case unknown(String) + public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var macOsVersions: Self { + .init(rawValue: "macOsVersions") + } - public var rawValue: String { - switch self { - case .macOsVersions: return "macOsVersions" - case .unknown(let rawValue): return rawValue - } + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "macOsVersions": self = .macOsVersions - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/CustomerReviewResponses/ById/CustomerReviewResponsesById.DELETE.bacc312.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/CustomerReviewResponses/ById/CustomerReviewResponsesById.DELETE.bacc312.generated.swift index 960a3527..be5c6e95 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/CustomerReviewResponses/ById/CustomerReviewResponsesById.DELETE.bacc312.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/CustomerReviewResponses/ById/CustomerReviewResponsesById.DELETE.bacc312.generated.swift @@ -31,11 +31,12 @@ extension V1.CustomerReviewResponses.ById { return urlRequest } - /// - Returns: **204**, Success (no content) /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -43,12 +44,12 @@ extension V1.CustomerReviewResponses.ById { } switch urlResponse.statusCode { - case 204: - return - case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) @@ -58,6 +59,9 @@ extension V1.CustomerReviewResponses.ById { case 409: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/CustomerReviewResponses/ById/CustomerReviewResponsesById.GET.bacc312.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/CustomerReviewResponses/ById/CustomerReviewResponsesById.GET.bacc312.generated.swift index 7383cb13..925b0b79 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/CustomerReviewResponses/ById/CustomerReviewResponsesById.GET.bacc312.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/CustomerReviewResponses/ById/CustomerReviewResponsesById.GET.bacc312.generated.swift @@ -44,8 +44,10 @@ extension V1.CustomerReviewResponses.ById { /// - Returns: **200**, Single CustomerReviewResponse as `CustomerReviewResponseV1Response` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -59,12 +61,18 @@ extension V1.CustomerReviewResponses.ById { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 404: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -87,31 +95,31 @@ extension V1.CustomerReviewResponses.ById.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum CustomerReviewResponses: Hashable, Codable, RawRepresentable { - case lastModifiedDate - case responseBody - case review - case state - case unknown(String) - - public var rawValue: String { - switch self { - case .lastModifiedDate: return "lastModifiedDate" - case .responseBody: return "responseBody" - case .review: return "review" - case .state: return "state" - case .unknown(let rawValue): return rawValue - } + public struct CustomerReviewResponses: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var lastModifiedDate: Self { + .init(rawValue: "lastModifiedDate") } + public static var responseBody: Self { + .init(rawValue: "responseBody") + } + + public static var review: Self { + .init(rawValue: "review") + } + + public static var state: Self { + .init(rawValue: "state") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "lastModifiedDate": self = .lastModifiedDate - case "responseBody": self = .responseBody - case "review": self = .review - case "state": self = .state - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } @@ -129,22 +137,19 @@ extension V1.CustomerReviewResponses.ById.GET { } } - public enum Include: Hashable, Codable, RawRepresentable { - case review - case unknown(String) + public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var review: Self { + .init(rawValue: "review") + } - public var rawValue: String { - switch self { - case .review: return "review" - case .unknown(let rawValue): return rawValue - } + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "review": self = .review - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/CustomerReviewResponses/CustomerReviewResponses.POST.6ffe6fb.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/CustomerReviewResponses/CustomerReviewResponses.POST.6ffe6fb.generated.swift index 9febc8ba..9e3e860a 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/CustomerReviewResponses/CustomerReviewResponses.POST.6ffe6fb.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/CustomerReviewResponses/CustomerReviewResponses.POST.6ffe6fb.generated.swift @@ -41,8 +41,11 @@ extension V1.CustomerReviewResponses { /// - Returns: **201**, Single CustomerReviewResponse as `CustomerReviewResponseV1Response` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **422**, Unprocessable request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -56,12 +59,21 @@ extension V1.CustomerReviewResponses { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 409: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 422: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/CustomerReviews/ById/CustomerReviewsById.GET.7a43fba.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/CustomerReviews/ById/CustomerReviewsById.GET.7a43fba.generated.swift index 9e412efc..d584bace 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/CustomerReviews/ById/CustomerReviewsById.GET.7a43fba.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/CustomerReviews/ById/CustomerReviewsById.GET.7a43fba.generated.swift @@ -46,8 +46,10 @@ extension V1.CustomerReviews.ById { /// - Returns: **200**, Single CustomerReview as `CustomerReviewResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -61,12 +63,18 @@ extension V1.CustomerReviews.ById { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 404: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -89,68 +97,71 @@ extension V1.CustomerReviews.ById.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum CustomerReviewResponses: Hashable, Codable, RawRepresentable { - case lastModifiedDate - case responseBody - case review - case state - case unknown(String) + public struct CustomerReviewResponses: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var lastModifiedDate: Self { + .init(rawValue: "lastModifiedDate") + } + + public static var responseBody: Self { + .init(rawValue: "responseBody") + } + + public static var review: Self { + .init(rawValue: "review") + } + + public static var state: Self { + .init(rawValue: "state") + } - public var rawValue: String { - switch self { - case .lastModifiedDate: return "lastModifiedDate" - case .responseBody: return "responseBody" - case .review: return "review" - case .state: return "state" - case .unknown(let rawValue): return rawValue - } + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "lastModifiedDate": self = .lastModifiedDate - case "responseBody": self = .responseBody - case "review": self = .review - case "state": self = .state - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum CustomerReviews: Hashable, Codable, RawRepresentable { - case body - case createdDate - case rating - case response - case reviewerNickname - case territory - case title - case unknown(String) - - public var rawValue: String { - switch self { - case .body: return "body" - case .createdDate: return "createdDate" - case .rating: return "rating" - case .response: return "response" - case .reviewerNickname: return "reviewerNickname" - case .territory: return "territory" - case .title: return "title" - case .unknown(let rawValue): return rawValue - } + public struct CustomerReviews: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var body: Self { + .init(rawValue: "body") + } + + public static var createdDate: Self { + .init(rawValue: "createdDate") + } + + public static var rating: Self { + .init(rawValue: "rating") } + public static var response: Self { + .init(rawValue: "response") + } + + public static var reviewerNickname: Self { + .init(rawValue: "reviewerNickname") + } + + public static var territory: Self { + .init(rawValue: "territory") + } + + public static var title: Self { + .init(rawValue: "title") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "body": self = .body - case "createdDate": self = .createdDate - case "rating": self = .rating - case "response": self = .response - case "reviewerNickname": self = .reviewerNickname - case "territory": self = .territory - case "title": self = .title - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } @@ -173,22 +184,19 @@ extension V1.CustomerReviews.ById.GET { } } - public enum Include: Hashable, Codable, RawRepresentable { - case response - case unknown(String) + public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var response: Self { + .init(rawValue: "response") + } - public var rawValue: String { - switch self { - case .response: return "response" - case .unknown(let rawValue): return rawValue - } + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "response": self = .response - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/CustomerReviews/ById/Relationships/Response/CustomerReviewsByIdRelationshipsResponse.GET.36fa137.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/CustomerReviews/ById/Relationships/Response/CustomerReviewsByIdRelationshipsResponse.GET.36fa137.generated.swift new file mode 100644 index 00000000..419ccdec --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/CustomerReviews/ById/Relationships/Response/CustomerReviewsByIdRelationshipsResponse.GET.36fa137.generated.swift @@ -0,0 +1,86 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.CustomerReviews.ById.Relationships.Response { + public struct GET: Endpoint { + public typealias Response = CustomerReviewResponseLinkageResponse + + public var path: String { + "/v1/customerReviews/\(id)/relationships/response" + } + + /// the id of the requested resource + public var id: String + + public var parameters: Parameters = Parameters() + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + components?.queryItems = [ + + ].filter { $0.value != nil } + if components?.queryItems?.isEmpty ?? false { + components?.queryItems = nil + } + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "GET" + return urlRequest + } + + /// - Returns: **200**, Related linkage as `CustomerReviewResponseLinkageResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(CustomerReviewResponseLinkageResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +extension V1.CustomerReviews.ById.Relationships.Response.GET { + public struct Parameters: Hashable { + + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/CustomerReviews/ById/Response/CustomerReviewsByIdResponse.GET.986bb48.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/CustomerReviews/ById/Response/CustomerReviewsByIdResponse.GET.986bb48.generated.swift index 5c80287a..89a887c1 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/CustomerReviews/ById/Response/CustomerReviewsByIdResponse.GET.986bb48.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/CustomerReviews/ById/Response/CustomerReviewsByIdResponse.GET.986bb48.generated.swift @@ -46,8 +46,10 @@ extension V1.CustomerReviews.ById.Response { /// - Returns: **200**, Single CustomerReviewResponse as `CustomerReviewResponseV1Response` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -61,12 +63,18 @@ extension V1.CustomerReviews.ById.Response { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 404: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -89,68 +97,71 @@ extension V1.CustomerReviews.ById.Response.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum CustomerReviewResponses: Hashable, Codable, RawRepresentable { - case lastModifiedDate - case responseBody - case review - case state - case unknown(String) + public struct CustomerReviewResponses: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var lastModifiedDate: Self { + .init(rawValue: "lastModifiedDate") + } + + public static var responseBody: Self { + .init(rawValue: "responseBody") + } + + public static var review: Self { + .init(rawValue: "review") + } + + public static var state: Self { + .init(rawValue: "state") + } - public var rawValue: String { - switch self { - case .lastModifiedDate: return "lastModifiedDate" - case .responseBody: return "responseBody" - case .review: return "review" - case .state: return "state" - case .unknown(let rawValue): return rawValue - } + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "lastModifiedDate": self = .lastModifiedDate - case "responseBody": self = .responseBody - case "review": self = .review - case "state": self = .state - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum CustomerReviews: Hashable, Codable, RawRepresentable { - case body - case createdDate - case rating - case response - case reviewerNickname - case territory - case title - case unknown(String) - - public var rawValue: String { - switch self { - case .body: return "body" - case .createdDate: return "createdDate" - case .rating: return "rating" - case .response: return "response" - case .reviewerNickname: return "reviewerNickname" - case .territory: return "territory" - case .title: return "title" - case .unknown(let rawValue): return rawValue - } + public struct CustomerReviews: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var body: Self { + .init(rawValue: "body") + } + + public static var createdDate: Self { + .init(rawValue: "createdDate") + } + + public static var rating: Self { + .init(rawValue: "rating") } + public static var response: Self { + .init(rawValue: "response") + } + + public static var reviewerNickname: Self { + .init(rawValue: "reviewerNickname") + } + + public static var territory: Self { + .init(rawValue: "territory") + } + + public static var title: Self { + .init(rawValue: "title") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "body": self = .body - case "createdDate": self = .createdDate - case "rating": self = .rating - case "response": self = .response - case "reviewerNickname": self = .reviewerNickname - case "territory": self = .territory - case "title": self = .title - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } @@ -173,22 +184,19 @@ extension V1.CustomerReviews.ById.Response.GET { } } - public enum Include: Hashable, Codable, RawRepresentable { - case review - case unknown(String) + public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var review: Self { + .init(rawValue: "review") + } - public var rawValue: String { - switch self { - case .review: return "review" - case .unknown(let rawValue): return rawValue - } + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "review": self = .review - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Devices/ById/DevicesById.GET.89246f7.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Devices/ById/DevicesById.GET.89246f7.generated.swift index 82d36dcc..60f729b4 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Devices/ById/DevicesById.GET.89246f7.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Devices/ById/DevicesById.GET.89246f7.generated.swift @@ -42,8 +42,10 @@ extension V1.Devices.ById { /// - Returns: **200**, Single Device as `DeviceResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -57,12 +59,18 @@ extension V1.Devices.ById { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 404: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -82,40 +90,43 @@ extension V1.Devices.ById.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum Devices: Hashable, Codable, RawRepresentable { - case addedDate - case deviceClass - case model - case name - case platform - case status - case udid - case unknown(String) - - public var rawValue: String { - switch self { - case .addedDate: return "addedDate" - case .deviceClass: return "deviceClass" - case .model: return "model" - case .name: return "name" - case .platform: return "platform" - case .status: return "status" - case .udid: return "udid" - case .unknown(let rawValue): return rawValue - } + public struct Devices: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var addedDate: Self { + .init(rawValue: "addedDate") + } + + public static var deviceClass: Self { + .init(rawValue: "deviceClass") + } + + public static var model: Self { + .init(rawValue: "model") + } + + public static var name: Self { + .init(rawValue: "name") } + public static var platform: Self { + .init(rawValue: "platform") + } + + public static var status: Self { + .init(rawValue: "status") + } + + public static var udid: Self { + .init(rawValue: "udid") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "addedDate": self = .addedDate - case "deviceClass": self = .deviceClass - case "model": self = .model - case "name": self = .name - case "platform": self = .platform - case "status": self = .status - case "udid": self = .udid - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Devices/ById/DevicesById.PATCH.89246f7.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Devices/ById/DevicesById.PATCH.89246f7.generated.swift index 1c17d34e..676090b4 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Devices/ById/DevicesById.PATCH.89246f7.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Devices/ById/DevicesById.PATCH.89246f7.generated.swift @@ -48,9 +48,12 @@ extension V1.Devices.ById { /// - Returns: **200**, Single Device as `DeviceResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **422**, Unprocessable request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -64,6 +67,9 @@ extension V1.Devices.ById { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) @@ -73,6 +79,12 @@ extension V1.Devices.ById { case 409: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 422: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Devices/Devices.GET.f740d23.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Devices/Devices.GET.f740d23.generated.swift index df5b16f1..af677cef 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Devices/Devices.GET.f740d23.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Devices/Devices.GET.f740d23.generated.swift @@ -53,7 +53,9 @@ extension V1.Devices { /// - Returns: **200**, List of Devices as `DevicesResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -67,9 +69,15 @@ extension V1.Devices { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -97,40 +105,43 @@ extension V1.Devices.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum Devices: Hashable, Codable, RawRepresentable { - case addedDate - case deviceClass - case model - case name - case platform - case status - case udid - case unknown(String) - - public var rawValue: String { - switch self { - case .addedDate: return "addedDate" - case .deviceClass: return "deviceClass" - case .model: return "model" - case .name: return "name" - case .platform: return "platform" - case .status: return "status" - case .udid: return "udid" - case .unknown(let rawValue): return rawValue - } + public struct Devices: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var addedDate: Self { + .init(rawValue: "addedDate") + } + + public static var deviceClass: Self { + .init(rawValue: "deviceClass") + } + + public static var model: Self { + .init(rawValue: "model") + } + + public static var name: Self { + .init(rawValue: "name") + } + + public static var platform: Self { + .init(rawValue: "platform") + } + + public static var status: Self { + .init(rawValue: "status") } + public static var udid: Self { + .init(rawValue: "udid") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "addedDate": self = .addedDate - case "deviceClass": self = .deviceClass - case "model": self = .model - case "name": self = .name - case "platform": self = .platform - case "status": self = .status - case "udid": self = .udid - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } @@ -156,47 +167,47 @@ extension V1.Devices.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum Platform: Hashable, Codable, RawRepresentable { - case iOS - case macOS - case unknown(String) - - public var rawValue: String { - switch self { - case .iOS: return "IOS" - case .macOS: return "MAC_OS" - case .unknown(let rawValue): return rawValue - } + public struct Platform: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var iOS: Self { + .init(rawValue: "IOS") + } + + public static var macOS: Self { + .init(rawValue: "MAC_OS") } + public static var universal: Self { + .init(rawValue: "UNIVERSAL") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "IOS": self = .iOS - case "MAC_OS": self = .macOS - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum Status: Hashable, Codable, RawRepresentable { - case disabled - case enabled - case unknown(String) - - public var rawValue: String { - switch self { - case .disabled: return "DISABLED" - case .enabled: return "ENABLED" - case .unknown(let rawValue): return rawValue - } + public struct Status: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var disabled: Self { + .init(rawValue: "DISABLED") + } + + public static var enabled: Self { + .init(rawValue: "ENABLED") + } + + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "DISABLED": self = .disabled - case "ENABLED": self = .enabled - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } @@ -234,49 +245,55 @@ extension V1.Devices.GET { } } - public enum Sort: Hashable, Codable, RawRepresentable { - case id - case idDesc - case name - case nameDesc - case platform - case platformDesc - case status - case statusDesc - case udid - case udidDesc - case unknown(String) - - public var rawValue: String { - switch self { - case .id: return "id" - case .idDesc: return "-id" - case .name: return "name" - case .nameDesc: return "-name" - case .platform: return "platform" - case .platformDesc: return "-platform" - case .status: return "status" - case .statusDesc: return "-status" - case .udid: return "udid" - case .udidDesc: return "-udid" - case .unknown(let rawValue): return rawValue - } + public struct Sort: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var id: Self { + .init(rawValue: "id") + } + + public static var idDesc: Self { + .init(rawValue: "-id") } + public static var name: Self { + .init(rawValue: "name") + } + + public static var nameDesc: Self { + .init(rawValue: "-name") + } + + public static var platform: Self { + .init(rawValue: "platform") + } + + public static var platformDesc: Self { + .init(rawValue: "-platform") + } + + public static var status: Self { + .init(rawValue: "status") + } + + public static var statusDesc: Self { + .init(rawValue: "-status") + } + + public static var udid: Self { + .init(rawValue: "udid") + } + + public static var udidDesc: Self { + .init(rawValue: "-udid") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "id": self = .id - case "-id": self = .idDesc - case "name": self = .name - case "-name": self = .nameDesc - case "platform": self = .platform - case "-platform": self = .platformDesc - case "status": self = .status - case "-status": self = .statusDesc - case "udid": self = .udid - case "-udid": self = .udidDesc - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Devices/Devices.POST.f740d23.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Devices/Devices.POST.f740d23.generated.swift index fcd8f75d..bdfa7471 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Devices/Devices.POST.f740d23.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Devices/Devices.POST.f740d23.generated.swift @@ -41,8 +41,11 @@ extension V1.Devices { /// - Returns: **201**, Single Device as `DeviceResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **422**, Unprocessable request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -56,12 +59,21 @@ extension V1.Devices { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 409: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 422: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/DiagnosticSignatures/ById/Logs/DiagnosticSignaturesByIdLogs.GET.ef72589.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/DiagnosticSignatures/ById/Logs/DiagnosticSignaturesByIdLogs.GET.ef72589.generated.swift index 4fbcb711..0276d978 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/DiagnosticSignatures/ById/Logs/DiagnosticSignaturesByIdLogs.GET.ef72589.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/DiagnosticSignatures/ById/Logs/DiagnosticSignaturesByIdLogs.GET.ef72589.generated.swift @@ -42,8 +42,10 @@ extension V1.DiagnosticSignatures.ById.Logs { /// - Returns: **200**, List of DiagnosticLogs as `DiagnosticLogs` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -57,12 +59,18 @@ extension V1.DiagnosticSignatures.ById.Logs { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 404: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/EndAppAvailabilityPreOrders/EndAppAvailabilityPreOrders.POST.a7ae00d.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/EndAppAvailabilityPreOrders/EndAppAvailabilityPreOrders.POST.a7ae00d.generated.swift index 0fda1ffa..fd558022 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/EndAppAvailabilityPreOrders/EndAppAvailabilityPreOrders.POST.a7ae00d.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/EndAppAvailabilityPreOrders/EndAppAvailabilityPreOrders.POST.a7ae00d.generated.swift @@ -41,8 +41,11 @@ extension V1.EndAppAvailabilityPreOrders { /// - Returns: **201**, Single EndAppAvailabilityPreOrder as `EndAppAvailabilityPreOrderResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **422**, Unprocessable request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -56,12 +59,21 @@ extension V1.EndAppAvailabilityPreOrders { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 409: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 422: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/EndUserLicenseAgreements/ById/EndUserLicenseAgreementsById.DELETE.940d270.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/EndUserLicenseAgreements/ById/EndUserLicenseAgreementsById.DELETE.940d270.generated.swift index 716d4030..9f02530b 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/EndUserLicenseAgreements/ById/EndUserLicenseAgreementsById.DELETE.940d270.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/EndUserLicenseAgreements/ById/EndUserLicenseAgreementsById.DELETE.940d270.generated.swift @@ -31,11 +31,12 @@ extension V1.EndUserLicenseAgreements.ById { return urlRequest } - /// - Returns: **204**, Success (no content) /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -43,12 +44,12 @@ extension V1.EndUserLicenseAgreements.ById { } switch urlResponse.statusCode { - case 204: - return - case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) @@ -58,6 +59,9 @@ extension V1.EndUserLicenseAgreements.ById { case 409: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/EndUserLicenseAgreements/ById/EndUserLicenseAgreementsById.GET.940d270.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/EndUserLicenseAgreements/ById/EndUserLicenseAgreementsById.GET.940d270.generated.swift index 96dfb287..1b4e79e2 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/EndUserLicenseAgreements/ById/EndUserLicenseAgreementsById.GET.940d270.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/EndUserLicenseAgreements/ById/EndUserLicenseAgreementsById.GET.940d270.generated.swift @@ -48,8 +48,10 @@ extension V1.EndUserLicenseAgreements.ById { /// - Returns: **200**, Single EndUserLicenseAgreement as `EndUserLicenseAgreementResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -63,12 +65,18 @@ extension V1.EndUserLicenseAgreements.ById { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 404: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -93,47 +101,43 @@ extension V1.EndUserLicenseAgreements.ById.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum EndUserLicenseAgreements: Hashable, Codable, RawRepresentable { - case agreementText - case app - case territories - case unknown(String) - - public var rawValue: String { - switch self { - case .agreementText: return "agreementText" - case .app: return "app" - case .territories: return "territories" - case .unknown(let rawValue): return rawValue - } + public struct EndUserLicenseAgreements: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var agreementText: Self { + .init(rawValue: "agreementText") + } + + public static var app: Self { + .init(rawValue: "app") + } + + public static var territories: Self { + .init(rawValue: "territories") + } + + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "agreementText": self = .agreementText - case "app": self = .app - case "territories": self = .territories - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum Territories: Hashable, Codable, RawRepresentable { - case currency - case unknown(String) + public struct Territories: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var currency: Self { + .init(rawValue: "currency") + } - public var rawValue: String { - switch self { - case .currency: return "currency" - case .unknown(let rawValue): return rawValue - } + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "currency": self = .currency - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } @@ -156,25 +160,23 @@ extension V1.EndUserLicenseAgreements.ById.GET { } } - public enum Include: Hashable, Codable, RawRepresentable { - case app - case territories - case unknown(String) + public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var app: Self { + .init(rawValue: "app") + } - public var rawValue: String { - switch self { - case .app: return "app" - case .territories: return "territories" - case .unknown(let rawValue): return rawValue - } + public static var territories: Self { + .init(rawValue: "territories") } + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "app": self = .app - case "territories": self = .territories - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/EndUserLicenseAgreements/ById/EndUserLicenseAgreementsById.PATCH.940d270.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/EndUserLicenseAgreements/ById/EndUserLicenseAgreementsById.PATCH.940d270.generated.swift index cdec4eb7..c0082a5c 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/EndUserLicenseAgreements/ById/EndUserLicenseAgreementsById.PATCH.940d270.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/EndUserLicenseAgreements/ById/EndUserLicenseAgreementsById.PATCH.940d270.generated.swift @@ -48,9 +48,12 @@ extension V1.EndUserLicenseAgreements.ById { /// - Returns: **200**, Single EndUserLicenseAgreement as `EndUserLicenseAgreementResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **422**, Unprocessable request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -64,6 +67,9 @@ extension V1.EndUserLicenseAgreements.ById { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) @@ -73,6 +79,12 @@ extension V1.EndUserLicenseAgreements.ById { case 409: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 422: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/EndUserLicenseAgreements/ById/Relationships/Territories/EndUserLicenseAgreementsByIdRelationshipsTerritories.GET.24bb68a.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/EndUserLicenseAgreements/ById/Relationships/Territories/EndUserLicenseAgreementsByIdRelationshipsTerritories.GET.24bb68a.generated.swift new file mode 100644 index 00000000..726a75c5 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/EndUserLicenseAgreements/ById/Relationships/Territories/EndUserLicenseAgreementsByIdRelationshipsTerritories.GET.24bb68a.generated.swift @@ -0,0 +1,88 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.EndUserLicenseAgreements.ById.Relationships.Territories { + public struct GET: Endpoint { + public typealias Response = EndUserLicenseAgreementTerritoriesLinkagesResponse + + public var path: String { + "/v1/endUserLicenseAgreements/\(id)/relationships/territories" + } + + /// the id of the requested resource + public var id: String + + public var parameters: Parameters = Parameters() + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + components?.queryItems = [ + URLQueryItem(name: "limit", + value: parameters.limit.map { "\($0)" }) + ].filter { $0.value != nil } + if components?.queryItems?.isEmpty ?? false { + components?.queryItems = nil + } + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "GET" + return urlRequest + } + + /// - Returns: **200**, List of related linkages as `EndUserLicenseAgreementTerritoriesLinkagesResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(EndUserLicenseAgreementTerritoriesLinkagesResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +extension V1.EndUserLicenseAgreements.ById.Relationships.Territories.GET { + public struct Parameters: Hashable { + /// maximum resources per page + public var limit: Int? + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/EndUserLicenseAgreements/ById/Territories/EndUserLicenseAgreementsByIdTerritories.GET.e79c768.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/EndUserLicenseAgreements/ById/Territories/EndUserLicenseAgreementsByIdTerritories.GET.e79c768.generated.swift index a878570a..d14b352f 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/EndUserLicenseAgreements/ById/Territories/EndUserLicenseAgreementsByIdTerritories.GET.e79c768.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/EndUserLicenseAgreements/ById/Territories/EndUserLicenseAgreementsByIdTerritories.GET.e79c768.generated.swift @@ -44,8 +44,10 @@ extension V1.EndUserLicenseAgreements.ById.Territories { /// - Returns: **200**, List of Territories with get as `TerritoriesWithoutIncludesResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -59,12 +61,18 @@ extension V1.EndUserLicenseAgreements.ById.Territories { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 404: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -87,22 +95,19 @@ extension V1.EndUserLicenseAgreements.ById.Territories.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum Territories: Hashable, Codable, RawRepresentable { - case currency - case unknown(String) + public struct Territories: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var currency: Self { + .init(rawValue: "currency") + } - public var rawValue: String { - switch self { - case .currency: return "currency" - case .unknown(let rawValue): return rawValue - } + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "currency": self = .currency - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/EndUserLicenseAgreements/EndUserLicenseAgreements.POST.fe1fd08.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/EndUserLicenseAgreements/EndUserLicenseAgreements.POST.fe1fd08.generated.swift index 57c8dedb..fde7b5fd 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/EndUserLicenseAgreements/EndUserLicenseAgreements.POST.fe1fd08.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/EndUserLicenseAgreements/EndUserLicenseAgreements.POST.fe1fd08.generated.swift @@ -41,8 +41,11 @@ extension V1.EndUserLicenseAgreements { /// - Returns: **201**, Single EndUserLicenseAgreement as `EndUserLicenseAgreementResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **422**, Unprocessable request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -56,12 +59,21 @@ extension V1.EndUserLicenseAgreements { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 409: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 422: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/FinanceReports/FinanceReports.GET.387f567.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/FinanceReports/FinanceReports.GET.387f567.generated.swift index 4a85af28..a2457b4c 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/FinanceReports/FinanceReports.GET.387f567.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/FinanceReports/FinanceReports.GET.387f567.generated.swift @@ -45,7 +45,9 @@ extension V1.FinanceReports { /// - Returns: **200**, List of FinanceReports as `Data` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -59,9 +61,15 @@ extension V1.FinanceReports { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -81,25 +89,23 @@ extension V1.FinanceReports.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum ReportType: Hashable, Codable, RawRepresentable { - case financeDetail - case financial - case unknown(String) - - public var rawValue: String { - switch self { - case .financeDetail: return "FINANCE_DETAIL" - case .financial: return "FINANCIAL" - case .unknown(let rawValue): return rawValue - } + public struct ReportType: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var financeDetail: Self { + .init(rawValue: "FINANCE_DETAIL") } + public static var financial: Self { + .init(rawValue: "FINANCIAL") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "FINANCE_DETAIL": self = .financeDetail - case "FINANCIAL": self = .financial - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterAchievementImages/ById/GameCenterAchievementImagesById.DELETE.9dc559b.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterAchievementImages/ById/GameCenterAchievementImagesById.DELETE.9dc559b.generated.swift index a7d97986..cb39180e 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterAchievementImages/ById/GameCenterAchievementImagesById.DELETE.9dc559b.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterAchievementImages/ById/GameCenterAchievementImagesById.DELETE.9dc559b.generated.swift @@ -31,11 +31,12 @@ extension V1.GameCenterAchievementImages.ById { return urlRequest } - /// - Returns: **204**, Success (no content) /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -43,12 +44,12 @@ extension V1.GameCenterAchievementImages.ById { } switch urlResponse.statusCode { - case 204: - return - case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) @@ -58,6 +59,9 @@ extension V1.GameCenterAchievementImages.ById { case 409: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterAchievementImages/ById/GameCenterAchievementImagesById.GET.9dc559b.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterAchievementImages/ById/GameCenterAchievementImagesById.GET.9dc559b.generated.swift index de419f46..6745d1a3 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterAchievementImages/ById/GameCenterAchievementImagesById.GET.9dc559b.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterAchievementImages/ById/GameCenterAchievementImagesById.GET.9dc559b.generated.swift @@ -44,8 +44,10 @@ extension V1.GameCenterAchievementImages.ById { /// - Returns: **200**, Single GameCenterAchievementImage as `GameCenterAchievementImageResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -59,12 +61,18 @@ extension V1.GameCenterAchievementImages.ById { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 404: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -87,40 +95,39 @@ extension V1.GameCenterAchievementImages.ById.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum GameCenterAchievementImages: Hashable, Codable, RawRepresentable { - case assetDeliveryState - case fileName - case fileSize - case gameCenterAchievementLocalization - case imageAsset - case uploadOperations - case uploaded - case unknown(String) - - public var rawValue: String { - switch self { - case .assetDeliveryState: return "assetDeliveryState" - case .fileName: return "fileName" - case .fileSize: return "fileSize" - case .gameCenterAchievementLocalization: return "gameCenterAchievementLocalization" - case .imageAsset: return "imageAsset" - case .uploadOperations: return "uploadOperations" - case .uploaded: return "uploaded" - case .unknown(let rawValue): return rawValue - } + public struct GameCenterAchievementImages: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var assetDeliveryState: Self { + .init(rawValue: "assetDeliveryState") + } + + public static var fileName: Self { + .init(rawValue: "fileName") } + public static var fileSize: Self { + .init(rawValue: "fileSize") + } + + public static var gameCenterAchievementLocalization: Self { + .init(rawValue: "gameCenterAchievementLocalization") + } + + public static var imageAsset: Self { + .init(rawValue: "imageAsset") + } + + public static var uploadOperations: Self { + .init(rawValue: "uploadOperations") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "assetDeliveryState": self = .assetDeliveryState - case "fileName": self = .fileName - case "fileSize": self = .fileSize - case "gameCenterAchievementLocalization": self = .gameCenterAchievementLocalization - case "imageAsset": self = .imageAsset - case "uploadOperations": self = .uploadOperations - case "uploaded": self = .uploaded - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } @@ -138,22 +145,19 @@ extension V1.GameCenterAchievementImages.ById.GET { } } - public enum Include: Hashable, Codable, RawRepresentable { - case gameCenterAchievementLocalization - case unknown(String) + public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var gameCenterAchievementLocalization: Self { + .init(rawValue: "gameCenterAchievementLocalization") + } - public var rawValue: String { - switch self { - case .gameCenterAchievementLocalization: return "gameCenterAchievementLocalization" - case .unknown(let rawValue): return rawValue - } + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "gameCenterAchievementLocalization": self = .gameCenterAchievementLocalization - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterAchievementImages/ById/GameCenterAchievementImagesById.PATCH.9dc559b.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterAchievementImages/ById/GameCenterAchievementImagesById.PATCH.9dc559b.generated.swift index 56069f36..5153ac70 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterAchievementImages/ById/GameCenterAchievementImagesById.PATCH.9dc559b.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterAchievementImages/ById/GameCenterAchievementImagesById.PATCH.9dc559b.generated.swift @@ -48,9 +48,12 @@ extension V1.GameCenterAchievementImages.ById { /// - Returns: **200**, Single GameCenterAchievementImage as `GameCenterAchievementImageResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **422**, Unprocessable request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -64,6 +67,9 @@ extension V1.GameCenterAchievementImages.ById { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) @@ -73,6 +79,12 @@ extension V1.GameCenterAchievementImages.ById { case 409: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 422: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterAchievementImages/GameCenterAchievementImages.POST.d1c317b.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterAchievementImages/GameCenterAchievementImages.POST.d1c317b.generated.swift index 75a56f21..0ecdee6e 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterAchievementImages/GameCenterAchievementImages.POST.d1c317b.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterAchievementImages/GameCenterAchievementImages.POST.d1c317b.generated.swift @@ -41,8 +41,11 @@ extension V1.GameCenterAchievementImages { /// - Returns: **201**, Single GameCenterAchievementImage as `GameCenterAchievementImageResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **422**, Unprocessable request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -56,12 +59,21 @@ extension V1.GameCenterAchievementImages { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 409: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 422: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterAchievementLocalizations/ById/GameCenterAchievement/GameCenterAchievementLocalizationsByIdGameCenterAchievement.GET.833923b.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterAchievementLocalizations/ById/GameCenterAchievement/GameCenterAchievementLocalizationsByIdGameCenterAchievement.GET.833923b.generated.swift index 95ef738b..a9abf09c 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterAchievementLocalizations/ById/GameCenterAchievement/GameCenterAchievementLocalizationsByIdGameCenterAchievement.GET.833923b.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterAchievementLocalizations/ById/GameCenterAchievement/GameCenterAchievementLocalizationsByIdGameCenterAchievement.GET.833923b.generated.swift @@ -34,6 +34,8 @@ extension V1.GameCenterAchievementLocalizations.ById.GameCenterAchievement { value: parameters.fields[.gameCenterAchievementReleases]?.map { "\($0)" }.joined(separator: ",")), URLQueryItem(name: "fields[gameCenterAchievements]", value: parameters.fields[.gameCenterAchievements]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "fields[gameCenterActivities]", + value: parameters.fields[.gameCenterActivities]?.map { "\($0)" }.joined(separator: ",")), URLQueryItem(name: "fields[gameCenterDetails]", value: parameters.fields[.gameCenterDetails]?.map { "\($0)" }.joined(separator: ",")), URLQueryItem(name: "fields[gameCenterGroups]", @@ -56,8 +58,10 @@ extension V1.GameCenterAchievementLocalizations.ById.GameCenterAchievement { /// - Returns: **200**, Single GameCenterAchievement as `GameCenterAchievementResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -71,12 +75,18 @@ extension V1.GameCenterAchievementLocalizations.ById.GameCenterAchievement { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 404: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -101,197 +111,315 @@ extension V1.GameCenterAchievementLocalizations.ById.GameCenterAchievement.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum GameCenterAchievementLocalizations: Hashable, Codable, RawRepresentable { - case afterEarnedDescription - case beforeEarnedDescription - case gameCenterAchievement - case gameCenterAchievementImage - case locale - case name - case unknown(String) - - public var rawValue: String { - switch self { - case .afterEarnedDescription: return "afterEarnedDescription" - case .beforeEarnedDescription: return "beforeEarnedDescription" - case .gameCenterAchievement: return "gameCenterAchievement" - case .gameCenterAchievementImage: return "gameCenterAchievementImage" - case .locale: return "locale" - case .name: return "name" - case .unknown(let rawValue): return rawValue - } + public struct GameCenterAchievementLocalizations: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var afterEarnedDescription: Self { + .init(rawValue: "afterEarnedDescription") + } + + public static var beforeEarnedDescription: Self { + .init(rawValue: "beforeEarnedDescription") + } + + public static var gameCenterAchievement: Self { + .init(rawValue: "gameCenterAchievement") + } + + public static var gameCenterAchievementImage: Self { + .init(rawValue: "gameCenterAchievementImage") + } + + public static var locale: Self { + .init(rawValue: "locale") + } + + public static var name: Self { + .init(rawValue: "name") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct GameCenterAchievementReleases: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var gameCenterAchievement: Self { + .init(rawValue: "gameCenterAchievement") + } + + public static var gameCenterDetail: Self { + .init(rawValue: "gameCenterDetail") + } + + public static var live: Self { + .init(rawValue: "live") + } + + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "afterEarnedDescription": self = .afterEarnedDescription - case "beforeEarnedDescription": self = .beforeEarnedDescription - case "gameCenterAchievement": self = .gameCenterAchievement - case "gameCenterAchievementImage": self = .gameCenterAchievementImage - case "locale": self = .locale - case "name": self = .name - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum GameCenterAchievementReleases: Hashable, Codable, RawRepresentable { - case gameCenterAchievement - case gameCenterDetail - case live - case unknown(String) + public struct GameCenterAchievements: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var activity: Self { + .init(rawValue: "activity") + } + + public static var activityProperties: Self { + .init(rawValue: "activityProperties") + } + + public static var archived: Self { + .init(rawValue: "archived") + } + + public static var gameCenterDetail: Self { + .init(rawValue: "gameCenterDetail") + } + + public static var gameCenterGroup: Self { + .init(rawValue: "gameCenterGroup") + } + + public static var groupAchievement: Self { + .init(rawValue: "groupAchievement") + } + + public static var localizations: Self { + .init(rawValue: "localizations") + } - public var rawValue: String { - switch self { - case .gameCenterAchievement: return "gameCenterAchievement" - case .gameCenterDetail: return "gameCenterDetail" - case .live: return "live" - case .unknown(let rawValue): return rawValue - } + public static var points: Self { + .init(rawValue: "points") } + public static var referenceName: Self { + .init(rawValue: "referenceName") + } + + public static var releases: Self { + .init(rawValue: "releases") + } + + public static var repeatable: Self { + .init(rawValue: "repeatable") + } + + public static var showBeforeEarned: Self { + .init(rawValue: "showBeforeEarned") + } + + public static var vendorIdentifier: Self { + .init(rawValue: "vendorIdentifier") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "gameCenterAchievement": self = .gameCenterAchievement - case "gameCenterDetail": self = .gameCenterDetail - case "live": self = .live - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum GameCenterAchievements: Hashable, Codable, RawRepresentable { - case archived - case gameCenterDetail - case gameCenterGroup - case groupAchievement - case localizations - case points - case referenceName - case releases - case repeatable - case showBeforeEarned - case vendorIdentifier - case unknown(String) - - public var rawValue: String { - switch self { - case .archived: return "archived" - case .gameCenterDetail: return "gameCenterDetail" - case .gameCenterGroup: return "gameCenterGroup" - case .groupAchievement: return "groupAchievement" - case .localizations: return "localizations" - case .points: return "points" - case .referenceName: return "referenceName" - case .releases: return "releases" - case .repeatable: return "repeatable" - case .showBeforeEarned: return "showBeforeEarned" - case .vendorIdentifier: return "vendorIdentifier" - case .unknown(let rawValue): return rawValue - } + public struct GameCenterActivities: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var achievements: Self { + .init(rawValue: "achievements") + } + + public static var archived: Self { + .init(rawValue: "archived") + } + + public static var gameCenterDetail: Self { + .init(rawValue: "gameCenterDetail") + } + + public static var gameCenterGroup: Self { + .init(rawValue: "gameCenterGroup") + } + + public static var leaderboards: Self { + .init(rawValue: "leaderboards") + } + + public static var maximumPlayersCount: Self { + .init(rawValue: "maximumPlayersCount") + } + + public static var minimumPlayersCount: Self { + .init(rawValue: "minimumPlayersCount") + } + + public static var playStyle: Self { + .init(rawValue: "playStyle") + } + + public static var properties: Self { + .init(rawValue: "properties") + } + + public static var referenceName: Self { + .init(rawValue: "referenceName") + } + + public static var supportsPartyCode: Self { + .init(rawValue: "supportsPartyCode") } + public static var vendorIdentifier: Self { + .init(rawValue: "vendorIdentifier") + } + + public static var versions: Self { + .init(rawValue: "versions") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "archived": self = .archived - case "gameCenterDetail": self = .gameCenterDetail - case "gameCenterGroup": self = .gameCenterGroup - case "groupAchievement": self = .groupAchievement - case "localizations": self = .localizations - case "points": self = .points - case "referenceName": self = .referenceName - case "releases": self = .releases - case "repeatable": self = .repeatable - case "showBeforeEarned": self = .showBeforeEarned - case "vendorIdentifier": self = .vendorIdentifier - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum GameCenterDetails: Hashable, Codable, RawRepresentable { - case achievementReleases - case app - case arcadeEnabled - case challengeEnabled - case defaultGroupLeaderboard - case defaultLeaderboard - case gameCenterAchievements - case gameCenterAppVersions - case gameCenterGroup - case gameCenterLeaderboardSets - case gameCenterLeaderboards - case leaderboardReleases - case leaderboardSetReleases - case unknown(String) - - public var rawValue: String { - switch self { - case .achievementReleases: return "achievementReleases" - case .app: return "app" - case .arcadeEnabled: return "arcadeEnabled" - case .challengeEnabled: return "challengeEnabled" - case .defaultGroupLeaderboard: return "defaultGroupLeaderboard" - case .defaultLeaderboard: return "defaultLeaderboard" - case .gameCenterAchievements: return "gameCenterAchievements" - case .gameCenterAppVersions: return "gameCenterAppVersions" - case .gameCenterGroup: return "gameCenterGroup" - case .gameCenterLeaderboardSets: return "gameCenterLeaderboardSets" - case .gameCenterLeaderboards: return "gameCenterLeaderboards" - case .leaderboardReleases: return "leaderboardReleases" - case .leaderboardSetReleases: return "leaderboardSetReleases" - case .unknown(let rawValue): return rawValue - } + public struct GameCenterDetails: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var achievementReleases: Self { + .init(rawValue: "achievementReleases") + } + + public static var activityReleases: Self { + .init(rawValue: "activityReleases") + } + + public static var app: Self { + .init(rawValue: "app") + } + + public static var arcadeEnabled: Self { + .init(rawValue: "arcadeEnabled") + } + + public static var challengeEnabled: Self { + .init(rawValue: "challengeEnabled") + } + + public static var challengeReleases: Self { + .init(rawValue: "challengeReleases") + } + + public static var challengesMinimumPlatformVersions: Self { + .init(rawValue: "challengesMinimumPlatformVersions") + } + + public static var defaultGroupLeaderboard: Self { + .init(rawValue: "defaultGroupLeaderboard") + } + + public static var defaultLeaderboard: Self { + .init(rawValue: "defaultLeaderboard") + } + + public static var gameCenterAchievements: Self { + .init(rawValue: "gameCenterAchievements") + } + + public static var gameCenterActivities: Self { + .init(rawValue: "gameCenterActivities") + } + + public static var gameCenterAppVersions: Self { + .init(rawValue: "gameCenterAppVersions") + } + + public static var gameCenterChallenges: Self { + .init(rawValue: "gameCenterChallenges") + } + + public static var gameCenterGroup: Self { + .init(rawValue: "gameCenterGroup") + } + + public static var gameCenterLeaderboardSets: Self { + .init(rawValue: "gameCenterLeaderboardSets") + } + + public static var gameCenterLeaderboards: Self { + .init(rawValue: "gameCenterLeaderboards") + } + + public static var leaderboardReleases: Self { + .init(rawValue: "leaderboardReleases") + } + + public static var leaderboardSetReleases: Self { + .init(rawValue: "leaderboardSetReleases") + } + + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "achievementReleases": self = .achievementReleases - case "app": self = .app - case "arcadeEnabled": self = .arcadeEnabled - case "challengeEnabled": self = .challengeEnabled - case "defaultGroupLeaderboard": self = .defaultGroupLeaderboard - case "defaultLeaderboard": self = .defaultLeaderboard - case "gameCenterAchievements": self = .gameCenterAchievements - case "gameCenterAppVersions": self = .gameCenterAppVersions - case "gameCenterGroup": self = .gameCenterGroup - case "gameCenterLeaderboardSets": self = .gameCenterLeaderboardSets - case "gameCenterLeaderboards": self = .gameCenterLeaderboards - case "leaderboardReleases": self = .leaderboardReleases - case "leaderboardSetReleases": self = .leaderboardSetReleases - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum GameCenterGroups: Hashable, Codable, RawRepresentable { - case gameCenterAchievements - case gameCenterDetails - case gameCenterLeaderboardSets - case gameCenterLeaderboards - case referenceName - case unknown(String) - - public var rawValue: String { - switch self { - case .gameCenterAchievements: return "gameCenterAchievements" - case .gameCenterDetails: return "gameCenterDetails" - case .gameCenterLeaderboardSets: return "gameCenterLeaderboardSets" - case .gameCenterLeaderboards: return "gameCenterLeaderboards" - case .referenceName: return "referenceName" - case .unknown(let rawValue): return rawValue - } + public struct GameCenterGroups: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var gameCenterAchievements: Self { + .init(rawValue: "gameCenterAchievements") + } + + public static var gameCenterActivities: Self { + .init(rawValue: "gameCenterActivities") + } + + public static var gameCenterChallenges: Self { + .init(rawValue: "gameCenterChallenges") + } + + public static var gameCenterDetails: Self { + .init(rawValue: "gameCenterDetails") + } + + public static var gameCenterLeaderboardSets: Self { + .init(rawValue: "gameCenterLeaderboardSets") + } + + public static var gameCenterLeaderboards: Self { + .init(rawValue: "gameCenterLeaderboards") + } + + public static var referenceName: Self { + .init(rawValue: "referenceName") + } + + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "gameCenterAchievements": self = .gameCenterAchievements - case "gameCenterDetails": self = .gameCenterDetails - case "gameCenterLeaderboardSets": self = .gameCenterLeaderboardSets - case "gameCenterLeaderboards": self = .gameCenterLeaderboards - case "referenceName": self = .referenceName - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } @@ -311,6 +439,11 @@ extension V1.GameCenterAchievementLocalizations.ById.GameCenterAchievement.GET { .init(key: "fields[gameCenterAchievements]") } + /// the fields to include for returned resources of type gameCenterActivities + public static var gameCenterActivities: Relation<[GameCenterActivities]?> { + .init(key: "fields[gameCenterActivities]") + } + /// the fields to include for returned resources of type gameCenterDetails public static var gameCenterDetails: Relation<[GameCenterDetails]?> { .init(key: "fields[gameCenterDetails]") @@ -329,34 +462,39 @@ extension V1.GameCenterAchievementLocalizations.ById.GameCenterAchievement.GET { } } - public enum Include: Hashable, Codable, RawRepresentable { - case gameCenterDetail - case gameCenterGroup - case groupAchievement - case localizations - case releases - case unknown(String) - - public var rawValue: String { - switch self { - case .gameCenterDetail: return "gameCenterDetail" - case .gameCenterGroup: return "gameCenterGroup" - case .groupAchievement: return "groupAchievement" - case .localizations: return "localizations" - case .releases: return "releases" - case .unknown(let rawValue): return rawValue - } + public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var activity: Self { + .init(rawValue: "activity") } + public static var gameCenterDetail: Self { + .init(rawValue: "gameCenterDetail") + } + + public static var gameCenterGroup: Self { + .init(rawValue: "gameCenterGroup") + } + + public static var groupAchievement: Self { + .init(rawValue: "groupAchievement") + } + + public static var localizations: Self { + .init(rawValue: "localizations") + } + + public static var releases: Self { + .init(rawValue: "releases") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "gameCenterDetail": self = .gameCenterDetail - case "gameCenterGroup": self = .gameCenterGroup - case "groupAchievement": self = .groupAchievement - case "localizations": self = .localizations - case "releases": self = .releases - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterAchievementLocalizations/ById/GameCenterAchievementImage/GameCenterAchievementLocalizationsByIdGameCenterAchievementImage.GET.68fa9cf.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterAchievementLocalizations/ById/GameCenterAchievementImage/GameCenterAchievementLocalizationsByIdGameCenterAchievementImage.GET.68fa9cf.generated.swift index b8398ea8..aca902a2 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterAchievementLocalizations/ById/GameCenterAchievementImage/GameCenterAchievementLocalizationsByIdGameCenterAchievementImage.GET.68fa9cf.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterAchievementLocalizations/ById/GameCenterAchievementImage/GameCenterAchievementLocalizationsByIdGameCenterAchievementImage.GET.68fa9cf.generated.swift @@ -46,8 +46,10 @@ extension V1.GameCenterAchievementLocalizations.ById.GameCenterAchievementImage /// - Returns: **200**, Single GameCenterAchievementImage as `GameCenterAchievementImageResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -61,12 +63,18 @@ extension V1.GameCenterAchievementLocalizations.ById.GameCenterAchievementImage case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 404: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -89,74 +97,75 @@ extension V1.GameCenterAchievementLocalizations.ById.GameCenterAchievementImage. private var values: [AnyHashable: AnyHashable] = [:] - public enum GameCenterAchievementImages: Hashable, Codable, RawRepresentable { - case assetDeliveryState - case fileName - case fileSize - case gameCenterAchievementLocalization - case imageAsset - case uploadOperations - case uploaded - case unknown(String) - - public var rawValue: String { - switch self { - case .assetDeliveryState: return "assetDeliveryState" - case .fileName: return "fileName" - case .fileSize: return "fileSize" - case .gameCenterAchievementLocalization: return "gameCenterAchievementLocalization" - case .imageAsset: return "imageAsset" - case .uploadOperations: return "uploadOperations" - case .uploaded: return "uploaded" - case .unknown(let rawValue): return rawValue - } + public struct GameCenterAchievementImages: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var assetDeliveryState: Self { + .init(rawValue: "assetDeliveryState") } + public static var fileName: Self { + .init(rawValue: "fileName") + } + + public static var fileSize: Self { + .init(rawValue: "fileSize") + } + + public static var gameCenterAchievementLocalization: Self { + .init(rawValue: "gameCenterAchievementLocalization") + } + + public static var imageAsset: Self { + .init(rawValue: "imageAsset") + } + + public static var uploadOperations: Self { + .init(rawValue: "uploadOperations") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "assetDeliveryState": self = .assetDeliveryState - case "fileName": self = .fileName - case "fileSize": self = .fileSize - case "gameCenterAchievementLocalization": self = .gameCenterAchievementLocalization - case "imageAsset": self = .imageAsset - case "uploadOperations": self = .uploadOperations - case "uploaded": self = .uploaded - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum GameCenterAchievementLocalizations: Hashable, Codable, RawRepresentable { - case afterEarnedDescription - case beforeEarnedDescription - case gameCenterAchievement - case gameCenterAchievementImage - case locale - case name - case unknown(String) - - public var rawValue: String { - switch self { - case .afterEarnedDescription: return "afterEarnedDescription" - case .beforeEarnedDescription: return "beforeEarnedDescription" - case .gameCenterAchievement: return "gameCenterAchievement" - case .gameCenterAchievementImage: return "gameCenterAchievementImage" - case .locale: return "locale" - case .name: return "name" - case .unknown(let rawValue): return rawValue - } + public struct GameCenterAchievementLocalizations: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var afterEarnedDescription: Self { + .init(rawValue: "afterEarnedDescription") } + public static var beforeEarnedDescription: Self { + .init(rawValue: "beforeEarnedDescription") + } + + public static var gameCenterAchievement: Self { + .init(rawValue: "gameCenterAchievement") + } + + public static var gameCenterAchievementImage: Self { + .init(rawValue: "gameCenterAchievementImage") + } + + public static var locale: Self { + .init(rawValue: "locale") + } + + public static var name: Self { + .init(rawValue: "name") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "afterEarnedDescription": self = .afterEarnedDescription - case "beforeEarnedDescription": self = .beforeEarnedDescription - case "gameCenterAchievement": self = .gameCenterAchievement - case "gameCenterAchievementImage": self = .gameCenterAchievementImage - case "locale": self = .locale - case "name": self = .name - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } @@ -179,22 +188,19 @@ extension V1.GameCenterAchievementLocalizations.ById.GameCenterAchievementImage. } } - public enum Include: Hashable, Codable, RawRepresentable { - case gameCenterAchievementLocalization - case unknown(String) + public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var gameCenterAchievementLocalization: Self { + .init(rawValue: "gameCenterAchievementLocalization") + } - public var rawValue: String { - switch self { - case .gameCenterAchievementLocalization: return "gameCenterAchievementLocalization" - case .unknown(let rawValue): return rawValue - } + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "gameCenterAchievementLocalization": self = .gameCenterAchievementLocalization - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterAchievementLocalizations/ById/GameCenterAchievementLocalizationsById.DELETE.eec1c39.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterAchievementLocalizations/ById/GameCenterAchievementLocalizationsById.DELETE.eec1c39.generated.swift index 8adb55e6..2c89dc50 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterAchievementLocalizations/ById/GameCenterAchievementLocalizationsById.DELETE.eec1c39.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterAchievementLocalizations/ById/GameCenterAchievementLocalizationsById.DELETE.eec1c39.generated.swift @@ -31,11 +31,12 @@ extension V1.GameCenterAchievementLocalizations.ById { return urlRequest } - /// - Returns: **204**, Success (no content) /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -43,12 +44,12 @@ extension V1.GameCenterAchievementLocalizations.ById { } switch urlResponse.statusCode { - case 204: - return - case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) @@ -58,6 +59,9 @@ extension V1.GameCenterAchievementLocalizations.ById { case 409: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterAchievementLocalizations/ById/GameCenterAchievementLocalizationsById.GET.eec1c39.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterAchievementLocalizations/ById/GameCenterAchievementLocalizationsById.GET.eec1c39.generated.swift index b3200f20..d4a10485 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterAchievementLocalizations/ById/GameCenterAchievementLocalizationsById.GET.eec1c39.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterAchievementLocalizations/ById/GameCenterAchievementLocalizationsById.GET.eec1c39.generated.swift @@ -48,8 +48,10 @@ extension V1.GameCenterAchievementLocalizations.ById { /// - Returns: **200**, Single GameCenterAchievementLocalization as `GameCenterAchievementLocalizationResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -63,12 +65,18 @@ extension V1.GameCenterAchievementLocalizations.ById { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 404: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -91,123 +99,139 @@ extension V1.GameCenterAchievementLocalizations.ById.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum GameCenterAchievementImages: Hashable, Codable, RawRepresentable { - case assetDeliveryState - case fileName - case fileSize - case gameCenterAchievementLocalization - case imageAsset - case uploadOperations - case uploaded - case unknown(String) - - public var rawValue: String { - switch self { - case .assetDeliveryState: return "assetDeliveryState" - case .fileName: return "fileName" - case .fileSize: return "fileSize" - case .gameCenterAchievementLocalization: return "gameCenterAchievementLocalization" - case .imageAsset: return "imageAsset" - case .uploadOperations: return "uploadOperations" - case .uploaded: return "uploaded" - case .unknown(let rawValue): return rawValue - } + public struct GameCenterAchievementImages: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var assetDeliveryState: Self { + .init(rawValue: "assetDeliveryState") + } + + public static var fileName: Self { + .init(rawValue: "fileName") + } + + public static var fileSize: Self { + .init(rawValue: "fileSize") + } + + public static var gameCenterAchievementLocalization: Self { + .init(rawValue: "gameCenterAchievementLocalization") + } + + public static var imageAsset: Self { + .init(rawValue: "imageAsset") + } + + public static var uploadOperations: Self { + .init(rawValue: "uploadOperations") + } + + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "assetDeliveryState": self = .assetDeliveryState - case "fileName": self = .fileName - case "fileSize": self = .fileSize - case "gameCenterAchievementLocalization": self = .gameCenterAchievementLocalization - case "imageAsset": self = .imageAsset - case "uploadOperations": self = .uploadOperations - case "uploaded": self = .uploaded - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum GameCenterAchievementLocalizations: Hashable, Codable, RawRepresentable { - case afterEarnedDescription - case beforeEarnedDescription - case gameCenterAchievement - case gameCenterAchievementImage - case locale - case name - case unknown(String) - - public var rawValue: String { - switch self { - case .afterEarnedDescription: return "afterEarnedDescription" - case .beforeEarnedDescription: return "beforeEarnedDescription" - case .gameCenterAchievement: return "gameCenterAchievement" - case .gameCenterAchievementImage: return "gameCenterAchievementImage" - case .locale: return "locale" - case .name: return "name" - case .unknown(let rawValue): return rawValue - } + public struct GameCenterAchievementLocalizations: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var afterEarnedDescription: Self { + .init(rawValue: "afterEarnedDescription") + } + + public static var beforeEarnedDescription: Self { + .init(rawValue: "beforeEarnedDescription") + } + + public static var gameCenterAchievement: Self { + .init(rawValue: "gameCenterAchievement") + } + + public static var gameCenterAchievementImage: Self { + .init(rawValue: "gameCenterAchievementImage") + } + + public static var locale: Self { + .init(rawValue: "locale") + } + + public static var name: Self { + .init(rawValue: "name") + } + + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "afterEarnedDescription": self = .afterEarnedDescription - case "beforeEarnedDescription": self = .beforeEarnedDescription - case "gameCenterAchievement": self = .gameCenterAchievement - case "gameCenterAchievementImage": self = .gameCenterAchievementImage - case "locale": self = .locale - case "name": self = .name - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum GameCenterAchievements: Hashable, Codable, RawRepresentable { - case archived - case gameCenterDetail - case gameCenterGroup - case groupAchievement - case localizations - case points - case referenceName - case releases - case repeatable - case showBeforeEarned - case vendorIdentifier - case unknown(String) - - public var rawValue: String { - switch self { - case .archived: return "archived" - case .gameCenterDetail: return "gameCenterDetail" - case .gameCenterGroup: return "gameCenterGroup" - case .groupAchievement: return "groupAchievement" - case .localizations: return "localizations" - case .points: return "points" - case .referenceName: return "referenceName" - case .releases: return "releases" - case .repeatable: return "repeatable" - case .showBeforeEarned: return "showBeforeEarned" - case .vendorIdentifier: return "vendorIdentifier" - case .unknown(let rawValue): return rawValue - } + public struct GameCenterAchievements: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var activity: Self { + .init(rawValue: "activity") + } + + public static var activityProperties: Self { + .init(rawValue: "activityProperties") } + public static var archived: Self { + .init(rawValue: "archived") + } + + public static var gameCenterDetail: Self { + .init(rawValue: "gameCenterDetail") + } + + public static var gameCenterGroup: Self { + .init(rawValue: "gameCenterGroup") + } + + public static var groupAchievement: Self { + .init(rawValue: "groupAchievement") + } + + public static var localizations: Self { + .init(rawValue: "localizations") + } + + public static var points: Self { + .init(rawValue: "points") + } + + public static var referenceName: Self { + .init(rawValue: "referenceName") + } + + public static var releases: Self { + .init(rawValue: "releases") + } + + public static var repeatable: Self { + .init(rawValue: "repeatable") + } + + public static var showBeforeEarned: Self { + .init(rawValue: "showBeforeEarned") + } + + public static var vendorIdentifier: Self { + .init(rawValue: "vendorIdentifier") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "archived": self = .archived - case "gameCenterDetail": self = .gameCenterDetail - case "gameCenterGroup": self = .gameCenterGroup - case "groupAchievement": self = .groupAchievement - case "localizations": self = .localizations - case "points": self = .points - case "referenceName": self = .referenceName - case "releases": self = .releases - case "repeatable": self = .repeatable - case "showBeforeEarned": self = .showBeforeEarned - case "vendorIdentifier": self = .vendorIdentifier - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } @@ -235,25 +259,23 @@ extension V1.GameCenterAchievementLocalizations.ById.GET { } } - public enum Include: Hashable, Codable, RawRepresentable { - case gameCenterAchievement - case gameCenterAchievementImage - case unknown(String) + public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var gameCenterAchievement: Self { + .init(rawValue: "gameCenterAchievement") + } - public var rawValue: String { - switch self { - case .gameCenterAchievement: return "gameCenterAchievement" - case .gameCenterAchievementImage: return "gameCenterAchievementImage" - case .unknown(let rawValue): return rawValue - } + public static var gameCenterAchievementImage: Self { + .init(rawValue: "gameCenterAchievementImage") } + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "gameCenterAchievement": self = .gameCenterAchievement - case "gameCenterAchievementImage": self = .gameCenterAchievementImage - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterAchievementLocalizations/ById/GameCenterAchievementLocalizationsById.PATCH.eec1c39.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterAchievementLocalizations/ById/GameCenterAchievementLocalizationsById.PATCH.eec1c39.generated.swift index 63dc216c..0477613c 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterAchievementLocalizations/ById/GameCenterAchievementLocalizationsById.PATCH.eec1c39.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterAchievementLocalizations/ById/GameCenterAchievementLocalizationsById.PATCH.eec1c39.generated.swift @@ -48,9 +48,12 @@ extension V1.GameCenterAchievementLocalizations.ById { /// - Returns: **200**, Single GameCenterAchievementLocalization as `GameCenterAchievementLocalizationResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **422**, Unprocessable request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -64,6 +67,9 @@ extension V1.GameCenterAchievementLocalizations.ById { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) @@ -73,6 +79,12 @@ extension V1.GameCenterAchievementLocalizations.ById { case 409: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 422: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterAchievementLocalizations/ById/Relationships/GameCenterAchievement/GameCenterAchievementLocalizationsByIdRelationshipsGameCenterAchievement.GET.2437564.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterAchievementLocalizations/ById/Relationships/GameCenterAchievement/GameCenterAchievementLocalizationsByIdRelationshipsGameCenterAchievement.GET.2437564.generated.swift new file mode 100644 index 00000000..927c0290 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterAchievementLocalizations/ById/Relationships/GameCenterAchievement/GameCenterAchievementLocalizationsByIdRelationshipsGameCenterAchievement.GET.2437564.generated.swift @@ -0,0 +1,86 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.GameCenterAchievementLocalizations.ById.Relationships.GameCenterAchievement { + public struct GET: Endpoint { + public typealias Response = GameCenterAchievementLocalizationGameCenterAchievementLinkageResponse + + public var path: String { + "/v1/gameCenterAchievementLocalizations/\(id)/relationships/gameCenterAchievement" + } + + /// the id of the requested resource + public var id: String + + public var parameters: Parameters = Parameters() + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + components?.queryItems = [ + + ].filter { $0.value != nil } + if components?.queryItems?.isEmpty ?? false { + components?.queryItems = nil + } + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "GET" + return urlRequest + } + + /// - Returns: **200**, Related linkage as `GameCenterAchievementLocalizationGameCenterAchievementLinkageResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(GameCenterAchievementLocalizationGameCenterAchievementLinkageResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +extension V1.GameCenterAchievementLocalizations.ById.Relationships.GameCenterAchievement.GET { + public struct Parameters: Hashable { + + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterAchievementLocalizations/ById/Relationships/GameCenterAchievementImage/GameCenterAchievementLocalizationsByIdRelationshipsGameCenterAchievementImage.GET.02e1f8f.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterAchievementLocalizations/ById/Relationships/GameCenterAchievementImage/GameCenterAchievementLocalizationsByIdRelationshipsGameCenterAchievementImage.GET.02e1f8f.generated.swift new file mode 100644 index 00000000..455b7456 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterAchievementLocalizations/ById/Relationships/GameCenterAchievementImage/GameCenterAchievementLocalizationsByIdRelationshipsGameCenterAchievementImage.GET.02e1f8f.generated.swift @@ -0,0 +1,86 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.GameCenterAchievementLocalizations.ById.Relationships.GameCenterAchievementImage { + public struct GET: Endpoint { + public typealias Response = GameCenterAchievementLocalizationGameCenterAchievementImageLinkageResponse + + public var path: String { + "/v1/gameCenterAchievementLocalizations/\(id)/relationships/gameCenterAchievementImage" + } + + /// the id of the requested resource + public var id: String + + public var parameters: Parameters = Parameters() + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + components?.queryItems = [ + + ].filter { $0.value != nil } + if components?.queryItems?.isEmpty ?? false { + components?.queryItems = nil + } + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "GET" + return urlRequest + } + + /// - Returns: **200**, Related linkage as `GameCenterAchievementLocalizationGameCenterAchievementImageLinkageResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(GameCenterAchievementLocalizationGameCenterAchievementImageLinkageResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +extension V1.GameCenterAchievementLocalizations.ById.Relationships.GameCenterAchievementImage.GET { + public struct Parameters: Hashable { + + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterAchievementLocalizations/GameCenterAchievementLocalizations.POST.a6e083a.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterAchievementLocalizations/GameCenterAchievementLocalizations.POST.a6e083a.generated.swift index e35798f3..0ff6b369 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterAchievementLocalizations/GameCenterAchievementLocalizations.POST.a6e083a.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterAchievementLocalizations/GameCenterAchievementLocalizations.POST.a6e083a.generated.swift @@ -41,8 +41,11 @@ extension V1.GameCenterAchievementLocalizations { /// - Returns: **201**, Single GameCenterAchievementLocalization as `GameCenterAchievementLocalizationResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **422**, Unprocessable request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -56,12 +59,21 @@ extension V1.GameCenterAchievementLocalizations { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 409: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 422: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterAchievementReleases/ById/GameCenterAchievementReleasesById.DELETE.41adca8.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterAchievementReleases/ById/GameCenterAchievementReleasesById.DELETE.41adca8.generated.swift index a90e17d6..b121579f 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterAchievementReleases/ById/GameCenterAchievementReleasesById.DELETE.41adca8.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterAchievementReleases/ById/GameCenterAchievementReleasesById.DELETE.41adca8.generated.swift @@ -31,11 +31,12 @@ extension V1.GameCenterAchievementReleases.ById { return urlRequest } - /// - Returns: **204**, Success (no content) /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -43,12 +44,12 @@ extension V1.GameCenterAchievementReleases.ById { } switch urlResponse.statusCode { - case 204: - return - case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) @@ -58,6 +59,9 @@ extension V1.GameCenterAchievementReleases.ById { case 409: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterAchievementReleases/ById/GameCenterAchievementReleasesById.GET.41adca8.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterAchievementReleases/ById/GameCenterAchievementReleasesById.GET.41adca8.generated.swift index 04777bc5..a2f72b2f 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterAchievementReleases/ById/GameCenterAchievementReleasesById.GET.41adca8.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterAchievementReleases/ById/GameCenterAchievementReleasesById.GET.41adca8.generated.swift @@ -44,8 +44,10 @@ extension V1.GameCenterAchievementReleases.ById { /// - Returns: **200**, Single GameCenterAchievementRelease as `GameCenterAchievementReleaseResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -59,12 +61,18 @@ extension V1.GameCenterAchievementReleases.ById { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 404: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -87,28 +95,27 @@ extension V1.GameCenterAchievementReleases.ById.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum GameCenterAchievementReleases: Hashable, Codable, RawRepresentable { - case gameCenterAchievement - case gameCenterDetail - case live - case unknown(String) - - public var rawValue: String { - switch self { - case .gameCenterAchievement: return "gameCenterAchievement" - case .gameCenterDetail: return "gameCenterDetail" - case .live: return "live" - case .unknown(let rawValue): return rawValue - } + public struct GameCenterAchievementReleases: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var gameCenterAchievement: Self { + .init(rawValue: "gameCenterAchievement") } + public static var gameCenterDetail: Self { + .init(rawValue: "gameCenterDetail") + } + + public static var live: Self { + .init(rawValue: "live") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "gameCenterAchievement": self = .gameCenterAchievement - case "gameCenterDetail": self = .gameCenterDetail - case "live": self = .live - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } @@ -126,25 +133,23 @@ extension V1.GameCenterAchievementReleases.ById.GET { } } - public enum Include: Hashable, Codable, RawRepresentable { - case gameCenterAchievement - case gameCenterDetail - case unknown(String) + public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var gameCenterAchievement: Self { + .init(rawValue: "gameCenterAchievement") + } - public var rawValue: String { - switch self { - case .gameCenterAchievement: return "gameCenterAchievement" - case .gameCenterDetail: return "gameCenterDetail" - case .unknown(let rawValue): return rawValue - } + public static var gameCenterDetail: Self { + .init(rawValue: "gameCenterDetail") } + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "gameCenterAchievement": self = .gameCenterAchievement - case "gameCenterDetail": self = .gameCenterDetail - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterAchievementReleases/GameCenterAchievementReleases.POST.ac65a3e.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterAchievementReleases/GameCenterAchievementReleases.POST.ac65a3e.generated.swift index 0ac61904..f250836c 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterAchievementReleases/GameCenterAchievementReleases.POST.ac65a3e.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterAchievementReleases/GameCenterAchievementReleases.POST.ac65a3e.generated.swift @@ -41,8 +41,11 @@ extension V1.GameCenterAchievementReleases { /// - Returns: **201**, Single GameCenterAchievementRelease as `GameCenterAchievementReleaseResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **422**, Unprocessable request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -56,12 +59,21 @@ extension V1.GameCenterAchievementReleases { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 409: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 422: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterAchievements/ById/GameCenterAchievementsById.DELETE.54c2f1b.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterAchievements/ById/GameCenterAchievementsById.DELETE.54c2f1b.generated.swift index ec2245cc..fc6fd5b8 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterAchievements/ById/GameCenterAchievementsById.DELETE.54c2f1b.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterAchievements/ById/GameCenterAchievementsById.DELETE.54c2f1b.generated.swift @@ -31,11 +31,12 @@ extension V1.GameCenterAchievements.ById { return urlRequest } - /// - Returns: **204**, Success (no content) /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -43,12 +44,12 @@ extension V1.GameCenterAchievements.ById { } switch urlResponse.statusCode { - case 204: - return - case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) @@ -58,6 +59,9 @@ extension V1.GameCenterAchievements.ById { case 409: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterAchievements/ById/GameCenterAchievementsById.GET.54c2f1b.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterAchievements/ById/GameCenterAchievementsById.GET.54c2f1b.generated.swift index 5f52e145..577e830c 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterAchievements/ById/GameCenterAchievementsById.GET.54c2f1b.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterAchievements/ById/GameCenterAchievementsById.GET.54c2f1b.generated.swift @@ -52,8 +52,10 @@ extension V1.GameCenterAchievements.ById { /// - Returns: **200**, Single GameCenterAchievement as `GameCenterAchievementResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -67,12 +69,18 @@ extension V1.GameCenterAchievements.ById { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 404: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -97,111 +105,127 @@ extension V1.GameCenterAchievements.ById.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum GameCenterAchievementLocalizations: Hashable, Codable, RawRepresentable { - case afterEarnedDescription - case beforeEarnedDescription - case gameCenterAchievement - case gameCenterAchievementImage - case locale - case name - case unknown(String) - - public var rawValue: String { - switch self { - case .afterEarnedDescription: return "afterEarnedDescription" - case .beforeEarnedDescription: return "beforeEarnedDescription" - case .gameCenterAchievement: return "gameCenterAchievement" - case .gameCenterAchievementImage: return "gameCenterAchievementImage" - case .locale: return "locale" - case .name: return "name" - case .unknown(let rawValue): return rawValue - } + public struct GameCenterAchievementLocalizations: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var afterEarnedDescription: Self { + .init(rawValue: "afterEarnedDescription") } + public static var beforeEarnedDescription: Self { + .init(rawValue: "beforeEarnedDescription") + } + + public static var gameCenterAchievement: Self { + .init(rawValue: "gameCenterAchievement") + } + + public static var gameCenterAchievementImage: Self { + .init(rawValue: "gameCenterAchievementImage") + } + + public static var locale: Self { + .init(rawValue: "locale") + } + + public static var name: Self { + .init(rawValue: "name") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "afterEarnedDescription": self = .afterEarnedDescription - case "beforeEarnedDescription": self = .beforeEarnedDescription - case "gameCenterAchievement": self = .gameCenterAchievement - case "gameCenterAchievementImage": self = .gameCenterAchievementImage - case "locale": self = .locale - case "name": self = .name - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum GameCenterAchievementReleases: Hashable, Codable, RawRepresentable { - case gameCenterAchievement - case gameCenterDetail - case live - case unknown(String) + public struct GameCenterAchievementReleases: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var gameCenterAchievement: Self { + .init(rawValue: "gameCenterAchievement") + } + + public static var gameCenterDetail: Self { + .init(rawValue: "gameCenterDetail") + } + + public static var live: Self { + .init(rawValue: "live") + } - public var rawValue: String { - switch self { - case .gameCenterAchievement: return "gameCenterAchievement" - case .gameCenterDetail: return "gameCenterDetail" - case .live: return "live" - case .unknown(let rawValue): return rawValue - } + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "gameCenterAchievement": self = .gameCenterAchievement - case "gameCenterDetail": self = .gameCenterDetail - case "live": self = .live - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum GameCenterAchievements: Hashable, Codable, RawRepresentable { - case archived - case gameCenterDetail - case gameCenterGroup - case groupAchievement - case localizations - case points - case referenceName - case releases - case repeatable - case showBeforeEarned - case vendorIdentifier - case unknown(String) - - public var rawValue: String { - switch self { - case .archived: return "archived" - case .gameCenterDetail: return "gameCenterDetail" - case .gameCenterGroup: return "gameCenterGroup" - case .groupAchievement: return "groupAchievement" - case .localizations: return "localizations" - case .points: return "points" - case .referenceName: return "referenceName" - case .releases: return "releases" - case .repeatable: return "repeatable" - case .showBeforeEarned: return "showBeforeEarned" - case .vendorIdentifier: return "vendorIdentifier" - case .unknown(let rawValue): return rawValue - } + public struct GameCenterAchievements: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var activity: Self { + .init(rawValue: "activity") + } + + public static var activityProperties: Self { + .init(rawValue: "activityProperties") + } + + public static var archived: Self { + .init(rawValue: "archived") + } + + public static var gameCenterDetail: Self { + .init(rawValue: "gameCenterDetail") + } + + public static var gameCenterGroup: Self { + .init(rawValue: "gameCenterGroup") + } + + public static var groupAchievement: Self { + .init(rawValue: "groupAchievement") } + public static var localizations: Self { + .init(rawValue: "localizations") + } + + public static var points: Self { + .init(rawValue: "points") + } + + public static var referenceName: Self { + .init(rawValue: "referenceName") + } + + public static var releases: Self { + .init(rawValue: "releases") + } + + public static var repeatable: Self { + .init(rawValue: "repeatable") + } + + public static var showBeforeEarned: Self { + .init(rawValue: "showBeforeEarned") + } + + public static var vendorIdentifier: Self { + .init(rawValue: "vendorIdentifier") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "archived": self = .archived - case "gameCenterDetail": self = .gameCenterDetail - case "gameCenterGroup": self = .gameCenterGroup - case "groupAchievement": self = .groupAchievement - case "localizations": self = .localizations - case "points": self = .points - case "referenceName": self = .referenceName - case "releases": self = .releases - case "repeatable": self = .repeatable - case "showBeforeEarned": self = .showBeforeEarned - case "vendorIdentifier": self = .vendorIdentifier - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } @@ -229,34 +253,39 @@ extension V1.GameCenterAchievements.ById.GET { } } - public enum Include: Hashable, Codable, RawRepresentable { - case gameCenterDetail - case gameCenterGroup - case groupAchievement - case localizations - case releases - case unknown(String) - - public var rawValue: String { - switch self { - case .gameCenterDetail: return "gameCenterDetail" - case .gameCenterGroup: return "gameCenterGroup" - case .groupAchievement: return "groupAchievement" - case .localizations: return "localizations" - case .releases: return "releases" - case .unknown(let rawValue): return rawValue - } + public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var activity: Self { + .init(rawValue: "activity") + } + + public static var gameCenterDetail: Self { + .init(rawValue: "gameCenterDetail") + } + + public static var gameCenterGroup: Self { + .init(rawValue: "gameCenterGroup") + } + + public static var groupAchievement: Self { + .init(rawValue: "groupAchievement") } + public static var localizations: Self { + .init(rawValue: "localizations") + } + + public static var releases: Self { + .init(rawValue: "releases") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "gameCenterDetail": self = .gameCenterDetail - case "gameCenterGroup": self = .gameCenterGroup - case "groupAchievement": self = .groupAchievement - case "localizations": self = .localizations - case "releases": self = .releases - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterAchievements/ById/GameCenterAchievementsById.PATCH.54c2f1b.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterAchievements/ById/GameCenterAchievementsById.PATCH.54c2f1b.generated.swift index c6eefc2d..ff6ef4cc 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterAchievements/ById/GameCenterAchievementsById.PATCH.54c2f1b.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterAchievements/ById/GameCenterAchievementsById.PATCH.54c2f1b.generated.swift @@ -48,9 +48,12 @@ extension V1.GameCenterAchievements.ById { /// - Returns: **200**, Single GameCenterAchievement as `GameCenterAchievementResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **422**, Unprocessable request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -64,6 +67,9 @@ extension V1.GameCenterAchievements.ById { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) @@ -73,6 +79,12 @@ extension V1.GameCenterAchievements.ById { case 409: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 422: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterAchievements/ById/GroupAchievement/GameCenterAchievementsByIdGroupAchievement.GET.67c0921.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterAchievements/ById/GroupAchievement/GameCenterAchievementsByIdGroupAchievement.GET.67c0921.generated.swift index 0a320606..b2ba6f39 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterAchievements/ById/GroupAchievement/GameCenterAchievementsByIdGroupAchievement.GET.67c0921.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterAchievements/ById/GroupAchievement/GameCenterAchievementsByIdGroupAchievement.GET.67c0921.generated.swift @@ -7,6 +7,7 @@ import FoundationNetworking #endif extension V1.GameCenterAchievements.ById.GroupAchievement { + @available(*, deprecated) public struct GET: Endpoint { public typealias Response = GameCenterAchievementResponse @@ -34,6 +35,8 @@ extension V1.GameCenterAchievements.ById.GroupAchievement { value: parameters.fields[.gameCenterAchievementReleases]?.map { "\($0)" }.joined(separator: ",")), URLQueryItem(name: "fields[gameCenterAchievements]", value: parameters.fields[.gameCenterAchievements]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "fields[gameCenterActivities]", + value: parameters.fields[.gameCenterActivities]?.map { "\($0)" }.joined(separator: ",")), URLQueryItem(name: "fields[gameCenterDetails]", value: parameters.fields[.gameCenterDetails]?.map { "\($0)" }.joined(separator: ",")), URLQueryItem(name: "fields[gameCenterGroups]", @@ -56,8 +59,10 @@ extension V1.GameCenterAchievements.ById.GroupAchievement { /// - Returns: **200**, Single GameCenterAchievement as `GameCenterAchievementResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -71,12 +76,18 @@ extension V1.GameCenterAchievements.ById.GroupAchievement { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 404: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -101,197 +112,315 @@ extension V1.GameCenterAchievements.ById.GroupAchievement.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum GameCenterAchievementLocalizations: Hashable, Codable, RawRepresentable { - case afterEarnedDescription - case beforeEarnedDescription - case gameCenterAchievement - case gameCenterAchievementImage - case locale - case name - case unknown(String) - - public var rawValue: String { - switch self { - case .afterEarnedDescription: return "afterEarnedDescription" - case .beforeEarnedDescription: return "beforeEarnedDescription" - case .gameCenterAchievement: return "gameCenterAchievement" - case .gameCenterAchievementImage: return "gameCenterAchievementImage" - case .locale: return "locale" - case .name: return "name" - case .unknown(let rawValue): return rawValue - } + public struct GameCenterAchievementLocalizations: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var afterEarnedDescription: Self { + .init(rawValue: "afterEarnedDescription") + } + + public static var beforeEarnedDescription: Self { + .init(rawValue: "beforeEarnedDescription") + } + + public static var gameCenterAchievement: Self { + .init(rawValue: "gameCenterAchievement") + } + + public static var gameCenterAchievementImage: Self { + .init(rawValue: "gameCenterAchievementImage") + } + + public static var locale: Self { + .init(rawValue: "locale") + } + + public static var name: Self { + .init(rawValue: "name") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct GameCenterAchievementReleases: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var gameCenterAchievement: Self { + .init(rawValue: "gameCenterAchievement") + } + + public static var gameCenterDetail: Self { + .init(rawValue: "gameCenterDetail") + } + + public static var live: Self { + .init(rawValue: "live") + } + + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "afterEarnedDescription": self = .afterEarnedDescription - case "beforeEarnedDescription": self = .beforeEarnedDescription - case "gameCenterAchievement": self = .gameCenterAchievement - case "gameCenterAchievementImage": self = .gameCenterAchievementImage - case "locale": self = .locale - case "name": self = .name - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum GameCenterAchievementReleases: Hashable, Codable, RawRepresentable { - case gameCenterAchievement - case gameCenterDetail - case live - case unknown(String) + public struct GameCenterAchievements: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var activity: Self { + .init(rawValue: "activity") + } + + public static var activityProperties: Self { + .init(rawValue: "activityProperties") + } + + public static var archived: Self { + .init(rawValue: "archived") + } + + public static var gameCenterDetail: Self { + .init(rawValue: "gameCenterDetail") + } + + public static var gameCenterGroup: Self { + .init(rawValue: "gameCenterGroup") + } + + public static var groupAchievement: Self { + .init(rawValue: "groupAchievement") + } + + public static var localizations: Self { + .init(rawValue: "localizations") + } - public var rawValue: String { - switch self { - case .gameCenterAchievement: return "gameCenterAchievement" - case .gameCenterDetail: return "gameCenterDetail" - case .live: return "live" - case .unknown(let rawValue): return rawValue - } + public static var points: Self { + .init(rawValue: "points") } + public static var referenceName: Self { + .init(rawValue: "referenceName") + } + + public static var releases: Self { + .init(rawValue: "releases") + } + + public static var repeatable: Self { + .init(rawValue: "repeatable") + } + + public static var showBeforeEarned: Self { + .init(rawValue: "showBeforeEarned") + } + + public static var vendorIdentifier: Self { + .init(rawValue: "vendorIdentifier") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "gameCenterAchievement": self = .gameCenterAchievement - case "gameCenterDetail": self = .gameCenterDetail - case "live": self = .live - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum GameCenterAchievements: Hashable, Codable, RawRepresentable { - case archived - case gameCenterDetail - case gameCenterGroup - case groupAchievement - case localizations - case points - case referenceName - case releases - case repeatable - case showBeforeEarned - case vendorIdentifier - case unknown(String) - - public var rawValue: String { - switch self { - case .archived: return "archived" - case .gameCenterDetail: return "gameCenterDetail" - case .gameCenterGroup: return "gameCenterGroup" - case .groupAchievement: return "groupAchievement" - case .localizations: return "localizations" - case .points: return "points" - case .referenceName: return "referenceName" - case .releases: return "releases" - case .repeatable: return "repeatable" - case .showBeforeEarned: return "showBeforeEarned" - case .vendorIdentifier: return "vendorIdentifier" - case .unknown(let rawValue): return rawValue - } + public struct GameCenterActivities: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var achievements: Self { + .init(rawValue: "achievements") + } + + public static var archived: Self { + .init(rawValue: "archived") + } + + public static var gameCenterDetail: Self { + .init(rawValue: "gameCenterDetail") + } + + public static var gameCenterGroup: Self { + .init(rawValue: "gameCenterGroup") + } + + public static var leaderboards: Self { + .init(rawValue: "leaderboards") + } + + public static var maximumPlayersCount: Self { + .init(rawValue: "maximumPlayersCount") + } + + public static var minimumPlayersCount: Self { + .init(rawValue: "minimumPlayersCount") + } + + public static var playStyle: Self { + .init(rawValue: "playStyle") + } + + public static var properties: Self { + .init(rawValue: "properties") + } + + public static var referenceName: Self { + .init(rawValue: "referenceName") + } + + public static var supportsPartyCode: Self { + .init(rawValue: "supportsPartyCode") } + public static var vendorIdentifier: Self { + .init(rawValue: "vendorIdentifier") + } + + public static var versions: Self { + .init(rawValue: "versions") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "archived": self = .archived - case "gameCenterDetail": self = .gameCenterDetail - case "gameCenterGroup": self = .gameCenterGroup - case "groupAchievement": self = .groupAchievement - case "localizations": self = .localizations - case "points": self = .points - case "referenceName": self = .referenceName - case "releases": self = .releases - case "repeatable": self = .repeatable - case "showBeforeEarned": self = .showBeforeEarned - case "vendorIdentifier": self = .vendorIdentifier - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum GameCenterDetails: Hashable, Codable, RawRepresentable { - case achievementReleases - case app - case arcadeEnabled - case challengeEnabled - case defaultGroupLeaderboard - case defaultLeaderboard - case gameCenterAchievements - case gameCenterAppVersions - case gameCenterGroup - case gameCenterLeaderboardSets - case gameCenterLeaderboards - case leaderboardReleases - case leaderboardSetReleases - case unknown(String) - - public var rawValue: String { - switch self { - case .achievementReleases: return "achievementReleases" - case .app: return "app" - case .arcadeEnabled: return "arcadeEnabled" - case .challengeEnabled: return "challengeEnabled" - case .defaultGroupLeaderboard: return "defaultGroupLeaderboard" - case .defaultLeaderboard: return "defaultLeaderboard" - case .gameCenterAchievements: return "gameCenterAchievements" - case .gameCenterAppVersions: return "gameCenterAppVersions" - case .gameCenterGroup: return "gameCenterGroup" - case .gameCenterLeaderboardSets: return "gameCenterLeaderboardSets" - case .gameCenterLeaderboards: return "gameCenterLeaderboards" - case .leaderboardReleases: return "leaderboardReleases" - case .leaderboardSetReleases: return "leaderboardSetReleases" - case .unknown(let rawValue): return rawValue - } + public struct GameCenterDetails: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var achievementReleases: Self { + .init(rawValue: "achievementReleases") + } + + public static var activityReleases: Self { + .init(rawValue: "activityReleases") + } + + public static var app: Self { + .init(rawValue: "app") + } + + public static var arcadeEnabled: Self { + .init(rawValue: "arcadeEnabled") + } + + public static var challengeEnabled: Self { + .init(rawValue: "challengeEnabled") + } + + public static var challengeReleases: Self { + .init(rawValue: "challengeReleases") + } + + public static var challengesMinimumPlatformVersions: Self { + .init(rawValue: "challengesMinimumPlatformVersions") + } + + public static var defaultGroupLeaderboard: Self { + .init(rawValue: "defaultGroupLeaderboard") + } + + public static var defaultLeaderboard: Self { + .init(rawValue: "defaultLeaderboard") + } + + public static var gameCenterAchievements: Self { + .init(rawValue: "gameCenterAchievements") + } + + public static var gameCenterActivities: Self { + .init(rawValue: "gameCenterActivities") + } + + public static var gameCenterAppVersions: Self { + .init(rawValue: "gameCenterAppVersions") + } + + public static var gameCenterChallenges: Self { + .init(rawValue: "gameCenterChallenges") + } + + public static var gameCenterGroup: Self { + .init(rawValue: "gameCenterGroup") + } + + public static var gameCenterLeaderboardSets: Self { + .init(rawValue: "gameCenterLeaderboardSets") + } + + public static var gameCenterLeaderboards: Self { + .init(rawValue: "gameCenterLeaderboards") + } + + public static var leaderboardReleases: Self { + .init(rawValue: "leaderboardReleases") + } + + public static var leaderboardSetReleases: Self { + .init(rawValue: "leaderboardSetReleases") + } + + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "achievementReleases": self = .achievementReleases - case "app": self = .app - case "arcadeEnabled": self = .arcadeEnabled - case "challengeEnabled": self = .challengeEnabled - case "defaultGroupLeaderboard": self = .defaultGroupLeaderboard - case "defaultLeaderboard": self = .defaultLeaderboard - case "gameCenterAchievements": self = .gameCenterAchievements - case "gameCenterAppVersions": self = .gameCenterAppVersions - case "gameCenterGroup": self = .gameCenterGroup - case "gameCenterLeaderboardSets": self = .gameCenterLeaderboardSets - case "gameCenterLeaderboards": self = .gameCenterLeaderboards - case "leaderboardReleases": self = .leaderboardReleases - case "leaderboardSetReleases": self = .leaderboardSetReleases - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum GameCenterGroups: Hashable, Codable, RawRepresentable { - case gameCenterAchievements - case gameCenterDetails - case gameCenterLeaderboardSets - case gameCenterLeaderboards - case referenceName - case unknown(String) - - public var rawValue: String { - switch self { - case .gameCenterAchievements: return "gameCenterAchievements" - case .gameCenterDetails: return "gameCenterDetails" - case .gameCenterLeaderboardSets: return "gameCenterLeaderboardSets" - case .gameCenterLeaderboards: return "gameCenterLeaderboards" - case .referenceName: return "referenceName" - case .unknown(let rawValue): return rawValue - } + public struct GameCenterGroups: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var gameCenterAchievements: Self { + .init(rawValue: "gameCenterAchievements") + } + + public static var gameCenterActivities: Self { + .init(rawValue: "gameCenterActivities") + } + + public static var gameCenterChallenges: Self { + .init(rawValue: "gameCenterChallenges") + } + + public static var gameCenterDetails: Self { + .init(rawValue: "gameCenterDetails") + } + + public static var gameCenterLeaderboardSets: Self { + .init(rawValue: "gameCenterLeaderboardSets") + } + + public static var gameCenterLeaderboards: Self { + .init(rawValue: "gameCenterLeaderboards") + } + + public static var referenceName: Self { + .init(rawValue: "referenceName") + } + + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "gameCenterAchievements": self = .gameCenterAchievements - case "gameCenterDetails": self = .gameCenterDetails - case "gameCenterLeaderboardSets": self = .gameCenterLeaderboardSets - case "gameCenterLeaderboards": self = .gameCenterLeaderboards - case "referenceName": self = .referenceName - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } @@ -311,6 +440,11 @@ extension V1.GameCenterAchievements.ById.GroupAchievement.GET { .init(key: "fields[gameCenterAchievements]") } + /// the fields to include for returned resources of type gameCenterActivities + public static var gameCenterActivities: Relation<[GameCenterActivities]?> { + .init(key: "fields[gameCenterActivities]") + } + /// the fields to include for returned resources of type gameCenterDetails public static var gameCenterDetails: Relation<[GameCenterDetails]?> { .init(key: "fields[gameCenterDetails]") @@ -329,34 +463,39 @@ extension V1.GameCenterAchievements.ById.GroupAchievement.GET { } } - public enum Include: Hashable, Codable, RawRepresentable { - case gameCenterDetail - case gameCenterGroup - case groupAchievement - case localizations - case releases - case unknown(String) - - public var rawValue: String { - switch self { - case .gameCenterDetail: return "gameCenterDetail" - case .gameCenterGroup: return "gameCenterGroup" - case .groupAchievement: return "groupAchievement" - case .localizations: return "localizations" - case .releases: return "releases" - case .unknown(let rawValue): return rawValue - } + public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var activity: Self { + .init(rawValue: "activity") } + public static var gameCenterDetail: Self { + .init(rawValue: "gameCenterDetail") + } + + public static var gameCenterGroup: Self { + .init(rawValue: "gameCenterGroup") + } + + public static var groupAchievement: Self { + .init(rawValue: "groupAchievement") + } + + public static var localizations: Self { + .init(rawValue: "localizations") + } + + public static var releases: Self { + .init(rawValue: "releases") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "gameCenterDetail": self = .gameCenterDetail - case "gameCenterGroup": self = .gameCenterGroup - case "groupAchievement": self = .groupAchievement - case "localizations": self = .localizations - case "releases": self = .releases - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterAchievements/ById/Localizations/GameCenterAchievementsByIdLocalizations.GET.6c3f65c.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterAchievements/ById/Localizations/GameCenterAchievementsByIdLocalizations.GET.6c3f65c.generated.swift index a95f98e8..5fd63cc3 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterAchievements/ById/Localizations/GameCenterAchievementsByIdLocalizations.GET.6c3f65c.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterAchievements/ById/Localizations/GameCenterAchievementsByIdLocalizations.GET.6c3f65c.generated.swift @@ -50,8 +50,10 @@ extension V1.GameCenterAchievements.ById.Localizations { /// - Returns: **200**, List of GameCenterAchievementLocalizations as `GameCenterAchievementLocalizationsResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -65,12 +67,18 @@ extension V1.GameCenterAchievements.ById.Localizations { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 404: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -96,123 +104,139 @@ extension V1.GameCenterAchievements.ById.Localizations.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum GameCenterAchievementImages: Hashable, Codable, RawRepresentable { - case assetDeliveryState - case fileName - case fileSize - case gameCenterAchievementLocalization - case imageAsset - case uploadOperations - case uploaded - case unknown(String) - - public var rawValue: String { - switch self { - case .assetDeliveryState: return "assetDeliveryState" - case .fileName: return "fileName" - case .fileSize: return "fileSize" - case .gameCenterAchievementLocalization: return "gameCenterAchievementLocalization" - case .imageAsset: return "imageAsset" - case .uploadOperations: return "uploadOperations" - case .uploaded: return "uploaded" - case .unknown(let rawValue): return rawValue - } + public struct GameCenterAchievementImages: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var assetDeliveryState: Self { + .init(rawValue: "assetDeliveryState") + } + + public static var fileName: Self { + .init(rawValue: "fileName") + } + + public static var fileSize: Self { + .init(rawValue: "fileSize") + } + + public static var gameCenterAchievementLocalization: Self { + .init(rawValue: "gameCenterAchievementLocalization") + } + + public static var imageAsset: Self { + .init(rawValue: "imageAsset") + } + + public static var uploadOperations: Self { + .init(rawValue: "uploadOperations") + } + + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "assetDeliveryState": self = .assetDeliveryState - case "fileName": self = .fileName - case "fileSize": self = .fileSize - case "gameCenterAchievementLocalization": self = .gameCenterAchievementLocalization - case "imageAsset": self = .imageAsset - case "uploadOperations": self = .uploadOperations - case "uploaded": self = .uploaded - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum GameCenterAchievementLocalizations: Hashable, Codable, RawRepresentable { - case afterEarnedDescription - case beforeEarnedDescription - case gameCenterAchievement - case gameCenterAchievementImage - case locale - case name - case unknown(String) - - public var rawValue: String { - switch self { - case .afterEarnedDescription: return "afterEarnedDescription" - case .beforeEarnedDescription: return "beforeEarnedDescription" - case .gameCenterAchievement: return "gameCenterAchievement" - case .gameCenterAchievementImage: return "gameCenterAchievementImage" - case .locale: return "locale" - case .name: return "name" - case .unknown(let rawValue): return rawValue - } + public struct GameCenterAchievementLocalizations: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var afterEarnedDescription: Self { + .init(rawValue: "afterEarnedDescription") + } + + public static var beforeEarnedDescription: Self { + .init(rawValue: "beforeEarnedDescription") + } + + public static var gameCenterAchievement: Self { + .init(rawValue: "gameCenterAchievement") + } + + public static var gameCenterAchievementImage: Self { + .init(rawValue: "gameCenterAchievementImage") + } + + public static var locale: Self { + .init(rawValue: "locale") + } + + public static var name: Self { + .init(rawValue: "name") + } + + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "afterEarnedDescription": self = .afterEarnedDescription - case "beforeEarnedDescription": self = .beforeEarnedDescription - case "gameCenterAchievement": self = .gameCenterAchievement - case "gameCenterAchievementImage": self = .gameCenterAchievementImage - case "locale": self = .locale - case "name": self = .name - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum GameCenterAchievements: Hashable, Codable, RawRepresentable { - case archived - case gameCenterDetail - case gameCenterGroup - case groupAchievement - case localizations - case points - case referenceName - case releases - case repeatable - case showBeforeEarned - case vendorIdentifier - case unknown(String) - - public var rawValue: String { - switch self { - case .archived: return "archived" - case .gameCenterDetail: return "gameCenterDetail" - case .gameCenterGroup: return "gameCenterGroup" - case .groupAchievement: return "groupAchievement" - case .localizations: return "localizations" - case .points: return "points" - case .referenceName: return "referenceName" - case .releases: return "releases" - case .repeatable: return "repeatable" - case .showBeforeEarned: return "showBeforeEarned" - case .vendorIdentifier: return "vendorIdentifier" - case .unknown(let rawValue): return rawValue - } + public struct GameCenterAchievements: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var activity: Self { + .init(rawValue: "activity") + } + + public static var activityProperties: Self { + .init(rawValue: "activityProperties") } + public static var archived: Self { + .init(rawValue: "archived") + } + + public static var gameCenterDetail: Self { + .init(rawValue: "gameCenterDetail") + } + + public static var gameCenterGroup: Self { + .init(rawValue: "gameCenterGroup") + } + + public static var groupAchievement: Self { + .init(rawValue: "groupAchievement") + } + + public static var localizations: Self { + .init(rawValue: "localizations") + } + + public static var points: Self { + .init(rawValue: "points") + } + + public static var referenceName: Self { + .init(rawValue: "referenceName") + } + + public static var releases: Self { + .init(rawValue: "releases") + } + + public static var repeatable: Self { + .init(rawValue: "repeatable") + } + + public static var showBeforeEarned: Self { + .init(rawValue: "showBeforeEarned") + } + + public static var vendorIdentifier: Self { + .init(rawValue: "vendorIdentifier") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "archived": self = .archived - case "gameCenterDetail": self = .gameCenterDetail - case "gameCenterGroup": self = .gameCenterGroup - case "groupAchievement": self = .groupAchievement - case "localizations": self = .localizations - case "points": self = .points - case "referenceName": self = .referenceName - case "releases": self = .releases - case "repeatable": self = .repeatable - case "showBeforeEarned": self = .showBeforeEarned - case "vendorIdentifier": self = .vendorIdentifier - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } @@ -240,25 +264,23 @@ extension V1.GameCenterAchievements.ById.Localizations.GET { } } - public enum Include: Hashable, Codable, RawRepresentable { - case gameCenterAchievement - case gameCenterAchievementImage - case unknown(String) + public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var gameCenterAchievement: Self { + .init(rawValue: "gameCenterAchievement") + } - public var rawValue: String { - switch self { - case .gameCenterAchievement: return "gameCenterAchievement" - case .gameCenterAchievementImage: return "gameCenterAchievementImage" - case .unknown(let rawValue): return rawValue - } + public static var gameCenterAchievementImage: Self { + .init(rawValue: "gameCenterAchievementImage") } + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "gameCenterAchievement": self = .gameCenterAchievement - case "gameCenterAchievementImage": self = .gameCenterAchievementImage - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/PromotedPurchaseImages/ById/PromotedPurchaseImagesById.PATCH.307096c.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterAchievements/ById/Relationships/Activity/GameCenterAchievementsByIdRelationshipsActivity.PATCH.767fb4e.generated.swift similarity index 74% rename from Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/PromotedPurchaseImages/ById/PromotedPurchaseImagesById.PATCH.307096c.generated.swift rename to Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterAchievements/ById/Relationships/Activity/GameCenterAchievementsByIdRelationshipsActivity.PATCH.767fb4e.generated.swift index aaf72e6f..3a5d7b41 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/PromotedPurchaseImages/ById/PromotedPurchaseImagesById.PATCH.307096c.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterAchievements/ById/Relationships/Activity/GameCenterAchievementsByIdRelationshipsActivity.PATCH.767fb4e.generated.swift @@ -6,19 +6,19 @@ import Foundation import FoundationNetworking #endif -extension V1.PromotedPurchaseImages.ById { +extension V1.GameCenterAchievements.ById.Relationships.Activity { public struct PATCH: Endpoint { - public typealias Parameters = PromotedPurchaseImageUpdateRequest - public typealias Response = PromotedPurchaseImageResponse + public typealias Parameters = GameCenterAchievementActivityLinkageRequest + public typealias Response = Void public var path: String { - "/v1/promotedPurchaseImages/\(id)" + "/v1/gameCenterAchievements/\(id)/relationships/activity" } /// the id of the requested resource public var id: String - /// PromotedPurchaseImage representation + /// Related linkage public var parameters: Parameters public init( @@ -46,11 +46,12 @@ extension V1.PromotedPurchaseImages.ById { return urlRequest } - /// - Returns: **200**, Single PromotedPurchaseImage as `PromotedPurchaseImageResponse` - /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **422**, Unprocessable request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -58,10 +59,7 @@ extension V1.PromotedPurchaseImages.ById { } switch urlResponse.statusCode { - case 200: - return try jsonDecoder.decode(PromotedPurchaseImageResponse.self, from: data) - - case 400: + case 401: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 403: @@ -73,6 +71,12 @@ extension V1.PromotedPurchaseImages.ById { case 409: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 422: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterAchievements/ById/Relationships/GroupAchievement/GameCenterAchievementsByIdRelationshipsGroupAchievement.GET.7028b57.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterAchievements/ById/Relationships/GroupAchievement/GameCenterAchievementsByIdRelationshipsGroupAchievement.GET.7028b57.generated.swift index f200b404..e65d7f1b 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterAchievements/ById/Relationships/GroupAchievement/GameCenterAchievementsByIdRelationshipsGroupAchievement.GET.7028b57.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterAchievements/ById/Relationships/GroupAchievement/GameCenterAchievementsByIdRelationshipsGroupAchievement.GET.7028b57.generated.swift @@ -7,6 +7,7 @@ import FoundationNetworking #endif extension V1.GameCenterAchievements.ById.Relationships.GroupAchievement { + @available(*, deprecated) public struct GET: Endpoint { public typealias Response = GameCenterAchievementGroupAchievementLinkageResponse @@ -41,8 +42,10 @@ extension V1.GameCenterAchievements.ById.Relationships.GroupAchievement { /// - Returns: **200**, Related linkage as `GameCenterAchievementGroupAchievementLinkageResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -56,12 +59,18 @@ extension V1.GameCenterAchievements.ById.Relationships.GroupAchievement { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 404: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterAchievements/ById/Relationships/GroupAchievement/GameCenterAchievementsByIdRelationshipsGroupAchievement.PATCH.7028b57.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterAchievements/ById/Relationships/GroupAchievement/GameCenterAchievementsByIdRelationshipsGroupAchievement.PATCH.7028b57.generated.swift index 6f30db9d..c632e81e 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterAchievements/ById/Relationships/GroupAchievement/GameCenterAchievementsByIdRelationshipsGroupAchievement.PATCH.7028b57.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterAchievements/ById/Relationships/GroupAchievement/GameCenterAchievementsByIdRelationshipsGroupAchievement.PATCH.7028b57.generated.swift @@ -7,6 +7,7 @@ import FoundationNetworking #endif extension V1.GameCenterAchievements.ById.Relationships.GroupAchievement { + @available(*, deprecated) public struct PATCH: Endpoint { public typealias Parameters = GameCenterAchievementGroupAchievementLinkageRequest public typealias Response = Void @@ -46,10 +47,12 @@ extension V1.GameCenterAchievements.ById.Relationships.GroupAchievement { return urlRequest } - /// - Returns: **204**, Success (no content) + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **422**, Unprocessable request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -57,8 +60,8 @@ extension V1.GameCenterAchievements.ById.Relationships.GroupAchievement { } switch urlResponse.statusCode { - case 204: - return + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) @@ -69,6 +72,12 @@ extension V1.GameCenterAchievements.ById.Relationships.GroupAchievement { case 409: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 422: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterAchievements/ById/Relationships/Localizations/GameCenterAchievementsByIdRelationshipsLocalizations.GET.3f46a50.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterAchievements/ById/Relationships/Localizations/GameCenterAchievementsByIdRelationshipsLocalizations.GET.3f46a50.generated.swift new file mode 100644 index 00000000..d868ae5d --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterAchievements/ById/Relationships/Localizations/GameCenterAchievementsByIdRelationshipsLocalizations.GET.3f46a50.generated.swift @@ -0,0 +1,88 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.GameCenterAchievements.ById.Relationships.Localizations { + public struct GET: Endpoint { + public typealias Response = GameCenterAchievementLocalizationsLinkagesResponse + + public var path: String { + "/v1/gameCenterAchievements/\(id)/relationships/localizations" + } + + /// the id of the requested resource + public var id: String + + public var parameters: Parameters = Parameters() + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + components?.queryItems = [ + URLQueryItem(name: "limit", + value: parameters.limit.map { "\($0)" }) + ].filter { $0.value != nil } + if components?.queryItems?.isEmpty ?? false { + components?.queryItems = nil + } + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "GET" + return urlRequest + } + + /// - Returns: **200**, List of related linkages as `GameCenterAchievementLocalizationsLinkagesResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(GameCenterAchievementLocalizationsLinkagesResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +extension V1.GameCenterAchievements.ById.Relationships.Localizations.GET { + public struct Parameters: Hashable { + /// maximum resources per page + public var limit: Int? + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterAchievements/ById/Relationships/Releases/GameCenterAchievementsByIdRelationshipsReleases.GET.678b35f.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterAchievements/ById/Relationships/Releases/GameCenterAchievementsByIdRelationshipsReleases.GET.678b35f.generated.swift new file mode 100644 index 00000000..eeb8ba7b --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterAchievements/ById/Relationships/Releases/GameCenterAchievementsByIdRelationshipsReleases.GET.678b35f.generated.swift @@ -0,0 +1,88 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.GameCenterAchievements.ById.Relationships.Releases { + public struct GET: Endpoint { + public typealias Response = GameCenterAchievementReleasesLinkagesResponse + + public var path: String { + "/v1/gameCenterAchievements/\(id)/relationships/releases" + } + + /// the id of the requested resource + public var id: String + + public var parameters: Parameters = Parameters() + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + components?.queryItems = [ + URLQueryItem(name: "limit", + value: parameters.limit.map { "\($0)" }) + ].filter { $0.value != nil } + if components?.queryItems?.isEmpty ?? false { + components?.queryItems = nil + } + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "GET" + return urlRequest + } + + /// - Returns: **200**, List of related linkages as `GameCenterAchievementReleasesLinkagesResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(GameCenterAchievementReleasesLinkagesResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +extension V1.GameCenterAchievements.ById.Relationships.Releases.GET { + public struct Parameters: Hashable { + /// maximum resources per page + public var limit: Int? + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterAchievements/ById/Releases/GameCenterAchievementsByIdReleases.GET.2c93767.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterAchievements/ById/Releases/GameCenterAchievementsByIdReleases.GET.2c93767.generated.swift index d9e81fcc..34ec6e29 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterAchievements/ById/Releases/GameCenterAchievementsByIdReleases.GET.2c93767.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterAchievements/ById/Releases/GameCenterAchievementsByIdReleases.GET.2c93767.generated.swift @@ -54,8 +54,10 @@ extension V1.GameCenterAchievements.ById.Releases { /// - Returns: **200**, List of GameCenterAchievementReleases as `GameCenterAchievementReleasesResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -69,12 +71,18 @@ extension V1.GameCenterAchievements.ById.Releases { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 404: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -102,132 +110,175 @@ extension V1.GameCenterAchievements.ById.Releases.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum GameCenterAchievementReleases: Hashable, Codable, RawRepresentable { - case gameCenterAchievement - case gameCenterDetail - case live - case unknown(String) + public struct GameCenterAchievementReleases: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var gameCenterAchievement: Self { + .init(rawValue: "gameCenterAchievement") + } + + public static var gameCenterDetail: Self { + .init(rawValue: "gameCenterDetail") + } - public var rawValue: String { - switch self { - case .gameCenterAchievement: return "gameCenterAchievement" - case .gameCenterDetail: return "gameCenterDetail" - case .live: return "live" - case .unknown(let rawValue): return rawValue - } + public static var live: Self { + .init(rawValue: "live") } + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "gameCenterAchievement": self = .gameCenterAchievement - case "gameCenterDetail": self = .gameCenterDetail - case "live": self = .live - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum GameCenterAchievements: Hashable, Codable, RawRepresentable { - case archived - case gameCenterDetail - case gameCenterGroup - case groupAchievement - case localizations - case points - case referenceName - case releases - case repeatable - case showBeforeEarned - case vendorIdentifier - case unknown(String) - - public var rawValue: String { - switch self { - case .archived: return "archived" - case .gameCenterDetail: return "gameCenterDetail" - case .gameCenterGroup: return "gameCenterGroup" - case .groupAchievement: return "groupAchievement" - case .localizations: return "localizations" - case .points: return "points" - case .referenceName: return "referenceName" - case .releases: return "releases" - case .repeatable: return "repeatable" - case .showBeforeEarned: return "showBeforeEarned" - case .vendorIdentifier: return "vendorIdentifier" - case .unknown(let rawValue): return rawValue - } + public struct GameCenterAchievements: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var activity: Self { + .init(rawValue: "activity") + } + + public static var activityProperties: Self { + .init(rawValue: "activityProperties") + } + + public static var archived: Self { + .init(rawValue: "archived") + } + + public static var gameCenterDetail: Self { + .init(rawValue: "gameCenterDetail") + } + + public static var gameCenterGroup: Self { + .init(rawValue: "gameCenterGroup") + } + + public static var groupAchievement: Self { + .init(rawValue: "groupAchievement") } + public static var localizations: Self { + .init(rawValue: "localizations") + } + + public static var points: Self { + .init(rawValue: "points") + } + + public static var referenceName: Self { + .init(rawValue: "referenceName") + } + + public static var releases: Self { + .init(rawValue: "releases") + } + + public static var repeatable: Self { + .init(rawValue: "repeatable") + } + + public static var showBeforeEarned: Self { + .init(rawValue: "showBeforeEarned") + } + + public static var vendorIdentifier: Self { + .init(rawValue: "vendorIdentifier") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "archived": self = .archived - case "gameCenterDetail": self = .gameCenterDetail - case "gameCenterGroup": self = .gameCenterGroup - case "groupAchievement": self = .groupAchievement - case "localizations": self = .localizations - case "points": self = .points - case "referenceName": self = .referenceName - case "releases": self = .releases - case "repeatable": self = .repeatable - case "showBeforeEarned": self = .showBeforeEarned - case "vendorIdentifier": self = .vendorIdentifier - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum GameCenterDetails: Hashable, Codable, RawRepresentable { - case achievementReleases - case app - case arcadeEnabled - case challengeEnabled - case defaultGroupLeaderboard - case defaultLeaderboard - case gameCenterAchievements - case gameCenterAppVersions - case gameCenterGroup - case gameCenterLeaderboardSets - case gameCenterLeaderboards - case leaderboardReleases - case leaderboardSetReleases - case unknown(String) - - public var rawValue: String { - switch self { - case .achievementReleases: return "achievementReleases" - case .app: return "app" - case .arcadeEnabled: return "arcadeEnabled" - case .challengeEnabled: return "challengeEnabled" - case .defaultGroupLeaderboard: return "defaultGroupLeaderboard" - case .defaultLeaderboard: return "defaultLeaderboard" - case .gameCenterAchievements: return "gameCenterAchievements" - case .gameCenterAppVersions: return "gameCenterAppVersions" - case .gameCenterGroup: return "gameCenterGroup" - case .gameCenterLeaderboardSets: return "gameCenterLeaderboardSets" - case .gameCenterLeaderboards: return "gameCenterLeaderboards" - case .leaderboardReleases: return "leaderboardReleases" - case .leaderboardSetReleases: return "leaderboardSetReleases" - case .unknown(let rawValue): return rawValue - } + public struct GameCenterDetails: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var achievementReleases: Self { + .init(rawValue: "achievementReleases") + } + + public static var activityReleases: Self { + .init(rawValue: "activityReleases") + } + + public static var app: Self { + .init(rawValue: "app") + } + + public static var arcadeEnabled: Self { + .init(rawValue: "arcadeEnabled") + } + + public static var challengeEnabled: Self { + .init(rawValue: "challengeEnabled") + } + + public static var challengeReleases: Self { + .init(rawValue: "challengeReleases") + } + + public static var challengesMinimumPlatformVersions: Self { + .init(rawValue: "challengesMinimumPlatformVersions") + } + + public static var defaultGroupLeaderboard: Self { + .init(rawValue: "defaultGroupLeaderboard") + } + + public static var defaultLeaderboard: Self { + .init(rawValue: "defaultLeaderboard") + } + + public static var gameCenterAchievements: Self { + .init(rawValue: "gameCenterAchievements") + } + + public static var gameCenterActivities: Self { + .init(rawValue: "gameCenterActivities") + } + + public static var gameCenterAppVersions: Self { + .init(rawValue: "gameCenterAppVersions") + } + + public static var gameCenterChallenges: Self { + .init(rawValue: "gameCenterChallenges") + } + + public static var gameCenterGroup: Self { + .init(rawValue: "gameCenterGroup") + } + + public static var gameCenterLeaderboardSets: Self { + .init(rawValue: "gameCenterLeaderboardSets") + } + + public static var gameCenterLeaderboards: Self { + .init(rawValue: "gameCenterLeaderboards") + } + + public static var leaderboardReleases: Self { + .init(rawValue: "leaderboardReleases") + } + + public static var leaderboardSetReleases: Self { + .init(rawValue: "leaderboardSetReleases") + } + + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "achievementReleases": self = .achievementReleases - case "app": self = .app - case "arcadeEnabled": self = .arcadeEnabled - case "challengeEnabled": self = .challengeEnabled - case "defaultGroupLeaderboard": self = .defaultGroupLeaderboard - case "defaultLeaderboard": self = .defaultLeaderboard - case "gameCenterAchievements": self = .gameCenterAchievements - case "gameCenterAppVersions": self = .gameCenterAppVersions - case "gameCenterGroup": self = .gameCenterGroup - case "gameCenterLeaderboardSets": self = .gameCenterLeaderboardSets - case "gameCenterLeaderboards": self = .gameCenterLeaderboards - case "leaderboardReleases": self = .leaderboardReleases - case "leaderboardSetReleases": self = .leaderboardSetReleases - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } @@ -282,25 +333,23 @@ extension V1.GameCenterAchievements.ById.Releases.GET { } } - public enum Include: Hashable, Codable, RawRepresentable { - case gameCenterAchievement - case gameCenterDetail - case unknown(String) + public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var gameCenterAchievement: Self { + .init(rawValue: "gameCenterAchievement") + } + + public static var gameCenterDetail: Self { + .init(rawValue: "gameCenterDetail") + } - public var rawValue: String { - switch self { - case .gameCenterAchievement: return "gameCenterAchievement" - case .gameCenterDetail: return "gameCenterDetail" - case .unknown(let rawValue): return rawValue - } + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "gameCenterAchievement": self = .gameCenterAchievement - case "gameCenterDetail": self = .gameCenterDetail - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterAchievements/GameCenterAchievements.POST.519abd7.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterAchievements/GameCenterAchievements.POST.519abd7.generated.swift index 708903fc..a272a64f 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterAchievements/GameCenterAchievements.POST.519abd7.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterAchievements/GameCenterAchievements.POST.519abd7.generated.swift @@ -41,8 +41,11 @@ extension V1.GameCenterAchievements { /// - Returns: **201**, Single GameCenterAchievement as `GameCenterAchievementResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **422**, Unprocessable request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -56,12 +59,21 @@ extension V1.GameCenterAchievements { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 409: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 422: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterActivities/ById/GameCenterActivitiesById.DELETE.2aa06fe.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterActivities/ById/GameCenterActivitiesById.DELETE.2aa06fe.generated.swift new file mode 100644 index 00000000..161c0b22 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterActivities/ById/GameCenterActivitiesById.DELETE.2aa06fe.generated.swift @@ -0,0 +1,72 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.GameCenterActivities.ById { + public struct DELETE: Endpoint { + public typealias Parameters = Never + public typealias Response = Void + + public var path: String { + "/v1/gameCenterActivities/\(id)" + } + + /// the id of the requested resource + public var id: String + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "DELETE" + return urlRequest + } + + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 409: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterActivities/ById/GameCenterActivitiesById.GET.2aa06fe.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterActivities/ById/GameCenterActivitiesById.GET.2aa06fe.generated.swift new file mode 100644 index 00000000..b510672c --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterActivities/ById/GameCenterActivitiesById.GET.2aa06fe.generated.swift @@ -0,0 +1,297 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.GameCenterActivities.ById { + public struct GET: Endpoint { + public typealias Response = GameCenterActivityResponse + + public var path: String { + "/v1/gameCenterActivities/\(id)" + } + + /// the id of the requested resource + public var id: String + + public var parameters: Parameters = Parameters() + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + components?.queryItems = [ + URLQueryItem(name: "fields[gameCenterActivities]", + value: parameters.fields[.gameCenterActivities]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "fields[gameCenterActivityVersions]", + value: parameters.fields[.gameCenterActivityVersions]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "include", + value: parameters.include?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "limit[achievements]", + value: parameters.limit[.achievements].map { "\($0)" }), + URLQueryItem(name: "limit[leaderboards]", + value: parameters.limit[.leaderboards].map { "\($0)" }), + URLQueryItem(name: "limit[versions]", + value: parameters.limit[.versions].map { "\($0)" }) + ].filter { $0.value != nil } + if components?.queryItems?.isEmpty ?? false { + components?.queryItems = nil + } + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "GET" + return urlRequest + } + + /// - Returns: **200**, Single GameCenterActivity as `GameCenterActivityResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(GameCenterActivityResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +extension V1.GameCenterActivities.ById.GET { + public struct Parameters: Hashable { + public var fields: Fields = Fields() + + /// comma-separated list of relationships to include + public var include: [Include]? + + public var limit: Limit = Limit() + + public struct Fields: Hashable { + public subscript (_ relation: Relation) -> T { + get { values[relation]?.base as! T } + set { values[relation] = AnyHashable(newValue) } + } + + private var values: [AnyHashable: AnyHashable] = [:] + + public struct GameCenterActivities: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var achievements: Self { + .init(rawValue: "achievements") + } + + public static var archived: Self { + .init(rawValue: "archived") + } + + public static var gameCenterDetail: Self { + .init(rawValue: "gameCenterDetail") + } + + public static var gameCenterGroup: Self { + .init(rawValue: "gameCenterGroup") + } + + public static var leaderboards: Self { + .init(rawValue: "leaderboards") + } + + public static var maximumPlayersCount: Self { + .init(rawValue: "maximumPlayersCount") + } + + public static var minimumPlayersCount: Self { + .init(rawValue: "minimumPlayersCount") + } + + public static var playStyle: Self { + .init(rawValue: "playStyle") + } + + public static var properties: Self { + .init(rawValue: "properties") + } + + public static var referenceName: Self { + .init(rawValue: "referenceName") + } + + public static var supportsPartyCode: Self { + .init(rawValue: "supportsPartyCode") + } + + public static var vendorIdentifier: Self { + .init(rawValue: "vendorIdentifier") + } + + public static var versions: Self { + .init(rawValue: "versions") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct GameCenterActivityVersions: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var activity: Self { + .init(rawValue: "activity") + } + + public static var defaultImage: Self { + .init(rawValue: "defaultImage") + } + + public static var fallbackUrl: Self { + .init(rawValue: "fallbackUrl") + } + + public static var localizations: Self { + .init(rawValue: "localizations") + } + + public static var releases: Self { + .init(rawValue: "releases") + } + + public static var state: Self { + .init(rawValue: "state") + } + + public static var version: Self { + .init(rawValue: "version") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct Relation: Hashable { + /// the fields to include for returned resources of type gameCenterActivities + public static var gameCenterActivities: Relation<[GameCenterActivities]?> { + .init(key: "fields[gameCenterActivities]") + } + + /// the fields to include for returned resources of type gameCenterActivityVersions + public static var gameCenterActivityVersions: Relation<[GameCenterActivityVersions]?> { + .init(key: "fields[gameCenterActivityVersions]") + } + + internal let key: String + + public func hash(into hasher: inout Hasher) { + hasher.combine(key) + } + } + } + + public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var achievements: Self { + .init(rawValue: "achievements") + } + + public static var gameCenterDetail: Self { + .init(rawValue: "gameCenterDetail") + } + + public static var gameCenterGroup: Self { + .init(rawValue: "gameCenterGroup") + } + + public static var leaderboards: Self { + .init(rawValue: "leaderboards") + } + + public static var versions: Self { + .init(rawValue: "versions") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct Limit: Hashable { + public subscript (_ relation: Relation) -> T { + get { values[relation]?.base as! T } + set { values[relation] = AnyHashable(newValue) } + } + + private var values: [AnyHashable: AnyHashable] = [:] + + public struct Relation: Hashable { + /// maximum number of related achievements returned (when they are included) + public static var achievements: Relation { + .init(key: "limit[achievements]") + } + + /// maximum number of related leaderboards returned (when they are included) + public static var leaderboards: Relation { + .init(key: "limit[leaderboards]") + } + + /// maximum number of related versions returned (when they are included) + public static var versions: Relation { + .init(key: "limit[versions]") + } + + internal let key: String + + public func hash(into hasher: inout Hasher) { + hasher.combine(key) + } + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterActivities/ById/GameCenterActivitiesById.PATCH.2aa06fe.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterActivities/ById/GameCenterActivitiesById.PATCH.2aa06fe.generated.swift new file mode 100644 index 00000000..ee6e8e23 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterActivities/ById/GameCenterActivitiesById.PATCH.2aa06fe.generated.swift @@ -0,0 +1,95 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.GameCenterActivities.ById { + public struct PATCH: Endpoint { + public typealias Parameters = GameCenterActivityUpdateRequest + public typealias Response = GameCenterActivityResponse + + public var path: String { + "/v1/gameCenterActivities/\(id)" + } + + /// the id of the requested resource + public var id: String + + /// GameCenterActivity representation + public var parameters: Parameters + + public init( + id: String, + parameters: Parameters + ) { + self.id = id + self.parameters = parameters + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "PATCH" + + var jsonEncoder: JSONEncoder { + let encoder = JSONEncoder() + return encoder + } + + urlRequest?.httpBody = try jsonEncoder.encode(parameters) + urlRequest?.setValue("application/json", forHTTPHeaderField: "Content-Type") + return urlRequest + } + + /// - Returns: **200**, Single GameCenterActivity as `GameCenterActivityResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **422**, Unprocessable request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(GameCenterActivityResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 409: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 422: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterActivities/ById/Relationships/Achievements/GameCenterActivitiesByIdRelationshipsAchievements.DELETE.b6340bc.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterActivities/ById/Relationships/Achievements/GameCenterActivitiesByIdRelationshipsAchievements.DELETE.b6340bc.generated.swift new file mode 100644 index 00000000..1eea7d5c --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterActivities/ById/Relationships/Achievements/GameCenterActivitiesByIdRelationshipsAchievements.DELETE.b6340bc.generated.swift @@ -0,0 +1,72 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.GameCenterActivities.ById.Relationships.Achievements { + public struct DELETE: Endpoint { + public typealias Parameters = Never + public typealias Response = Void + + public var path: String { + "/v1/gameCenterActivities/\(id)/relationships/achievements" + } + + /// the id of the requested resource + public var id: String + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "DELETE" + return urlRequest + } + + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **422**, Unprocessable request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 409: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 422: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterActivities/ById/Relationships/Achievements/GameCenterActivitiesByIdRelationshipsAchievements.POST.b6340bc.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterActivities/ById/Relationships/Achievements/GameCenterActivitiesByIdRelationshipsAchievements.POST.b6340bc.generated.swift new file mode 100644 index 00000000..8fcc5ae2 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterActivities/ById/Relationships/Achievements/GameCenterActivitiesByIdRelationshipsAchievements.POST.b6340bc.generated.swift @@ -0,0 +1,87 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.GameCenterActivities.ById.Relationships.Achievements { + public struct POST: Endpoint { + public typealias Parameters = GameCenterActivityAchievementsLinkagesRequest + public typealias Response = Void + + public var path: String { + "/v1/gameCenterActivities/\(id)/relationships/achievements" + } + + /// the id of the requested resource + public var id: String + + /// List of related linkages + public var parameters: Parameters + + public init( + id: String, + parameters: Parameters + ) { + self.id = id + self.parameters = parameters + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "POST" + + var jsonEncoder: JSONEncoder { + let encoder = JSONEncoder() + return encoder + } + + urlRequest?.httpBody = try jsonEncoder.encode(parameters) + urlRequest?.setValue("application/json", forHTTPHeaderField: "Content-Type") + return urlRequest + } + + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **422**, Unprocessable request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 409: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 422: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterActivities/ById/Relationships/Leaderboards/GameCenterActivitiesByIdRelationshipsLeaderboards.DELETE.e0742e0.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterActivities/ById/Relationships/Leaderboards/GameCenterActivitiesByIdRelationshipsLeaderboards.DELETE.e0742e0.generated.swift new file mode 100644 index 00000000..3417eb67 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterActivities/ById/Relationships/Leaderboards/GameCenterActivitiesByIdRelationshipsLeaderboards.DELETE.e0742e0.generated.swift @@ -0,0 +1,72 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.GameCenterActivities.ById.Relationships.Leaderboards { + public struct DELETE: Endpoint { + public typealias Parameters = Never + public typealias Response = Void + + public var path: String { + "/v1/gameCenterActivities/\(id)/relationships/leaderboards" + } + + /// the id of the requested resource + public var id: String + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "DELETE" + return urlRequest + } + + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **422**, Unprocessable request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 409: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 422: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterActivities/ById/Relationships/Leaderboards/GameCenterActivitiesByIdRelationshipsLeaderboards.POST.e0742e0.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterActivities/ById/Relationships/Leaderboards/GameCenterActivitiesByIdRelationshipsLeaderboards.POST.e0742e0.generated.swift new file mode 100644 index 00000000..b2e91ee1 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterActivities/ById/Relationships/Leaderboards/GameCenterActivitiesByIdRelationshipsLeaderboards.POST.e0742e0.generated.swift @@ -0,0 +1,87 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.GameCenterActivities.ById.Relationships.Leaderboards { + public struct POST: Endpoint { + public typealias Parameters = GameCenterActivityLeaderboardsLinkagesRequest + public typealias Response = Void + + public var path: String { + "/v1/gameCenterActivities/\(id)/relationships/leaderboards" + } + + /// the id of the requested resource + public var id: String + + /// List of related linkages + public var parameters: Parameters + + public init( + id: String, + parameters: Parameters + ) { + self.id = id + self.parameters = parameters + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "POST" + + var jsonEncoder: JSONEncoder { + let encoder = JSONEncoder() + return encoder + } + + urlRequest?.httpBody = try jsonEncoder.encode(parameters) + urlRequest?.setValue("application/json", forHTTPHeaderField: "Content-Type") + return urlRequest + } + + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **422**, Unprocessable request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 409: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 422: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterActivities/ById/Relationships/Versions/GameCenterActivitiesByIdRelationshipsVersions.GET.7318fd0.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterActivities/ById/Relationships/Versions/GameCenterActivitiesByIdRelationshipsVersions.GET.7318fd0.generated.swift new file mode 100644 index 00000000..e8895ac9 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterActivities/ById/Relationships/Versions/GameCenterActivitiesByIdRelationshipsVersions.GET.7318fd0.generated.swift @@ -0,0 +1,88 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.GameCenterActivities.ById.Relationships.Versions { + public struct GET: Endpoint { + public typealias Response = GameCenterActivityVersionsLinkagesResponse + + public var path: String { + "/v1/gameCenterActivities/\(id)/relationships/versions" + } + + /// the id of the requested resource + public var id: String + + public var parameters: Parameters = Parameters() + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + components?.queryItems = [ + URLQueryItem(name: "limit", + value: parameters.limit.map { "\($0)" }) + ].filter { $0.value != nil } + if components?.queryItems?.isEmpty ?? false { + components?.queryItems = nil + } + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "GET" + return urlRequest + } + + /// - Returns: **200**, List of related linkages as `GameCenterActivityVersionsLinkagesResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(GameCenterActivityVersionsLinkagesResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +extension V1.GameCenterActivities.ById.Relationships.Versions.GET { + public struct Parameters: Hashable { + /// maximum resources per page + public var limit: Int? + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterActivities/ById/Versions/GameCenterActivitiesByIdVersions.GET.3ed11b1.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterActivities/ById/Versions/GameCenterActivitiesByIdVersions.GET.3ed11b1.generated.swift new file mode 100644 index 00000000..1da0e0a3 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterActivities/ById/Versions/GameCenterActivitiesByIdVersions.GET.3ed11b1.generated.swift @@ -0,0 +1,395 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.GameCenterActivities.ById.Versions { + public struct GET: Endpoint { + public typealias Response = GameCenterActivityVersionsResponse + + public var path: String { + "/v1/gameCenterActivities/\(id)/versions" + } + + /// the id of the requested resource + public var id: String + + public var parameters: Parameters = Parameters() + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + components?.queryItems = [ + URLQueryItem(name: "fields[gameCenterActivities]", + value: parameters.fields[.gameCenterActivities]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "fields[gameCenterActivityImages]", + value: parameters.fields[.gameCenterActivityImages]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "fields[gameCenterActivityLocalizations]", + value: parameters.fields[.gameCenterActivityLocalizations]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "fields[gameCenterActivityVersionReleases]", + value: parameters.fields[.gameCenterActivityVersionReleases]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "fields[gameCenterActivityVersions]", + value: parameters.fields[.gameCenterActivityVersions]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "include", + value: parameters.include?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "limit[localizations]", + value: parameters.limit[.localizations].map { "\($0)" }), + URLQueryItem(name: "limit[releases]", + value: parameters.limit[.releases].map { "\($0)" }), + URLQueryItem(name: "limit", + value: parameters.limit[].map { "\($0)" }) + ].filter { $0.value != nil } + if components?.queryItems?.isEmpty ?? false { + components?.queryItems = nil + } + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "GET" + return urlRequest + } + + /// - Returns: **200**, List of GameCenterActivityVersions as `GameCenterActivityVersionsResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(GameCenterActivityVersionsResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +extension V1.GameCenterActivities.ById.Versions.GET { + public struct Parameters: Hashable { + public var fields: Fields = Fields() + + /// comma-separated list of relationships to include + public var include: [Include]? + + /// maximum resources per page + public var limit: Limit = Limit() + + public struct Fields: Hashable { + public subscript (_ relation: Relation) -> T { + get { values[relation]?.base as! T } + set { values[relation] = AnyHashable(newValue) } + } + + private var values: [AnyHashable: AnyHashable] = [:] + + public struct GameCenterActivities: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var achievements: Self { + .init(rawValue: "achievements") + } + + public static var archived: Self { + .init(rawValue: "archived") + } + + public static var gameCenterDetail: Self { + .init(rawValue: "gameCenterDetail") + } + + public static var gameCenterGroup: Self { + .init(rawValue: "gameCenterGroup") + } + + public static var leaderboards: Self { + .init(rawValue: "leaderboards") + } + + public static var maximumPlayersCount: Self { + .init(rawValue: "maximumPlayersCount") + } + + public static var minimumPlayersCount: Self { + .init(rawValue: "minimumPlayersCount") + } + + public static var playStyle: Self { + .init(rawValue: "playStyle") + } + + public static var properties: Self { + .init(rawValue: "properties") + } + + public static var referenceName: Self { + .init(rawValue: "referenceName") + } + + public static var supportsPartyCode: Self { + .init(rawValue: "supportsPartyCode") + } + + public static var vendorIdentifier: Self { + .init(rawValue: "vendorIdentifier") + } + + public static var versions: Self { + .init(rawValue: "versions") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct GameCenterActivityImages: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var assetDeliveryState: Self { + .init(rawValue: "assetDeliveryState") + } + + public static var fileName: Self { + .init(rawValue: "fileName") + } + + public static var fileSize: Self { + .init(rawValue: "fileSize") + } + + public static var imageAsset: Self { + .init(rawValue: "imageAsset") + } + + public static var uploadOperations: Self { + .init(rawValue: "uploadOperations") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct GameCenterActivityLocalizations: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var description: Self { + .init(rawValue: "description") + } + + public static var image: Self { + .init(rawValue: "image") + } + + public static var locale: Self { + .init(rawValue: "locale") + } + + public static var name: Self { + .init(rawValue: "name") + } + + public static var version: Self { + .init(rawValue: "version") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct GameCenterActivityVersionReleases: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var version: Self { + .init(rawValue: "version") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct GameCenterActivityVersions: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var activity: Self { + .init(rawValue: "activity") + } + + public static var defaultImage: Self { + .init(rawValue: "defaultImage") + } + + public static var fallbackUrl: Self { + .init(rawValue: "fallbackUrl") + } + + public static var localizations: Self { + .init(rawValue: "localizations") + } + + public static var releases: Self { + .init(rawValue: "releases") + } + + public static var state: Self { + .init(rawValue: "state") + } + + public static var version: Self { + .init(rawValue: "version") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct Relation: Hashable { + /// the fields to include for returned resources of type gameCenterActivities + public static var gameCenterActivities: Relation<[GameCenterActivities]?> { + .init(key: "fields[gameCenterActivities]") + } + + /// the fields to include for returned resources of type gameCenterActivityImages + public static var gameCenterActivityImages: Relation<[GameCenterActivityImages]?> { + .init(key: "fields[gameCenterActivityImages]") + } + + /// the fields to include for returned resources of type gameCenterActivityLocalizations + public static var gameCenterActivityLocalizations: Relation<[GameCenterActivityLocalizations]?> { + .init(key: "fields[gameCenterActivityLocalizations]") + } + + /// the fields to include for returned resources of type gameCenterActivityVersionReleases + public static var gameCenterActivityVersionReleases: Relation<[GameCenterActivityVersionReleases]?> { + .init(key: "fields[gameCenterActivityVersionReleases]") + } + + /// the fields to include for returned resources of type gameCenterActivityVersions + public static var gameCenterActivityVersions: Relation<[GameCenterActivityVersions]?> { + .init(key: "fields[gameCenterActivityVersions]") + } + + internal let key: String + + public func hash(into hasher: inout Hasher) { + hasher.combine(key) + } + } + } + + public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var activity: Self { + .init(rawValue: "activity") + } + + public static var defaultImage: Self { + .init(rawValue: "defaultImage") + } + + public static var localizations: Self { + .init(rawValue: "localizations") + } + + public static var releases: Self { + .init(rawValue: "releases") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct Limit: Hashable { + public subscript () -> Int? { + get { self[Relation(key: "limit")] } + set { self[Relation(key: "limit")] = newValue } + } + + public subscript (_ relation: Relation) -> T { + get { values[relation]?.base as! T } + set { values[relation] = AnyHashable(newValue) } + } + + private var values: [AnyHashable: AnyHashable] = [:] + + public struct Relation: Hashable { + /// maximum number of related localizations returned (when they are included) + public static var localizations: Relation { + .init(key: "limit[localizations]") + } + + /// maximum number of related releases returned (when they are included) + public static var releases: Relation { + .init(key: "limit[releases]") + } + + internal let key: String + + public func hash(into hasher: inout Hasher) { + hasher.combine(key) + } + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterActivities/GameCenterActivities.POST.323e8fc.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterActivities/GameCenterActivities.POST.323e8fc.generated.swift new file mode 100644 index 00000000..6ffcf3cd --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterActivities/GameCenterActivities.POST.323e8fc.generated.swift @@ -0,0 +1,84 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.GameCenterActivities { + public struct POST: Endpoint { + public typealias Parameters = GameCenterActivityCreateRequest + public typealias Response = GameCenterActivityResponse + + public var path: String { + "/v1/gameCenterActivities" + } + + /// GameCenterActivity representation + public var parameters: Parameters + + public init(parameters: Parameters) { + self.parameters = parameters + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "POST" + + var jsonEncoder: JSONEncoder { + let encoder = JSONEncoder() + return encoder + } + + urlRequest?.httpBody = try jsonEncoder.encode(parameters) + urlRequest?.setValue("application/json", forHTTPHeaderField: "Content-Type") + return urlRequest + } + + /// - Returns: **201**, Single GameCenterActivity as `GameCenterActivityResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **422**, Unprocessable request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 201: + return try jsonDecoder.decode(GameCenterActivityResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 409: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 422: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterActivityImages/ById/GameCenterActivityImagesById.DELETE.dba6219.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterActivityImages/ById/GameCenterActivityImagesById.DELETE.dba6219.generated.swift new file mode 100644 index 00000000..da70bfa7 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterActivityImages/ById/GameCenterActivityImagesById.DELETE.dba6219.generated.swift @@ -0,0 +1,72 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.GameCenterActivityImages.ById { + public struct DELETE: Endpoint { + public typealias Parameters = Never + public typealias Response = Void + + public var path: String { + "/v1/gameCenterActivityImages/\(id)" + } + + /// the id of the requested resource + public var id: String + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "DELETE" + return urlRequest + } + + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 409: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterActivityImages/ById/GameCenterActivityImagesById.GET.dba6219.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterActivityImages/ById/GameCenterActivityImagesById.GET.dba6219.generated.swift new file mode 100644 index 00000000..77ef3907 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterActivityImages/ById/GameCenterActivityImagesById.GET.dba6219.generated.swift @@ -0,0 +1,141 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.GameCenterActivityImages.ById { + public struct GET: Endpoint { + public typealias Response = GameCenterActivityImageResponse + + public var path: String { + "/v1/gameCenterActivityImages/\(id)" + } + + /// the id of the requested resource + public var id: String + + public var parameters: Parameters = Parameters() + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + components?.queryItems = [ + URLQueryItem(name: "fields[gameCenterActivityImages]", + value: parameters.fields[.gameCenterActivityImages]?.map { "\($0)" }.joined(separator: ",")) + ].filter { $0.value != nil } + if components?.queryItems?.isEmpty ?? false { + components?.queryItems = nil + } + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "GET" + return urlRequest + } + + /// - Returns: **200**, Single GameCenterActivityImage as `GameCenterActivityImageResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(GameCenterActivityImageResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +extension V1.GameCenterActivityImages.ById.GET { + public struct Parameters: Hashable { + public var fields: Fields = Fields() + + public struct Fields: Hashable { + public subscript (_ relation: Relation) -> T { + get { values[relation]?.base as! T } + set { values[relation] = AnyHashable(newValue) } + } + + private var values: [AnyHashable: AnyHashable] = [:] + + public struct GameCenterActivityImages: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var assetDeliveryState: Self { + .init(rawValue: "assetDeliveryState") + } + + public static var fileName: Self { + .init(rawValue: "fileName") + } + + public static var fileSize: Self { + .init(rawValue: "fileSize") + } + + public static var imageAsset: Self { + .init(rawValue: "imageAsset") + } + + public static var uploadOperations: Self { + .init(rawValue: "uploadOperations") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct Relation: Hashable { + /// the fields to include for returned resources of type gameCenterActivityImages + public static var gameCenterActivityImages: Relation<[GameCenterActivityImages]?> { + .init(key: "fields[gameCenterActivityImages]") + } + + internal let key: String + + public func hash(into hasher: inout Hasher) { + hasher.combine(key) + } + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterActivityImages/ById/GameCenterActivityImagesById.PATCH.dba6219.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterActivityImages/ById/GameCenterActivityImagesById.PATCH.dba6219.generated.swift new file mode 100644 index 00000000..8e2d3e66 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterActivityImages/ById/GameCenterActivityImagesById.PATCH.dba6219.generated.swift @@ -0,0 +1,95 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.GameCenterActivityImages.ById { + public struct PATCH: Endpoint { + public typealias Parameters = GameCenterActivityImageUpdateRequest + public typealias Response = GameCenterActivityImageResponse + + public var path: String { + "/v1/gameCenterActivityImages/\(id)" + } + + /// the id of the requested resource + public var id: String + + /// GameCenterActivityImage representation + public var parameters: Parameters + + public init( + id: String, + parameters: Parameters + ) { + self.id = id + self.parameters = parameters + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "PATCH" + + var jsonEncoder: JSONEncoder { + let encoder = JSONEncoder() + return encoder + } + + urlRequest?.httpBody = try jsonEncoder.encode(parameters) + urlRequest?.setValue("application/json", forHTTPHeaderField: "Content-Type") + return urlRequest + } + + /// - Returns: **200**, Single GameCenterActivityImage as `GameCenterActivityImageResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **422**, Unprocessable request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(GameCenterActivityImageResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 409: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 422: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterActivityImages/GameCenterActivityImages.POST.8ba0e6d.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterActivityImages/GameCenterActivityImages.POST.8ba0e6d.generated.swift new file mode 100644 index 00000000..3de32acf --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterActivityImages/GameCenterActivityImages.POST.8ba0e6d.generated.swift @@ -0,0 +1,84 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.GameCenterActivityImages { + public struct POST: Endpoint { + public typealias Parameters = GameCenterActivityImageCreateRequest + public typealias Response = GameCenterActivityImageResponse + + public var path: String { + "/v1/gameCenterActivityImages" + } + + /// GameCenterActivityImage representation + public var parameters: Parameters + + public init(parameters: Parameters) { + self.parameters = parameters + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "POST" + + var jsonEncoder: JSONEncoder { + let encoder = JSONEncoder() + return encoder + } + + urlRequest?.httpBody = try jsonEncoder.encode(parameters) + urlRequest?.setValue("application/json", forHTTPHeaderField: "Content-Type") + return urlRequest + } + + /// - Returns: **201**, Single GameCenterActivityImage as `GameCenterActivityImageResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **422**, Unprocessable request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 201: + return try jsonDecoder.decode(GameCenterActivityImageResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 409: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 422: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterActivityLocalizations/ById/GameCenterActivityLocalizationsById.DELETE.498f7b3.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterActivityLocalizations/ById/GameCenterActivityLocalizationsById.DELETE.498f7b3.generated.swift new file mode 100644 index 00000000..bb9637f8 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterActivityLocalizations/ById/GameCenterActivityLocalizationsById.DELETE.498f7b3.generated.swift @@ -0,0 +1,72 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.GameCenterActivityLocalizations.ById { + public struct DELETE: Endpoint { + public typealias Parameters = Never + public typealias Response = Void + + public var path: String { + "/v1/gameCenterActivityLocalizations/\(id)" + } + + /// the id of the requested resource + public var id: String + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "DELETE" + return urlRequest + } + + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 409: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterActivityLocalizations/ById/GameCenterActivityLocalizationsById.GET.498f7b3.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterActivityLocalizations/ById/GameCenterActivityLocalizationsById.GET.498f7b3.generated.swift new file mode 100644 index 00000000..65662a2c --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterActivityLocalizations/ById/GameCenterActivityLocalizationsById.GET.498f7b3.generated.swift @@ -0,0 +1,205 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.GameCenterActivityLocalizations.ById { + public struct GET: Endpoint { + public typealias Response = GameCenterActivityLocalizationResponse + + public var path: String { + "/v1/gameCenterActivityLocalizations/\(id)" + } + + /// the id of the requested resource + public var id: String + + public var parameters: Parameters = Parameters() + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + components?.queryItems = [ + URLQueryItem(name: "fields[gameCenterActivityImages]", + value: parameters.fields[.gameCenterActivityImages]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "fields[gameCenterActivityLocalizations]", + value: parameters.fields[.gameCenterActivityLocalizations]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "include", + value: parameters.include?.map { "\($0)" }.joined(separator: ",")) + ].filter { $0.value != nil } + if components?.queryItems?.isEmpty ?? false { + components?.queryItems = nil + } + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "GET" + return urlRequest + } + + /// - Returns: **200**, Single GameCenterActivityLocalization as `GameCenterActivityLocalizationResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(GameCenterActivityLocalizationResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +extension V1.GameCenterActivityLocalizations.ById.GET { + public struct Parameters: Hashable { + public var fields: Fields = Fields() + + /// comma-separated list of relationships to include + public var include: [Include]? + + public struct Fields: Hashable { + public subscript (_ relation: Relation) -> T { + get { values[relation]?.base as! T } + set { values[relation] = AnyHashable(newValue) } + } + + private var values: [AnyHashable: AnyHashable] = [:] + + public struct GameCenterActivityImages: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var assetDeliveryState: Self { + .init(rawValue: "assetDeliveryState") + } + + public static var fileName: Self { + .init(rawValue: "fileName") + } + + public static var fileSize: Self { + .init(rawValue: "fileSize") + } + + public static var imageAsset: Self { + .init(rawValue: "imageAsset") + } + + public static var uploadOperations: Self { + .init(rawValue: "uploadOperations") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct GameCenterActivityLocalizations: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var description: Self { + .init(rawValue: "description") + } + + public static var image: Self { + .init(rawValue: "image") + } + + public static var locale: Self { + .init(rawValue: "locale") + } + + public static var name: Self { + .init(rawValue: "name") + } + + public static var version: Self { + .init(rawValue: "version") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct Relation: Hashable { + /// the fields to include for returned resources of type gameCenterActivityImages + public static var gameCenterActivityImages: Relation<[GameCenterActivityImages]?> { + .init(key: "fields[gameCenterActivityImages]") + } + + /// the fields to include for returned resources of type gameCenterActivityLocalizations + public static var gameCenterActivityLocalizations: Relation<[GameCenterActivityLocalizations]?> { + .init(key: "fields[gameCenterActivityLocalizations]") + } + + internal let key: String + + public func hash(into hasher: inout Hasher) { + hasher.combine(key) + } + } + } + + public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var image: Self { + .init(rawValue: "image") + } + + public static var version: Self { + .init(rawValue: "version") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterActivityLocalizations/ById/GameCenterActivityLocalizationsById.PATCH.498f7b3.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterActivityLocalizations/ById/GameCenterActivityLocalizationsById.PATCH.498f7b3.generated.swift new file mode 100644 index 00000000..1883f939 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterActivityLocalizations/ById/GameCenterActivityLocalizationsById.PATCH.498f7b3.generated.swift @@ -0,0 +1,95 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.GameCenterActivityLocalizations.ById { + public struct PATCH: Endpoint { + public typealias Parameters = GameCenterActivityLocalizationUpdateRequest + public typealias Response = GameCenterActivityLocalizationResponse + + public var path: String { + "/v1/gameCenterActivityLocalizations/\(id)" + } + + /// the id of the requested resource + public var id: String + + /// GameCenterActivityLocalization representation + public var parameters: Parameters + + public init( + id: String, + parameters: Parameters + ) { + self.id = id + self.parameters = parameters + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "PATCH" + + var jsonEncoder: JSONEncoder { + let encoder = JSONEncoder() + return encoder + } + + urlRequest?.httpBody = try jsonEncoder.encode(parameters) + urlRequest?.setValue("application/json", forHTTPHeaderField: "Content-Type") + return urlRequest + } + + /// - Returns: **200**, Single GameCenterActivityLocalization as `GameCenterActivityLocalizationResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **422**, Unprocessable request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(GameCenterActivityLocalizationResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 409: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 422: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterActivityLocalizations/ById/Image/GameCenterActivityLocalizationsByIdImage.GET.5bfb995.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterActivityLocalizations/ById/Image/GameCenterActivityLocalizationsByIdImage.GET.5bfb995.generated.swift new file mode 100644 index 00000000..b2020c89 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterActivityLocalizations/ById/Image/GameCenterActivityLocalizationsByIdImage.GET.5bfb995.generated.swift @@ -0,0 +1,141 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.GameCenterActivityLocalizations.ById.Image { + public struct GET: Endpoint { + public typealias Response = GameCenterActivityImageResponse + + public var path: String { + "/v1/gameCenterActivityLocalizations/\(id)/image" + } + + /// the id of the requested resource + public var id: String + + public var parameters: Parameters = Parameters() + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + components?.queryItems = [ + URLQueryItem(name: "fields[gameCenterActivityImages]", + value: parameters.fields[.gameCenterActivityImages]?.map { "\($0)" }.joined(separator: ",")) + ].filter { $0.value != nil } + if components?.queryItems?.isEmpty ?? false { + components?.queryItems = nil + } + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "GET" + return urlRequest + } + + /// - Returns: **200**, Single GameCenterActivityImage as `GameCenterActivityImageResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(GameCenterActivityImageResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +extension V1.GameCenterActivityLocalizations.ById.Image.GET { + public struct Parameters: Hashable { + public var fields: Fields = Fields() + + public struct Fields: Hashable { + public subscript (_ relation: Relation) -> T { + get { values[relation]?.base as! T } + set { values[relation] = AnyHashable(newValue) } + } + + private var values: [AnyHashable: AnyHashable] = [:] + + public struct GameCenterActivityImages: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var assetDeliveryState: Self { + .init(rawValue: "assetDeliveryState") + } + + public static var fileName: Self { + .init(rawValue: "fileName") + } + + public static var fileSize: Self { + .init(rawValue: "fileSize") + } + + public static var imageAsset: Self { + .init(rawValue: "imageAsset") + } + + public static var uploadOperations: Self { + .init(rawValue: "uploadOperations") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct Relation: Hashable { + /// the fields to include for returned resources of type gameCenterActivityImages + public static var gameCenterActivityImages: Relation<[GameCenterActivityImages]?> { + .init(key: "fields[gameCenterActivityImages]") + } + + internal let key: String + + public func hash(into hasher: inout Hasher) { + hasher.combine(key) + } + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterActivityLocalizations/ById/Relationships/Image/GameCenterActivityLocalizationsByIdRelationshipsImage.GET.d1c0278.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterActivityLocalizations/ById/Relationships/Image/GameCenterActivityLocalizationsByIdRelationshipsImage.GET.d1c0278.generated.swift new file mode 100644 index 00000000..04d985d5 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterActivityLocalizations/ById/Relationships/Image/GameCenterActivityLocalizationsByIdRelationshipsImage.GET.d1c0278.generated.swift @@ -0,0 +1,86 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.GameCenterActivityLocalizations.ById.Relationships.Image { + public struct GET: Endpoint { + public typealias Response = GameCenterActivityLocalizationImageLinkageResponse + + public var path: String { + "/v1/gameCenterActivityLocalizations/\(id)/relationships/image" + } + + /// the id of the requested resource + public var id: String + + public var parameters: Parameters = Parameters() + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + components?.queryItems = [ + + ].filter { $0.value != nil } + if components?.queryItems?.isEmpty ?? false { + components?.queryItems = nil + } + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "GET" + return urlRequest + } + + /// - Returns: **200**, Related linkage as `GameCenterActivityLocalizationImageLinkageResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(GameCenterActivityLocalizationImageLinkageResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +extension V1.GameCenterActivityLocalizations.ById.Relationships.Image.GET { + public struct Parameters: Hashable { + + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterActivityLocalizations/GameCenterActivityLocalizations.POST.3f32ce8.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterActivityLocalizations/GameCenterActivityLocalizations.POST.3f32ce8.generated.swift new file mode 100644 index 00000000..813bcdd7 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterActivityLocalizations/GameCenterActivityLocalizations.POST.3f32ce8.generated.swift @@ -0,0 +1,84 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.GameCenterActivityLocalizations { + public struct POST: Endpoint { + public typealias Parameters = GameCenterActivityLocalizationCreateRequest + public typealias Response = GameCenterActivityLocalizationResponse + + public var path: String { + "/v1/gameCenterActivityLocalizations" + } + + /// GameCenterActivityLocalization representation + public var parameters: Parameters + + public init(parameters: Parameters) { + self.parameters = parameters + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "POST" + + var jsonEncoder: JSONEncoder { + let encoder = JSONEncoder() + return encoder + } + + urlRequest?.httpBody = try jsonEncoder.encode(parameters) + urlRequest?.setValue("application/json", forHTTPHeaderField: "Content-Type") + return urlRequest + } + + /// - Returns: **201**, Single GameCenterActivityLocalization as `GameCenterActivityLocalizationResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **422**, Unprocessable request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 201: + return try jsonDecoder.decode(GameCenterActivityLocalizationResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 409: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 422: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterActivityVersionReleases/ById/GameCenterActivityVersionReleasesById.DELETE.4df0d43.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterActivityVersionReleases/ById/GameCenterActivityVersionReleasesById.DELETE.4df0d43.generated.swift new file mode 100644 index 00000000..ae149924 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterActivityVersionReleases/ById/GameCenterActivityVersionReleasesById.DELETE.4df0d43.generated.swift @@ -0,0 +1,72 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.GameCenterActivityVersionReleases.ById { + public struct DELETE: Endpoint { + public typealias Parameters = Never + public typealias Response = Void + + public var path: String { + "/v1/gameCenterActivityVersionReleases/\(id)" + } + + /// the id of the requested resource + public var id: String + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "DELETE" + return urlRequest + } + + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 409: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppPrices/ById/AppPricesById.GET.fb6e1b4.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterActivityVersionReleases/ById/GameCenterActivityVersionReleasesById.GET.4df0d43.generated.swift similarity index 61% rename from Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppPrices/ById/AppPricesById.GET.fb6e1b4.generated.swift rename to Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterActivityVersionReleases/ById/GameCenterActivityVersionReleasesById.GET.4df0d43.generated.swift index 50ee98a9..09861d00 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppPrices/ById/AppPricesById.GET.fb6e1b4.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterActivityVersionReleases/ById/GameCenterActivityVersionReleasesById.GET.4df0d43.generated.swift @@ -6,13 +6,12 @@ import Foundation import FoundationNetworking #endif -extension V1.AppPrices.ById { - @available(*, deprecated) +extension V1.GameCenterActivityVersionReleases.ById { public struct GET: Endpoint { - public typealias Response = AppPriceResponse + public typealias Response = GameCenterActivityVersionReleaseResponse public var path: String { - "/v1/appPrices/\(id)" + "/v1/gameCenterActivityVersionReleases/\(id)" } /// the id of the requested resource @@ -29,8 +28,8 @@ extension V1.AppPrices.ById { components?.path = path components?.queryItems = [ - URLQueryItem(name: "fields[appPrices]", - value: parameters.fields[.appPrices]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "fields[gameCenterActivityVersionReleases]", + value: parameters.fields[.gameCenterActivityVersionReleases]?.map { "\($0)" }.joined(separator: ",")), URLQueryItem(name: "include", value: parameters.include?.map { "\($0)" }.joined(separator: ",")) ].filter { $0.value != nil } @@ -43,10 +42,12 @@ extension V1.AppPrices.ById { return urlRequest } - /// - Returns: **200**, Single AppPrice as `AppPriceResponse` + /// - Returns: **200**, Single GameCenterActivityVersionRelease as `GameCenterActivityVersionReleaseResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -55,17 +56,23 @@ extension V1.AppPrices.ById { switch urlResponse.statusCode { case 200: - return try jsonDecoder.decode(AppPriceResponse.self, from: data) + return try jsonDecoder.decode(GameCenterActivityVersionReleaseResponse.self, from: data) case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 404: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -73,7 +80,7 @@ extension V1.AppPrices.ById { } } -extension V1.AppPrices.ById.GET { +extension V1.GameCenterActivityVersionReleases.ById.GET { public struct Parameters: Hashable { public var fields: Fields = Fields() @@ -88,32 +95,26 @@ extension V1.AppPrices.ById.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum AppPrices: Hashable, Codable, RawRepresentable { - case app - case priceTier - case unknown(String) - - public var rawValue: String { - switch self { - case .app: return "app" - case .priceTier: return "priceTier" - case .unknown(let rawValue): return rawValue - } + public struct GameCenterActivityVersionReleases: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var version: Self { + .init(rawValue: "version") + } + + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "app": self = .app - case "priceTier": self = .priceTier - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } public struct Relation: Hashable { - /// the fields to include for returned resources of type appPrices - public static var appPrices: Relation<[AppPrices]?> { - .init(key: "fields[appPrices]") + /// the fields to include for returned resources of type gameCenterActivityVersionReleases + public static var gameCenterActivityVersionReleases: Relation<[GameCenterActivityVersionReleases]?> { + .init(key: "fields[gameCenterActivityVersionReleases]") } internal let key: String @@ -124,25 +125,19 @@ extension V1.AppPrices.ById.GET { } } - public enum Include: Hashable, Codable, RawRepresentable { - case app - case priceTier - case unknown(String) + public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var version: Self { + .init(rawValue: "version") + } - public var rawValue: String { - switch self { - case .app: return "app" - case .priceTier: return "priceTier" - case .unknown(let rawValue): return rawValue - } + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "app": self = .app - case "priceTier": self = .priceTier - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterActivityVersionReleases/GameCenterActivityVersionReleases.POST.9d43f0e.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterActivityVersionReleases/GameCenterActivityVersionReleases.POST.9d43f0e.generated.swift new file mode 100644 index 00000000..deeaee19 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterActivityVersionReleases/GameCenterActivityVersionReleases.POST.9d43f0e.generated.swift @@ -0,0 +1,84 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.GameCenterActivityVersionReleases { + public struct POST: Endpoint { + public typealias Parameters = GameCenterActivityVersionReleaseCreateRequest + public typealias Response = GameCenterActivityVersionReleaseResponse + + public var path: String { + "/v1/gameCenterActivityVersionReleases" + } + + /// GameCenterActivityVersionRelease representation + public var parameters: Parameters + + public init(parameters: Parameters) { + self.parameters = parameters + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "POST" + + var jsonEncoder: JSONEncoder { + let encoder = JSONEncoder() + return encoder + } + + urlRequest?.httpBody = try jsonEncoder.encode(parameters) + urlRequest?.setValue("application/json", forHTTPHeaderField: "Content-Type") + return urlRequest + } + + /// - Returns: **201**, Single GameCenterActivityVersionRelease as `GameCenterActivityVersionReleaseResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **422**, Unprocessable request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 201: + return try jsonDecoder.decode(GameCenterActivityVersionReleaseResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 409: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 422: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterActivityVersions/ById/DefaultImage/GameCenterActivityVersionsByIdDefaultImage.GET.766df69.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterActivityVersions/ById/DefaultImage/GameCenterActivityVersionsByIdDefaultImage.GET.766df69.generated.swift new file mode 100644 index 00000000..373ac9ed --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterActivityVersions/ById/DefaultImage/GameCenterActivityVersionsByIdDefaultImage.GET.766df69.generated.swift @@ -0,0 +1,141 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.GameCenterActivityVersions.ById.DefaultImage { + public struct GET: Endpoint { + public typealias Response = GameCenterActivityImageResponse + + public var path: String { + "/v1/gameCenterActivityVersions/\(id)/defaultImage" + } + + /// the id of the requested resource + public var id: String + + public var parameters: Parameters = Parameters() + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + components?.queryItems = [ + URLQueryItem(name: "fields[gameCenterActivityImages]", + value: parameters.fields[.gameCenterActivityImages]?.map { "\($0)" }.joined(separator: ",")) + ].filter { $0.value != nil } + if components?.queryItems?.isEmpty ?? false { + components?.queryItems = nil + } + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "GET" + return urlRequest + } + + /// - Returns: **200**, Single GameCenterActivityImage as `GameCenterActivityImageResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(GameCenterActivityImageResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +extension V1.GameCenterActivityVersions.ById.DefaultImage.GET { + public struct Parameters: Hashable { + public var fields: Fields = Fields() + + public struct Fields: Hashable { + public subscript (_ relation: Relation) -> T { + get { values[relation]?.base as! T } + set { values[relation] = AnyHashable(newValue) } + } + + private var values: [AnyHashable: AnyHashable] = [:] + + public struct GameCenterActivityImages: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var assetDeliveryState: Self { + .init(rawValue: "assetDeliveryState") + } + + public static var fileName: Self { + .init(rawValue: "fileName") + } + + public static var fileSize: Self { + .init(rawValue: "fileSize") + } + + public static var imageAsset: Self { + .init(rawValue: "imageAsset") + } + + public static var uploadOperations: Self { + .init(rawValue: "uploadOperations") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct Relation: Hashable { + /// the fields to include for returned resources of type gameCenterActivityImages + public static var gameCenterActivityImages: Relation<[GameCenterActivityImages]?> { + .init(key: "fields[gameCenterActivityImages]") + } + + internal let key: String + + public func hash(into hasher: inout Hasher) { + hasher.combine(key) + } + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterActivityVersions/ById/GameCenterActivityVersionsById.GET.8b3116f.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterActivityVersions/ById/GameCenterActivityVersionsById.GET.8b3116f.generated.swift new file mode 100644 index 00000000..433d4f34 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterActivityVersions/ById/GameCenterActivityVersionsById.GET.8b3116f.generated.swift @@ -0,0 +1,293 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.GameCenterActivityVersions.ById { + public struct GET: Endpoint { + public typealias Response = GameCenterActivityVersionResponse + + public var path: String { + "/v1/gameCenterActivityVersions/\(id)" + } + + /// the id of the requested resource + public var id: String + + public var parameters: Parameters = Parameters() + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + components?.queryItems = [ + URLQueryItem(name: "fields[gameCenterActivityImages]", + value: parameters.fields[.gameCenterActivityImages]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "fields[gameCenterActivityLocalizations]", + value: parameters.fields[.gameCenterActivityLocalizations]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "fields[gameCenterActivityVersions]", + value: parameters.fields[.gameCenterActivityVersions]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "include", + value: parameters.include?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "limit[localizations]", + value: parameters.limit[.localizations].map { "\($0)" }), + URLQueryItem(name: "limit[releases]", + value: parameters.limit[.releases].map { "\($0)" }) + ].filter { $0.value != nil } + if components?.queryItems?.isEmpty ?? false { + components?.queryItems = nil + } + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "GET" + return urlRequest + } + + /// - Returns: **200**, Single GameCenterActivityVersion as `GameCenterActivityVersionResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(GameCenterActivityVersionResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +extension V1.GameCenterActivityVersions.ById.GET { + public struct Parameters: Hashable { + public var fields: Fields = Fields() + + /// comma-separated list of relationships to include + public var include: [Include]? + + public var limit: Limit = Limit() + + public struct Fields: Hashable { + public subscript (_ relation: Relation) -> T { + get { values[relation]?.base as! T } + set { values[relation] = AnyHashable(newValue) } + } + + private var values: [AnyHashable: AnyHashable] = [:] + + public struct GameCenterActivityImages: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var assetDeliveryState: Self { + .init(rawValue: "assetDeliveryState") + } + + public static var fileName: Self { + .init(rawValue: "fileName") + } + + public static var fileSize: Self { + .init(rawValue: "fileSize") + } + + public static var imageAsset: Self { + .init(rawValue: "imageAsset") + } + + public static var uploadOperations: Self { + .init(rawValue: "uploadOperations") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct GameCenterActivityLocalizations: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var description: Self { + .init(rawValue: "description") + } + + public static var image: Self { + .init(rawValue: "image") + } + + public static var locale: Self { + .init(rawValue: "locale") + } + + public static var name: Self { + .init(rawValue: "name") + } + + public static var version: Self { + .init(rawValue: "version") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct GameCenterActivityVersions: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var activity: Self { + .init(rawValue: "activity") + } + + public static var defaultImage: Self { + .init(rawValue: "defaultImage") + } + + public static var fallbackUrl: Self { + .init(rawValue: "fallbackUrl") + } + + public static var localizations: Self { + .init(rawValue: "localizations") + } + + public static var releases: Self { + .init(rawValue: "releases") + } + + public static var state: Self { + .init(rawValue: "state") + } + + public static var version: Self { + .init(rawValue: "version") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct Relation: Hashable { + /// the fields to include for returned resources of type gameCenterActivityImages + public static var gameCenterActivityImages: Relation<[GameCenterActivityImages]?> { + .init(key: "fields[gameCenterActivityImages]") + } + + /// the fields to include for returned resources of type gameCenterActivityLocalizations + public static var gameCenterActivityLocalizations: Relation<[GameCenterActivityLocalizations]?> { + .init(key: "fields[gameCenterActivityLocalizations]") + } + + /// the fields to include for returned resources of type gameCenterActivityVersions + public static var gameCenterActivityVersions: Relation<[GameCenterActivityVersions]?> { + .init(key: "fields[gameCenterActivityVersions]") + } + + internal let key: String + + public func hash(into hasher: inout Hasher) { + hasher.combine(key) + } + } + } + + public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var activity: Self { + .init(rawValue: "activity") + } + + public static var defaultImage: Self { + .init(rawValue: "defaultImage") + } + + public static var localizations: Self { + .init(rawValue: "localizations") + } + + public static var releases: Self { + .init(rawValue: "releases") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct Limit: Hashable { + public subscript (_ relation: Relation) -> T { + get { values[relation]?.base as! T } + set { values[relation] = AnyHashable(newValue) } + } + + private var values: [AnyHashable: AnyHashable] = [:] + + public struct Relation: Hashable { + /// maximum number of related localizations returned (when they are included) + public static var localizations: Relation { + .init(key: "limit[localizations]") + } + + /// maximum number of related releases returned (when they are included) + public static var releases: Relation { + .init(key: "limit[releases]") + } + + internal let key: String + + public func hash(into hasher: inout Hasher) { + hasher.combine(key) + } + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterActivityVersions/ById/GameCenterActivityVersionsById.PATCH.8b3116f.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterActivityVersions/ById/GameCenterActivityVersionsById.PATCH.8b3116f.generated.swift new file mode 100644 index 00000000..b36c3fd3 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterActivityVersions/ById/GameCenterActivityVersionsById.PATCH.8b3116f.generated.swift @@ -0,0 +1,95 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.GameCenterActivityVersions.ById { + public struct PATCH: Endpoint { + public typealias Parameters = GameCenterActivityVersionUpdateRequest + public typealias Response = GameCenterActivityVersionResponse + + public var path: String { + "/v1/gameCenterActivityVersions/\(id)" + } + + /// the id of the requested resource + public var id: String + + /// GameCenterActivityVersion representation + public var parameters: Parameters + + public init( + id: String, + parameters: Parameters + ) { + self.id = id + self.parameters = parameters + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "PATCH" + + var jsonEncoder: JSONEncoder { + let encoder = JSONEncoder() + return encoder + } + + urlRequest?.httpBody = try jsonEncoder.encode(parameters) + urlRequest?.setValue("application/json", forHTTPHeaderField: "Content-Type") + return urlRequest + } + + /// - Returns: **200**, Single GameCenterActivityVersion as `GameCenterActivityVersionResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **422**, Unprocessable request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(GameCenterActivityVersionResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 409: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 422: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterActivityVersions/ById/Localizations/GameCenterActivityVersionsByIdLocalizations.GET.e77059d.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterActivityVersions/ById/Localizations/GameCenterActivityVersionsByIdLocalizations.GET.e77059d.generated.swift new file mode 100644 index 00000000..0f98b4ae --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterActivityVersions/ById/Localizations/GameCenterActivityVersionsByIdLocalizations.GET.e77059d.generated.swift @@ -0,0 +1,257 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.GameCenterActivityVersions.ById.Localizations { + public struct GET: Endpoint { + public typealias Response = GameCenterActivityLocalizationsResponse + + public var path: String { + "/v1/gameCenterActivityVersions/\(id)/localizations" + } + + /// the id of the requested resource + public var id: String + + public var parameters: Parameters = Parameters() + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + components?.queryItems = [ + URLQueryItem(name: "fields[gameCenterActivityImages]", + value: parameters.fields[.gameCenterActivityImages]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "fields[gameCenterActivityLocalizations]", + value: parameters.fields[.gameCenterActivityLocalizations]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "fields[gameCenterActivityVersions]", + value: parameters.fields[.gameCenterActivityVersions]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "include", + value: parameters.include?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "limit", + value: parameters.limit.map { "\($0)" }) + ].filter { $0.value != nil } + if components?.queryItems?.isEmpty ?? false { + components?.queryItems = nil + } + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "GET" + return urlRequest + } + + /// - Returns: **200**, List of GameCenterActivityLocalizations as `GameCenterActivityLocalizationsResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(GameCenterActivityLocalizationsResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +extension V1.GameCenterActivityVersions.ById.Localizations.GET { + public struct Parameters: Hashable { + public var fields: Fields = Fields() + + /// comma-separated list of relationships to include + public var include: [Include]? + + /// maximum resources per page + public var limit: Int? + + public struct Fields: Hashable { + public subscript (_ relation: Relation) -> T { + get { values[relation]?.base as! T } + set { values[relation] = AnyHashable(newValue) } + } + + private var values: [AnyHashable: AnyHashable] = [:] + + public struct GameCenterActivityImages: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var assetDeliveryState: Self { + .init(rawValue: "assetDeliveryState") + } + + public static var fileName: Self { + .init(rawValue: "fileName") + } + + public static var fileSize: Self { + .init(rawValue: "fileSize") + } + + public static var imageAsset: Self { + .init(rawValue: "imageAsset") + } + + public static var uploadOperations: Self { + .init(rawValue: "uploadOperations") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct GameCenterActivityLocalizations: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var description: Self { + .init(rawValue: "description") + } + + public static var image: Self { + .init(rawValue: "image") + } + + public static var locale: Self { + .init(rawValue: "locale") + } + + public static var name: Self { + .init(rawValue: "name") + } + + public static var version: Self { + .init(rawValue: "version") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct GameCenterActivityVersions: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var activity: Self { + .init(rawValue: "activity") + } + + public static var defaultImage: Self { + .init(rawValue: "defaultImage") + } + + public static var fallbackUrl: Self { + .init(rawValue: "fallbackUrl") + } + + public static var localizations: Self { + .init(rawValue: "localizations") + } + + public static var releases: Self { + .init(rawValue: "releases") + } + + public static var state: Self { + .init(rawValue: "state") + } + + public static var version: Self { + .init(rawValue: "version") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct Relation: Hashable { + /// the fields to include for returned resources of type gameCenterActivityImages + public static var gameCenterActivityImages: Relation<[GameCenterActivityImages]?> { + .init(key: "fields[gameCenterActivityImages]") + } + + /// the fields to include for returned resources of type gameCenterActivityLocalizations + public static var gameCenterActivityLocalizations: Relation<[GameCenterActivityLocalizations]?> { + .init(key: "fields[gameCenterActivityLocalizations]") + } + + /// the fields to include for returned resources of type gameCenterActivityVersions + public static var gameCenterActivityVersions: Relation<[GameCenterActivityVersions]?> { + .init(key: "fields[gameCenterActivityVersions]") + } + + internal let key: String + + public func hash(into hasher: inout Hasher) { + hasher.combine(key) + } + } + } + + public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var image: Self { + .init(rawValue: "image") + } + + public static var version: Self { + .init(rawValue: "version") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterActivityVersions/ById/Relationships/DefaultImage/GameCenterActivityVersionsByIdRelationshipsDefaultImage.GET.f8986b4.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterActivityVersions/ById/Relationships/DefaultImage/GameCenterActivityVersionsByIdRelationshipsDefaultImage.GET.f8986b4.generated.swift new file mode 100644 index 00000000..bb1ded60 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterActivityVersions/ById/Relationships/DefaultImage/GameCenterActivityVersionsByIdRelationshipsDefaultImage.GET.f8986b4.generated.swift @@ -0,0 +1,86 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.GameCenterActivityVersions.ById.Relationships.DefaultImage { + public struct GET: Endpoint { + public typealias Response = GameCenterActivityVersionDefaultImageLinkageResponse + + public var path: String { + "/v1/gameCenterActivityVersions/\(id)/relationships/defaultImage" + } + + /// the id of the requested resource + public var id: String + + public var parameters: Parameters = Parameters() + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + components?.queryItems = [ + + ].filter { $0.value != nil } + if components?.queryItems?.isEmpty ?? false { + components?.queryItems = nil + } + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "GET" + return urlRequest + } + + /// - Returns: **200**, Related linkage as `GameCenterActivityVersionDefaultImageLinkageResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(GameCenterActivityVersionDefaultImageLinkageResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +extension V1.GameCenterActivityVersions.ById.Relationships.DefaultImage.GET { + public struct Parameters: Hashable { + + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterActivityVersions/ById/Relationships/Localizations/GameCenterActivityVersionsByIdRelationshipsLocalizations.GET.5b62918.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterActivityVersions/ById/Relationships/Localizations/GameCenterActivityVersionsByIdRelationshipsLocalizations.GET.5b62918.generated.swift new file mode 100644 index 00000000..246869ae --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterActivityVersions/ById/Relationships/Localizations/GameCenterActivityVersionsByIdRelationshipsLocalizations.GET.5b62918.generated.swift @@ -0,0 +1,88 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.GameCenterActivityVersions.ById.Relationships.Localizations { + public struct GET: Endpoint { + public typealias Response = GameCenterActivityVersionLocalizationsLinkagesResponse + + public var path: String { + "/v1/gameCenterActivityVersions/\(id)/relationships/localizations" + } + + /// the id of the requested resource + public var id: String + + public var parameters: Parameters = Parameters() + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + components?.queryItems = [ + URLQueryItem(name: "limit", + value: parameters.limit.map { "\($0)" }) + ].filter { $0.value != nil } + if components?.queryItems?.isEmpty ?? false { + components?.queryItems = nil + } + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "GET" + return urlRequest + } + + /// - Returns: **200**, List of related linkages as `GameCenterActivityVersionLocalizationsLinkagesResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(GameCenterActivityVersionLocalizationsLinkagesResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +extension V1.GameCenterActivityVersions.ById.Relationships.Localizations.GET { + public struct Parameters: Hashable { + /// maximum resources per page + public var limit: Int? + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterActivityVersions/GameCenterActivityVersions.POST.d398713.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterActivityVersions/GameCenterActivityVersions.POST.d398713.generated.swift new file mode 100644 index 00000000..b2250e9c --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterActivityVersions/GameCenterActivityVersions.POST.d398713.generated.swift @@ -0,0 +1,84 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.GameCenterActivityVersions { + public struct POST: Endpoint { + public typealias Parameters = GameCenterActivityVersionCreateRequest + public typealias Response = GameCenterActivityVersionResponse + + public var path: String { + "/v1/gameCenterActivityVersions" + } + + /// GameCenterActivityVersion representation + public var parameters: Parameters + + public init(parameters: Parameters) { + self.parameters = parameters + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "POST" + + var jsonEncoder: JSONEncoder { + let encoder = JSONEncoder() + return encoder + } + + urlRequest?.httpBody = try jsonEncoder.encode(parameters) + urlRequest?.setValue("application/json", forHTTPHeaderField: "Content-Type") + return urlRequest + } + + /// - Returns: **201**, Single GameCenterActivityVersion as `GameCenterActivityVersionResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **422**, Unprocessable request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 201: + return try jsonDecoder.decode(GameCenterActivityVersionResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 409: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 422: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterAppVersions/ById/AppStoreVersion/GameCenterAppVersionsByIdAppStoreVersion.GET.c01ca76.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterAppVersions/ById/AppStoreVersion/GameCenterAppVersionsByIdAppStoreVersion.GET.c01ca76.generated.swift index 0e91d3c6..e75d3e05 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterAppVersions/ById/AppStoreVersion/GameCenterAppVersionsByIdAppStoreVersion.GET.c01ca76.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterAppVersions/ById/AppStoreVersion/GameCenterAppVersionsByIdAppStoreVersion.GET.c01ca76.generated.swift @@ -30,6 +30,8 @@ extension V1.GameCenterAppVersions.ById.AppStoreVersion { components?.queryItems = [ URLQueryItem(name: "fields[ageRatingDeclarations]", value: parameters.fields[.ageRatingDeclarations]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "fields[alternativeDistributionPackages]", + value: parameters.fields[.alternativeDistributionPackages]?.map { "\($0)" }.joined(separator: ",")), URLQueryItem(name: "fields[appClipDefaultExperiences]", value: parameters.fields[.appClipDefaultExperiences]?.map { "\($0)" }.joined(separator: ",")), URLQueryItem(name: "fields[appStoreReviewDetails]", @@ -48,6 +50,8 @@ extension V1.GameCenterAppVersions.ById.AppStoreVersion { value: parameters.fields[.apps]?.map { "\($0)" }.joined(separator: ",")), URLQueryItem(name: "fields[builds]", value: parameters.fields[.builds]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "fields[gameCenterAppVersions]", + value: parameters.fields[.gameCenterAppVersions]?.map { "\($0)" }.joined(separator: ",")), URLQueryItem(name: "fields[routingAppCoverages]", value: parameters.fields[.routingAppCoverages]?.map { "\($0)" }.joined(separator: ",")), URLQueryItem(name: "include", @@ -70,8 +74,10 @@ extension V1.GameCenterAppVersions.ById.AppStoreVersion { /// - Returns: **200**, Single AppStoreVersion as `AppStoreVersionResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -85,12 +91,18 @@ extension V1.GameCenterAppVersions.ById.AppStoreVersion { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 404: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -115,650 +127,835 @@ extension V1.GameCenterAppVersions.ById.AppStoreVersion.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum AgeRatingDeclarations: Hashable, Codable, RawRepresentable { - case alcoholTobaccoOrDrugUseOrReferences - case contests - case gambling - case gamblingAndContests - case gamblingSimulated - case horrorOrFearThemes - case kidsAgeBand - case matureOrSuggestiveThemes - case medicalOrTreatmentInformation - case profanityOrCrudeHumor - case seventeenPlus - case sexualContentGraphicAndNudity - case sexualContentOrNudity - case unrestrictedWebAccess - case violenceCartoonOrFantasy - case violenceRealistic - case violenceRealisticProlongedGraphicOrSadistic - case unknown(String) - - public var rawValue: String { - switch self { - case .alcoholTobaccoOrDrugUseOrReferences: return "alcoholTobaccoOrDrugUseOrReferences" - case .contests: return "contests" - case .gambling: return "gambling" - case .gamblingAndContests: return "gamblingAndContests" - case .gamblingSimulated: return "gamblingSimulated" - case .horrorOrFearThemes: return "horrorOrFearThemes" - case .kidsAgeBand: return "kidsAgeBand" - case .matureOrSuggestiveThemes: return "matureOrSuggestiveThemes" - case .medicalOrTreatmentInformation: return "medicalOrTreatmentInformation" - case .profanityOrCrudeHumor: return "profanityOrCrudeHumor" - case .seventeenPlus: return "seventeenPlus" - case .sexualContentGraphicAndNudity: return "sexualContentGraphicAndNudity" - case .sexualContentOrNudity: return "sexualContentOrNudity" - case .unrestrictedWebAccess: return "unrestrictedWebAccess" - case .violenceCartoonOrFantasy: return "violenceCartoonOrFantasy" - case .violenceRealistic: return "violenceRealistic" - case .violenceRealisticProlongedGraphicOrSadistic: return "violenceRealisticProlongedGraphicOrSadistic" - case .unknown(let rawValue): return rawValue - } + public struct AgeRatingDeclarations: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var alcoholTobaccoOrDrugUseOrReferences: Self { + .init(rawValue: "alcoholTobaccoOrDrugUseOrReferences") + } + + public static var contests: Self { + .init(rawValue: "contests") + } + + public static var gambling: Self { + .init(rawValue: "gambling") + } + + public static var gamblingSimulated: Self { + .init(rawValue: "gamblingSimulated") + } + + public static var horrorOrFearThemes: Self { + .init(rawValue: "horrorOrFearThemes") + } + + public static var kidsAgeBand: Self { + .init(rawValue: "kidsAgeBand") + } + + public static var koreaAgeRatingOverride: Self { + .init(rawValue: "koreaAgeRatingOverride") + } + + public static var lootBox: Self { + .init(rawValue: "lootBox") + } + + public static var matureOrSuggestiveThemes: Self { + .init(rawValue: "matureOrSuggestiveThemes") + } + + public static var medicalOrTreatmentInformation: Self { + .init(rawValue: "medicalOrTreatmentInformation") + } + + public static var profanityOrCrudeHumor: Self { + .init(rawValue: "profanityOrCrudeHumor") + } + + public static var sexualContentGraphicAndNudity: Self { + .init(rawValue: "sexualContentGraphicAndNudity") + } + + public static var sexualContentOrNudity: Self { + .init(rawValue: "sexualContentOrNudity") + } + + public static var unrestrictedWebAccess: Self { + .init(rawValue: "unrestrictedWebAccess") + } + + public static var violenceCartoonOrFantasy: Self { + .init(rawValue: "violenceCartoonOrFantasy") + } + + public static var violenceRealistic: Self { + .init(rawValue: "violenceRealistic") } + public static var violenceRealisticProlongedGraphicOrSadistic: Self { + .init(rawValue: "violenceRealisticProlongedGraphicOrSadistic") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "alcoholTobaccoOrDrugUseOrReferences": self = .alcoholTobaccoOrDrugUseOrReferences - case "contests": self = .contests - case "gambling": self = .gambling - case "gamblingAndContests": self = .gamblingAndContests - case "gamblingSimulated": self = .gamblingSimulated - case "horrorOrFearThemes": self = .horrorOrFearThemes - case "kidsAgeBand": self = .kidsAgeBand - case "matureOrSuggestiveThemes": self = .matureOrSuggestiveThemes - case "medicalOrTreatmentInformation": self = .medicalOrTreatmentInformation - case "profanityOrCrudeHumor": self = .profanityOrCrudeHumor - case "seventeenPlus": self = .seventeenPlus - case "sexualContentGraphicAndNudity": self = .sexualContentGraphicAndNudity - case "sexualContentOrNudity": self = .sexualContentOrNudity - case "unrestrictedWebAccess": self = .unrestrictedWebAccess - case "violenceCartoonOrFantasy": self = .violenceCartoonOrFantasy - case "violenceRealistic": self = .violenceRealistic - case "violenceRealisticProlongedGraphicOrSadistic": self = .violenceRealisticProlongedGraphicOrSadistic - default: self = .unknown(rawValue) - } - } - } - - public enum AppClipDefaultExperiences: Hashable, Codable, RawRepresentable { - case action - case appClip - case appClipAppStoreReviewDetail - case appClipDefaultExperienceLocalizations - case appClipDefaultExperienceTemplate - case releaseWithAppStoreVersion - case unknown(String) - - public var rawValue: String { - switch self { - case .action: return "action" - case .appClip: return "appClip" - case .appClipAppStoreReviewDetail: return "appClipAppStoreReviewDetail" - case .appClipDefaultExperienceLocalizations: return "appClipDefaultExperienceLocalizations" - case .appClipDefaultExperienceTemplate: return "appClipDefaultExperienceTemplate" - case .releaseWithAppStoreVersion: return "releaseWithAppStoreVersion" - case .unknown(let rawValue): return rawValue - } + self.rawValue = rawValue } + } + + public struct AlternativeDistributionPackages: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var versions: Self { + .init(rawValue: "versions") + } + + public var description: String { + rawValue + } + + public var rawValue: String public init(rawValue: String) { - switch rawValue { - case "action": self = .action - case "appClip": self = .appClip - case "appClipAppStoreReviewDetail": self = .appClipAppStoreReviewDetail - case "appClipDefaultExperienceLocalizations": self = .appClipDefaultExperienceLocalizations - case "appClipDefaultExperienceTemplate": self = .appClipDefaultExperienceTemplate - case "releaseWithAppStoreVersion": self = .releaseWithAppStoreVersion - default: self = .unknown(rawValue) - } - } - } - - public enum AppStoreReviewDetails: Hashable, Codable, RawRepresentable { - case appStoreReviewAttachments - case appStoreVersion - case contactEmail - case contactFirstName - case contactLastName - case contactPhone - case demoAccountName - case demoAccountPassword - case demoAccountRequired - case notes - case unknown(String) - - public var rawValue: String { - switch self { - case .appStoreReviewAttachments: return "appStoreReviewAttachments" - case .appStoreVersion: return "appStoreVersion" - case .contactEmail: return "contactEmail" - case .contactFirstName: return "contactFirstName" - case .contactLastName: return "contactLastName" - case .contactPhone: return "contactPhone" - case .demoAccountName: return "demoAccountName" - case .demoAccountPassword: return "demoAccountPassword" - case .demoAccountRequired: return "demoAccountRequired" - case .notes: return "notes" - case .unknown(let rawValue): return rawValue - } + self.rawValue = rawValue + } + } + + public struct AppClipDefaultExperiences: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var action: Self { + .init(rawValue: "action") + } + + public static var appClip: Self { + .init(rawValue: "appClip") + } + + public static var appClipAppStoreReviewDetail: Self { + .init(rawValue: "appClipAppStoreReviewDetail") + } + + public static var appClipDefaultExperienceLocalizations: Self { + .init(rawValue: "appClipDefaultExperienceLocalizations") } + public static var releaseWithAppStoreVersion: Self { + .init(rawValue: "releaseWithAppStoreVersion") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "appStoreReviewAttachments": self = .appStoreReviewAttachments - case "appStoreVersion": self = .appStoreVersion - case "contactEmail": self = .contactEmail - case "contactFirstName": self = .contactFirstName - case "contactLastName": self = .contactLastName - case "contactPhone": self = .contactPhone - case "demoAccountName": self = .demoAccountName - case "demoAccountPassword": self = .demoAccountPassword - case "demoAccountRequired": self = .demoAccountRequired - case "notes": self = .notes - default: self = .unknown(rawValue) - } - } - } - - public enum AppStoreVersionExperiments: Hashable, Codable, RawRepresentable { - case app - case appStoreVersion - case appStoreVersionExperimentTreatments - case controlVersions - case endDate - case latestControlVersion - case name - case platform - case reviewRequired - case startDate - case started - case state - case trafficProportion - case unknown(String) - - public var rawValue: String { - switch self { - case .app: return "app" - case .appStoreVersion: return "appStoreVersion" - case .appStoreVersionExperimentTreatments: return "appStoreVersionExperimentTreatments" - case .controlVersions: return "controlVersions" - case .endDate: return "endDate" - case .latestControlVersion: return "latestControlVersion" - case .name: return "name" - case .platform: return "platform" - case .reviewRequired: return "reviewRequired" - case .startDate: return "startDate" - case .started: return "started" - case .state: return "state" - case .trafficProportion: return "trafficProportion" - case .unknown(let rawValue): return rawValue - } + self.rawValue = rawValue + } + } + + public struct AppStoreReviewDetails: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var appStoreReviewAttachments: Self { + .init(rawValue: "appStoreReviewAttachments") + } + + public static var appStoreVersion: Self { + .init(rawValue: "appStoreVersion") + } + + public static var contactEmail: Self { + .init(rawValue: "contactEmail") + } + + public static var contactFirstName: Self { + .init(rawValue: "contactFirstName") } + public static var contactLastName: Self { + .init(rawValue: "contactLastName") + } + + public static var contactPhone: Self { + .init(rawValue: "contactPhone") + } + + public static var demoAccountName: Self { + .init(rawValue: "demoAccountName") + } + + public static var demoAccountPassword: Self { + .init(rawValue: "demoAccountPassword") + } + + public static var demoAccountRequired: Self { + .init(rawValue: "demoAccountRequired") + } + + public static var notes: Self { + .init(rawValue: "notes") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "app": self = .app - case "appStoreVersion": self = .appStoreVersion - case "appStoreVersionExperimentTreatments": self = .appStoreVersionExperimentTreatments - case "controlVersions": self = .controlVersions - case "endDate": self = .endDate - case "latestControlVersion": self = .latestControlVersion - case "name": self = .name - case "platform": self = .platform - case "reviewRequired": self = .reviewRequired - case "startDate": self = .startDate - case "started": self = .started - case "state": self = .state - case "trafficProportion": self = .trafficProportion - default: self = .unknown(rawValue) - } - } - } - - public enum AppStoreVersionLocalizations: Hashable, Codable, RawRepresentable { - case appPreviewSets - case appScreenshotSets - case appStoreVersion - case description - case keywords - case locale - case marketingUrl - case promotionalText - case supportUrl - case whatsNew - case unknown(String) - - public var rawValue: String { - switch self { - case .appPreviewSets: return "appPreviewSets" - case .appScreenshotSets: return "appScreenshotSets" - case .appStoreVersion: return "appStoreVersion" - case .description: return "description" - case .keywords: return "keywords" - case .locale: return "locale" - case .marketingUrl: return "marketingUrl" - case .promotionalText: return "promotionalText" - case .supportUrl: return "supportUrl" - case .whatsNew: return "whatsNew" - case .unknown(let rawValue): return rawValue - } + self.rawValue = rawValue + } + } + + public struct AppStoreVersionExperiments: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var app: Self { + .init(rawValue: "app") + } + + public static var appStoreVersion: Self { + .init(rawValue: "appStoreVersion") + } + + public static var appStoreVersionExperimentTreatments: Self { + .init(rawValue: "appStoreVersionExperimentTreatments") + } + + public static var controlVersions: Self { + .init(rawValue: "controlVersions") + } + + public static var endDate: Self { + .init(rawValue: "endDate") } + public static var latestControlVersion: Self { + .init(rawValue: "latestControlVersion") + } + + public static var name: Self { + .init(rawValue: "name") + } + + public static var platform: Self { + .init(rawValue: "platform") + } + + public static var reviewRequired: Self { + .init(rawValue: "reviewRequired") + } + + public static var startDate: Self { + .init(rawValue: "startDate") + } + + public static var state: Self { + .init(rawValue: "state") + } + + public static var trafficProportion: Self { + .init(rawValue: "trafficProportion") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "appPreviewSets": self = .appPreviewSets - case "appScreenshotSets": self = .appScreenshotSets - case "appStoreVersion": self = .appStoreVersion - case "description": self = .description - case "keywords": self = .keywords - case "locale": self = .locale - case "marketingUrl": self = .marketingUrl - case "promotionalText": self = .promotionalText - case "supportUrl": self = .supportUrl - case "whatsNew": self = .whatsNew - default: self = .unknown(rawValue) - } - } - } - - public enum AppStoreVersionPhasedReleases: Hashable, Codable, RawRepresentable { - case appStoreVersion - case currentDayNumber - case phasedReleaseState - case startDate - case totalPauseDuration - case unknown(String) - - public var rawValue: String { - switch self { - case .appStoreVersion: return "appStoreVersion" - case .currentDayNumber: return "currentDayNumber" - case .phasedReleaseState: return "phasedReleaseState" - case .startDate: return "startDate" - case .totalPauseDuration: return "totalPauseDuration" - case .unknown(let rawValue): return rawValue - } + self.rawValue = rawValue + } + } + + public struct AppStoreVersionLocalizations: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var appPreviewSets: Self { + .init(rawValue: "appPreviewSets") + } + + public static var appScreenshotSets: Self { + .init(rawValue: "appScreenshotSets") + } + + public static var appStoreVersion: Self { + .init(rawValue: "appStoreVersion") + } + + public static var description: Self { + .init(rawValue: "description") + } + + public static var keywords: Self { + .init(rawValue: "keywords") + } + + public static var locale: Self { + .init(rawValue: "locale") + } + + public static var marketingUrl: Self { + .init(rawValue: "marketingUrl") + } + + public static var promotionalText: Self { + .init(rawValue: "promotionalText") + } + + public static var supportUrl: Self { + .init(rawValue: "supportUrl") + } + + public static var whatsNew: Self { + .init(rawValue: "whatsNew") + } + + public var description: String { + rawValue } + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct AppStoreVersionPhasedReleases: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var currentDayNumber: Self { + .init(rawValue: "currentDayNumber") + } + + public static var phasedReleaseState: Self { + .init(rawValue: "phasedReleaseState") + } + + public static var startDate: Self { + .init(rawValue: "startDate") + } + + public static var totalPauseDuration: Self { + .init(rawValue: "totalPauseDuration") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "appStoreVersion": self = .appStoreVersion - case "currentDayNumber": self = .currentDayNumber - case "phasedReleaseState": self = .phasedReleaseState - case "startDate": self = .startDate - case "totalPauseDuration": self = .totalPauseDuration - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum AppStoreVersionSubmissions: Hashable, Codable, RawRepresentable { - case appStoreVersion - case unknown(String) + public struct AppStoreVersionSubmissions: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var appStoreVersion: Self { + .init(rawValue: "appStoreVersion") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct AppStoreVersions: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var ageRatingDeclaration: Self { + .init(rawValue: "ageRatingDeclaration") + } + + public static var alternativeDistributionPackage: Self { + .init(rawValue: "alternativeDistributionPackage") + } + + public static var app: Self { + .init(rawValue: "app") + } + + public static var appClipDefaultExperience: Self { + .init(rawValue: "appClipDefaultExperience") + } + + public static var appStoreReviewDetail: Self { + .init(rawValue: "appStoreReviewDetail") + } + + public static var appStoreState: Self { + .init(rawValue: "appStoreState") + } + + public static var appStoreVersionExperiments: Self { + .init(rawValue: "appStoreVersionExperiments") + } + + public static var appStoreVersionExperimentsV2: Self { + .init(rawValue: "appStoreVersionExperimentsV2") + } - public var rawValue: String { - switch self { - case .appStoreVersion: return "appStoreVersion" - case .unknown(let rawValue): return rawValue - } + public static var appStoreVersionLocalizations: Self { + .init(rawValue: "appStoreVersionLocalizations") } + public static var appStoreVersionPhasedRelease: Self { + .init(rawValue: "appStoreVersionPhasedRelease") + } + + public static var appStoreVersionSubmission: Self { + .init(rawValue: "appStoreVersionSubmission") + } + + public static var appVersionState: Self { + .init(rawValue: "appVersionState") + } + + public static var build: Self { + .init(rawValue: "build") + } + + public static var copyright: Self { + .init(rawValue: "copyright") + } + + public static var createdDate: Self { + .init(rawValue: "createdDate") + } + + public static var customerReviews: Self { + .init(rawValue: "customerReviews") + } + + public static var downloadable: Self { + .init(rawValue: "downloadable") + } + + public static var earliestReleaseDate: Self { + .init(rawValue: "earliestReleaseDate") + } + + public static var gameCenterAppVersion: Self { + .init(rawValue: "gameCenterAppVersion") + } + + public static var platform: Self { + .init(rawValue: "platform") + } + + public static var releaseType: Self { + .init(rawValue: "releaseType") + } + + public static var reviewType: Self { + .init(rawValue: "reviewType") + } + + public static var routingAppCoverage: Self { + .init(rawValue: "routingAppCoverage") + } + + public static var usesIdfa: Self { + .init(rawValue: "usesIdfa") + } + + public static var versionString: Self { + .init(rawValue: "versionString") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "appStoreVersion": self = .appStoreVersion - default: self = .unknown(rawValue) - } - } - } - - public enum AppStoreVersions: Hashable, Codable, RawRepresentable { - case ageRatingDeclaration - case app - case appClipDefaultExperience - case appStoreReviewDetail - case appStoreState - case appStoreVersionExperiments - case appStoreVersionExperimentsV2 - case appStoreVersionLocalizations - case appStoreVersionPhasedRelease - case appStoreVersionSubmission - case build - case copyright - case createdDate - case customerReviews - case downloadable - case earliestReleaseDate - case platform - case releaseType - case routingAppCoverage - case versionString - case unknown(String) - - public var rawValue: String { - switch self { - case .ageRatingDeclaration: return "ageRatingDeclaration" - case .app: return "app" - case .appClipDefaultExperience: return "appClipDefaultExperience" - case .appStoreReviewDetail: return "appStoreReviewDetail" - case .appStoreState: return "appStoreState" - case .appStoreVersionExperiments: return "appStoreVersionExperiments" - case .appStoreVersionExperimentsV2: return "appStoreVersionExperimentsV2" - case .appStoreVersionLocalizations: return "appStoreVersionLocalizations" - case .appStoreVersionPhasedRelease: return "appStoreVersionPhasedRelease" - case .appStoreVersionSubmission: return "appStoreVersionSubmission" - case .build: return "build" - case .copyright: return "copyright" - case .createdDate: return "createdDate" - case .customerReviews: return "customerReviews" - case .downloadable: return "downloadable" - case .earliestReleaseDate: return "earliestReleaseDate" - case .platform: return "platform" - case .releaseType: return "releaseType" - case .routingAppCoverage: return "routingAppCoverage" - case .versionString: return "versionString" - case .unknown(let rawValue): return rawValue - } + self.rawValue = rawValue + } + } + + public struct Apps: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var accessibilityDeclarations: Self { + .init(rawValue: "accessibilityDeclarations") + } + + public static var accessibilityUrl: Self { + .init(rawValue: "accessibilityUrl") + } + + public static var alternativeDistributionKey: Self { + .init(rawValue: "alternativeDistributionKey") + } + + public static var analyticsReportRequests: Self { + .init(rawValue: "analyticsReportRequests") + } + + public static var appAvailabilityV2: Self { + .init(rawValue: "appAvailabilityV2") + } + + public static var appClips: Self { + .init(rawValue: "appClips") + } + + public static var appCustomProductPages: Self { + .init(rawValue: "appCustomProductPages") + } + + public static var appEncryptionDeclarations: Self { + .init(rawValue: "appEncryptionDeclarations") + } + + public static var appEvents: Self { + .init(rawValue: "appEvents") + } + + public static var appInfos: Self { + .init(rawValue: "appInfos") + } + + public static var appPricePoints: Self { + .init(rawValue: "appPricePoints") + } + + public static var appPriceSchedule: Self { + .init(rawValue: "appPriceSchedule") + } + + public static var appStoreVersionExperimentsV2: Self { + .init(rawValue: "appStoreVersionExperimentsV2") + } + + public static var appStoreVersions: Self { + .init(rawValue: "appStoreVersions") + } + + public static var backgroundAssets: Self { + .init(rawValue: "backgroundAssets") } + public static var betaAppLocalizations: Self { + .init(rawValue: "betaAppLocalizations") + } + + public static var betaAppReviewDetail: Self { + .init(rawValue: "betaAppReviewDetail") + } + + public static var betaFeedbackCrashSubmissions: Self { + .init(rawValue: "betaFeedbackCrashSubmissions") + } + + public static var betaFeedbackScreenshotSubmissions: Self { + .init(rawValue: "betaFeedbackScreenshotSubmissions") + } + + public static var betaGroups: Self { + .init(rawValue: "betaGroups") + } + + public static var betaLicenseAgreement: Self { + .init(rawValue: "betaLicenseAgreement") + } + + public static var betaTesters: Self { + .init(rawValue: "betaTesters") + } + + public static var builds: Self { + .init(rawValue: "builds") + } + + public static var bundleId: Self { + .init(rawValue: "bundleId") + } + + public static var ciProduct: Self { + .init(rawValue: "ciProduct") + } + + public static var contentRightsDeclaration: Self { + .init(rawValue: "contentRightsDeclaration") + } + + public static var customerReviewSummarizations: Self { + .init(rawValue: "customerReviewSummarizations") + } + + public static var customerReviews: Self { + .init(rawValue: "customerReviews") + } + + public static var endUserLicenseAgreement: Self { + .init(rawValue: "endUserLicenseAgreement") + } + + public static var gameCenterDetail: Self { + .init(rawValue: "gameCenterDetail") + } + + public static var gameCenterEnabledVersions: Self { + .init(rawValue: "gameCenterEnabledVersions") + } + + public static var inAppPurchases: Self { + .init(rawValue: "inAppPurchases") + } + + public static var inAppPurchasesV2: Self { + .init(rawValue: "inAppPurchasesV2") + } + + public static var isOrEverWasMadeForKids: Self { + .init(rawValue: "isOrEverWasMadeForKids") + } + + public static var marketplaceSearchDetail: Self { + .init(rawValue: "marketplaceSearchDetail") + } + + public static var name: Self { + .init(rawValue: "name") + } + + public static var perfPowerMetrics: Self { + .init(rawValue: "perfPowerMetrics") + } + + public static var preReleaseVersions: Self { + .init(rawValue: "preReleaseVersions") + } + + public static var primaryLocale: Self { + .init(rawValue: "primaryLocale") + } + + public static var promotedPurchases: Self { + .init(rawValue: "promotedPurchases") + } + + public static var reviewSubmissions: Self { + .init(rawValue: "reviewSubmissions") + } + + public static var sku: Self { + .init(rawValue: "sku") + } + + public static var streamlinedPurchasingEnabled: Self { + .init(rawValue: "streamlinedPurchasingEnabled") + } + + public static var subscriptionGracePeriod: Self { + .init(rawValue: "subscriptionGracePeriod") + } + + public static var subscriptionGroups: Self { + .init(rawValue: "subscriptionGroups") + } + + public static var subscriptionStatusUrl: Self { + .init(rawValue: "subscriptionStatusUrl") + } + + public static var subscriptionStatusUrlForSandbox: Self { + .init(rawValue: "subscriptionStatusUrlForSandbox") + } + + public static var subscriptionStatusUrlVersion: Self { + .init(rawValue: "subscriptionStatusUrlVersion") + } + + public static var subscriptionStatusUrlVersionForSandbox: Self { + .init(rawValue: "subscriptionStatusUrlVersionForSandbox") + } + + public static var webhooks: Self { + .init(rawValue: "webhooks") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "ageRatingDeclaration": self = .ageRatingDeclaration - case "app": self = .app - case "appClipDefaultExperience": self = .appClipDefaultExperience - case "appStoreReviewDetail": self = .appStoreReviewDetail - case "appStoreState": self = .appStoreState - case "appStoreVersionExperiments": self = .appStoreVersionExperiments - case "appStoreVersionExperimentsV2": self = .appStoreVersionExperimentsV2 - case "appStoreVersionLocalizations": self = .appStoreVersionLocalizations - case "appStoreVersionPhasedRelease": self = .appStoreVersionPhasedRelease - case "appStoreVersionSubmission": self = .appStoreVersionSubmission - case "build": self = .build - case "copyright": self = .copyright - case "createdDate": self = .createdDate - case "customerReviews": self = .customerReviews - case "downloadable": self = .downloadable - case "earliestReleaseDate": self = .earliestReleaseDate - case "platform": self = .platform - case "releaseType": self = .releaseType - case "routingAppCoverage": self = .routingAppCoverage - case "versionString": self = .versionString - default: self = .unknown(rawValue) - } - } - } - - public enum Apps: Hashable, Codable, RawRepresentable { - case appAvailability - case appClips - case appCustomProductPages - case appEncryptionDeclarations - case appEvents - case appInfos - case appPricePoints - case appPriceSchedule - case appStoreVersionExperimentsV2 - case appStoreVersions - case availableInNewTerritories - case availableTerritories - case betaAppLocalizations - case betaAppReviewDetail - case betaGroups - case betaLicenseAgreement - case betaTesters - case builds - case bundleId - case ciProduct - case contentRightsDeclaration - case customerReviews - case endUserLicenseAgreement - case gameCenterDetail - case gameCenterEnabledVersions - case inAppPurchases - case inAppPurchasesV2 - case isOrEverWasMadeForKids - case name - case perfPowerMetrics - case preOrder - case preReleaseVersions - case pricePoints - case prices - case primaryLocale - case promotedPurchases - case reviewSubmissions - case sku - case subscriptionGracePeriod - case subscriptionGroups - case subscriptionStatusUrl - case subscriptionStatusUrlForSandbox - case subscriptionStatusUrlVersion - case subscriptionStatusUrlVersionForSandbox - case unknown(String) - - public var rawValue: String { - switch self { - case .appAvailability: return "appAvailability" - case .appClips: return "appClips" - case .appCustomProductPages: return "appCustomProductPages" - case .appEncryptionDeclarations: return "appEncryptionDeclarations" - case .appEvents: return "appEvents" - case .appInfos: return "appInfos" - case .appPricePoints: return "appPricePoints" - case .appPriceSchedule: return "appPriceSchedule" - case .appStoreVersionExperimentsV2: return "appStoreVersionExperimentsV2" - case .appStoreVersions: return "appStoreVersions" - case .availableInNewTerritories: return "availableInNewTerritories" - case .availableTerritories: return "availableTerritories" - case .betaAppLocalizations: return "betaAppLocalizations" - case .betaAppReviewDetail: return "betaAppReviewDetail" - case .betaGroups: return "betaGroups" - case .betaLicenseAgreement: return "betaLicenseAgreement" - case .betaTesters: return "betaTesters" - case .builds: return "builds" - case .bundleId: return "bundleId" - case .ciProduct: return "ciProduct" - case .contentRightsDeclaration: return "contentRightsDeclaration" - case .customerReviews: return "customerReviews" - case .endUserLicenseAgreement: return "endUserLicenseAgreement" - case .gameCenterDetail: return "gameCenterDetail" - case .gameCenterEnabledVersions: return "gameCenterEnabledVersions" - case .inAppPurchases: return "inAppPurchases" - case .inAppPurchasesV2: return "inAppPurchasesV2" - case .isOrEverWasMadeForKids: return "isOrEverWasMadeForKids" - case .name: return "name" - case .perfPowerMetrics: return "perfPowerMetrics" - case .preOrder: return "preOrder" - case .preReleaseVersions: return "preReleaseVersions" - case .pricePoints: return "pricePoints" - case .prices: return "prices" - case .primaryLocale: return "primaryLocale" - case .promotedPurchases: return "promotedPurchases" - case .reviewSubmissions: return "reviewSubmissions" - case .sku: return "sku" - case .subscriptionGracePeriod: return "subscriptionGracePeriod" - case .subscriptionGroups: return "subscriptionGroups" - case .subscriptionStatusUrl: return "subscriptionStatusUrl" - case .subscriptionStatusUrlForSandbox: return "subscriptionStatusUrlForSandbox" - case .subscriptionStatusUrlVersion: return "subscriptionStatusUrlVersion" - case .subscriptionStatusUrlVersionForSandbox: return "subscriptionStatusUrlVersionForSandbox" - case .unknown(let rawValue): return rawValue - } + self.rawValue = rawValue + } + } + + public struct Builds: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var app: Self { + .init(rawValue: "app") + } + + public static var appEncryptionDeclaration: Self { + .init(rawValue: "appEncryptionDeclaration") + } + + public static var appStoreVersion: Self { + .init(rawValue: "appStoreVersion") } + public static var betaAppReviewSubmission: Self { + .init(rawValue: "betaAppReviewSubmission") + } + + public static var betaBuildLocalizations: Self { + .init(rawValue: "betaBuildLocalizations") + } + + public static var betaGroups: Self { + .init(rawValue: "betaGroups") + } + + public static var buildAudienceType: Self { + .init(rawValue: "buildAudienceType") + } + + public static var buildBetaDetail: Self { + .init(rawValue: "buildBetaDetail") + } + + public static var buildBundles: Self { + .init(rawValue: "buildBundles") + } + + public static var computedMinMacOsVersion: Self { + .init(rawValue: "computedMinMacOsVersion") + } + + public static var computedMinVisionOsVersion: Self { + .init(rawValue: "computedMinVisionOsVersion") + } + + public static var diagnosticSignatures: Self { + .init(rawValue: "diagnosticSignatures") + } + + public static var expirationDate: Self { + .init(rawValue: "expirationDate") + } + + public static var expired: Self { + .init(rawValue: "expired") + } + + public static var iconAssetToken: Self { + .init(rawValue: "iconAssetToken") + } + + public static var icons: Self { + .init(rawValue: "icons") + } + + public static var individualTesters: Self { + .init(rawValue: "individualTesters") + } + + public static var lsMinimumSystemVersion: Self { + .init(rawValue: "lsMinimumSystemVersion") + } + + public static var minOsVersion: Self { + .init(rawValue: "minOsVersion") + } + + public static var perfPowerMetrics: Self { + .init(rawValue: "perfPowerMetrics") + } + + public static var preReleaseVersion: Self { + .init(rawValue: "preReleaseVersion") + } + + public static var processingState: Self { + .init(rawValue: "processingState") + } + + public static var uploadedDate: Self { + .init(rawValue: "uploadedDate") + } + + public static var usesNonExemptEncryption: Self { + .init(rawValue: "usesNonExemptEncryption") + } + + public static var version: Self { + .init(rawValue: "version") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "appAvailability": self = .appAvailability - case "appClips": self = .appClips - case "appCustomProductPages": self = .appCustomProductPages - case "appEncryptionDeclarations": self = .appEncryptionDeclarations - case "appEvents": self = .appEvents - case "appInfos": self = .appInfos - case "appPricePoints": self = .appPricePoints - case "appPriceSchedule": self = .appPriceSchedule - case "appStoreVersionExperimentsV2": self = .appStoreVersionExperimentsV2 - case "appStoreVersions": self = .appStoreVersions - case "availableInNewTerritories": self = .availableInNewTerritories - case "availableTerritories": self = .availableTerritories - case "betaAppLocalizations": self = .betaAppLocalizations - case "betaAppReviewDetail": self = .betaAppReviewDetail - case "betaGroups": self = .betaGroups - case "betaLicenseAgreement": self = .betaLicenseAgreement - case "betaTesters": self = .betaTesters - case "builds": self = .builds - case "bundleId": self = .bundleId - case "ciProduct": self = .ciProduct - case "contentRightsDeclaration": self = .contentRightsDeclaration - case "customerReviews": self = .customerReviews - case "endUserLicenseAgreement": self = .endUserLicenseAgreement - case "gameCenterDetail": self = .gameCenterDetail - case "gameCenterEnabledVersions": self = .gameCenterEnabledVersions - case "inAppPurchases": self = .inAppPurchases - case "inAppPurchasesV2": self = .inAppPurchasesV2 - case "isOrEverWasMadeForKids": self = .isOrEverWasMadeForKids - case "name": self = .name - case "perfPowerMetrics": self = .perfPowerMetrics - case "preOrder": self = .preOrder - case "preReleaseVersions": self = .preReleaseVersions - case "pricePoints": self = .pricePoints - case "prices": self = .prices - case "primaryLocale": self = .primaryLocale - case "promotedPurchases": self = .promotedPurchases - case "reviewSubmissions": self = .reviewSubmissions - case "sku": self = .sku - case "subscriptionGracePeriod": self = .subscriptionGracePeriod - case "subscriptionGroups": self = .subscriptionGroups - case "subscriptionStatusUrl": self = .subscriptionStatusUrl - case "subscriptionStatusUrlForSandbox": self = .subscriptionStatusUrlForSandbox - case "subscriptionStatusUrlVersion": self = .subscriptionStatusUrlVersion - case "subscriptionStatusUrlVersionForSandbox": self = .subscriptionStatusUrlVersionForSandbox - default: self = .unknown(rawValue) - } - } - } - - public enum Builds: Hashable, Codable, RawRepresentable { - case app - case appEncryptionDeclaration - case appStoreVersion - case betaAppReviewSubmission - case betaBuildLocalizations - case betaGroups - case buildAudienceType - case buildBetaDetail - case buildBundles - case computedMinMacOsVersion - case diagnosticSignatures - case expirationDate - case expired - case iconAssetToken - case icons - case individualTesters - case lsMinimumSystemVersion - case minOsVersion - case perfPowerMetrics - case preReleaseVersion - case processingState - case uploadedDate - case usesNonExemptEncryption - case version - case unknown(String) - - public var rawValue: String { - switch self { - case .app: return "app" - case .appEncryptionDeclaration: return "appEncryptionDeclaration" - case .appStoreVersion: return "appStoreVersion" - case .betaAppReviewSubmission: return "betaAppReviewSubmission" - case .betaBuildLocalizations: return "betaBuildLocalizations" - case .betaGroups: return "betaGroups" - case .buildAudienceType: return "buildAudienceType" - case .buildBetaDetail: return "buildBetaDetail" - case .buildBundles: return "buildBundles" - case .computedMinMacOsVersion: return "computedMinMacOsVersion" - case .diagnosticSignatures: return "diagnosticSignatures" - case .expirationDate: return "expirationDate" - case .expired: return "expired" - case .iconAssetToken: return "iconAssetToken" - case .icons: return "icons" - case .individualTesters: return "individualTesters" - case .lsMinimumSystemVersion: return "lsMinimumSystemVersion" - case .minOsVersion: return "minOsVersion" - case .perfPowerMetrics: return "perfPowerMetrics" - case .preReleaseVersion: return "preReleaseVersion" - case .processingState: return "processingState" - case .uploadedDate: return "uploadedDate" - case .usesNonExemptEncryption: return "usesNonExemptEncryption" - case .version: return "version" - case .unknown(let rawValue): return rawValue - } + self.rawValue = rawValue + } + } + + public struct GameCenterAppVersions: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var appStoreVersion: Self { + .init(rawValue: "appStoreVersion") + } + + public static var compatibilityVersions: Self { + .init(rawValue: "compatibilityVersions") + } + + public static var enabled: Self { + .init(rawValue: "enabled") + } + + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "app": self = .app - case "appEncryptionDeclaration": self = .appEncryptionDeclaration - case "appStoreVersion": self = .appStoreVersion - case "betaAppReviewSubmission": self = .betaAppReviewSubmission - case "betaBuildLocalizations": self = .betaBuildLocalizations - case "betaGroups": self = .betaGroups - case "buildAudienceType": self = .buildAudienceType - case "buildBetaDetail": self = .buildBetaDetail - case "buildBundles": self = .buildBundles - case "computedMinMacOsVersion": self = .computedMinMacOsVersion - case "diagnosticSignatures": self = .diagnosticSignatures - case "expirationDate": self = .expirationDate - case "expired": self = .expired - case "iconAssetToken": self = .iconAssetToken - case "icons": self = .icons - case "individualTesters": self = .individualTesters - case "lsMinimumSystemVersion": self = .lsMinimumSystemVersion - case "minOsVersion": self = .minOsVersion - case "perfPowerMetrics": self = .perfPowerMetrics - case "preReleaseVersion": self = .preReleaseVersion - case "processingState": self = .processingState - case "uploadedDate": self = .uploadedDate - case "usesNonExemptEncryption": self = .usesNonExemptEncryption - case "version": self = .version - default: self = .unknown(rawValue) - } - } - } - - public enum RoutingAppCoverages: Hashable, Codable, RawRepresentable { - case appStoreVersion - case assetDeliveryState - case fileName - case fileSize - case sourceFileChecksum - case uploadOperations - case uploaded - case unknown(String) - - public var rawValue: String { - switch self { - case .appStoreVersion: return "appStoreVersion" - case .assetDeliveryState: return "assetDeliveryState" - case .fileName: return "fileName" - case .fileSize: return "fileSize" - case .sourceFileChecksum: return "sourceFileChecksum" - case .uploadOperations: return "uploadOperations" - case .uploaded: return "uploaded" - case .unknown(let rawValue): return rawValue - } + self.rawValue = rawValue + } + } + + public struct RoutingAppCoverages: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var appStoreVersion: Self { + .init(rawValue: "appStoreVersion") } + public static var assetDeliveryState: Self { + .init(rawValue: "assetDeliveryState") + } + + public static var fileName: Self { + .init(rawValue: "fileName") + } + + public static var fileSize: Self { + .init(rawValue: "fileSize") + } + + public static var sourceFileChecksum: Self { + .init(rawValue: "sourceFileChecksum") + } + + public static var uploadOperations: Self { + .init(rawValue: "uploadOperations") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "appStoreVersion": self = .appStoreVersion - case "assetDeliveryState": self = .assetDeliveryState - case "fileName": self = .fileName - case "fileSize": self = .fileSize - case "sourceFileChecksum": self = .sourceFileChecksum - case "uploadOperations": self = .uploadOperations - case "uploaded": self = .uploaded - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } @@ -768,6 +965,11 @@ extension V1.GameCenterAppVersions.ById.AppStoreVersion.GET { .init(key: "fields[ageRatingDeclarations]") } + /// the fields to include for returned resources of type alternativeDistributionPackages + public static var alternativeDistributionPackages: Relation<[AlternativeDistributionPackages]?> { + .init(key: "fields[alternativeDistributionPackages]") + } + /// the fields to include for returned resources of type appClipDefaultExperiences public static var appClipDefaultExperiences: Relation<[AppClipDefaultExperiences]?> { .init(key: "fields[appClipDefaultExperiences]") @@ -813,6 +1015,11 @@ extension V1.GameCenterAppVersions.ById.AppStoreVersion.GET { .init(key: "fields[builds]") } + /// the fields to include for returned resources of type gameCenterAppVersions + public static var gameCenterAppVersions: Relation<[GameCenterAppVersions]?> { + .init(key: "fields[gameCenterAppVersions]") + } + /// the fields to include for returned resources of type routingAppCoverages public static var routingAppCoverages: Relation<[RoutingAppCoverages]?> { .init(key: "fields[routingAppCoverages]") @@ -826,52 +1033,67 @@ extension V1.GameCenterAppVersions.ById.AppStoreVersion.GET { } } - public enum Include: Hashable, Codable, RawRepresentable { - case ageRatingDeclaration - case app - case appClipDefaultExperience - case appStoreReviewDetail - case appStoreVersionExperiments - case appStoreVersionExperimentsV2 - case appStoreVersionLocalizations - case appStoreVersionPhasedRelease - case appStoreVersionSubmission - case build - case routingAppCoverage - case unknown(String) - - public var rawValue: String { - switch self { - case .ageRatingDeclaration: return "ageRatingDeclaration" - case .app: return "app" - case .appClipDefaultExperience: return "appClipDefaultExperience" - case .appStoreReviewDetail: return "appStoreReviewDetail" - case .appStoreVersionExperiments: return "appStoreVersionExperiments" - case .appStoreVersionExperimentsV2: return "appStoreVersionExperimentsV2" - case .appStoreVersionLocalizations: return "appStoreVersionLocalizations" - case .appStoreVersionPhasedRelease: return "appStoreVersionPhasedRelease" - case .appStoreVersionSubmission: return "appStoreVersionSubmission" - case .build: return "build" - case .routingAppCoverage: return "routingAppCoverage" - case .unknown(let rawValue): return rawValue - } + public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var ageRatingDeclaration: Self { + .init(rawValue: "ageRatingDeclaration") + } + + public static var alternativeDistributionPackage: Self { + .init(rawValue: "alternativeDistributionPackage") } + public static var app: Self { + .init(rawValue: "app") + } + + public static var appClipDefaultExperience: Self { + .init(rawValue: "appClipDefaultExperience") + } + + public static var appStoreReviewDetail: Self { + .init(rawValue: "appStoreReviewDetail") + } + + public static var appStoreVersionExperiments: Self { + .init(rawValue: "appStoreVersionExperiments") + } + + public static var appStoreVersionExperimentsV2: Self { + .init(rawValue: "appStoreVersionExperimentsV2") + } + + public static var appStoreVersionLocalizations: Self { + .init(rawValue: "appStoreVersionLocalizations") + } + + public static var appStoreVersionPhasedRelease: Self { + .init(rawValue: "appStoreVersionPhasedRelease") + } + + public static var appStoreVersionSubmission: Self { + .init(rawValue: "appStoreVersionSubmission") + } + + public static var build: Self { + .init(rawValue: "build") + } + + public static var gameCenterAppVersion: Self { + .init(rawValue: "gameCenterAppVersion") + } + + public static var routingAppCoverage: Self { + .init(rawValue: "routingAppCoverage") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "ageRatingDeclaration": self = .ageRatingDeclaration - case "app": self = .app - case "appClipDefaultExperience": self = .appClipDefaultExperience - case "appStoreReviewDetail": self = .appStoreReviewDetail - case "appStoreVersionExperiments": self = .appStoreVersionExperiments - case "appStoreVersionExperimentsV2": self = .appStoreVersionExperimentsV2 - case "appStoreVersionLocalizations": self = .appStoreVersionLocalizations - case "appStoreVersionPhasedRelease": self = .appStoreVersionPhasedRelease - case "appStoreVersionSubmission": self = .appStoreVersionSubmission - case "build": self = .build - case "routingAppCoverage": self = .routingAppCoverage - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterAppVersions/ById/CompatibilityVersions/GameCenterAppVersionsByIdCompatibilityVersions.GET.9045903.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterAppVersions/ById/CompatibilityVersions/GameCenterAppVersionsByIdCompatibilityVersions.GET.9045903.generated.swift index 5fd0e05c..38686b72 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterAppVersions/ById/CompatibilityVersions/GameCenterAppVersionsByIdCompatibilityVersions.GET.9045903.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterAppVersions/ById/CompatibilityVersions/GameCenterAppVersionsByIdCompatibilityVersions.GET.9045903.generated.swift @@ -52,8 +52,10 @@ extension V1.GameCenterAppVersions.ById.CompatibilityVersions { /// - Returns: **200**, List of GameCenterAppVersions as `GameCenterAppVersionsResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -67,12 +69,18 @@ extension V1.GameCenterAppVersions.ById.CompatibilityVersions { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 404: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -100,104 +108,139 @@ extension V1.GameCenterAppVersions.ById.CompatibilityVersions.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum AppStoreVersions: Hashable, Codable, RawRepresentable { - case ageRatingDeclaration - case app - case appClipDefaultExperience - case appStoreReviewDetail - case appStoreState - case appStoreVersionExperiments - case appStoreVersionExperimentsV2 - case appStoreVersionLocalizations - case appStoreVersionPhasedRelease - case appStoreVersionSubmission - case build - case copyright - case createdDate - case customerReviews - case downloadable - case earliestReleaseDate - case platform - case releaseType - case routingAppCoverage - case versionString - case unknown(String) - - public var rawValue: String { - switch self { - case .ageRatingDeclaration: return "ageRatingDeclaration" - case .app: return "app" - case .appClipDefaultExperience: return "appClipDefaultExperience" - case .appStoreReviewDetail: return "appStoreReviewDetail" - case .appStoreState: return "appStoreState" - case .appStoreVersionExperiments: return "appStoreVersionExperiments" - case .appStoreVersionExperimentsV2: return "appStoreVersionExperimentsV2" - case .appStoreVersionLocalizations: return "appStoreVersionLocalizations" - case .appStoreVersionPhasedRelease: return "appStoreVersionPhasedRelease" - case .appStoreVersionSubmission: return "appStoreVersionSubmission" - case .build: return "build" - case .copyright: return "copyright" - case .createdDate: return "createdDate" - case .customerReviews: return "customerReviews" - case .downloadable: return "downloadable" - case .earliestReleaseDate: return "earliestReleaseDate" - case .platform: return "platform" - case .releaseType: return "releaseType" - case .routingAppCoverage: return "routingAppCoverage" - case .versionString: return "versionString" - case .unknown(let rawValue): return rawValue - } + public struct AppStoreVersions: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var ageRatingDeclaration: Self { + .init(rawValue: "ageRatingDeclaration") + } + + public static var alternativeDistributionPackage: Self { + .init(rawValue: "alternativeDistributionPackage") + } + + public static var app: Self { + .init(rawValue: "app") + } + + public static var appClipDefaultExperience: Self { + .init(rawValue: "appClipDefaultExperience") + } + + public static var appStoreReviewDetail: Self { + .init(rawValue: "appStoreReviewDetail") + } + + public static var appStoreState: Self { + .init(rawValue: "appStoreState") + } + + public static var appStoreVersionExperiments: Self { + .init(rawValue: "appStoreVersionExperiments") + } + + public static var appStoreVersionExperimentsV2: Self { + .init(rawValue: "appStoreVersionExperimentsV2") + } + + public static var appStoreVersionLocalizations: Self { + .init(rawValue: "appStoreVersionLocalizations") + } + + public static var appStoreVersionPhasedRelease: Self { + .init(rawValue: "appStoreVersionPhasedRelease") + } + + public static var appStoreVersionSubmission: Self { + .init(rawValue: "appStoreVersionSubmission") + } + + public static var appVersionState: Self { + .init(rawValue: "appVersionState") + } + + public static var build: Self { + .init(rawValue: "build") + } + + public static var copyright: Self { + .init(rawValue: "copyright") + } + + public static var createdDate: Self { + .init(rawValue: "createdDate") + } + + public static var customerReviews: Self { + .init(rawValue: "customerReviews") } + public static var downloadable: Self { + .init(rawValue: "downloadable") + } + + public static var earliestReleaseDate: Self { + .init(rawValue: "earliestReleaseDate") + } + + public static var gameCenterAppVersion: Self { + .init(rawValue: "gameCenterAppVersion") + } + + public static var platform: Self { + .init(rawValue: "platform") + } + + public static var releaseType: Self { + .init(rawValue: "releaseType") + } + + public static var reviewType: Self { + .init(rawValue: "reviewType") + } + + public static var routingAppCoverage: Self { + .init(rawValue: "routingAppCoverage") + } + + public static var usesIdfa: Self { + .init(rawValue: "usesIdfa") + } + + public static var versionString: Self { + .init(rawValue: "versionString") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "ageRatingDeclaration": self = .ageRatingDeclaration - case "app": self = .app - case "appClipDefaultExperience": self = .appClipDefaultExperience - case "appStoreReviewDetail": self = .appStoreReviewDetail - case "appStoreState": self = .appStoreState - case "appStoreVersionExperiments": self = .appStoreVersionExperiments - case "appStoreVersionExperimentsV2": self = .appStoreVersionExperimentsV2 - case "appStoreVersionLocalizations": self = .appStoreVersionLocalizations - case "appStoreVersionPhasedRelease": self = .appStoreVersionPhasedRelease - case "appStoreVersionSubmission": self = .appStoreVersionSubmission - case "build": self = .build - case "copyright": self = .copyright - case "createdDate": self = .createdDate - case "customerReviews": self = .customerReviews - case "downloadable": self = .downloadable - case "earliestReleaseDate": self = .earliestReleaseDate - case "platform": self = .platform - case "releaseType": self = .releaseType - case "routingAppCoverage": self = .routingAppCoverage - case "versionString": self = .versionString - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum GameCenterAppVersions: Hashable, Codable, RawRepresentable { - case appStoreVersion - case compatibilityVersions - case enabled - case unknown(String) + public struct GameCenterAppVersions: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var appStoreVersion: Self { + .init(rawValue: "appStoreVersion") + } + + public static var compatibilityVersions: Self { + .init(rawValue: "compatibilityVersions") + } + + public static var enabled: Self { + .init(rawValue: "enabled") + } - public var rawValue: String { - switch self { - case .appStoreVersion: return "appStoreVersion" - case .compatibilityVersions: return "compatibilityVersions" - case .enabled: return "enabled" - case .unknown(let rawValue): return rawValue - } + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "appStoreVersion": self = .appStoreVersion - case "compatibilityVersions": self = .compatibilityVersions - case "enabled": self = .enabled - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } @@ -242,25 +285,23 @@ extension V1.GameCenterAppVersions.ById.CompatibilityVersions.GET { } } - public enum Include: Hashable, Codable, RawRepresentable { - case appStoreVersion - case compatibilityVersions - case unknown(String) + public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var appStoreVersion: Self { + .init(rawValue: "appStoreVersion") + } - public var rawValue: String { - switch self { - case .appStoreVersion: return "appStoreVersion" - case .compatibilityVersions: return "compatibilityVersions" - case .unknown(let rawValue): return rawValue - } + public static var compatibilityVersions: Self { + .init(rawValue: "compatibilityVersions") } + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "appStoreVersion": self = .appStoreVersion - case "compatibilityVersions": self = .compatibilityVersions - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterAppVersions/ById/GameCenterAppVersionsById.GET.a2ccb05.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterAppVersions/ById/GameCenterAppVersionsById.GET.a2ccb05.generated.swift index 5bb0e323..3e56d8ac 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterAppVersions/ById/GameCenterAppVersionsById.GET.a2ccb05.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterAppVersions/ById/GameCenterAppVersionsById.GET.a2ccb05.generated.swift @@ -48,8 +48,10 @@ extension V1.GameCenterAppVersions.ById { /// - Returns: **200**, Single GameCenterAppVersion as `GameCenterAppVersionResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -63,12 +65,18 @@ extension V1.GameCenterAppVersions.ById { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 404: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -93,104 +101,139 @@ extension V1.GameCenterAppVersions.ById.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum AppStoreVersions: Hashable, Codable, RawRepresentable { - case ageRatingDeclaration - case app - case appClipDefaultExperience - case appStoreReviewDetail - case appStoreState - case appStoreVersionExperiments - case appStoreVersionExperimentsV2 - case appStoreVersionLocalizations - case appStoreVersionPhasedRelease - case appStoreVersionSubmission - case build - case copyright - case createdDate - case customerReviews - case downloadable - case earliestReleaseDate - case platform - case releaseType - case routingAppCoverage - case versionString - case unknown(String) - - public var rawValue: String { - switch self { - case .ageRatingDeclaration: return "ageRatingDeclaration" - case .app: return "app" - case .appClipDefaultExperience: return "appClipDefaultExperience" - case .appStoreReviewDetail: return "appStoreReviewDetail" - case .appStoreState: return "appStoreState" - case .appStoreVersionExperiments: return "appStoreVersionExperiments" - case .appStoreVersionExperimentsV2: return "appStoreVersionExperimentsV2" - case .appStoreVersionLocalizations: return "appStoreVersionLocalizations" - case .appStoreVersionPhasedRelease: return "appStoreVersionPhasedRelease" - case .appStoreVersionSubmission: return "appStoreVersionSubmission" - case .build: return "build" - case .copyright: return "copyright" - case .createdDate: return "createdDate" - case .customerReviews: return "customerReviews" - case .downloadable: return "downloadable" - case .earliestReleaseDate: return "earliestReleaseDate" - case .platform: return "platform" - case .releaseType: return "releaseType" - case .routingAppCoverage: return "routingAppCoverage" - case .versionString: return "versionString" - case .unknown(let rawValue): return rawValue - } + public struct AppStoreVersions: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var ageRatingDeclaration: Self { + .init(rawValue: "ageRatingDeclaration") + } + + public static var alternativeDistributionPackage: Self { + .init(rawValue: "alternativeDistributionPackage") + } + + public static var app: Self { + .init(rawValue: "app") + } + + public static var appClipDefaultExperience: Self { + .init(rawValue: "appClipDefaultExperience") + } + + public static var appStoreReviewDetail: Self { + .init(rawValue: "appStoreReviewDetail") + } + + public static var appStoreState: Self { + .init(rawValue: "appStoreState") + } + + public static var appStoreVersionExperiments: Self { + .init(rawValue: "appStoreVersionExperiments") + } + + public static var appStoreVersionExperimentsV2: Self { + .init(rawValue: "appStoreVersionExperimentsV2") + } + + public static var appStoreVersionLocalizations: Self { + .init(rawValue: "appStoreVersionLocalizations") + } + + public static var appStoreVersionPhasedRelease: Self { + .init(rawValue: "appStoreVersionPhasedRelease") + } + + public static var appStoreVersionSubmission: Self { + .init(rawValue: "appStoreVersionSubmission") + } + + public static var appVersionState: Self { + .init(rawValue: "appVersionState") + } + + public static var build: Self { + .init(rawValue: "build") + } + + public static var copyright: Self { + .init(rawValue: "copyright") + } + + public static var createdDate: Self { + .init(rawValue: "createdDate") + } + + public static var customerReviews: Self { + .init(rawValue: "customerReviews") } + public static var downloadable: Self { + .init(rawValue: "downloadable") + } + + public static var earliestReleaseDate: Self { + .init(rawValue: "earliestReleaseDate") + } + + public static var gameCenterAppVersion: Self { + .init(rawValue: "gameCenterAppVersion") + } + + public static var platform: Self { + .init(rawValue: "platform") + } + + public static var releaseType: Self { + .init(rawValue: "releaseType") + } + + public static var reviewType: Self { + .init(rawValue: "reviewType") + } + + public static var routingAppCoverage: Self { + .init(rawValue: "routingAppCoverage") + } + + public static var usesIdfa: Self { + .init(rawValue: "usesIdfa") + } + + public static var versionString: Self { + .init(rawValue: "versionString") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "ageRatingDeclaration": self = .ageRatingDeclaration - case "app": self = .app - case "appClipDefaultExperience": self = .appClipDefaultExperience - case "appStoreReviewDetail": self = .appStoreReviewDetail - case "appStoreState": self = .appStoreState - case "appStoreVersionExperiments": self = .appStoreVersionExperiments - case "appStoreVersionExperimentsV2": self = .appStoreVersionExperimentsV2 - case "appStoreVersionLocalizations": self = .appStoreVersionLocalizations - case "appStoreVersionPhasedRelease": self = .appStoreVersionPhasedRelease - case "appStoreVersionSubmission": self = .appStoreVersionSubmission - case "build": self = .build - case "copyright": self = .copyright - case "createdDate": self = .createdDate - case "customerReviews": self = .customerReviews - case "downloadable": self = .downloadable - case "earliestReleaseDate": self = .earliestReleaseDate - case "platform": self = .platform - case "releaseType": self = .releaseType - case "routingAppCoverage": self = .routingAppCoverage - case "versionString": self = .versionString - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum GameCenterAppVersions: Hashable, Codable, RawRepresentable { - case appStoreVersion - case compatibilityVersions - case enabled - case unknown(String) + public struct GameCenterAppVersions: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var appStoreVersion: Self { + .init(rawValue: "appStoreVersion") + } + + public static var compatibilityVersions: Self { + .init(rawValue: "compatibilityVersions") + } + + public static var enabled: Self { + .init(rawValue: "enabled") + } - public var rawValue: String { - switch self { - case .appStoreVersion: return "appStoreVersion" - case .compatibilityVersions: return "compatibilityVersions" - case .enabled: return "enabled" - case .unknown(let rawValue): return rawValue - } + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "appStoreVersion": self = .appStoreVersion - case "compatibilityVersions": self = .compatibilityVersions - case "enabled": self = .enabled - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } @@ -213,25 +256,23 @@ extension V1.GameCenterAppVersions.ById.GET { } } - public enum Include: Hashable, Codable, RawRepresentable { - case appStoreVersion - case compatibilityVersions - case unknown(String) + public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var appStoreVersion: Self { + .init(rawValue: "appStoreVersion") + } - public var rawValue: String { - switch self { - case .appStoreVersion: return "appStoreVersion" - case .compatibilityVersions: return "compatibilityVersions" - case .unknown(let rawValue): return rawValue - } + public static var compatibilityVersions: Self { + .init(rawValue: "compatibilityVersions") } + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "appStoreVersion": self = .appStoreVersion - case "compatibilityVersions": self = .compatibilityVersions - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterAppVersions/ById/GameCenterAppVersionsById.PATCH.a2ccb05.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterAppVersions/ById/GameCenterAppVersionsById.PATCH.a2ccb05.generated.swift index e07ac0f2..ff3145c4 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterAppVersions/ById/GameCenterAppVersionsById.PATCH.a2ccb05.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterAppVersions/ById/GameCenterAppVersionsById.PATCH.a2ccb05.generated.swift @@ -48,9 +48,12 @@ extension V1.GameCenterAppVersions.ById { /// - Returns: **200**, Single GameCenterAppVersion as `GameCenterAppVersionResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **422**, Unprocessable request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -64,6 +67,9 @@ extension V1.GameCenterAppVersions.ById { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) @@ -73,6 +79,12 @@ extension V1.GameCenterAppVersions.ById { case 409: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 422: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterAppVersions/ById/Relationships/AppStoreVersion/GameCenterAppVersionsByIdRelationshipsAppStoreVersion.GET.f0c4373.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterAppVersions/ById/Relationships/AppStoreVersion/GameCenterAppVersionsByIdRelationshipsAppStoreVersion.GET.f0c4373.generated.swift new file mode 100644 index 00000000..abbebe02 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterAppVersions/ById/Relationships/AppStoreVersion/GameCenterAppVersionsByIdRelationshipsAppStoreVersion.GET.f0c4373.generated.swift @@ -0,0 +1,86 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.GameCenterAppVersions.ById.Relationships.AppStoreVersion { + public struct GET: Endpoint { + public typealias Response = GameCenterAppVersionAppStoreVersionLinkageResponse + + public var path: String { + "/v1/gameCenterAppVersions/\(id)/relationships/appStoreVersion" + } + + /// the id of the requested resource + public var id: String + + public var parameters: Parameters = Parameters() + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + components?.queryItems = [ + + ].filter { $0.value != nil } + if components?.queryItems?.isEmpty ?? false { + components?.queryItems = nil + } + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "GET" + return urlRequest + } + + /// - Returns: **200**, Related linkage as `GameCenterAppVersionAppStoreVersionLinkageResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(GameCenterAppVersionAppStoreVersionLinkageResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +extension V1.GameCenterAppVersions.ById.Relationships.AppStoreVersion.GET { + public struct Parameters: Hashable { + + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterAppVersions/ById/Relationships/CompatibilityVersions/GameCenterAppVersionsByIdRelationshipsCompatibilityVersions.DELETE.4d7708b.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterAppVersions/ById/Relationships/CompatibilityVersions/GameCenterAppVersionsByIdRelationshipsCompatibilityVersions.DELETE.4d7708b.generated.swift index 740d7c8c..df40685e 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterAppVersions/ById/Relationships/CompatibilityVersions/GameCenterAppVersionsByIdRelationshipsCompatibilityVersions.DELETE.4d7708b.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterAppVersions/ById/Relationships/CompatibilityVersions/GameCenterAppVersionsByIdRelationshipsCompatibilityVersions.DELETE.4d7708b.generated.swift @@ -31,10 +31,12 @@ extension V1.GameCenterAppVersions.ById.Relationships.CompatibilityVersions { return urlRequest } - /// - Returns: **204**, Success (no content) + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **422**, Unprocessable request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -42,8 +44,8 @@ extension V1.GameCenterAppVersions.ById.Relationships.CompatibilityVersions { } switch urlResponse.statusCode { - case 204: - return + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) @@ -54,6 +56,12 @@ extension V1.GameCenterAppVersions.ById.Relationships.CompatibilityVersions { case 409: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 422: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterAppVersions/ById/Relationships/CompatibilityVersions/GameCenterAppVersionsByIdRelationshipsCompatibilityVersions.GET.4d7708b.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterAppVersions/ById/Relationships/CompatibilityVersions/GameCenterAppVersionsByIdRelationshipsCompatibilityVersions.GET.4d7708b.generated.swift index 94d554fb..e146c386 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterAppVersions/ById/Relationships/CompatibilityVersions/GameCenterAppVersionsByIdRelationshipsCompatibilityVersions.GET.4d7708b.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterAppVersions/ById/Relationships/CompatibilityVersions/GameCenterAppVersionsByIdRelationshipsCompatibilityVersions.GET.4d7708b.generated.swift @@ -42,8 +42,10 @@ extension V1.GameCenterAppVersions.ById.Relationships.CompatibilityVersions { /// - Returns: **200**, List of related linkages as `GameCenterAppVersionCompatibilityVersionsLinkagesResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -57,12 +59,18 @@ extension V1.GameCenterAppVersions.ById.Relationships.CompatibilityVersions { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 404: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterAppVersions/ById/Relationships/CompatibilityVersions/GameCenterAppVersionsByIdRelationshipsCompatibilityVersions.POST.4d7708b.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterAppVersions/ById/Relationships/CompatibilityVersions/GameCenterAppVersionsByIdRelationshipsCompatibilityVersions.POST.4d7708b.generated.swift index c02f61b5..64cfe390 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterAppVersions/ById/Relationships/CompatibilityVersions/GameCenterAppVersionsByIdRelationshipsCompatibilityVersions.POST.4d7708b.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterAppVersions/ById/Relationships/CompatibilityVersions/GameCenterAppVersionsByIdRelationshipsCompatibilityVersions.POST.4d7708b.generated.swift @@ -46,10 +46,12 @@ extension V1.GameCenterAppVersions.ById.Relationships.CompatibilityVersions { return urlRequest } - /// - Returns: **204**, Success (no content) + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **422**, Unprocessable request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -57,8 +59,8 @@ extension V1.GameCenterAppVersions.ById.Relationships.CompatibilityVersions { } switch urlResponse.statusCode { - case 204: - return + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) @@ -69,6 +71,12 @@ extension V1.GameCenterAppVersions.ById.Relationships.CompatibilityVersions { case 409: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 422: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterAppVersions/GameCenterAppVersions.POST.b822948.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterAppVersions/GameCenterAppVersions.POST.b822948.generated.swift index 966fd632..ee670408 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterAppVersions/GameCenterAppVersions.POST.b822948.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterAppVersions/GameCenterAppVersions.POST.b822948.generated.swift @@ -41,8 +41,11 @@ extension V1.GameCenterAppVersions { /// - Returns: **201**, Single GameCenterAppVersion as `GameCenterAppVersionResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **422**, Unprocessable request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -56,12 +59,21 @@ extension V1.GameCenterAppVersions { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 409: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 422: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterChallengeImages/ById/GameCenterChallengeImagesById.DELETE.93e7d1b.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterChallengeImages/ById/GameCenterChallengeImagesById.DELETE.93e7d1b.generated.swift new file mode 100644 index 00000000..2dd83610 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterChallengeImages/ById/GameCenterChallengeImagesById.DELETE.93e7d1b.generated.swift @@ -0,0 +1,72 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.GameCenterChallengeImages.ById { + public struct DELETE: Endpoint { + public typealias Parameters = Never + public typealias Response = Void + + public var path: String { + "/v1/gameCenterChallengeImages/\(id)" + } + + /// the id of the requested resource + public var id: String + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "DELETE" + return urlRequest + } + + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 409: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterChallengeImages/ById/GameCenterChallengeImagesById.GET.93e7d1b.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterChallengeImages/ById/GameCenterChallengeImagesById.GET.93e7d1b.generated.swift new file mode 100644 index 00000000..48b4b533 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterChallengeImages/ById/GameCenterChallengeImagesById.GET.93e7d1b.generated.swift @@ -0,0 +1,141 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.GameCenterChallengeImages.ById { + public struct GET: Endpoint { + public typealias Response = GameCenterChallengeImageResponse + + public var path: String { + "/v1/gameCenterChallengeImages/\(id)" + } + + /// the id of the requested resource + public var id: String + + public var parameters: Parameters = Parameters() + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + components?.queryItems = [ + URLQueryItem(name: "fields[gameCenterChallengeImages]", + value: parameters.fields[.gameCenterChallengeImages]?.map { "\($0)" }.joined(separator: ",")) + ].filter { $0.value != nil } + if components?.queryItems?.isEmpty ?? false { + components?.queryItems = nil + } + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "GET" + return urlRequest + } + + /// - Returns: **200**, Single GameCenterChallengeImage as `GameCenterChallengeImageResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(GameCenterChallengeImageResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +extension V1.GameCenterChallengeImages.ById.GET { + public struct Parameters: Hashable { + public var fields: Fields = Fields() + + public struct Fields: Hashable { + public subscript (_ relation: Relation) -> T { + get { values[relation]?.base as! T } + set { values[relation] = AnyHashable(newValue) } + } + + private var values: [AnyHashable: AnyHashable] = [:] + + public struct GameCenterChallengeImages: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var assetDeliveryState: Self { + .init(rawValue: "assetDeliveryState") + } + + public static var fileName: Self { + .init(rawValue: "fileName") + } + + public static var fileSize: Self { + .init(rawValue: "fileSize") + } + + public static var imageAsset: Self { + .init(rawValue: "imageAsset") + } + + public static var uploadOperations: Self { + .init(rawValue: "uploadOperations") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct Relation: Hashable { + /// the fields to include for returned resources of type gameCenterChallengeImages + public static var gameCenterChallengeImages: Relation<[GameCenterChallengeImages]?> { + .init(key: "fields[gameCenterChallengeImages]") + } + + internal let key: String + + public func hash(into hasher: inout Hasher) { + hasher.combine(key) + } + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterChallengeImages/ById/GameCenterChallengeImagesById.PATCH.93e7d1b.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterChallengeImages/ById/GameCenterChallengeImagesById.PATCH.93e7d1b.generated.swift new file mode 100644 index 00000000..b6dc0017 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterChallengeImages/ById/GameCenterChallengeImagesById.PATCH.93e7d1b.generated.swift @@ -0,0 +1,95 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.GameCenterChallengeImages.ById { + public struct PATCH: Endpoint { + public typealias Parameters = GameCenterChallengeImageUpdateRequest + public typealias Response = GameCenterChallengeImageResponse + + public var path: String { + "/v1/gameCenterChallengeImages/\(id)" + } + + /// the id of the requested resource + public var id: String + + /// GameCenterChallengeImage representation + public var parameters: Parameters + + public init( + id: String, + parameters: Parameters + ) { + self.id = id + self.parameters = parameters + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "PATCH" + + var jsonEncoder: JSONEncoder { + let encoder = JSONEncoder() + return encoder + } + + urlRequest?.httpBody = try jsonEncoder.encode(parameters) + urlRequest?.setValue("application/json", forHTTPHeaderField: "Content-Type") + return urlRequest + } + + /// - Returns: **200**, Single GameCenterChallengeImage as `GameCenterChallengeImageResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **422**, Unprocessable request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(GameCenterChallengeImageResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 409: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 422: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterChallengeImages/GameCenterChallengeImages.POST.f409490.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterChallengeImages/GameCenterChallengeImages.POST.f409490.generated.swift new file mode 100644 index 00000000..cd174faf --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterChallengeImages/GameCenterChallengeImages.POST.f409490.generated.swift @@ -0,0 +1,84 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.GameCenterChallengeImages { + public struct POST: Endpoint { + public typealias Parameters = GameCenterChallengeImageCreateRequest + public typealias Response = GameCenterChallengeImageResponse + + public var path: String { + "/v1/gameCenterChallengeImages" + } + + /// GameCenterChallengeImage representation + public var parameters: Parameters + + public init(parameters: Parameters) { + self.parameters = parameters + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "POST" + + var jsonEncoder: JSONEncoder { + let encoder = JSONEncoder() + return encoder + } + + urlRequest?.httpBody = try jsonEncoder.encode(parameters) + urlRequest?.setValue("application/json", forHTTPHeaderField: "Content-Type") + return urlRequest + } + + /// - Returns: **201**, Single GameCenterChallengeImage as `GameCenterChallengeImageResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **422**, Unprocessable request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 201: + return try jsonDecoder.decode(GameCenterChallengeImageResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 409: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 422: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterChallengeLocalizations/ById/GameCenterChallengeLocalizationsById.DELETE.12ccb9a.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterChallengeLocalizations/ById/GameCenterChallengeLocalizationsById.DELETE.12ccb9a.generated.swift new file mode 100644 index 00000000..879f8eb1 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterChallengeLocalizations/ById/GameCenterChallengeLocalizationsById.DELETE.12ccb9a.generated.swift @@ -0,0 +1,72 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.GameCenterChallengeLocalizations.ById { + public struct DELETE: Endpoint { + public typealias Parameters = Never + public typealias Response = Void + + public var path: String { + "/v1/gameCenterChallengeLocalizations/\(id)" + } + + /// the id of the requested resource + public var id: String + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "DELETE" + return urlRequest + } + + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 409: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterChallengeLocalizations/ById/GameCenterChallengeLocalizationsById.GET.12ccb9a.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterChallengeLocalizations/ById/GameCenterChallengeLocalizationsById.GET.12ccb9a.generated.swift new file mode 100644 index 00000000..d4f23531 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterChallengeLocalizations/ById/GameCenterChallengeLocalizationsById.GET.12ccb9a.generated.swift @@ -0,0 +1,205 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.GameCenterChallengeLocalizations.ById { + public struct GET: Endpoint { + public typealias Response = GameCenterChallengeLocalizationResponse + + public var path: String { + "/v1/gameCenterChallengeLocalizations/\(id)" + } + + /// the id of the requested resource + public var id: String + + public var parameters: Parameters = Parameters() + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + components?.queryItems = [ + URLQueryItem(name: "fields[gameCenterChallengeImages]", + value: parameters.fields[.gameCenterChallengeImages]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "fields[gameCenterChallengeLocalizations]", + value: parameters.fields[.gameCenterChallengeLocalizations]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "include", + value: parameters.include?.map { "\($0)" }.joined(separator: ",")) + ].filter { $0.value != nil } + if components?.queryItems?.isEmpty ?? false { + components?.queryItems = nil + } + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "GET" + return urlRequest + } + + /// - Returns: **200**, Single GameCenterChallengeLocalization as `GameCenterChallengeLocalizationResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(GameCenterChallengeLocalizationResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +extension V1.GameCenterChallengeLocalizations.ById.GET { + public struct Parameters: Hashable { + public var fields: Fields = Fields() + + /// comma-separated list of relationships to include + public var include: [Include]? + + public struct Fields: Hashable { + public subscript (_ relation: Relation) -> T { + get { values[relation]?.base as! T } + set { values[relation] = AnyHashable(newValue) } + } + + private var values: [AnyHashable: AnyHashable] = [:] + + public struct GameCenterChallengeImages: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var assetDeliveryState: Self { + .init(rawValue: "assetDeliveryState") + } + + public static var fileName: Self { + .init(rawValue: "fileName") + } + + public static var fileSize: Self { + .init(rawValue: "fileSize") + } + + public static var imageAsset: Self { + .init(rawValue: "imageAsset") + } + + public static var uploadOperations: Self { + .init(rawValue: "uploadOperations") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct GameCenterChallengeLocalizations: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var description: Self { + .init(rawValue: "description") + } + + public static var image: Self { + .init(rawValue: "image") + } + + public static var locale: Self { + .init(rawValue: "locale") + } + + public static var name: Self { + .init(rawValue: "name") + } + + public static var version: Self { + .init(rawValue: "version") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct Relation: Hashable { + /// the fields to include for returned resources of type gameCenterChallengeImages + public static var gameCenterChallengeImages: Relation<[GameCenterChallengeImages]?> { + .init(key: "fields[gameCenterChallengeImages]") + } + + /// the fields to include for returned resources of type gameCenterChallengeLocalizations + public static var gameCenterChallengeLocalizations: Relation<[GameCenterChallengeLocalizations]?> { + .init(key: "fields[gameCenterChallengeLocalizations]") + } + + internal let key: String + + public func hash(into hasher: inout Hasher) { + hasher.combine(key) + } + } + } + + public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var image: Self { + .init(rawValue: "image") + } + + public static var version: Self { + .init(rawValue: "version") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterChallengeLocalizations/ById/GameCenterChallengeLocalizationsById.PATCH.12ccb9a.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterChallengeLocalizations/ById/GameCenterChallengeLocalizationsById.PATCH.12ccb9a.generated.swift new file mode 100644 index 00000000..06a6a684 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterChallengeLocalizations/ById/GameCenterChallengeLocalizationsById.PATCH.12ccb9a.generated.swift @@ -0,0 +1,95 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.GameCenterChallengeLocalizations.ById { + public struct PATCH: Endpoint { + public typealias Parameters = GameCenterChallengeLocalizationUpdateRequest + public typealias Response = GameCenterChallengeLocalizationResponse + + public var path: String { + "/v1/gameCenterChallengeLocalizations/\(id)" + } + + /// the id of the requested resource + public var id: String + + /// GameCenterChallengeLocalization representation + public var parameters: Parameters + + public init( + id: String, + parameters: Parameters + ) { + self.id = id + self.parameters = parameters + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "PATCH" + + var jsonEncoder: JSONEncoder { + let encoder = JSONEncoder() + return encoder + } + + urlRequest?.httpBody = try jsonEncoder.encode(parameters) + urlRequest?.setValue("application/json", forHTTPHeaderField: "Content-Type") + return urlRequest + } + + /// - Returns: **200**, Single GameCenterChallengeLocalization as `GameCenterChallengeLocalizationResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **422**, Unprocessable request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(GameCenterChallengeLocalizationResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 409: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 422: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterChallengeLocalizations/ById/Image/GameCenterChallengeLocalizationsByIdImage.GET.cfc3d8c.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterChallengeLocalizations/ById/Image/GameCenterChallengeLocalizationsByIdImage.GET.cfc3d8c.generated.swift new file mode 100644 index 00000000..a49d3ee6 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterChallengeLocalizations/ById/Image/GameCenterChallengeLocalizationsByIdImage.GET.cfc3d8c.generated.swift @@ -0,0 +1,141 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.GameCenterChallengeLocalizations.ById.Image { + public struct GET: Endpoint { + public typealias Response = GameCenterChallengeImageResponse + + public var path: String { + "/v1/gameCenterChallengeLocalizations/\(id)/image" + } + + /// the id of the requested resource + public var id: String + + public var parameters: Parameters = Parameters() + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + components?.queryItems = [ + URLQueryItem(name: "fields[gameCenterChallengeImages]", + value: parameters.fields[.gameCenterChallengeImages]?.map { "\($0)" }.joined(separator: ",")) + ].filter { $0.value != nil } + if components?.queryItems?.isEmpty ?? false { + components?.queryItems = nil + } + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "GET" + return urlRequest + } + + /// - Returns: **200**, Single GameCenterChallengeImage as `GameCenterChallengeImageResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(GameCenterChallengeImageResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +extension V1.GameCenterChallengeLocalizations.ById.Image.GET { + public struct Parameters: Hashable { + public var fields: Fields = Fields() + + public struct Fields: Hashable { + public subscript (_ relation: Relation) -> T { + get { values[relation]?.base as! T } + set { values[relation] = AnyHashable(newValue) } + } + + private var values: [AnyHashable: AnyHashable] = [:] + + public struct GameCenterChallengeImages: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var assetDeliveryState: Self { + .init(rawValue: "assetDeliveryState") + } + + public static var fileName: Self { + .init(rawValue: "fileName") + } + + public static var fileSize: Self { + .init(rawValue: "fileSize") + } + + public static var imageAsset: Self { + .init(rawValue: "imageAsset") + } + + public static var uploadOperations: Self { + .init(rawValue: "uploadOperations") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct Relation: Hashable { + /// the fields to include for returned resources of type gameCenterChallengeImages + public static var gameCenterChallengeImages: Relation<[GameCenterChallengeImages]?> { + .init(key: "fields[gameCenterChallengeImages]") + } + + internal let key: String + + public func hash(into hasher: inout Hasher) { + hasher.combine(key) + } + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterChallengeLocalizations/ById/Relationships/Image/GameCenterChallengeLocalizationsByIdRelationshipsImage.GET.b844617.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterChallengeLocalizations/ById/Relationships/Image/GameCenterChallengeLocalizationsByIdRelationshipsImage.GET.b844617.generated.swift new file mode 100644 index 00000000..32ef934b --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterChallengeLocalizations/ById/Relationships/Image/GameCenterChallengeLocalizationsByIdRelationshipsImage.GET.b844617.generated.swift @@ -0,0 +1,86 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.GameCenterChallengeLocalizations.ById.Relationships.Image { + public struct GET: Endpoint { + public typealias Response = GameCenterChallengeLocalizationImageLinkageResponse + + public var path: String { + "/v1/gameCenterChallengeLocalizations/\(id)/relationships/image" + } + + /// the id of the requested resource + public var id: String + + public var parameters: Parameters = Parameters() + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + components?.queryItems = [ + + ].filter { $0.value != nil } + if components?.queryItems?.isEmpty ?? false { + components?.queryItems = nil + } + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "GET" + return urlRequest + } + + /// - Returns: **200**, Related linkage as `GameCenterChallengeLocalizationImageLinkageResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(GameCenterChallengeLocalizationImageLinkageResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +extension V1.GameCenterChallengeLocalizations.ById.Relationships.Image.GET { + public struct Parameters: Hashable { + + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterChallengeLocalizations/GameCenterChallengeLocalizations.POST.eb8493b.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterChallengeLocalizations/GameCenterChallengeLocalizations.POST.eb8493b.generated.swift new file mode 100644 index 00000000..77ff543c --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterChallengeLocalizations/GameCenterChallengeLocalizations.POST.eb8493b.generated.swift @@ -0,0 +1,84 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.GameCenterChallengeLocalizations { + public struct POST: Endpoint { + public typealias Parameters = GameCenterChallengeLocalizationCreateRequest + public typealias Response = GameCenterChallengeLocalizationResponse + + public var path: String { + "/v1/gameCenterChallengeLocalizations" + } + + /// GameCenterChallengeLocalization representation + public var parameters: Parameters + + public init(parameters: Parameters) { + self.parameters = parameters + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "POST" + + var jsonEncoder: JSONEncoder { + let encoder = JSONEncoder() + return encoder + } + + urlRequest?.httpBody = try jsonEncoder.encode(parameters) + urlRequest?.setValue("application/json", forHTTPHeaderField: "Content-Type") + return urlRequest + } + + /// - Returns: **201**, Single GameCenterChallengeLocalization as `GameCenterChallengeLocalizationResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **422**, Unprocessable request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 201: + return try jsonDecoder.decode(GameCenterChallengeLocalizationResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 409: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 422: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterChallengeVersionReleases/ById/GameCenterChallengeVersionReleasesById.DELETE.da07552.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterChallengeVersionReleases/ById/GameCenterChallengeVersionReleasesById.DELETE.da07552.generated.swift new file mode 100644 index 00000000..5a17e17e --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterChallengeVersionReleases/ById/GameCenterChallengeVersionReleasesById.DELETE.da07552.generated.swift @@ -0,0 +1,72 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.GameCenterChallengeVersionReleases.ById { + public struct DELETE: Endpoint { + public typealias Parameters = Never + public typealias Response = Void + + public var path: String { + "/v1/gameCenterChallengeVersionReleases/\(id)" + } + + /// the id of the requested resource + public var id: String + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "DELETE" + return urlRequest + } + + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 409: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppPreOrders/ById/AppPreOrdersById.GET.7c9dbe6.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterChallengeVersionReleases/ById/GameCenterChallengeVersionReleasesById.GET.da07552.generated.swift similarity index 60% rename from Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppPreOrders/ById/AppPreOrdersById.GET.7c9dbe6.generated.swift rename to Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterChallengeVersionReleases/ById/GameCenterChallengeVersionReleasesById.GET.da07552.generated.swift index a4a76894..d1da7b3d 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppPreOrders/ById/AppPreOrdersById.GET.7c9dbe6.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterChallengeVersionReleases/ById/GameCenterChallengeVersionReleasesById.GET.da07552.generated.swift @@ -6,13 +6,12 @@ import Foundation import FoundationNetworking #endif -extension V1.AppPreOrders.ById { - @available(*, deprecated) +extension V1.GameCenterChallengeVersionReleases.ById { public struct GET: Endpoint { - public typealias Response = AppPreOrderResponse + public typealias Response = GameCenterChallengeVersionReleaseResponse public var path: String { - "/v1/appPreOrders/\(id)" + "/v1/gameCenterChallengeVersionReleases/\(id)" } /// the id of the requested resource @@ -29,8 +28,8 @@ extension V1.AppPreOrders.ById { components?.path = path components?.queryItems = [ - URLQueryItem(name: "fields[appPreOrders]", - value: parameters.fields[.appPreOrders]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "fields[gameCenterChallengeVersionReleases]", + value: parameters.fields[.gameCenterChallengeVersionReleases]?.map { "\($0)" }.joined(separator: ",")), URLQueryItem(name: "include", value: parameters.include?.map { "\($0)" }.joined(separator: ",")) ].filter { $0.value != nil } @@ -43,10 +42,12 @@ extension V1.AppPreOrders.ById { return urlRequest } - /// - Returns: **200**, Single AppPreOrder as `AppPreOrderResponse` + /// - Returns: **200**, Single GameCenterChallengeVersionRelease as `GameCenterChallengeVersionReleaseResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -55,17 +56,23 @@ extension V1.AppPreOrders.ById { switch urlResponse.statusCode { case 200: - return try jsonDecoder.decode(AppPreOrderResponse.self, from: data) + return try jsonDecoder.decode(GameCenterChallengeVersionReleaseResponse.self, from: data) case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 404: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -73,7 +80,7 @@ extension V1.AppPreOrders.ById { } } -extension V1.AppPreOrders.ById.GET { +extension V1.GameCenterChallengeVersionReleases.ById.GET { public struct Parameters: Hashable { public var fields: Fields = Fields() @@ -88,35 +95,26 @@ extension V1.AppPreOrders.ById.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum AppPreOrders: Hashable, Codable, RawRepresentable { - case app - case appReleaseDate - case preOrderAvailableDate - case unknown(String) - - public var rawValue: String { - switch self { - case .app: return "app" - case .appReleaseDate: return "appReleaseDate" - case .preOrderAvailableDate: return "preOrderAvailableDate" - case .unknown(let rawValue): return rawValue - } + public struct GameCenterChallengeVersionReleases: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var version: Self { + .init(rawValue: "version") + } + + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "app": self = .app - case "appReleaseDate": self = .appReleaseDate - case "preOrderAvailableDate": self = .preOrderAvailableDate - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } public struct Relation: Hashable { - /// the fields to include for returned resources of type appPreOrders - public static var appPreOrders: Relation<[AppPreOrders]?> { - .init(key: "fields[appPreOrders]") + /// the fields to include for returned resources of type gameCenterChallengeVersionReleases + public static var gameCenterChallengeVersionReleases: Relation<[GameCenterChallengeVersionReleases]?> { + .init(key: "fields[gameCenterChallengeVersionReleases]") } internal let key: String @@ -127,22 +125,19 @@ extension V1.AppPreOrders.ById.GET { } } - public enum Include: Hashable, Codable, RawRepresentable { - case app - case unknown(String) + public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var version: Self { + .init(rawValue: "version") + } - public var rawValue: String { - switch self { - case .app: return "app" - case .unknown(let rawValue): return rawValue - } + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "app": self = .app - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterChallengeVersionReleases/GameCenterChallengeVersionReleases.POST.9d1e993.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterChallengeVersionReleases/GameCenterChallengeVersionReleases.POST.9d1e993.generated.swift new file mode 100644 index 00000000..3b2d77fb --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterChallengeVersionReleases/GameCenterChallengeVersionReleases.POST.9d1e993.generated.swift @@ -0,0 +1,84 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.GameCenterChallengeVersionReleases { + public struct POST: Endpoint { + public typealias Parameters = GameCenterChallengeVersionReleaseCreateRequest + public typealias Response = GameCenterChallengeVersionReleaseResponse + + public var path: String { + "/v1/gameCenterChallengeVersionReleases" + } + + /// GameCenterChallengeVersionRelease representation + public var parameters: Parameters + + public init(parameters: Parameters) { + self.parameters = parameters + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "POST" + + var jsonEncoder: JSONEncoder { + let encoder = JSONEncoder() + return encoder + } + + urlRequest?.httpBody = try jsonEncoder.encode(parameters) + urlRequest?.setValue("application/json", forHTTPHeaderField: "Content-Type") + return urlRequest + } + + /// - Returns: **201**, Single GameCenterChallengeVersionRelease as `GameCenterChallengeVersionReleaseResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **422**, Unprocessable request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 201: + return try jsonDecoder.decode(GameCenterChallengeVersionReleaseResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 409: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 422: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterChallengeVersions/ById/DefaultImage/GameCenterChallengeVersionsByIdDefaultImage.GET.d50e7c3.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterChallengeVersions/ById/DefaultImage/GameCenterChallengeVersionsByIdDefaultImage.GET.d50e7c3.generated.swift new file mode 100644 index 00000000..27d319ee --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterChallengeVersions/ById/DefaultImage/GameCenterChallengeVersionsByIdDefaultImage.GET.d50e7c3.generated.swift @@ -0,0 +1,141 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.GameCenterChallengeVersions.ById.DefaultImage { + public struct GET: Endpoint { + public typealias Response = GameCenterChallengeImageResponse + + public var path: String { + "/v1/gameCenterChallengeVersions/\(id)/defaultImage" + } + + /// the id of the requested resource + public var id: String + + public var parameters: Parameters = Parameters() + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + components?.queryItems = [ + URLQueryItem(name: "fields[gameCenterChallengeImages]", + value: parameters.fields[.gameCenterChallengeImages]?.map { "\($0)" }.joined(separator: ",")) + ].filter { $0.value != nil } + if components?.queryItems?.isEmpty ?? false { + components?.queryItems = nil + } + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "GET" + return urlRequest + } + + /// - Returns: **200**, Single GameCenterChallengeImage as `GameCenterChallengeImageResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(GameCenterChallengeImageResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +extension V1.GameCenterChallengeVersions.ById.DefaultImage.GET { + public struct Parameters: Hashable { + public var fields: Fields = Fields() + + public struct Fields: Hashable { + public subscript (_ relation: Relation) -> T { + get { values[relation]?.base as! T } + set { values[relation] = AnyHashable(newValue) } + } + + private var values: [AnyHashable: AnyHashable] = [:] + + public struct GameCenterChallengeImages: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var assetDeliveryState: Self { + .init(rawValue: "assetDeliveryState") + } + + public static var fileName: Self { + .init(rawValue: "fileName") + } + + public static var fileSize: Self { + .init(rawValue: "fileSize") + } + + public static var imageAsset: Self { + .init(rawValue: "imageAsset") + } + + public static var uploadOperations: Self { + .init(rawValue: "uploadOperations") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct Relation: Hashable { + /// the fields to include for returned resources of type gameCenterChallengeImages + public static var gameCenterChallengeImages: Relation<[GameCenterChallengeImages]?> { + .init(key: "fields[gameCenterChallengeImages]") + } + + internal let key: String + + public func hash(into hasher: inout Hasher) { + hasher.combine(key) + } + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterChallengeVersions/ById/GameCenterChallengeVersionsById.GET.f4c42e2.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterChallengeVersions/ById/GameCenterChallengeVersionsById.GET.f4c42e2.generated.swift new file mode 100644 index 00000000..87cc8694 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterChallengeVersions/ById/GameCenterChallengeVersionsById.GET.f4c42e2.generated.swift @@ -0,0 +1,289 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.GameCenterChallengeVersions.ById { + public struct GET: Endpoint { + public typealias Response = GameCenterChallengeVersionResponse + + public var path: String { + "/v1/gameCenterChallengeVersions/\(id)" + } + + /// the id of the requested resource + public var id: String + + public var parameters: Parameters = Parameters() + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + components?.queryItems = [ + URLQueryItem(name: "fields[gameCenterChallengeImages]", + value: parameters.fields[.gameCenterChallengeImages]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "fields[gameCenterChallengeLocalizations]", + value: parameters.fields[.gameCenterChallengeLocalizations]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "fields[gameCenterChallengeVersions]", + value: parameters.fields[.gameCenterChallengeVersions]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "include", + value: parameters.include?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "limit[localizations]", + value: parameters.limit[.localizations].map { "\($0)" }), + URLQueryItem(name: "limit[releases]", + value: parameters.limit[.releases].map { "\($0)" }) + ].filter { $0.value != nil } + if components?.queryItems?.isEmpty ?? false { + components?.queryItems = nil + } + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "GET" + return urlRequest + } + + /// - Returns: **200**, Single GameCenterChallengeVersion as `GameCenterChallengeVersionResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(GameCenterChallengeVersionResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +extension V1.GameCenterChallengeVersions.ById.GET { + public struct Parameters: Hashable { + public var fields: Fields = Fields() + + /// comma-separated list of relationships to include + public var include: [Include]? + + public var limit: Limit = Limit() + + public struct Fields: Hashable { + public subscript (_ relation: Relation) -> T { + get { values[relation]?.base as! T } + set { values[relation] = AnyHashable(newValue) } + } + + private var values: [AnyHashable: AnyHashable] = [:] + + public struct GameCenterChallengeImages: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var assetDeliveryState: Self { + .init(rawValue: "assetDeliveryState") + } + + public static var fileName: Self { + .init(rawValue: "fileName") + } + + public static var fileSize: Self { + .init(rawValue: "fileSize") + } + + public static var imageAsset: Self { + .init(rawValue: "imageAsset") + } + + public static var uploadOperations: Self { + .init(rawValue: "uploadOperations") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct GameCenterChallengeLocalizations: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var description: Self { + .init(rawValue: "description") + } + + public static var image: Self { + .init(rawValue: "image") + } + + public static var locale: Self { + .init(rawValue: "locale") + } + + public static var name: Self { + .init(rawValue: "name") + } + + public static var version: Self { + .init(rawValue: "version") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct GameCenterChallengeVersions: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var challenge: Self { + .init(rawValue: "challenge") + } + + public static var defaultImage: Self { + .init(rawValue: "defaultImage") + } + + public static var localizations: Self { + .init(rawValue: "localizations") + } + + public static var releases: Self { + .init(rawValue: "releases") + } + + public static var state: Self { + .init(rawValue: "state") + } + + public static var version: Self { + .init(rawValue: "version") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct Relation: Hashable { + /// the fields to include for returned resources of type gameCenterChallengeImages + public static var gameCenterChallengeImages: Relation<[GameCenterChallengeImages]?> { + .init(key: "fields[gameCenterChallengeImages]") + } + + /// the fields to include for returned resources of type gameCenterChallengeLocalizations + public static var gameCenterChallengeLocalizations: Relation<[GameCenterChallengeLocalizations]?> { + .init(key: "fields[gameCenterChallengeLocalizations]") + } + + /// the fields to include for returned resources of type gameCenterChallengeVersions + public static var gameCenterChallengeVersions: Relation<[GameCenterChallengeVersions]?> { + .init(key: "fields[gameCenterChallengeVersions]") + } + + internal let key: String + + public func hash(into hasher: inout Hasher) { + hasher.combine(key) + } + } + } + + public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var challenge: Self { + .init(rawValue: "challenge") + } + + public static var defaultImage: Self { + .init(rawValue: "defaultImage") + } + + public static var localizations: Self { + .init(rawValue: "localizations") + } + + public static var releases: Self { + .init(rawValue: "releases") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct Limit: Hashable { + public subscript (_ relation: Relation) -> T { + get { values[relation]?.base as! T } + set { values[relation] = AnyHashable(newValue) } + } + + private var values: [AnyHashable: AnyHashable] = [:] + + public struct Relation: Hashable { + /// maximum number of related localizations returned (when they are included) + public static var localizations: Relation { + .init(key: "limit[localizations]") + } + + /// maximum number of related releases returned (when they are included) + public static var releases: Relation { + .init(key: "limit[releases]") + } + + internal let key: String + + public func hash(into hasher: inout Hasher) { + hasher.combine(key) + } + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterChallengeVersions/ById/Localizations/GameCenterChallengeVersionsByIdLocalizations.GET.4f0787b.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterChallengeVersions/ById/Localizations/GameCenterChallengeVersionsByIdLocalizations.GET.4f0787b.generated.swift new file mode 100644 index 00000000..7216fe9e --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterChallengeVersions/ById/Localizations/GameCenterChallengeVersionsByIdLocalizations.GET.4f0787b.generated.swift @@ -0,0 +1,253 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.GameCenterChallengeVersions.ById.Localizations { + public struct GET: Endpoint { + public typealias Response = GameCenterChallengeLocalizationsResponse + + public var path: String { + "/v1/gameCenterChallengeVersions/\(id)/localizations" + } + + /// the id of the requested resource + public var id: String + + public var parameters: Parameters = Parameters() + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + components?.queryItems = [ + URLQueryItem(name: "fields[gameCenterChallengeImages]", + value: parameters.fields[.gameCenterChallengeImages]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "fields[gameCenterChallengeLocalizations]", + value: parameters.fields[.gameCenterChallengeLocalizations]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "fields[gameCenterChallengeVersions]", + value: parameters.fields[.gameCenterChallengeVersions]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "include", + value: parameters.include?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "limit", + value: parameters.limit.map { "\($0)" }) + ].filter { $0.value != nil } + if components?.queryItems?.isEmpty ?? false { + components?.queryItems = nil + } + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "GET" + return urlRequest + } + + /// - Returns: **200**, List of GameCenterChallengeLocalizations as `GameCenterChallengeLocalizationsResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(GameCenterChallengeLocalizationsResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +extension V1.GameCenterChallengeVersions.ById.Localizations.GET { + public struct Parameters: Hashable { + public var fields: Fields = Fields() + + /// comma-separated list of relationships to include + public var include: [Include]? + + /// maximum resources per page + public var limit: Int? + + public struct Fields: Hashable { + public subscript (_ relation: Relation) -> T { + get { values[relation]?.base as! T } + set { values[relation] = AnyHashable(newValue) } + } + + private var values: [AnyHashable: AnyHashable] = [:] + + public struct GameCenterChallengeImages: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var assetDeliveryState: Self { + .init(rawValue: "assetDeliveryState") + } + + public static var fileName: Self { + .init(rawValue: "fileName") + } + + public static var fileSize: Self { + .init(rawValue: "fileSize") + } + + public static var imageAsset: Self { + .init(rawValue: "imageAsset") + } + + public static var uploadOperations: Self { + .init(rawValue: "uploadOperations") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct GameCenterChallengeLocalizations: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var description: Self { + .init(rawValue: "description") + } + + public static var image: Self { + .init(rawValue: "image") + } + + public static var locale: Self { + .init(rawValue: "locale") + } + + public static var name: Self { + .init(rawValue: "name") + } + + public static var version: Self { + .init(rawValue: "version") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct GameCenterChallengeVersions: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var challenge: Self { + .init(rawValue: "challenge") + } + + public static var defaultImage: Self { + .init(rawValue: "defaultImage") + } + + public static var localizations: Self { + .init(rawValue: "localizations") + } + + public static var releases: Self { + .init(rawValue: "releases") + } + + public static var state: Self { + .init(rawValue: "state") + } + + public static var version: Self { + .init(rawValue: "version") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct Relation: Hashable { + /// the fields to include for returned resources of type gameCenterChallengeImages + public static var gameCenterChallengeImages: Relation<[GameCenterChallengeImages]?> { + .init(key: "fields[gameCenterChallengeImages]") + } + + /// the fields to include for returned resources of type gameCenterChallengeLocalizations + public static var gameCenterChallengeLocalizations: Relation<[GameCenterChallengeLocalizations]?> { + .init(key: "fields[gameCenterChallengeLocalizations]") + } + + /// the fields to include for returned resources of type gameCenterChallengeVersions + public static var gameCenterChallengeVersions: Relation<[GameCenterChallengeVersions]?> { + .init(key: "fields[gameCenterChallengeVersions]") + } + + internal let key: String + + public func hash(into hasher: inout Hasher) { + hasher.combine(key) + } + } + } + + public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var image: Self { + .init(rawValue: "image") + } + + public static var version: Self { + .init(rawValue: "version") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterChallengeVersions/ById/Relationships/DefaultImage/GameCenterChallengeVersionsByIdRelationshipsDefaultImage.GET.65737a1.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterChallengeVersions/ById/Relationships/DefaultImage/GameCenterChallengeVersionsByIdRelationshipsDefaultImage.GET.65737a1.generated.swift new file mode 100644 index 00000000..0a715e04 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterChallengeVersions/ById/Relationships/DefaultImage/GameCenterChallengeVersionsByIdRelationshipsDefaultImage.GET.65737a1.generated.swift @@ -0,0 +1,86 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.GameCenterChallengeVersions.ById.Relationships.DefaultImage { + public struct GET: Endpoint { + public typealias Response = GameCenterChallengeVersionDefaultImageLinkageResponse + + public var path: String { + "/v1/gameCenterChallengeVersions/\(id)/relationships/defaultImage" + } + + /// the id of the requested resource + public var id: String + + public var parameters: Parameters = Parameters() + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + components?.queryItems = [ + + ].filter { $0.value != nil } + if components?.queryItems?.isEmpty ?? false { + components?.queryItems = nil + } + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "GET" + return urlRequest + } + + /// - Returns: **200**, Related linkage as `GameCenterChallengeVersionDefaultImageLinkageResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(GameCenterChallengeVersionDefaultImageLinkageResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +extension V1.GameCenterChallengeVersions.ById.Relationships.DefaultImage.GET { + public struct Parameters: Hashable { + + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterChallengeVersions/ById/Relationships/Localizations/GameCenterChallengeVersionsByIdRelationshipsLocalizations.GET.4faef94.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterChallengeVersions/ById/Relationships/Localizations/GameCenterChallengeVersionsByIdRelationshipsLocalizations.GET.4faef94.generated.swift new file mode 100644 index 00000000..f5382d41 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterChallengeVersions/ById/Relationships/Localizations/GameCenterChallengeVersionsByIdRelationshipsLocalizations.GET.4faef94.generated.swift @@ -0,0 +1,88 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.GameCenterChallengeVersions.ById.Relationships.Localizations { + public struct GET: Endpoint { + public typealias Response = GameCenterChallengeVersionLocalizationsLinkagesResponse + + public var path: String { + "/v1/gameCenterChallengeVersions/\(id)/relationships/localizations" + } + + /// the id of the requested resource + public var id: String + + public var parameters: Parameters = Parameters() + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + components?.queryItems = [ + URLQueryItem(name: "limit", + value: parameters.limit.map { "\($0)" }) + ].filter { $0.value != nil } + if components?.queryItems?.isEmpty ?? false { + components?.queryItems = nil + } + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "GET" + return urlRequest + } + + /// - Returns: **200**, List of related linkages as `GameCenterChallengeVersionLocalizationsLinkagesResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(GameCenterChallengeVersionLocalizationsLinkagesResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +extension V1.GameCenterChallengeVersions.ById.Relationships.Localizations.GET { + public struct Parameters: Hashable { + /// maximum resources per page + public var limit: Int? + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterChallengeVersions/GameCenterChallengeVersions.POST.ac02250.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterChallengeVersions/GameCenterChallengeVersions.POST.ac02250.generated.swift new file mode 100644 index 00000000..b02c0974 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterChallengeVersions/GameCenterChallengeVersions.POST.ac02250.generated.swift @@ -0,0 +1,84 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.GameCenterChallengeVersions { + public struct POST: Endpoint { + public typealias Parameters = GameCenterChallengeVersionCreateRequest + public typealias Response = GameCenterChallengeVersionResponse + + public var path: String { + "/v1/gameCenterChallengeVersions" + } + + /// GameCenterChallengeVersion representation + public var parameters: Parameters + + public init(parameters: Parameters) { + self.parameters = parameters + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "POST" + + var jsonEncoder: JSONEncoder { + let encoder = JSONEncoder() + return encoder + } + + urlRequest?.httpBody = try jsonEncoder.encode(parameters) + urlRequest?.setValue("application/json", forHTTPHeaderField: "Content-Type") + return urlRequest + } + + /// - Returns: **201**, Single GameCenterChallengeVersion as `GameCenterChallengeVersionResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **422**, Unprocessable request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 201: + return try jsonDecoder.decode(GameCenterChallengeVersionResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 409: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 422: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterChallenges/ById/GameCenterChallengesById.DELETE.7dbeef3.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterChallenges/ById/GameCenterChallengesById.DELETE.7dbeef3.generated.swift new file mode 100644 index 00000000..547e1c64 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterChallenges/ById/GameCenterChallengesById.DELETE.7dbeef3.generated.swift @@ -0,0 +1,72 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.GameCenterChallenges.ById { + public struct DELETE: Endpoint { + public typealias Parameters = Never + public typealias Response = Void + + public var path: String { + "/v1/gameCenterChallenges/\(id)" + } + + /// the id of the requested resource + public var id: String + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "DELETE" + return urlRequest + } + + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 409: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterChallenges/ById/GameCenterChallengesById.GET.7dbeef3.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterChallenges/ById/GameCenterChallengesById.GET.7dbeef3.generated.swift new file mode 100644 index 00000000..59886c3b --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterChallenges/ById/GameCenterChallengesById.GET.7dbeef3.generated.swift @@ -0,0 +1,263 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.GameCenterChallenges.ById { + public struct GET: Endpoint { + public typealias Response = GameCenterChallengeResponse + + public var path: String { + "/v1/gameCenterChallenges/\(id)" + } + + /// the id of the requested resource + public var id: String + + public var parameters: Parameters = Parameters() + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + components?.queryItems = [ + URLQueryItem(name: "fields[gameCenterChallengeVersions]", + value: parameters.fields[.gameCenterChallengeVersions]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "fields[gameCenterChallenges]", + value: parameters.fields[.gameCenterChallenges]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "include", + value: parameters.include?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "limit[versions]", + value: parameters.limit[.versions].map { "\($0)" }) + ].filter { $0.value != nil } + if components?.queryItems?.isEmpty ?? false { + components?.queryItems = nil + } + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "GET" + return urlRequest + } + + /// - Returns: **200**, Single GameCenterChallenge as `GameCenterChallengeResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(GameCenterChallengeResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +extension V1.GameCenterChallenges.ById.GET { + public struct Parameters: Hashable { + public var fields: Fields = Fields() + + /// comma-separated list of relationships to include + public var include: [Include]? + + public var limit: Limit = Limit() + + public struct Fields: Hashable { + public subscript (_ relation: Relation) -> T { + get { values[relation]?.base as! T } + set { values[relation] = AnyHashable(newValue) } + } + + private var values: [AnyHashable: AnyHashable] = [:] + + public struct GameCenterChallengeVersions: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var challenge: Self { + .init(rawValue: "challenge") + } + + public static var defaultImage: Self { + .init(rawValue: "defaultImage") + } + + public static var localizations: Self { + .init(rawValue: "localizations") + } + + public static var releases: Self { + .init(rawValue: "releases") + } + + public static var state: Self { + .init(rawValue: "state") + } + + public static var version: Self { + .init(rawValue: "version") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct GameCenterChallenges: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var allowedDurations: Self { + .init(rawValue: "allowedDurations") + } + + public static var archived: Self { + .init(rawValue: "archived") + } + + public static var challengeType: Self { + .init(rawValue: "challengeType") + } + + public static var gameCenterDetail: Self { + .init(rawValue: "gameCenterDetail") + } + + public static var gameCenterGroup: Self { + .init(rawValue: "gameCenterGroup") + } + + public static var leaderboard: Self { + .init(rawValue: "leaderboard") + } + + public static var referenceName: Self { + .init(rawValue: "referenceName") + } + + public static var repeatable: Self { + .init(rawValue: "repeatable") + } + + public static var vendorIdentifier: Self { + .init(rawValue: "vendorIdentifier") + } + + public static var versions: Self { + .init(rawValue: "versions") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct Relation: Hashable { + /// the fields to include for returned resources of type gameCenterChallengeVersions + public static var gameCenterChallengeVersions: Relation<[GameCenterChallengeVersions]?> { + .init(key: "fields[gameCenterChallengeVersions]") + } + + /// the fields to include for returned resources of type gameCenterChallenges + public static var gameCenterChallenges: Relation<[GameCenterChallenges]?> { + .init(key: "fields[gameCenterChallenges]") + } + + internal let key: String + + public func hash(into hasher: inout Hasher) { + hasher.combine(key) + } + } + } + + public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var gameCenterDetail: Self { + .init(rawValue: "gameCenterDetail") + } + + public static var gameCenterGroup: Self { + .init(rawValue: "gameCenterGroup") + } + + public static var leaderboard: Self { + .init(rawValue: "leaderboard") + } + + public static var versions: Self { + .init(rawValue: "versions") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct Limit: Hashable { + public subscript (_ relation: Relation) -> T { + get { values[relation]?.base as! T } + set { values[relation] = AnyHashable(newValue) } + } + + private var values: [AnyHashable: AnyHashable] = [:] + + public struct Relation: Hashable { + /// maximum number of related versions returned (when they are included) + public static var versions: Relation { + .init(key: "limit[versions]") + } + + internal let key: String + + public func hash(into hasher: inout Hasher) { + hasher.combine(key) + } + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterChallenges/ById/GameCenterChallengesById.PATCH.7dbeef3.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterChallenges/ById/GameCenterChallengesById.PATCH.7dbeef3.generated.swift new file mode 100644 index 00000000..41062d54 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterChallenges/ById/GameCenterChallengesById.PATCH.7dbeef3.generated.swift @@ -0,0 +1,95 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.GameCenterChallenges.ById { + public struct PATCH: Endpoint { + public typealias Parameters = GameCenterChallengeUpdateRequest + public typealias Response = GameCenterChallengeResponse + + public var path: String { + "/v1/gameCenterChallenges/\(id)" + } + + /// the id of the requested resource + public var id: String + + /// GameCenterChallenge representation + public var parameters: Parameters + + public init( + id: String, + parameters: Parameters + ) { + self.id = id + self.parameters = parameters + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "PATCH" + + var jsonEncoder: JSONEncoder { + let encoder = JSONEncoder() + return encoder + } + + urlRequest?.httpBody = try jsonEncoder.encode(parameters) + urlRequest?.setValue("application/json", forHTTPHeaderField: "Content-Type") + return urlRequest + } + + /// - Returns: **200**, Single GameCenterChallenge as `GameCenterChallengeResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **422**, Unprocessable request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(GameCenterChallengeResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 409: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 422: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterChallenges/ById/Relationships/Leaderboard/GameCenterChallengesByIdRelationshipsLeaderboard.PATCH.b83f437.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterChallenges/ById/Relationships/Leaderboard/GameCenterChallengesByIdRelationshipsLeaderboard.PATCH.b83f437.generated.swift new file mode 100644 index 00000000..27a04b51 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterChallenges/ById/Relationships/Leaderboard/GameCenterChallengesByIdRelationshipsLeaderboard.PATCH.b83f437.generated.swift @@ -0,0 +1,87 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.GameCenterChallenges.ById.Relationships.Leaderboard { + public struct PATCH: Endpoint { + public typealias Parameters = GameCenterChallengeLeaderboardLinkageRequest + public typealias Response = Void + + public var path: String { + "/v1/gameCenterChallenges/\(id)/relationships/leaderboard" + } + + /// the id of the requested resource + public var id: String + + /// Related linkage + public var parameters: Parameters + + public init( + id: String, + parameters: Parameters + ) { + self.id = id + self.parameters = parameters + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "PATCH" + + var jsonEncoder: JSONEncoder { + let encoder = JSONEncoder() + return encoder + } + + urlRequest?.httpBody = try jsonEncoder.encode(parameters) + urlRequest?.setValue("application/json", forHTTPHeaderField: "Content-Type") + return urlRequest + } + + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **422**, Unprocessable request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 409: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 422: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterChallenges/ById/Relationships/Versions/GameCenterChallengesByIdRelationshipsVersions.GET.df59605.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterChallenges/ById/Relationships/Versions/GameCenterChallengesByIdRelationshipsVersions.GET.df59605.generated.swift new file mode 100644 index 00000000..48d1e66b --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterChallenges/ById/Relationships/Versions/GameCenterChallengesByIdRelationshipsVersions.GET.df59605.generated.swift @@ -0,0 +1,88 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.GameCenterChallenges.ById.Relationships.Versions { + public struct GET: Endpoint { + public typealias Response = GameCenterChallengeVersionsLinkagesResponse + + public var path: String { + "/v1/gameCenterChallenges/\(id)/relationships/versions" + } + + /// the id of the requested resource + public var id: String + + public var parameters: Parameters = Parameters() + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + components?.queryItems = [ + URLQueryItem(name: "limit", + value: parameters.limit.map { "\($0)" }) + ].filter { $0.value != nil } + if components?.queryItems?.isEmpty ?? false { + components?.queryItems = nil + } + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "GET" + return urlRequest + } + + /// - Returns: **200**, List of related linkages as `GameCenterChallengeVersionsLinkagesResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(GameCenterChallengeVersionsLinkagesResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +extension V1.GameCenterChallenges.ById.Relationships.Versions.GET { + public struct Parameters: Hashable { + /// maximum resources per page + public var limit: Int? + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterChallenges/ById/Versions/GameCenterChallengesByIdVersions.GET.fd8fc17.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterChallenges/ById/Versions/GameCenterChallengesByIdVersions.GET.fd8fc17.generated.swift new file mode 100644 index 00000000..b5a14dea --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterChallenges/ById/Versions/GameCenterChallengesByIdVersions.GET.fd8fc17.generated.swift @@ -0,0 +1,379 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.GameCenterChallenges.ById.Versions { + public struct GET: Endpoint { + public typealias Response = GameCenterChallengeVersionsResponse + + public var path: String { + "/v1/gameCenterChallenges/\(id)/versions" + } + + /// the id of the requested resource + public var id: String + + public var parameters: Parameters = Parameters() + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + components?.queryItems = [ + URLQueryItem(name: "fields[gameCenterChallengeImages]", + value: parameters.fields[.gameCenterChallengeImages]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "fields[gameCenterChallengeLocalizations]", + value: parameters.fields[.gameCenterChallengeLocalizations]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "fields[gameCenterChallengeVersionReleases]", + value: parameters.fields[.gameCenterChallengeVersionReleases]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "fields[gameCenterChallengeVersions]", + value: parameters.fields[.gameCenterChallengeVersions]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "fields[gameCenterChallenges]", + value: parameters.fields[.gameCenterChallenges]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "include", + value: parameters.include?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "limit[localizations]", + value: parameters.limit[.localizations].map { "\($0)" }), + URLQueryItem(name: "limit[releases]", + value: parameters.limit[.releases].map { "\($0)" }), + URLQueryItem(name: "limit", + value: parameters.limit[].map { "\($0)" }) + ].filter { $0.value != nil } + if components?.queryItems?.isEmpty ?? false { + components?.queryItems = nil + } + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "GET" + return urlRequest + } + + /// - Returns: **200**, List of GameCenterChallengeVersions as `GameCenterChallengeVersionsResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(GameCenterChallengeVersionsResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +extension V1.GameCenterChallenges.ById.Versions.GET { + public struct Parameters: Hashable { + public var fields: Fields = Fields() + + /// comma-separated list of relationships to include + public var include: [Include]? + + /// maximum resources per page + public var limit: Limit = Limit() + + public struct Fields: Hashable { + public subscript (_ relation: Relation) -> T { + get { values[relation]?.base as! T } + set { values[relation] = AnyHashable(newValue) } + } + + private var values: [AnyHashable: AnyHashable] = [:] + + public struct GameCenterChallengeImages: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var assetDeliveryState: Self { + .init(rawValue: "assetDeliveryState") + } + + public static var fileName: Self { + .init(rawValue: "fileName") + } + + public static var fileSize: Self { + .init(rawValue: "fileSize") + } + + public static var imageAsset: Self { + .init(rawValue: "imageAsset") + } + + public static var uploadOperations: Self { + .init(rawValue: "uploadOperations") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct GameCenterChallengeLocalizations: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var description: Self { + .init(rawValue: "description") + } + + public static var image: Self { + .init(rawValue: "image") + } + + public static var locale: Self { + .init(rawValue: "locale") + } + + public static var name: Self { + .init(rawValue: "name") + } + + public static var version: Self { + .init(rawValue: "version") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct GameCenterChallengeVersionReleases: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var version: Self { + .init(rawValue: "version") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct GameCenterChallengeVersions: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var challenge: Self { + .init(rawValue: "challenge") + } + + public static var defaultImage: Self { + .init(rawValue: "defaultImage") + } + + public static var localizations: Self { + .init(rawValue: "localizations") + } + + public static var releases: Self { + .init(rawValue: "releases") + } + + public static var state: Self { + .init(rawValue: "state") + } + + public static var version: Self { + .init(rawValue: "version") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct GameCenterChallenges: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var allowedDurations: Self { + .init(rawValue: "allowedDurations") + } + + public static var archived: Self { + .init(rawValue: "archived") + } + + public static var challengeType: Self { + .init(rawValue: "challengeType") + } + + public static var gameCenterDetail: Self { + .init(rawValue: "gameCenterDetail") + } + + public static var gameCenterGroup: Self { + .init(rawValue: "gameCenterGroup") + } + + public static var leaderboard: Self { + .init(rawValue: "leaderboard") + } + + public static var referenceName: Self { + .init(rawValue: "referenceName") + } + + public static var repeatable: Self { + .init(rawValue: "repeatable") + } + + public static var vendorIdentifier: Self { + .init(rawValue: "vendorIdentifier") + } + + public static var versions: Self { + .init(rawValue: "versions") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct Relation: Hashable { + /// the fields to include for returned resources of type gameCenterChallengeImages + public static var gameCenterChallengeImages: Relation<[GameCenterChallengeImages]?> { + .init(key: "fields[gameCenterChallengeImages]") + } + + /// the fields to include for returned resources of type gameCenterChallengeLocalizations + public static var gameCenterChallengeLocalizations: Relation<[GameCenterChallengeLocalizations]?> { + .init(key: "fields[gameCenterChallengeLocalizations]") + } + + /// the fields to include for returned resources of type gameCenterChallengeVersionReleases + public static var gameCenterChallengeVersionReleases: Relation<[GameCenterChallengeVersionReleases]?> { + .init(key: "fields[gameCenterChallengeVersionReleases]") + } + + /// the fields to include for returned resources of type gameCenterChallengeVersions + public static var gameCenterChallengeVersions: Relation<[GameCenterChallengeVersions]?> { + .init(key: "fields[gameCenterChallengeVersions]") + } + + /// the fields to include for returned resources of type gameCenterChallenges + public static var gameCenterChallenges: Relation<[GameCenterChallenges]?> { + .init(key: "fields[gameCenterChallenges]") + } + + internal let key: String + + public func hash(into hasher: inout Hasher) { + hasher.combine(key) + } + } + } + + public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var challenge: Self { + .init(rawValue: "challenge") + } + + public static var defaultImage: Self { + .init(rawValue: "defaultImage") + } + + public static var localizations: Self { + .init(rawValue: "localizations") + } + + public static var releases: Self { + .init(rawValue: "releases") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct Limit: Hashable { + public subscript () -> Int? { + get { self[Relation(key: "limit")] } + set { self[Relation(key: "limit")] = newValue } + } + + public subscript (_ relation: Relation) -> T { + get { values[relation]?.base as! T } + set { values[relation] = AnyHashable(newValue) } + } + + private var values: [AnyHashable: AnyHashable] = [:] + + public struct Relation: Hashable { + /// maximum number of related localizations returned (when they are included) + public static var localizations: Relation { + .init(key: "limit[localizations]") + } + + /// maximum number of related releases returned (when they are included) + public static var releases: Relation { + .init(key: "limit[releases]") + } + + internal let key: String + + public func hash(into hasher: inout Hasher) { + hasher.combine(key) + } + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterChallenges/GameCenterChallenges.POST.8f45db2.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterChallenges/GameCenterChallenges.POST.8f45db2.generated.swift new file mode 100644 index 00000000..2f240cd5 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterChallenges/GameCenterChallenges.POST.8f45db2.generated.swift @@ -0,0 +1,84 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.GameCenterChallenges { + public struct POST: Endpoint { + public typealias Parameters = GameCenterChallengeCreateRequest + public typealias Response = GameCenterChallengeResponse + + public var path: String { + "/v1/gameCenterChallenges" + } + + /// GameCenterChallenge representation + public var parameters: Parameters + + public init(parameters: Parameters) { + self.parameters = parameters + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "POST" + + var jsonEncoder: JSONEncoder { + let encoder = JSONEncoder() + return encoder + } + + urlRequest?.httpBody = try jsonEncoder.encode(parameters) + urlRequest?.setValue("application/json", forHTTPHeaderField: "Content-Type") + return urlRequest + } + + /// - Returns: **201**, Single GameCenterChallenge as `GameCenterChallengeResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **422**, Unprocessable request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 201: + return try jsonDecoder.decode(GameCenterChallengeResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 409: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 422: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterDetails/ById/AchievementReleases/GameCenterDetailsByIdAchievementReleases.GET.5816a34.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterDetails/ById/AchievementReleases/GameCenterDetailsByIdAchievementReleases.GET.5816a34.generated.swift index 03087000..e76d656c 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterDetails/ById/AchievementReleases/GameCenterDetailsByIdAchievementReleases.GET.5816a34.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterDetails/ById/AchievementReleases/GameCenterDetailsByIdAchievementReleases.GET.5816a34.generated.swift @@ -54,8 +54,10 @@ extension V1.GameCenterDetails.ById.AchievementReleases { /// - Returns: **200**, List of GameCenterAchievementReleases as `GameCenterAchievementReleasesResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -69,12 +71,18 @@ extension V1.GameCenterDetails.ById.AchievementReleases { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 404: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -102,132 +110,175 @@ extension V1.GameCenterDetails.ById.AchievementReleases.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum GameCenterAchievementReleases: Hashable, Codable, RawRepresentable { - case gameCenterAchievement - case gameCenterDetail - case live - case unknown(String) + public struct GameCenterAchievementReleases: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var gameCenterAchievement: Self { + .init(rawValue: "gameCenterAchievement") + } + + public static var gameCenterDetail: Self { + .init(rawValue: "gameCenterDetail") + } - public var rawValue: String { - switch self { - case .gameCenterAchievement: return "gameCenterAchievement" - case .gameCenterDetail: return "gameCenterDetail" - case .live: return "live" - case .unknown(let rawValue): return rawValue - } + public static var live: Self { + .init(rawValue: "live") } + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "gameCenterAchievement": self = .gameCenterAchievement - case "gameCenterDetail": self = .gameCenterDetail - case "live": self = .live - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum GameCenterAchievements: Hashable, Codable, RawRepresentable { - case archived - case gameCenterDetail - case gameCenterGroup - case groupAchievement - case localizations - case points - case referenceName - case releases - case repeatable - case showBeforeEarned - case vendorIdentifier - case unknown(String) - - public var rawValue: String { - switch self { - case .archived: return "archived" - case .gameCenterDetail: return "gameCenterDetail" - case .gameCenterGroup: return "gameCenterGroup" - case .groupAchievement: return "groupAchievement" - case .localizations: return "localizations" - case .points: return "points" - case .referenceName: return "referenceName" - case .releases: return "releases" - case .repeatable: return "repeatable" - case .showBeforeEarned: return "showBeforeEarned" - case .vendorIdentifier: return "vendorIdentifier" - case .unknown(let rawValue): return rawValue - } + public struct GameCenterAchievements: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var activity: Self { + .init(rawValue: "activity") + } + + public static var activityProperties: Self { + .init(rawValue: "activityProperties") + } + + public static var archived: Self { + .init(rawValue: "archived") + } + + public static var gameCenterDetail: Self { + .init(rawValue: "gameCenterDetail") + } + + public static var gameCenterGroup: Self { + .init(rawValue: "gameCenterGroup") + } + + public static var groupAchievement: Self { + .init(rawValue: "groupAchievement") } + public static var localizations: Self { + .init(rawValue: "localizations") + } + + public static var points: Self { + .init(rawValue: "points") + } + + public static var referenceName: Self { + .init(rawValue: "referenceName") + } + + public static var releases: Self { + .init(rawValue: "releases") + } + + public static var repeatable: Self { + .init(rawValue: "repeatable") + } + + public static var showBeforeEarned: Self { + .init(rawValue: "showBeforeEarned") + } + + public static var vendorIdentifier: Self { + .init(rawValue: "vendorIdentifier") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "archived": self = .archived - case "gameCenterDetail": self = .gameCenterDetail - case "gameCenterGroup": self = .gameCenterGroup - case "groupAchievement": self = .groupAchievement - case "localizations": self = .localizations - case "points": self = .points - case "referenceName": self = .referenceName - case "releases": self = .releases - case "repeatable": self = .repeatable - case "showBeforeEarned": self = .showBeforeEarned - case "vendorIdentifier": self = .vendorIdentifier - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum GameCenterDetails: Hashable, Codable, RawRepresentable { - case achievementReleases - case app - case arcadeEnabled - case challengeEnabled - case defaultGroupLeaderboard - case defaultLeaderboard - case gameCenterAchievements - case gameCenterAppVersions - case gameCenterGroup - case gameCenterLeaderboardSets - case gameCenterLeaderboards - case leaderboardReleases - case leaderboardSetReleases - case unknown(String) - - public var rawValue: String { - switch self { - case .achievementReleases: return "achievementReleases" - case .app: return "app" - case .arcadeEnabled: return "arcadeEnabled" - case .challengeEnabled: return "challengeEnabled" - case .defaultGroupLeaderboard: return "defaultGroupLeaderboard" - case .defaultLeaderboard: return "defaultLeaderboard" - case .gameCenterAchievements: return "gameCenterAchievements" - case .gameCenterAppVersions: return "gameCenterAppVersions" - case .gameCenterGroup: return "gameCenterGroup" - case .gameCenterLeaderboardSets: return "gameCenterLeaderboardSets" - case .gameCenterLeaderboards: return "gameCenterLeaderboards" - case .leaderboardReleases: return "leaderboardReleases" - case .leaderboardSetReleases: return "leaderboardSetReleases" - case .unknown(let rawValue): return rawValue - } + public struct GameCenterDetails: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var achievementReleases: Self { + .init(rawValue: "achievementReleases") + } + + public static var activityReleases: Self { + .init(rawValue: "activityReleases") + } + + public static var app: Self { + .init(rawValue: "app") + } + + public static var arcadeEnabled: Self { + .init(rawValue: "arcadeEnabled") + } + + public static var challengeEnabled: Self { + .init(rawValue: "challengeEnabled") + } + + public static var challengeReleases: Self { + .init(rawValue: "challengeReleases") + } + + public static var challengesMinimumPlatformVersions: Self { + .init(rawValue: "challengesMinimumPlatformVersions") + } + + public static var defaultGroupLeaderboard: Self { + .init(rawValue: "defaultGroupLeaderboard") + } + + public static var defaultLeaderboard: Self { + .init(rawValue: "defaultLeaderboard") + } + + public static var gameCenterAchievements: Self { + .init(rawValue: "gameCenterAchievements") + } + + public static var gameCenterActivities: Self { + .init(rawValue: "gameCenterActivities") + } + + public static var gameCenterAppVersions: Self { + .init(rawValue: "gameCenterAppVersions") + } + + public static var gameCenterChallenges: Self { + .init(rawValue: "gameCenterChallenges") + } + + public static var gameCenterGroup: Self { + .init(rawValue: "gameCenterGroup") + } + + public static var gameCenterLeaderboardSets: Self { + .init(rawValue: "gameCenterLeaderboardSets") + } + + public static var gameCenterLeaderboards: Self { + .init(rawValue: "gameCenterLeaderboards") + } + + public static var leaderboardReleases: Self { + .init(rawValue: "leaderboardReleases") + } + + public static var leaderboardSetReleases: Self { + .init(rawValue: "leaderboardSetReleases") + } + + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "achievementReleases": self = .achievementReleases - case "app": self = .app - case "arcadeEnabled": self = .arcadeEnabled - case "challengeEnabled": self = .challengeEnabled - case "defaultGroupLeaderboard": self = .defaultGroupLeaderboard - case "defaultLeaderboard": self = .defaultLeaderboard - case "gameCenterAchievements": self = .gameCenterAchievements - case "gameCenterAppVersions": self = .gameCenterAppVersions - case "gameCenterGroup": self = .gameCenterGroup - case "gameCenterLeaderboardSets": self = .gameCenterLeaderboardSets - case "gameCenterLeaderboards": self = .gameCenterLeaderboards - case "leaderboardReleases": self = .leaderboardReleases - case "leaderboardSetReleases": self = .leaderboardSetReleases - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } @@ -282,25 +333,23 @@ extension V1.GameCenterDetails.ById.AchievementReleases.GET { } } - public enum Include: Hashable, Codable, RawRepresentable { - case gameCenterAchievement - case gameCenterDetail - case unknown(String) + public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var gameCenterAchievement: Self { + .init(rawValue: "gameCenterAchievement") + } + + public static var gameCenterDetail: Self { + .init(rawValue: "gameCenterDetail") + } - public var rawValue: String { - switch self { - case .gameCenterAchievement: return "gameCenterAchievement" - case .gameCenterDetail: return "gameCenterDetail" - case .unknown(let rawValue): return rawValue - } + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "gameCenterAchievement": self = .gameCenterAchievement - case "gameCenterDetail": self = .gameCenterDetail - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterDetails/ById/ActivityReleases/GameCenterDetailsByIdActivityReleases.GET.3e146f9.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterDetails/ById/ActivityReleases/GameCenterDetailsByIdActivityReleases.GET.3e146f9.generated.swift new file mode 100644 index 00000000..a7a49927 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterDetails/ById/ActivityReleases/GameCenterDetailsByIdActivityReleases.GET.3e146f9.generated.swift @@ -0,0 +1,198 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.GameCenterDetails.ById.ActivityReleases { + public struct GET: Endpoint { + public typealias Response = GameCenterActivityVersionReleasesResponse + + public var path: String { + "/v1/gameCenterDetails/\(id)/activityReleases" + } + + /// the id of the requested resource + public var id: String + + public var parameters: Parameters = Parameters() + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + components?.queryItems = [ + URLQueryItem(name: "fields[gameCenterActivityVersionReleases]", + value: parameters.fields[.gameCenterActivityVersionReleases]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "fields[gameCenterActivityVersions]", + value: parameters.fields[.gameCenterActivityVersions]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "include", + value: parameters.include?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "limit", + value: parameters.limit.map { "\($0)" }) + ].filter { $0.value != nil } + if components?.queryItems?.isEmpty ?? false { + components?.queryItems = nil + } + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "GET" + return urlRequest + } + + /// - Returns: **200**, List of GameCenterActivityVersionReleases as `GameCenterActivityVersionReleasesResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(GameCenterActivityVersionReleasesResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +extension V1.GameCenterDetails.ById.ActivityReleases.GET { + public struct Parameters: Hashable { + public var fields: Fields = Fields() + + /// comma-separated list of relationships to include + public var include: [Include]? + + /// maximum resources per page + public var limit: Int? + + public struct Fields: Hashable { + public subscript (_ relation: Relation) -> T { + get { values[relation]?.base as! T } + set { values[relation] = AnyHashable(newValue) } + } + + private var values: [AnyHashable: AnyHashable] = [:] + + public struct GameCenterActivityVersionReleases: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var version: Self { + .init(rawValue: "version") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct GameCenterActivityVersions: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var activity: Self { + .init(rawValue: "activity") + } + + public static var defaultImage: Self { + .init(rawValue: "defaultImage") + } + + public static var fallbackUrl: Self { + .init(rawValue: "fallbackUrl") + } + + public static var localizations: Self { + .init(rawValue: "localizations") + } + + public static var releases: Self { + .init(rawValue: "releases") + } + + public static var state: Self { + .init(rawValue: "state") + } + + public static var version: Self { + .init(rawValue: "version") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct Relation: Hashable { + /// the fields to include for returned resources of type gameCenterActivityVersionReleases + public static var gameCenterActivityVersionReleases: Relation<[GameCenterActivityVersionReleases]?> { + .init(key: "fields[gameCenterActivityVersionReleases]") + } + + /// the fields to include for returned resources of type gameCenterActivityVersions + public static var gameCenterActivityVersions: Relation<[GameCenterActivityVersions]?> { + .init(key: "fields[gameCenterActivityVersions]") + } + + internal let key: String + + public func hash(into hasher: inout Hasher) { + hasher.combine(key) + } + } + } + + public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var version: Self { + .init(rawValue: "version") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterDetails/ById/ChallengeReleases/GameCenterDetailsByIdChallengeReleases.GET.7d048ec.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterDetails/ById/ChallengeReleases/GameCenterDetailsByIdChallengeReleases.GET.7d048ec.generated.swift new file mode 100644 index 00000000..e725cd10 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterDetails/ById/ChallengeReleases/GameCenterDetailsByIdChallengeReleases.GET.7d048ec.generated.swift @@ -0,0 +1,194 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.GameCenterDetails.ById.ChallengeReleases { + public struct GET: Endpoint { + public typealias Response = GameCenterChallengeVersionReleasesResponse + + public var path: String { + "/v1/gameCenterDetails/\(id)/challengeReleases" + } + + /// the id of the requested resource + public var id: String + + public var parameters: Parameters = Parameters() + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + components?.queryItems = [ + URLQueryItem(name: "fields[gameCenterChallengeVersionReleases]", + value: parameters.fields[.gameCenterChallengeVersionReleases]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "fields[gameCenterChallengeVersions]", + value: parameters.fields[.gameCenterChallengeVersions]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "include", + value: parameters.include?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "limit", + value: parameters.limit.map { "\($0)" }) + ].filter { $0.value != nil } + if components?.queryItems?.isEmpty ?? false { + components?.queryItems = nil + } + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "GET" + return urlRequest + } + + /// - Returns: **200**, List of GameCenterChallengeVersionReleases as `GameCenterChallengeVersionReleasesResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(GameCenterChallengeVersionReleasesResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +extension V1.GameCenterDetails.ById.ChallengeReleases.GET { + public struct Parameters: Hashable { + public var fields: Fields = Fields() + + /// comma-separated list of relationships to include + public var include: [Include]? + + /// maximum resources per page + public var limit: Int? + + public struct Fields: Hashable { + public subscript (_ relation: Relation) -> T { + get { values[relation]?.base as! T } + set { values[relation] = AnyHashable(newValue) } + } + + private var values: [AnyHashable: AnyHashable] = [:] + + public struct GameCenterChallengeVersionReleases: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var version: Self { + .init(rawValue: "version") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct GameCenterChallengeVersions: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var challenge: Self { + .init(rawValue: "challenge") + } + + public static var defaultImage: Self { + .init(rawValue: "defaultImage") + } + + public static var localizations: Self { + .init(rawValue: "localizations") + } + + public static var releases: Self { + .init(rawValue: "releases") + } + + public static var state: Self { + .init(rawValue: "state") + } + + public static var version: Self { + .init(rawValue: "version") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct Relation: Hashable { + /// the fields to include for returned resources of type gameCenterChallengeVersionReleases + public static var gameCenterChallengeVersionReleases: Relation<[GameCenterChallengeVersionReleases]?> { + .init(key: "fields[gameCenterChallengeVersionReleases]") + } + + /// the fields to include for returned resources of type gameCenterChallengeVersions + public static var gameCenterChallengeVersions: Relation<[GameCenterChallengeVersions]?> { + .init(key: "fields[gameCenterChallengeVersions]") + } + + internal let key: String + + public func hash(into hasher: inout Hasher) { + hasher.combine(key) + } + } + } + + public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var version: Self { + .init(rawValue: "version") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterDetails/ById/GameCenterAchievements/GameCenterDetailsByIdGameCenterAchievements.GET.601c9ef.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterDetails/ById/GameCenterAchievements/GameCenterDetailsByIdGameCenterAchievements.GET.601c9ef.generated.swift index f38b27fb..02530093 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterDetails/ById/GameCenterAchievements/GameCenterDetailsByIdGameCenterAchievements.GET.601c9ef.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterDetails/ById/GameCenterAchievements/GameCenterDetailsByIdGameCenterAchievements.GET.601c9ef.generated.swift @@ -34,6 +34,8 @@ extension V1.GameCenterDetails.ById.GameCenterAchievements { value: parameters.fields[.gameCenterAchievementReleases]?.map { "\($0)" }.joined(separator: ",")), URLQueryItem(name: "fields[gameCenterAchievements]", value: parameters.fields[.gameCenterAchievements]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "fields[gameCenterActivities]", + value: parameters.fields[.gameCenterActivities]?.map { "\($0)" }.joined(separator: ",")), URLQueryItem(name: "fields[gameCenterDetails]", value: parameters.fields[.gameCenterDetails]?.map { "\($0)" }.joined(separator: ",")), URLQueryItem(name: "fields[gameCenterGroups]", @@ -64,8 +66,10 @@ extension V1.GameCenterDetails.ById.GameCenterAchievements { /// - Returns: **200**, List of GameCenterAchievements as `GameCenterAchievementsResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -79,12 +83,18 @@ extension V1.GameCenterDetails.ById.GameCenterAchievements { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 404: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -112,197 +122,315 @@ extension V1.GameCenterDetails.ById.GameCenterAchievements.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum GameCenterAchievementLocalizations: Hashable, Codable, RawRepresentable { - case afterEarnedDescription - case beforeEarnedDescription - case gameCenterAchievement - case gameCenterAchievementImage - case locale - case name - case unknown(String) - - public var rawValue: String { - switch self { - case .afterEarnedDescription: return "afterEarnedDescription" - case .beforeEarnedDescription: return "beforeEarnedDescription" - case .gameCenterAchievement: return "gameCenterAchievement" - case .gameCenterAchievementImage: return "gameCenterAchievementImage" - case .locale: return "locale" - case .name: return "name" - case .unknown(let rawValue): return rawValue - } + public struct GameCenterAchievementLocalizations: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var afterEarnedDescription: Self { + .init(rawValue: "afterEarnedDescription") + } + + public static var beforeEarnedDescription: Self { + .init(rawValue: "beforeEarnedDescription") + } + + public static var gameCenterAchievement: Self { + .init(rawValue: "gameCenterAchievement") + } + + public static var gameCenterAchievementImage: Self { + .init(rawValue: "gameCenterAchievementImage") + } + + public static var locale: Self { + .init(rawValue: "locale") + } + + public static var name: Self { + .init(rawValue: "name") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct GameCenterAchievementReleases: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var gameCenterAchievement: Self { + .init(rawValue: "gameCenterAchievement") + } + + public static var gameCenterDetail: Self { + .init(rawValue: "gameCenterDetail") + } + + public static var live: Self { + .init(rawValue: "live") + } + + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "afterEarnedDescription": self = .afterEarnedDescription - case "beforeEarnedDescription": self = .beforeEarnedDescription - case "gameCenterAchievement": self = .gameCenterAchievement - case "gameCenterAchievementImage": self = .gameCenterAchievementImage - case "locale": self = .locale - case "name": self = .name - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum GameCenterAchievementReleases: Hashable, Codable, RawRepresentable { - case gameCenterAchievement - case gameCenterDetail - case live - case unknown(String) + public struct GameCenterAchievements: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var activity: Self { + .init(rawValue: "activity") + } + + public static var activityProperties: Self { + .init(rawValue: "activityProperties") + } + + public static var archived: Self { + .init(rawValue: "archived") + } + + public static var gameCenterDetail: Self { + .init(rawValue: "gameCenterDetail") + } + + public static var gameCenterGroup: Self { + .init(rawValue: "gameCenterGroup") + } + + public static var groupAchievement: Self { + .init(rawValue: "groupAchievement") + } + + public static var localizations: Self { + .init(rawValue: "localizations") + } - public var rawValue: String { - switch self { - case .gameCenterAchievement: return "gameCenterAchievement" - case .gameCenterDetail: return "gameCenterDetail" - case .live: return "live" - case .unknown(let rawValue): return rawValue - } + public static var points: Self { + .init(rawValue: "points") } + public static var referenceName: Self { + .init(rawValue: "referenceName") + } + + public static var releases: Self { + .init(rawValue: "releases") + } + + public static var repeatable: Self { + .init(rawValue: "repeatable") + } + + public static var showBeforeEarned: Self { + .init(rawValue: "showBeforeEarned") + } + + public static var vendorIdentifier: Self { + .init(rawValue: "vendorIdentifier") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "gameCenterAchievement": self = .gameCenterAchievement - case "gameCenterDetail": self = .gameCenterDetail - case "live": self = .live - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum GameCenterAchievements: Hashable, Codable, RawRepresentable { - case archived - case gameCenterDetail - case gameCenterGroup - case groupAchievement - case localizations - case points - case referenceName - case releases - case repeatable - case showBeforeEarned - case vendorIdentifier - case unknown(String) - - public var rawValue: String { - switch self { - case .archived: return "archived" - case .gameCenterDetail: return "gameCenterDetail" - case .gameCenterGroup: return "gameCenterGroup" - case .groupAchievement: return "groupAchievement" - case .localizations: return "localizations" - case .points: return "points" - case .referenceName: return "referenceName" - case .releases: return "releases" - case .repeatable: return "repeatable" - case .showBeforeEarned: return "showBeforeEarned" - case .vendorIdentifier: return "vendorIdentifier" - case .unknown(let rawValue): return rawValue - } + public struct GameCenterActivities: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var achievements: Self { + .init(rawValue: "achievements") + } + + public static var archived: Self { + .init(rawValue: "archived") + } + + public static var gameCenterDetail: Self { + .init(rawValue: "gameCenterDetail") + } + + public static var gameCenterGroup: Self { + .init(rawValue: "gameCenterGroup") + } + + public static var leaderboards: Self { + .init(rawValue: "leaderboards") + } + + public static var maximumPlayersCount: Self { + .init(rawValue: "maximumPlayersCount") + } + + public static var minimumPlayersCount: Self { + .init(rawValue: "minimumPlayersCount") + } + + public static var playStyle: Self { + .init(rawValue: "playStyle") + } + + public static var properties: Self { + .init(rawValue: "properties") + } + + public static var referenceName: Self { + .init(rawValue: "referenceName") + } + + public static var supportsPartyCode: Self { + .init(rawValue: "supportsPartyCode") } + public static var vendorIdentifier: Self { + .init(rawValue: "vendorIdentifier") + } + + public static var versions: Self { + .init(rawValue: "versions") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "archived": self = .archived - case "gameCenterDetail": self = .gameCenterDetail - case "gameCenterGroup": self = .gameCenterGroup - case "groupAchievement": self = .groupAchievement - case "localizations": self = .localizations - case "points": self = .points - case "referenceName": self = .referenceName - case "releases": self = .releases - case "repeatable": self = .repeatable - case "showBeforeEarned": self = .showBeforeEarned - case "vendorIdentifier": self = .vendorIdentifier - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum GameCenterDetails: Hashable, Codable, RawRepresentable { - case achievementReleases - case app - case arcadeEnabled - case challengeEnabled - case defaultGroupLeaderboard - case defaultLeaderboard - case gameCenterAchievements - case gameCenterAppVersions - case gameCenterGroup - case gameCenterLeaderboardSets - case gameCenterLeaderboards - case leaderboardReleases - case leaderboardSetReleases - case unknown(String) - - public var rawValue: String { - switch self { - case .achievementReleases: return "achievementReleases" - case .app: return "app" - case .arcadeEnabled: return "arcadeEnabled" - case .challengeEnabled: return "challengeEnabled" - case .defaultGroupLeaderboard: return "defaultGroupLeaderboard" - case .defaultLeaderboard: return "defaultLeaderboard" - case .gameCenterAchievements: return "gameCenterAchievements" - case .gameCenterAppVersions: return "gameCenterAppVersions" - case .gameCenterGroup: return "gameCenterGroup" - case .gameCenterLeaderboardSets: return "gameCenterLeaderboardSets" - case .gameCenterLeaderboards: return "gameCenterLeaderboards" - case .leaderboardReleases: return "leaderboardReleases" - case .leaderboardSetReleases: return "leaderboardSetReleases" - case .unknown(let rawValue): return rawValue - } + public struct GameCenterDetails: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var achievementReleases: Self { + .init(rawValue: "achievementReleases") + } + + public static var activityReleases: Self { + .init(rawValue: "activityReleases") + } + + public static var app: Self { + .init(rawValue: "app") + } + + public static var arcadeEnabled: Self { + .init(rawValue: "arcadeEnabled") + } + + public static var challengeEnabled: Self { + .init(rawValue: "challengeEnabled") + } + + public static var challengeReleases: Self { + .init(rawValue: "challengeReleases") + } + + public static var challengesMinimumPlatformVersions: Self { + .init(rawValue: "challengesMinimumPlatformVersions") + } + + public static var defaultGroupLeaderboard: Self { + .init(rawValue: "defaultGroupLeaderboard") + } + + public static var defaultLeaderboard: Self { + .init(rawValue: "defaultLeaderboard") + } + + public static var gameCenterAchievements: Self { + .init(rawValue: "gameCenterAchievements") + } + + public static var gameCenterActivities: Self { + .init(rawValue: "gameCenterActivities") + } + + public static var gameCenterAppVersions: Self { + .init(rawValue: "gameCenterAppVersions") + } + + public static var gameCenterChallenges: Self { + .init(rawValue: "gameCenterChallenges") + } + + public static var gameCenterGroup: Self { + .init(rawValue: "gameCenterGroup") + } + + public static var gameCenterLeaderboardSets: Self { + .init(rawValue: "gameCenterLeaderboardSets") + } + + public static var gameCenterLeaderboards: Self { + .init(rawValue: "gameCenterLeaderboards") + } + + public static var leaderboardReleases: Self { + .init(rawValue: "leaderboardReleases") + } + + public static var leaderboardSetReleases: Self { + .init(rawValue: "leaderboardSetReleases") + } + + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "achievementReleases": self = .achievementReleases - case "app": self = .app - case "arcadeEnabled": self = .arcadeEnabled - case "challengeEnabled": self = .challengeEnabled - case "defaultGroupLeaderboard": self = .defaultGroupLeaderboard - case "defaultLeaderboard": self = .defaultLeaderboard - case "gameCenterAchievements": self = .gameCenterAchievements - case "gameCenterAppVersions": self = .gameCenterAppVersions - case "gameCenterGroup": self = .gameCenterGroup - case "gameCenterLeaderboardSets": self = .gameCenterLeaderboardSets - case "gameCenterLeaderboards": self = .gameCenterLeaderboards - case "leaderboardReleases": self = .leaderboardReleases - case "leaderboardSetReleases": self = .leaderboardSetReleases - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum GameCenterGroups: Hashable, Codable, RawRepresentable { - case gameCenterAchievements - case gameCenterDetails - case gameCenterLeaderboardSets - case gameCenterLeaderboards - case referenceName - case unknown(String) - - public var rawValue: String { - switch self { - case .gameCenterAchievements: return "gameCenterAchievements" - case .gameCenterDetails: return "gameCenterDetails" - case .gameCenterLeaderboardSets: return "gameCenterLeaderboardSets" - case .gameCenterLeaderboards: return "gameCenterLeaderboards" - case .referenceName: return "referenceName" - case .unknown(let rawValue): return rawValue - } + public struct GameCenterGroups: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var gameCenterAchievements: Self { + .init(rawValue: "gameCenterAchievements") + } + + public static var gameCenterActivities: Self { + .init(rawValue: "gameCenterActivities") + } + + public static var gameCenterChallenges: Self { + .init(rawValue: "gameCenterChallenges") + } + + public static var gameCenterDetails: Self { + .init(rawValue: "gameCenterDetails") + } + + public static var gameCenterLeaderboardSets: Self { + .init(rawValue: "gameCenterLeaderboardSets") + } + + public static var gameCenterLeaderboards: Self { + .init(rawValue: "gameCenterLeaderboards") + } + + public static var referenceName: Self { + .init(rawValue: "referenceName") + } + + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "gameCenterAchievements": self = .gameCenterAchievements - case "gameCenterDetails": self = .gameCenterDetails - case "gameCenterLeaderboardSets": self = .gameCenterLeaderboardSets - case "gameCenterLeaderboards": self = .gameCenterLeaderboards - case "referenceName": self = .referenceName - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } @@ -322,6 +450,11 @@ extension V1.GameCenterDetails.ById.GameCenterAchievements.GET { .init(key: "fields[gameCenterAchievements]") } + /// the fields to include for returned resources of type gameCenterActivities + public static var gameCenterActivities: Relation<[GameCenterActivities]?> { + .init(key: "fields[gameCenterActivities]") + } + /// the fields to include for returned resources of type gameCenterDetails public static var gameCenterDetails: Relation<[GameCenterDetails]?> { .init(key: "fields[gameCenterDetails]") @@ -372,34 +505,39 @@ extension V1.GameCenterDetails.ById.GameCenterAchievements.GET { } } - public enum Include: Hashable, Codable, RawRepresentable { - case gameCenterDetail - case gameCenterGroup - case groupAchievement - case localizations - case releases - case unknown(String) - - public var rawValue: String { - switch self { - case .gameCenterDetail: return "gameCenterDetail" - case .gameCenterGroup: return "gameCenterGroup" - case .groupAchievement: return "groupAchievement" - case .localizations: return "localizations" - case .releases: return "releases" - case .unknown(let rawValue): return rawValue - } + public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var activity: Self { + .init(rawValue: "activity") } + public static var gameCenterDetail: Self { + .init(rawValue: "gameCenterDetail") + } + + public static var gameCenterGroup: Self { + .init(rawValue: "gameCenterGroup") + } + + public static var groupAchievement: Self { + .init(rawValue: "groupAchievement") + } + + public static var localizations: Self { + .init(rawValue: "localizations") + } + + public static var releases: Self { + .init(rawValue: "releases") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "gameCenterDetail": self = .gameCenterDetail - case "gameCenterGroup": self = .gameCenterGroup - case "groupAchievement": self = .groupAchievement - case "localizations": self = .localizations - case "releases": self = .releases - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterDetails/ById/GameCenterActivities/GameCenterDetailsByIdGameCenterActivities.GET.dc2d5a7.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterDetails/ById/GameCenterActivities/GameCenterDetailsByIdGameCenterActivities.GET.dc2d5a7.generated.swift new file mode 100644 index 00000000..03456455 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterDetails/ById/GameCenterActivities/GameCenterDetailsByIdGameCenterActivities.GET.dc2d5a7.generated.swift @@ -0,0 +1,617 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.GameCenterDetails.ById.GameCenterActivities { + public struct GET: Endpoint { + public typealias Response = GameCenterActivitiesResponse + + public var path: String { + "/v1/gameCenterDetails/\(id)/gameCenterActivities" + } + + /// the id of the requested resource + public var id: String + + public var parameters: Parameters = Parameters() + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + components?.queryItems = [ + URLQueryItem(name: "fields[gameCenterAchievements]", + value: parameters.fields[.gameCenterAchievements]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "fields[gameCenterActivities]", + value: parameters.fields[.gameCenterActivities]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "fields[gameCenterActivityVersions]", + value: parameters.fields[.gameCenterActivityVersions]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "fields[gameCenterDetails]", + value: parameters.fields[.gameCenterDetails]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "fields[gameCenterGroups]", + value: parameters.fields[.gameCenterGroups]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "fields[gameCenterLeaderboards]", + value: parameters.fields[.gameCenterLeaderboards]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "include", + value: parameters.include?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "limit[achievements]", + value: parameters.limit[.achievements].map { "\($0)" }), + URLQueryItem(name: "limit[leaderboards]", + value: parameters.limit[.leaderboards].map { "\($0)" }), + URLQueryItem(name: "limit[versions]", + value: parameters.limit[.versions].map { "\($0)" }), + URLQueryItem(name: "limit", + value: parameters.limit[].map { "\($0)" }) + ].filter { $0.value != nil } + if components?.queryItems?.isEmpty ?? false { + components?.queryItems = nil + } + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "GET" + return urlRequest + } + + /// - Returns: **200**, List of GameCenterActivities as `GameCenterActivitiesResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(GameCenterActivitiesResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +extension V1.GameCenterDetails.ById.GameCenterActivities.GET { + public struct Parameters: Hashable { + public var fields: Fields = Fields() + + /// comma-separated list of relationships to include + public var include: [Include]? + + /// maximum resources per page + public var limit: Limit = Limit() + + public struct Fields: Hashable { + public subscript (_ relation: Relation) -> T { + get { values[relation]?.base as! T } + set { values[relation] = AnyHashable(newValue) } + } + + private var values: [AnyHashable: AnyHashable] = [:] + + public struct GameCenterAchievements: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var activity: Self { + .init(rawValue: "activity") + } + + public static var activityProperties: Self { + .init(rawValue: "activityProperties") + } + + public static var archived: Self { + .init(rawValue: "archived") + } + + public static var gameCenterDetail: Self { + .init(rawValue: "gameCenterDetail") + } + + public static var gameCenterGroup: Self { + .init(rawValue: "gameCenterGroup") + } + + public static var groupAchievement: Self { + .init(rawValue: "groupAchievement") + } + + public static var localizations: Self { + .init(rawValue: "localizations") + } + + public static var points: Self { + .init(rawValue: "points") + } + + public static var referenceName: Self { + .init(rawValue: "referenceName") + } + + public static var releases: Self { + .init(rawValue: "releases") + } + + public static var repeatable: Self { + .init(rawValue: "repeatable") + } + + public static var showBeforeEarned: Self { + .init(rawValue: "showBeforeEarned") + } + + public static var vendorIdentifier: Self { + .init(rawValue: "vendorIdentifier") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct GameCenterActivities: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var achievements: Self { + .init(rawValue: "achievements") + } + + public static var archived: Self { + .init(rawValue: "archived") + } + + public static var gameCenterDetail: Self { + .init(rawValue: "gameCenterDetail") + } + + public static var gameCenterGroup: Self { + .init(rawValue: "gameCenterGroup") + } + + public static var leaderboards: Self { + .init(rawValue: "leaderboards") + } + + public static var maximumPlayersCount: Self { + .init(rawValue: "maximumPlayersCount") + } + + public static var minimumPlayersCount: Self { + .init(rawValue: "minimumPlayersCount") + } + + public static var playStyle: Self { + .init(rawValue: "playStyle") + } + + public static var properties: Self { + .init(rawValue: "properties") + } + + public static var referenceName: Self { + .init(rawValue: "referenceName") + } + + public static var supportsPartyCode: Self { + .init(rawValue: "supportsPartyCode") + } + + public static var vendorIdentifier: Self { + .init(rawValue: "vendorIdentifier") + } + + public static var versions: Self { + .init(rawValue: "versions") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct GameCenterActivityVersions: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var activity: Self { + .init(rawValue: "activity") + } + + public static var defaultImage: Self { + .init(rawValue: "defaultImage") + } + + public static var fallbackUrl: Self { + .init(rawValue: "fallbackUrl") + } + + public static var localizations: Self { + .init(rawValue: "localizations") + } + + public static var releases: Self { + .init(rawValue: "releases") + } + + public static var state: Self { + .init(rawValue: "state") + } + + public static var version: Self { + .init(rawValue: "version") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct GameCenterDetails: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var achievementReleases: Self { + .init(rawValue: "achievementReleases") + } + + public static var activityReleases: Self { + .init(rawValue: "activityReleases") + } + + public static var app: Self { + .init(rawValue: "app") + } + + public static var arcadeEnabled: Self { + .init(rawValue: "arcadeEnabled") + } + + public static var challengeEnabled: Self { + .init(rawValue: "challengeEnabled") + } + + public static var challengeReleases: Self { + .init(rawValue: "challengeReleases") + } + + public static var challengesMinimumPlatformVersions: Self { + .init(rawValue: "challengesMinimumPlatformVersions") + } + + public static var defaultGroupLeaderboard: Self { + .init(rawValue: "defaultGroupLeaderboard") + } + + public static var defaultLeaderboard: Self { + .init(rawValue: "defaultLeaderboard") + } + + public static var gameCenterAchievements: Self { + .init(rawValue: "gameCenterAchievements") + } + + public static var gameCenterActivities: Self { + .init(rawValue: "gameCenterActivities") + } + + public static var gameCenterAppVersions: Self { + .init(rawValue: "gameCenterAppVersions") + } + + public static var gameCenterChallenges: Self { + .init(rawValue: "gameCenterChallenges") + } + + public static var gameCenterGroup: Self { + .init(rawValue: "gameCenterGroup") + } + + public static var gameCenterLeaderboardSets: Self { + .init(rawValue: "gameCenterLeaderboardSets") + } + + public static var gameCenterLeaderboards: Self { + .init(rawValue: "gameCenterLeaderboards") + } + + public static var leaderboardReleases: Self { + .init(rawValue: "leaderboardReleases") + } + + public static var leaderboardSetReleases: Self { + .init(rawValue: "leaderboardSetReleases") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct GameCenterGroups: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var gameCenterAchievements: Self { + .init(rawValue: "gameCenterAchievements") + } + + public static var gameCenterActivities: Self { + .init(rawValue: "gameCenterActivities") + } + + public static var gameCenterChallenges: Self { + .init(rawValue: "gameCenterChallenges") + } + + public static var gameCenterDetails: Self { + .init(rawValue: "gameCenterDetails") + } + + public static var gameCenterLeaderboardSets: Self { + .init(rawValue: "gameCenterLeaderboardSets") + } + + public static var gameCenterLeaderboards: Self { + .init(rawValue: "gameCenterLeaderboards") + } + + public static var referenceName: Self { + .init(rawValue: "referenceName") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct GameCenterLeaderboards: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var activity: Self { + .init(rawValue: "activity") + } + + public static var activityProperties: Self { + .init(rawValue: "activityProperties") + } + + public static var archived: Self { + .init(rawValue: "archived") + } + + public static var challenge: Self { + .init(rawValue: "challenge") + } + + public static var defaultFormatter: Self { + .init(rawValue: "defaultFormatter") + } + + public static var gameCenterDetail: Self { + .init(rawValue: "gameCenterDetail") + } + + public static var gameCenterGroup: Self { + .init(rawValue: "gameCenterGroup") + } + + public static var gameCenterLeaderboardSets: Self { + .init(rawValue: "gameCenterLeaderboardSets") + } + + public static var groupLeaderboard: Self { + .init(rawValue: "groupLeaderboard") + } + + public static var localizations: Self { + .init(rawValue: "localizations") + } + + public static var recurrenceDuration: Self { + .init(rawValue: "recurrenceDuration") + } + + public static var recurrenceRule: Self { + .init(rawValue: "recurrenceRule") + } + + public static var recurrenceStartDate: Self { + .init(rawValue: "recurrenceStartDate") + } + + public static var referenceName: Self { + .init(rawValue: "referenceName") + } + + public static var releases: Self { + .init(rawValue: "releases") + } + + public static var scoreRangeEnd: Self { + .init(rawValue: "scoreRangeEnd") + } + + public static var scoreRangeStart: Self { + .init(rawValue: "scoreRangeStart") + } + + public static var scoreSortType: Self { + .init(rawValue: "scoreSortType") + } + + public static var submissionType: Self { + .init(rawValue: "submissionType") + } + + public static var vendorIdentifier: Self { + .init(rawValue: "vendorIdentifier") + } + + public static var visibility: Self { + .init(rawValue: "visibility") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct Relation: Hashable { + /// the fields to include for returned resources of type gameCenterAchievements + public static var gameCenterAchievements: Relation<[GameCenterAchievements]?> { + .init(key: "fields[gameCenterAchievements]") + } + + /// the fields to include for returned resources of type gameCenterActivities + public static var gameCenterActivities: Relation<[GameCenterActivities]?> { + .init(key: "fields[gameCenterActivities]") + } + + /// the fields to include for returned resources of type gameCenterActivityVersions + public static var gameCenterActivityVersions: Relation<[GameCenterActivityVersions]?> { + .init(key: "fields[gameCenterActivityVersions]") + } + + /// the fields to include for returned resources of type gameCenterDetails + public static var gameCenterDetails: Relation<[GameCenterDetails]?> { + .init(key: "fields[gameCenterDetails]") + } + + /// the fields to include for returned resources of type gameCenterGroups + public static var gameCenterGroups: Relation<[GameCenterGroups]?> { + .init(key: "fields[gameCenterGroups]") + } + + /// the fields to include for returned resources of type gameCenterLeaderboards + public static var gameCenterLeaderboards: Relation<[GameCenterLeaderboards]?> { + .init(key: "fields[gameCenterLeaderboards]") + } + + internal let key: String + + public func hash(into hasher: inout Hasher) { + hasher.combine(key) + } + } + } + + public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var achievements: Self { + .init(rawValue: "achievements") + } + + public static var gameCenterDetail: Self { + .init(rawValue: "gameCenterDetail") + } + + public static var gameCenterGroup: Self { + .init(rawValue: "gameCenterGroup") + } + + public static var leaderboards: Self { + .init(rawValue: "leaderboards") + } + + public static var versions: Self { + .init(rawValue: "versions") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct Limit: Hashable { + public subscript () -> Int? { + get { self[Relation(key: "limit")] } + set { self[Relation(key: "limit")] = newValue } + } + + public subscript (_ relation: Relation) -> T { + get { values[relation]?.base as! T } + set { values[relation] = AnyHashable(newValue) } + } + + private var values: [AnyHashable: AnyHashable] = [:] + + public struct Relation: Hashable { + /// maximum number of related achievements returned (when they are included) + public static var achievements: Relation { + .init(key: "limit[achievements]") + } + + /// maximum number of related leaderboards returned (when they are included) + public static var leaderboards: Relation { + .init(key: "limit[leaderboards]") + } + + /// maximum number of related versions returned (when they are included) + public static var versions: Relation { + .init(key: "limit[versions]") + } + + internal let key: String + + public func hash(into hasher: inout Hasher) { + hasher.combine(key) + } + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterDetails/ById/GameCenterAppVersions/GameCenterDetailsByIdGameCenterAppVersions.GET.7515b8e.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterDetails/ById/GameCenterAppVersions/GameCenterDetailsByIdGameCenterAppVersions.GET.7515b8e.generated.swift index 9e4d727f..6f0abcfe 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterDetails/ById/GameCenterAppVersions/GameCenterDetailsByIdGameCenterAppVersions.GET.7515b8e.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterDetails/ById/GameCenterAppVersions/GameCenterDetailsByIdGameCenterAppVersions.GET.7515b8e.generated.swift @@ -52,8 +52,10 @@ extension V1.GameCenterDetails.ById.GameCenterAppVersions { /// - Returns: **200**, List of GameCenterAppVersions as `GameCenterAppVersionsResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -67,12 +69,18 @@ extension V1.GameCenterDetails.ById.GameCenterAppVersions { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 404: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -100,104 +108,139 @@ extension V1.GameCenterDetails.ById.GameCenterAppVersions.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum AppStoreVersions: Hashable, Codable, RawRepresentable { - case ageRatingDeclaration - case app - case appClipDefaultExperience - case appStoreReviewDetail - case appStoreState - case appStoreVersionExperiments - case appStoreVersionExperimentsV2 - case appStoreVersionLocalizations - case appStoreVersionPhasedRelease - case appStoreVersionSubmission - case build - case copyright - case createdDate - case customerReviews - case downloadable - case earliestReleaseDate - case platform - case releaseType - case routingAppCoverage - case versionString - case unknown(String) - - public var rawValue: String { - switch self { - case .ageRatingDeclaration: return "ageRatingDeclaration" - case .app: return "app" - case .appClipDefaultExperience: return "appClipDefaultExperience" - case .appStoreReviewDetail: return "appStoreReviewDetail" - case .appStoreState: return "appStoreState" - case .appStoreVersionExperiments: return "appStoreVersionExperiments" - case .appStoreVersionExperimentsV2: return "appStoreVersionExperimentsV2" - case .appStoreVersionLocalizations: return "appStoreVersionLocalizations" - case .appStoreVersionPhasedRelease: return "appStoreVersionPhasedRelease" - case .appStoreVersionSubmission: return "appStoreVersionSubmission" - case .build: return "build" - case .copyright: return "copyright" - case .createdDate: return "createdDate" - case .customerReviews: return "customerReviews" - case .downloadable: return "downloadable" - case .earliestReleaseDate: return "earliestReleaseDate" - case .platform: return "platform" - case .releaseType: return "releaseType" - case .routingAppCoverage: return "routingAppCoverage" - case .versionString: return "versionString" - case .unknown(let rawValue): return rawValue - } + public struct AppStoreVersions: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var ageRatingDeclaration: Self { + .init(rawValue: "ageRatingDeclaration") + } + + public static var alternativeDistributionPackage: Self { + .init(rawValue: "alternativeDistributionPackage") + } + + public static var app: Self { + .init(rawValue: "app") + } + + public static var appClipDefaultExperience: Self { + .init(rawValue: "appClipDefaultExperience") + } + + public static var appStoreReviewDetail: Self { + .init(rawValue: "appStoreReviewDetail") + } + + public static var appStoreState: Self { + .init(rawValue: "appStoreState") + } + + public static var appStoreVersionExperiments: Self { + .init(rawValue: "appStoreVersionExperiments") + } + + public static var appStoreVersionExperimentsV2: Self { + .init(rawValue: "appStoreVersionExperimentsV2") + } + + public static var appStoreVersionLocalizations: Self { + .init(rawValue: "appStoreVersionLocalizations") + } + + public static var appStoreVersionPhasedRelease: Self { + .init(rawValue: "appStoreVersionPhasedRelease") + } + + public static var appStoreVersionSubmission: Self { + .init(rawValue: "appStoreVersionSubmission") + } + + public static var appVersionState: Self { + .init(rawValue: "appVersionState") + } + + public static var build: Self { + .init(rawValue: "build") + } + + public static var copyright: Self { + .init(rawValue: "copyright") + } + + public static var createdDate: Self { + .init(rawValue: "createdDate") + } + + public static var customerReviews: Self { + .init(rawValue: "customerReviews") } + public static var downloadable: Self { + .init(rawValue: "downloadable") + } + + public static var earliestReleaseDate: Self { + .init(rawValue: "earliestReleaseDate") + } + + public static var gameCenterAppVersion: Self { + .init(rawValue: "gameCenterAppVersion") + } + + public static var platform: Self { + .init(rawValue: "platform") + } + + public static var releaseType: Self { + .init(rawValue: "releaseType") + } + + public static var reviewType: Self { + .init(rawValue: "reviewType") + } + + public static var routingAppCoverage: Self { + .init(rawValue: "routingAppCoverage") + } + + public static var usesIdfa: Self { + .init(rawValue: "usesIdfa") + } + + public static var versionString: Self { + .init(rawValue: "versionString") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "ageRatingDeclaration": self = .ageRatingDeclaration - case "app": self = .app - case "appClipDefaultExperience": self = .appClipDefaultExperience - case "appStoreReviewDetail": self = .appStoreReviewDetail - case "appStoreState": self = .appStoreState - case "appStoreVersionExperiments": self = .appStoreVersionExperiments - case "appStoreVersionExperimentsV2": self = .appStoreVersionExperimentsV2 - case "appStoreVersionLocalizations": self = .appStoreVersionLocalizations - case "appStoreVersionPhasedRelease": self = .appStoreVersionPhasedRelease - case "appStoreVersionSubmission": self = .appStoreVersionSubmission - case "build": self = .build - case "copyright": self = .copyright - case "createdDate": self = .createdDate - case "customerReviews": self = .customerReviews - case "downloadable": self = .downloadable - case "earliestReleaseDate": self = .earliestReleaseDate - case "platform": self = .platform - case "releaseType": self = .releaseType - case "routingAppCoverage": self = .routingAppCoverage - case "versionString": self = .versionString - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum GameCenterAppVersions: Hashable, Codable, RawRepresentable { - case appStoreVersion - case compatibilityVersions - case enabled - case unknown(String) + public struct GameCenterAppVersions: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var appStoreVersion: Self { + .init(rawValue: "appStoreVersion") + } + + public static var compatibilityVersions: Self { + .init(rawValue: "compatibilityVersions") + } + + public static var enabled: Self { + .init(rawValue: "enabled") + } - public var rawValue: String { - switch self { - case .appStoreVersion: return "appStoreVersion" - case .compatibilityVersions: return "compatibilityVersions" - case .enabled: return "enabled" - case .unknown(let rawValue): return rawValue - } + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "appStoreVersion": self = .appStoreVersion - case "compatibilityVersions": self = .compatibilityVersions - case "enabled": self = .enabled - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } @@ -242,25 +285,23 @@ extension V1.GameCenterDetails.ById.GameCenterAppVersions.GET { } } - public enum Include: Hashable, Codable, RawRepresentable { - case appStoreVersion - case compatibilityVersions - case unknown(String) + public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var appStoreVersion: Self { + .init(rawValue: "appStoreVersion") + } - public var rawValue: String { - switch self { - case .appStoreVersion: return "appStoreVersion" - case .compatibilityVersions: return "compatibilityVersions" - case .unknown(let rawValue): return rawValue - } + public static var compatibilityVersions: Self { + .init(rawValue: "compatibilityVersions") } + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "appStoreVersion": self = .appStoreVersion - case "compatibilityVersions": self = .compatibilityVersions - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterDetails/ById/GameCenterChallenges/GameCenterDetailsByIdGameCenterChallenges.GET.26b4d91.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterDetails/ById/GameCenterChallenges/GameCenterDetailsByIdGameCenterChallenges.GET.26b4d91.generated.swift new file mode 100644 index 00000000..60c448f8 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterDetails/ById/GameCenterChallenges/GameCenterDetailsByIdGameCenterChallenges.GET.26b4d91.generated.swift @@ -0,0 +1,552 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.GameCenterDetails.ById.GameCenterChallenges { + public struct GET: Endpoint { + public typealias Response = GameCenterChallengesResponse + + public var path: String { + "/v1/gameCenterDetails/\(id)/gameCenterChallenges" + } + + /// the id of the requested resource + public var id: String + + public var parameters: Parameters = Parameters() + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + components?.queryItems = [ + URLQueryItem(name: "fields[gameCenterChallengeVersions]", + value: parameters.fields[.gameCenterChallengeVersions]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "fields[gameCenterChallenges]", + value: parameters.fields[.gameCenterChallenges]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "fields[gameCenterDetails]", + value: parameters.fields[.gameCenterDetails]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "fields[gameCenterGroups]", + value: parameters.fields[.gameCenterGroups]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "fields[gameCenterLeaderboards]", + value: parameters.fields[.gameCenterLeaderboards]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "filter[archived]", + value: parameters.filter[.archived]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "filter[id]", + value: parameters.filter[.id]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "filter[referenceName]", + value: parameters.filter[.referenceName]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "include", + value: parameters.include?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "limit[versions]", + value: parameters.limit[.versions].map { "\($0)" }), + URLQueryItem(name: "limit", + value: parameters.limit[].map { "\($0)" }) + ].filter { $0.value != nil } + if components?.queryItems?.isEmpty ?? false { + components?.queryItems = nil + } + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "GET" + return urlRequest + } + + /// - Returns: **200**, List of GameCenterChallenges as `GameCenterChallengesResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(GameCenterChallengesResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +extension V1.GameCenterDetails.ById.GameCenterChallenges.GET { + public struct Parameters: Hashable { + public var fields: Fields = Fields() + + public var filter: Filter = Filter() + + /// comma-separated list of relationships to include + public var include: [Include]? + + /// maximum resources per page + public var limit: Limit = Limit() + + public struct Fields: Hashable { + public subscript (_ relation: Relation) -> T { + get { values[relation]?.base as! T } + set { values[relation] = AnyHashable(newValue) } + } + + private var values: [AnyHashable: AnyHashable] = [:] + + public struct GameCenterChallengeVersions: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var challenge: Self { + .init(rawValue: "challenge") + } + + public static var defaultImage: Self { + .init(rawValue: "defaultImage") + } + + public static var localizations: Self { + .init(rawValue: "localizations") + } + + public static var releases: Self { + .init(rawValue: "releases") + } + + public static var state: Self { + .init(rawValue: "state") + } + + public static var version: Self { + .init(rawValue: "version") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct GameCenterChallenges: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var allowedDurations: Self { + .init(rawValue: "allowedDurations") + } + + public static var archived: Self { + .init(rawValue: "archived") + } + + public static var challengeType: Self { + .init(rawValue: "challengeType") + } + + public static var gameCenterDetail: Self { + .init(rawValue: "gameCenterDetail") + } + + public static var gameCenterGroup: Self { + .init(rawValue: "gameCenterGroup") + } + + public static var leaderboard: Self { + .init(rawValue: "leaderboard") + } + + public static var referenceName: Self { + .init(rawValue: "referenceName") + } + + public static var repeatable: Self { + .init(rawValue: "repeatable") + } + + public static var vendorIdentifier: Self { + .init(rawValue: "vendorIdentifier") + } + + public static var versions: Self { + .init(rawValue: "versions") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct GameCenterDetails: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var achievementReleases: Self { + .init(rawValue: "achievementReleases") + } + + public static var activityReleases: Self { + .init(rawValue: "activityReleases") + } + + public static var app: Self { + .init(rawValue: "app") + } + + public static var arcadeEnabled: Self { + .init(rawValue: "arcadeEnabled") + } + + public static var challengeEnabled: Self { + .init(rawValue: "challengeEnabled") + } + + public static var challengeReleases: Self { + .init(rawValue: "challengeReleases") + } + + public static var challengesMinimumPlatformVersions: Self { + .init(rawValue: "challengesMinimumPlatformVersions") + } + + public static var defaultGroupLeaderboard: Self { + .init(rawValue: "defaultGroupLeaderboard") + } + + public static var defaultLeaderboard: Self { + .init(rawValue: "defaultLeaderboard") + } + + public static var gameCenterAchievements: Self { + .init(rawValue: "gameCenterAchievements") + } + + public static var gameCenterActivities: Self { + .init(rawValue: "gameCenterActivities") + } + + public static var gameCenterAppVersions: Self { + .init(rawValue: "gameCenterAppVersions") + } + + public static var gameCenterChallenges: Self { + .init(rawValue: "gameCenterChallenges") + } + + public static var gameCenterGroup: Self { + .init(rawValue: "gameCenterGroup") + } + + public static var gameCenterLeaderboardSets: Self { + .init(rawValue: "gameCenterLeaderboardSets") + } + + public static var gameCenterLeaderboards: Self { + .init(rawValue: "gameCenterLeaderboards") + } + + public static var leaderboardReleases: Self { + .init(rawValue: "leaderboardReleases") + } + + public static var leaderboardSetReleases: Self { + .init(rawValue: "leaderboardSetReleases") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct GameCenterGroups: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var gameCenterAchievements: Self { + .init(rawValue: "gameCenterAchievements") + } + + public static var gameCenterActivities: Self { + .init(rawValue: "gameCenterActivities") + } + + public static var gameCenterChallenges: Self { + .init(rawValue: "gameCenterChallenges") + } + + public static var gameCenterDetails: Self { + .init(rawValue: "gameCenterDetails") + } + + public static var gameCenterLeaderboardSets: Self { + .init(rawValue: "gameCenterLeaderboardSets") + } + + public static var gameCenterLeaderboards: Self { + .init(rawValue: "gameCenterLeaderboards") + } + + public static var referenceName: Self { + .init(rawValue: "referenceName") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct GameCenterLeaderboards: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var activity: Self { + .init(rawValue: "activity") + } + + public static var activityProperties: Self { + .init(rawValue: "activityProperties") + } + + public static var archived: Self { + .init(rawValue: "archived") + } + + public static var challenge: Self { + .init(rawValue: "challenge") + } + + public static var defaultFormatter: Self { + .init(rawValue: "defaultFormatter") + } + + public static var gameCenterDetail: Self { + .init(rawValue: "gameCenterDetail") + } + + public static var gameCenterGroup: Self { + .init(rawValue: "gameCenterGroup") + } + + public static var gameCenterLeaderboardSets: Self { + .init(rawValue: "gameCenterLeaderboardSets") + } + + public static var groupLeaderboard: Self { + .init(rawValue: "groupLeaderboard") + } + + public static var localizations: Self { + .init(rawValue: "localizations") + } + + public static var recurrenceDuration: Self { + .init(rawValue: "recurrenceDuration") + } + + public static var recurrenceRule: Self { + .init(rawValue: "recurrenceRule") + } + + public static var recurrenceStartDate: Self { + .init(rawValue: "recurrenceStartDate") + } + + public static var referenceName: Self { + .init(rawValue: "referenceName") + } + + public static var releases: Self { + .init(rawValue: "releases") + } + + public static var scoreRangeEnd: Self { + .init(rawValue: "scoreRangeEnd") + } + + public static var scoreRangeStart: Self { + .init(rawValue: "scoreRangeStart") + } + + public static var scoreSortType: Self { + .init(rawValue: "scoreSortType") + } + + public static var submissionType: Self { + .init(rawValue: "submissionType") + } + + public static var vendorIdentifier: Self { + .init(rawValue: "vendorIdentifier") + } + + public static var visibility: Self { + .init(rawValue: "visibility") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct Relation: Hashable { + /// the fields to include for returned resources of type gameCenterChallengeVersions + public static var gameCenterChallengeVersions: Relation<[GameCenterChallengeVersions]?> { + .init(key: "fields[gameCenterChallengeVersions]") + } + + /// the fields to include for returned resources of type gameCenterChallenges + public static var gameCenterChallenges: Relation<[GameCenterChallenges]?> { + .init(key: "fields[gameCenterChallenges]") + } + + /// the fields to include for returned resources of type gameCenterDetails + public static var gameCenterDetails: Relation<[GameCenterDetails]?> { + .init(key: "fields[gameCenterDetails]") + } + + /// the fields to include for returned resources of type gameCenterGroups + public static var gameCenterGroups: Relation<[GameCenterGroups]?> { + .init(key: "fields[gameCenterGroups]") + } + + /// the fields to include for returned resources of type gameCenterLeaderboards + public static var gameCenterLeaderboards: Relation<[GameCenterLeaderboards]?> { + .init(key: "fields[gameCenterLeaderboards]") + } + + internal let key: String + + public func hash(into hasher: inout Hasher) { + hasher.combine(key) + } + } + } + + public struct Filter: Hashable { + public subscript (_ relation: Relation) -> T { + get { values[relation]?.base as! T } + set { values[relation] = AnyHashable(newValue) } + } + + private var values: [AnyHashable: AnyHashable] = [:] + + public struct Relation: Hashable { + /// filter by attribute 'archived' + public static var archived: Relation<[String]?> { + .init(key: "filter[archived]") + } + + /// filter by id(s) + public static var id: Relation<[String]?> { + .init(key: "filter[id]") + } + + /// filter by attribute 'referenceName' + public static var referenceName: Relation<[String]?> { + .init(key: "filter[referenceName]") + } + + internal let key: String + + public func hash(into hasher: inout Hasher) { + hasher.combine(key) + } + } + } + + public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var gameCenterDetail: Self { + .init(rawValue: "gameCenterDetail") + } + + public static var gameCenterGroup: Self { + .init(rawValue: "gameCenterGroup") + } + + public static var leaderboard: Self { + .init(rawValue: "leaderboard") + } + + public static var versions: Self { + .init(rawValue: "versions") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct Limit: Hashable { + public subscript () -> Int? { + get { self[Relation(key: "limit")] } + set { self[Relation(key: "limit")] = newValue } + } + + public subscript (_ relation: Relation) -> T { + get { values[relation]?.base as! T } + set { values[relation] = AnyHashable(newValue) } + } + + private var values: [AnyHashable: AnyHashable] = [:] + + public struct Relation: Hashable { + /// maximum number of related versions returned (when they are included) + public static var versions: Relation { + .init(key: "limit[versions]") + } + + internal let key: String + + public func hash(into hasher: inout Hasher) { + hasher.combine(key) + } + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterDetails/ById/GameCenterDetailsById.GET.2adb42c.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterDetails/ById/GameCenterDetailsById.GET.2adb42c.generated.swift index f5d33e48..6f1b3e93 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterDetails/ById/GameCenterDetailsById.GET.2adb42c.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterDetails/ById/GameCenterDetailsById.GET.2adb42c.generated.swift @@ -32,8 +32,16 @@ extension V1.GameCenterDetails.ById { value: parameters.fields[.gameCenterAchievementReleases]?.map { "\($0)" }.joined(separator: ",")), URLQueryItem(name: "fields[gameCenterAchievements]", value: parameters.fields[.gameCenterAchievements]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "fields[gameCenterActivities]", + value: parameters.fields[.gameCenterActivities]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "fields[gameCenterActivityVersionReleases]", + value: parameters.fields[.gameCenterActivityVersionReleases]?.map { "\($0)" }.joined(separator: ",")), URLQueryItem(name: "fields[gameCenterAppVersions]", value: parameters.fields[.gameCenterAppVersions]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "fields[gameCenterChallengeVersionReleases]", + value: parameters.fields[.gameCenterChallengeVersionReleases]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "fields[gameCenterChallenges]", + value: parameters.fields[.gameCenterChallenges]?.map { "\($0)" }.joined(separator: ",")), URLQueryItem(name: "fields[gameCenterDetails]", value: parameters.fields[.gameCenterDetails]?.map { "\($0)" }.joined(separator: ",")), URLQueryItem(name: "fields[gameCenterGroups]", @@ -50,10 +58,20 @@ extension V1.GameCenterDetails.ById { value: parameters.include?.map { "\($0)" }.joined(separator: ",")), URLQueryItem(name: "limit[achievementReleases]", value: parameters.limit[.achievementReleases].map { "\($0)" }), + URLQueryItem(name: "limit[activityReleases]", + value: parameters.limit[.activityReleases].map { "\($0)" }), + URLQueryItem(name: "limit[challengeReleases]", + value: parameters.limit[.challengeReleases].map { "\($0)" }), + URLQueryItem(name: "limit[challengesMinimumPlatformVersions]", + value: parameters.limit[.challengesMinimumPlatformVersions].map { "\($0)" }), URLQueryItem(name: "limit[gameCenterAchievements]", value: parameters.limit[.gameCenterAchievements].map { "\($0)" }), + URLQueryItem(name: "limit[gameCenterActivities]", + value: parameters.limit[.gameCenterActivities].map { "\($0)" }), URLQueryItem(name: "limit[gameCenterAppVersions]", value: parameters.limit[.gameCenterAppVersions].map { "\($0)" }), + URLQueryItem(name: "limit[gameCenterChallenges]", + value: parameters.limit[.gameCenterChallenges].map { "\($0)" }), URLQueryItem(name: "limit[gameCenterLeaderboardSets]", value: parameters.limit[.gameCenterLeaderboardSets].map { "\($0)" }), URLQueryItem(name: "limit[gameCenterLeaderboards]", @@ -74,8 +92,10 @@ extension V1.GameCenterDetails.ById { /// - Returns: **200**, Single GameCenterDetail as `GameCenterDetailResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -89,12 +109,18 @@ extension V1.GameCenterDetails.ById { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 404: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -119,345 +145,575 @@ extension V1.GameCenterDetails.ById.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum GameCenterAchievementReleases: Hashable, Codable, RawRepresentable { - case gameCenterAchievement - case gameCenterDetail - case live - case unknown(String) + public struct GameCenterAchievementReleases: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var gameCenterAchievement: Self { + .init(rawValue: "gameCenterAchievement") + } + + public static var gameCenterDetail: Self { + .init(rawValue: "gameCenterDetail") + } - public var rawValue: String { - switch self { - case .gameCenterAchievement: return "gameCenterAchievement" - case .gameCenterDetail: return "gameCenterDetail" - case .live: return "live" - case .unknown(let rawValue): return rawValue - } + public static var live: Self { + .init(rawValue: "live") } + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "gameCenterAchievement": self = .gameCenterAchievement - case "gameCenterDetail": self = .gameCenterDetail - case "live": self = .live - default: self = .unknown(rawValue) - } - } - } - - public enum GameCenterAchievements: Hashable, Codable, RawRepresentable { - case archived - case gameCenterDetail - case gameCenterGroup - case groupAchievement - case localizations - case points - case referenceName - case releases - case repeatable - case showBeforeEarned - case vendorIdentifier - case unknown(String) - - public var rawValue: String { - switch self { - case .archived: return "archived" - case .gameCenterDetail: return "gameCenterDetail" - case .gameCenterGroup: return "gameCenterGroup" - case .groupAchievement: return "groupAchievement" - case .localizations: return "localizations" - case .points: return "points" - case .referenceName: return "referenceName" - case .releases: return "releases" - case .repeatable: return "repeatable" - case .showBeforeEarned: return "showBeforeEarned" - case .vendorIdentifier: return "vendorIdentifier" - case .unknown(let rawValue): return rawValue - } + self.rawValue = rawValue + } + } + + public struct GameCenterAchievements: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var activity: Self { + .init(rawValue: "activity") + } + + public static var activityProperties: Self { + .init(rawValue: "activityProperties") + } + + public static var archived: Self { + .init(rawValue: "archived") + } + + public static var gameCenterDetail: Self { + .init(rawValue: "gameCenterDetail") + } + + public static var gameCenterGroup: Self { + .init(rawValue: "gameCenterGroup") + } + + public static var groupAchievement: Self { + .init(rawValue: "groupAchievement") + } + + public static var localizations: Self { + .init(rawValue: "localizations") + } + + public static var points: Self { + .init(rawValue: "points") + } + + public static var referenceName: Self { + .init(rawValue: "referenceName") + } + + public static var releases: Self { + .init(rawValue: "releases") + } + + public static var repeatable: Self { + .init(rawValue: "repeatable") + } + + public static var showBeforeEarned: Self { + .init(rawValue: "showBeforeEarned") } + public static var vendorIdentifier: Self { + .init(rawValue: "vendorIdentifier") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "archived": self = .archived - case "gameCenterDetail": self = .gameCenterDetail - case "gameCenterGroup": self = .gameCenterGroup - case "groupAchievement": self = .groupAchievement - case "localizations": self = .localizations - case "points": self = .points - case "referenceName": self = .referenceName - case "releases": self = .releases - case "repeatable": self = .repeatable - case "showBeforeEarned": self = .showBeforeEarned - case "vendorIdentifier": self = .vendorIdentifier - default: self = .unknown(rawValue) - } - } - } - - public enum GameCenterAppVersions: Hashable, Codable, RawRepresentable { - case appStoreVersion - case compatibilityVersions - case enabled - case unknown(String) - - public var rawValue: String { - switch self { - case .appStoreVersion: return "appStoreVersion" - case .compatibilityVersions: return "compatibilityVersions" - case .enabled: return "enabled" - case .unknown(let rawValue): return rawValue - } + self.rawValue = rawValue } + } + + public struct GameCenterActivities: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var achievements: Self { + .init(rawValue: "achievements") + } + + public static var archived: Self { + .init(rawValue: "archived") + } + + public static var gameCenterDetail: Self { + .init(rawValue: "gameCenterDetail") + } + + public static var gameCenterGroup: Self { + .init(rawValue: "gameCenterGroup") + } + + public static var leaderboards: Self { + .init(rawValue: "leaderboards") + } + + public static var maximumPlayersCount: Self { + .init(rawValue: "maximumPlayersCount") + } + + public static var minimumPlayersCount: Self { + .init(rawValue: "minimumPlayersCount") + } + + public static var playStyle: Self { + .init(rawValue: "playStyle") + } + + public static var properties: Self { + .init(rawValue: "properties") + } + + public static var referenceName: Self { + .init(rawValue: "referenceName") + } + + public static var supportsPartyCode: Self { + .init(rawValue: "supportsPartyCode") + } + + public static var vendorIdentifier: Self { + .init(rawValue: "vendorIdentifier") + } + + public static var versions: Self { + .init(rawValue: "versions") + } + + public var description: String { + rawValue + } + + public var rawValue: String public init(rawValue: String) { - switch rawValue { - case "appStoreVersion": self = .appStoreVersion - case "compatibilityVersions": self = .compatibilityVersions - case "enabled": self = .enabled - default: self = .unknown(rawValue) - } - } - } - - public enum GameCenterDetails: Hashable, Codable, RawRepresentable { - case achievementReleases - case app - case arcadeEnabled - case challengeEnabled - case defaultGroupLeaderboard - case defaultLeaderboard - case gameCenterAchievements - case gameCenterAppVersions - case gameCenterGroup - case gameCenterLeaderboardSets - case gameCenterLeaderboards - case leaderboardReleases - case leaderboardSetReleases - case unknown(String) - - public var rawValue: String { - switch self { - case .achievementReleases: return "achievementReleases" - case .app: return "app" - case .arcadeEnabled: return "arcadeEnabled" - case .challengeEnabled: return "challengeEnabled" - case .defaultGroupLeaderboard: return "defaultGroupLeaderboard" - case .defaultLeaderboard: return "defaultLeaderboard" - case .gameCenterAchievements: return "gameCenterAchievements" - case .gameCenterAppVersions: return "gameCenterAppVersions" - case .gameCenterGroup: return "gameCenterGroup" - case .gameCenterLeaderboardSets: return "gameCenterLeaderboardSets" - case .gameCenterLeaderboards: return "gameCenterLeaderboards" - case .leaderboardReleases: return "leaderboardReleases" - case .leaderboardSetReleases: return "leaderboardSetReleases" - case .unknown(let rawValue): return rawValue - } + self.rawValue = rawValue + } + } + + public struct GameCenterActivityVersionReleases: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var version: Self { + .init(rawValue: "version") + } + + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "achievementReleases": self = .achievementReleases - case "app": self = .app - case "arcadeEnabled": self = .arcadeEnabled - case "challengeEnabled": self = .challengeEnabled - case "defaultGroupLeaderboard": self = .defaultGroupLeaderboard - case "defaultLeaderboard": self = .defaultLeaderboard - case "gameCenterAchievements": self = .gameCenterAchievements - case "gameCenterAppVersions": self = .gameCenterAppVersions - case "gameCenterGroup": self = .gameCenterGroup - case "gameCenterLeaderboardSets": self = .gameCenterLeaderboardSets - case "gameCenterLeaderboards": self = .gameCenterLeaderboards - case "leaderboardReleases": self = .leaderboardReleases - case "leaderboardSetReleases": self = .leaderboardSetReleases - default: self = .unknown(rawValue) - } - } - } - - public enum GameCenterGroups: Hashable, Codable, RawRepresentable { - case gameCenterAchievements - case gameCenterDetails - case gameCenterLeaderboardSets - case gameCenterLeaderboards - case referenceName - case unknown(String) - - public var rawValue: String { - switch self { - case .gameCenterAchievements: return "gameCenterAchievements" - case .gameCenterDetails: return "gameCenterDetails" - case .gameCenterLeaderboardSets: return "gameCenterLeaderboardSets" - case .gameCenterLeaderboards: return "gameCenterLeaderboards" - case .referenceName: return "referenceName" - case .unknown(let rawValue): return rawValue - } + self.rawValue = rawValue } + } + + public struct GameCenterAppVersions: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var appStoreVersion: Self { + .init(rawValue: "appStoreVersion") + } + + public static var compatibilityVersions: Self { + .init(rawValue: "compatibilityVersions") + } + + public static var enabled: Self { + .init(rawValue: "enabled") + } + + public var description: String { + rawValue + } + + public var rawValue: String public init(rawValue: String) { - switch rawValue { - case "gameCenterAchievements": self = .gameCenterAchievements - case "gameCenterDetails": self = .gameCenterDetails - case "gameCenterLeaderboardSets": self = .gameCenterLeaderboardSets - case "gameCenterLeaderboards": self = .gameCenterLeaderboards - case "referenceName": self = .referenceName - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum GameCenterLeaderboardReleases: Hashable, Codable, RawRepresentable { - case gameCenterDetail - case gameCenterLeaderboard - case live - case unknown(String) + public struct GameCenterChallengeVersionReleases: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var version: Self { + .init(rawValue: "version") + } - public var rawValue: String { - switch self { - case .gameCenterDetail: return "gameCenterDetail" - case .gameCenterLeaderboard: return "gameCenterLeaderboard" - case .live: return "live" - case .unknown(let rawValue): return rawValue - } + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "gameCenterDetail": self = .gameCenterDetail - case "gameCenterLeaderboard": self = .gameCenterLeaderboard - case "live": self = .live - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum GameCenterLeaderboardSetReleases: Hashable, Codable, RawRepresentable { - case gameCenterDetail - case gameCenterLeaderboardSet - case live - case unknown(String) + public struct GameCenterChallenges: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var allowedDurations: Self { + .init(rawValue: "allowedDurations") + } + + public static var archived: Self { + .init(rawValue: "archived") + } + + public static var challengeType: Self { + .init(rawValue: "challengeType") + } + + public static var gameCenterDetail: Self { + .init(rawValue: "gameCenterDetail") + } + + public static var gameCenterGroup: Self { + .init(rawValue: "gameCenterGroup") + } + + public static var leaderboard: Self { + .init(rawValue: "leaderboard") + } + + public static var referenceName: Self { + .init(rawValue: "referenceName") + } + + public static var repeatable: Self { + .init(rawValue: "repeatable") + } + + public static var vendorIdentifier: Self { + .init(rawValue: "vendorIdentifier") + } - public var rawValue: String { - switch self { - case .gameCenterDetail: return "gameCenterDetail" - case .gameCenterLeaderboardSet: return "gameCenterLeaderboardSet" - case .live: return "live" - case .unknown(let rawValue): return rawValue - } + public static var versions: Self { + .init(rawValue: "versions") } + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "gameCenterDetail": self = .gameCenterDetail - case "gameCenterLeaderboardSet": self = .gameCenterLeaderboardSet - case "live": self = .live - default: self = .unknown(rawValue) - } - } - } - - public enum GameCenterLeaderboardSets: Hashable, Codable, RawRepresentable { - case gameCenterDetail - case gameCenterGroup - case gameCenterLeaderboards - case groupLeaderboardSet - case localizations - case referenceName - case releases - case vendorIdentifier - case unknown(String) - - public var rawValue: String { - switch self { - case .gameCenterDetail: return "gameCenterDetail" - case .gameCenterGroup: return "gameCenterGroup" - case .gameCenterLeaderboards: return "gameCenterLeaderboards" - case .groupLeaderboardSet: return "groupLeaderboardSet" - case .localizations: return "localizations" - case .referenceName: return "referenceName" - case .releases: return "releases" - case .vendorIdentifier: return "vendorIdentifier" - case .unknown(let rawValue): return rawValue - } + self.rawValue = rawValue + } + } + + public struct GameCenterDetails: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var achievementReleases: Self { + .init(rawValue: "achievementReleases") + } + + public static var activityReleases: Self { + .init(rawValue: "activityReleases") + } + + public static var app: Self { + .init(rawValue: "app") } + public static var arcadeEnabled: Self { + .init(rawValue: "arcadeEnabled") + } + + public static var challengeEnabled: Self { + .init(rawValue: "challengeEnabled") + } + + public static var challengeReleases: Self { + .init(rawValue: "challengeReleases") + } + + public static var challengesMinimumPlatformVersions: Self { + .init(rawValue: "challengesMinimumPlatformVersions") + } + + public static var defaultGroupLeaderboard: Self { + .init(rawValue: "defaultGroupLeaderboard") + } + + public static var defaultLeaderboard: Self { + .init(rawValue: "defaultLeaderboard") + } + + public static var gameCenterAchievements: Self { + .init(rawValue: "gameCenterAchievements") + } + + public static var gameCenterActivities: Self { + .init(rawValue: "gameCenterActivities") + } + + public static var gameCenterAppVersions: Self { + .init(rawValue: "gameCenterAppVersions") + } + + public static var gameCenterChallenges: Self { + .init(rawValue: "gameCenterChallenges") + } + + public static var gameCenterGroup: Self { + .init(rawValue: "gameCenterGroup") + } + + public static var gameCenterLeaderboardSets: Self { + .init(rawValue: "gameCenterLeaderboardSets") + } + + public static var gameCenterLeaderboards: Self { + .init(rawValue: "gameCenterLeaderboards") + } + + public static var leaderboardReleases: Self { + .init(rawValue: "leaderboardReleases") + } + + public static var leaderboardSetReleases: Self { + .init(rawValue: "leaderboardSetReleases") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "gameCenterDetail": self = .gameCenterDetail - case "gameCenterGroup": self = .gameCenterGroup - case "gameCenterLeaderboards": self = .gameCenterLeaderboards - case "groupLeaderboardSet": self = .groupLeaderboardSet - case "localizations": self = .localizations - case "referenceName": self = .referenceName - case "releases": self = .releases - case "vendorIdentifier": self = .vendorIdentifier - default: self = .unknown(rawValue) - } - } - } - - public enum GameCenterLeaderboards: Hashable, Codable, RawRepresentable { - case archived - case defaultFormatter - case gameCenterDetail - case gameCenterGroup - case gameCenterLeaderboardSets - case groupLeaderboard - case localizations - case recurrenceDuration - case recurrenceRule - case recurrenceStartDate - case referenceName - case releases - case scoreRangeEnd - case scoreRangeStart - case scoreSortType - case submissionType - case vendorIdentifier - case unknown(String) - - public var rawValue: String { - switch self { - case .archived: return "archived" - case .defaultFormatter: return "defaultFormatter" - case .gameCenterDetail: return "gameCenterDetail" - case .gameCenterGroup: return "gameCenterGroup" - case .gameCenterLeaderboardSets: return "gameCenterLeaderboardSets" - case .groupLeaderboard: return "groupLeaderboard" - case .localizations: return "localizations" - case .recurrenceDuration: return "recurrenceDuration" - case .recurrenceRule: return "recurrenceRule" - case .recurrenceStartDate: return "recurrenceStartDate" - case .referenceName: return "referenceName" - case .releases: return "releases" - case .scoreRangeEnd: return "scoreRangeEnd" - case .scoreRangeStart: return "scoreRangeStart" - case .scoreSortType: return "scoreSortType" - case .submissionType: return "submissionType" - case .vendorIdentifier: return "vendorIdentifier" - case .unknown(let rawValue): return rawValue - } + self.rawValue = rawValue + } + } + + public struct GameCenterGroups: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var gameCenterAchievements: Self { + .init(rawValue: "gameCenterAchievements") + } + + public static var gameCenterActivities: Self { + .init(rawValue: "gameCenterActivities") + } + + public static var gameCenterChallenges: Self { + .init(rawValue: "gameCenterChallenges") + } + + public static var gameCenterDetails: Self { + .init(rawValue: "gameCenterDetails") + } + + public static var gameCenterLeaderboardSets: Self { + .init(rawValue: "gameCenterLeaderboardSets") } + public static var gameCenterLeaderboards: Self { + .init(rawValue: "gameCenterLeaderboards") + } + + public static var referenceName: Self { + .init(rawValue: "referenceName") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct GameCenterLeaderboardReleases: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var gameCenterDetail: Self { + .init(rawValue: "gameCenterDetail") + } + + public static var gameCenterLeaderboard: Self { + .init(rawValue: "gameCenterLeaderboard") + } + + public static var live: Self { + .init(rawValue: "live") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct GameCenterLeaderboardSetReleases: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var gameCenterDetail: Self { + .init(rawValue: "gameCenterDetail") + } + + public static var gameCenterLeaderboardSet: Self { + .init(rawValue: "gameCenterLeaderboardSet") + } + + public static var live: Self { + .init(rawValue: "live") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct GameCenterLeaderboardSets: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var gameCenterDetail: Self { + .init(rawValue: "gameCenterDetail") + } + + public static var gameCenterGroup: Self { + .init(rawValue: "gameCenterGroup") + } + + public static var gameCenterLeaderboards: Self { + .init(rawValue: "gameCenterLeaderboards") + } + + public static var groupLeaderboardSet: Self { + .init(rawValue: "groupLeaderboardSet") + } + + public static var localizations: Self { + .init(rawValue: "localizations") + } + + public static var referenceName: Self { + .init(rawValue: "referenceName") + } + + public static var releases: Self { + .init(rawValue: "releases") + } + + public static var vendorIdentifier: Self { + .init(rawValue: "vendorIdentifier") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct GameCenterLeaderboards: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var activity: Self { + .init(rawValue: "activity") + } + + public static var activityProperties: Self { + .init(rawValue: "activityProperties") + } + + public static var archived: Self { + .init(rawValue: "archived") + } + + public static var challenge: Self { + .init(rawValue: "challenge") + } + + public static var defaultFormatter: Self { + .init(rawValue: "defaultFormatter") + } + + public static var gameCenterDetail: Self { + .init(rawValue: "gameCenterDetail") + } + + public static var gameCenterGroup: Self { + .init(rawValue: "gameCenterGroup") + } + + public static var gameCenterLeaderboardSets: Self { + .init(rawValue: "gameCenterLeaderboardSets") + } + + public static var groupLeaderboard: Self { + .init(rawValue: "groupLeaderboard") + } + + public static var localizations: Self { + .init(rawValue: "localizations") + } + + public static var recurrenceDuration: Self { + .init(rawValue: "recurrenceDuration") + } + + public static var recurrenceRule: Self { + .init(rawValue: "recurrenceRule") + } + + public static var recurrenceStartDate: Self { + .init(rawValue: "recurrenceStartDate") + } + + public static var referenceName: Self { + .init(rawValue: "referenceName") + } + + public static var releases: Self { + .init(rawValue: "releases") + } + + public static var scoreRangeEnd: Self { + .init(rawValue: "scoreRangeEnd") + } + + public static var scoreRangeStart: Self { + .init(rawValue: "scoreRangeStart") + } + + public static var scoreSortType: Self { + .init(rawValue: "scoreSortType") + } + + public static var submissionType: Self { + .init(rawValue: "submissionType") + } + + public static var vendorIdentifier: Self { + .init(rawValue: "vendorIdentifier") + } + + public static var visibility: Self { + .init(rawValue: "visibility") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "archived": self = .archived - case "defaultFormatter": self = .defaultFormatter - case "gameCenterDetail": self = .gameCenterDetail - case "gameCenterGroup": self = .gameCenterGroup - case "gameCenterLeaderboardSets": self = .gameCenterLeaderboardSets - case "groupLeaderboard": self = .groupLeaderboard - case "localizations": self = .localizations - case "recurrenceDuration": self = .recurrenceDuration - case "recurrenceRule": self = .recurrenceRule - case "recurrenceStartDate": self = .recurrenceStartDate - case "referenceName": self = .referenceName - case "releases": self = .releases - case "scoreRangeEnd": self = .scoreRangeEnd - case "scoreRangeStart": self = .scoreRangeStart - case "scoreSortType": self = .scoreSortType - case "submissionType": self = .submissionType - case "vendorIdentifier": self = .vendorIdentifier - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } @@ -472,11 +728,31 @@ extension V1.GameCenterDetails.ById.GET { .init(key: "fields[gameCenterAchievements]") } + /// the fields to include for returned resources of type gameCenterActivities + public static var gameCenterActivities: Relation<[GameCenterActivities]?> { + .init(key: "fields[gameCenterActivities]") + } + + /// the fields to include for returned resources of type gameCenterActivityVersionReleases + public static var gameCenterActivityVersionReleases: Relation<[GameCenterActivityVersionReleases]?> { + .init(key: "fields[gameCenterActivityVersionReleases]") + } + /// the fields to include for returned resources of type gameCenterAppVersions public static var gameCenterAppVersions: Relation<[GameCenterAppVersions]?> { .init(key: "fields[gameCenterAppVersions]") } + /// the fields to include for returned resources of type gameCenterChallengeVersionReleases + public static var gameCenterChallengeVersionReleases: Relation<[GameCenterChallengeVersionReleases]?> { + .init(key: "fields[gameCenterChallengeVersionReleases]") + } + + /// the fields to include for returned resources of type gameCenterChallenges + public static var gameCenterChallenges: Relation<[GameCenterChallenges]?> { + .init(key: "fields[gameCenterChallenges]") + } + /// the fields to include for returned resources of type gameCenterDetails public static var gameCenterDetails: Relation<[GameCenterDetails]?> { .init(key: "fields[gameCenterDetails]") @@ -515,52 +791,79 @@ extension V1.GameCenterDetails.ById.GET { } } - public enum Include: Hashable, Codable, RawRepresentable { - case achievementReleases - case app - case defaultGroupLeaderboard - case defaultLeaderboard - case gameCenterAchievements - case gameCenterAppVersions - case gameCenterGroup - case gameCenterLeaderboardSets - case gameCenterLeaderboards - case leaderboardReleases - case leaderboardSetReleases - case unknown(String) - - public var rawValue: String { - switch self { - case .achievementReleases: return "achievementReleases" - case .app: return "app" - case .defaultGroupLeaderboard: return "defaultGroupLeaderboard" - case .defaultLeaderboard: return "defaultLeaderboard" - case .gameCenterAchievements: return "gameCenterAchievements" - case .gameCenterAppVersions: return "gameCenterAppVersions" - case .gameCenterGroup: return "gameCenterGroup" - case .gameCenterLeaderboardSets: return "gameCenterLeaderboardSets" - case .gameCenterLeaderboards: return "gameCenterLeaderboards" - case .leaderboardReleases: return "leaderboardReleases" - case .leaderboardSetReleases: return "leaderboardSetReleases" - case .unknown(let rawValue): return rawValue - } + public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var achievementReleases: Self { + .init(rawValue: "achievementReleases") } + public static var activityReleases: Self { + .init(rawValue: "activityReleases") + } + + public static var app: Self { + .init(rawValue: "app") + } + + public static var challengeReleases: Self { + .init(rawValue: "challengeReleases") + } + + public static var challengesMinimumPlatformVersions: Self { + .init(rawValue: "challengesMinimumPlatformVersions") + } + + public static var defaultGroupLeaderboard: Self { + .init(rawValue: "defaultGroupLeaderboard") + } + + public static var defaultLeaderboard: Self { + .init(rawValue: "defaultLeaderboard") + } + + public static var gameCenterAchievements: Self { + .init(rawValue: "gameCenterAchievements") + } + + public static var gameCenterActivities: Self { + .init(rawValue: "gameCenterActivities") + } + + public static var gameCenterAppVersions: Self { + .init(rawValue: "gameCenterAppVersions") + } + + public static var gameCenterChallenges: Self { + .init(rawValue: "gameCenterChallenges") + } + + public static var gameCenterGroup: Self { + .init(rawValue: "gameCenterGroup") + } + + public static var gameCenterLeaderboardSets: Self { + .init(rawValue: "gameCenterLeaderboardSets") + } + + public static var gameCenterLeaderboards: Self { + .init(rawValue: "gameCenterLeaderboards") + } + + public static var leaderboardReleases: Self { + .init(rawValue: "leaderboardReleases") + } + + public static var leaderboardSetReleases: Self { + .init(rawValue: "leaderboardSetReleases") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "achievementReleases": self = .achievementReleases - case "app": self = .app - case "defaultGroupLeaderboard": self = .defaultGroupLeaderboard - case "defaultLeaderboard": self = .defaultLeaderboard - case "gameCenterAchievements": self = .gameCenterAchievements - case "gameCenterAppVersions": self = .gameCenterAppVersions - case "gameCenterGroup": self = .gameCenterGroup - case "gameCenterLeaderboardSets": self = .gameCenterLeaderboardSets - case "gameCenterLeaderboards": self = .gameCenterLeaderboards - case "leaderboardReleases": self = .leaderboardReleases - case "leaderboardSetReleases": self = .leaderboardSetReleases - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } @@ -578,16 +881,41 @@ extension V1.GameCenterDetails.ById.GET { .init(key: "limit[achievementReleases]") } + /// maximum number of related activityReleases returned (when they are included) + public static var activityReleases: Relation { + .init(key: "limit[activityReleases]") + } + + /// maximum number of related challengeReleases returned (when they are included) + public static var challengeReleases: Relation { + .init(key: "limit[challengeReleases]") + } + + /// maximum number of related challengesMinimumPlatformVersions returned (when they are included) + public static var challengesMinimumPlatformVersions: Relation { + .init(key: "limit[challengesMinimumPlatformVersions]") + } + /// maximum number of related gameCenterAchievements returned (when they are included) public static var gameCenterAchievements: Relation { .init(key: "limit[gameCenterAchievements]") } + /// maximum number of related gameCenterActivities returned (when they are included) + public static var gameCenterActivities: Relation { + .init(key: "limit[gameCenterActivities]") + } + /// maximum number of related gameCenterAppVersions returned (when they are included) public static var gameCenterAppVersions: Relation { .init(key: "limit[gameCenterAppVersions]") } + /// maximum number of related gameCenterChallenges returned (when they are included) + public static var gameCenterChallenges: Relation { + .init(key: "limit[gameCenterChallenges]") + } + /// maximum number of related gameCenterLeaderboardSets returned (when they are included) public static var gameCenterLeaderboardSets: Relation { .init(key: "limit[gameCenterLeaderboardSets]") diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterDetails/ById/GameCenterDetailsById.PATCH.2adb42c.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterDetails/ById/GameCenterDetailsById.PATCH.2adb42c.generated.swift index c6886a8a..10d53180 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterDetails/ById/GameCenterDetailsById.PATCH.2adb42c.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterDetails/ById/GameCenterDetailsById.PATCH.2adb42c.generated.swift @@ -48,9 +48,12 @@ extension V1.GameCenterDetails.ById { /// - Returns: **200**, Single GameCenterDetail as `GameCenterDetailResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **422**, Unprocessable request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -64,6 +67,9 @@ extension V1.GameCenterDetails.ById { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) @@ -73,6 +79,12 @@ extension V1.GameCenterDetails.ById { case 409: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 422: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterDetails/ById/GameCenterGroup/GameCenterDetailsByIdGameCenterGroup.GET.1810e15.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterDetails/ById/GameCenterGroup/GameCenterDetailsByIdGameCenterGroup.GET.1810e15.generated.swift index 2989c4d1..0a99629d 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterDetails/ById/GameCenterGroup/GameCenterDetailsByIdGameCenterGroup.GET.1810e15.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterDetails/ById/GameCenterGroup/GameCenterDetailsByIdGameCenterGroup.GET.1810e15.generated.swift @@ -30,6 +30,10 @@ extension V1.GameCenterDetails.ById.GameCenterGroup { components?.queryItems = [ URLQueryItem(name: "fields[gameCenterAchievements]", value: parameters.fields[.gameCenterAchievements]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "fields[gameCenterActivities]", + value: parameters.fields[.gameCenterActivities]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "fields[gameCenterChallenges]", + value: parameters.fields[.gameCenterChallenges]?.map { "\($0)" }.joined(separator: ",")), URLQueryItem(name: "fields[gameCenterDetails]", value: parameters.fields[.gameCenterDetails]?.map { "\($0)" }.joined(separator: ",")), URLQueryItem(name: "fields[gameCenterGroups]", @@ -42,6 +46,10 @@ extension V1.GameCenterDetails.ById.GameCenterGroup { value: parameters.include?.map { "\($0)" }.joined(separator: ",")), URLQueryItem(name: "limit[gameCenterAchievements]", value: parameters.limit[.gameCenterAchievements].map { "\($0)" }), + URLQueryItem(name: "limit[gameCenterActivities]", + value: parameters.limit[.gameCenterActivities].map { "\($0)" }), + URLQueryItem(name: "limit[gameCenterChallenges]", + value: parameters.limit[.gameCenterChallenges].map { "\($0)" }), URLQueryItem(name: "limit[gameCenterDetails]", value: parameters.limit[.gameCenterDetails].map { "\($0)" }), URLQueryItem(name: "limit[gameCenterLeaderboardSets]", @@ -60,8 +68,10 @@ extension V1.GameCenterDetails.ById.GameCenterGroup { /// - Returns: **200**, Single GameCenterGroup as `GameCenterGroupResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -75,12 +85,18 @@ extension V1.GameCenterDetails.ById.GameCenterGroup { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 404: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -105,245 +121,447 @@ extension V1.GameCenterDetails.ById.GameCenterGroup.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum GameCenterAchievements: Hashable, Codable, RawRepresentable { - case archived - case gameCenterDetail - case gameCenterGroup - case groupAchievement - case localizations - case points - case referenceName - case releases - case repeatable - case showBeforeEarned - case vendorIdentifier - case unknown(String) - - public var rawValue: String { - switch self { - case .archived: return "archived" - case .gameCenterDetail: return "gameCenterDetail" - case .gameCenterGroup: return "gameCenterGroup" - case .groupAchievement: return "groupAchievement" - case .localizations: return "localizations" - case .points: return "points" - case .referenceName: return "referenceName" - case .releases: return "releases" - case .repeatable: return "repeatable" - case .showBeforeEarned: return "showBeforeEarned" - case .vendorIdentifier: return "vendorIdentifier" - case .unknown(let rawValue): return rawValue - } + public struct GameCenterAchievements: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var activity: Self { + .init(rawValue: "activity") + } + + public static var activityProperties: Self { + .init(rawValue: "activityProperties") + } + + public static var archived: Self { + .init(rawValue: "archived") } + public static var gameCenterDetail: Self { + .init(rawValue: "gameCenterDetail") + } + + public static var gameCenterGroup: Self { + .init(rawValue: "gameCenterGroup") + } + + public static var groupAchievement: Self { + .init(rawValue: "groupAchievement") + } + + public static var localizations: Self { + .init(rawValue: "localizations") + } + + public static var points: Self { + .init(rawValue: "points") + } + + public static var referenceName: Self { + .init(rawValue: "referenceName") + } + + public static var releases: Self { + .init(rawValue: "releases") + } + + public static var repeatable: Self { + .init(rawValue: "repeatable") + } + + public static var showBeforeEarned: Self { + .init(rawValue: "showBeforeEarned") + } + + public static var vendorIdentifier: Self { + .init(rawValue: "vendorIdentifier") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "archived": self = .archived - case "gameCenterDetail": self = .gameCenterDetail - case "gameCenterGroup": self = .gameCenterGroup - case "groupAchievement": self = .groupAchievement - case "localizations": self = .localizations - case "points": self = .points - case "referenceName": self = .referenceName - case "releases": self = .releases - case "repeatable": self = .repeatable - case "showBeforeEarned": self = .showBeforeEarned - case "vendorIdentifier": self = .vendorIdentifier - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum GameCenterDetails: Hashable, Codable, RawRepresentable { - case achievementReleases - case app - case arcadeEnabled - case challengeEnabled - case defaultGroupLeaderboard - case defaultLeaderboard - case gameCenterAchievements - case gameCenterAppVersions - case gameCenterGroup - case gameCenterLeaderboardSets - case gameCenterLeaderboards - case leaderboardReleases - case leaderboardSetReleases - case unknown(String) - - public var rawValue: String { - switch self { - case .achievementReleases: return "achievementReleases" - case .app: return "app" - case .arcadeEnabled: return "arcadeEnabled" - case .challengeEnabled: return "challengeEnabled" - case .defaultGroupLeaderboard: return "defaultGroupLeaderboard" - case .defaultLeaderboard: return "defaultLeaderboard" - case .gameCenterAchievements: return "gameCenterAchievements" - case .gameCenterAppVersions: return "gameCenterAppVersions" - case .gameCenterGroup: return "gameCenterGroup" - case .gameCenterLeaderboardSets: return "gameCenterLeaderboardSets" - case .gameCenterLeaderboards: return "gameCenterLeaderboards" - case .leaderboardReleases: return "leaderboardReleases" - case .leaderboardSetReleases: return "leaderboardSetReleases" - case .unknown(let rawValue): return rawValue - } + public struct GameCenterActivities: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var achievements: Self { + .init(rawValue: "achievements") + } + + public static var archived: Self { + .init(rawValue: "archived") + } + + public static var gameCenterDetail: Self { + .init(rawValue: "gameCenterDetail") + } + + public static var gameCenterGroup: Self { + .init(rawValue: "gameCenterGroup") + } + + public static var leaderboards: Self { + .init(rawValue: "leaderboards") + } + + public static var maximumPlayersCount: Self { + .init(rawValue: "maximumPlayersCount") + } + + public static var minimumPlayersCount: Self { + .init(rawValue: "minimumPlayersCount") + } + + public static var playStyle: Self { + .init(rawValue: "playStyle") + } + + public static var properties: Self { + .init(rawValue: "properties") + } + + public static var referenceName: Self { + .init(rawValue: "referenceName") + } + + public static var supportsPartyCode: Self { + .init(rawValue: "supportsPartyCode") + } + + public static var vendorIdentifier: Self { + .init(rawValue: "vendorIdentifier") + } + + public static var versions: Self { + .init(rawValue: "versions") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct GameCenterChallenges: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var allowedDurations: Self { + .init(rawValue: "allowedDurations") + } + + public static var archived: Self { + .init(rawValue: "archived") + } + + public static var challengeType: Self { + .init(rawValue: "challengeType") + } + + public static var gameCenterDetail: Self { + .init(rawValue: "gameCenterDetail") + } + + public static var gameCenterGroup: Self { + .init(rawValue: "gameCenterGroup") + } + + public static var leaderboard: Self { + .init(rawValue: "leaderboard") + } + + public static var referenceName: Self { + .init(rawValue: "referenceName") + } + + public static var repeatable: Self { + .init(rawValue: "repeatable") + } + + public static var vendorIdentifier: Self { + .init(rawValue: "vendorIdentifier") + } + + public static var versions: Self { + .init(rawValue: "versions") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct GameCenterDetails: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var achievementReleases: Self { + .init(rawValue: "achievementReleases") + } + + public static var activityReleases: Self { + .init(rawValue: "activityReleases") + } + + public static var app: Self { + .init(rawValue: "app") + } + + public static var arcadeEnabled: Self { + .init(rawValue: "arcadeEnabled") + } + + public static var challengeEnabled: Self { + .init(rawValue: "challengeEnabled") + } + + public static var challengeReleases: Self { + .init(rawValue: "challengeReleases") + } + + public static var challengesMinimumPlatformVersions: Self { + .init(rawValue: "challengesMinimumPlatformVersions") + } + + public static var defaultGroupLeaderboard: Self { + .init(rawValue: "defaultGroupLeaderboard") + } + + public static var defaultLeaderboard: Self { + .init(rawValue: "defaultLeaderboard") + } + + public static var gameCenterAchievements: Self { + .init(rawValue: "gameCenterAchievements") + } + + public static var gameCenterActivities: Self { + .init(rawValue: "gameCenterActivities") + } + + public static var gameCenterAppVersions: Self { + .init(rawValue: "gameCenterAppVersions") } + public static var gameCenterChallenges: Self { + .init(rawValue: "gameCenterChallenges") + } + + public static var gameCenterGroup: Self { + .init(rawValue: "gameCenterGroup") + } + + public static var gameCenterLeaderboardSets: Self { + .init(rawValue: "gameCenterLeaderboardSets") + } + + public static var gameCenterLeaderboards: Self { + .init(rawValue: "gameCenterLeaderboards") + } + + public static var leaderboardReleases: Self { + .init(rawValue: "leaderboardReleases") + } + + public static var leaderboardSetReleases: Self { + .init(rawValue: "leaderboardSetReleases") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "achievementReleases": self = .achievementReleases - case "app": self = .app - case "arcadeEnabled": self = .arcadeEnabled - case "challengeEnabled": self = .challengeEnabled - case "defaultGroupLeaderboard": self = .defaultGroupLeaderboard - case "defaultLeaderboard": self = .defaultLeaderboard - case "gameCenterAchievements": self = .gameCenterAchievements - case "gameCenterAppVersions": self = .gameCenterAppVersions - case "gameCenterGroup": self = .gameCenterGroup - case "gameCenterLeaderboardSets": self = .gameCenterLeaderboardSets - case "gameCenterLeaderboards": self = .gameCenterLeaderboards - case "leaderboardReleases": self = .leaderboardReleases - case "leaderboardSetReleases": self = .leaderboardSetReleases - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum GameCenterGroups: Hashable, Codable, RawRepresentable { - case gameCenterAchievements - case gameCenterDetails - case gameCenterLeaderboardSets - case gameCenterLeaderboards - case referenceName - case unknown(String) - - public var rawValue: String { - switch self { - case .gameCenterAchievements: return "gameCenterAchievements" - case .gameCenterDetails: return "gameCenterDetails" - case .gameCenterLeaderboardSets: return "gameCenterLeaderboardSets" - case .gameCenterLeaderboards: return "gameCenterLeaderboards" - case .referenceName: return "referenceName" - case .unknown(let rawValue): return rawValue - } + public struct GameCenterGroups: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var gameCenterAchievements: Self { + .init(rawValue: "gameCenterAchievements") + } + + public static var gameCenterActivities: Self { + .init(rawValue: "gameCenterActivities") + } + + public static var gameCenterChallenges: Self { + .init(rawValue: "gameCenterChallenges") + } + + public static var gameCenterDetails: Self { + .init(rawValue: "gameCenterDetails") + } + + public static var gameCenterLeaderboardSets: Self { + .init(rawValue: "gameCenterLeaderboardSets") + } + + public static var gameCenterLeaderboards: Self { + .init(rawValue: "gameCenterLeaderboards") + } + + public static var referenceName: Self { + .init(rawValue: "referenceName") + } + + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "gameCenterAchievements": self = .gameCenterAchievements - case "gameCenterDetails": self = .gameCenterDetails - case "gameCenterLeaderboardSets": self = .gameCenterLeaderboardSets - case "gameCenterLeaderboards": self = .gameCenterLeaderboards - case "referenceName": self = .referenceName - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum GameCenterLeaderboardSets: Hashable, Codable, RawRepresentable { - case gameCenterDetail - case gameCenterGroup - case gameCenterLeaderboards - case groupLeaderboardSet - case localizations - case referenceName - case releases - case vendorIdentifier - case unknown(String) - - public var rawValue: String { - switch self { - case .gameCenterDetail: return "gameCenterDetail" - case .gameCenterGroup: return "gameCenterGroup" - case .gameCenterLeaderboards: return "gameCenterLeaderboards" - case .groupLeaderboardSet: return "groupLeaderboardSet" - case .localizations: return "localizations" - case .referenceName: return "referenceName" - case .releases: return "releases" - case .vendorIdentifier: return "vendorIdentifier" - case .unknown(let rawValue): return rawValue - } + public struct GameCenterLeaderboardSets: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var gameCenterDetail: Self { + .init(rawValue: "gameCenterDetail") + } + + public static var gameCenterGroup: Self { + .init(rawValue: "gameCenterGroup") + } + + public static var gameCenterLeaderboards: Self { + .init(rawValue: "gameCenterLeaderboards") + } + + public static var groupLeaderboardSet: Self { + .init(rawValue: "groupLeaderboardSet") + } + + public static var localizations: Self { + .init(rawValue: "localizations") + } + + public static var referenceName: Self { + .init(rawValue: "referenceName") + } + + public static var releases: Self { + .init(rawValue: "releases") + } + + public static var vendorIdentifier: Self { + .init(rawValue: "vendorIdentifier") + } + + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "gameCenterDetail": self = .gameCenterDetail - case "gameCenterGroup": self = .gameCenterGroup - case "gameCenterLeaderboards": self = .gameCenterLeaderboards - case "groupLeaderboardSet": self = .groupLeaderboardSet - case "localizations": self = .localizations - case "referenceName": self = .referenceName - case "releases": self = .releases - case "vendorIdentifier": self = .vendorIdentifier - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum GameCenterLeaderboards: Hashable, Codable, RawRepresentable { - case archived - case defaultFormatter - case gameCenterDetail - case gameCenterGroup - case gameCenterLeaderboardSets - case groupLeaderboard - case localizations - case recurrenceDuration - case recurrenceRule - case recurrenceStartDate - case referenceName - case releases - case scoreRangeEnd - case scoreRangeStart - case scoreSortType - case submissionType - case vendorIdentifier - case unknown(String) - - public var rawValue: String { - switch self { - case .archived: return "archived" - case .defaultFormatter: return "defaultFormatter" - case .gameCenterDetail: return "gameCenterDetail" - case .gameCenterGroup: return "gameCenterGroup" - case .gameCenterLeaderboardSets: return "gameCenterLeaderboardSets" - case .groupLeaderboard: return "groupLeaderboard" - case .localizations: return "localizations" - case .recurrenceDuration: return "recurrenceDuration" - case .recurrenceRule: return "recurrenceRule" - case .recurrenceStartDate: return "recurrenceStartDate" - case .referenceName: return "referenceName" - case .releases: return "releases" - case .scoreRangeEnd: return "scoreRangeEnd" - case .scoreRangeStart: return "scoreRangeStart" - case .scoreSortType: return "scoreSortType" - case .submissionType: return "submissionType" - case .vendorIdentifier: return "vendorIdentifier" - case .unknown(let rawValue): return rawValue - } + public struct GameCenterLeaderboards: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var activity: Self { + .init(rawValue: "activity") + } + + public static var activityProperties: Self { + .init(rawValue: "activityProperties") + } + + public static var archived: Self { + .init(rawValue: "archived") + } + + public static var challenge: Self { + .init(rawValue: "challenge") + } + + public static var defaultFormatter: Self { + .init(rawValue: "defaultFormatter") + } + + public static var gameCenterDetail: Self { + .init(rawValue: "gameCenterDetail") } + public static var gameCenterGroup: Self { + .init(rawValue: "gameCenterGroup") + } + + public static var gameCenterLeaderboardSets: Self { + .init(rawValue: "gameCenterLeaderboardSets") + } + + public static var groupLeaderboard: Self { + .init(rawValue: "groupLeaderboard") + } + + public static var localizations: Self { + .init(rawValue: "localizations") + } + + public static var recurrenceDuration: Self { + .init(rawValue: "recurrenceDuration") + } + + public static var recurrenceRule: Self { + .init(rawValue: "recurrenceRule") + } + + public static var recurrenceStartDate: Self { + .init(rawValue: "recurrenceStartDate") + } + + public static var referenceName: Self { + .init(rawValue: "referenceName") + } + + public static var releases: Self { + .init(rawValue: "releases") + } + + public static var scoreRangeEnd: Self { + .init(rawValue: "scoreRangeEnd") + } + + public static var scoreRangeStart: Self { + .init(rawValue: "scoreRangeStart") + } + + public static var scoreSortType: Self { + .init(rawValue: "scoreSortType") + } + + public static var submissionType: Self { + .init(rawValue: "submissionType") + } + + public static var vendorIdentifier: Self { + .init(rawValue: "vendorIdentifier") + } + + public static var visibility: Self { + .init(rawValue: "visibility") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "archived": self = .archived - case "defaultFormatter": self = .defaultFormatter - case "gameCenterDetail": self = .gameCenterDetail - case "gameCenterGroup": self = .gameCenterGroup - case "gameCenterLeaderboardSets": self = .gameCenterLeaderboardSets - case "groupLeaderboard": self = .groupLeaderboard - case "localizations": self = .localizations - case "recurrenceDuration": self = .recurrenceDuration - case "recurrenceRule": self = .recurrenceRule - case "recurrenceStartDate": self = .recurrenceStartDate - case "referenceName": self = .referenceName - case "releases": self = .releases - case "scoreRangeEnd": self = .scoreRangeEnd - case "scoreRangeStart": self = .scoreRangeStart - case "scoreSortType": self = .scoreSortType - case "submissionType": self = .submissionType - case "vendorIdentifier": self = .vendorIdentifier - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } @@ -353,6 +571,16 @@ extension V1.GameCenterDetails.ById.GameCenterGroup.GET { .init(key: "fields[gameCenterAchievements]") } + /// the fields to include for returned resources of type gameCenterActivities + public static var gameCenterActivities: Relation<[GameCenterActivities]?> { + .init(key: "fields[gameCenterActivities]") + } + + /// the fields to include for returned resources of type gameCenterChallenges + public static var gameCenterChallenges: Relation<[GameCenterChallenges]?> { + .init(key: "fields[gameCenterChallenges]") + } + /// the fields to include for returned resources of type gameCenterDetails public static var gameCenterDetails: Relation<[GameCenterDetails]?> { .init(key: "fields[gameCenterDetails]") @@ -381,31 +609,39 @@ extension V1.GameCenterDetails.ById.GameCenterGroup.GET { } } - public enum Include: Hashable, Codable, RawRepresentable { - case gameCenterAchievements - case gameCenterDetails - case gameCenterLeaderboardSets - case gameCenterLeaderboards - case unknown(String) - - public var rawValue: String { - switch self { - case .gameCenterAchievements: return "gameCenterAchievements" - case .gameCenterDetails: return "gameCenterDetails" - case .gameCenterLeaderboardSets: return "gameCenterLeaderboardSets" - case .gameCenterLeaderboards: return "gameCenterLeaderboards" - case .unknown(let rawValue): return rawValue - } + public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var gameCenterAchievements: Self { + .init(rawValue: "gameCenterAchievements") + } + + public static var gameCenterActivities: Self { + .init(rawValue: "gameCenterActivities") + } + + public static var gameCenterChallenges: Self { + .init(rawValue: "gameCenterChallenges") } + public static var gameCenterDetails: Self { + .init(rawValue: "gameCenterDetails") + } + + public static var gameCenterLeaderboardSets: Self { + .init(rawValue: "gameCenterLeaderboardSets") + } + + public static var gameCenterLeaderboards: Self { + .init(rawValue: "gameCenterLeaderboards") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "gameCenterAchievements": self = .gameCenterAchievements - case "gameCenterDetails": self = .gameCenterDetails - case "gameCenterLeaderboardSets": self = .gameCenterLeaderboardSets - case "gameCenterLeaderboards": self = .gameCenterLeaderboards - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } @@ -423,6 +659,16 @@ extension V1.GameCenterDetails.ById.GameCenterGroup.GET { .init(key: "limit[gameCenterAchievements]") } + /// maximum number of related gameCenterActivities returned (when they are included) + public static var gameCenterActivities: Relation { + .init(key: "limit[gameCenterActivities]") + } + + /// maximum number of related gameCenterChallenges returned (when they are included) + public static var gameCenterChallenges: Relation { + .init(key: "limit[gameCenterChallenges]") + } + /// maximum number of related gameCenterDetails returned (when they are included) public static var gameCenterDetails: Relation { .init(key: "limit[gameCenterDetails]") diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterDetails/ById/GameCenterLeaderboardSets/GameCenterDetailsByIdGameCenterLeaderboardSets.GET.8110c49.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterDetails/ById/GameCenterLeaderboardSets/GameCenterDetailsByIdGameCenterLeaderboardSets.GET.8110c49.generated.swift index 0ce8d6f5..29cc4e31 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterDetails/ById/GameCenterLeaderboardSets/GameCenterDetailsByIdGameCenterLeaderboardSets.GET.8110c49.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterDetails/ById/GameCenterLeaderboardSets/GameCenterDetailsByIdGameCenterLeaderboardSets.GET.8110c49.generated.swift @@ -66,8 +66,10 @@ extension V1.GameCenterDetails.ById.GameCenterLeaderboardSets { /// - Returns: **200**, List of GameCenterLeaderboardSets as `GameCenterLeaderboardSetsResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -81,12 +83,18 @@ extension V1.GameCenterDetails.ById.GameCenterLeaderboardSets { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 404: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -114,249 +122,319 @@ extension V1.GameCenterDetails.ById.GameCenterLeaderboardSets.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum GameCenterDetails: Hashable, Codable, RawRepresentable { - case achievementReleases - case app - case arcadeEnabled - case challengeEnabled - case defaultGroupLeaderboard - case defaultLeaderboard - case gameCenterAchievements - case gameCenterAppVersions - case gameCenterGroup - case gameCenterLeaderboardSets - case gameCenterLeaderboards - case leaderboardReleases - case leaderboardSetReleases - case unknown(String) - - public var rawValue: String { - switch self { - case .achievementReleases: return "achievementReleases" - case .app: return "app" - case .arcadeEnabled: return "arcadeEnabled" - case .challengeEnabled: return "challengeEnabled" - case .defaultGroupLeaderboard: return "defaultGroupLeaderboard" - case .defaultLeaderboard: return "defaultLeaderboard" - case .gameCenterAchievements: return "gameCenterAchievements" - case .gameCenterAppVersions: return "gameCenterAppVersions" - case .gameCenterGroup: return "gameCenterGroup" - case .gameCenterLeaderboardSets: return "gameCenterLeaderboardSets" - case .gameCenterLeaderboards: return "gameCenterLeaderboards" - case .leaderboardReleases: return "leaderboardReleases" - case .leaderboardSetReleases: return "leaderboardSetReleases" - case .unknown(let rawValue): return rawValue - } + public struct GameCenterDetails: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var achievementReleases: Self { + .init(rawValue: "achievementReleases") + } + + public static var activityReleases: Self { + .init(rawValue: "activityReleases") + } + + public static var app: Self { + .init(rawValue: "app") + } + + public static var arcadeEnabled: Self { + .init(rawValue: "arcadeEnabled") } + public static var challengeEnabled: Self { + .init(rawValue: "challengeEnabled") + } + + public static var challengeReleases: Self { + .init(rawValue: "challengeReleases") + } + + public static var challengesMinimumPlatformVersions: Self { + .init(rawValue: "challengesMinimumPlatformVersions") + } + + public static var defaultGroupLeaderboard: Self { + .init(rawValue: "defaultGroupLeaderboard") + } + + public static var defaultLeaderboard: Self { + .init(rawValue: "defaultLeaderboard") + } + + public static var gameCenterAchievements: Self { + .init(rawValue: "gameCenterAchievements") + } + + public static var gameCenterActivities: Self { + .init(rawValue: "gameCenterActivities") + } + + public static var gameCenterAppVersions: Self { + .init(rawValue: "gameCenterAppVersions") + } + + public static var gameCenterChallenges: Self { + .init(rawValue: "gameCenterChallenges") + } + + public static var gameCenterGroup: Self { + .init(rawValue: "gameCenterGroup") + } + + public static var gameCenterLeaderboardSets: Self { + .init(rawValue: "gameCenterLeaderboardSets") + } + + public static var gameCenterLeaderboards: Self { + .init(rawValue: "gameCenterLeaderboards") + } + + public static var leaderboardReleases: Self { + .init(rawValue: "leaderboardReleases") + } + + public static var leaderboardSetReleases: Self { + .init(rawValue: "leaderboardSetReleases") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "achievementReleases": self = .achievementReleases - case "app": self = .app - case "arcadeEnabled": self = .arcadeEnabled - case "challengeEnabled": self = .challengeEnabled - case "defaultGroupLeaderboard": self = .defaultGroupLeaderboard - case "defaultLeaderboard": self = .defaultLeaderboard - case "gameCenterAchievements": self = .gameCenterAchievements - case "gameCenterAppVersions": self = .gameCenterAppVersions - case "gameCenterGroup": self = .gameCenterGroup - case "gameCenterLeaderboardSets": self = .gameCenterLeaderboardSets - case "gameCenterLeaderboards": self = .gameCenterLeaderboards - case "leaderboardReleases": self = .leaderboardReleases - case "leaderboardSetReleases": self = .leaderboardSetReleases - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum GameCenterGroups: Hashable, Codable, RawRepresentable { - case gameCenterAchievements - case gameCenterDetails - case gameCenterLeaderboardSets - case gameCenterLeaderboards - case referenceName - case unknown(String) - - public var rawValue: String { - switch self { - case .gameCenterAchievements: return "gameCenterAchievements" - case .gameCenterDetails: return "gameCenterDetails" - case .gameCenterLeaderboardSets: return "gameCenterLeaderboardSets" - case .gameCenterLeaderboards: return "gameCenterLeaderboards" - case .referenceName: return "referenceName" - case .unknown(let rawValue): return rawValue - } + public struct GameCenterGroups: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var gameCenterAchievements: Self { + .init(rawValue: "gameCenterAchievements") + } + + public static var gameCenterActivities: Self { + .init(rawValue: "gameCenterActivities") + } + + public static var gameCenterChallenges: Self { + .init(rawValue: "gameCenterChallenges") + } + + public static var gameCenterDetails: Self { + .init(rawValue: "gameCenterDetails") + } + + public static var gameCenterLeaderboardSets: Self { + .init(rawValue: "gameCenterLeaderboardSets") + } + + public static var gameCenterLeaderboards: Self { + .init(rawValue: "gameCenterLeaderboards") + } + + public static var referenceName: Self { + .init(rawValue: "referenceName") + } + + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "gameCenterAchievements": self = .gameCenterAchievements - case "gameCenterDetails": self = .gameCenterDetails - case "gameCenterLeaderboardSets": self = .gameCenterLeaderboardSets - case "gameCenterLeaderboards": self = .gameCenterLeaderboards - case "referenceName": self = .referenceName - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum GameCenterLeaderboardSetLocalizations: Hashable, Codable, RawRepresentable { - case gameCenterLeaderboardSet - case gameCenterLeaderboardSetImage - case locale - case name - case unknown(String) + public struct GameCenterLeaderboardSetLocalizations: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var gameCenterLeaderboardSet: Self { + .init(rawValue: "gameCenterLeaderboardSet") + } - public var rawValue: String { - switch self { - case .gameCenterLeaderboardSet: return "gameCenterLeaderboardSet" - case .gameCenterLeaderboardSetImage: return "gameCenterLeaderboardSetImage" - case .locale: return "locale" - case .name: return "name" - case .unknown(let rawValue): return rawValue - } + public static var gameCenterLeaderboardSetImage: Self { + .init(rawValue: "gameCenterLeaderboardSetImage") } + public static var locale: Self { + .init(rawValue: "locale") + } + + public static var name: Self { + .init(rawValue: "name") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "gameCenterLeaderboardSet": self = .gameCenterLeaderboardSet - case "gameCenterLeaderboardSetImage": self = .gameCenterLeaderboardSetImage - case "locale": self = .locale - case "name": self = .name - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum GameCenterLeaderboardSetReleases: Hashable, Codable, RawRepresentable { - case gameCenterDetail - case gameCenterLeaderboardSet - case live - case unknown(String) + public struct GameCenterLeaderboardSetReleases: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var gameCenterDetail: Self { + .init(rawValue: "gameCenterDetail") + } + + public static var gameCenterLeaderboardSet: Self { + .init(rawValue: "gameCenterLeaderboardSet") + } + + public static var live: Self { + .init(rawValue: "live") + } - public var rawValue: String { - switch self { - case .gameCenterDetail: return "gameCenterDetail" - case .gameCenterLeaderboardSet: return "gameCenterLeaderboardSet" - case .live: return "live" - case .unknown(let rawValue): return rawValue - } + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "gameCenterDetail": self = .gameCenterDetail - case "gameCenterLeaderboardSet": self = .gameCenterLeaderboardSet - case "live": self = .live - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum GameCenterLeaderboardSets: Hashable, Codable, RawRepresentable { - case gameCenterDetail - case gameCenterGroup - case gameCenterLeaderboards - case groupLeaderboardSet - case localizations - case referenceName - case releases - case vendorIdentifier - case unknown(String) - - public var rawValue: String { - switch self { - case .gameCenterDetail: return "gameCenterDetail" - case .gameCenterGroup: return "gameCenterGroup" - case .gameCenterLeaderboards: return "gameCenterLeaderboards" - case .groupLeaderboardSet: return "groupLeaderboardSet" - case .localizations: return "localizations" - case .referenceName: return "referenceName" - case .releases: return "releases" - case .vendorIdentifier: return "vendorIdentifier" - case .unknown(let rawValue): return rawValue - } + public struct GameCenterLeaderboardSets: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var gameCenterDetail: Self { + .init(rawValue: "gameCenterDetail") + } + + public static var gameCenterGroup: Self { + .init(rawValue: "gameCenterGroup") } + public static var gameCenterLeaderboards: Self { + .init(rawValue: "gameCenterLeaderboards") + } + + public static var groupLeaderboardSet: Self { + .init(rawValue: "groupLeaderboardSet") + } + + public static var localizations: Self { + .init(rawValue: "localizations") + } + + public static var referenceName: Self { + .init(rawValue: "referenceName") + } + + public static var releases: Self { + .init(rawValue: "releases") + } + + public static var vendorIdentifier: Self { + .init(rawValue: "vendorIdentifier") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "gameCenterDetail": self = .gameCenterDetail - case "gameCenterGroup": self = .gameCenterGroup - case "gameCenterLeaderboards": self = .gameCenterLeaderboards - case "groupLeaderboardSet": self = .groupLeaderboardSet - case "localizations": self = .localizations - case "referenceName": self = .referenceName - case "releases": self = .releases - case "vendorIdentifier": self = .vendorIdentifier - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum GameCenterLeaderboards: Hashable, Codable, RawRepresentable { - case archived - case defaultFormatter - case gameCenterDetail - case gameCenterGroup - case gameCenterLeaderboardSets - case groupLeaderboard - case localizations - case recurrenceDuration - case recurrenceRule - case recurrenceStartDate - case referenceName - case releases - case scoreRangeEnd - case scoreRangeStart - case scoreSortType - case submissionType - case vendorIdentifier - case unknown(String) - - public var rawValue: String { - switch self { - case .archived: return "archived" - case .defaultFormatter: return "defaultFormatter" - case .gameCenterDetail: return "gameCenterDetail" - case .gameCenterGroup: return "gameCenterGroup" - case .gameCenterLeaderboardSets: return "gameCenterLeaderboardSets" - case .groupLeaderboard: return "groupLeaderboard" - case .localizations: return "localizations" - case .recurrenceDuration: return "recurrenceDuration" - case .recurrenceRule: return "recurrenceRule" - case .recurrenceStartDate: return "recurrenceStartDate" - case .referenceName: return "referenceName" - case .releases: return "releases" - case .scoreRangeEnd: return "scoreRangeEnd" - case .scoreRangeStart: return "scoreRangeStart" - case .scoreSortType: return "scoreSortType" - case .submissionType: return "submissionType" - case .vendorIdentifier: return "vendorIdentifier" - case .unknown(let rawValue): return rawValue - } + public struct GameCenterLeaderboards: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var activity: Self { + .init(rawValue: "activity") + } + + public static var activityProperties: Self { + .init(rawValue: "activityProperties") + } + + public static var archived: Self { + .init(rawValue: "archived") + } + + public static var challenge: Self { + .init(rawValue: "challenge") + } + + public static var defaultFormatter: Self { + .init(rawValue: "defaultFormatter") + } + + public static var gameCenterDetail: Self { + .init(rawValue: "gameCenterDetail") + } + + public static var gameCenterGroup: Self { + .init(rawValue: "gameCenterGroup") + } + + public static var gameCenterLeaderboardSets: Self { + .init(rawValue: "gameCenterLeaderboardSets") + } + + public static var groupLeaderboard: Self { + .init(rawValue: "groupLeaderboard") + } + + public static var localizations: Self { + .init(rawValue: "localizations") + } + + public static var recurrenceDuration: Self { + .init(rawValue: "recurrenceDuration") + } + + public static var recurrenceRule: Self { + .init(rawValue: "recurrenceRule") } + public static var recurrenceStartDate: Self { + .init(rawValue: "recurrenceStartDate") + } + + public static var referenceName: Self { + .init(rawValue: "referenceName") + } + + public static var releases: Self { + .init(rawValue: "releases") + } + + public static var scoreRangeEnd: Self { + .init(rawValue: "scoreRangeEnd") + } + + public static var scoreRangeStart: Self { + .init(rawValue: "scoreRangeStart") + } + + public static var scoreSortType: Self { + .init(rawValue: "scoreSortType") + } + + public static var submissionType: Self { + .init(rawValue: "submissionType") + } + + public static var vendorIdentifier: Self { + .init(rawValue: "vendorIdentifier") + } + + public static var visibility: Self { + .init(rawValue: "visibility") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "archived": self = .archived - case "defaultFormatter": self = .defaultFormatter - case "gameCenterDetail": self = .gameCenterDetail - case "gameCenterGroup": self = .gameCenterGroup - case "gameCenterLeaderboardSets": self = .gameCenterLeaderboardSets - case "groupLeaderboard": self = .groupLeaderboard - case "localizations": self = .localizations - case "recurrenceDuration": self = .recurrenceDuration - case "recurrenceRule": self = .recurrenceRule - case "recurrenceStartDate": self = .recurrenceStartDate - case "referenceName": self = .referenceName - case "releases": self = .releases - case "scoreRangeEnd": self = .scoreRangeEnd - case "scoreRangeStart": self = .scoreRangeStart - case "scoreSortType": self = .scoreSortType - case "submissionType": self = .submissionType - case "vendorIdentifier": self = .vendorIdentifier - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } @@ -426,37 +504,39 @@ extension V1.GameCenterDetails.ById.GameCenterLeaderboardSets.GET { } } - public enum Include: Hashable, Codable, RawRepresentable { - case gameCenterDetail - case gameCenterGroup - case gameCenterLeaderboards - case groupLeaderboardSet - case localizations - case releases - case unknown(String) - - public var rawValue: String { - switch self { - case .gameCenterDetail: return "gameCenterDetail" - case .gameCenterGroup: return "gameCenterGroup" - case .gameCenterLeaderboards: return "gameCenterLeaderboards" - case .groupLeaderboardSet: return "groupLeaderboardSet" - case .localizations: return "localizations" - case .releases: return "releases" - case .unknown(let rawValue): return rawValue - } + public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var gameCenterDetail: Self { + .init(rawValue: "gameCenterDetail") + } + + public static var gameCenterGroup: Self { + .init(rawValue: "gameCenterGroup") + } + + public static var gameCenterLeaderboards: Self { + .init(rawValue: "gameCenterLeaderboards") + } + + public static var groupLeaderboardSet: Self { + .init(rawValue: "groupLeaderboardSet") + } + + public static var localizations: Self { + .init(rawValue: "localizations") + } + + public static var releases: Self { + .init(rawValue: "releases") } + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "gameCenterDetail": self = .gameCenterDetail - case "gameCenterGroup": self = .gameCenterGroup - case "gameCenterLeaderboards": self = .gameCenterLeaderboards - case "groupLeaderboardSet": self = .groupLeaderboardSet - case "localizations": self = .localizations - case "releases": self = .releases - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterDetails/ById/GameCenterLeaderboards/GameCenterDetailsByIdGameCenterLeaderboards.GET.a47a5dc.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterDetails/ById/GameCenterLeaderboards/GameCenterDetailsByIdGameCenterLeaderboards.GET.a47a5dc.generated.swift index 341f1c0a..da17b05d 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterDetails/ById/GameCenterLeaderboards/GameCenterDetailsByIdGameCenterLeaderboards.GET.a47a5dc.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterDetails/ById/GameCenterLeaderboards/GameCenterDetailsByIdGameCenterLeaderboards.GET.a47a5dc.generated.swift @@ -28,6 +28,10 @@ extension V1.GameCenterDetails.ById.GameCenterLeaderboards { components?.path = path components?.queryItems = [ + URLQueryItem(name: "fields[gameCenterActivities]", + value: parameters.fields[.gameCenterActivities]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "fields[gameCenterChallenges]", + value: parameters.fields[.gameCenterChallenges]?.map { "\($0)" }.joined(separator: ",")), URLQueryItem(name: "fields[gameCenterDetails]", value: parameters.fields[.gameCenterDetails]?.map { "\($0)" }.joined(separator: ",")), URLQueryItem(name: "fields[gameCenterGroups]", @@ -68,8 +72,10 @@ extension V1.GameCenterDetails.ById.GameCenterLeaderboards { /// - Returns: **200**, List of GameCenterLeaderboards as `GameCenterLeaderboardsResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -83,12 +89,18 @@ extension V1.GameCenterDetails.ById.GameCenterLeaderboards { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 404: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -116,262 +128,461 @@ extension V1.GameCenterDetails.ById.GameCenterLeaderboards.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum GameCenterDetails: Hashable, Codable, RawRepresentable { - case achievementReleases - case app - case arcadeEnabled - case challengeEnabled - case defaultGroupLeaderboard - case defaultLeaderboard - case gameCenterAchievements - case gameCenterAppVersions - case gameCenterGroup - case gameCenterLeaderboardSets - case gameCenterLeaderboards - case leaderboardReleases - case leaderboardSetReleases - case unknown(String) - - public var rawValue: String { - switch self { - case .achievementReleases: return "achievementReleases" - case .app: return "app" - case .arcadeEnabled: return "arcadeEnabled" - case .challengeEnabled: return "challengeEnabled" - case .defaultGroupLeaderboard: return "defaultGroupLeaderboard" - case .defaultLeaderboard: return "defaultLeaderboard" - case .gameCenterAchievements: return "gameCenterAchievements" - case .gameCenterAppVersions: return "gameCenterAppVersions" - case .gameCenterGroup: return "gameCenterGroup" - case .gameCenterLeaderboardSets: return "gameCenterLeaderboardSets" - case .gameCenterLeaderboards: return "gameCenterLeaderboards" - case .leaderboardReleases: return "leaderboardReleases" - case .leaderboardSetReleases: return "leaderboardSetReleases" - case .unknown(let rawValue): return rawValue - } + public struct GameCenterActivities: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var achievements: Self { + .init(rawValue: "achievements") + } + + public static var archived: Self { + .init(rawValue: "archived") + } + + public static var gameCenterDetail: Self { + .init(rawValue: "gameCenterDetail") + } + + public static var gameCenterGroup: Self { + .init(rawValue: "gameCenterGroup") + } + + public static var leaderboards: Self { + .init(rawValue: "leaderboards") + } + + public static var maximumPlayersCount: Self { + .init(rawValue: "maximumPlayersCount") + } + + public static var minimumPlayersCount: Self { + .init(rawValue: "minimumPlayersCount") + } + + public static var playStyle: Self { + .init(rawValue: "playStyle") + } + + public static var properties: Self { + .init(rawValue: "properties") + } + + public static var referenceName: Self { + .init(rawValue: "referenceName") + } + + public static var supportsPartyCode: Self { + .init(rawValue: "supportsPartyCode") + } + + public static var vendorIdentifier: Self { + .init(rawValue: "vendorIdentifier") + } + + public static var versions: Self { + .init(rawValue: "versions") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct GameCenterChallenges: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var allowedDurations: Self { + .init(rawValue: "allowedDurations") + } + + public static var archived: Self { + .init(rawValue: "archived") + } + + public static var challengeType: Self { + .init(rawValue: "challengeType") + } + + public static var gameCenterDetail: Self { + .init(rawValue: "gameCenterDetail") + } + + public static var gameCenterGroup: Self { + .init(rawValue: "gameCenterGroup") + } + + public static var leaderboard: Self { + .init(rawValue: "leaderboard") + } + + public static var referenceName: Self { + .init(rawValue: "referenceName") + } + + public static var repeatable: Self { + .init(rawValue: "repeatable") + } + + public static var vendorIdentifier: Self { + .init(rawValue: "vendorIdentifier") + } + + public static var versions: Self { + .init(rawValue: "versions") } + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "achievementReleases": self = .achievementReleases - case "app": self = .app - case "arcadeEnabled": self = .arcadeEnabled - case "challengeEnabled": self = .challengeEnabled - case "defaultGroupLeaderboard": self = .defaultGroupLeaderboard - case "defaultLeaderboard": self = .defaultLeaderboard - case "gameCenterAchievements": self = .gameCenterAchievements - case "gameCenterAppVersions": self = .gameCenterAppVersions - case "gameCenterGroup": self = .gameCenterGroup - case "gameCenterLeaderboardSets": self = .gameCenterLeaderboardSets - case "gameCenterLeaderboards": self = .gameCenterLeaderboards - case "leaderboardReleases": self = .leaderboardReleases - case "leaderboardSetReleases": self = .leaderboardSetReleases - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum GameCenterGroups: Hashable, Codable, RawRepresentable { - case gameCenterAchievements - case gameCenterDetails - case gameCenterLeaderboardSets - case gameCenterLeaderboards - case referenceName - case unknown(String) - - public var rawValue: String { - switch self { - case .gameCenterAchievements: return "gameCenterAchievements" - case .gameCenterDetails: return "gameCenterDetails" - case .gameCenterLeaderboardSets: return "gameCenterLeaderboardSets" - case .gameCenterLeaderboards: return "gameCenterLeaderboards" - case .referenceName: return "referenceName" - case .unknown(let rawValue): return rawValue - } + public struct GameCenterDetails: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var achievementReleases: Self { + .init(rawValue: "achievementReleases") + } + + public static var activityReleases: Self { + .init(rawValue: "activityReleases") + } + + public static var app: Self { + .init(rawValue: "app") + } + + public static var arcadeEnabled: Self { + .init(rawValue: "arcadeEnabled") + } + + public static var challengeEnabled: Self { + .init(rawValue: "challengeEnabled") + } + + public static var challengeReleases: Self { + .init(rawValue: "challengeReleases") + } + + public static var challengesMinimumPlatformVersions: Self { + .init(rawValue: "challengesMinimumPlatformVersions") + } + + public static var defaultGroupLeaderboard: Self { + .init(rawValue: "defaultGroupLeaderboard") + } + + public static var defaultLeaderboard: Self { + .init(rawValue: "defaultLeaderboard") + } + + public static var gameCenterAchievements: Self { + .init(rawValue: "gameCenterAchievements") + } + + public static var gameCenterActivities: Self { + .init(rawValue: "gameCenterActivities") + } + + public static var gameCenterAppVersions: Self { + .init(rawValue: "gameCenterAppVersions") + } + + public static var gameCenterChallenges: Self { + .init(rawValue: "gameCenterChallenges") + } + + public static var gameCenterGroup: Self { + .init(rawValue: "gameCenterGroup") + } + + public static var gameCenterLeaderboardSets: Self { + .init(rawValue: "gameCenterLeaderboardSets") + } + + public static var gameCenterLeaderboards: Self { + .init(rawValue: "gameCenterLeaderboards") + } + + public static var leaderboardReleases: Self { + .init(rawValue: "leaderboardReleases") + } + + public static var leaderboardSetReleases: Self { + .init(rawValue: "leaderboardSetReleases") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct GameCenterGroups: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var gameCenterAchievements: Self { + .init(rawValue: "gameCenterAchievements") + } + + public static var gameCenterActivities: Self { + .init(rawValue: "gameCenterActivities") + } + + public static var gameCenterChallenges: Self { + .init(rawValue: "gameCenterChallenges") + } + + public static var gameCenterDetails: Self { + .init(rawValue: "gameCenterDetails") + } + + public static var gameCenterLeaderboardSets: Self { + .init(rawValue: "gameCenterLeaderboardSets") + } + + public static var gameCenterLeaderboards: Self { + .init(rawValue: "gameCenterLeaderboards") + } + + public static var referenceName: Self { + .init(rawValue: "referenceName") } + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "gameCenterAchievements": self = .gameCenterAchievements - case "gameCenterDetails": self = .gameCenterDetails - case "gameCenterLeaderboardSets": self = .gameCenterLeaderboardSets - case "gameCenterLeaderboards": self = .gameCenterLeaderboards - case "referenceName": self = .referenceName - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum GameCenterLeaderboardLocalizations: Hashable, Codable, RawRepresentable { - case formatterOverride - case formatterSuffix - case formatterSuffixSingular - case gameCenterLeaderboard - case gameCenterLeaderboardImage - case locale - case name - case unknown(String) - - public var rawValue: String { - switch self { - case .formatterOverride: return "formatterOverride" - case .formatterSuffix: return "formatterSuffix" - case .formatterSuffixSingular: return "formatterSuffixSingular" - case .gameCenterLeaderboard: return "gameCenterLeaderboard" - case .gameCenterLeaderboardImage: return "gameCenterLeaderboardImage" - case .locale: return "locale" - case .name: return "name" - case .unknown(let rawValue): return rawValue - } + public struct GameCenterLeaderboardLocalizations: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var formatterOverride: Self { + .init(rawValue: "formatterOverride") + } + + public static var formatterSuffix: Self { + .init(rawValue: "formatterSuffix") + } + + public static var formatterSuffixSingular: Self { + .init(rawValue: "formatterSuffixSingular") + } + + public static var gameCenterLeaderboard: Self { + .init(rawValue: "gameCenterLeaderboard") + } + + public static var gameCenterLeaderboardImage: Self { + .init(rawValue: "gameCenterLeaderboardImage") } + public static var locale: Self { + .init(rawValue: "locale") + } + + public static var name: Self { + .init(rawValue: "name") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "formatterOverride": self = .formatterOverride - case "formatterSuffix": self = .formatterSuffix - case "formatterSuffixSingular": self = .formatterSuffixSingular - case "gameCenterLeaderboard": self = .gameCenterLeaderboard - case "gameCenterLeaderboardImage": self = .gameCenterLeaderboardImage - case "locale": self = .locale - case "name": self = .name - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum GameCenterLeaderboardReleases: Hashable, Codable, RawRepresentable { - case gameCenterDetail - case gameCenterLeaderboard - case live - case unknown(String) + public struct GameCenterLeaderboardReleases: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var gameCenterDetail: Self { + .init(rawValue: "gameCenterDetail") + } + + public static var gameCenterLeaderboard: Self { + .init(rawValue: "gameCenterLeaderboard") + } - public var rawValue: String { - switch self { - case .gameCenterDetail: return "gameCenterDetail" - case .gameCenterLeaderboard: return "gameCenterLeaderboard" - case .live: return "live" - case .unknown(let rawValue): return rawValue - } + public static var live: Self { + .init(rawValue: "live") } + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "gameCenterDetail": self = .gameCenterDetail - case "gameCenterLeaderboard": self = .gameCenterLeaderboard - case "live": self = .live - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum GameCenterLeaderboardSets: Hashable, Codable, RawRepresentable { - case gameCenterDetail - case gameCenterGroup - case gameCenterLeaderboards - case groupLeaderboardSet - case localizations - case referenceName - case releases - case vendorIdentifier - case unknown(String) - - public var rawValue: String { - switch self { - case .gameCenterDetail: return "gameCenterDetail" - case .gameCenterGroup: return "gameCenterGroup" - case .gameCenterLeaderboards: return "gameCenterLeaderboards" - case .groupLeaderboardSet: return "groupLeaderboardSet" - case .localizations: return "localizations" - case .referenceName: return "referenceName" - case .releases: return "releases" - case .vendorIdentifier: return "vendorIdentifier" - case .unknown(let rawValue): return rawValue - } + public struct GameCenterLeaderboardSets: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var gameCenterDetail: Self { + .init(rawValue: "gameCenterDetail") } + public static var gameCenterGroup: Self { + .init(rawValue: "gameCenterGroup") + } + + public static var gameCenterLeaderboards: Self { + .init(rawValue: "gameCenterLeaderboards") + } + + public static var groupLeaderboardSet: Self { + .init(rawValue: "groupLeaderboardSet") + } + + public static var localizations: Self { + .init(rawValue: "localizations") + } + + public static var referenceName: Self { + .init(rawValue: "referenceName") + } + + public static var releases: Self { + .init(rawValue: "releases") + } + + public static var vendorIdentifier: Self { + .init(rawValue: "vendorIdentifier") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "gameCenterDetail": self = .gameCenterDetail - case "gameCenterGroup": self = .gameCenterGroup - case "gameCenterLeaderboards": self = .gameCenterLeaderboards - case "groupLeaderboardSet": self = .groupLeaderboardSet - case "localizations": self = .localizations - case "referenceName": self = .referenceName - case "releases": self = .releases - case "vendorIdentifier": self = .vendorIdentifier - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum GameCenterLeaderboards: Hashable, Codable, RawRepresentable { - case archived - case defaultFormatter - case gameCenterDetail - case gameCenterGroup - case gameCenterLeaderboardSets - case groupLeaderboard - case localizations - case recurrenceDuration - case recurrenceRule - case recurrenceStartDate - case referenceName - case releases - case scoreRangeEnd - case scoreRangeStart - case scoreSortType - case submissionType - case vendorIdentifier - case unknown(String) - - public var rawValue: String { - switch self { - case .archived: return "archived" - case .defaultFormatter: return "defaultFormatter" - case .gameCenterDetail: return "gameCenterDetail" - case .gameCenterGroup: return "gameCenterGroup" - case .gameCenterLeaderboardSets: return "gameCenterLeaderboardSets" - case .groupLeaderboard: return "groupLeaderboard" - case .localizations: return "localizations" - case .recurrenceDuration: return "recurrenceDuration" - case .recurrenceRule: return "recurrenceRule" - case .recurrenceStartDate: return "recurrenceStartDate" - case .referenceName: return "referenceName" - case .releases: return "releases" - case .scoreRangeEnd: return "scoreRangeEnd" - case .scoreRangeStart: return "scoreRangeStart" - case .scoreSortType: return "scoreSortType" - case .submissionType: return "submissionType" - case .vendorIdentifier: return "vendorIdentifier" - case .unknown(let rawValue): return rawValue - } + public struct GameCenterLeaderboards: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var activity: Self { + .init(rawValue: "activity") + } + + public static var activityProperties: Self { + .init(rawValue: "activityProperties") + } + + public static var archived: Self { + .init(rawValue: "archived") + } + + public static var challenge: Self { + .init(rawValue: "challenge") + } + + public static var defaultFormatter: Self { + .init(rawValue: "defaultFormatter") + } + + public static var gameCenterDetail: Self { + .init(rawValue: "gameCenterDetail") + } + + public static var gameCenterGroup: Self { + .init(rawValue: "gameCenterGroup") + } + + public static var gameCenterLeaderboardSets: Self { + .init(rawValue: "gameCenterLeaderboardSets") + } + + public static var groupLeaderboard: Self { + .init(rawValue: "groupLeaderboard") + } + + public static var localizations: Self { + .init(rawValue: "localizations") + } + + public static var recurrenceDuration: Self { + .init(rawValue: "recurrenceDuration") + } + + public static var recurrenceRule: Self { + .init(rawValue: "recurrenceRule") + } + + public static var recurrenceStartDate: Self { + .init(rawValue: "recurrenceStartDate") + } + + public static var referenceName: Self { + .init(rawValue: "referenceName") + } + + public static var releases: Self { + .init(rawValue: "releases") + } + + public static var scoreRangeEnd: Self { + .init(rawValue: "scoreRangeEnd") + } + + public static var scoreRangeStart: Self { + .init(rawValue: "scoreRangeStart") } + public static var scoreSortType: Self { + .init(rawValue: "scoreSortType") + } + + public static var submissionType: Self { + .init(rawValue: "submissionType") + } + + public static var vendorIdentifier: Self { + .init(rawValue: "vendorIdentifier") + } + + public static var visibility: Self { + .init(rawValue: "visibility") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "archived": self = .archived - case "defaultFormatter": self = .defaultFormatter - case "gameCenterDetail": self = .gameCenterDetail - case "gameCenterGroup": self = .gameCenterGroup - case "gameCenterLeaderboardSets": self = .gameCenterLeaderboardSets - case "groupLeaderboard": self = .groupLeaderboard - case "localizations": self = .localizations - case "recurrenceDuration": self = .recurrenceDuration - case "recurrenceRule": self = .recurrenceRule - case "recurrenceStartDate": self = .recurrenceStartDate - case "referenceName": self = .referenceName - case "releases": self = .releases - case "scoreRangeEnd": self = .scoreRangeEnd - case "scoreRangeStart": self = .scoreRangeStart - case "scoreSortType": self = .scoreSortType - case "submissionType": self = .submissionType - case "vendorIdentifier": self = .vendorIdentifier - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } public struct Relation: Hashable { + /// the fields to include for returned resources of type gameCenterActivities + public static var gameCenterActivities: Relation<[GameCenterActivities]?> { + .init(key: "fields[gameCenterActivities]") + } + + /// the fields to include for returned resources of type gameCenterChallenges + public static var gameCenterChallenges: Relation<[GameCenterChallenges]?> { + .init(key: "fields[gameCenterChallenges]") + } + /// the fields to include for returned resources of type gameCenterDetails public static var gameCenterDetails: Relation<[GameCenterDetails]?> { .init(key: "fields[gameCenterDetails]") @@ -442,37 +653,47 @@ extension V1.GameCenterDetails.ById.GameCenterLeaderboards.GET { } } - public enum Include: Hashable, Codable, RawRepresentable { - case gameCenterDetail - case gameCenterGroup - case gameCenterLeaderboardSets - case groupLeaderboard - case localizations - case releases - case unknown(String) - - public var rawValue: String { - switch self { - case .gameCenterDetail: return "gameCenterDetail" - case .gameCenterGroup: return "gameCenterGroup" - case .gameCenterLeaderboardSets: return "gameCenterLeaderboardSets" - case .groupLeaderboard: return "groupLeaderboard" - case .localizations: return "localizations" - case .releases: return "releases" - case .unknown(let rawValue): return rawValue - } + public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var activity: Self { + .init(rawValue: "activity") + } + + public static var challenge: Self { + .init(rawValue: "challenge") } + public static var gameCenterDetail: Self { + .init(rawValue: "gameCenterDetail") + } + + public static var gameCenterGroup: Self { + .init(rawValue: "gameCenterGroup") + } + + public static var gameCenterLeaderboardSets: Self { + .init(rawValue: "gameCenterLeaderboardSets") + } + + public static var groupLeaderboard: Self { + .init(rawValue: "groupLeaderboard") + } + + public static var localizations: Self { + .init(rawValue: "localizations") + } + + public static var releases: Self { + .init(rawValue: "releases") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "gameCenterDetail": self = .gameCenterDetail - case "gameCenterGroup": self = .gameCenterGroup - case "gameCenterLeaderboardSets": self = .gameCenterLeaderboardSets - case "groupLeaderboard": self = .groupLeaderboard - case "localizations": self = .localizations - case "releases": self = .releases - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterDetails/ById/LeaderboardReleases/GameCenterDetailsByIdLeaderboardReleases.GET.47d956f.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterDetails/ById/LeaderboardReleases/GameCenterDetailsByIdLeaderboardReleases.GET.47d956f.generated.swift index ec2f5857..90c47d10 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterDetails/ById/LeaderboardReleases/GameCenterDetailsByIdLeaderboardReleases.GET.47d956f.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterDetails/ById/LeaderboardReleases/GameCenterDetailsByIdLeaderboardReleases.GET.47d956f.generated.swift @@ -54,8 +54,10 @@ extension V1.GameCenterDetails.ById.LeaderboardReleases { /// - Returns: **200**, List of GameCenterLeaderboardReleases as `GameCenterLeaderboardReleasesResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -69,12 +71,18 @@ extension V1.GameCenterDetails.ById.LeaderboardReleases { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 404: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -102,150 +110,207 @@ extension V1.GameCenterDetails.ById.LeaderboardReleases.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum GameCenterDetails: Hashable, Codable, RawRepresentable { - case achievementReleases - case app - case arcadeEnabled - case challengeEnabled - case defaultGroupLeaderboard - case defaultLeaderboard - case gameCenterAchievements - case gameCenterAppVersions - case gameCenterGroup - case gameCenterLeaderboardSets - case gameCenterLeaderboards - case leaderboardReleases - case leaderboardSetReleases - case unknown(String) - - public var rawValue: String { - switch self { - case .achievementReleases: return "achievementReleases" - case .app: return "app" - case .arcadeEnabled: return "arcadeEnabled" - case .challengeEnabled: return "challengeEnabled" - case .defaultGroupLeaderboard: return "defaultGroupLeaderboard" - case .defaultLeaderboard: return "defaultLeaderboard" - case .gameCenterAchievements: return "gameCenterAchievements" - case .gameCenterAppVersions: return "gameCenterAppVersions" - case .gameCenterGroup: return "gameCenterGroup" - case .gameCenterLeaderboardSets: return "gameCenterLeaderboardSets" - case .gameCenterLeaderboards: return "gameCenterLeaderboards" - case .leaderboardReleases: return "leaderboardReleases" - case .leaderboardSetReleases: return "leaderboardSetReleases" - case .unknown(let rawValue): return rawValue - } + public struct GameCenterDetails: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var achievementReleases: Self { + .init(rawValue: "achievementReleases") + } + + public static var activityReleases: Self { + .init(rawValue: "activityReleases") + } + + public static var app: Self { + .init(rawValue: "app") + } + + public static var arcadeEnabled: Self { + .init(rawValue: "arcadeEnabled") + } + + public static var challengeEnabled: Self { + .init(rawValue: "challengeEnabled") + } + + public static var challengeReleases: Self { + .init(rawValue: "challengeReleases") + } + + public static var challengesMinimumPlatformVersions: Self { + .init(rawValue: "challengesMinimumPlatformVersions") + } + + public static var defaultGroupLeaderboard: Self { + .init(rawValue: "defaultGroupLeaderboard") + } + + public static var defaultLeaderboard: Self { + .init(rawValue: "defaultLeaderboard") + } + + public static var gameCenterAchievements: Self { + .init(rawValue: "gameCenterAchievements") + } + + public static var gameCenterActivities: Self { + .init(rawValue: "gameCenterActivities") } + public static var gameCenterAppVersions: Self { + .init(rawValue: "gameCenterAppVersions") + } + + public static var gameCenterChallenges: Self { + .init(rawValue: "gameCenterChallenges") + } + + public static var gameCenterGroup: Self { + .init(rawValue: "gameCenterGroup") + } + + public static var gameCenterLeaderboardSets: Self { + .init(rawValue: "gameCenterLeaderboardSets") + } + + public static var gameCenterLeaderboards: Self { + .init(rawValue: "gameCenterLeaderboards") + } + + public static var leaderboardReleases: Self { + .init(rawValue: "leaderboardReleases") + } + + public static var leaderboardSetReleases: Self { + .init(rawValue: "leaderboardSetReleases") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "achievementReleases": self = .achievementReleases - case "app": self = .app - case "arcadeEnabled": self = .arcadeEnabled - case "challengeEnabled": self = .challengeEnabled - case "defaultGroupLeaderboard": self = .defaultGroupLeaderboard - case "defaultLeaderboard": self = .defaultLeaderboard - case "gameCenterAchievements": self = .gameCenterAchievements - case "gameCenterAppVersions": self = .gameCenterAppVersions - case "gameCenterGroup": self = .gameCenterGroup - case "gameCenterLeaderboardSets": self = .gameCenterLeaderboardSets - case "gameCenterLeaderboards": self = .gameCenterLeaderboards - case "leaderboardReleases": self = .leaderboardReleases - case "leaderboardSetReleases": self = .leaderboardSetReleases - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum GameCenterLeaderboardReleases: Hashable, Codable, RawRepresentable { - case gameCenterDetail - case gameCenterLeaderboard - case live - case unknown(String) + public struct GameCenterLeaderboardReleases: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var gameCenterDetail: Self { + .init(rawValue: "gameCenterDetail") + } + + public static var gameCenterLeaderboard: Self { + .init(rawValue: "gameCenterLeaderboard") + } + + public static var live: Self { + .init(rawValue: "live") + } - public var rawValue: String { - switch self { - case .gameCenterDetail: return "gameCenterDetail" - case .gameCenterLeaderboard: return "gameCenterLeaderboard" - case .live: return "live" - case .unknown(let rawValue): return rawValue - } + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "gameCenterDetail": self = .gameCenterDetail - case "gameCenterLeaderboard": self = .gameCenterLeaderboard - case "live": self = .live - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum GameCenterLeaderboards: Hashable, Codable, RawRepresentable { - case archived - case defaultFormatter - case gameCenterDetail - case gameCenterGroup - case gameCenterLeaderboardSets - case groupLeaderboard - case localizations - case recurrenceDuration - case recurrenceRule - case recurrenceStartDate - case referenceName - case releases - case scoreRangeEnd - case scoreRangeStart - case scoreSortType - case submissionType - case vendorIdentifier - case unknown(String) - - public var rawValue: String { - switch self { - case .archived: return "archived" - case .defaultFormatter: return "defaultFormatter" - case .gameCenterDetail: return "gameCenterDetail" - case .gameCenterGroup: return "gameCenterGroup" - case .gameCenterLeaderboardSets: return "gameCenterLeaderboardSets" - case .groupLeaderboard: return "groupLeaderboard" - case .localizations: return "localizations" - case .recurrenceDuration: return "recurrenceDuration" - case .recurrenceRule: return "recurrenceRule" - case .recurrenceStartDate: return "recurrenceStartDate" - case .referenceName: return "referenceName" - case .releases: return "releases" - case .scoreRangeEnd: return "scoreRangeEnd" - case .scoreRangeStart: return "scoreRangeStart" - case .scoreSortType: return "scoreSortType" - case .submissionType: return "submissionType" - case .vendorIdentifier: return "vendorIdentifier" - case .unknown(let rawValue): return rawValue - } + public struct GameCenterLeaderboards: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var activity: Self { + .init(rawValue: "activity") + } + + public static var activityProperties: Self { + .init(rawValue: "activityProperties") + } + + public static var archived: Self { + .init(rawValue: "archived") + } + + public static var challenge: Self { + .init(rawValue: "challenge") + } + + public static var defaultFormatter: Self { + .init(rawValue: "defaultFormatter") + } + + public static var gameCenterDetail: Self { + .init(rawValue: "gameCenterDetail") + } + + public static var gameCenterGroup: Self { + .init(rawValue: "gameCenterGroup") + } + + public static var gameCenterLeaderboardSets: Self { + .init(rawValue: "gameCenterLeaderboardSets") + } + + public static var groupLeaderboard: Self { + .init(rawValue: "groupLeaderboard") + } + + public static var localizations: Self { + .init(rawValue: "localizations") + } + + public static var recurrenceDuration: Self { + .init(rawValue: "recurrenceDuration") + } + + public static var recurrenceRule: Self { + .init(rawValue: "recurrenceRule") + } + + public static var recurrenceStartDate: Self { + .init(rawValue: "recurrenceStartDate") + } + + public static var referenceName: Self { + .init(rawValue: "referenceName") + } + + public static var releases: Self { + .init(rawValue: "releases") + } + + public static var scoreRangeEnd: Self { + .init(rawValue: "scoreRangeEnd") + } + + public static var scoreRangeStart: Self { + .init(rawValue: "scoreRangeStart") + } + + public static var scoreSortType: Self { + .init(rawValue: "scoreSortType") + } + + public static var submissionType: Self { + .init(rawValue: "submissionType") + } + + public static var vendorIdentifier: Self { + .init(rawValue: "vendorIdentifier") + } + + public static var visibility: Self { + .init(rawValue: "visibility") } + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "archived": self = .archived - case "defaultFormatter": self = .defaultFormatter - case "gameCenterDetail": self = .gameCenterDetail - case "gameCenterGroup": self = .gameCenterGroup - case "gameCenterLeaderboardSets": self = .gameCenterLeaderboardSets - case "groupLeaderboard": self = .groupLeaderboard - case "localizations": self = .localizations - case "recurrenceDuration": self = .recurrenceDuration - case "recurrenceRule": self = .recurrenceRule - case "recurrenceStartDate": self = .recurrenceStartDate - case "referenceName": self = .referenceName - case "releases": self = .releases - case "scoreRangeEnd": self = .scoreRangeEnd - case "scoreRangeStart": self = .scoreRangeStart - case "scoreSortType": self = .scoreSortType - case "submissionType": self = .submissionType - case "vendorIdentifier": self = .vendorIdentifier - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } @@ -300,25 +365,23 @@ extension V1.GameCenterDetails.ById.LeaderboardReleases.GET { } } - public enum Include: Hashable, Codable, RawRepresentable { - case gameCenterDetail - case gameCenterLeaderboard - case unknown(String) + public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var gameCenterDetail: Self { + .init(rawValue: "gameCenterDetail") + } - public var rawValue: String { - switch self { - case .gameCenterDetail: return "gameCenterDetail" - case .gameCenterLeaderboard: return "gameCenterLeaderboard" - case .unknown(let rawValue): return rawValue - } + public static var gameCenterLeaderboard: Self { + .init(rawValue: "gameCenterLeaderboard") + } + + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "gameCenterDetail": self = .gameCenterDetail - case "gameCenterLeaderboard": self = .gameCenterLeaderboard - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterDetails/ById/LeaderboardSetReleases/GameCenterDetailsByIdLeaderboardSetReleases.GET.e2b4917.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterDetails/ById/LeaderboardSetReleases/GameCenterDetailsByIdLeaderboardSetReleases.GET.e2b4917.generated.swift index 66294b69..b85b84d6 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterDetails/ById/LeaderboardSetReleases/GameCenterDetailsByIdLeaderboardSetReleases.GET.e2b4917.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterDetails/ById/LeaderboardSetReleases/GameCenterDetailsByIdLeaderboardSetReleases.GET.e2b4917.generated.swift @@ -54,8 +54,10 @@ extension V1.GameCenterDetails.ById.LeaderboardSetReleases { /// - Returns: **200**, List of GameCenterLeaderboardSetReleases as `GameCenterLeaderboardSetReleasesResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -69,12 +71,18 @@ extension V1.GameCenterDetails.ById.LeaderboardSetReleases { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 404: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -102,123 +110,155 @@ extension V1.GameCenterDetails.ById.LeaderboardSetReleases.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum GameCenterDetails: Hashable, Codable, RawRepresentable { - case achievementReleases - case app - case arcadeEnabled - case challengeEnabled - case defaultGroupLeaderboard - case defaultLeaderboard - case gameCenterAchievements - case gameCenterAppVersions - case gameCenterGroup - case gameCenterLeaderboardSets - case gameCenterLeaderboards - case leaderboardReleases - case leaderboardSetReleases - case unknown(String) - - public var rawValue: String { - switch self { - case .achievementReleases: return "achievementReleases" - case .app: return "app" - case .arcadeEnabled: return "arcadeEnabled" - case .challengeEnabled: return "challengeEnabled" - case .defaultGroupLeaderboard: return "defaultGroupLeaderboard" - case .defaultLeaderboard: return "defaultLeaderboard" - case .gameCenterAchievements: return "gameCenterAchievements" - case .gameCenterAppVersions: return "gameCenterAppVersions" - case .gameCenterGroup: return "gameCenterGroup" - case .gameCenterLeaderboardSets: return "gameCenterLeaderboardSets" - case .gameCenterLeaderboards: return "gameCenterLeaderboards" - case .leaderboardReleases: return "leaderboardReleases" - case .leaderboardSetReleases: return "leaderboardSetReleases" - case .unknown(let rawValue): return rawValue - } + public struct GameCenterDetails: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var achievementReleases: Self { + .init(rawValue: "achievementReleases") + } + + public static var activityReleases: Self { + .init(rawValue: "activityReleases") + } + + public static var app: Self { + .init(rawValue: "app") + } + + public static var arcadeEnabled: Self { + .init(rawValue: "arcadeEnabled") + } + + public static var challengeEnabled: Self { + .init(rawValue: "challengeEnabled") + } + + public static var challengeReleases: Self { + .init(rawValue: "challengeReleases") + } + + public static var challengesMinimumPlatformVersions: Self { + .init(rawValue: "challengesMinimumPlatformVersions") + } + + public static var defaultGroupLeaderboard: Self { + .init(rawValue: "defaultGroupLeaderboard") + } + + public static var defaultLeaderboard: Self { + .init(rawValue: "defaultLeaderboard") + } + + public static var gameCenterAchievements: Self { + .init(rawValue: "gameCenterAchievements") + } + + public static var gameCenterActivities: Self { + .init(rawValue: "gameCenterActivities") + } + + public static var gameCenterAppVersions: Self { + .init(rawValue: "gameCenterAppVersions") + } + + public static var gameCenterChallenges: Self { + .init(rawValue: "gameCenterChallenges") + } + + public static var gameCenterGroup: Self { + .init(rawValue: "gameCenterGroup") + } + + public static var gameCenterLeaderboardSets: Self { + .init(rawValue: "gameCenterLeaderboardSets") + } + + public static var gameCenterLeaderboards: Self { + .init(rawValue: "gameCenterLeaderboards") + } + + public static var leaderboardReleases: Self { + .init(rawValue: "leaderboardReleases") + } + + public static var leaderboardSetReleases: Self { + .init(rawValue: "leaderboardSetReleases") + } + + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "achievementReleases": self = .achievementReleases - case "app": self = .app - case "arcadeEnabled": self = .arcadeEnabled - case "challengeEnabled": self = .challengeEnabled - case "defaultGroupLeaderboard": self = .defaultGroupLeaderboard - case "defaultLeaderboard": self = .defaultLeaderboard - case "gameCenterAchievements": self = .gameCenterAchievements - case "gameCenterAppVersions": self = .gameCenterAppVersions - case "gameCenterGroup": self = .gameCenterGroup - case "gameCenterLeaderboardSets": self = .gameCenterLeaderboardSets - case "gameCenterLeaderboards": self = .gameCenterLeaderboards - case "leaderboardReleases": self = .leaderboardReleases - case "leaderboardSetReleases": self = .leaderboardSetReleases - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum GameCenterLeaderboardSetReleases: Hashable, Codable, RawRepresentable { - case gameCenterDetail - case gameCenterLeaderboardSet - case live - case unknown(String) + public struct GameCenterLeaderboardSetReleases: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var gameCenterDetail: Self { + .init(rawValue: "gameCenterDetail") + } + + public static var gameCenterLeaderboardSet: Self { + .init(rawValue: "gameCenterLeaderboardSet") + } + + public static var live: Self { + .init(rawValue: "live") + } - public var rawValue: String { - switch self { - case .gameCenterDetail: return "gameCenterDetail" - case .gameCenterLeaderboardSet: return "gameCenterLeaderboardSet" - case .live: return "live" - case .unknown(let rawValue): return rawValue - } + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "gameCenterDetail": self = .gameCenterDetail - case "gameCenterLeaderboardSet": self = .gameCenterLeaderboardSet - case "live": self = .live - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum GameCenterLeaderboardSets: Hashable, Codable, RawRepresentable { - case gameCenterDetail - case gameCenterGroup - case gameCenterLeaderboards - case groupLeaderboardSet - case localizations - case referenceName - case releases - case vendorIdentifier - case unknown(String) - - public var rawValue: String { - switch self { - case .gameCenterDetail: return "gameCenterDetail" - case .gameCenterGroup: return "gameCenterGroup" - case .gameCenterLeaderboards: return "gameCenterLeaderboards" - case .groupLeaderboardSet: return "groupLeaderboardSet" - case .localizations: return "localizations" - case .referenceName: return "referenceName" - case .releases: return "releases" - case .vendorIdentifier: return "vendorIdentifier" - case .unknown(let rawValue): return rawValue - } + public struct GameCenterLeaderboardSets: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var gameCenterDetail: Self { + .init(rawValue: "gameCenterDetail") + } + + public static var gameCenterGroup: Self { + .init(rawValue: "gameCenterGroup") + } + + public static var gameCenterLeaderboards: Self { + .init(rawValue: "gameCenterLeaderboards") + } + + public static var groupLeaderboardSet: Self { + .init(rawValue: "groupLeaderboardSet") } + public static var localizations: Self { + .init(rawValue: "localizations") + } + + public static var referenceName: Self { + .init(rawValue: "referenceName") + } + + public static var releases: Self { + .init(rawValue: "releases") + } + + public static var vendorIdentifier: Self { + .init(rawValue: "vendorIdentifier") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "gameCenterDetail": self = .gameCenterDetail - case "gameCenterGroup": self = .gameCenterGroup - case "gameCenterLeaderboards": self = .gameCenterLeaderboards - case "groupLeaderboardSet": self = .groupLeaderboardSet - case "localizations": self = .localizations - case "referenceName": self = .referenceName - case "releases": self = .releases - case "vendorIdentifier": self = .vendorIdentifier - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } @@ -273,25 +313,23 @@ extension V1.GameCenterDetails.ById.LeaderboardSetReleases.GET { } } - public enum Include: Hashable, Codable, RawRepresentable { - case gameCenterDetail - case gameCenterLeaderboardSet - case unknown(String) + public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var gameCenterDetail: Self { + .init(rawValue: "gameCenterDetail") + } - public var rawValue: String { - switch self { - case .gameCenterDetail: return "gameCenterDetail" - case .gameCenterLeaderboardSet: return "gameCenterLeaderboardSet" - case .unknown(let rawValue): return rawValue - } + public static var gameCenterLeaderboardSet: Self { + .init(rawValue: "gameCenterLeaderboardSet") } + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "gameCenterDetail": self = .gameCenterDetail - case "gameCenterLeaderboardSet": self = .gameCenterLeaderboardSet - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterDetails/ById/Metrics/ClassicMatchmakingRequests/GameCenterDetailsByIdMetricsClassicMatchmakingRequests.GET.7b8b3ec.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterDetails/ById/Metrics/ClassicMatchmakingRequests/GameCenterDetailsByIdMetricsClassicMatchmakingRequests.GET.7b8b3ec.generated.swift index e047555a..818fcb2b 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterDetails/ById/Metrics/ClassicMatchmakingRequests/GameCenterDetailsByIdMetricsClassicMatchmakingRequests.GET.7b8b3ec.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterDetails/ById/Metrics/ClassicMatchmakingRequests/GameCenterDetailsByIdMetricsClassicMatchmakingRequests.GET.7b8b3ec.generated.swift @@ -31,7 +31,7 @@ extension V1.GameCenterDetails.ById.Metrics.ClassicMatchmakingRequests { URLQueryItem(name: "filter[result]", value: parameters.filter[.result].map { "\($0)" }), URLQueryItem(name: "granularity", - value: parameters.granularity.map { "\($0)" }.joined(separator: ",")), + value: parameters.granularity.map { "\($0)" }), URLQueryItem(name: "groupBy", value: parameters.groupBy?.map { "\($0)" }.joined(separator: ",")), URLQueryItem(name: "limit", @@ -50,8 +50,10 @@ extension V1.GameCenterDetails.ById.Metrics.ClassicMatchmakingRequests { /// - Returns: **200**, Metrics data response as `GameCenterMatchmakingAppRequestsV1MetricResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -65,12 +67,18 @@ extension V1.GameCenterDetails.ById.Metrics.ClassicMatchmakingRequests { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 404: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -83,7 +91,7 @@ extension V1.GameCenterDetails.ById.Metrics.ClassicMatchmakingRequests.GET { public var filter: Filter = Filter() /// the granularity of the per-group dataset - public var granularity: [Granularity] = [] + public var granularity: Granularity? /// the dimension by which to group the results public var groupBy: [GroupBy]? @@ -102,28 +110,27 @@ extension V1.GameCenterDetails.ById.Metrics.ClassicMatchmakingRequests.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum Result: Hashable, Codable, RawRepresentable { - case canceled - case expired - case matched - case unknown(String) - - public var rawValue: String { - switch self { - case .canceled: return "CANCELED" - case .expired: return "EXPIRED" - case .matched: return "MATCHED" - case .unknown(let rawValue): return rawValue - } + public struct Result: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var canceled: Self { + .init(rawValue: "CANCELED") + } + + public static var expired: Self { + .init(rawValue: "EXPIRED") } + public static var matched: Self { + .init(rawValue: "MATCHED") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "CANCELED": self = .canceled - case "EXPIRED": self = .expired - case "MATCHED": self = .matched - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } @@ -141,87 +148,87 @@ extension V1.GameCenterDetails.ById.Metrics.ClassicMatchmakingRequests.GET { } } - public enum Granularity: Hashable, Codable, RawRepresentable { - case p1D - case pT15M - case pT1H - case unknown(String) - - public var rawValue: String { - switch self { - case .p1D: return "P1D" - case .pT15M: return "PT15M" - case .pT1H: return "PT1H" - case .unknown(let rawValue): return rawValue - } + public struct Granularity: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var p1D: Self { + .init(rawValue: "P1D") + } + + public static var pT15M: Self { + .init(rawValue: "PT15M") } + public static var pT1H: Self { + .init(rawValue: "PT1H") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "P1D": self = .p1D - case "PT15M": self = .pT15M - case "PT1H": self = .pT1H - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum GroupBy: Hashable, Codable, RawRepresentable { - case result - case unknown(String) + public struct GroupBy: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var result: Self { + .init(rawValue: "result") + } - public var rawValue: String { - switch self { - case .result: return "result" - case .unknown(let rawValue): return rawValue - } + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "result": self = .result - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum Sort: Hashable, Codable, RawRepresentable { - case averageSecondsInQueue - case averageSecondsInQueueDesc - case count - case countDesc - case p50SecondsInQueue - case p50SecondsInQueueDesc - case p95SecondsInQueue - case p95SecondsInQueueDesc - case unknown(String) - - public var rawValue: String { - switch self { - case .averageSecondsInQueue: return "averageSecondsInQueue" - case .averageSecondsInQueueDesc: return "-averageSecondsInQueue" - case .count: return "count" - case .countDesc: return "-count" - case .p50SecondsInQueue: return "p50SecondsInQueue" - case .p50SecondsInQueueDesc: return "-p50SecondsInQueue" - case .p95SecondsInQueue: return "p95SecondsInQueue" - case .p95SecondsInQueueDesc: return "-p95SecondsInQueue" - case .unknown(let rawValue): return rawValue - } + public struct Sort: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var averageSecondsInQueue: Self { + .init(rawValue: "averageSecondsInQueue") + } + + public static var averageSecondsInQueueDesc: Self { + .init(rawValue: "-averageSecondsInQueue") + } + + public static var count: Self { + .init(rawValue: "count") + } + + public static var countDesc: Self { + .init(rawValue: "-count") + } + + public static var p50SecondsInQueue: Self { + .init(rawValue: "p50SecondsInQueue") } + public static var p50SecondsInQueueDesc: Self { + .init(rawValue: "-p50SecondsInQueue") + } + + public static var p95SecondsInQueue: Self { + .init(rawValue: "p95SecondsInQueue") + } + + public static var p95SecondsInQueueDesc: Self { + .init(rawValue: "-p95SecondsInQueue") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "averageSecondsInQueue": self = .averageSecondsInQueue - case "-averageSecondsInQueue": self = .averageSecondsInQueueDesc - case "count": self = .count - case "-count": self = .countDesc - case "p50SecondsInQueue": self = .p50SecondsInQueue - case "-p50SecondsInQueue": self = .p50SecondsInQueueDesc - case "p95SecondsInQueue": self = .p95SecondsInQueue - case "-p95SecondsInQueue": self = .p95SecondsInQueueDesc - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterDetails/ById/Metrics/RuleBasedMatchmakingRequests/GameCenterDetailsByIdMetricsRuleBasedMatchmakingRequests.GET.d03d7a2.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterDetails/ById/Metrics/RuleBasedMatchmakingRequests/GameCenterDetailsByIdMetricsRuleBasedMatchmakingRequests.GET.d03d7a2.generated.swift index 1809f27d..5694036e 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterDetails/ById/Metrics/RuleBasedMatchmakingRequests/GameCenterDetailsByIdMetricsRuleBasedMatchmakingRequests.GET.d03d7a2.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterDetails/ById/Metrics/RuleBasedMatchmakingRequests/GameCenterDetailsByIdMetricsRuleBasedMatchmakingRequests.GET.d03d7a2.generated.swift @@ -31,7 +31,7 @@ extension V1.GameCenterDetails.ById.Metrics.RuleBasedMatchmakingRequests { URLQueryItem(name: "filter[result]", value: parameters.filter[.result].map { "\($0)" }), URLQueryItem(name: "granularity", - value: parameters.granularity.map { "\($0)" }.joined(separator: ",")), + value: parameters.granularity.map { "\($0)" }), URLQueryItem(name: "groupBy", value: parameters.groupBy?.map { "\($0)" }.joined(separator: ",")), URLQueryItem(name: "limit", @@ -50,8 +50,10 @@ extension V1.GameCenterDetails.ById.Metrics.RuleBasedMatchmakingRequests { /// - Returns: **200**, Metrics data response as `GameCenterMatchmakingAppRequestsV1MetricResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -65,12 +67,18 @@ extension V1.GameCenterDetails.ById.Metrics.RuleBasedMatchmakingRequests { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 404: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -83,7 +91,7 @@ extension V1.GameCenterDetails.ById.Metrics.RuleBasedMatchmakingRequests.GET { public var filter: Filter = Filter() /// the granularity of the per-group dataset - public var granularity: [Granularity] = [] + public var granularity: Granularity? /// the dimension by which to group the results public var groupBy: [GroupBy]? @@ -102,28 +110,27 @@ extension V1.GameCenterDetails.ById.Metrics.RuleBasedMatchmakingRequests.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum Result: Hashable, Codable, RawRepresentable { - case canceled - case expired - case matched - case unknown(String) - - public var rawValue: String { - switch self { - case .canceled: return "CANCELED" - case .expired: return "EXPIRED" - case .matched: return "MATCHED" - case .unknown(let rawValue): return rawValue - } + public struct Result: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var canceled: Self { + .init(rawValue: "CANCELED") + } + + public static var expired: Self { + .init(rawValue: "EXPIRED") } + public static var matched: Self { + .init(rawValue: "MATCHED") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "CANCELED": self = .canceled - case "EXPIRED": self = .expired - case "MATCHED": self = .matched - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } @@ -141,87 +148,87 @@ extension V1.GameCenterDetails.ById.Metrics.RuleBasedMatchmakingRequests.GET { } } - public enum Granularity: Hashable, Codable, RawRepresentable { - case p1D - case pT15M - case pT1H - case unknown(String) - - public var rawValue: String { - switch self { - case .p1D: return "P1D" - case .pT15M: return "PT15M" - case .pT1H: return "PT1H" - case .unknown(let rawValue): return rawValue - } + public struct Granularity: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var p1D: Self { + .init(rawValue: "P1D") + } + + public static var pT15M: Self { + .init(rawValue: "PT15M") } + public static var pT1H: Self { + .init(rawValue: "PT1H") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "P1D": self = .p1D - case "PT15M": self = .pT15M - case "PT1H": self = .pT1H - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum GroupBy: Hashable, Codable, RawRepresentable { - case result - case unknown(String) + public struct GroupBy: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var result: Self { + .init(rawValue: "result") + } - public var rawValue: String { - switch self { - case .result: return "result" - case .unknown(let rawValue): return rawValue - } + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "result": self = .result - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum Sort: Hashable, Codable, RawRepresentable { - case averageSecondsInQueue - case averageSecondsInQueueDesc - case count - case countDesc - case p50SecondsInQueue - case p50SecondsInQueueDesc - case p95SecondsInQueue - case p95SecondsInQueueDesc - case unknown(String) - - public var rawValue: String { - switch self { - case .averageSecondsInQueue: return "averageSecondsInQueue" - case .averageSecondsInQueueDesc: return "-averageSecondsInQueue" - case .count: return "count" - case .countDesc: return "-count" - case .p50SecondsInQueue: return "p50SecondsInQueue" - case .p50SecondsInQueueDesc: return "-p50SecondsInQueue" - case .p95SecondsInQueue: return "p95SecondsInQueue" - case .p95SecondsInQueueDesc: return "-p95SecondsInQueue" - case .unknown(let rawValue): return rawValue - } + public struct Sort: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var averageSecondsInQueue: Self { + .init(rawValue: "averageSecondsInQueue") + } + + public static var averageSecondsInQueueDesc: Self { + .init(rawValue: "-averageSecondsInQueue") + } + + public static var count: Self { + .init(rawValue: "count") + } + + public static var countDesc: Self { + .init(rawValue: "-count") + } + + public static var p50SecondsInQueue: Self { + .init(rawValue: "p50SecondsInQueue") } + public static var p50SecondsInQueueDesc: Self { + .init(rawValue: "-p50SecondsInQueue") + } + + public static var p95SecondsInQueue: Self { + .init(rawValue: "p95SecondsInQueue") + } + + public static var p95SecondsInQueueDesc: Self { + .init(rawValue: "-p95SecondsInQueue") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "averageSecondsInQueue": self = .averageSecondsInQueue - case "-averageSecondsInQueue": self = .averageSecondsInQueueDesc - case "count": self = .count - case "-count": self = .countDesc - case "p50SecondsInQueue": self = .p50SecondsInQueue - case "-p50SecondsInQueue": self = .p50SecondsInQueueDesc - case "p95SecondsInQueue": self = .p95SecondsInQueue - case "-p95SecondsInQueue": self = .p95SecondsInQueueDesc - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterDetails/ById/Relationships/AchievementReleases/GameCenterDetailsByIdRelationshipsAchievementReleases.GET.ad59285.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterDetails/ById/Relationships/AchievementReleases/GameCenterDetailsByIdRelationshipsAchievementReleases.GET.ad59285.generated.swift new file mode 100644 index 00000000..926f2908 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterDetails/ById/Relationships/AchievementReleases/GameCenterDetailsByIdRelationshipsAchievementReleases.GET.ad59285.generated.swift @@ -0,0 +1,88 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.GameCenterDetails.ById.Relationships.AchievementReleases { + public struct GET: Endpoint { + public typealias Response = GameCenterDetailAchievementReleasesLinkagesResponse + + public var path: String { + "/v1/gameCenterDetails/\(id)/relationships/achievementReleases" + } + + /// the id of the requested resource + public var id: String + + public var parameters: Parameters = Parameters() + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + components?.queryItems = [ + URLQueryItem(name: "limit", + value: parameters.limit.map { "\($0)" }) + ].filter { $0.value != nil } + if components?.queryItems?.isEmpty ?? false { + components?.queryItems = nil + } + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "GET" + return urlRequest + } + + /// - Returns: **200**, List of related linkages as `GameCenterDetailAchievementReleasesLinkagesResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(GameCenterDetailAchievementReleasesLinkagesResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +extension V1.GameCenterDetails.ById.Relationships.AchievementReleases.GET { + public struct Parameters: Hashable { + /// maximum resources per page + public var limit: Int? + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterDetails/ById/Relationships/ActivityReleases/GameCenterDetailsByIdRelationshipsActivityReleases.GET.646dfe2.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterDetails/ById/Relationships/ActivityReleases/GameCenterDetailsByIdRelationshipsActivityReleases.GET.646dfe2.generated.swift new file mode 100644 index 00000000..167345ec --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterDetails/ById/Relationships/ActivityReleases/GameCenterDetailsByIdRelationshipsActivityReleases.GET.646dfe2.generated.swift @@ -0,0 +1,88 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.GameCenterDetails.ById.Relationships.ActivityReleases { + public struct GET: Endpoint { + public typealias Response = GameCenterDetailActivityReleasesLinkagesResponse + + public var path: String { + "/v1/gameCenterDetails/\(id)/relationships/activityReleases" + } + + /// the id of the requested resource + public var id: String + + public var parameters: Parameters = Parameters() + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + components?.queryItems = [ + URLQueryItem(name: "limit", + value: parameters.limit.map { "\($0)" }) + ].filter { $0.value != nil } + if components?.queryItems?.isEmpty ?? false { + components?.queryItems = nil + } + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "GET" + return urlRequest + } + + /// - Returns: **200**, List of related linkages as `GameCenterDetailActivityReleasesLinkagesResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(GameCenterDetailActivityReleasesLinkagesResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +extension V1.GameCenterDetails.ById.Relationships.ActivityReleases.GET { + public struct Parameters: Hashable { + /// maximum resources per page + public var limit: Int? + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterDetails/ById/Relationships/ChallengeReleases/GameCenterDetailsByIdRelationshipsChallengeReleases.GET.870b3e5.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterDetails/ById/Relationships/ChallengeReleases/GameCenterDetailsByIdRelationshipsChallengeReleases.GET.870b3e5.generated.swift new file mode 100644 index 00000000..e810bf11 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterDetails/ById/Relationships/ChallengeReleases/GameCenterDetailsByIdRelationshipsChallengeReleases.GET.870b3e5.generated.swift @@ -0,0 +1,88 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.GameCenterDetails.ById.Relationships.ChallengeReleases { + public struct GET: Endpoint { + public typealias Response = GameCenterDetailChallengeReleasesLinkagesResponse + + public var path: String { + "/v1/gameCenterDetails/\(id)/relationships/challengeReleases" + } + + /// the id of the requested resource + public var id: String + + public var parameters: Parameters = Parameters() + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + components?.queryItems = [ + URLQueryItem(name: "limit", + value: parameters.limit.map { "\($0)" }) + ].filter { $0.value != nil } + if components?.queryItems?.isEmpty ?? false { + components?.queryItems = nil + } + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "GET" + return urlRequest + } + + /// - Returns: **200**, List of related linkages as `GameCenterDetailChallengeReleasesLinkagesResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(GameCenterDetailChallengeReleasesLinkagesResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +extension V1.GameCenterDetails.ById.Relationships.ChallengeReleases.GET { + public struct Parameters: Hashable { + /// maximum resources per page + public var limit: Int? + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterDetails/ById/Relationships/ChallengesMinimumPlatformVersions/GameCenterDetailsByIdRelationshipsChallengesMinimumPlatformVersions.PATCH.269e67e.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterDetails/ById/Relationships/ChallengesMinimumPlatformVersions/GameCenterDetailsByIdRelationshipsChallengesMinimumPlatformVersions.PATCH.269e67e.generated.swift new file mode 100644 index 00000000..4b232c03 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterDetails/ById/Relationships/ChallengesMinimumPlatformVersions/GameCenterDetailsByIdRelationshipsChallengesMinimumPlatformVersions.PATCH.269e67e.generated.swift @@ -0,0 +1,87 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.GameCenterDetails.ById.Relationships.ChallengesMinimumPlatformVersions { + public struct PATCH: Endpoint { + public typealias Parameters = GameCenterDetailChallengesMinimumPlatformVersionsLinkagesRequest + public typealias Response = Void + + public var path: String { + "/v1/gameCenterDetails/\(id)/relationships/challengesMinimumPlatformVersions" + } + + /// the id of the requested resource + public var id: String + + /// List of related linkages + public var parameters: Parameters + + public init( + id: String, + parameters: Parameters + ) { + self.id = id + self.parameters = parameters + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "PATCH" + + var jsonEncoder: JSONEncoder { + let encoder = JSONEncoder() + return encoder + } + + urlRequest?.httpBody = try jsonEncoder.encode(parameters) + urlRequest?.setValue("application/json", forHTTPHeaderField: "Content-Type") + return urlRequest + } + + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **422**, Unprocessable request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 409: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 422: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterDetails/ById/Relationships/GameCenterAchievements/GameCenterDetailsByIdRelationshipsGameCenterAchievements.GET.f55ff27.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterDetails/ById/Relationships/GameCenterAchievements/GameCenterDetailsByIdRelationshipsGameCenterAchievements.GET.f55ff27.generated.swift index 6d8fad83..b3327b46 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterDetails/ById/Relationships/GameCenterAchievements/GameCenterDetailsByIdRelationshipsGameCenterAchievements.GET.f55ff27.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterDetails/ById/Relationships/GameCenterAchievements/GameCenterDetailsByIdRelationshipsGameCenterAchievements.GET.f55ff27.generated.swift @@ -42,8 +42,10 @@ extension V1.GameCenterDetails.ById.Relationships.GameCenterAchievements { /// - Returns: **200**, List of related linkages as `GameCenterDetailGameCenterAchievementsLinkagesResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -57,12 +59,18 @@ extension V1.GameCenterDetails.ById.Relationships.GameCenterAchievements { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 404: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterDetails/ById/Relationships/GameCenterAchievements/GameCenterDetailsByIdRelationshipsGameCenterAchievements.PATCH.f55ff27.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterDetails/ById/Relationships/GameCenterAchievements/GameCenterDetailsByIdRelationshipsGameCenterAchievements.PATCH.f55ff27.generated.swift index 713d1f50..966b9380 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterDetails/ById/Relationships/GameCenterAchievements/GameCenterDetailsByIdRelationshipsGameCenterAchievements.PATCH.f55ff27.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterDetails/ById/Relationships/GameCenterAchievements/GameCenterDetailsByIdRelationshipsGameCenterAchievements.PATCH.f55ff27.generated.swift @@ -46,10 +46,12 @@ extension V1.GameCenterDetails.ById.Relationships.GameCenterAchievements { return urlRequest } - /// - Returns: **204**, Success (no content) + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **422**, Unprocessable request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -57,8 +59,8 @@ extension V1.GameCenterDetails.ById.Relationships.GameCenterAchievements { } switch urlResponse.statusCode { - case 204: - return + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) @@ -69,6 +71,12 @@ extension V1.GameCenterDetails.ById.Relationships.GameCenterAchievements { case 409: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 422: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterDetails/ById/Relationships/GameCenterActivities/GameCenterDetailsByIdRelationshipsGameCenterActivities.GET.4d45542.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterDetails/ById/Relationships/GameCenterActivities/GameCenterDetailsByIdRelationshipsGameCenterActivities.GET.4d45542.generated.swift new file mode 100644 index 00000000..b1c53bb0 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterDetails/ById/Relationships/GameCenterActivities/GameCenterDetailsByIdRelationshipsGameCenterActivities.GET.4d45542.generated.swift @@ -0,0 +1,88 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.GameCenterDetails.ById.Relationships.GameCenterActivities { + public struct GET: Endpoint { + public typealias Response = GameCenterDetailGameCenterActivitiesLinkagesResponse + + public var path: String { + "/v1/gameCenterDetails/\(id)/relationships/gameCenterActivities" + } + + /// the id of the requested resource + public var id: String + + public var parameters: Parameters = Parameters() + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + components?.queryItems = [ + URLQueryItem(name: "limit", + value: parameters.limit.map { "\($0)" }) + ].filter { $0.value != nil } + if components?.queryItems?.isEmpty ?? false { + components?.queryItems = nil + } + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "GET" + return urlRequest + } + + /// - Returns: **200**, List of related linkages as `GameCenterDetailGameCenterActivitiesLinkagesResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(GameCenterDetailGameCenterActivitiesLinkagesResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +extension V1.GameCenterDetails.ById.Relationships.GameCenterActivities.GET { + public struct Parameters: Hashable { + /// maximum resources per page + public var limit: Int? + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterDetails/ById/Relationships/GameCenterAppVersions/GameCenterDetailsByIdRelationshipsGameCenterAppVersions.GET.f4cb3e4.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterDetails/ById/Relationships/GameCenterAppVersions/GameCenterDetailsByIdRelationshipsGameCenterAppVersions.GET.f4cb3e4.generated.swift new file mode 100644 index 00000000..9b56f843 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterDetails/ById/Relationships/GameCenterAppVersions/GameCenterDetailsByIdRelationshipsGameCenterAppVersions.GET.f4cb3e4.generated.swift @@ -0,0 +1,88 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.GameCenterDetails.ById.Relationships.GameCenterAppVersions { + public struct GET: Endpoint { + public typealias Response = GameCenterDetailGameCenterAppVersionsLinkagesResponse + + public var path: String { + "/v1/gameCenterDetails/\(id)/relationships/gameCenterAppVersions" + } + + /// the id of the requested resource + public var id: String + + public var parameters: Parameters = Parameters() + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + components?.queryItems = [ + URLQueryItem(name: "limit", + value: parameters.limit.map { "\($0)" }) + ].filter { $0.value != nil } + if components?.queryItems?.isEmpty ?? false { + components?.queryItems = nil + } + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "GET" + return urlRequest + } + + /// - Returns: **200**, List of related linkages as `GameCenterDetailGameCenterAppVersionsLinkagesResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(GameCenterDetailGameCenterAppVersionsLinkagesResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +extension V1.GameCenterDetails.ById.Relationships.GameCenterAppVersions.GET { + public struct Parameters: Hashable { + /// maximum resources per page + public var limit: Int? + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterDetails/ById/Relationships/GameCenterChallenges/GameCenterDetailsByIdRelationshipsGameCenterChallenges.GET.1bc48c1.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterDetails/ById/Relationships/GameCenterChallenges/GameCenterDetailsByIdRelationshipsGameCenterChallenges.GET.1bc48c1.generated.swift new file mode 100644 index 00000000..6e6ae20c --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterDetails/ById/Relationships/GameCenterChallenges/GameCenterDetailsByIdRelationshipsGameCenterChallenges.GET.1bc48c1.generated.swift @@ -0,0 +1,88 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.GameCenterDetails.ById.Relationships.GameCenterChallenges { + public struct GET: Endpoint { + public typealias Response = GameCenterDetailGameCenterChallengesLinkagesResponse + + public var path: String { + "/v1/gameCenterDetails/\(id)/relationships/gameCenterChallenges" + } + + /// the id of the requested resource + public var id: String + + public var parameters: Parameters = Parameters() + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + components?.queryItems = [ + URLQueryItem(name: "limit", + value: parameters.limit.map { "\($0)" }) + ].filter { $0.value != nil } + if components?.queryItems?.isEmpty ?? false { + components?.queryItems = nil + } + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "GET" + return urlRequest + } + + /// - Returns: **200**, List of related linkages as `GameCenterDetailGameCenterChallengesLinkagesResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(GameCenterDetailGameCenterChallengesLinkagesResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +extension V1.GameCenterDetails.ById.Relationships.GameCenterChallenges.GET { + public struct Parameters: Hashable { + /// maximum resources per page + public var limit: Int? + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterDetails/ById/Relationships/GameCenterGroup/GameCenterDetailsByIdRelationshipsGameCenterGroup.GET.8aa8410.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterDetails/ById/Relationships/GameCenterGroup/GameCenterDetailsByIdRelationshipsGameCenterGroup.GET.8aa8410.generated.swift new file mode 100644 index 00000000..c3ad0cda --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterDetails/ById/Relationships/GameCenterGroup/GameCenterDetailsByIdRelationshipsGameCenterGroup.GET.8aa8410.generated.swift @@ -0,0 +1,86 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.GameCenterDetails.ById.Relationships.GameCenterGroup { + public struct GET: Endpoint { + public typealias Response = GameCenterDetailGameCenterGroupLinkageResponse + + public var path: String { + "/v1/gameCenterDetails/\(id)/relationships/gameCenterGroup" + } + + /// the id of the requested resource + public var id: String + + public var parameters: Parameters = Parameters() + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + components?.queryItems = [ + + ].filter { $0.value != nil } + if components?.queryItems?.isEmpty ?? false { + components?.queryItems = nil + } + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "GET" + return urlRequest + } + + /// - Returns: **200**, Related linkage as `GameCenterDetailGameCenterGroupLinkageResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(GameCenterDetailGameCenterGroupLinkageResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +extension V1.GameCenterDetails.ById.Relationships.GameCenterGroup.GET { + public struct Parameters: Hashable { + + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterDetails/ById/Relationships/GameCenterLeaderboardSets/GameCenterDetailsByIdRelationshipsGameCenterLeaderboardSets.GET.dfb5b36.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterDetails/ById/Relationships/GameCenterLeaderboardSets/GameCenterDetailsByIdRelationshipsGameCenterLeaderboardSets.GET.dfb5b36.generated.swift index 34ed6803..cf4014bb 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterDetails/ById/Relationships/GameCenterLeaderboardSets/GameCenterDetailsByIdRelationshipsGameCenterLeaderboardSets.GET.dfb5b36.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterDetails/ById/Relationships/GameCenterLeaderboardSets/GameCenterDetailsByIdRelationshipsGameCenterLeaderboardSets.GET.dfb5b36.generated.swift @@ -42,8 +42,10 @@ extension V1.GameCenterDetails.ById.Relationships.GameCenterLeaderboardSets { /// - Returns: **200**, List of related linkages as `GameCenterDetailGameCenterLeaderboardSetsLinkagesResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -57,12 +59,18 @@ extension V1.GameCenterDetails.ById.Relationships.GameCenterLeaderboardSets { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 404: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterDetails/ById/Relationships/GameCenterLeaderboardSets/GameCenterDetailsByIdRelationshipsGameCenterLeaderboardSets.PATCH.dfb5b36.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterDetails/ById/Relationships/GameCenterLeaderboardSets/GameCenterDetailsByIdRelationshipsGameCenterLeaderboardSets.PATCH.dfb5b36.generated.swift index 253861ea..611c7431 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterDetails/ById/Relationships/GameCenterLeaderboardSets/GameCenterDetailsByIdRelationshipsGameCenterLeaderboardSets.PATCH.dfb5b36.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterDetails/ById/Relationships/GameCenterLeaderboardSets/GameCenterDetailsByIdRelationshipsGameCenterLeaderboardSets.PATCH.dfb5b36.generated.swift @@ -46,10 +46,12 @@ extension V1.GameCenterDetails.ById.Relationships.GameCenterLeaderboardSets { return urlRequest } - /// - Returns: **204**, Success (no content) + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **422**, Unprocessable request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -57,8 +59,8 @@ extension V1.GameCenterDetails.ById.Relationships.GameCenterLeaderboardSets { } switch urlResponse.statusCode { - case 204: - return + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) @@ -69,6 +71,12 @@ extension V1.GameCenterDetails.ById.Relationships.GameCenterLeaderboardSets { case 409: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 422: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterDetails/ById/Relationships/GameCenterLeaderboards/GameCenterDetailsByIdRelationshipsGameCenterLeaderboards.GET.8c64c98.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterDetails/ById/Relationships/GameCenterLeaderboards/GameCenterDetailsByIdRelationshipsGameCenterLeaderboards.GET.8c64c98.generated.swift index 6a977669..e6562cad 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterDetails/ById/Relationships/GameCenterLeaderboards/GameCenterDetailsByIdRelationshipsGameCenterLeaderboards.GET.8c64c98.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterDetails/ById/Relationships/GameCenterLeaderboards/GameCenterDetailsByIdRelationshipsGameCenterLeaderboards.GET.8c64c98.generated.swift @@ -42,8 +42,10 @@ extension V1.GameCenterDetails.ById.Relationships.GameCenterLeaderboards { /// - Returns: **200**, List of related linkages as `GameCenterDetailGameCenterLeaderboardsLinkagesResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -57,12 +59,18 @@ extension V1.GameCenterDetails.ById.Relationships.GameCenterLeaderboards { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 404: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterDetails/ById/Relationships/GameCenterLeaderboards/GameCenterDetailsByIdRelationshipsGameCenterLeaderboards.PATCH.8c64c98.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterDetails/ById/Relationships/GameCenterLeaderboards/GameCenterDetailsByIdRelationshipsGameCenterLeaderboards.PATCH.8c64c98.generated.swift index e4e63fba..2c085c1d 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterDetails/ById/Relationships/GameCenterLeaderboards/GameCenterDetailsByIdRelationshipsGameCenterLeaderboards.PATCH.8c64c98.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterDetails/ById/Relationships/GameCenterLeaderboards/GameCenterDetailsByIdRelationshipsGameCenterLeaderboards.PATCH.8c64c98.generated.swift @@ -46,10 +46,12 @@ extension V1.GameCenterDetails.ById.Relationships.GameCenterLeaderboards { return urlRequest } - /// - Returns: **204**, Success (no content) + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **422**, Unprocessable request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -57,8 +59,8 @@ extension V1.GameCenterDetails.ById.Relationships.GameCenterLeaderboards { } switch urlResponse.statusCode { - case 204: - return + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) @@ -69,6 +71,12 @@ extension V1.GameCenterDetails.ById.Relationships.GameCenterLeaderboards { case 409: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 422: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterDetails/ById/Relationships/LeaderboardReleases/GameCenterDetailsByIdRelationshipsLeaderboardReleases.GET.a743dea.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterDetails/ById/Relationships/LeaderboardReleases/GameCenterDetailsByIdRelationshipsLeaderboardReleases.GET.a743dea.generated.swift new file mode 100644 index 00000000..b042fa54 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterDetails/ById/Relationships/LeaderboardReleases/GameCenterDetailsByIdRelationshipsLeaderboardReleases.GET.a743dea.generated.swift @@ -0,0 +1,88 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.GameCenterDetails.ById.Relationships.LeaderboardReleases { + public struct GET: Endpoint { + public typealias Response = GameCenterDetailLeaderboardReleasesLinkagesResponse + + public var path: String { + "/v1/gameCenterDetails/\(id)/relationships/leaderboardReleases" + } + + /// the id of the requested resource + public var id: String + + public var parameters: Parameters = Parameters() + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + components?.queryItems = [ + URLQueryItem(name: "limit", + value: parameters.limit.map { "\($0)" }) + ].filter { $0.value != nil } + if components?.queryItems?.isEmpty ?? false { + components?.queryItems = nil + } + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "GET" + return urlRequest + } + + /// - Returns: **200**, List of related linkages as `GameCenterDetailLeaderboardReleasesLinkagesResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(GameCenterDetailLeaderboardReleasesLinkagesResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +extension V1.GameCenterDetails.ById.Relationships.LeaderboardReleases.GET { + public struct Parameters: Hashable { + /// maximum resources per page + public var limit: Int? + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterDetails/ById/Relationships/LeaderboardSetReleases/GameCenterDetailsByIdRelationshipsLeaderboardSetReleases.GET.39b5bb9.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterDetails/ById/Relationships/LeaderboardSetReleases/GameCenterDetailsByIdRelationshipsLeaderboardSetReleases.GET.39b5bb9.generated.swift new file mode 100644 index 00000000..e95d5d0c --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterDetails/ById/Relationships/LeaderboardSetReleases/GameCenterDetailsByIdRelationshipsLeaderboardSetReleases.GET.39b5bb9.generated.swift @@ -0,0 +1,88 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.GameCenterDetails.ById.Relationships.LeaderboardSetReleases { + public struct GET: Endpoint { + public typealias Response = GameCenterDetailLeaderboardSetReleasesLinkagesResponse + + public var path: String { + "/v1/gameCenterDetails/\(id)/relationships/leaderboardSetReleases" + } + + /// the id of the requested resource + public var id: String + + public var parameters: Parameters = Parameters() + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + components?.queryItems = [ + URLQueryItem(name: "limit", + value: parameters.limit.map { "\($0)" }) + ].filter { $0.value != nil } + if components?.queryItems?.isEmpty ?? false { + components?.queryItems = nil + } + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "GET" + return urlRequest + } + + /// - Returns: **200**, List of related linkages as `GameCenterDetailLeaderboardSetReleasesLinkagesResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(GameCenterDetailLeaderboardSetReleasesLinkagesResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +extension V1.GameCenterDetails.ById.Relationships.LeaderboardSetReleases.GET { + public struct Parameters: Hashable { + /// maximum resources per page + public var limit: Int? + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterDetails/GameCenterDetails.POST.3c838f0.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterDetails/GameCenterDetails.POST.3c838f0.generated.swift index 32c050ab..b5478da6 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterDetails/GameCenterDetails.POST.3c838f0.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterDetails/GameCenterDetails.POST.3c838f0.generated.swift @@ -41,8 +41,11 @@ extension V1.GameCenterDetails { /// - Returns: **201**, Single GameCenterDetail as `GameCenterDetailResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **422**, Unprocessable request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -56,12 +59,21 @@ extension V1.GameCenterDetails { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 409: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 422: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterEnabledVersions/ById/CompatibleVersions/GameCenterEnabledVersionsByIdCompatibleVersions.GET.2090b0a.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterEnabledVersions/ById/CompatibleVersions/GameCenterEnabledVersionsByIdCompatibleVersions.GET.2090b0a.generated.swift index dbae0fdb..b753ccfc 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterEnabledVersions/ById/CompatibleVersions/GameCenterEnabledVersionsByIdCompatibleVersions.GET.2090b0a.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterEnabledVersions/ById/CompatibleVersions/GameCenterEnabledVersionsByIdCompatibleVersions.GET.2090b0a.generated.swift @@ -61,8 +61,10 @@ extension V1.GameCenterEnabledVersions.ById.CompatibleVersions { /// - Returns: **200**, List of GameCenterEnabledVersions as `GameCenterEnabledVersionsResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -76,12 +78,18 @@ extension V1.GameCenterEnabledVersions.ById.CompatibleVersions { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 404: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -112,182 +120,247 @@ extension V1.GameCenterEnabledVersions.ById.CompatibleVersions.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum Apps: Hashable, Codable, RawRepresentable { - case appAvailability - case appClips - case appCustomProductPages - case appEncryptionDeclarations - case appEvents - case appInfos - case appPricePoints - case appPriceSchedule - case appStoreVersionExperimentsV2 - case appStoreVersions - case availableInNewTerritories - case availableTerritories - case betaAppLocalizations - case betaAppReviewDetail - case betaGroups - case betaLicenseAgreement - case betaTesters - case builds - case bundleId - case ciProduct - case contentRightsDeclaration - case customerReviews - case endUserLicenseAgreement - case gameCenterDetail - case gameCenterEnabledVersions - case inAppPurchases - case inAppPurchasesV2 - case isOrEverWasMadeForKids - case name - case perfPowerMetrics - case preOrder - case preReleaseVersions - case pricePoints - case prices - case primaryLocale - case promotedPurchases - case reviewSubmissions - case sku - case subscriptionGracePeriod - case subscriptionGroups - case subscriptionStatusUrl - case subscriptionStatusUrlForSandbox - case subscriptionStatusUrlVersion - case subscriptionStatusUrlVersionForSandbox - case unknown(String) - - public var rawValue: String { - switch self { - case .appAvailability: return "appAvailability" - case .appClips: return "appClips" - case .appCustomProductPages: return "appCustomProductPages" - case .appEncryptionDeclarations: return "appEncryptionDeclarations" - case .appEvents: return "appEvents" - case .appInfos: return "appInfos" - case .appPricePoints: return "appPricePoints" - case .appPriceSchedule: return "appPriceSchedule" - case .appStoreVersionExperimentsV2: return "appStoreVersionExperimentsV2" - case .appStoreVersions: return "appStoreVersions" - case .availableInNewTerritories: return "availableInNewTerritories" - case .availableTerritories: return "availableTerritories" - case .betaAppLocalizations: return "betaAppLocalizations" - case .betaAppReviewDetail: return "betaAppReviewDetail" - case .betaGroups: return "betaGroups" - case .betaLicenseAgreement: return "betaLicenseAgreement" - case .betaTesters: return "betaTesters" - case .builds: return "builds" - case .bundleId: return "bundleId" - case .ciProduct: return "ciProduct" - case .contentRightsDeclaration: return "contentRightsDeclaration" - case .customerReviews: return "customerReviews" - case .endUserLicenseAgreement: return "endUserLicenseAgreement" - case .gameCenterDetail: return "gameCenterDetail" - case .gameCenterEnabledVersions: return "gameCenterEnabledVersions" - case .inAppPurchases: return "inAppPurchases" - case .inAppPurchasesV2: return "inAppPurchasesV2" - case .isOrEverWasMadeForKids: return "isOrEverWasMadeForKids" - case .name: return "name" - case .perfPowerMetrics: return "perfPowerMetrics" - case .preOrder: return "preOrder" - case .preReleaseVersions: return "preReleaseVersions" - case .pricePoints: return "pricePoints" - case .prices: return "prices" - case .primaryLocale: return "primaryLocale" - case .promotedPurchases: return "promotedPurchases" - case .reviewSubmissions: return "reviewSubmissions" - case .sku: return "sku" - case .subscriptionGracePeriod: return "subscriptionGracePeriod" - case .subscriptionGroups: return "subscriptionGroups" - case .subscriptionStatusUrl: return "subscriptionStatusUrl" - case .subscriptionStatusUrlForSandbox: return "subscriptionStatusUrlForSandbox" - case .subscriptionStatusUrlVersion: return "subscriptionStatusUrlVersion" - case .subscriptionStatusUrlVersionForSandbox: return "subscriptionStatusUrlVersionForSandbox" - case .unknown(let rawValue): return rawValue - } + public struct Apps: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var accessibilityDeclarations: Self { + .init(rawValue: "accessibilityDeclarations") + } + + public static var accessibilityUrl: Self { + .init(rawValue: "accessibilityUrl") + } + + public static var alternativeDistributionKey: Self { + .init(rawValue: "alternativeDistributionKey") + } + + public static var analyticsReportRequests: Self { + .init(rawValue: "analyticsReportRequests") + } + + public static var appAvailabilityV2: Self { + .init(rawValue: "appAvailabilityV2") + } + + public static var appClips: Self { + .init(rawValue: "appClips") + } + + public static var appCustomProductPages: Self { + .init(rawValue: "appCustomProductPages") + } + + public static var appEncryptionDeclarations: Self { + .init(rawValue: "appEncryptionDeclarations") + } + + public static var appEvents: Self { + .init(rawValue: "appEvents") + } + + public static var appInfos: Self { + .init(rawValue: "appInfos") + } + + public static var appPricePoints: Self { + .init(rawValue: "appPricePoints") + } + + public static var appPriceSchedule: Self { + .init(rawValue: "appPriceSchedule") + } + + public static var appStoreVersionExperimentsV2: Self { + .init(rawValue: "appStoreVersionExperimentsV2") + } + + public static var appStoreVersions: Self { + .init(rawValue: "appStoreVersions") + } + + public static var backgroundAssets: Self { + .init(rawValue: "backgroundAssets") + } + + public static var betaAppLocalizations: Self { + .init(rawValue: "betaAppLocalizations") + } + + public static var betaAppReviewDetail: Self { + .init(rawValue: "betaAppReviewDetail") + } + + public static var betaFeedbackCrashSubmissions: Self { + .init(rawValue: "betaFeedbackCrashSubmissions") + } + + public static var betaFeedbackScreenshotSubmissions: Self { + .init(rawValue: "betaFeedbackScreenshotSubmissions") + } + + public static var betaGroups: Self { + .init(rawValue: "betaGroups") + } + + public static var betaLicenseAgreement: Self { + .init(rawValue: "betaLicenseAgreement") + } + + public static var betaTesters: Self { + .init(rawValue: "betaTesters") + } + + public static var builds: Self { + .init(rawValue: "builds") + } + + public static var bundleId: Self { + .init(rawValue: "bundleId") + } + + public static var ciProduct: Self { + .init(rawValue: "ciProduct") + } + + public static var contentRightsDeclaration: Self { + .init(rawValue: "contentRightsDeclaration") + } + + public static var customerReviewSummarizations: Self { + .init(rawValue: "customerReviewSummarizations") + } + + public static var customerReviews: Self { + .init(rawValue: "customerReviews") + } + + public static var endUserLicenseAgreement: Self { + .init(rawValue: "endUserLicenseAgreement") + } + + public static var gameCenterDetail: Self { + .init(rawValue: "gameCenterDetail") + } + + public static var gameCenterEnabledVersions: Self { + .init(rawValue: "gameCenterEnabledVersions") + } + + public static var inAppPurchases: Self { + .init(rawValue: "inAppPurchases") + } + + public static var inAppPurchasesV2: Self { + .init(rawValue: "inAppPurchasesV2") } + public static var isOrEverWasMadeForKids: Self { + .init(rawValue: "isOrEverWasMadeForKids") + } + + public static var marketplaceSearchDetail: Self { + .init(rawValue: "marketplaceSearchDetail") + } + + public static var name: Self { + .init(rawValue: "name") + } + + public static var perfPowerMetrics: Self { + .init(rawValue: "perfPowerMetrics") + } + + public static var preReleaseVersions: Self { + .init(rawValue: "preReleaseVersions") + } + + public static var primaryLocale: Self { + .init(rawValue: "primaryLocale") + } + + public static var promotedPurchases: Self { + .init(rawValue: "promotedPurchases") + } + + public static var reviewSubmissions: Self { + .init(rawValue: "reviewSubmissions") + } + + public static var sku: Self { + .init(rawValue: "sku") + } + + public static var streamlinedPurchasingEnabled: Self { + .init(rawValue: "streamlinedPurchasingEnabled") + } + + public static var subscriptionGracePeriod: Self { + .init(rawValue: "subscriptionGracePeriod") + } + + public static var subscriptionGroups: Self { + .init(rawValue: "subscriptionGroups") + } + + public static var subscriptionStatusUrl: Self { + .init(rawValue: "subscriptionStatusUrl") + } + + public static var subscriptionStatusUrlForSandbox: Self { + .init(rawValue: "subscriptionStatusUrlForSandbox") + } + + public static var subscriptionStatusUrlVersion: Self { + .init(rawValue: "subscriptionStatusUrlVersion") + } + + public static var subscriptionStatusUrlVersionForSandbox: Self { + .init(rawValue: "subscriptionStatusUrlVersionForSandbox") + } + + public static var webhooks: Self { + .init(rawValue: "webhooks") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "appAvailability": self = .appAvailability - case "appClips": self = .appClips - case "appCustomProductPages": self = .appCustomProductPages - case "appEncryptionDeclarations": self = .appEncryptionDeclarations - case "appEvents": self = .appEvents - case "appInfos": self = .appInfos - case "appPricePoints": self = .appPricePoints - case "appPriceSchedule": self = .appPriceSchedule - case "appStoreVersionExperimentsV2": self = .appStoreVersionExperimentsV2 - case "appStoreVersions": self = .appStoreVersions - case "availableInNewTerritories": self = .availableInNewTerritories - case "availableTerritories": self = .availableTerritories - case "betaAppLocalizations": self = .betaAppLocalizations - case "betaAppReviewDetail": self = .betaAppReviewDetail - case "betaGroups": self = .betaGroups - case "betaLicenseAgreement": self = .betaLicenseAgreement - case "betaTesters": self = .betaTesters - case "builds": self = .builds - case "bundleId": self = .bundleId - case "ciProduct": self = .ciProduct - case "contentRightsDeclaration": self = .contentRightsDeclaration - case "customerReviews": self = .customerReviews - case "endUserLicenseAgreement": self = .endUserLicenseAgreement - case "gameCenterDetail": self = .gameCenterDetail - case "gameCenterEnabledVersions": self = .gameCenterEnabledVersions - case "inAppPurchases": self = .inAppPurchases - case "inAppPurchasesV2": self = .inAppPurchasesV2 - case "isOrEverWasMadeForKids": self = .isOrEverWasMadeForKids - case "name": self = .name - case "perfPowerMetrics": self = .perfPowerMetrics - case "preOrder": self = .preOrder - case "preReleaseVersions": self = .preReleaseVersions - case "pricePoints": self = .pricePoints - case "prices": self = .prices - case "primaryLocale": self = .primaryLocale - case "promotedPurchases": self = .promotedPurchases - case "reviewSubmissions": self = .reviewSubmissions - case "sku": self = .sku - case "subscriptionGracePeriod": self = .subscriptionGracePeriod - case "subscriptionGroups": self = .subscriptionGroups - case "subscriptionStatusUrl": self = .subscriptionStatusUrl - case "subscriptionStatusUrlForSandbox": self = .subscriptionStatusUrlForSandbox - case "subscriptionStatusUrlVersion": self = .subscriptionStatusUrlVersion - case "subscriptionStatusUrlVersionForSandbox": self = .subscriptionStatusUrlVersionForSandbox - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum GameCenterEnabledVersions: Hashable, Codable, RawRepresentable { - case app - case compatibleVersions - case iconAsset - case platform - case versionString - case unknown(String) - - public var rawValue: String { - switch self { - case .app: return "app" - case .compatibleVersions: return "compatibleVersions" - case .iconAsset: return "iconAsset" - case .platform: return "platform" - case .versionString: return "versionString" - case .unknown(let rawValue): return rawValue - } + public struct GameCenterEnabledVersions: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var app: Self { + .init(rawValue: "app") + } + + public static var compatibleVersions: Self { + .init(rawValue: "compatibleVersions") + } + + public static var iconAsset: Self { + .init(rawValue: "iconAsset") + } + + public static var platform: Self { + .init(rawValue: "platform") } + public static var versionString: Self { + .init(rawValue: "versionString") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "app": self = .app - case "compatibleVersions": self = .compatibleVersions - case "iconAsset": self = .iconAsset - case "platform": self = .platform - case "versionString": self = .versionString - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } @@ -318,28 +391,31 @@ extension V1.GameCenterEnabledVersions.ById.CompatibleVersions.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum Platform: Hashable, Codable, RawRepresentable { - case iOS - case macOS - case tvOS - case unknown(String) + public struct Platform: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var iOS: Self { + .init(rawValue: "IOS") + } + + public static var macOS: Self { + .init(rawValue: "MAC_OS") + } + + public static var tvOS: Self { + .init(rawValue: "TV_OS") + } - public var rawValue: String { - switch self { - case .iOS: return "IOS" - case .macOS: return "MAC_OS" - case .tvOS: return "TV_OS" - case .unknown(let rawValue): return rawValue - } + public static var visionOS: Self { + .init(rawValue: "VISION_OS") } + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "IOS": self = .iOS - case "MAC_OS": self = .macOS - case "TV_OS": self = .tvOS - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } @@ -372,25 +448,23 @@ extension V1.GameCenterEnabledVersions.ById.CompatibleVersions.GET { } } - public enum Include: Hashable, Codable, RawRepresentable { - case app - case compatibleVersions - case unknown(String) + public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var app: Self { + .init(rawValue: "app") + } - public var rawValue: String { - switch self { - case .app: return "app" - case .compatibleVersions: return "compatibleVersions" - case .unknown(let rawValue): return rawValue - } + public static var compatibleVersions: Self { + .init(rawValue: "compatibleVersions") + } + + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "app": self = .app - case "compatibleVersions": self = .compatibleVersions - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } @@ -421,25 +495,23 @@ extension V1.GameCenterEnabledVersions.ById.CompatibleVersions.GET { } } - public enum Sort: Hashable, Codable, RawRepresentable { - case versionString - case versionStringDesc - case unknown(String) + public struct Sort: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var versionString: Self { + .init(rawValue: "versionString") + } - public var rawValue: String { - switch self { - case .versionString: return "versionString" - case .versionStringDesc: return "-versionString" - case .unknown(let rawValue): return rawValue - } + public static var versionStringDesc: Self { + .init(rawValue: "-versionString") } + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "versionString": self = .versionString - case "-versionString": self = .versionStringDesc - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterEnabledVersions/ById/Relationships/CompatibleVersions/GameCenterEnabledVersionsByIdRelationshipsCompatibleVersions.DELETE.085e87f.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterEnabledVersions/ById/Relationships/CompatibleVersions/GameCenterEnabledVersionsByIdRelationshipsCompatibleVersions.DELETE.085e87f.generated.swift index 3aa7d5a7..34a1f3c4 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterEnabledVersions/ById/Relationships/CompatibleVersions/GameCenterEnabledVersionsByIdRelationshipsCompatibleVersions.DELETE.085e87f.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterEnabledVersions/ById/Relationships/CompatibleVersions/GameCenterEnabledVersionsByIdRelationshipsCompatibleVersions.DELETE.085e87f.generated.swift @@ -32,10 +32,12 @@ extension V1.GameCenterEnabledVersions.ById.Relationships.CompatibleVersions { return urlRequest } - /// - Returns: **204**, Success (no content) + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **422**, Unprocessable request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -43,8 +45,8 @@ extension V1.GameCenterEnabledVersions.ById.Relationships.CompatibleVersions { } switch urlResponse.statusCode { - case 204: - return + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) @@ -55,6 +57,12 @@ extension V1.GameCenterEnabledVersions.ById.Relationships.CompatibleVersions { case 409: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 422: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterEnabledVersions/ById/Relationships/CompatibleVersions/GameCenterEnabledVersionsByIdRelationshipsCompatibleVersions.GET.085e87f.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterEnabledVersions/ById/Relationships/CompatibleVersions/GameCenterEnabledVersionsByIdRelationshipsCompatibleVersions.GET.085e87f.generated.swift index 38197173..116665c8 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterEnabledVersions/ById/Relationships/CompatibleVersions/GameCenterEnabledVersionsByIdRelationshipsCompatibleVersions.GET.085e87f.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterEnabledVersions/ById/Relationships/CompatibleVersions/GameCenterEnabledVersionsByIdRelationshipsCompatibleVersions.GET.085e87f.generated.swift @@ -43,8 +43,10 @@ extension V1.GameCenterEnabledVersions.ById.Relationships.CompatibleVersions { /// - Returns: **200**, List of related linkages as `GameCenterEnabledVersionCompatibleVersionsLinkagesResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -58,12 +60,18 @@ extension V1.GameCenterEnabledVersions.ById.Relationships.CompatibleVersions { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 404: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterEnabledVersions/ById/Relationships/CompatibleVersions/GameCenterEnabledVersionsByIdRelationshipsCompatibleVersions.PATCH.085e87f.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterEnabledVersions/ById/Relationships/CompatibleVersions/GameCenterEnabledVersionsByIdRelationshipsCompatibleVersions.PATCH.085e87f.generated.swift index 8a6f113d..9039f6ce 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterEnabledVersions/ById/Relationships/CompatibleVersions/GameCenterEnabledVersionsByIdRelationshipsCompatibleVersions.PATCH.085e87f.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterEnabledVersions/ById/Relationships/CompatibleVersions/GameCenterEnabledVersionsByIdRelationshipsCompatibleVersions.PATCH.085e87f.generated.swift @@ -47,10 +47,12 @@ extension V1.GameCenterEnabledVersions.ById.Relationships.CompatibleVersions { return urlRequest } - /// - Returns: **204**, Success (no content) + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **422**, Unprocessable request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -58,8 +60,8 @@ extension V1.GameCenterEnabledVersions.ById.Relationships.CompatibleVersions { } switch urlResponse.statusCode { - case 204: - return + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) @@ -70,6 +72,12 @@ extension V1.GameCenterEnabledVersions.ById.Relationships.CompatibleVersions { case 409: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 422: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterEnabledVersions/ById/Relationships/CompatibleVersions/GameCenterEnabledVersionsByIdRelationshipsCompatibleVersions.POST.085e87f.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterEnabledVersions/ById/Relationships/CompatibleVersions/GameCenterEnabledVersionsByIdRelationshipsCompatibleVersions.POST.085e87f.generated.swift index 03a0dca5..7e6da592 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterEnabledVersions/ById/Relationships/CompatibleVersions/GameCenterEnabledVersionsByIdRelationshipsCompatibleVersions.POST.085e87f.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterEnabledVersions/ById/Relationships/CompatibleVersions/GameCenterEnabledVersionsByIdRelationshipsCompatibleVersions.POST.085e87f.generated.swift @@ -47,10 +47,12 @@ extension V1.GameCenterEnabledVersions.ById.Relationships.CompatibleVersions { return urlRequest } - /// - Returns: **204**, Success (no content) + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **422**, Unprocessable request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -58,8 +60,8 @@ extension V1.GameCenterEnabledVersions.ById.Relationships.CompatibleVersions { } switch urlResponse.statusCode { - case 204: - return + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) @@ -70,6 +72,12 @@ extension V1.GameCenterEnabledVersions.ById.Relationships.CompatibleVersions { case 409: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 422: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterGroups/ById/GameCenterAchievements/GameCenterGroupsByIdGameCenterAchievements.GET.cb0d30b.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterGroups/ById/GameCenterAchievements/GameCenterGroupsByIdGameCenterAchievements.GET.cb0d30b.generated.swift index 855a4dc8..1a764989 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterGroups/ById/GameCenterAchievements/GameCenterGroupsByIdGameCenterAchievements.GET.cb0d30b.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterGroups/ById/GameCenterAchievements/GameCenterGroupsByIdGameCenterAchievements.GET.cb0d30b.generated.swift @@ -34,6 +34,8 @@ extension V1.GameCenterGroups.ById.GameCenterAchievements { value: parameters.fields[.gameCenterAchievementReleases]?.map { "\($0)" }.joined(separator: ",")), URLQueryItem(name: "fields[gameCenterAchievements]", value: parameters.fields[.gameCenterAchievements]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "fields[gameCenterActivities]", + value: parameters.fields[.gameCenterActivities]?.map { "\($0)" }.joined(separator: ",")), URLQueryItem(name: "fields[gameCenterDetails]", value: parameters.fields[.gameCenterDetails]?.map { "\($0)" }.joined(separator: ",")), URLQueryItem(name: "fields[gameCenterGroups]", @@ -64,8 +66,10 @@ extension V1.GameCenterGroups.ById.GameCenterAchievements { /// - Returns: **200**, List of GameCenterAchievements as `GameCenterAchievementsResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -79,12 +83,18 @@ extension V1.GameCenterGroups.ById.GameCenterAchievements { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 404: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -112,197 +122,315 @@ extension V1.GameCenterGroups.ById.GameCenterAchievements.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum GameCenterAchievementLocalizations: Hashable, Codable, RawRepresentable { - case afterEarnedDescription - case beforeEarnedDescription - case gameCenterAchievement - case gameCenterAchievementImage - case locale - case name - case unknown(String) - - public var rawValue: String { - switch self { - case .afterEarnedDescription: return "afterEarnedDescription" - case .beforeEarnedDescription: return "beforeEarnedDescription" - case .gameCenterAchievement: return "gameCenterAchievement" - case .gameCenterAchievementImage: return "gameCenterAchievementImage" - case .locale: return "locale" - case .name: return "name" - case .unknown(let rawValue): return rawValue - } + public struct GameCenterAchievementLocalizations: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var afterEarnedDescription: Self { + .init(rawValue: "afterEarnedDescription") + } + + public static var beforeEarnedDescription: Self { + .init(rawValue: "beforeEarnedDescription") + } + + public static var gameCenterAchievement: Self { + .init(rawValue: "gameCenterAchievement") + } + + public static var gameCenterAchievementImage: Self { + .init(rawValue: "gameCenterAchievementImage") + } + + public static var locale: Self { + .init(rawValue: "locale") + } + + public static var name: Self { + .init(rawValue: "name") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct GameCenterAchievementReleases: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var gameCenterAchievement: Self { + .init(rawValue: "gameCenterAchievement") + } + + public static var gameCenterDetail: Self { + .init(rawValue: "gameCenterDetail") + } + + public static var live: Self { + .init(rawValue: "live") + } + + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "afterEarnedDescription": self = .afterEarnedDescription - case "beforeEarnedDescription": self = .beforeEarnedDescription - case "gameCenterAchievement": self = .gameCenterAchievement - case "gameCenterAchievementImage": self = .gameCenterAchievementImage - case "locale": self = .locale - case "name": self = .name - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum GameCenterAchievementReleases: Hashable, Codable, RawRepresentable { - case gameCenterAchievement - case gameCenterDetail - case live - case unknown(String) + public struct GameCenterAchievements: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var activity: Self { + .init(rawValue: "activity") + } + + public static var activityProperties: Self { + .init(rawValue: "activityProperties") + } + + public static var archived: Self { + .init(rawValue: "archived") + } + + public static var gameCenterDetail: Self { + .init(rawValue: "gameCenterDetail") + } + + public static var gameCenterGroup: Self { + .init(rawValue: "gameCenterGroup") + } + + public static var groupAchievement: Self { + .init(rawValue: "groupAchievement") + } + + public static var localizations: Self { + .init(rawValue: "localizations") + } - public var rawValue: String { - switch self { - case .gameCenterAchievement: return "gameCenterAchievement" - case .gameCenterDetail: return "gameCenterDetail" - case .live: return "live" - case .unknown(let rawValue): return rawValue - } + public static var points: Self { + .init(rawValue: "points") } + public static var referenceName: Self { + .init(rawValue: "referenceName") + } + + public static var releases: Self { + .init(rawValue: "releases") + } + + public static var repeatable: Self { + .init(rawValue: "repeatable") + } + + public static var showBeforeEarned: Self { + .init(rawValue: "showBeforeEarned") + } + + public static var vendorIdentifier: Self { + .init(rawValue: "vendorIdentifier") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "gameCenterAchievement": self = .gameCenterAchievement - case "gameCenterDetail": self = .gameCenterDetail - case "live": self = .live - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum GameCenterAchievements: Hashable, Codable, RawRepresentable { - case archived - case gameCenterDetail - case gameCenterGroup - case groupAchievement - case localizations - case points - case referenceName - case releases - case repeatable - case showBeforeEarned - case vendorIdentifier - case unknown(String) - - public var rawValue: String { - switch self { - case .archived: return "archived" - case .gameCenterDetail: return "gameCenterDetail" - case .gameCenterGroup: return "gameCenterGroup" - case .groupAchievement: return "groupAchievement" - case .localizations: return "localizations" - case .points: return "points" - case .referenceName: return "referenceName" - case .releases: return "releases" - case .repeatable: return "repeatable" - case .showBeforeEarned: return "showBeforeEarned" - case .vendorIdentifier: return "vendorIdentifier" - case .unknown(let rawValue): return rawValue - } + public struct GameCenterActivities: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var achievements: Self { + .init(rawValue: "achievements") + } + + public static var archived: Self { + .init(rawValue: "archived") + } + + public static var gameCenterDetail: Self { + .init(rawValue: "gameCenterDetail") + } + + public static var gameCenterGroup: Self { + .init(rawValue: "gameCenterGroup") + } + + public static var leaderboards: Self { + .init(rawValue: "leaderboards") + } + + public static var maximumPlayersCount: Self { + .init(rawValue: "maximumPlayersCount") + } + + public static var minimumPlayersCount: Self { + .init(rawValue: "minimumPlayersCount") + } + + public static var playStyle: Self { + .init(rawValue: "playStyle") + } + + public static var properties: Self { + .init(rawValue: "properties") + } + + public static var referenceName: Self { + .init(rawValue: "referenceName") + } + + public static var supportsPartyCode: Self { + .init(rawValue: "supportsPartyCode") } + public static var vendorIdentifier: Self { + .init(rawValue: "vendorIdentifier") + } + + public static var versions: Self { + .init(rawValue: "versions") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "archived": self = .archived - case "gameCenterDetail": self = .gameCenterDetail - case "gameCenterGroup": self = .gameCenterGroup - case "groupAchievement": self = .groupAchievement - case "localizations": self = .localizations - case "points": self = .points - case "referenceName": self = .referenceName - case "releases": self = .releases - case "repeatable": self = .repeatable - case "showBeforeEarned": self = .showBeforeEarned - case "vendorIdentifier": self = .vendorIdentifier - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum GameCenterDetails: Hashable, Codable, RawRepresentable { - case achievementReleases - case app - case arcadeEnabled - case challengeEnabled - case defaultGroupLeaderboard - case defaultLeaderboard - case gameCenterAchievements - case gameCenterAppVersions - case gameCenterGroup - case gameCenterLeaderboardSets - case gameCenterLeaderboards - case leaderboardReleases - case leaderboardSetReleases - case unknown(String) - - public var rawValue: String { - switch self { - case .achievementReleases: return "achievementReleases" - case .app: return "app" - case .arcadeEnabled: return "arcadeEnabled" - case .challengeEnabled: return "challengeEnabled" - case .defaultGroupLeaderboard: return "defaultGroupLeaderboard" - case .defaultLeaderboard: return "defaultLeaderboard" - case .gameCenterAchievements: return "gameCenterAchievements" - case .gameCenterAppVersions: return "gameCenterAppVersions" - case .gameCenterGroup: return "gameCenterGroup" - case .gameCenterLeaderboardSets: return "gameCenterLeaderboardSets" - case .gameCenterLeaderboards: return "gameCenterLeaderboards" - case .leaderboardReleases: return "leaderboardReleases" - case .leaderboardSetReleases: return "leaderboardSetReleases" - case .unknown(let rawValue): return rawValue - } + public struct GameCenterDetails: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var achievementReleases: Self { + .init(rawValue: "achievementReleases") + } + + public static var activityReleases: Self { + .init(rawValue: "activityReleases") + } + + public static var app: Self { + .init(rawValue: "app") + } + + public static var arcadeEnabled: Self { + .init(rawValue: "arcadeEnabled") + } + + public static var challengeEnabled: Self { + .init(rawValue: "challengeEnabled") + } + + public static var challengeReleases: Self { + .init(rawValue: "challengeReleases") + } + + public static var challengesMinimumPlatformVersions: Self { + .init(rawValue: "challengesMinimumPlatformVersions") + } + + public static var defaultGroupLeaderboard: Self { + .init(rawValue: "defaultGroupLeaderboard") + } + + public static var defaultLeaderboard: Self { + .init(rawValue: "defaultLeaderboard") + } + + public static var gameCenterAchievements: Self { + .init(rawValue: "gameCenterAchievements") + } + + public static var gameCenterActivities: Self { + .init(rawValue: "gameCenterActivities") + } + + public static var gameCenterAppVersions: Self { + .init(rawValue: "gameCenterAppVersions") + } + + public static var gameCenterChallenges: Self { + .init(rawValue: "gameCenterChallenges") + } + + public static var gameCenterGroup: Self { + .init(rawValue: "gameCenterGroup") + } + + public static var gameCenterLeaderboardSets: Self { + .init(rawValue: "gameCenterLeaderboardSets") + } + + public static var gameCenterLeaderboards: Self { + .init(rawValue: "gameCenterLeaderboards") + } + + public static var leaderboardReleases: Self { + .init(rawValue: "leaderboardReleases") + } + + public static var leaderboardSetReleases: Self { + .init(rawValue: "leaderboardSetReleases") + } + + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "achievementReleases": self = .achievementReleases - case "app": self = .app - case "arcadeEnabled": self = .arcadeEnabled - case "challengeEnabled": self = .challengeEnabled - case "defaultGroupLeaderboard": self = .defaultGroupLeaderboard - case "defaultLeaderboard": self = .defaultLeaderboard - case "gameCenterAchievements": self = .gameCenterAchievements - case "gameCenterAppVersions": self = .gameCenterAppVersions - case "gameCenterGroup": self = .gameCenterGroup - case "gameCenterLeaderboardSets": self = .gameCenterLeaderboardSets - case "gameCenterLeaderboards": self = .gameCenterLeaderboards - case "leaderboardReleases": self = .leaderboardReleases - case "leaderboardSetReleases": self = .leaderboardSetReleases - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum GameCenterGroups: Hashable, Codable, RawRepresentable { - case gameCenterAchievements - case gameCenterDetails - case gameCenterLeaderboardSets - case gameCenterLeaderboards - case referenceName - case unknown(String) - - public var rawValue: String { - switch self { - case .gameCenterAchievements: return "gameCenterAchievements" - case .gameCenterDetails: return "gameCenterDetails" - case .gameCenterLeaderboardSets: return "gameCenterLeaderboardSets" - case .gameCenterLeaderboards: return "gameCenterLeaderboards" - case .referenceName: return "referenceName" - case .unknown(let rawValue): return rawValue - } + public struct GameCenterGroups: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var gameCenterAchievements: Self { + .init(rawValue: "gameCenterAchievements") + } + + public static var gameCenterActivities: Self { + .init(rawValue: "gameCenterActivities") + } + + public static var gameCenterChallenges: Self { + .init(rawValue: "gameCenterChallenges") + } + + public static var gameCenterDetails: Self { + .init(rawValue: "gameCenterDetails") + } + + public static var gameCenterLeaderboardSets: Self { + .init(rawValue: "gameCenterLeaderboardSets") + } + + public static var gameCenterLeaderboards: Self { + .init(rawValue: "gameCenterLeaderboards") + } + + public static var referenceName: Self { + .init(rawValue: "referenceName") + } + + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "gameCenterAchievements": self = .gameCenterAchievements - case "gameCenterDetails": self = .gameCenterDetails - case "gameCenterLeaderboardSets": self = .gameCenterLeaderboardSets - case "gameCenterLeaderboards": self = .gameCenterLeaderboards - case "referenceName": self = .referenceName - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } @@ -322,6 +450,11 @@ extension V1.GameCenterGroups.ById.GameCenterAchievements.GET { .init(key: "fields[gameCenterAchievements]") } + /// the fields to include for returned resources of type gameCenterActivities + public static var gameCenterActivities: Relation<[GameCenterActivities]?> { + .init(key: "fields[gameCenterActivities]") + } + /// the fields to include for returned resources of type gameCenterDetails public static var gameCenterDetails: Relation<[GameCenterDetails]?> { .init(key: "fields[gameCenterDetails]") @@ -372,34 +505,39 @@ extension V1.GameCenterGroups.ById.GameCenterAchievements.GET { } } - public enum Include: Hashable, Codable, RawRepresentable { - case gameCenterDetail - case gameCenterGroup - case groupAchievement - case localizations - case releases - case unknown(String) - - public var rawValue: String { - switch self { - case .gameCenterDetail: return "gameCenterDetail" - case .gameCenterGroup: return "gameCenterGroup" - case .groupAchievement: return "groupAchievement" - case .localizations: return "localizations" - case .releases: return "releases" - case .unknown(let rawValue): return rawValue - } + public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var activity: Self { + .init(rawValue: "activity") } + public static var gameCenterDetail: Self { + .init(rawValue: "gameCenterDetail") + } + + public static var gameCenterGroup: Self { + .init(rawValue: "gameCenterGroup") + } + + public static var groupAchievement: Self { + .init(rawValue: "groupAchievement") + } + + public static var localizations: Self { + .init(rawValue: "localizations") + } + + public static var releases: Self { + .init(rawValue: "releases") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "gameCenterDetail": self = .gameCenterDetail - case "gameCenterGroup": self = .gameCenterGroup - case "groupAchievement": self = .groupAchievement - case "localizations": self = .localizations - case "releases": self = .releases - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterGroups/ById/GameCenterActivities/GameCenterGroupsByIdGameCenterActivities.GET.23eb322.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterGroups/ById/GameCenterActivities/GameCenterGroupsByIdGameCenterActivities.GET.23eb322.generated.swift new file mode 100644 index 00000000..e0441b8e --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterGroups/ById/GameCenterActivities/GameCenterGroupsByIdGameCenterActivities.GET.23eb322.generated.swift @@ -0,0 +1,617 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.GameCenterGroups.ById.GameCenterActivities { + public struct GET: Endpoint { + public typealias Response = GameCenterActivitiesResponse + + public var path: String { + "/v1/gameCenterGroups/\(id)/gameCenterActivities" + } + + /// the id of the requested resource + public var id: String + + public var parameters: Parameters = Parameters() + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + components?.queryItems = [ + URLQueryItem(name: "fields[gameCenterAchievements]", + value: parameters.fields[.gameCenterAchievements]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "fields[gameCenterActivities]", + value: parameters.fields[.gameCenterActivities]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "fields[gameCenterActivityVersions]", + value: parameters.fields[.gameCenterActivityVersions]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "fields[gameCenterDetails]", + value: parameters.fields[.gameCenterDetails]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "fields[gameCenterGroups]", + value: parameters.fields[.gameCenterGroups]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "fields[gameCenterLeaderboards]", + value: parameters.fields[.gameCenterLeaderboards]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "include", + value: parameters.include?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "limit[achievements]", + value: parameters.limit[.achievements].map { "\($0)" }), + URLQueryItem(name: "limit[leaderboards]", + value: parameters.limit[.leaderboards].map { "\($0)" }), + URLQueryItem(name: "limit[versions]", + value: parameters.limit[.versions].map { "\($0)" }), + URLQueryItem(name: "limit", + value: parameters.limit[].map { "\($0)" }) + ].filter { $0.value != nil } + if components?.queryItems?.isEmpty ?? false { + components?.queryItems = nil + } + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "GET" + return urlRequest + } + + /// - Returns: **200**, List of GameCenterActivities as `GameCenterActivitiesResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(GameCenterActivitiesResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +extension V1.GameCenterGroups.ById.GameCenterActivities.GET { + public struct Parameters: Hashable { + public var fields: Fields = Fields() + + /// comma-separated list of relationships to include + public var include: [Include]? + + /// maximum resources per page + public var limit: Limit = Limit() + + public struct Fields: Hashable { + public subscript (_ relation: Relation) -> T { + get { values[relation]?.base as! T } + set { values[relation] = AnyHashable(newValue) } + } + + private var values: [AnyHashable: AnyHashable] = [:] + + public struct GameCenterAchievements: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var activity: Self { + .init(rawValue: "activity") + } + + public static var activityProperties: Self { + .init(rawValue: "activityProperties") + } + + public static var archived: Self { + .init(rawValue: "archived") + } + + public static var gameCenterDetail: Self { + .init(rawValue: "gameCenterDetail") + } + + public static var gameCenterGroup: Self { + .init(rawValue: "gameCenterGroup") + } + + public static var groupAchievement: Self { + .init(rawValue: "groupAchievement") + } + + public static var localizations: Self { + .init(rawValue: "localizations") + } + + public static var points: Self { + .init(rawValue: "points") + } + + public static var referenceName: Self { + .init(rawValue: "referenceName") + } + + public static var releases: Self { + .init(rawValue: "releases") + } + + public static var repeatable: Self { + .init(rawValue: "repeatable") + } + + public static var showBeforeEarned: Self { + .init(rawValue: "showBeforeEarned") + } + + public static var vendorIdentifier: Self { + .init(rawValue: "vendorIdentifier") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct GameCenterActivities: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var achievements: Self { + .init(rawValue: "achievements") + } + + public static var archived: Self { + .init(rawValue: "archived") + } + + public static var gameCenterDetail: Self { + .init(rawValue: "gameCenterDetail") + } + + public static var gameCenterGroup: Self { + .init(rawValue: "gameCenterGroup") + } + + public static var leaderboards: Self { + .init(rawValue: "leaderboards") + } + + public static var maximumPlayersCount: Self { + .init(rawValue: "maximumPlayersCount") + } + + public static var minimumPlayersCount: Self { + .init(rawValue: "minimumPlayersCount") + } + + public static var playStyle: Self { + .init(rawValue: "playStyle") + } + + public static var properties: Self { + .init(rawValue: "properties") + } + + public static var referenceName: Self { + .init(rawValue: "referenceName") + } + + public static var supportsPartyCode: Self { + .init(rawValue: "supportsPartyCode") + } + + public static var vendorIdentifier: Self { + .init(rawValue: "vendorIdentifier") + } + + public static var versions: Self { + .init(rawValue: "versions") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct GameCenterActivityVersions: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var activity: Self { + .init(rawValue: "activity") + } + + public static var defaultImage: Self { + .init(rawValue: "defaultImage") + } + + public static var fallbackUrl: Self { + .init(rawValue: "fallbackUrl") + } + + public static var localizations: Self { + .init(rawValue: "localizations") + } + + public static var releases: Self { + .init(rawValue: "releases") + } + + public static var state: Self { + .init(rawValue: "state") + } + + public static var version: Self { + .init(rawValue: "version") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct GameCenterDetails: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var achievementReleases: Self { + .init(rawValue: "achievementReleases") + } + + public static var activityReleases: Self { + .init(rawValue: "activityReleases") + } + + public static var app: Self { + .init(rawValue: "app") + } + + public static var arcadeEnabled: Self { + .init(rawValue: "arcadeEnabled") + } + + public static var challengeEnabled: Self { + .init(rawValue: "challengeEnabled") + } + + public static var challengeReleases: Self { + .init(rawValue: "challengeReleases") + } + + public static var challengesMinimumPlatformVersions: Self { + .init(rawValue: "challengesMinimumPlatformVersions") + } + + public static var defaultGroupLeaderboard: Self { + .init(rawValue: "defaultGroupLeaderboard") + } + + public static var defaultLeaderboard: Self { + .init(rawValue: "defaultLeaderboard") + } + + public static var gameCenterAchievements: Self { + .init(rawValue: "gameCenterAchievements") + } + + public static var gameCenterActivities: Self { + .init(rawValue: "gameCenterActivities") + } + + public static var gameCenterAppVersions: Self { + .init(rawValue: "gameCenterAppVersions") + } + + public static var gameCenterChallenges: Self { + .init(rawValue: "gameCenterChallenges") + } + + public static var gameCenterGroup: Self { + .init(rawValue: "gameCenterGroup") + } + + public static var gameCenterLeaderboardSets: Self { + .init(rawValue: "gameCenterLeaderboardSets") + } + + public static var gameCenterLeaderboards: Self { + .init(rawValue: "gameCenterLeaderboards") + } + + public static var leaderboardReleases: Self { + .init(rawValue: "leaderboardReleases") + } + + public static var leaderboardSetReleases: Self { + .init(rawValue: "leaderboardSetReleases") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct GameCenterGroups: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var gameCenterAchievements: Self { + .init(rawValue: "gameCenterAchievements") + } + + public static var gameCenterActivities: Self { + .init(rawValue: "gameCenterActivities") + } + + public static var gameCenterChallenges: Self { + .init(rawValue: "gameCenterChallenges") + } + + public static var gameCenterDetails: Self { + .init(rawValue: "gameCenterDetails") + } + + public static var gameCenterLeaderboardSets: Self { + .init(rawValue: "gameCenterLeaderboardSets") + } + + public static var gameCenterLeaderboards: Self { + .init(rawValue: "gameCenterLeaderboards") + } + + public static var referenceName: Self { + .init(rawValue: "referenceName") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct GameCenterLeaderboards: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var activity: Self { + .init(rawValue: "activity") + } + + public static var activityProperties: Self { + .init(rawValue: "activityProperties") + } + + public static var archived: Self { + .init(rawValue: "archived") + } + + public static var challenge: Self { + .init(rawValue: "challenge") + } + + public static var defaultFormatter: Self { + .init(rawValue: "defaultFormatter") + } + + public static var gameCenterDetail: Self { + .init(rawValue: "gameCenterDetail") + } + + public static var gameCenterGroup: Self { + .init(rawValue: "gameCenterGroup") + } + + public static var gameCenterLeaderboardSets: Self { + .init(rawValue: "gameCenterLeaderboardSets") + } + + public static var groupLeaderboard: Self { + .init(rawValue: "groupLeaderboard") + } + + public static var localizations: Self { + .init(rawValue: "localizations") + } + + public static var recurrenceDuration: Self { + .init(rawValue: "recurrenceDuration") + } + + public static var recurrenceRule: Self { + .init(rawValue: "recurrenceRule") + } + + public static var recurrenceStartDate: Self { + .init(rawValue: "recurrenceStartDate") + } + + public static var referenceName: Self { + .init(rawValue: "referenceName") + } + + public static var releases: Self { + .init(rawValue: "releases") + } + + public static var scoreRangeEnd: Self { + .init(rawValue: "scoreRangeEnd") + } + + public static var scoreRangeStart: Self { + .init(rawValue: "scoreRangeStart") + } + + public static var scoreSortType: Self { + .init(rawValue: "scoreSortType") + } + + public static var submissionType: Self { + .init(rawValue: "submissionType") + } + + public static var vendorIdentifier: Self { + .init(rawValue: "vendorIdentifier") + } + + public static var visibility: Self { + .init(rawValue: "visibility") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct Relation: Hashable { + /// the fields to include for returned resources of type gameCenterAchievements + public static var gameCenterAchievements: Relation<[GameCenterAchievements]?> { + .init(key: "fields[gameCenterAchievements]") + } + + /// the fields to include for returned resources of type gameCenterActivities + public static var gameCenterActivities: Relation<[GameCenterActivities]?> { + .init(key: "fields[gameCenterActivities]") + } + + /// the fields to include for returned resources of type gameCenterActivityVersions + public static var gameCenterActivityVersions: Relation<[GameCenterActivityVersions]?> { + .init(key: "fields[gameCenterActivityVersions]") + } + + /// the fields to include for returned resources of type gameCenterDetails + public static var gameCenterDetails: Relation<[GameCenterDetails]?> { + .init(key: "fields[gameCenterDetails]") + } + + /// the fields to include for returned resources of type gameCenterGroups + public static var gameCenterGroups: Relation<[GameCenterGroups]?> { + .init(key: "fields[gameCenterGroups]") + } + + /// the fields to include for returned resources of type gameCenterLeaderboards + public static var gameCenterLeaderboards: Relation<[GameCenterLeaderboards]?> { + .init(key: "fields[gameCenterLeaderboards]") + } + + internal let key: String + + public func hash(into hasher: inout Hasher) { + hasher.combine(key) + } + } + } + + public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var achievements: Self { + .init(rawValue: "achievements") + } + + public static var gameCenterDetail: Self { + .init(rawValue: "gameCenterDetail") + } + + public static var gameCenterGroup: Self { + .init(rawValue: "gameCenterGroup") + } + + public static var leaderboards: Self { + .init(rawValue: "leaderboards") + } + + public static var versions: Self { + .init(rawValue: "versions") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct Limit: Hashable { + public subscript () -> Int? { + get { self[Relation(key: "limit")] } + set { self[Relation(key: "limit")] = newValue } + } + + public subscript (_ relation: Relation) -> T { + get { values[relation]?.base as! T } + set { values[relation] = AnyHashable(newValue) } + } + + private var values: [AnyHashable: AnyHashable] = [:] + + public struct Relation: Hashable { + /// maximum number of related achievements returned (when they are included) + public static var achievements: Relation { + .init(key: "limit[achievements]") + } + + /// maximum number of related leaderboards returned (when they are included) + public static var leaderboards: Relation { + .init(key: "limit[leaderboards]") + } + + /// maximum number of related versions returned (when they are included) + public static var versions: Relation { + .init(key: "limit[versions]") + } + + internal let key: String + + public func hash(into hasher: inout Hasher) { + hasher.combine(key) + } + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterGroups/ById/GameCenterChallenges/GameCenterGroupsByIdGameCenterChallenges.GET.29ff21f.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterGroups/ById/GameCenterChallenges/GameCenterGroupsByIdGameCenterChallenges.GET.29ff21f.generated.swift new file mode 100644 index 00000000..bb65defe --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterGroups/ById/GameCenterChallenges/GameCenterGroupsByIdGameCenterChallenges.GET.29ff21f.generated.swift @@ -0,0 +1,552 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.GameCenterGroups.ById.GameCenterChallenges { + public struct GET: Endpoint { + public typealias Response = GameCenterChallengesResponse + + public var path: String { + "/v1/gameCenterGroups/\(id)/gameCenterChallenges" + } + + /// the id of the requested resource + public var id: String + + public var parameters: Parameters = Parameters() + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + components?.queryItems = [ + URLQueryItem(name: "fields[gameCenterChallengeVersions]", + value: parameters.fields[.gameCenterChallengeVersions]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "fields[gameCenterChallenges]", + value: parameters.fields[.gameCenterChallenges]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "fields[gameCenterDetails]", + value: parameters.fields[.gameCenterDetails]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "fields[gameCenterGroups]", + value: parameters.fields[.gameCenterGroups]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "fields[gameCenterLeaderboards]", + value: parameters.fields[.gameCenterLeaderboards]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "filter[archived]", + value: parameters.filter[.archived]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "filter[id]", + value: parameters.filter[.id]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "filter[referenceName]", + value: parameters.filter[.referenceName]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "include", + value: parameters.include?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "limit[versions]", + value: parameters.limit[.versions].map { "\($0)" }), + URLQueryItem(name: "limit", + value: parameters.limit[].map { "\($0)" }) + ].filter { $0.value != nil } + if components?.queryItems?.isEmpty ?? false { + components?.queryItems = nil + } + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "GET" + return urlRequest + } + + /// - Returns: **200**, List of GameCenterChallenges as `GameCenterChallengesResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(GameCenterChallengesResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +extension V1.GameCenterGroups.ById.GameCenterChallenges.GET { + public struct Parameters: Hashable { + public var fields: Fields = Fields() + + public var filter: Filter = Filter() + + /// comma-separated list of relationships to include + public var include: [Include]? + + /// maximum resources per page + public var limit: Limit = Limit() + + public struct Fields: Hashable { + public subscript (_ relation: Relation) -> T { + get { values[relation]?.base as! T } + set { values[relation] = AnyHashable(newValue) } + } + + private var values: [AnyHashable: AnyHashable] = [:] + + public struct GameCenterChallengeVersions: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var challenge: Self { + .init(rawValue: "challenge") + } + + public static var defaultImage: Self { + .init(rawValue: "defaultImage") + } + + public static var localizations: Self { + .init(rawValue: "localizations") + } + + public static var releases: Self { + .init(rawValue: "releases") + } + + public static var state: Self { + .init(rawValue: "state") + } + + public static var version: Self { + .init(rawValue: "version") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct GameCenterChallenges: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var allowedDurations: Self { + .init(rawValue: "allowedDurations") + } + + public static var archived: Self { + .init(rawValue: "archived") + } + + public static var challengeType: Self { + .init(rawValue: "challengeType") + } + + public static var gameCenterDetail: Self { + .init(rawValue: "gameCenterDetail") + } + + public static var gameCenterGroup: Self { + .init(rawValue: "gameCenterGroup") + } + + public static var leaderboard: Self { + .init(rawValue: "leaderboard") + } + + public static var referenceName: Self { + .init(rawValue: "referenceName") + } + + public static var repeatable: Self { + .init(rawValue: "repeatable") + } + + public static var vendorIdentifier: Self { + .init(rawValue: "vendorIdentifier") + } + + public static var versions: Self { + .init(rawValue: "versions") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct GameCenterDetails: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var achievementReleases: Self { + .init(rawValue: "achievementReleases") + } + + public static var activityReleases: Self { + .init(rawValue: "activityReleases") + } + + public static var app: Self { + .init(rawValue: "app") + } + + public static var arcadeEnabled: Self { + .init(rawValue: "arcadeEnabled") + } + + public static var challengeEnabled: Self { + .init(rawValue: "challengeEnabled") + } + + public static var challengeReleases: Self { + .init(rawValue: "challengeReleases") + } + + public static var challengesMinimumPlatformVersions: Self { + .init(rawValue: "challengesMinimumPlatformVersions") + } + + public static var defaultGroupLeaderboard: Self { + .init(rawValue: "defaultGroupLeaderboard") + } + + public static var defaultLeaderboard: Self { + .init(rawValue: "defaultLeaderboard") + } + + public static var gameCenterAchievements: Self { + .init(rawValue: "gameCenterAchievements") + } + + public static var gameCenterActivities: Self { + .init(rawValue: "gameCenterActivities") + } + + public static var gameCenterAppVersions: Self { + .init(rawValue: "gameCenterAppVersions") + } + + public static var gameCenterChallenges: Self { + .init(rawValue: "gameCenterChallenges") + } + + public static var gameCenterGroup: Self { + .init(rawValue: "gameCenterGroup") + } + + public static var gameCenterLeaderboardSets: Self { + .init(rawValue: "gameCenterLeaderboardSets") + } + + public static var gameCenterLeaderboards: Self { + .init(rawValue: "gameCenterLeaderboards") + } + + public static var leaderboardReleases: Self { + .init(rawValue: "leaderboardReleases") + } + + public static var leaderboardSetReleases: Self { + .init(rawValue: "leaderboardSetReleases") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct GameCenterGroups: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var gameCenterAchievements: Self { + .init(rawValue: "gameCenterAchievements") + } + + public static var gameCenterActivities: Self { + .init(rawValue: "gameCenterActivities") + } + + public static var gameCenterChallenges: Self { + .init(rawValue: "gameCenterChallenges") + } + + public static var gameCenterDetails: Self { + .init(rawValue: "gameCenterDetails") + } + + public static var gameCenterLeaderboardSets: Self { + .init(rawValue: "gameCenterLeaderboardSets") + } + + public static var gameCenterLeaderboards: Self { + .init(rawValue: "gameCenterLeaderboards") + } + + public static var referenceName: Self { + .init(rawValue: "referenceName") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct GameCenterLeaderboards: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var activity: Self { + .init(rawValue: "activity") + } + + public static var activityProperties: Self { + .init(rawValue: "activityProperties") + } + + public static var archived: Self { + .init(rawValue: "archived") + } + + public static var challenge: Self { + .init(rawValue: "challenge") + } + + public static var defaultFormatter: Self { + .init(rawValue: "defaultFormatter") + } + + public static var gameCenterDetail: Self { + .init(rawValue: "gameCenterDetail") + } + + public static var gameCenterGroup: Self { + .init(rawValue: "gameCenterGroup") + } + + public static var gameCenterLeaderboardSets: Self { + .init(rawValue: "gameCenterLeaderboardSets") + } + + public static var groupLeaderboard: Self { + .init(rawValue: "groupLeaderboard") + } + + public static var localizations: Self { + .init(rawValue: "localizations") + } + + public static var recurrenceDuration: Self { + .init(rawValue: "recurrenceDuration") + } + + public static var recurrenceRule: Self { + .init(rawValue: "recurrenceRule") + } + + public static var recurrenceStartDate: Self { + .init(rawValue: "recurrenceStartDate") + } + + public static var referenceName: Self { + .init(rawValue: "referenceName") + } + + public static var releases: Self { + .init(rawValue: "releases") + } + + public static var scoreRangeEnd: Self { + .init(rawValue: "scoreRangeEnd") + } + + public static var scoreRangeStart: Self { + .init(rawValue: "scoreRangeStart") + } + + public static var scoreSortType: Self { + .init(rawValue: "scoreSortType") + } + + public static var submissionType: Self { + .init(rawValue: "submissionType") + } + + public static var vendorIdentifier: Self { + .init(rawValue: "vendorIdentifier") + } + + public static var visibility: Self { + .init(rawValue: "visibility") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct Relation: Hashable { + /// the fields to include for returned resources of type gameCenterChallengeVersions + public static var gameCenterChallengeVersions: Relation<[GameCenterChallengeVersions]?> { + .init(key: "fields[gameCenterChallengeVersions]") + } + + /// the fields to include for returned resources of type gameCenterChallenges + public static var gameCenterChallenges: Relation<[GameCenterChallenges]?> { + .init(key: "fields[gameCenterChallenges]") + } + + /// the fields to include for returned resources of type gameCenterDetails + public static var gameCenterDetails: Relation<[GameCenterDetails]?> { + .init(key: "fields[gameCenterDetails]") + } + + /// the fields to include for returned resources of type gameCenterGroups + public static var gameCenterGroups: Relation<[GameCenterGroups]?> { + .init(key: "fields[gameCenterGroups]") + } + + /// the fields to include for returned resources of type gameCenterLeaderboards + public static var gameCenterLeaderboards: Relation<[GameCenterLeaderboards]?> { + .init(key: "fields[gameCenterLeaderboards]") + } + + internal let key: String + + public func hash(into hasher: inout Hasher) { + hasher.combine(key) + } + } + } + + public struct Filter: Hashable { + public subscript (_ relation: Relation) -> T { + get { values[relation]?.base as! T } + set { values[relation] = AnyHashable(newValue) } + } + + private var values: [AnyHashable: AnyHashable] = [:] + + public struct Relation: Hashable { + /// filter by attribute 'archived' + public static var archived: Relation<[String]?> { + .init(key: "filter[archived]") + } + + /// filter by id(s) + public static var id: Relation<[String]?> { + .init(key: "filter[id]") + } + + /// filter by attribute 'referenceName' + public static var referenceName: Relation<[String]?> { + .init(key: "filter[referenceName]") + } + + internal let key: String + + public func hash(into hasher: inout Hasher) { + hasher.combine(key) + } + } + } + + public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var gameCenterDetail: Self { + .init(rawValue: "gameCenterDetail") + } + + public static var gameCenterGroup: Self { + .init(rawValue: "gameCenterGroup") + } + + public static var leaderboard: Self { + .init(rawValue: "leaderboard") + } + + public static var versions: Self { + .init(rawValue: "versions") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct Limit: Hashable { + public subscript () -> Int? { + get { self[Relation(key: "limit")] } + set { self[Relation(key: "limit")] = newValue } + } + + public subscript (_ relation: Relation) -> T { + get { values[relation]?.base as! T } + set { values[relation] = AnyHashable(newValue) } + } + + private var values: [AnyHashable: AnyHashable] = [:] + + public struct Relation: Hashable { + /// maximum number of related versions returned (when they are included) + public static var versions: Relation { + .init(key: "limit[versions]") + } + + internal let key: String + + public func hash(into hasher: inout Hasher) { + hasher.combine(key) + } + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterGroups/ById/GameCenterDetails/GameCenterGroupsByIdGameCenterDetails.GET.1a856a2.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterGroups/ById/GameCenterDetails/GameCenterGroupsByIdGameCenterDetails.GET.1a856a2.generated.swift index e6ca089f..7d4a57f7 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterGroups/ById/GameCenterDetails/GameCenterGroupsByIdGameCenterDetails.GET.1a856a2.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterGroups/ById/GameCenterDetails/GameCenterGroupsByIdGameCenterDetails.GET.1a856a2.generated.swift @@ -28,14 +28,24 @@ extension V1.GameCenterGroups.ById.GameCenterDetails { components?.path = path components?.queryItems = [ + URLQueryItem(name: "fields[appStoreVersions]", + value: parameters.fields[.appStoreVersions]?.map { "\($0)" }.joined(separator: ",")), URLQueryItem(name: "fields[apps]", value: parameters.fields[.apps]?.map { "\($0)" }.joined(separator: ",")), URLQueryItem(name: "fields[gameCenterAchievementReleases]", value: parameters.fields[.gameCenterAchievementReleases]?.map { "\($0)" }.joined(separator: ",")), URLQueryItem(name: "fields[gameCenterAchievements]", value: parameters.fields[.gameCenterAchievements]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "fields[gameCenterActivities]", + value: parameters.fields[.gameCenterActivities]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "fields[gameCenterActivityVersionReleases]", + value: parameters.fields[.gameCenterActivityVersionReleases]?.map { "\($0)" }.joined(separator: ",")), URLQueryItem(name: "fields[gameCenterAppVersions]", value: parameters.fields[.gameCenterAppVersions]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "fields[gameCenterChallengeVersionReleases]", + value: parameters.fields[.gameCenterChallengeVersionReleases]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "fields[gameCenterChallenges]", + value: parameters.fields[.gameCenterChallenges]?.map { "\($0)" }.joined(separator: ",")), URLQueryItem(name: "fields[gameCenterDetails]", value: parameters.fields[.gameCenterDetails]?.map { "\($0)" }.joined(separator: ",")), URLQueryItem(name: "fields[gameCenterGroups]", @@ -54,10 +64,20 @@ extension V1.GameCenterGroups.ById.GameCenterDetails { value: parameters.include?.map { "\($0)" }.joined(separator: ",")), URLQueryItem(name: "limit[achievementReleases]", value: parameters.limit[.achievementReleases].map { "\($0)" }), + URLQueryItem(name: "limit[activityReleases]", + value: parameters.limit[.activityReleases].map { "\($0)" }), + URLQueryItem(name: "limit[challengeReleases]", + value: parameters.limit[.challengeReleases].map { "\($0)" }), + URLQueryItem(name: "limit[challengesMinimumPlatformVersions]", + value: parameters.limit[.challengesMinimumPlatformVersions].map { "\($0)" }), URLQueryItem(name: "limit[gameCenterAchievements]", value: parameters.limit[.gameCenterAchievements].map { "\($0)" }), + URLQueryItem(name: "limit[gameCenterActivities]", + value: parameters.limit[.gameCenterActivities].map { "\($0)" }), URLQueryItem(name: "limit[gameCenterAppVersions]", value: parameters.limit[.gameCenterAppVersions].map { "\($0)" }), + URLQueryItem(name: "limit[gameCenterChallenges]", + value: parameters.limit[.gameCenterChallenges].map { "\($0)" }), URLQueryItem(name: "limit[gameCenterLeaderboardSets]", value: parameters.limit[.gameCenterLeaderboardSets].map { "\($0)" }), URLQueryItem(name: "limit[gameCenterLeaderboards]", @@ -80,8 +100,10 @@ extension V1.GameCenterGroups.ById.GameCenterDetails { /// - Returns: **200**, List of GameCenterDetails as `GameCenterDetailsResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -95,12 +117,18 @@ extension V1.GameCenterGroups.ById.GameCenterDetails { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 404: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -128,497 +156,908 @@ extension V1.GameCenterGroups.ById.GameCenterDetails.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum Apps: Hashable, Codable, RawRepresentable { - case appAvailability - case appClips - case appCustomProductPages - case appEncryptionDeclarations - case appEvents - case appInfos - case appPricePoints - case appPriceSchedule - case appStoreVersionExperimentsV2 - case appStoreVersions - case availableInNewTerritories - case availableTerritories - case betaAppLocalizations - case betaAppReviewDetail - case betaGroups - case betaLicenseAgreement - case betaTesters - case builds - case bundleId - case ciProduct - case contentRightsDeclaration - case customerReviews - case endUserLicenseAgreement - case gameCenterDetail - case gameCenterEnabledVersions - case inAppPurchases - case inAppPurchasesV2 - case isOrEverWasMadeForKids - case name - case perfPowerMetrics - case preOrder - case preReleaseVersions - case pricePoints - case prices - case primaryLocale - case promotedPurchases - case reviewSubmissions - case sku - case subscriptionGracePeriod - case subscriptionGroups - case subscriptionStatusUrl - case subscriptionStatusUrlForSandbox - case subscriptionStatusUrlVersion - case subscriptionStatusUrlVersionForSandbox - case unknown(String) - - public var rawValue: String { - switch self { - case .appAvailability: return "appAvailability" - case .appClips: return "appClips" - case .appCustomProductPages: return "appCustomProductPages" - case .appEncryptionDeclarations: return "appEncryptionDeclarations" - case .appEvents: return "appEvents" - case .appInfos: return "appInfos" - case .appPricePoints: return "appPricePoints" - case .appPriceSchedule: return "appPriceSchedule" - case .appStoreVersionExperimentsV2: return "appStoreVersionExperimentsV2" - case .appStoreVersions: return "appStoreVersions" - case .availableInNewTerritories: return "availableInNewTerritories" - case .availableTerritories: return "availableTerritories" - case .betaAppLocalizations: return "betaAppLocalizations" - case .betaAppReviewDetail: return "betaAppReviewDetail" - case .betaGroups: return "betaGroups" - case .betaLicenseAgreement: return "betaLicenseAgreement" - case .betaTesters: return "betaTesters" - case .builds: return "builds" - case .bundleId: return "bundleId" - case .ciProduct: return "ciProduct" - case .contentRightsDeclaration: return "contentRightsDeclaration" - case .customerReviews: return "customerReviews" - case .endUserLicenseAgreement: return "endUserLicenseAgreement" - case .gameCenterDetail: return "gameCenterDetail" - case .gameCenterEnabledVersions: return "gameCenterEnabledVersions" - case .inAppPurchases: return "inAppPurchases" - case .inAppPurchasesV2: return "inAppPurchasesV2" - case .isOrEverWasMadeForKids: return "isOrEverWasMadeForKids" - case .name: return "name" - case .perfPowerMetrics: return "perfPowerMetrics" - case .preOrder: return "preOrder" - case .preReleaseVersions: return "preReleaseVersions" - case .pricePoints: return "pricePoints" - case .prices: return "prices" - case .primaryLocale: return "primaryLocale" - case .promotedPurchases: return "promotedPurchases" - case .reviewSubmissions: return "reviewSubmissions" - case .sku: return "sku" - case .subscriptionGracePeriod: return "subscriptionGracePeriod" - case .subscriptionGroups: return "subscriptionGroups" - case .subscriptionStatusUrl: return "subscriptionStatusUrl" - case .subscriptionStatusUrlForSandbox: return "subscriptionStatusUrlForSandbox" - case .subscriptionStatusUrlVersion: return "subscriptionStatusUrlVersion" - case .subscriptionStatusUrlVersionForSandbox: return "subscriptionStatusUrlVersionForSandbox" - case .unknown(let rawValue): return rawValue - } + public struct AppStoreVersions: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var ageRatingDeclaration: Self { + .init(rawValue: "ageRatingDeclaration") + } + + public static var alternativeDistributionPackage: Self { + .init(rawValue: "alternativeDistributionPackage") + } + + public static var app: Self { + .init(rawValue: "app") + } + + public static var appClipDefaultExperience: Self { + .init(rawValue: "appClipDefaultExperience") + } + + public static var appStoreReviewDetail: Self { + .init(rawValue: "appStoreReviewDetail") + } + + public static var appStoreState: Self { + .init(rawValue: "appStoreState") + } + + public static var appStoreVersionExperiments: Self { + .init(rawValue: "appStoreVersionExperiments") } + public static var appStoreVersionExperimentsV2: Self { + .init(rawValue: "appStoreVersionExperimentsV2") + } + + public static var appStoreVersionLocalizations: Self { + .init(rawValue: "appStoreVersionLocalizations") + } + + public static var appStoreVersionPhasedRelease: Self { + .init(rawValue: "appStoreVersionPhasedRelease") + } + + public static var appStoreVersionSubmission: Self { + .init(rawValue: "appStoreVersionSubmission") + } + + public static var appVersionState: Self { + .init(rawValue: "appVersionState") + } + + public static var build: Self { + .init(rawValue: "build") + } + + public static var copyright: Self { + .init(rawValue: "copyright") + } + + public static var createdDate: Self { + .init(rawValue: "createdDate") + } + + public static var customerReviews: Self { + .init(rawValue: "customerReviews") + } + + public static var downloadable: Self { + .init(rawValue: "downloadable") + } + + public static var earliestReleaseDate: Self { + .init(rawValue: "earliestReleaseDate") + } + + public static var gameCenterAppVersion: Self { + .init(rawValue: "gameCenterAppVersion") + } + + public static var platform: Self { + .init(rawValue: "platform") + } + + public static var releaseType: Self { + .init(rawValue: "releaseType") + } + + public static var reviewType: Self { + .init(rawValue: "reviewType") + } + + public static var routingAppCoverage: Self { + .init(rawValue: "routingAppCoverage") + } + + public static var usesIdfa: Self { + .init(rawValue: "usesIdfa") + } + + public static var versionString: Self { + .init(rawValue: "versionString") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "appAvailability": self = .appAvailability - case "appClips": self = .appClips - case "appCustomProductPages": self = .appCustomProductPages - case "appEncryptionDeclarations": self = .appEncryptionDeclarations - case "appEvents": self = .appEvents - case "appInfos": self = .appInfos - case "appPricePoints": self = .appPricePoints - case "appPriceSchedule": self = .appPriceSchedule - case "appStoreVersionExperimentsV2": self = .appStoreVersionExperimentsV2 - case "appStoreVersions": self = .appStoreVersions - case "availableInNewTerritories": self = .availableInNewTerritories - case "availableTerritories": self = .availableTerritories - case "betaAppLocalizations": self = .betaAppLocalizations - case "betaAppReviewDetail": self = .betaAppReviewDetail - case "betaGroups": self = .betaGroups - case "betaLicenseAgreement": self = .betaLicenseAgreement - case "betaTesters": self = .betaTesters - case "builds": self = .builds - case "bundleId": self = .bundleId - case "ciProduct": self = .ciProduct - case "contentRightsDeclaration": self = .contentRightsDeclaration - case "customerReviews": self = .customerReviews - case "endUserLicenseAgreement": self = .endUserLicenseAgreement - case "gameCenterDetail": self = .gameCenterDetail - case "gameCenterEnabledVersions": self = .gameCenterEnabledVersions - case "inAppPurchases": self = .inAppPurchases - case "inAppPurchasesV2": self = .inAppPurchasesV2 - case "isOrEverWasMadeForKids": self = .isOrEverWasMadeForKids - case "name": self = .name - case "perfPowerMetrics": self = .perfPowerMetrics - case "preOrder": self = .preOrder - case "preReleaseVersions": self = .preReleaseVersions - case "pricePoints": self = .pricePoints - case "prices": self = .prices - case "primaryLocale": self = .primaryLocale - case "promotedPurchases": self = .promotedPurchases - case "reviewSubmissions": self = .reviewSubmissions - case "sku": self = .sku - case "subscriptionGracePeriod": self = .subscriptionGracePeriod - case "subscriptionGroups": self = .subscriptionGroups - case "subscriptionStatusUrl": self = .subscriptionStatusUrl - case "subscriptionStatusUrlForSandbox": self = .subscriptionStatusUrlForSandbox - case "subscriptionStatusUrlVersion": self = .subscriptionStatusUrlVersion - case "subscriptionStatusUrlVersionForSandbox": self = .subscriptionStatusUrlVersionForSandbox - default: self = .unknown(rawValue) - } - } - } - - public enum GameCenterAchievementReleases: Hashable, Codable, RawRepresentable { - case gameCenterAchievement - case gameCenterDetail - case live - case unknown(String) - - public var rawValue: String { - switch self { - case .gameCenterAchievement: return "gameCenterAchievement" - case .gameCenterDetail: return "gameCenterDetail" - case .live: return "live" - case .unknown(let rawValue): return rawValue - } + self.rawValue = rawValue + } + } + + public struct Apps: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var accessibilityDeclarations: Self { + .init(rawValue: "accessibilityDeclarations") } + public static var accessibilityUrl: Self { + .init(rawValue: "accessibilityUrl") + } + + public static var alternativeDistributionKey: Self { + .init(rawValue: "alternativeDistributionKey") + } + + public static var analyticsReportRequests: Self { + .init(rawValue: "analyticsReportRequests") + } + + public static var appAvailabilityV2: Self { + .init(rawValue: "appAvailabilityV2") + } + + public static var appClips: Self { + .init(rawValue: "appClips") + } + + public static var appCustomProductPages: Self { + .init(rawValue: "appCustomProductPages") + } + + public static var appEncryptionDeclarations: Self { + .init(rawValue: "appEncryptionDeclarations") + } + + public static var appEvents: Self { + .init(rawValue: "appEvents") + } + + public static var appInfos: Self { + .init(rawValue: "appInfos") + } + + public static var appPricePoints: Self { + .init(rawValue: "appPricePoints") + } + + public static var appPriceSchedule: Self { + .init(rawValue: "appPriceSchedule") + } + + public static var appStoreVersionExperimentsV2: Self { + .init(rawValue: "appStoreVersionExperimentsV2") + } + + public static var appStoreVersions: Self { + .init(rawValue: "appStoreVersions") + } + + public static var backgroundAssets: Self { + .init(rawValue: "backgroundAssets") + } + + public static var betaAppLocalizations: Self { + .init(rawValue: "betaAppLocalizations") + } + + public static var betaAppReviewDetail: Self { + .init(rawValue: "betaAppReviewDetail") + } + + public static var betaFeedbackCrashSubmissions: Self { + .init(rawValue: "betaFeedbackCrashSubmissions") + } + + public static var betaFeedbackScreenshotSubmissions: Self { + .init(rawValue: "betaFeedbackScreenshotSubmissions") + } + + public static var betaGroups: Self { + .init(rawValue: "betaGroups") + } + + public static var betaLicenseAgreement: Self { + .init(rawValue: "betaLicenseAgreement") + } + + public static var betaTesters: Self { + .init(rawValue: "betaTesters") + } + + public static var builds: Self { + .init(rawValue: "builds") + } + + public static var bundleId: Self { + .init(rawValue: "bundleId") + } + + public static var ciProduct: Self { + .init(rawValue: "ciProduct") + } + + public static var contentRightsDeclaration: Self { + .init(rawValue: "contentRightsDeclaration") + } + + public static var customerReviewSummarizations: Self { + .init(rawValue: "customerReviewSummarizations") + } + + public static var customerReviews: Self { + .init(rawValue: "customerReviews") + } + + public static var endUserLicenseAgreement: Self { + .init(rawValue: "endUserLicenseAgreement") + } + + public static var gameCenterDetail: Self { + .init(rawValue: "gameCenterDetail") + } + + public static var gameCenterEnabledVersions: Self { + .init(rawValue: "gameCenterEnabledVersions") + } + + public static var inAppPurchases: Self { + .init(rawValue: "inAppPurchases") + } + + public static var inAppPurchasesV2: Self { + .init(rawValue: "inAppPurchasesV2") + } + + public static var isOrEverWasMadeForKids: Self { + .init(rawValue: "isOrEverWasMadeForKids") + } + + public static var marketplaceSearchDetail: Self { + .init(rawValue: "marketplaceSearchDetail") + } + + public static var name: Self { + .init(rawValue: "name") + } + + public static var perfPowerMetrics: Self { + .init(rawValue: "perfPowerMetrics") + } + + public static var preReleaseVersions: Self { + .init(rawValue: "preReleaseVersions") + } + + public static var primaryLocale: Self { + .init(rawValue: "primaryLocale") + } + + public static var promotedPurchases: Self { + .init(rawValue: "promotedPurchases") + } + + public static var reviewSubmissions: Self { + .init(rawValue: "reviewSubmissions") + } + + public static var sku: Self { + .init(rawValue: "sku") + } + + public static var streamlinedPurchasingEnabled: Self { + .init(rawValue: "streamlinedPurchasingEnabled") + } + + public static var subscriptionGracePeriod: Self { + .init(rawValue: "subscriptionGracePeriod") + } + + public static var subscriptionGroups: Self { + .init(rawValue: "subscriptionGroups") + } + + public static var subscriptionStatusUrl: Self { + .init(rawValue: "subscriptionStatusUrl") + } + + public static var subscriptionStatusUrlForSandbox: Self { + .init(rawValue: "subscriptionStatusUrlForSandbox") + } + + public static var subscriptionStatusUrlVersion: Self { + .init(rawValue: "subscriptionStatusUrlVersion") + } + + public static var subscriptionStatusUrlVersionForSandbox: Self { + .init(rawValue: "subscriptionStatusUrlVersionForSandbox") + } + + public static var webhooks: Self { + .init(rawValue: "webhooks") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "gameCenterAchievement": self = .gameCenterAchievement - case "gameCenterDetail": self = .gameCenterDetail - case "live": self = .live - default: self = .unknown(rawValue) - } - } - } - - public enum GameCenterAchievements: Hashable, Codable, RawRepresentable { - case archived - case gameCenterDetail - case gameCenterGroup - case groupAchievement - case localizations - case points - case referenceName - case releases - case repeatable - case showBeforeEarned - case vendorIdentifier - case unknown(String) - - public var rawValue: String { - switch self { - case .archived: return "archived" - case .gameCenterDetail: return "gameCenterDetail" - case .gameCenterGroup: return "gameCenterGroup" - case .groupAchievement: return "groupAchievement" - case .localizations: return "localizations" - case .points: return "points" - case .referenceName: return "referenceName" - case .releases: return "releases" - case .repeatable: return "repeatable" - case .showBeforeEarned: return "showBeforeEarned" - case .vendorIdentifier: return "vendorIdentifier" - case .unknown(let rawValue): return rawValue - } + self.rawValue = rawValue + } + } + + public struct GameCenterAchievementReleases: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var gameCenterAchievement: Self { + .init(rawValue: "gameCenterAchievement") + } + + public static var gameCenterDetail: Self { + .init(rawValue: "gameCenterDetail") + } + + public static var live: Self { + .init(rawValue: "live") } + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "archived": self = .archived - case "gameCenterDetail": self = .gameCenterDetail - case "gameCenterGroup": self = .gameCenterGroup - case "groupAchievement": self = .groupAchievement - case "localizations": self = .localizations - case "points": self = .points - case "referenceName": self = .referenceName - case "releases": self = .releases - case "repeatable": self = .repeatable - case "showBeforeEarned": self = .showBeforeEarned - case "vendorIdentifier": self = .vendorIdentifier - default: self = .unknown(rawValue) - } - } - } - - public enum GameCenterAppVersions: Hashable, Codable, RawRepresentable { - case appStoreVersion - case compatibilityVersions - case enabled - case unknown(String) - - public var rawValue: String { - switch self { - case .appStoreVersion: return "appStoreVersion" - case .compatibilityVersions: return "compatibilityVersions" - case .enabled: return "enabled" - case .unknown(let rawValue): return rawValue - } + self.rawValue = rawValue + } + } + + public struct GameCenterAchievements: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var activity: Self { + .init(rawValue: "activity") + } + + public static var activityProperties: Self { + .init(rawValue: "activityProperties") + } + + public static var archived: Self { + .init(rawValue: "archived") + } + + public static var gameCenterDetail: Self { + .init(rawValue: "gameCenterDetail") + } + + public static var gameCenterGroup: Self { + .init(rawValue: "gameCenterGroup") + } + + public static var groupAchievement: Self { + .init(rawValue: "groupAchievement") + } + + public static var localizations: Self { + .init(rawValue: "localizations") + } + + public static var points: Self { + .init(rawValue: "points") + } + + public static var referenceName: Self { + .init(rawValue: "referenceName") + } + + public static var releases: Self { + .init(rawValue: "releases") + } + + public static var repeatable: Self { + .init(rawValue: "repeatable") + } + + public static var showBeforeEarned: Self { + .init(rawValue: "showBeforeEarned") + } + + public static var vendorIdentifier: Self { + .init(rawValue: "vendorIdentifier") } + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "appStoreVersion": self = .appStoreVersion - case "compatibilityVersions": self = .compatibilityVersions - case "enabled": self = .enabled - default: self = .unknown(rawValue) - } - } - } - - public enum GameCenterDetails: Hashable, Codable, RawRepresentable { - case achievementReleases - case app - case arcadeEnabled - case challengeEnabled - case defaultGroupLeaderboard - case defaultLeaderboard - case gameCenterAchievements - case gameCenterAppVersions - case gameCenterGroup - case gameCenterLeaderboardSets - case gameCenterLeaderboards - case leaderboardReleases - case leaderboardSetReleases - case unknown(String) - - public var rawValue: String { - switch self { - case .achievementReleases: return "achievementReleases" - case .app: return "app" - case .arcadeEnabled: return "arcadeEnabled" - case .challengeEnabled: return "challengeEnabled" - case .defaultGroupLeaderboard: return "defaultGroupLeaderboard" - case .defaultLeaderboard: return "defaultLeaderboard" - case .gameCenterAchievements: return "gameCenterAchievements" - case .gameCenterAppVersions: return "gameCenterAppVersions" - case .gameCenterGroup: return "gameCenterGroup" - case .gameCenterLeaderboardSets: return "gameCenterLeaderboardSets" - case .gameCenterLeaderboards: return "gameCenterLeaderboards" - case .leaderboardReleases: return "leaderboardReleases" - case .leaderboardSetReleases: return "leaderboardSetReleases" - case .unknown(let rawValue): return rawValue - } + self.rawValue = rawValue + } + } + + public struct GameCenterActivities: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var achievements: Self { + .init(rawValue: "achievements") + } + + public static var archived: Self { + .init(rawValue: "archived") + } + + public static var gameCenterDetail: Self { + .init(rawValue: "gameCenterDetail") + } + + public static var gameCenterGroup: Self { + .init(rawValue: "gameCenterGroup") + } + + public static var leaderboards: Self { + .init(rawValue: "leaderboards") + } + + public static var maximumPlayersCount: Self { + .init(rawValue: "maximumPlayersCount") + } + + public static var minimumPlayersCount: Self { + .init(rawValue: "minimumPlayersCount") + } + + public static var playStyle: Self { + .init(rawValue: "playStyle") + } + + public static var properties: Self { + .init(rawValue: "properties") + } + + public static var referenceName: Self { + .init(rawValue: "referenceName") + } + + public static var supportsPartyCode: Self { + .init(rawValue: "supportsPartyCode") + } + + public static var vendorIdentifier: Self { + .init(rawValue: "vendorIdentifier") + } + + public static var versions: Self { + .init(rawValue: "versions") } + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "achievementReleases": self = .achievementReleases - case "app": self = .app - case "arcadeEnabled": self = .arcadeEnabled - case "challengeEnabled": self = .challengeEnabled - case "defaultGroupLeaderboard": self = .defaultGroupLeaderboard - case "defaultLeaderboard": self = .defaultLeaderboard - case "gameCenterAchievements": self = .gameCenterAchievements - case "gameCenterAppVersions": self = .gameCenterAppVersions - case "gameCenterGroup": self = .gameCenterGroup - case "gameCenterLeaderboardSets": self = .gameCenterLeaderboardSets - case "gameCenterLeaderboards": self = .gameCenterLeaderboards - case "leaderboardReleases": self = .leaderboardReleases - case "leaderboardSetReleases": self = .leaderboardSetReleases - default: self = .unknown(rawValue) - } - } - } - - public enum GameCenterGroups: Hashable, Codable, RawRepresentable { - case gameCenterAchievements - case gameCenterDetails - case gameCenterLeaderboardSets - case gameCenterLeaderboards - case referenceName - case unknown(String) - - public var rawValue: String { - switch self { - case .gameCenterAchievements: return "gameCenterAchievements" - case .gameCenterDetails: return "gameCenterDetails" - case .gameCenterLeaderboardSets: return "gameCenterLeaderboardSets" - case .gameCenterLeaderboards: return "gameCenterLeaderboards" - case .referenceName: return "referenceName" - case .unknown(let rawValue): return rawValue - } + self.rawValue = rawValue + } + } + + public struct GameCenterActivityVersionReleases: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var version: Self { + .init(rawValue: "version") + } + + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "gameCenterAchievements": self = .gameCenterAchievements - case "gameCenterDetails": self = .gameCenterDetails - case "gameCenterLeaderboardSets": self = .gameCenterLeaderboardSets - case "gameCenterLeaderboards": self = .gameCenterLeaderboards - case "referenceName": self = .referenceName - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum GameCenterLeaderboardReleases: Hashable, Codable, RawRepresentable { - case gameCenterDetail - case gameCenterLeaderboard - case live - case unknown(String) + public struct GameCenterAppVersions: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var appStoreVersion: Self { + .init(rawValue: "appStoreVersion") + } + + public static var compatibilityVersions: Self { + .init(rawValue: "compatibilityVersions") + } - public var rawValue: String { - switch self { - case .gameCenterDetail: return "gameCenterDetail" - case .gameCenterLeaderboard: return "gameCenterLeaderboard" - case .live: return "live" - case .unknown(let rawValue): return rawValue - } + public static var enabled: Self { + .init(rawValue: "enabled") } + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "gameCenterDetail": self = .gameCenterDetail - case "gameCenterLeaderboard": self = .gameCenterLeaderboard - case "live": self = .live - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum GameCenterLeaderboardSetReleases: Hashable, Codable, RawRepresentable { - case gameCenterDetail - case gameCenterLeaderboardSet - case live - case unknown(String) + public struct GameCenterChallengeVersionReleases: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var version: Self { + .init(rawValue: "version") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct GameCenterChallenges: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var allowedDurations: Self { + .init(rawValue: "allowedDurations") + } + + public static var archived: Self { + .init(rawValue: "archived") + } + + public static var challengeType: Self { + .init(rawValue: "challengeType") + } + + public static var gameCenterDetail: Self { + .init(rawValue: "gameCenterDetail") + } + + public static var gameCenterGroup: Self { + .init(rawValue: "gameCenterGroup") + } + + public static var leaderboard: Self { + .init(rawValue: "leaderboard") + } + + public static var referenceName: Self { + .init(rawValue: "referenceName") + } + + public static var repeatable: Self { + .init(rawValue: "repeatable") + } + + public static var vendorIdentifier: Self { + .init(rawValue: "vendorIdentifier") + } + + public static var versions: Self { + .init(rawValue: "versions") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct GameCenterDetails: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var achievementReleases: Self { + .init(rawValue: "achievementReleases") + } + + public static var activityReleases: Self { + .init(rawValue: "activityReleases") + } + + public static var app: Self { + .init(rawValue: "app") + } + + public static var arcadeEnabled: Self { + .init(rawValue: "arcadeEnabled") + } + + public static var challengeEnabled: Self { + .init(rawValue: "challengeEnabled") + } + + public static var challengeReleases: Self { + .init(rawValue: "challengeReleases") + } + + public static var challengesMinimumPlatformVersions: Self { + .init(rawValue: "challengesMinimumPlatformVersions") + } + + public static var defaultGroupLeaderboard: Self { + .init(rawValue: "defaultGroupLeaderboard") + } + + public static var defaultLeaderboard: Self { + .init(rawValue: "defaultLeaderboard") + } + + public static var gameCenterAchievements: Self { + .init(rawValue: "gameCenterAchievements") + } + + public static var gameCenterActivities: Self { + .init(rawValue: "gameCenterActivities") + } + + public static var gameCenterAppVersions: Self { + .init(rawValue: "gameCenterAppVersions") + } + + public static var gameCenterChallenges: Self { + .init(rawValue: "gameCenterChallenges") + } + + public static var gameCenterGroup: Self { + .init(rawValue: "gameCenterGroup") + } + + public static var gameCenterLeaderboardSets: Self { + .init(rawValue: "gameCenterLeaderboardSets") + } + + public static var gameCenterLeaderboards: Self { + .init(rawValue: "gameCenterLeaderboards") + } + + public static var leaderboardReleases: Self { + .init(rawValue: "leaderboardReleases") + } + + public static var leaderboardSetReleases: Self { + .init(rawValue: "leaderboardSetReleases") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct GameCenterGroups: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var gameCenterAchievements: Self { + .init(rawValue: "gameCenterAchievements") + } + + public static var gameCenterActivities: Self { + .init(rawValue: "gameCenterActivities") + } + + public static var gameCenterChallenges: Self { + .init(rawValue: "gameCenterChallenges") + } + + public static var gameCenterDetails: Self { + .init(rawValue: "gameCenterDetails") + } + + public static var gameCenterLeaderboardSets: Self { + .init(rawValue: "gameCenterLeaderboardSets") + } + + public static var gameCenterLeaderboards: Self { + .init(rawValue: "gameCenterLeaderboards") + } - public var rawValue: String { - switch self { - case .gameCenterDetail: return "gameCenterDetail" - case .gameCenterLeaderboardSet: return "gameCenterLeaderboardSet" - case .live: return "live" - case .unknown(let rawValue): return rawValue - } + public static var referenceName: Self { + .init(rawValue: "referenceName") } + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct GameCenterLeaderboardReleases: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var gameCenterDetail: Self { + .init(rawValue: "gameCenterDetail") + } + + public static var gameCenterLeaderboard: Self { + .init(rawValue: "gameCenterLeaderboard") + } + + public static var live: Self { + .init(rawValue: "live") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "gameCenterDetail": self = .gameCenterDetail - case "gameCenterLeaderboardSet": self = .gameCenterLeaderboardSet - case "live": self = .live - default: self = .unknown(rawValue) - } - } - } - - public enum GameCenterLeaderboardSets: Hashable, Codable, RawRepresentable { - case gameCenterDetail - case gameCenterGroup - case gameCenterLeaderboards - case groupLeaderboardSet - case localizations - case referenceName - case releases - case vendorIdentifier - case unknown(String) - - public var rawValue: String { - switch self { - case .gameCenterDetail: return "gameCenterDetail" - case .gameCenterGroup: return "gameCenterGroup" - case .gameCenterLeaderboards: return "gameCenterLeaderboards" - case .groupLeaderboardSet: return "groupLeaderboardSet" - case .localizations: return "localizations" - case .referenceName: return "referenceName" - case .releases: return "releases" - case .vendorIdentifier: return "vendorIdentifier" - case .unknown(let rawValue): return rawValue - } + self.rawValue = rawValue + } + } + + public struct GameCenterLeaderboardSetReleases: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var gameCenterDetail: Self { + .init(rawValue: "gameCenterDetail") + } + + public static var gameCenterLeaderboardSet: Self { + .init(rawValue: "gameCenterLeaderboardSet") + } + + public static var live: Self { + .init(rawValue: "live") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct GameCenterLeaderboardSets: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var gameCenterDetail: Self { + .init(rawValue: "gameCenterDetail") + } + + public static var gameCenterGroup: Self { + .init(rawValue: "gameCenterGroup") + } + + public static var gameCenterLeaderboards: Self { + .init(rawValue: "gameCenterLeaderboards") + } + + public static var groupLeaderboardSet: Self { + .init(rawValue: "groupLeaderboardSet") + } + + public static var localizations: Self { + .init(rawValue: "localizations") + } + + public static var referenceName: Self { + .init(rawValue: "referenceName") + } + + public static var releases: Self { + .init(rawValue: "releases") + } + + public static var vendorIdentifier: Self { + .init(rawValue: "vendorIdentifier") + } + + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "gameCenterDetail": self = .gameCenterDetail - case "gameCenterGroup": self = .gameCenterGroup - case "gameCenterLeaderboards": self = .gameCenterLeaderboards - case "groupLeaderboardSet": self = .groupLeaderboardSet - case "localizations": self = .localizations - case "referenceName": self = .referenceName - case "releases": self = .releases - case "vendorIdentifier": self = .vendorIdentifier - default: self = .unknown(rawValue) - } - } - } - - public enum GameCenterLeaderboards: Hashable, Codable, RawRepresentable { - case archived - case defaultFormatter - case gameCenterDetail - case gameCenterGroup - case gameCenterLeaderboardSets - case groupLeaderboard - case localizations - case recurrenceDuration - case recurrenceRule - case recurrenceStartDate - case referenceName - case releases - case scoreRangeEnd - case scoreRangeStart - case scoreSortType - case submissionType - case vendorIdentifier - case unknown(String) - - public var rawValue: String { - switch self { - case .archived: return "archived" - case .defaultFormatter: return "defaultFormatter" - case .gameCenterDetail: return "gameCenterDetail" - case .gameCenterGroup: return "gameCenterGroup" - case .gameCenterLeaderboardSets: return "gameCenterLeaderboardSets" - case .groupLeaderboard: return "groupLeaderboard" - case .localizations: return "localizations" - case .recurrenceDuration: return "recurrenceDuration" - case .recurrenceRule: return "recurrenceRule" - case .recurrenceStartDate: return "recurrenceStartDate" - case .referenceName: return "referenceName" - case .releases: return "releases" - case .scoreRangeEnd: return "scoreRangeEnd" - case .scoreRangeStart: return "scoreRangeStart" - case .scoreSortType: return "scoreSortType" - case .submissionType: return "submissionType" - case .vendorIdentifier: return "vendorIdentifier" - case .unknown(let rawValue): return rawValue - } + self.rawValue = rawValue + } + } + + public struct GameCenterLeaderboards: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var activity: Self { + .init(rawValue: "activity") + } + + public static var activityProperties: Self { + .init(rawValue: "activityProperties") + } + + public static var archived: Self { + .init(rawValue: "archived") + } + + public static var challenge: Self { + .init(rawValue: "challenge") + } + + public static var defaultFormatter: Self { + .init(rawValue: "defaultFormatter") + } + + public static var gameCenterDetail: Self { + .init(rawValue: "gameCenterDetail") + } + + public static var gameCenterGroup: Self { + .init(rawValue: "gameCenterGroup") + } + + public static var gameCenterLeaderboardSets: Self { + .init(rawValue: "gameCenterLeaderboardSets") + } + + public static var groupLeaderboard: Self { + .init(rawValue: "groupLeaderboard") + } + + public static var localizations: Self { + .init(rawValue: "localizations") + } + + public static var recurrenceDuration: Self { + .init(rawValue: "recurrenceDuration") + } + + public static var recurrenceRule: Self { + .init(rawValue: "recurrenceRule") + } + + public static var recurrenceStartDate: Self { + .init(rawValue: "recurrenceStartDate") + } + + public static var referenceName: Self { + .init(rawValue: "referenceName") + } + + public static var releases: Self { + .init(rawValue: "releases") + } + + public static var scoreRangeEnd: Self { + .init(rawValue: "scoreRangeEnd") + } + + public static var scoreRangeStart: Self { + .init(rawValue: "scoreRangeStart") + } + + public static var scoreSortType: Self { + .init(rawValue: "scoreSortType") + } + + public static var submissionType: Self { + .init(rawValue: "submissionType") + } + + public static var vendorIdentifier: Self { + .init(rawValue: "vendorIdentifier") } + public static var visibility: Self { + .init(rawValue: "visibility") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "archived": self = .archived - case "defaultFormatter": self = .defaultFormatter - case "gameCenterDetail": self = .gameCenterDetail - case "gameCenterGroup": self = .gameCenterGroup - case "gameCenterLeaderboardSets": self = .gameCenterLeaderboardSets - case "groupLeaderboard": self = .groupLeaderboard - case "localizations": self = .localizations - case "recurrenceDuration": self = .recurrenceDuration - case "recurrenceRule": self = .recurrenceRule - case "recurrenceStartDate": self = .recurrenceStartDate - case "referenceName": self = .referenceName - case "releases": self = .releases - case "scoreRangeEnd": self = .scoreRangeEnd - case "scoreRangeStart": self = .scoreRangeStart - case "scoreSortType": self = .scoreSortType - case "submissionType": self = .submissionType - case "vendorIdentifier": self = .vendorIdentifier - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } public struct Relation: Hashable { + /// the fields to include for returned resources of type appStoreVersions + public static var appStoreVersions: Relation<[AppStoreVersions]?> { + .init(key: "fields[appStoreVersions]") + } + /// the fields to include for returned resources of type apps public static var apps: Relation<[Apps]?> { .init(key: "fields[apps]") @@ -634,11 +1073,31 @@ extension V1.GameCenterGroups.ById.GameCenterDetails.GET { .init(key: "fields[gameCenterAchievements]") } + /// the fields to include for returned resources of type gameCenterActivities + public static var gameCenterActivities: Relation<[GameCenterActivities]?> { + .init(key: "fields[gameCenterActivities]") + } + + /// the fields to include for returned resources of type gameCenterActivityVersionReleases + public static var gameCenterActivityVersionReleases: Relation<[GameCenterActivityVersionReleases]?> { + .init(key: "fields[gameCenterActivityVersionReleases]") + } + /// the fields to include for returned resources of type gameCenterAppVersions public static var gameCenterAppVersions: Relation<[GameCenterAppVersions]?> { .init(key: "fields[gameCenterAppVersions]") } + /// the fields to include for returned resources of type gameCenterChallengeVersionReleases + public static var gameCenterChallengeVersionReleases: Relation<[GameCenterChallengeVersionReleases]?> { + .init(key: "fields[gameCenterChallengeVersionReleases]") + } + + /// the fields to include for returned resources of type gameCenterChallenges + public static var gameCenterChallenges: Relation<[GameCenterChallenges]?> { + .init(key: "fields[gameCenterChallenges]") + } + /// the fields to include for returned resources of type gameCenterDetails public static var gameCenterDetails: Relation<[GameCenterDetails]?> { .init(key: "fields[gameCenterDetails]") @@ -699,52 +1158,79 @@ extension V1.GameCenterGroups.ById.GameCenterDetails.GET { } } - public enum Include: Hashable, Codable, RawRepresentable { - case achievementReleases - case app - case defaultGroupLeaderboard - case defaultLeaderboard - case gameCenterAchievements - case gameCenterAppVersions - case gameCenterGroup - case gameCenterLeaderboardSets - case gameCenterLeaderboards - case leaderboardReleases - case leaderboardSetReleases - case unknown(String) - - public var rawValue: String { - switch self { - case .achievementReleases: return "achievementReleases" - case .app: return "app" - case .defaultGroupLeaderboard: return "defaultGroupLeaderboard" - case .defaultLeaderboard: return "defaultLeaderboard" - case .gameCenterAchievements: return "gameCenterAchievements" - case .gameCenterAppVersions: return "gameCenterAppVersions" - case .gameCenterGroup: return "gameCenterGroup" - case .gameCenterLeaderboardSets: return "gameCenterLeaderboardSets" - case .gameCenterLeaderboards: return "gameCenterLeaderboards" - case .leaderboardReleases: return "leaderboardReleases" - case .leaderboardSetReleases: return "leaderboardSetReleases" - case .unknown(let rawValue): return rawValue - } + public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var achievementReleases: Self { + .init(rawValue: "achievementReleases") + } + + public static var activityReleases: Self { + .init(rawValue: "activityReleases") + } + + public static var app: Self { + .init(rawValue: "app") + } + + public static var challengeReleases: Self { + .init(rawValue: "challengeReleases") + } + + public static var challengesMinimumPlatformVersions: Self { + .init(rawValue: "challengesMinimumPlatformVersions") + } + + public static var defaultGroupLeaderboard: Self { + .init(rawValue: "defaultGroupLeaderboard") + } + + public static var defaultLeaderboard: Self { + .init(rawValue: "defaultLeaderboard") + } + + public static var gameCenterAchievements: Self { + .init(rawValue: "gameCenterAchievements") } + public static var gameCenterActivities: Self { + .init(rawValue: "gameCenterActivities") + } + + public static var gameCenterAppVersions: Self { + .init(rawValue: "gameCenterAppVersions") + } + + public static var gameCenterChallenges: Self { + .init(rawValue: "gameCenterChallenges") + } + + public static var gameCenterGroup: Self { + .init(rawValue: "gameCenterGroup") + } + + public static var gameCenterLeaderboardSets: Self { + .init(rawValue: "gameCenterLeaderboardSets") + } + + public static var gameCenterLeaderboards: Self { + .init(rawValue: "gameCenterLeaderboards") + } + + public static var leaderboardReleases: Self { + .init(rawValue: "leaderboardReleases") + } + + public static var leaderboardSetReleases: Self { + .init(rawValue: "leaderboardSetReleases") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "achievementReleases": self = .achievementReleases - case "app": self = .app - case "defaultGroupLeaderboard": self = .defaultGroupLeaderboard - case "defaultLeaderboard": self = .defaultLeaderboard - case "gameCenterAchievements": self = .gameCenterAchievements - case "gameCenterAppVersions": self = .gameCenterAppVersions - case "gameCenterGroup": self = .gameCenterGroup - case "gameCenterLeaderboardSets": self = .gameCenterLeaderboardSets - case "gameCenterLeaderboards": self = .gameCenterLeaderboards - case "leaderboardReleases": self = .leaderboardReleases - case "leaderboardSetReleases": self = .leaderboardSetReleases - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } @@ -767,16 +1253,41 @@ extension V1.GameCenterGroups.ById.GameCenterDetails.GET { .init(key: "limit[achievementReleases]") } + /// maximum number of related activityReleases returned (when they are included) + public static var activityReleases: Relation { + .init(key: "limit[activityReleases]") + } + + /// maximum number of related challengeReleases returned (when they are included) + public static var challengeReleases: Relation { + .init(key: "limit[challengeReleases]") + } + + /// maximum number of related challengesMinimumPlatformVersions returned (when they are included) + public static var challengesMinimumPlatformVersions: Relation { + .init(key: "limit[challengesMinimumPlatformVersions]") + } + /// maximum number of related gameCenterAchievements returned (when they are included) public static var gameCenterAchievements: Relation { .init(key: "limit[gameCenterAchievements]") } + /// maximum number of related gameCenterActivities returned (when they are included) + public static var gameCenterActivities: Relation { + .init(key: "limit[gameCenterActivities]") + } + /// maximum number of related gameCenterAppVersions returned (when they are included) public static var gameCenterAppVersions: Relation { .init(key: "limit[gameCenterAppVersions]") } + /// maximum number of related gameCenterChallenges returned (when they are included) + public static var gameCenterChallenges: Relation { + .init(key: "limit[gameCenterChallenges]") + } + /// maximum number of related gameCenterLeaderboardSets returned (when they are included) public static var gameCenterLeaderboardSets: Relation { .init(key: "limit[gameCenterLeaderboardSets]") diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterGroups/ById/GameCenterGroupsById.DELETE.dd9abc7.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterGroups/ById/GameCenterGroupsById.DELETE.dd9abc7.generated.swift index a71a3cf1..9c8fcde5 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterGroups/ById/GameCenterGroupsById.DELETE.dd9abc7.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterGroups/ById/GameCenterGroupsById.DELETE.dd9abc7.generated.swift @@ -31,11 +31,12 @@ extension V1.GameCenterGroups.ById { return urlRequest } - /// - Returns: **204**, Success (no content) /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -43,12 +44,12 @@ extension V1.GameCenterGroups.ById { } switch urlResponse.statusCode { - case 204: - return - case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) @@ -58,6 +59,9 @@ extension V1.GameCenterGroups.ById { case 409: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterGroups/ById/GameCenterGroupsById.GET.dd9abc7.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterGroups/ById/GameCenterGroupsById.GET.dd9abc7.generated.swift index 1429159f..762eff25 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterGroups/ById/GameCenterGroupsById.GET.dd9abc7.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterGroups/ById/GameCenterGroupsById.GET.dd9abc7.generated.swift @@ -30,6 +30,10 @@ extension V1.GameCenterGroups.ById { components?.queryItems = [ URLQueryItem(name: "fields[gameCenterAchievements]", value: parameters.fields[.gameCenterAchievements]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "fields[gameCenterActivities]", + value: parameters.fields[.gameCenterActivities]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "fields[gameCenterChallenges]", + value: parameters.fields[.gameCenterChallenges]?.map { "\($0)" }.joined(separator: ",")), URLQueryItem(name: "fields[gameCenterDetails]", value: parameters.fields[.gameCenterDetails]?.map { "\($0)" }.joined(separator: ",")), URLQueryItem(name: "fields[gameCenterGroups]", @@ -42,6 +46,10 @@ extension V1.GameCenterGroups.ById { value: parameters.include?.map { "\($0)" }.joined(separator: ",")), URLQueryItem(name: "limit[gameCenterAchievements]", value: parameters.limit[.gameCenterAchievements].map { "\($0)" }), + URLQueryItem(name: "limit[gameCenterActivities]", + value: parameters.limit[.gameCenterActivities].map { "\($0)" }), + URLQueryItem(name: "limit[gameCenterChallenges]", + value: parameters.limit[.gameCenterChallenges].map { "\($0)" }), URLQueryItem(name: "limit[gameCenterDetails]", value: parameters.limit[.gameCenterDetails].map { "\($0)" }), URLQueryItem(name: "limit[gameCenterLeaderboardSets]", @@ -60,8 +68,10 @@ extension V1.GameCenterGroups.ById { /// - Returns: **200**, Single GameCenterGroup as `GameCenterGroupResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -75,12 +85,18 @@ extension V1.GameCenterGroups.ById { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 404: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -105,245 +121,447 @@ extension V1.GameCenterGroups.ById.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum GameCenterAchievements: Hashable, Codable, RawRepresentable { - case archived - case gameCenterDetail - case gameCenterGroup - case groupAchievement - case localizations - case points - case referenceName - case releases - case repeatable - case showBeforeEarned - case vendorIdentifier - case unknown(String) - - public var rawValue: String { - switch self { - case .archived: return "archived" - case .gameCenterDetail: return "gameCenterDetail" - case .gameCenterGroup: return "gameCenterGroup" - case .groupAchievement: return "groupAchievement" - case .localizations: return "localizations" - case .points: return "points" - case .referenceName: return "referenceName" - case .releases: return "releases" - case .repeatable: return "repeatable" - case .showBeforeEarned: return "showBeforeEarned" - case .vendorIdentifier: return "vendorIdentifier" - case .unknown(let rawValue): return rawValue - } + public struct GameCenterAchievements: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var activity: Self { + .init(rawValue: "activity") + } + + public static var activityProperties: Self { + .init(rawValue: "activityProperties") + } + + public static var archived: Self { + .init(rawValue: "archived") } + public static var gameCenterDetail: Self { + .init(rawValue: "gameCenterDetail") + } + + public static var gameCenterGroup: Self { + .init(rawValue: "gameCenterGroup") + } + + public static var groupAchievement: Self { + .init(rawValue: "groupAchievement") + } + + public static var localizations: Self { + .init(rawValue: "localizations") + } + + public static var points: Self { + .init(rawValue: "points") + } + + public static var referenceName: Self { + .init(rawValue: "referenceName") + } + + public static var releases: Self { + .init(rawValue: "releases") + } + + public static var repeatable: Self { + .init(rawValue: "repeatable") + } + + public static var showBeforeEarned: Self { + .init(rawValue: "showBeforeEarned") + } + + public static var vendorIdentifier: Self { + .init(rawValue: "vendorIdentifier") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "archived": self = .archived - case "gameCenterDetail": self = .gameCenterDetail - case "gameCenterGroup": self = .gameCenterGroup - case "groupAchievement": self = .groupAchievement - case "localizations": self = .localizations - case "points": self = .points - case "referenceName": self = .referenceName - case "releases": self = .releases - case "repeatable": self = .repeatable - case "showBeforeEarned": self = .showBeforeEarned - case "vendorIdentifier": self = .vendorIdentifier - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum GameCenterDetails: Hashable, Codable, RawRepresentable { - case achievementReleases - case app - case arcadeEnabled - case challengeEnabled - case defaultGroupLeaderboard - case defaultLeaderboard - case gameCenterAchievements - case gameCenterAppVersions - case gameCenterGroup - case gameCenterLeaderboardSets - case gameCenterLeaderboards - case leaderboardReleases - case leaderboardSetReleases - case unknown(String) - - public var rawValue: String { - switch self { - case .achievementReleases: return "achievementReleases" - case .app: return "app" - case .arcadeEnabled: return "arcadeEnabled" - case .challengeEnabled: return "challengeEnabled" - case .defaultGroupLeaderboard: return "defaultGroupLeaderboard" - case .defaultLeaderboard: return "defaultLeaderboard" - case .gameCenterAchievements: return "gameCenterAchievements" - case .gameCenterAppVersions: return "gameCenterAppVersions" - case .gameCenterGroup: return "gameCenterGroup" - case .gameCenterLeaderboardSets: return "gameCenterLeaderboardSets" - case .gameCenterLeaderboards: return "gameCenterLeaderboards" - case .leaderboardReleases: return "leaderboardReleases" - case .leaderboardSetReleases: return "leaderboardSetReleases" - case .unknown(let rawValue): return rawValue - } + public struct GameCenterActivities: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var achievements: Self { + .init(rawValue: "achievements") + } + + public static var archived: Self { + .init(rawValue: "archived") + } + + public static var gameCenterDetail: Self { + .init(rawValue: "gameCenterDetail") + } + + public static var gameCenterGroup: Self { + .init(rawValue: "gameCenterGroup") + } + + public static var leaderboards: Self { + .init(rawValue: "leaderboards") + } + + public static var maximumPlayersCount: Self { + .init(rawValue: "maximumPlayersCount") + } + + public static var minimumPlayersCount: Self { + .init(rawValue: "minimumPlayersCount") + } + + public static var playStyle: Self { + .init(rawValue: "playStyle") + } + + public static var properties: Self { + .init(rawValue: "properties") + } + + public static var referenceName: Self { + .init(rawValue: "referenceName") + } + + public static var supportsPartyCode: Self { + .init(rawValue: "supportsPartyCode") + } + + public static var vendorIdentifier: Self { + .init(rawValue: "vendorIdentifier") + } + + public static var versions: Self { + .init(rawValue: "versions") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct GameCenterChallenges: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var allowedDurations: Self { + .init(rawValue: "allowedDurations") + } + + public static var archived: Self { + .init(rawValue: "archived") + } + + public static var challengeType: Self { + .init(rawValue: "challengeType") + } + + public static var gameCenterDetail: Self { + .init(rawValue: "gameCenterDetail") + } + + public static var gameCenterGroup: Self { + .init(rawValue: "gameCenterGroup") + } + + public static var leaderboard: Self { + .init(rawValue: "leaderboard") + } + + public static var referenceName: Self { + .init(rawValue: "referenceName") + } + + public static var repeatable: Self { + .init(rawValue: "repeatable") + } + + public static var vendorIdentifier: Self { + .init(rawValue: "vendorIdentifier") + } + + public static var versions: Self { + .init(rawValue: "versions") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct GameCenterDetails: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var achievementReleases: Self { + .init(rawValue: "achievementReleases") + } + + public static var activityReleases: Self { + .init(rawValue: "activityReleases") + } + + public static var app: Self { + .init(rawValue: "app") + } + + public static var arcadeEnabled: Self { + .init(rawValue: "arcadeEnabled") + } + + public static var challengeEnabled: Self { + .init(rawValue: "challengeEnabled") + } + + public static var challengeReleases: Self { + .init(rawValue: "challengeReleases") + } + + public static var challengesMinimumPlatformVersions: Self { + .init(rawValue: "challengesMinimumPlatformVersions") + } + + public static var defaultGroupLeaderboard: Self { + .init(rawValue: "defaultGroupLeaderboard") + } + + public static var defaultLeaderboard: Self { + .init(rawValue: "defaultLeaderboard") + } + + public static var gameCenterAchievements: Self { + .init(rawValue: "gameCenterAchievements") + } + + public static var gameCenterActivities: Self { + .init(rawValue: "gameCenterActivities") + } + + public static var gameCenterAppVersions: Self { + .init(rawValue: "gameCenterAppVersions") } + public static var gameCenterChallenges: Self { + .init(rawValue: "gameCenterChallenges") + } + + public static var gameCenterGroup: Self { + .init(rawValue: "gameCenterGroup") + } + + public static var gameCenterLeaderboardSets: Self { + .init(rawValue: "gameCenterLeaderboardSets") + } + + public static var gameCenterLeaderboards: Self { + .init(rawValue: "gameCenterLeaderboards") + } + + public static var leaderboardReleases: Self { + .init(rawValue: "leaderboardReleases") + } + + public static var leaderboardSetReleases: Self { + .init(rawValue: "leaderboardSetReleases") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "achievementReleases": self = .achievementReleases - case "app": self = .app - case "arcadeEnabled": self = .arcadeEnabled - case "challengeEnabled": self = .challengeEnabled - case "defaultGroupLeaderboard": self = .defaultGroupLeaderboard - case "defaultLeaderboard": self = .defaultLeaderboard - case "gameCenterAchievements": self = .gameCenterAchievements - case "gameCenterAppVersions": self = .gameCenterAppVersions - case "gameCenterGroup": self = .gameCenterGroup - case "gameCenterLeaderboardSets": self = .gameCenterLeaderboardSets - case "gameCenterLeaderboards": self = .gameCenterLeaderboards - case "leaderboardReleases": self = .leaderboardReleases - case "leaderboardSetReleases": self = .leaderboardSetReleases - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum GameCenterGroups: Hashable, Codable, RawRepresentable { - case gameCenterAchievements - case gameCenterDetails - case gameCenterLeaderboardSets - case gameCenterLeaderboards - case referenceName - case unknown(String) - - public var rawValue: String { - switch self { - case .gameCenterAchievements: return "gameCenterAchievements" - case .gameCenterDetails: return "gameCenterDetails" - case .gameCenterLeaderboardSets: return "gameCenterLeaderboardSets" - case .gameCenterLeaderboards: return "gameCenterLeaderboards" - case .referenceName: return "referenceName" - case .unknown(let rawValue): return rawValue - } + public struct GameCenterGroups: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var gameCenterAchievements: Self { + .init(rawValue: "gameCenterAchievements") + } + + public static var gameCenterActivities: Self { + .init(rawValue: "gameCenterActivities") + } + + public static var gameCenterChallenges: Self { + .init(rawValue: "gameCenterChallenges") + } + + public static var gameCenterDetails: Self { + .init(rawValue: "gameCenterDetails") + } + + public static var gameCenterLeaderboardSets: Self { + .init(rawValue: "gameCenterLeaderboardSets") + } + + public static var gameCenterLeaderboards: Self { + .init(rawValue: "gameCenterLeaderboards") + } + + public static var referenceName: Self { + .init(rawValue: "referenceName") + } + + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "gameCenterAchievements": self = .gameCenterAchievements - case "gameCenterDetails": self = .gameCenterDetails - case "gameCenterLeaderboardSets": self = .gameCenterLeaderboardSets - case "gameCenterLeaderboards": self = .gameCenterLeaderboards - case "referenceName": self = .referenceName - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum GameCenterLeaderboardSets: Hashable, Codable, RawRepresentable { - case gameCenterDetail - case gameCenterGroup - case gameCenterLeaderboards - case groupLeaderboardSet - case localizations - case referenceName - case releases - case vendorIdentifier - case unknown(String) - - public var rawValue: String { - switch self { - case .gameCenterDetail: return "gameCenterDetail" - case .gameCenterGroup: return "gameCenterGroup" - case .gameCenterLeaderboards: return "gameCenterLeaderboards" - case .groupLeaderboardSet: return "groupLeaderboardSet" - case .localizations: return "localizations" - case .referenceName: return "referenceName" - case .releases: return "releases" - case .vendorIdentifier: return "vendorIdentifier" - case .unknown(let rawValue): return rawValue - } + public struct GameCenterLeaderboardSets: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var gameCenterDetail: Self { + .init(rawValue: "gameCenterDetail") + } + + public static var gameCenterGroup: Self { + .init(rawValue: "gameCenterGroup") + } + + public static var gameCenterLeaderboards: Self { + .init(rawValue: "gameCenterLeaderboards") + } + + public static var groupLeaderboardSet: Self { + .init(rawValue: "groupLeaderboardSet") + } + + public static var localizations: Self { + .init(rawValue: "localizations") + } + + public static var referenceName: Self { + .init(rawValue: "referenceName") + } + + public static var releases: Self { + .init(rawValue: "releases") + } + + public static var vendorIdentifier: Self { + .init(rawValue: "vendorIdentifier") + } + + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "gameCenterDetail": self = .gameCenterDetail - case "gameCenterGroup": self = .gameCenterGroup - case "gameCenterLeaderboards": self = .gameCenterLeaderboards - case "groupLeaderboardSet": self = .groupLeaderboardSet - case "localizations": self = .localizations - case "referenceName": self = .referenceName - case "releases": self = .releases - case "vendorIdentifier": self = .vendorIdentifier - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum GameCenterLeaderboards: Hashable, Codable, RawRepresentable { - case archived - case defaultFormatter - case gameCenterDetail - case gameCenterGroup - case gameCenterLeaderboardSets - case groupLeaderboard - case localizations - case recurrenceDuration - case recurrenceRule - case recurrenceStartDate - case referenceName - case releases - case scoreRangeEnd - case scoreRangeStart - case scoreSortType - case submissionType - case vendorIdentifier - case unknown(String) - - public var rawValue: String { - switch self { - case .archived: return "archived" - case .defaultFormatter: return "defaultFormatter" - case .gameCenterDetail: return "gameCenterDetail" - case .gameCenterGroup: return "gameCenterGroup" - case .gameCenterLeaderboardSets: return "gameCenterLeaderboardSets" - case .groupLeaderboard: return "groupLeaderboard" - case .localizations: return "localizations" - case .recurrenceDuration: return "recurrenceDuration" - case .recurrenceRule: return "recurrenceRule" - case .recurrenceStartDate: return "recurrenceStartDate" - case .referenceName: return "referenceName" - case .releases: return "releases" - case .scoreRangeEnd: return "scoreRangeEnd" - case .scoreRangeStart: return "scoreRangeStart" - case .scoreSortType: return "scoreSortType" - case .submissionType: return "submissionType" - case .vendorIdentifier: return "vendorIdentifier" - case .unknown(let rawValue): return rawValue - } + public struct GameCenterLeaderboards: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var activity: Self { + .init(rawValue: "activity") + } + + public static var activityProperties: Self { + .init(rawValue: "activityProperties") + } + + public static var archived: Self { + .init(rawValue: "archived") + } + + public static var challenge: Self { + .init(rawValue: "challenge") + } + + public static var defaultFormatter: Self { + .init(rawValue: "defaultFormatter") + } + + public static var gameCenterDetail: Self { + .init(rawValue: "gameCenterDetail") } + public static var gameCenterGroup: Self { + .init(rawValue: "gameCenterGroup") + } + + public static var gameCenterLeaderboardSets: Self { + .init(rawValue: "gameCenterLeaderboardSets") + } + + public static var groupLeaderboard: Self { + .init(rawValue: "groupLeaderboard") + } + + public static var localizations: Self { + .init(rawValue: "localizations") + } + + public static var recurrenceDuration: Self { + .init(rawValue: "recurrenceDuration") + } + + public static var recurrenceRule: Self { + .init(rawValue: "recurrenceRule") + } + + public static var recurrenceStartDate: Self { + .init(rawValue: "recurrenceStartDate") + } + + public static var referenceName: Self { + .init(rawValue: "referenceName") + } + + public static var releases: Self { + .init(rawValue: "releases") + } + + public static var scoreRangeEnd: Self { + .init(rawValue: "scoreRangeEnd") + } + + public static var scoreRangeStart: Self { + .init(rawValue: "scoreRangeStart") + } + + public static var scoreSortType: Self { + .init(rawValue: "scoreSortType") + } + + public static var submissionType: Self { + .init(rawValue: "submissionType") + } + + public static var vendorIdentifier: Self { + .init(rawValue: "vendorIdentifier") + } + + public static var visibility: Self { + .init(rawValue: "visibility") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "archived": self = .archived - case "defaultFormatter": self = .defaultFormatter - case "gameCenterDetail": self = .gameCenterDetail - case "gameCenterGroup": self = .gameCenterGroup - case "gameCenterLeaderboardSets": self = .gameCenterLeaderboardSets - case "groupLeaderboard": self = .groupLeaderboard - case "localizations": self = .localizations - case "recurrenceDuration": self = .recurrenceDuration - case "recurrenceRule": self = .recurrenceRule - case "recurrenceStartDate": self = .recurrenceStartDate - case "referenceName": self = .referenceName - case "releases": self = .releases - case "scoreRangeEnd": self = .scoreRangeEnd - case "scoreRangeStart": self = .scoreRangeStart - case "scoreSortType": self = .scoreSortType - case "submissionType": self = .submissionType - case "vendorIdentifier": self = .vendorIdentifier - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } @@ -353,6 +571,16 @@ extension V1.GameCenterGroups.ById.GET { .init(key: "fields[gameCenterAchievements]") } + /// the fields to include for returned resources of type gameCenterActivities + public static var gameCenterActivities: Relation<[GameCenterActivities]?> { + .init(key: "fields[gameCenterActivities]") + } + + /// the fields to include for returned resources of type gameCenterChallenges + public static var gameCenterChallenges: Relation<[GameCenterChallenges]?> { + .init(key: "fields[gameCenterChallenges]") + } + /// the fields to include for returned resources of type gameCenterDetails public static var gameCenterDetails: Relation<[GameCenterDetails]?> { .init(key: "fields[gameCenterDetails]") @@ -381,31 +609,39 @@ extension V1.GameCenterGroups.ById.GET { } } - public enum Include: Hashable, Codable, RawRepresentable { - case gameCenterAchievements - case gameCenterDetails - case gameCenterLeaderboardSets - case gameCenterLeaderboards - case unknown(String) - - public var rawValue: String { - switch self { - case .gameCenterAchievements: return "gameCenterAchievements" - case .gameCenterDetails: return "gameCenterDetails" - case .gameCenterLeaderboardSets: return "gameCenterLeaderboardSets" - case .gameCenterLeaderboards: return "gameCenterLeaderboards" - case .unknown(let rawValue): return rawValue - } + public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var gameCenterAchievements: Self { + .init(rawValue: "gameCenterAchievements") + } + + public static var gameCenterActivities: Self { + .init(rawValue: "gameCenterActivities") + } + + public static var gameCenterChallenges: Self { + .init(rawValue: "gameCenterChallenges") } + public static var gameCenterDetails: Self { + .init(rawValue: "gameCenterDetails") + } + + public static var gameCenterLeaderboardSets: Self { + .init(rawValue: "gameCenterLeaderboardSets") + } + + public static var gameCenterLeaderboards: Self { + .init(rawValue: "gameCenterLeaderboards") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "gameCenterAchievements": self = .gameCenterAchievements - case "gameCenterDetails": self = .gameCenterDetails - case "gameCenterLeaderboardSets": self = .gameCenterLeaderboardSets - case "gameCenterLeaderboards": self = .gameCenterLeaderboards - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } @@ -423,6 +659,16 @@ extension V1.GameCenterGroups.ById.GET { .init(key: "limit[gameCenterAchievements]") } + /// maximum number of related gameCenterActivities returned (when they are included) + public static var gameCenterActivities: Relation { + .init(key: "limit[gameCenterActivities]") + } + + /// maximum number of related gameCenterChallenges returned (when they are included) + public static var gameCenterChallenges: Relation { + .init(key: "limit[gameCenterChallenges]") + } + /// maximum number of related gameCenterDetails returned (when they are included) public static var gameCenterDetails: Relation { .init(key: "limit[gameCenterDetails]") diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterGroups/ById/GameCenterGroupsById.PATCH.dd9abc7.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterGroups/ById/GameCenterGroupsById.PATCH.dd9abc7.generated.swift index 23a05f2a..d4cc273d 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterGroups/ById/GameCenterGroupsById.PATCH.dd9abc7.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterGroups/ById/GameCenterGroupsById.PATCH.dd9abc7.generated.swift @@ -48,9 +48,12 @@ extension V1.GameCenterGroups.ById { /// - Returns: **200**, Single GameCenterGroup as `GameCenterGroupResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **422**, Unprocessable request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -64,6 +67,9 @@ extension V1.GameCenterGroups.ById { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) @@ -73,6 +79,12 @@ extension V1.GameCenterGroups.ById { case 409: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 422: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterGroups/ById/GameCenterLeaderboardSets/GameCenterGroupsByIdGameCenterLeaderboardSets.GET.70de902.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterGroups/ById/GameCenterLeaderboardSets/GameCenterGroupsByIdGameCenterLeaderboardSets.GET.70de902.generated.swift index c59cc890..49ac4622 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterGroups/ById/GameCenterLeaderboardSets/GameCenterGroupsByIdGameCenterLeaderboardSets.GET.70de902.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterGroups/ById/GameCenterLeaderboardSets/GameCenterGroupsByIdGameCenterLeaderboardSets.GET.70de902.generated.swift @@ -66,8 +66,10 @@ extension V1.GameCenterGroups.ById.GameCenterLeaderboardSets { /// - Returns: **200**, List of GameCenterLeaderboardSets as `GameCenterLeaderboardSetsResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -81,12 +83,18 @@ extension V1.GameCenterGroups.ById.GameCenterLeaderboardSets { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 404: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -114,249 +122,319 @@ extension V1.GameCenterGroups.ById.GameCenterLeaderboardSets.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum GameCenterDetails: Hashable, Codable, RawRepresentable { - case achievementReleases - case app - case arcadeEnabled - case challengeEnabled - case defaultGroupLeaderboard - case defaultLeaderboard - case gameCenterAchievements - case gameCenterAppVersions - case gameCenterGroup - case gameCenterLeaderboardSets - case gameCenterLeaderboards - case leaderboardReleases - case leaderboardSetReleases - case unknown(String) - - public var rawValue: String { - switch self { - case .achievementReleases: return "achievementReleases" - case .app: return "app" - case .arcadeEnabled: return "arcadeEnabled" - case .challengeEnabled: return "challengeEnabled" - case .defaultGroupLeaderboard: return "defaultGroupLeaderboard" - case .defaultLeaderboard: return "defaultLeaderboard" - case .gameCenterAchievements: return "gameCenterAchievements" - case .gameCenterAppVersions: return "gameCenterAppVersions" - case .gameCenterGroup: return "gameCenterGroup" - case .gameCenterLeaderboardSets: return "gameCenterLeaderboardSets" - case .gameCenterLeaderboards: return "gameCenterLeaderboards" - case .leaderboardReleases: return "leaderboardReleases" - case .leaderboardSetReleases: return "leaderboardSetReleases" - case .unknown(let rawValue): return rawValue - } + public struct GameCenterDetails: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var achievementReleases: Self { + .init(rawValue: "achievementReleases") + } + + public static var activityReleases: Self { + .init(rawValue: "activityReleases") + } + + public static var app: Self { + .init(rawValue: "app") + } + + public static var arcadeEnabled: Self { + .init(rawValue: "arcadeEnabled") } + public static var challengeEnabled: Self { + .init(rawValue: "challengeEnabled") + } + + public static var challengeReleases: Self { + .init(rawValue: "challengeReleases") + } + + public static var challengesMinimumPlatformVersions: Self { + .init(rawValue: "challengesMinimumPlatformVersions") + } + + public static var defaultGroupLeaderboard: Self { + .init(rawValue: "defaultGroupLeaderboard") + } + + public static var defaultLeaderboard: Self { + .init(rawValue: "defaultLeaderboard") + } + + public static var gameCenterAchievements: Self { + .init(rawValue: "gameCenterAchievements") + } + + public static var gameCenterActivities: Self { + .init(rawValue: "gameCenterActivities") + } + + public static var gameCenterAppVersions: Self { + .init(rawValue: "gameCenterAppVersions") + } + + public static var gameCenterChallenges: Self { + .init(rawValue: "gameCenterChallenges") + } + + public static var gameCenterGroup: Self { + .init(rawValue: "gameCenterGroup") + } + + public static var gameCenterLeaderboardSets: Self { + .init(rawValue: "gameCenterLeaderboardSets") + } + + public static var gameCenterLeaderboards: Self { + .init(rawValue: "gameCenterLeaderboards") + } + + public static var leaderboardReleases: Self { + .init(rawValue: "leaderboardReleases") + } + + public static var leaderboardSetReleases: Self { + .init(rawValue: "leaderboardSetReleases") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "achievementReleases": self = .achievementReleases - case "app": self = .app - case "arcadeEnabled": self = .arcadeEnabled - case "challengeEnabled": self = .challengeEnabled - case "defaultGroupLeaderboard": self = .defaultGroupLeaderboard - case "defaultLeaderboard": self = .defaultLeaderboard - case "gameCenterAchievements": self = .gameCenterAchievements - case "gameCenterAppVersions": self = .gameCenterAppVersions - case "gameCenterGroup": self = .gameCenterGroup - case "gameCenterLeaderboardSets": self = .gameCenterLeaderboardSets - case "gameCenterLeaderboards": self = .gameCenterLeaderboards - case "leaderboardReleases": self = .leaderboardReleases - case "leaderboardSetReleases": self = .leaderboardSetReleases - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum GameCenterGroups: Hashable, Codable, RawRepresentable { - case gameCenterAchievements - case gameCenterDetails - case gameCenterLeaderboardSets - case gameCenterLeaderboards - case referenceName - case unknown(String) - - public var rawValue: String { - switch self { - case .gameCenterAchievements: return "gameCenterAchievements" - case .gameCenterDetails: return "gameCenterDetails" - case .gameCenterLeaderboardSets: return "gameCenterLeaderboardSets" - case .gameCenterLeaderboards: return "gameCenterLeaderboards" - case .referenceName: return "referenceName" - case .unknown(let rawValue): return rawValue - } + public struct GameCenterGroups: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var gameCenterAchievements: Self { + .init(rawValue: "gameCenterAchievements") + } + + public static var gameCenterActivities: Self { + .init(rawValue: "gameCenterActivities") + } + + public static var gameCenterChallenges: Self { + .init(rawValue: "gameCenterChallenges") + } + + public static var gameCenterDetails: Self { + .init(rawValue: "gameCenterDetails") + } + + public static var gameCenterLeaderboardSets: Self { + .init(rawValue: "gameCenterLeaderboardSets") + } + + public static var gameCenterLeaderboards: Self { + .init(rawValue: "gameCenterLeaderboards") + } + + public static var referenceName: Self { + .init(rawValue: "referenceName") + } + + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "gameCenterAchievements": self = .gameCenterAchievements - case "gameCenterDetails": self = .gameCenterDetails - case "gameCenterLeaderboardSets": self = .gameCenterLeaderboardSets - case "gameCenterLeaderboards": self = .gameCenterLeaderboards - case "referenceName": self = .referenceName - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum GameCenterLeaderboardSetLocalizations: Hashable, Codable, RawRepresentable { - case gameCenterLeaderboardSet - case gameCenterLeaderboardSetImage - case locale - case name - case unknown(String) + public struct GameCenterLeaderboardSetLocalizations: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var gameCenterLeaderboardSet: Self { + .init(rawValue: "gameCenterLeaderboardSet") + } - public var rawValue: String { - switch self { - case .gameCenterLeaderboardSet: return "gameCenterLeaderboardSet" - case .gameCenterLeaderboardSetImage: return "gameCenterLeaderboardSetImage" - case .locale: return "locale" - case .name: return "name" - case .unknown(let rawValue): return rawValue - } + public static var gameCenterLeaderboardSetImage: Self { + .init(rawValue: "gameCenterLeaderboardSetImage") } + public static var locale: Self { + .init(rawValue: "locale") + } + + public static var name: Self { + .init(rawValue: "name") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "gameCenterLeaderboardSet": self = .gameCenterLeaderboardSet - case "gameCenterLeaderboardSetImage": self = .gameCenterLeaderboardSetImage - case "locale": self = .locale - case "name": self = .name - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum GameCenterLeaderboardSetReleases: Hashable, Codable, RawRepresentable { - case gameCenterDetail - case gameCenterLeaderboardSet - case live - case unknown(String) + public struct GameCenterLeaderboardSetReleases: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var gameCenterDetail: Self { + .init(rawValue: "gameCenterDetail") + } + + public static var gameCenterLeaderboardSet: Self { + .init(rawValue: "gameCenterLeaderboardSet") + } + + public static var live: Self { + .init(rawValue: "live") + } - public var rawValue: String { - switch self { - case .gameCenterDetail: return "gameCenterDetail" - case .gameCenterLeaderboardSet: return "gameCenterLeaderboardSet" - case .live: return "live" - case .unknown(let rawValue): return rawValue - } + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "gameCenterDetail": self = .gameCenterDetail - case "gameCenterLeaderboardSet": self = .gameCenterLeaderboardSet - case "live": self = .live - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum GameCenterLeaderboardSets: Hashable, Codable, RawRepresentable { - case gameCenterDetail - case gameCenterGroup - case gameCenterLeaderboards - case groupLeaderboardSet - case localizations - case referenceName - case releases - case vendorIdentifier - case unknown(String) - - public var rawValue: String { - switch self { - case .gameCenterDetail: return "gameCenterDetail" - case .gameCenterGroup: return "gameCenterGroup" - case .gameCenterLeaderboards: return "gameCenterLeaderboards" - case .groupLeaderboardSet: return "groupLeaderboardSet" - case .localizations: return "localizations" - case .referenceName: return "referenceName" - case .releases: return "releases" - case .vendorIdentifier: return "vendorIdentifier" - case .unknown(let rawValue): return rawValue - } + public struct GameCenterLeaderboardSets: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var gameCenterDetail: Self { + .init(rawValue: "gameCenterDetail") + } + + public static var gameCenterGroup: Self { + .init(rawValue: "gameCenterGroup") } + public static var gameCenterLeaderboards: Self { + .init(rawValue: "gameCenterLeaderboards") + } + + public static var groupLeaderboardSet: Self { + .init(rawValue: "groupLeaderboardSet") + } + + public static var localizations: Self { + .init(rawValue: "localizations") + } + + public static var referenceName: Self { + .init(rawValue: "referenceName") + } + + public static var releases: Self { + .init(rawValue: "releases") + } + + public static var vendorIdentifier: Self { + .init(rawValue: "vendorIdentifier") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "gameCenterDetail": self = .gameCenterDetail - case "gameCenterGroup": self = .gameCenterGroup - case "gameCenterLeaderboards": self = .gameCenterLeaderboards - case "groupLeaderboardSet": self = .groupLeaderboardSet - case "localizations": self = .localizations - case "referenceName": self = .referenceName - case "releases": self = .releases - case "vendorIdentifier": self = .vendorIdentifier - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum GameCenterLeaderboards: Hashable, Codable, RawRepresentable { - case archived - case defaultFormatter - case gameCenterDetail - case gameCenterGroup - case gameCenterLeaderboardSets - case groupLeaderboard - case localizations - case recurrenceDuration - case recurrenceRule - case recurrenceStartDate - case referenceName - case releases - case scoreRangeEnd - case scoreRangeStart - case scoreSortType - case submissionType - case vendorIdentifier - case unknown(String) - - public var rawValue: String { - switch self { - case .archived: return "archived" - case .defaultFormatter: return "defaultFormatter" - case .gameCenterDetail: return "gameCenterDetail" - case .gameCenterGroup: return "gameCenterGroup" - case .gameCenterLeaderboardSets: return "gameCenterLeaderboardSets" - case .groupLeaderboard: return "groupLeaderboard" - case .localizations: return "localizations" - case .recurrenceDuration: return "recurrenceDuration" - case .recurrenceRule: return "recurrenceRule" - case .recurrenceStartDate: return "recurrenceStartDate" - case .referenceName: return "referenceName" - case .releases: return "releases" - case .scoreRangeEnd: return "scoreRangeEnd" - case .scoreRangeStart: return "scoreRangeStart" - case .scoreSortType: return "scoreSortType" - case .submissionType: return "submissionType" - case .vendorIdentifier: return "vendorIdentifier" - case .unknown(let rawValue): return rawValue - } + public struct GameCenterLeaderboards: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var activity: Self { + .init(rawValue: "activity") + } + + public static var activityProperties: Self { + .init(rawValue: "activityProperties") + } + + public static var archived: Self { + .init(rawValue: "archived") + } + + public static var challenge: Self { + .init(rawValue: "challenge") + } + + public static var defaultFormatter: Self { + .init(rawValue: "defaultFormatter") + } + + public static var gameCenterDetail: Self { + .init(rawValue: "gameCenterDetail") + } + + public static var gameCenterGroup: Self { + .init(rawValue: "gameCenterGroup") + } + + public static var gameCenterLeaderboardSets: Self { + .init(rawValue: "gameCenterLeaderboardSets") + } + + public static var groupLeaderboard: Self { + .init(rawValue: "groupLeaderboard") + } + + public static var localizations: Self { + .init(rawValue: "localizations") + } + + public static var recurrenceDuration: Self { + .init(rawValue: "recurrenceDuration") + } + + public static var recurrenceRule: Self { + .init(rawValue: "recurrenceRule") } + public static var recurrenceStartDate: Self { + .init(rawValue: "recurrenceStartDate") + } + + public static var referenceName: Self { + .init(rawValue: "referenceName") + } + + public static var releases: Self { + .init(rawValue: "releases") + } + + public static var scoreRangeEnd: Self { + .init(rawValue: "scoreRangeEnd") + } + + public static var scoreRangeStart: Self { + .init(rawValue: "scoreRangeStart") + } + + public static var scoreSortType: Self { + .init(rawValue: "scoreSortType") + } + + public static var submissionType: Self { + .init(rawValue: "submissionType") + } + + public static var vendorIdentifier: Self { + .init(rawValue: "vendorIdentifier") + } + + public static var visibility: Self { + .init(rawValue: "visibility") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "archived": self = .archived - case "defaultFormatter": self = .defaultFormatter - case "gameCenterDetail": self = .gameCenterDetail - case "gameCenterGroup": self = .gameCenterGroup - case "gameCenterLeaderboardSets": self = .gameCenterLeaderboardSets - case "groupLeaderboard": self = .groupLeaderboard - case "localizations": self = .localizations - case "recurrenceDuration": self = .recurrenceDuration - case "recurrenceRule": self = .recurrenceRule - case "recurrenceStartDate": self = .recurrenceStartDate - case "referenceName": self = .referenceName - case "releases": self = .releases - case "scoreRangeEnd": self = .scoreRangeEnd - case "scoreRangeStart": self = .scoreRangeStart - case "scoreSortType": self = .scoreSortType - case "submissionType": self = .submissionType - case "vendorIdentifier": self = .vendorIdentifier - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } @@ -426,37 +504,39 @@ extension V1.GameCenterGroups.ById.GameCenterLeaderboardSets.GET { } } - public enum Include: Hashable, Codable, RawRepresentable { - case gameCenterDetail - case gameCenterGroup - case gameCenterLeaderboards - case groupLeaderboardSet - case localizations - case releases - case unknown(String) - - public var rawValue: String { - switch self { - case .gameCenterDetail: return "gameCenterDetail" - case .gameCenterGroup: return "gameCenterGroup" - case .gameCenterLeaderboards: return "gameCenterLeaderboards" - case .groupLeaderboardSet: return "groupLeaderboardSet" - case .localizations: return "localizations" - case .releases: return "releases" - case .unknown(let rawValue): return rawValue - } + public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var gameCenterDetail: Self { + .init(rawValue: "gameCenterDetail") + } + + public static var gameCenterGroup: Self { + .init(rawValue: "gameCenterGroup") + } + + public static var gameCenterLeaderboards: Self { + .init(rawValue: "gameCenterLeaderboards") + } + + public static var groupLeaderboardSet: Self { + .init(rawValue: "groupLeaderboardSet") + } + + public static var localizations: Self { + .init(rawValue: "localizations") + } + + public static var releases: Self { + .init(rawValue: "releases") } + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "gameCenterDetail": self = .gameCenterDetail - case "gameCenterGroup": self = .gameCenterGroup - case "gameCenterLeaderboards": self = .gameCenterLeaderboards - case "groupLeaderboardSet": self = .groupLeaderboardSet - case "localizations": self = .localizations - case "releases": self = .releases - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterGroups/ById/GameCenterLeaderboards/GameCenterGroupsByIdGameCenterLeaderboards.GET.b07e7d1.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterGroups/ById/GameCenterLeaderboards/GameCenterGroupsByIdGameCenterLeaderboards.GET.b07e7d1.generated.swift index 2d9ae737..41df3047 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterGroups/ById/GameCenterLeaderboards/GameCenterGroupsByIdGameCenterLeaderboards.GET.b07e7d1.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterGroups/ById/GameCenterLeaderboards/GameCenterGroupsByIdGameCenterLeaderboards.GET.b07e7d1.generated.swift @@ -28,6 +28,10 @@ extension V1.GameCenterGroups.ById.GameCenterLeaderboards { components?.path = path components?.queryItems = [ + URLQueryItem(name: "fields[gameCenterActivities]", + value: parameters.fields[.gameCenterActivities]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "fields[gameCenterChallenges]", + value: parameters.fields[.gameCenterChallenges]?.map { "\($0)" }.joined(separator: ",")), URLQueryItem(name: "fields[gameCenterDetails]", value: parameters.fields[.gameCenterDetails]?.map { "\($0)" }.joined(separator: ",")), URLQueryItem(name: "fields[gameCenterGroups]", @@ -68,8 +72,10 @@ extension V1.GameCenterGroups.ById.GameCenterLeaderboards { /// - Returns: **200**, List of GameCenterLeaderboards as `GameCenterLeaderboardsResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -83,12 +89,18 @@ extension V1.GameCenterGroups.ById.GameCenterLeaderboards { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 404: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -116,262 +128,461 @@ extension V1.GameCenterGroups.ById.GameCenterLeaderboards.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum GameCenterDetails: Hashable, Codable, RawRepresentable { - case achievementReleases - case app - case arcadeEnabled - case challengeEnabled - case defaultGroupLeaderboard - case defaultLeaderboard - case gameCenterAchievements - case gameCenterAppVersions - case gameCenterGroup - case gameCenterLeaderboardSets - case gameCenterLeaderboards - case leaderboardReleases - case leaderboardSetReleases - case unknown(String) - - public var rawValue: String { - switch self { - case .achievementReleases: return "achievementReleases" - case .app: return "app" - case .arcadeEnabled: return "arcadeEnabled" - case .challengeEnabled: return "challengeEnabled" - case .defaultGroupLeaderboard: return "defaultGroupLeaderboard" - case .defaultLeaderboard: return "defaultLeaderboard" - case .gameCenterAchievements: return "gameCenterAchievements" - case .gameCenterAppVersions: return "gameCenterAppVersions" - case .gameCenterGroup: return "gameCenterGroup" - case .gameCenterLeaderboardSets: return "gameCenterLeaderboardSets" - case .gameCenterLeaderboards: return "gameCenterLeaderboards" - case .leaderboardReleases: return "leaderboardReleases" - case .leaderboardSetReleases: return "leaderboardSetReleases" - case .unknown(let rawValue): return rawValue - } + public struct GameCenterActivities: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var achievements: Self { + .init(rawValue: "achievements") + } + + public static var archived: Self { + .init(rawValue: "archived") + } + + public static var gameCenterDetail: Self { + .init(rawValue: "gameCenterDetail") + } + + public static var gameCenterGroup: Self { + .init(rawValue: "gameCenterGroup") + } + + public static var leaderboards: Self { + .init(rawValue: "leaderboards") + } + + public static var maximumPlayersCount: Self { + .init(rawValue: "maximumPlayersCount") + } + + public static var minimumPlayersCount: Self { + .init(rawValue: "minimumPlayersCount") + } + + public static var playStyle: Self { + .init(rawValue: "playStyle") + } + + public static var properties: Self { + .init(rawValue: "properties") + } + + public static var referenceName: Self { + .init(rawValue: "referenceName") + } + + public static var supportsPartyCode: Self { + .init(rawValue: "supportsPartyCode") + } + + public static var vendorIdentifier: Self { + .init(rawValue: "vendorIdentifier") + } + + public static var versions: Self { + .init(rawValue: "versions") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct GameCenterChallenges: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var allowedDurations: Self { + .init(rawValue: "allowedDurations") + } + + public static var archived: Self { + .init(rawValue: "archived") + } + + public static var challengeType: Self { + .init(rawValue: "challengeType") + } + + public static var gameCenterDetail: Self { + .init(rawValue: "gameCenterDetail") + } + + public static var gameCenterGroup: Self { + .init(rawValue: "gameCenterGroup") + } + + public static var leaderboard: Self { + .init(rawValue: "leaderboard") + } + + public static var referenceName: Self { + .init(rawValue: "referenceName") + } + + public static var repeatable: Self { + .init(rawValue: "repeatable") + } + + public static var vendorIdentifier: Self { + .init(rawValue: "vendorIdentifier") + } + + public static var versions: Self { + .init(rawValue: "versions") } + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "achievementReleases": self = .achievementReleases - case "app": self = .app - case "arcadeEnabled": self = .arcadeEnabled - case "challengeEnabled": self = .challengeEnabled - case "defaultGroupLeaderboard": self = .defaultGroupLeaderboard - case "defaultLeaderboard": self = .defaultLeaderboard - case "gameCenterAchievements": self = .gameCenterAchievements - case "gameCenterAppVersions": self = .gameCenterAppVersions - case "gameCenterGroup": self = .gameCenterGroup - case "gameCenterLeaderboardSets": self = .gameCenterLeaderboardSets - case "gameCenterLeaderboards": self = .gameCenterLeaderboards - case "leaderboardReleases": self = .leaderboardReleases - case "leaderboardSetReleases": self = .leaderboardSetReleases - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum GameCenterGroups: Hashable, Codable, RawRepresentable { - case gameCenterAchievements - case gameCenterDetails - case gameCenterLeaderboardSets - case gameCenterLeaderboards - case referenceName - case unknown(String) - - public var rawValue: String { - switch self { - case .gameCenterAchievements: return "gameCenterAchievements" - case .gameCenterDetails: return "gameCenterDetails" - case .gameCenterLeaderboardSets: return "gameCenterLeaderboardSets" - case .gameCenterLeaderboards: return "gameCenterLeaderboards" - case .referenceName: return "referenceName" - case .unknown(let rawValue): return rawValue - } + public struct GameCenterDetails: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var achievementReleases: Self { + .init(rawValue: "achievementReleases") + } + + public static var activityReleases: Self { + .init(rawValue: "activityReleases") + } + + public static var app: Self { + .init(rawValue: "app") + } + + public static var arcadeEnabled: Self { + .init(rawValue: "arcadeEnabled") + } + + public static var challengeEnabled: Self { + .init(rawValue: "challengeEnabled") + } + + public static var challengeReleases: Self { + .init(rawValue: "challengeReleases") + } + + public static var challengesMinimumPlatformVersions: Self { + .init(rawValue: "challengesMinimumPlatformVersions") + } + + public static var defaultGroupLeaderboard: Self { + .init(rawValue: "defaultGroupLeaderboard") + } + + public static var defaultLeaderboard: Self { + .init(rawValue: "defaultLeaderboard") + } + + public static var gameCenterAchievements: Self { + .init(rawValue: "gameCenterAchievements") + } + + public static var gameCenterActivities: Self { + .init(rawValue: "gameCenterActivities") + } + + public static var gameCenterAppVersions: Self { + .init(rawValue: "gameCenterAppVersions") + } + + public static var gameCenterChallenges: Self { + .init(rawValue: "gameCenterChallenges") + } + + public static var gameCenterGroup: Self { + .init(rawValue: "gameCenterGroup") + } + + public static var gameCenterLeaderboardSets: Self { + .init(rawValue: "gameCenterLeaderboardSets") + } + + public static var gameCenterLeaderboards: Self { + .init(rawValue: "gameCenterLeaderboards") + } + + public static var leaderboardReleases: Self { + .init(rawValue: "leaderboardReleases") + } + + public static var leaderboardSetReleases: Self { + .init(rawValue: "leaderboardSetReleases") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct GameCenterGroups: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var gameCenterAchievements: Self { + .init(rawValue: "gameCenterAchievements") + } + + public static var gameCenterActivities: Self { + .init(rawValue: "gameCenterActivities") + } + + public static var gameCenterChallenges: Self { + .init(rawValue: "gameCenterChallenges") + } + + public static var gameCenterDetails: Self { + .init(rawValue: "gameCenterDetails") + } + + public static var gameCenterLeaderboardSets: Self { + .init(rawValue: "gameCenterLeaderboardSets") + } + + public static var gameCenterLeaderboards: Self { + .init(rawValue: "gameCenterLeaderboards") + } + + public static var referenceName: Self { + .init(rawValue: "referenceName") } + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "gameCenterAchievements": self = .gameCenterAchievements - case "gameCenterDetails": self = .gameCenterDetails - case "gameCenterLeaderboardSets": self = .gameCenterLeaderboardSets - case "gameCenterLeaderboards": self = .gameCenterLeaderboards - case "referenceName": self = .referenceName - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum GameCenterLeaderboardLocalizations: Hashable, Codable, RawRepresentable { - case formatterOverride - case formatterSuffix - case formatterSuffixSingular - case gameCenterLeaderboard - case gameCenterLeaderboardImage - case locale - case name - case unknown(String) - - public var rawValue: String { - switch self { - case .formatterOverride: return "formatterOverride" - case .formatterSuffix: return "formatterSuffix" - case .formatterSuffixSingular: return "formatterSuffixSingular" - case .gameCenterLeaderboard: return "gameCenterLeaderboard" - case .gameCenterLeaderboardImage: return "gameCenterLeaderboardImage" - case .locale: return "locale" - case .name: return "name" - case .unknown(let rawValue): return rawValue - } + public struct GameCenterLeaderboardLocalizations: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var formatterOverride: Self { + .init(rawValue: "formatterOverride") + } + + public static var formatterSuffix: Self { + .init(rawValue: "formatterSuffix") + } + + public static var formatterSuffixSingular: Self { + .init(rawValue: "formatterSuffixSingular") + } + + public static var gameCenterLeaderboard: Self { + .init(rawValue: "gameCenterLeaderboard") + } + + public static var gameCenterLeaderboardImage: Self { + .init(rawValue: "gameCenterLeaderboardImage") } + public static var locale: Self { + .init(rawValue: "locale") + } + + public static var name: Self { + .init(rawValue: "name") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "formatterOverride": self = .formatterOverride - case "formatterSuffix": self = .formatterSuffix - case "formatterSuffixSingular": self = .formatterSuffixSingular - case "gameCenterLeaderboard": self = .gameCenterLeaderboard - case "gameCenterLeaderboardImage": self = .gameCenterLeaderboardImage - case "locale": self = .locale - case "name": self = .name - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum GameCenterLeaderboardReleases: Hashable, Codable, RawRepresentable { - case gameCenterDetail - case gameCenterLeaderboard - case live - case unknown(String) + public struct GameCenterLeaderboardReleases: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var gameCenterDetail: Self { + .init(rawValue: "gameCenterDetail") + } + + public static var gameCenterLeaderboard: Self { + .init(rawValue: "gameCenterLeaderboard") + } - public var rawValue: String { - switch self { - case .gameCenterDetail: return "gameCenterDetail" - case .gameCenterLeaderboard: return "gameCenterLeaderboard" - case .live: return "live" - case .unknown(let rawValue): return rawValue - } + public static var live: Self { + .init(rawValue: "live") } + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "gameCenterDetail": self = .gameCenterDetail - case "gameCenterLeaderboard": self = .gameCenterLeaderboard - case "live": self = .live - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum GameCenterLeaderboardSets: Hashable, Codable, RawRepresentable { - case gameCenterDetail - case gameCenterGroup - case gameCenterLeaderboards - case groupLeaderboardSet - case localizations - case referenceName - case releases - case vendorIdentifier - case unknown(String) - - public var rawValue: String { - switch self { - case .gameCenterDetail: return "gameCenterDetail" - case .gameCenterGroup: return "gameCenterGroup" - case .gameCenterLeaderboards: return "gameCenterLeaderboards" - case .groupLeaderboardSet: return "groupLeaderboardSet" - case .localizations: return "localizations" - case .referenceName: return "referenceName" - case .releases: return "releases" - case .vendorIdentifier: return "vendorIdentifier" - case .unknown(let rawValue): return rawValue - } + public struct GameCenterLeaderboardSets: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var gameCenterDetail: Self { + .init(rawValue: "gameCenterDetail") } + public static var gameCenterGroup: Self { + .init(rawValue: "gameCenterGroup") + } + + public static var gameCenterLeaderboards: Self { + .init(rawValue: "gameCenterLeaderboards") + } + + public static var groupLeaderboardSet: Self { + .init(rawValue: "groupLeaderboardSet") + } + + public static var localizations: Self { + .init(rawValue: "localizations") + } + + public static var referenceName: Self { + .init(rawValue: "referenceName") + } + + public static var releases: Self { + .init(rawValue: "releases") + } + + public static var vendorIdentifier: Self { + .init(rawValue: "vendorIdentifier") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "gameCenterDetail": self = .gameCenterDetail - case "gameCenterGroup": self = .gameCenterGroup - case "gameCenterLeaderboards": self = .gameCenterLeaderboards - case "groupLeaderboardSet": self = .groupLeaderboardSet - case "localizations": self = .localizations - case "referenceName": self = .referenceName - case "releases": self = .releases - case "vendorIdentifier": self = .vendorIdentifier - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum GameCenterLeaderboards: Hashable, Codable, RawRepresentable { - case archived - case defaultFormatter - case gameCenterDetail - case gameCenterGroup - case gameCenterLeaderboardSets - case groupLeaderboard - case localizations - case recurrenceDuration - case recurrenceRule - case recurrenceStartDate - case referenceName - case releases - case scoreRangeEnd - case scoreRangeStart - case scoreSortType - case submissionType - case vendorIdentifier - case unknown(String) - - public var rawValue: String { - switch self { - case .archived: return "archived" - case .defaultFormatter: return "defaultFormatter" - case .gameCenterDetail: return "gameCenterDetail" - case .gameCenterGroup: return "gameCenterGroup" - case .gameCenterLeaderboardSets: return "gameCenterLeaderboardSets" - case .groupLeaderboard: return "groupLeaderboard" - case .localizations: return "localizations" - case .recurrenceDuration: return "recurrenceDuration" - case .recurrenceRule: return "recurrenceRule" - case .recurrenceStartDate: return "recurrenceStartDate" - case .referenceName: return "referenceName" - case .releases: return "releases" - case .scoreRangeEnd: return "scoreRangeEnd" - case .scoreRangeStart: return "scoreRangeStart" - case .scoreSortType: return "scoreSortType" - case .submissionType: return "submissionType" - case .vendorIdentifier: return "vendorIdentifier" - case .unknown(let rawValue): return rawValue - } + public struct GameCenterLeaderboards: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var activity: Self { + .init(rawValue: "activity") + } + + public static var activityProperties: Self { + .init(rawValue: "activityProperties") + } + + public static var archived: Self { + .init(rawValue: "archived") + } + + public static var challenge: Self { + .init(rawValue: "challenge") + } + + public static var defaultFormatter: Self { + .init(rawValue: "defaultFormatter") + } + + public static var gameCenterDetail: Self { + .init(rawValue: "gameCenterDetail") + } + + public static var gameCenterGroup: Self { + .init(rawValue: "gameCenterGroup") + } + + public static var gameCenterLeaderboardSets: Self { + .init(rawValue: "gameCenterLeaderboardSets") + } + + public static var groupLeaderboard: Self { + .init(rawValue: "groupLeaderboard") + } + + public static var localizations: Self { + .init(rawValue: "localizations") + } + + public static var recurrenceDuration: Self { + .init(rawValue: "recurrenceDuration") + } + + public static var recurrenceRule: Self { + .init(rawValue: "recurrenceRule") + } + + public static var recurrenceStartDate: Self { + .init(rawValue: "recurrenceStartDate") + } + + public static var referenceName: Self { + .init(rawValue: "referenceName") + } + + public static var releases: Self { + .init(rawValue: "releases") + } + + public static var scoreRangeEnd: Self { + .init(rawValue: "scoreRangeEnd") + } + + public static var scoreRangeStart: Self { + .init(rawValue: "scoreRangeStart") } + public static var scoreSortType: Self { + .init(rawValue: "scoreSortType") + } + + public static var submissionType: Self { + .init(rawValue: "submissionType") + } + + public static var vendorIdentifier: Self { + .init(rawValue: "vendorIdentifier") + } + + public static var visibility: Self { + .init(rawValue: "visibility") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "archived": self = .archived - case "defaultFormatter": self = .defaultFormatter - case "gameCenterDetail": self = .gameCenterDetail - case "gameCenterGroup": self = .gameCenterGroup - case "gameCenterLeaderboardSets": self = .gameCenterLeaderboardSets - case "groupLeaderboard": self = .groupLeaderboard - case "localizations": self = .localizations - case "recurrenceDuration": self = .recurrenceDuration - case "recurrenceRule": self = .recurrenceRule - case "recurrenceStartDate": self = .recurrenceStartDate - case "referenceName": self = .referenceName - case "releases": self = .releases - case "scoreRangeEnd": self = .scoreRangeEnd - case "scoreRangeStart": self = .scoreRangeStart - case "scoreSortType": self = .scoreSortType - case "submissionType": self = .submissionType - case "vendorIdentifier": self = .vendorIdentifier - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } public struct Relation: Hashable { + /// the fields to include for returned resources of type gameCenterActivities + public static var gameCenterActivities: Relation<[GameCenterActivities]?> { + .init(key: "fields[gameCenterActivities]") + } + + /// the fields to include for returned resources of type gameCenterChallenges + public static var gameCenterChallenges: Relation<[GameCenterChallenges]?> { + .init(key: "fields[gameCenterChallenges]") + } + /// the fields to include for returned resources of type gameCenterDetails public static var gameCenterDetails: Relation<[GameCenterDetails]?> { .init(key: "fields[gameCenterDetails]") @@ -442,37 +653,47 @@ extension V1.GameCenterGroups.ById.GameCenterLeaderboards.GET { } } - public enum Include: Hashable, Codable, RawRepresentable { - case gameCenterDetail - case gameCenterGroup - case gameCenterLeaderboardSets - case groupLeaderboard - case localizations - case releases - case unknown(String) - - public var rawValue: String { - switch self { - case .gameCenterDetail: return "gameCenterDetail" - case .gameCenterGroup: return "gameCenterGroup" - case .gameCenterLeaderboardSets: return "gameCenterLeaderboardSets" - case .groupLeaderboard: return "groupLeaderboard" - case .localizations: return "localizations" - case .releases: return "releases" - case .unknown(let rawValue): return rawValue - } + public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var activity: Self { + .init(rawValue: "activity") + } + + public static var challenge: Self { + .init(rawValue: "challenge") } + public static var gameCenterDetail: Self { + .init(rawValue: "gameCenterDetail") + } + + public static var gameCenterGroup: Self { + .init(rawValue: "gameCenterGroup") + } + + public static var gameCenterLeaderboardSets: Self { + .init(rawValue: "gameCenterLeaderboardSets") + } + + public static var groupLeaderboard: Self { + .init(rawValue: "groupLeaderboard") + } + + public static var localizations: Self { + .init(rawValue: "localizations") + } + + public static var releases: Self { + .init(rawValue: "releases") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "gameCenterDetail": self = .gameCenterDetail - case "gameCenterGroup": self = .gameCenterGroup - case "gameCenterLeaderboardSets": self = .gameCenterLeaderboardSets - case "groupLeaderboard": self = .groupLeaderboard - case "localizations": self = .localizations - case "releases": self = .releases - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterGroups/ById/Relationships/GameCenterAchievements/GameCenterGroupsByIdRelationshipsGameCenterAchievements.GET.67b0033.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterGroups/ById/Relationships/GameCenterAchievements/GameCenterGroupsByIdRelationshipsGameCenterAchievements.GET.67b0033.generated.swift index 2961533e..5406abe4 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterGroups/ById/Relationships/GameCenterAchievements/GameCenterGroupsByIdRelationshipsGameCenterAchievements.GET.67b0033.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterGroups/ById/Relationships/GameCenterAchievements/GameCenterGroupsByIdRelationshipsGameCenterAchievements.GET.67b0033.generated.swift @@ -42,8 +42,10 @@ extension V1.GameCenterGroups.ById.Relationships.GameCenterAchievements { /// - Returns: **200**, List of related linkages as `GameCenterGroupGameCenterAchievementsLinkagesResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -57,12 +59,18 @@ extension V1.GameCenterGroups.ById.Relationships.GameCenterAchievements { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 404: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterGroups/ById/Relationships/GameCenterAchievements/GameCenterGroupsByIdRelationshipsGameCenterAchievements.PATCH.67b0033.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterGroups/ById/Relationships/GameCenterAchievements/GameCenterGroupsByIdRelationshipsGameCenterAchievements.PATCH.67b0033.generated.swift index 510b29a0..b59e9acc 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterGroups/ById/Relationships/GameCenterAchievements/GameCenterGroupsByIdRelationshipsGameCenterAchievements.PATCH.67b0033.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterGroups/ById/Relationships/GameCenterAchievements/GameCenterGroupsByIdRelationshipsGameCenterAchievements.PATCH.67b0033.generated.swift @@ -46,10 +46,12 @@ extension V1.GameCenterGroups.ById.Relationships.GameCenterAchievements { return urlRequest } - /// - Returns: **204**, Success (no content) + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **422**, Unprocessable request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -57,8 +59,8 @@ extension V1.GameCenterGroups.ById.Relationships.GameCenterAchievements { } switch urlResponse.statusCode { - case 204: - return + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) @@ -69,6 +71,12 @@ extension V1.GameCenterGroups.ById.Relationships.GameCenterAchievements { case 409: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 422: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterGroups/ById/Relationships/GameCenterActivities/GameCenterGroupsByIdRelationshipsGameCenterActivities.GET.6bc57bd.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterGroups/ById/Relationships/GameCenterActivities/GameCenterGroupsByIdRelationshipsGameCenterActivities.GET.6bc57bd.generated.swift new file mode 100644 index 00000000..4487d124 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterGroups/ById/Relationships/GameCenterActivities/GameCenterGroupsByIdRelationshipsGameCenterActivities.GET.6bc57bd.generated.swift @@ -0,0 +1,88 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.GameCenterGroups.ById.Relationships.GameCenterActivities { + public struct GET: Endpoint { + public typealias Response = GameCenterGroupGameCenterActivitiesLinkagesResponse + + public var path: String { + "/v1/gameCenterGroups/\(id)/relationships/gameCenterActivities" + } + + /// the id of the requested resource + public var id: String + + public var parameters: Parameters = Parameters() + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + components?.queryItems = [ + URLQueryItem(name: "limit", + value: parameters.limit.map { "\($0)" }) + ].filter { $0.value != nil } + if components?.queryItems?.isEmpty ?? false { + components?.queryItems = nil + } + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "GET" + return urlRequest + } + + /// - Returns: **200**, List of related linkages as `GameCenterGroupGameCenterActivitiesLinkagesResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(GameCenterGroupGameCenterActivitiesLinkagesResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +extension V1.GameCenterGroups.ById.Relationships.GameCenterActivities.GET { + public struct Parameters: Hashable { + /// maximum resources per page + public var limit: Int? + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterGroups/ById/Relationships/GameCenterChallenges/GameCenterGroupsByIdRelationshipsGameCenterChallenges.GET.2840c87.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterGroups/ById/Relationships/GameCenterChallenges/GameCenterGroupsByIdRelationshipsGameCenterChallenges.GET.2840c87.generated.swift new file mode 100644 index 00000000..bcfb54a7 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterGroups/ById/Relationships/GameCenterChallenges/GameCenterGroupsByIdRelationshipsGameCenterChallenges.GET.2840c87.generated.swift @@ -0,0 +1,88 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.GameCenterGroups.ById.Relationships.GameCenterChallenges { + public struct GET: Endpoint { + public typealias Response = GameCenterGroupGameCenterChallengesLinkagesResponse + + public var path: String { + "/v1/gameCenterGroups/\(id)/relationships/gameCenterChallenges" + } + + /// the id of the requested resource + public var id: String + + public var parameters: Parameters = Parameters() + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + components?.queryItems = [ + URLQueryItem(name: "limit", + value: parameters.limit.map { "\($0)" }) + ].filter { $0.value != nil } + if components?.queryItems?.isEmpty ?? false { + components?.queryItems = nil + } + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "GET" + return urlRequest + } + + /// - Returns: **200**, List of related linkages as `GameCenterGroupGameCenterChallengesLinkagesResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(GameCenterGroupGameCenterChallengesLinkagesResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +extension V1.GameCenterGroups.ById.Relationships.GameCenterChallenges.GET { + public struct Parameters: Hashable { + /// maximum resources per page + public var limit: Int? + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterGroups/ById/Relationships/GameCenterDetails/GameCenterGroupsByIdRelationshipsGameCenterDetails.GET.954c2f8.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterGroups/ById/Relationships/GameCenterDetails/GameCenterGroupsByIdRelationshipsGameCenterDetails.GET.954c2f8.generated.swift new file mode 100644 index 00000000..74c80c9d --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterGroups/ById/Relationships/GameCenterDetails/GameCenterGroupsByIdRelationshipsGameCenterDetails.GET.954c2f8.generated.swift @@ -0,0 +1,88 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.GameCenterGroups.ById.Relationships.GameCenterDetails { + public struct GET: Endpoint { + public typealias Response = GameCenterGroupGameCenterDetailsLinkagesResponse + + public var path: String { + "/v1/gameCenterGroups/\(id)/relationships/gameCenterDetails" + } + + /// the id of the requested resource + public var id: String + + public var parameters: Parameters = Parameters() + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + components?.queryItems = [ + URLQueryItem(name: "limit", + value: parameters.limit.map { "\($0)" }) + ].filter { $0.value != nil } + if components?.queryItems?.isEmpty ?? false { + components?.queryItems = nil + } + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "GET" + return urlRequest + } + + /// - Returns: **200**, List of related linkages as `GameCenterGroupGameCenterDetailsLinkagesResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(GameCenterGroupGameCenterDetailsLinkagesResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +extension V1.GameCenterGroups.ById.Relationships.GameCenterDetails.GET { + public struct Parameters: Hashable { + /// maximum resources per page + public var limit: Int? + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterGroups/ById/Relationships/GameCenterLeaderboardSets/GameCenterGroupsByIdRelationshipsGameCenterLeaderboardSets.GET.62648bd.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterGroups/ById/Relationships/GameCenterLeaderboardSets/GameCenterGroupsByIdRelationshipsGameCenterLeaderboardSets.GET.62648bd.generated.swift index 07e46e02..fc51cd79 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterGroups/ById/Relationships/GameCenterLeaderboardSets/GameCenterGroupsByIdRelationshipsGameCenterLeaderboardSets.GET.62648bd.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterGroups/ById/Relationships/GameCenterLeaderboardSets/GameCenterGroupsByIdRelationshipsGameCenterLeaderboardSets.GET.62648bd.generated.swift @@ -42,8 +42,10 @@ extension V1.GameCenterGroups.ById.Relationships.GameCenterLeaderboardSets { /// - Returns: **200**, List of related linkages as `GameCenterGroupGameCenterLeaderboardSetsLinkagesResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -57,12 +59,18 @@ extension V1.GameCenterGroups.ById.Relationships.GameCenterLeaderboardSets { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 404: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterGroups/ById/Relationships/GameCenterLeaderboardSets/GameCenterGroupsByIdRelationshipsGameCenterLeaderboardSets.PATCH.62648bd.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterGroups/ById/Relationships/GameCenterLeaderboardSets/GameCenterGroupsByIdRelationshipsGameCenterLeaderboardSets.PATCH.62648bd.generated.swift index 38df7115..5f3fa6ae 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterGroups/ById/Relationships/GameCenterLeaderboardSets/GameCenterGroupsByIdRelationshipsGameCenterLeaderboardSets.PATCH.62648bd.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterGroups/ById/Relationships/GameCenterLeaderboardSets/GameCenterGroupsByIdRelationshipsGameCenterLeaderboardSets.PATCH.62648bd.generated.swift @@ -46,10 +46,12 @@ extension V1.GameCenterGroups.ById.Relationships.GameCenterLeaderboardSets { return urlRequest } - /// - Returns: **204**, Success (no content) + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **422**, Unprocessable request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -57,8 +59,8 @@ extension V1.GameCenterGroups.ById.Relationships.GameCenterLeaderboardSets { } switch urlResponse.statusCode { - case 204: - return + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) @@ -69,6 +71,12 @@ extension V1.GameCenterGroups.ById.Relationships.GameCenterLeaderboardSets { case 409: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 422: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterGroups/ById/Relationships/GameCenterLeaderboards/GameCenterGroupsByIdRelationshipsGameCenterLeaderboards.GET.204da09.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterGroups/ById/Relationships/GameCenterLeaderboards/GameCenterGroupsByIdRelationshipsGameCenterLeaderboards.GET.204da09.generated.swift index 8f456b78..8cacb7e9 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterGroups/ById/Relationships/GameCenterLeaderboards/GameCenterGroupsByIdRelationshipsGameCenterLeaderboards.GET.204da09.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterGroups/ById/Relationships/GameCenterLeaderboards/GameCenterGroupsByIdRelationshipsGameCenterLeaderboards.GET.204da09.generated.swift @@ -42,8 +42,10 @@ extension V1.GameCenterGroups.ById.Relationships.GameCenterLeaderboards { /// - Returns: **200**, List of related linkages as `GameCenterGroupGameCenterLeaderboardsLinkagesResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -57,12 +59,18 @@ extension V1.GameCenterGroups.ById.Relationships.GameCenterLeaderboards { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 404: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterGroups/ById/Relationships/GameCenterLeaderboards/GameCenterGroupsByIdRelationshipsGameCenterLeaderboards.PATCH.204da09.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterGroups/ById/Relationships/GameCenterLeaderboards/GameCenterGroupsByIdRelationshipsGameCenterLeaderboards.PATCH.204da09.generated.swift index be0e3456..11871a9b 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterGroups/ById/Relationships/GameCenterLeaderboards/GameCenterGroupsByIdRelationshipsGameCenterLeaderboards.PATCH.204da09.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterGroups/ById/Relationships/GameCenterLeaderboards/GameCenterGroupsByIdRelationshipsGameCenterLeaderboards.PATCH.204da09.generated.swift @@ -46,10 +46,12 @@ extension V1.GameCenterGroups.ById.Relationships.GameCenterLeaderboards { return urlRequest } - /// - Returns: **204**, Success (no content) + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **422**, Unprocessable request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -57,8 +59,8 @@ extension V1.GameCenterGroups.ById.Relationships.GameCenterLeaderboards { } switch urlResponse.statusCode { - case 204: - return + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) @@ -69,6 +71,12 @@ extension V1.GameCenterGroups.ById.Relationships.GameCenterLeaderboards { case 409: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 422: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterGroups/GameCenterGroups.GET.1fdc22f.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterGroups/GameCenterGroups.GET.1fdc22f.generated.swift index a7d6a13a..6d0305df 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterGroups/GameCenterGroups.GET.1fdc22f.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterGroups/GameCenterGroups.GET.1fdc22f.generated.swift @@ -27,6 +27,10 @@ extension V1.GameCenterGroups { components?.queryItems = [ URLQueryItem(name: "fields[gameCenterAchievements]", value: parameters.fields[.gameCenterAchievements]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "fields[gameCenterActivities]", + value: parameters.fields[.gameCenterActivities]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "fields[gameCenterChallenges]", + value: parameters.fields[.gameCenterChallenges]?.map { "\($0)" }.joined(separator: ",")), URLQueryItem(name: "fields[gameCenterDetails]", value: parameters.fields[.gameCenterDetails]?.map { "\($0)" }.joined(separator: ",")), URLQueryItem(name: "fields[gameCenterGroups]", @@ -41,6 +45,10 @@ extension V1.GameCenterGroups { value: parameters.include?.map { "\($0)" }.joined(separator: ",")), URLQueryItem(name: "limit[gameCenterAchievements]", value: parameters.limit[.gameCenterAchievements].map { "\($0)" }), + URLQueryItem(name: "limit[gameCenterActivities]", + value: parameters.limit[.gameCenterActivities].map { "\($0)" }), + URLQueryItem(name: "limit[gameCenterChallenges]", + value: parameters.limit[.gameCenterChallenges].map { "\($0)" }), URLQueryItem(name: "limit[gameCenterDetails]", value: parameters.limit[.gameCenterDetails].map { "\($0)" }), URLQueryItem(name: "limit[gameCenterLeaderboardSets]", @@ -61,7 +69,9 @@ extension V1.GameCenterGroups { /// - Returns: **200**, List of GameCenterGroups as `GameCenterGroupsResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -75,9 +85,15 @@ extension V1.GameCenterGroups { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -105,245 +121,447 @@ extension V1.GameCenterGroups.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum GameCenterAchievements: Hashable, Codable, RawRepresentable { - case archived - case gameCenterDetail - case gameCenterGroup - case groupAchievement - case localizations - case points - case referenceName - case releases - case repeatable - case showBeforeEarned - case vendorIdentifier - case unknown(String) - - public var rawValue: String { - switch self { - case .archived: return "archived" - case .gameCenterDetail: return "gameCenterDetail" - case .gameCenterGroup: return "gameCenterGroup" - case .groupAchievement: return "groupAchievement" - case .localizations: return "localizations" - case .points: return "points" - case .referenceName: return "referenceName" - case .releases: return "releases" - case .repeatable: return "repeatable" - case .showBeforeEarned: return "showBeforeEarned" - case .vendorIdentifier: return "vendorIdentifier" - case .unknown(let rawValue): return rawValue - } + public struct GameCenterAchievements: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var activity: Self { + .init(rawValue: "activity") + } + + public static var activityProperties: Self { + .init(rawValue: "activityProperties") + } + + public static var archived: Self { + .init(rawValue: "archived") } + public static var gameCenterDetail: Self { + .init(rawValue: "gameCenterDetail") + } + + public static var gameCenterGroup: Self { + .init(rawValue: "gameCenterGroup") + } + + public static var groupAchievement: Self { + .init(rawValue: "groupAchievement") + } + + public static var localizations: Self { + .init(rawValue: "localizations") + } + + public static var points: Self { + .init(rawValue: "points") + } + + public static var referenceName: Self { + .init(rawValue: "referenceName") + } + + public static var releases: Self { + .init(rawValue: "releases") + } + + public static var repeatable: Self { + .init(rawValue: "repeatable") + } + + public static var showBeforeEarned: Self { + .init(rawValue: "showBeforeEarned") + } + + public static var vendorIdentifier: Self { + .init(rawValue: "vendorIdentifier") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "archived": self = .archived - case "gameCenterDetail": self = .gameCenterDetail - case "gameCenterGroup": self = .gameCenterGroup - case "groupAchievement": self = .groupAchievement - case "localizations": self = .localizations - case "points": self = .points - case "referenceName": self = .referenceName - case "releases": self = .releases - case "repeatable": self = .repeatable - case "showBeforeEarned": self = .showBeforeEarned - case "vendorIdentifier": self = .vendorIdentifier - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum GameCenterDetails: Hashable, Codable, RawRepresentable { - case achievementReleases - case app - case arcadeEnabled - case challengeEnabled - case defaultGroupLeaderboard - case defaultLeaderboard - case gameCenterAchievements - case gameCenterAppVersions - case gameCenterGroup - case gameCenterLeaderboardSets - case gameCenterLeaderboards - case leaderboardReleases - case leaderboardSetReleases - case unknown(String) - - public var rawValue: String { - switch self { - case .achievementReleases: return "achievementReleases" - case .app: return "app" - case .arcadeEnabled: return "arcadeEnabled" - case .challengeEnabled: return "challengeEnabled" - case .defaultGroupLeaderboard: return "defaultGroupLeaderboard" - case .defaultLeaderboard: return "defaultLeaderboard" - case .gameCenterAchievements: return "gameCenterAchievements" - case .gameCenterAppVersions: return "gameCenterAppVersions" - case .gameCenterGroup: return "gameCenterGroup" - case .gameCenterLeaderboardSets: return "gameCenterLeaderboardSets" - case .gameCenterLeaderboards: return "gameCenterLeaderboards" - case .leaderboardReleases: return "leaderboardReleases" - case .leaderboardSetReleases: return "leaderboardSetReleases" - case .unknown(let rawValue): return rawValue - } + public struct GameCenterActivities: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var achievements: Self { + .init(rawValue: "achievements") + } + + public static var archived: Self { + .init(rawValue: "archived") + } + + public static var gameCenterDetail: Self { + .init(rawValue: "gameCenterDetail") + } + + public static var gameCenterGroup: Self { + .init(rawValue: "gameCenterGroup") + } + + public static var leaderboards: Self { + .init(rawValue: "leaderboards") + } + + public static var maximumPlayersCount: Self { + .init(rawValue: "maximumPlayersCount") + } + + public static var minimumPlayersCount: Self { + .init(rawValue: "minimumPlayersCount") + } + + public static var playStyle: Self { + .init(rawValue: "playStyle") + } + + public static var properties: Self { + .init(rawValue: "properties") + } + + public static var referenceName: Self { + .init(rawValue: "referenceName") + } + + public static var supportsPartyCode: Self { + .init(rawValue: "supportsPartyCode") + } + + public static var vendorIdentifier: Self { + .init(rawValue: "vendorIdentifier") + } + + public static var versions: Self { + .init(rawValue: "versions") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct GameCenterChallenges: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var allowedDurations: Self { + .init(rawValue: "allowedDurations") + } + + public static var archived: Self { + .init(rawValue: "archived") + } + + public static var challengeType: Self { + .init(rawValue: "challengeType") + } + + public static var gameCenterDetail: Self { + .init(rawValue: "gameCenterDetail") + } + + public static var gameCenterGroup: Self { + .init(rawValue: "gameCenterGroup") + } + + public static var leaderboard: Self { + .init(rawValue: "leaderboard") + } + + public static var referenceName: Self { + .init(rawValue: "referenceName") + } + + public static var repeatable: Self { + .init(rawValue: "repeatable") + } + + public static var vendorIdentifier: Self { + .init(rawValue: "vendorIdentifier") + } + + public static var versions: Self { + .init(rawValue: "versions") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct GameCenterDetails: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var achievementReleases: Self { + .init(rawValue: "achievementReleases") + } + + public static var activityReleases: Self { + .init(rawValue: "activityReleases") + } + + public static var app: Self { + .init(rawValue: "app") + } + + public static var arcadeEnabled: Self { + .init(rawValue: "arcadeEnabled") + } + + public static var challengeEnabled: Self { + .init(rawValue: "challengeEnabled") + } + + public static var challengeReleases: Self { + .init(rawValue: "challengeReleases") + } + + public static var challengesMinimumPlatformVersions: Self { + .init(rawValue: "challengesMinimumPlatformVersions") + } + + public static var defaultGroupLeaderboard: Self { + .init(rawValue: "defaultGroupLeaderboard") + } + + public static var defaultLeaderboard: Self { + .init(rawValue: "defaultLeaderboard") + } + + public static var gameCenterAchievements: Self { + .init(rawValue: "gameCenterAchievements") + } + + public static var gameCenterActivities: Self { + .init(rawValue: "gameCenterActivities") + } + + public static var gameCenterAppVersions: Self { + .init(rawValue: "gameCenterAppVersions") } + public static var gameCenterChallenges: Self { + .init(rawValue: "gameCenterChallenges") + } + + public static var gameCenterGroup: Self { + .init(rawValue: "gameCenterGroup") + } + + public static var gameCenterLeaderboardSets: Self { + .init(rawValue: "gameCenterLeaderboardSets") + } + + public static var gameCenterLeaderboards: Self { + .init(rawValue: "gameCenterLeaderboards") + } + + public static var leaderboardReleases: Self { + .init(rawValue: "leaderboardReleases") + } + + public static var leaderboardSetReleases: Self { + .init(rawValue: "leaderboardSetReleases") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "achievementReleases": self = .achievementReleases - case "app": self = .app - case "arcadeEnabled": self = .arcadeEnabled - case "challengeEnabled": self = .challengeEnabled - case "defaultGroupLeaderboard": self = .defaultGroupLeaderboard - case "defaultLeaderboard": self = .defaultLeaderboard - case "gameCenterAchievements": self = .gameCenterAchievements - case "gameCenterAppVersions": self = .gameCenterAppVersions - case "gameCenterGroup": self = .gameCenterGroup - case "gameCenterLeaderboardSets": self = .gameCenterLeaderboardSets - case "gameCenterLeaderboards": self = .gameCenterLeaderboards - case "leaderboardReleases": self = .leaderboardReleases - case "leaderboardSetReleases": self = .leaderboardSetReleases - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum GameCenterGroups: Hashable, Codable, RawRepresentable { - case gameCenterAchievements - case gameCenterDetails - case gameCenterLeaderboardSets - case gameCenterLeaderboards - case referenceName - case unknown(String) - - public var rawValue: String { - switch self { - case .gameCenterAchievements: return "gameCenterAchievements" - case .gameCenterDetails: return "gameCenterDetails" - case .gameCenterLeaderboardSets: return "gameCenterLeaderboardSets" - case .gameCenterLeaderboards: return "gameCenterLeaderboards" - case .referenceName: return "referenceName" - case .unknown(let rawValue): return rawValue - } + public struct GameCenterGroups: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var gameCenterAchievements: Self { + .init(rawValue: "gameCenterAchievements") + } + + public static var gameCenterActivities: Self { + .init(rawValue: "gameCenterActivities") + } + + public static var gameCenterChallenges: Self { + .init(rawValue: "gameCenterChallenges") + } + + public static var gameCenterDetails: Self { + .init(rawValue: "gameCenterDetails") + } + + public static var gameCenterLeaderboardSets: Self { + .init(rawValue: "gameCenterLeaderboardSets") + } + + public static var gameCenterLeaderboards: Self { + .init(rawValue: "gameCenterLeaderboards") + } + + public static var referenceName: Self { + .init(rawValue: "referenceName") + } + + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "gameCenterAchievements": self = .gameCenterAchievements - case "gameCenterDetails": self = .gameCenterDetails - case "gameCenterLeaderboardSets": self = .gameCenterLeaderboardSets - case "gameCenterLeaderboards": self = .gameCenterLeaderboards - case "referenceName": self = .referenceName - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum GameCenterLeaderboardSets: Hashable, Codable, RawRepresentable { - case gameCenterDetail - case gameCenterGroup - case gameCenterLeaderboards - case groupLeaderboardSet - case localizations - case referenceName - case releases - case vendorIdentifier - case unknown(String) - - public var rawValue: String { - switch self { - case .gameCenterDetail: return "gameCenterDetail" - case .gameCenterGroup: return "gameCenterGroup" - case .gameCenterLeaderboards: return "gameCenterLeaderboards" - case .groupLeaderboardSet: return "groupLeaderboardSet" - case .localizations: return "localizations" - case .referenceName: return "referenceName" - case .releases: return "releases" - case .vendorIdentifier: return "vendorIdentifier" - case .unknown(let rawValue): return rawValue - } + public struct GameCenterLeaderboardSets: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var gameCenterDetail: Self { + .init(rawValue: "gameCenterDetail") + } + + public static var gameCenterGroup: Self { + .init(rawValue: "gameCenterGroup") + } + + public static var gameCenterLeaderboards: Self { + .init(rawValue: "gameCenterLeaderboards") + } + + public static var groupLeaderboardSet: Self { + .init(rawValue: "groupLeaderboardSet") + } + + public static var localizations: Self { + .init(rawValue: "localizations") + } + + public static var referenceName: Self { + .init(rawValue: "referenceName") + } + + public static var releases: Self { + .init(rawValue: "releases") + } + + public static var vendorIdentifier: Self { + .init(rawValue: "vendorIdentifier") + } + + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "gameCenterDetail": self = .gameCenterDetail - case "gameCenterGroup": self = .gameCenterGroup - case "gameCenterLeaderboards": self = .gameCenterLeaderboards - case "groupLeaderboardSet": self = .groupLeaderboardSet - case "localizations": self = .localizations - case "referenceName": self = .referenceName - case "releases": self = .releases - case "vendorIdentifier": self = .vendorIdentifier - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum GameCenterLeaderboards: Hashable, Codable, RawRepresentable { - case archived - case defaultFormatter - case gameCenterDetail - case gameCenterGroup - case gameCenterLeaderboardSets - case groupLeaderboard - case localizations - case recurrenceDuration - case recurrenceRule - case recurrenceStartDate - case referenceName - case releases - case scoreRangeEnd - case scoreRangeStart - case scoreSortType - case submissionType - case vendorIdentifier - case unknown(String) - - public var rawValue: String { - switch self { - case .archived: return "archived" - case .defaultFormatter: return "defaultFormatter" - case .gameCenterDetail: return "gameCenterDetail" - case .gameCenterGroup: return "gameCenterGroup" - case .gameCenterLeaderboardSets: return "gameCenterLeaderboardSets" - case .groupLeaderboard: return "groupLeaderboard" - case .localizations: return "localizations" - case .recurrenceDuration: return "recurrenceDuration" - case .recurrenceRule: return "recurrenceRule" - case .recurrenceStartDate: return "recurrenceStartDate" - case .referenceName: return "referenceName" - case .releases: return "releases" - case .scoreRangeEnd: return "scoreRangeEnd" - case .scoreRangeStart: return "scoreRangeStart" - case .scoreSortType: return "scoreSortType" - case .submissionType: return "submissionType" - case .vendorIdentifier: return "vendorIdentifier" - case .unknown(let rawValue): return rawValue - } + public struct GameCenterLeaderboards: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var activity: Self { + .init(rawValue: "activity") + } + + public static var activityProperties: Self { + .init(rawValue: "activityProperties") + } + + public static var archived: Self { + .init(rawValue: "archived") + } + + public static var challenge: Self { + .init(rawValue: "challenge") + } + + public static var defaultFormatter: Self { + .init(rawValue: "defaultFormatter") + } + + public static var gameCenterDetail: Self { + .init(rawValue: "gameCenterDetail") } + public static var gameCenterGroup: Self { + .init(rawValue: "gameCenterGroup") + } + + public static var gameCenterLeaderboardSets: Self { + .init(rawValue: "gameCenterLeaderboardSets") + } + + public static var groupLeaderboard: Self { + .init(rawValue: "groupLeaderboard") + } + + public static var localizations: Self { + .init(rawValue: "localizations") + } + + public static var recurrenceDuration: Self { + .init(rawValue: "recurrenceDuration") + } + + public static var recurrenceRule: Self { + .init(rawValue: "recurrenceRule") + } + + public static var recurrenceStartDate: Self { + .init(rawValue: "recurrenceStartDate") + } + + public static var referenceName: Self { + .init(rawValue: "referenceName") + } + + public static var releases: Self { + .init(rawValue: "releases") + } + + public static var scoreRangeEnd: Self { + .init(rawValue: "scoreRangeEnd") + } + + public static var scoreRangeStart: Self { + .init(rawValue: "scoreRangeStart") + } + + public static var scoreSortType: Self { + .init(rawValue: "scoreSortType") + } + + public static var submissionType: Self { + .init(rawValue: "submissionType") + } + + public static var vendorIdentifier: Self { + .init(rawValue: "vendorIdentifier") + } + + public static var visibility: Self { + .init(rawValue: "visibility") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "archived": self = .archived - case "defaultFormatter": self = .defaultFormatter - case "gameCenterDetail": self = .gameCenterDetail - case "gameCenterGroup": self = .gameCenterGroup - case "gameCenterLeaderboardSets": self = .gameCenterLeaderboardSets - case "groupLeaderboard": self = .groupLeaderboard - case "localizations": self = .localizations - case "recurrenceDuration": self = .recurrenceDuration - case "recurrenceRule": self = .recurrenceRule - case "recurrenceStartDate": self = .recurrenceStartDate - case "referenceName": self = .referenceName - case "releases": self = .releases - case "scoreRangeEnd": self = .scoreRangeEnd - case "scoreRangeStart": self = .scoreRangeStart - case "scoreSortType": self = .scoreSortType - case "submissionType": self = .submissionType - case "vendorIdentifier": self = .vendorIdentifier - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } @@ -353,6 +571,16 @@ extension V1.GameCenterGroups.GET { .init(key: "fields[gameCenterAchievements]") } + /// the fields to include for returned resources of type gameCenterActivities + public static var gameCenterActivities: Relation<[GameCenterActivities]?> { + .init(key: "fields[gameCenterActivities]") + } + + /// the fields to include for returned resources of type gameCenterChallenges + public static var gameCenterChallenges: Relation<[GameCenterChallenges]?> { + .init(key: "fields[gameCenterChallenges]") + } + /// the fields to include for returned resources of type gameCenterDetails public static var gameCenterDetails: Relation<[GameCenterDetails]?> { .init(key: "fields[gameCenterDetails]") @@ -403,31 +631,39 @@ extension V1.GameCenterGroups.GET { } } - public enum Include: Hashable, Codable, RawRepresentable { - case gameCenterAchievements - case gameCenterDetails - case gameCenterLeaderboardSets - case gameCenterLeaderboards - case unknown(String) - - public var rawValue: String { - switch self { - case .gameCenterAchievements: return "gameCenterAchievements" - case .gameCenterDetails: return "gameCenterDetails" - case .gameCenterLeaderboardSets: return "gameCenterLeaderboardSets" - case .gameCenterLeaderboards: return "gameCenterLeaderboards" - case .unknown(let rawValue): return rawValue - } + public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var gameCenterAchievements: Self { + .init(rawValue: "gameCenterAchievements") + } + + public static var gameCenterActivities: Self { + .init(rawValue: "gameCenterActivities") + } + + public static var gameCenterChallenges: Self { + .init(rawValue: "gameCenterChallenges") } + public static var gameCenterDetails: Self { + .init(rawValue: "gameCenterDetails") + } + + public static var gameCenterLeaderboardSets: Self { + .init(rawValue: "gameCenterLeaderboardSets") + } + + public static var gameCenterLeaderboards: Self { + .init(rawValue: "gameCenterLeaderboards") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "gameCenterAchievements": self = .gameCenterAchievements - case "gameCenterDetails": self = .gameCenterDetails - case "gameCenterLeaderboardSets": self = .gameCenterLeaderboardSets - case "gameCenterLeaderboards": self = .gameCenterLeaderboards - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } @@ -450,6 +686,16 @@ extension V1.GameCenterGroups.GET { .init(key: "limit[gameCenterAchievements]") } + /// maximum number of related gameCenterActivities returned (when they are included) + public static var gameCenterActivities: Relation { + .init(key: "limit[gameCenterActivities]") + } + + /// maximum number of related gameCenterChallenges returned (when they are included) + public static var gameCenterChallenges: Relation { + .init(key: "limit[gameCenterChallenges]") + } + /// maximum number of related gameCenterDetails returned (when they are included) public static var gameCenterDetails: Relation { .init(key: "limit[gameCenterDetails]") diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterGroups/GameCenterGroups.POST.1fdc22f.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterGroups/GameCenterGroups.POST.1fdc22f.generated.swift index 3dac50fb..8c42b3a7 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterGroups/GameCenterGroups.POST.1fdc22f.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterGroups/GameCenterGroups.POST.1fdc22f.generated.swift @@ -41,8 +41,11 @@ extension V1.GameCenterGroups { /// - Returns: **201**, Single GameCenterGroup as `GameCenterGroupResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **422**, Unprocessable request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -56,12 +59,21 @@ extension V1.GameCenterGroups { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 409: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 422: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterLeaderboardEntrySubmissions/GameCenterLeaderboardEntrySubmissions.POST.390a5fa.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterLeaderboardEntrySubmissions/GameCenterLeaderboardEntrySubmissions.POST.390a5fa.generated.swift new file mode 100644 index 00000000..47a3115a --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterLeaderboardEntrySubmissions/GameCenterLeaderboardEntrySubmissions.POST.390a5fa.generated.swift @@ -0,0 +1,84 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.GameCenterLeaderboardEntrySubmissions { + public struct POST: Endpoint { + public typealias Parameters = GameCenterLeaderboardEntrySubmissionCreateRequest + public typealias Response = GameCenterLeaderboardEntrySubmissionResponse + + public var path: String { + "/v1/gameCenterLeaderboardEntrySubmissions" + } + + /// GameCenterLeaderboardEntrySubmission representation + public var parameters: Parameters + + public init(parameters: Parameters) { + self.parameters = parameters + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "POST" + + var jsonEncoder: JSONEncoder { + let encoder = JSONEncoder() + return encoder + } + + urlRequest?.httpBody = try jsonEncoder.encode(parameters) + urlRequest?.setValue("application/json", forHTTPHeaderField: "Content-Type") + return urlRequest + } + + /// - Returns: **201**, Single GameCenterLeaderboardEntrySubmission as `GameCenterLeaderboardEntrySubmissionResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **422**, Unprocessable request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 201: + return try jsonDecoder.decode(GameCenterLeaderboardEntrySubmissionResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 409: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 422: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterLeaderboardImages/ById/GameCenterLeaderboardImagesById.DELETE.4371df3.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterLeaderboardImages/ById/GameCenterLeaderboardImagesById.DELETE.4371df3.generated.swift index d8fd243f..22a59f31 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterLeaderboardImages/ById/GameCenterLeaderboardImagesById.DELETE.4371df3.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterLeaderboardImages/ById/GameCenterLeaderboardImagesById.DELETE.4371df3.generated.swift @@ -31,11 +31,12 @@ extension V1.GameCenterLeaderboardImages.ById { return urlRequest } - /// - Returns: **204**, Success (no content) /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -43,12 +44,12 @@ extension V1.GameCenterLeaderboardImages.ById { } switch urlResponse.statusCode { - case 204: - return - case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) @@ -58,6 +59,9 @@ extension V1.GameCenterLeaderboardImages.ById { case 409: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterLeaderboardImages/ById/GameCenterLeaderboardImagesById.GET.4371df3.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterLeaderboardImages/ById/GameCenterLeaderboardImagesById.GET.4371df3.generated.swift index 3657e3aa..171ea42a 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterLeaderboardImages/ById/GameCenterLeaderboardImagesById.GET.4371df3.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterLeaderboardImages/ById/GameCenterLeaderboardImagesById.GET.4371df3.generated.swift @@ -44,8 +44,10 @@ extension V1.GameCenterLeaderboardImages.ById { /// - Returns: **200**, Single GameCenterLeaderboardImage as `GameCenterLeaderboardImageResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -59,12 +61,18 @@ extension V1.GameCenterLeaderboardImages.ById { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 404: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -87,40 +95,39 @@ extension V1.GameCenterLeaderboardImages.ById.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum GameCenterLeaderboardImages: Hashable, Codable, RawRepresentable { - case assetDeliveryState - case fileName - case fileSize - case gameCenterLeaderboardLocalization - case imageAsset - case uploadOperations - case uploaded - case unknown(String) - - public var rawValue: String { - switch self { - case .assetDeliveryState: return "assetDeliveryState" - case .fileName: return "fileName" - case .fileSize: return "fileSize" - case .gameCenterLeaderboardLocalization: return "gameCenterLeaderboardLocalization" - case .imageAsset: return "imageAsset" - case .uploadOperations: return "uploadOperations" - case .uploaded: return "uploaded" - case .unknown(let rawValue): return rawValue - } + public struct GameCenterLeaderboardImages: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var assetDeliveryState: Self { + .init(rawValue: "assetDeliveryState") + } + + public static var fileName: Self { + .init(rawValue: "fileName") } + public static var fileSize: Self { + .init(rawValue: "fileSize") + } + + public static var gameCenterLeaderboardLocalization: Self { + .init(rawValue: "gameCenterLeaderboardLocalization") + } + + public static var imageAsset: Self { + .init(rawValue: "imageAsset") + } + + public static var uploadOperations: Self { + .init(rawValue: "uploadOperations") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "assetDeliveryState": self = .assetDeliveryState - case "fileName": self = .fileName - case "fileSize": self = .fileSize - case "gameCenterLeaderboardLocalization": self = .gameCenterLeaderboardLocalization - case "imageAsset": self = .imageAsset - case "uploadOperations": self = .uploadOperations - case "uploaded": self = .uploaded - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } @@ -138,22 +145,19 @@ extension V1.GameCenterLeaderboardImages.ById.GET { } } - public enum Include: Hashable, Codable, RawRepresentable { - case gameCenterLeaderboardLocalization - case unknown(String) + public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var gameCenterLeaderboardLocalization: Self { + .init(rawValue: "gameCenterLeaderboardLocalization") + } - public var rawValue: String { - switch self { - case .gameCenterLeaderboardLocalization: return "gameCenterLeaderboardLocalization" - case .unknown(let rawValue): return rawValue - } + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "gameCenterLeaderboardLocalization": self = .gameCenterLeaderboardLocalization - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterLeaderboardImages/ById/GameCenterLeaderboardImagesById.PATCH.4371df3.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterLeaderboardImages/ById/GameCenterLeaderboardImagesById.PATCH.4371df3.generated.swift index 5cd29c25..e66ba36c 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterLeaderboardImages/ById/GameCenterLeaderboardImagesById.PATCH.4371df3.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterLeaderboardImages/ById/GameCenterLeaderboardImagesById.PATCH.4371df3.generated.swift @@ -48,9 +48,12 @@ extension V1.GameCenterLeaderboardImages.ById { /// - Returns: **200**, Single GameCenterLeaderboardImage as `GameCenterLeaderboardImageResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **422**, Unprocessable request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -64,6 +67,9 @@ extension V1.GameCenterLeaderboardImages.ById { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) @@ -73,6 +79,12 @@ extension V1.GameCenterLeaderboardImages.ById { case 409: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 422: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterLeaderboardImages/GameCenterLeaderboardImages.POST.b6b7af5.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterLeaderboardImages/GameCenterLeaderboardImages.POST.b6b7af5.generated.swift index 920cd1db..bdbdb22b 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterLeaderboardImages/GameCenterLeaderboardImages.POST.b6b7af5.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterLeaderboardImages/GameCenterLeaderboardImages.POST.b6b7af5.generated.swift @@ -41,8 +41,11 @@ extension V1.GameCenterLeaderboardImages { /// - Returns: **201**, Single GameCenterLeaderboardImage as `GameCenterLeaderboardImageResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **422**, Unprocessable request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -56,12 +59,21 @@ extension V1.GameCenterLeaderboardImages { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 409: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 422: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterLeaderboardLocalizations/ById/GameCenterLeaderboardImage/GameCenterLeaderboardLocalizationsByIdGameCenterLeaderboardImage.GET.a5d1321.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterLeaderboardLocalizations/ById/GameCenterLeaderboardImage/GameCenterLeaderboardLocalizationsByIdGameCenterLeaderboardImage.GET.a5d1321.generated.swift index 55e458cf..6b431744 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterLeaderboardLocalizations/ById/GameCenterLeaderboardImage/GameCenterLeaderboardLocalizationsByIdGameCenterLeaderboardImage.GET.a5d1321.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterLeaderboardLocalizations/ById/GameCenterLeaderboardImage/GameCenterLeaderboardLocalizationsByIdGameCenterLeaderboardImage.GET.a5d1321.generated.swift @@ -46,8 +46,10 @@ extension V1.GameCenterLeaderboardLocalizations.ById.GameCenterLeaderboardImage /// - Returns: **200**, Single GameCenterLeaderboardImage as `GameCenterLeaderboardImageResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -61,12 +63,18 @@ extension V1.GameCenterLeaderboardLocalizations.ById.GameCenterLeaderboardImage case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 404: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -89,77 +97,79 @@ extension V1.GameCenterLeaderboardLocalizations.ById.GameCenterLeaderboardImage. private var values: [AnyHashable: AnyHashable] = [:] - public enum GameCenterLeaderboardImages: Hashable, Codable, RawRepresentable { - case assetDeliveryState - case fileName - case fileSize - case gameCenterLeaderboardLocalization - case imageAsset - case uploadOperations - case uploaded - case unknown(String) - - public var rawValue: String { - switch self { - case .assetDeliveryState: return "assetDeliveryState" - case .fileName: return "fileName" - case .fileSize: return "fileSize" - case .gameCenterLeaderboardLocalization: return "gameCenterLeaderboardLocalization" - case .imageAsset: return "imageAsset" - case .uploadOperations: return "uploadOperations" - case .uploaded: return "uploaded" - case .unknown(let rawValue): return rawValue - } + public struct GameCenterLeaderboardImages: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var assetDeliveryState: Self { + .init(rawValue: "assetDeliveryState") + } + + public static var fileName: Self { + .init(rawValue: "fileName") + } + + public static var fileSize: Self { + .init(rawValue: "fileSize") + } + + public static var gameCenterLeaderboardLocalization: Self { + .init(rawValue: "gameCenterLeaderboardLocalization") + } + + public static var imageAsset: Self { + .init(rawValue: "imageAsset") + } + + public static var uploadOperations: Self { + .init(rawValue: "uploadOperations") } + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "assetDeliveryState": self = .assetDeliveryState - case "fileName": self = .fileName - case "fileSize": self = .fileSize - case "gameCenterLeaderboardLocalization": self = .gameCenterLeaderboardLocalization - case "imageAsset": self = .imageAsset - case "uploadOperations": self = .uploadOperations - case "uploaded": self = .uploaded - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum GameCenterLeaderboardLocalizations: Hashable, Codable, RawRepresentable { - case formatterOverride - case formatterSuffix - case formatterSuffixSingular - case gameCenterLeaderboard - case gameCenterLeaderboardImage - case locale - case name - case unknown(String) - - public var rawValue: String { - switch self { - case .formatterOverride: return "formatterOverride" - case .formatterSuffix: return "formatterSuffix" - case .formatterSuffixSingular: return "formatterSuffixSingular" - case .gameCenterLeaderboard: return "gameCenterLeaderboard" - case .gameCenterLeaderboardImage: return "gameCenterLeaderboardImage" - case .locale: return "locale" - case .name: return "name" - case .unknown(let rawValue): return rawValue - } + public struct GameCenterLeaderboardLocalizations: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var formatterOverride: Self { + .init(rawValue: "formatterOverride") + } + + public static var formatterSuffix: Self { + .init(rawValue: "formatterSuffix") + } + + public static var formatterSuffixSingular: Self { + .init(rawValue: "formatterSuffixSingular") + } + + public static var gameCenterLeaderboard: Self { + .init(rawValue: "gameCenterLeaderboard") + } + + public static var gameCenterLeaderboardImage: Self { + .init(rawValue: "gameCenterLeaderboardImage") + } + + public static var locale: Self { + .init(rawValue: "locale") } + public static var name: Self { + .init(rawValue: "name") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "formatterOverride": self = .formatterOverride - case "formatterSuffix": self = .formatterSuffix - case "formatterSuffixSingular": self = .formatterSuffixSingular - case "gameCenterLeaderboard": self = .gameCenterLeaderboard - case "gameCenterLeaderboardImage": self = .gameCenterLeaderboardImage - case "locale": self = .locale - case "name": self = .name - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } @@ -182,22 +192,19 @@ extension V1.GameCenterLeaderboardLocalizations.ById.GameCenterLeaderboardImage. } } - public enum Include: Hashable, Codable, RawRepresentable { - case gameCenterLeaderboardLocalization - case unknown(String) + public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var gameCenterLeaderboardLocalization: Self { + .init(rawValue: "gameCenterLeaderboardLocalization") + } - public var rawValue: String { - switch self { - case .gameCenterLeaderboardLocalization: return "gameCenterLeaderboardLocalization" - case .unknown(let rawValue): return rawValue - } + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "gameCenterLeaderboardLocalization": self = .gameCenterLeaderboardLocalization - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterLeaderboardLocalizations/ById/GameCenterLeaderboardLocalizationsById.DELETE.2430b72.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterLeaderboardLocalizations/ById/GameCenterLeaderboardLocalizationsById.DELETE.2430b72.generated.swift index c14e4947..fbe15e2e 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterLeaderboardLocalizations/ById/GameCenterLeaderboardLocalizationsById.DELETE.2430b72.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterLeaderboardLocalizations/ById/GameCenterLeaderboardLocalizationsById.DELETE.2430b72.generated.swift @@ -31,11 +31,12 @@ extension V1.GameCenterLeaderboardLocalizations.ById { return urlRequest } - /// - Returns: **204**, Success (no content) /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -43,12 +44,12 @@ extension V1.GameCenterLeaderboardLocalizations.ById { } switch urlResponse.statusCode { - case 204: - return - case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) @@ -58,6 +59,9 @@ extension V1.GameCenterLeaderboardLocalizations.ById { case 409: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterLeaderboardLocalizations/ById/GameCenterLeaderboardLocalizationsById.GET.2430b72.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterLeaderboardLocalizations/ById/GameCenterLeaderboardLocalizationsById.GET.2430b72.generated.swift index b1481c12..b177c8ec 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterLeaderboardLocalizations/ById/GameCenterLeaderboardLocalizationsById.GET.2430b72.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterLeaderboardLocalizations/ById/GameCenterLeaderboardLocalizationsById.GET.2430b72.generated.swift @@ -46,8 +46,10 @@ extension V1.GameCenterLeaderboardLocalizations.ById { /// - Returns: **200**, Single GameCenterLeaderboardLocalization as `GameCenterLeaderboardLocalizationResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -61,12 +63,18 @@ extension V1.GameCenterLeaderboardLocalizations.ById { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 404: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -89,77 +97,79 @@ extension V1.GameCenterLeaderboardLocalizations.ById.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum GameCenterLeaderboardImages: Hashable, Codable, RawRepresentable { - case assetDeliveryState - case fileName - case fileSize - case gameCenterLeaderboardLocalization - case imageAsset - case uploadOperations - case uploaded - case unknown(String) - - public var rawValue: String { - switch self { - case .assetDeliveryState: return "assetDeliveryState" - case .fileName: return "fileName" - case .fileSize: return "fileSize" - case .gameCenterLeaderboardLocalization: return "gameCenterLeaderboardLocalization" - case .imageAsset: return "imageAsset" - case .uploadOperations: return "uploadOperations" - case .uploaded: return "uploaded" - case .unknown(let rawValue): return rawValue - } + public struct GameCenterLeaderboardImages: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var assetDeliveryState: Self { + .init(rawValue: "assetDeliveryState") + } + + public static var fileName: Self { + .init(rawValue: "fileName") + } + + public static var fileSize: Self { + .init(rawValue: "fileSize") + } + + public static var gameCenterLeaderboardLocalization: Self { + .init(rawValue: "gameCenterLeaderboardLocalization") } + public static var imageAsset: Self { + .init(rawValue: "imageAsset") + } + + public static var uploadOperations: Self { + .init(rawValue: "uploadOperations") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "assetDeliveryState": self = .assetDeliveryState - case "fileName": self = .fileName - case "fileSize": self = .fileSize - case "gameCenterLeaderboardLocalization": self = .gameCenterLeaderboardLocalization - case "imageAsset": self = .imageAsset - case "uploadOperations": self = .uploadOperations - case "uploaded": self = .uploaded - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum GameCenterLeaderboardLocalizations: Hashable, Codable, RawRepresentable { - case formatterOverride - case formatterSuffix - case formatterSuffixSingular - case gameCenterLeaderboard - case gameCenterLeaderboardImage - case locale - case name - case unknown(String) - - public var rawValue: String { - switch self { - case .formatterOverride: return "formatterOverride" - case .formatterSuffix: return "formatterSuffix" - case .formatterSuffixSingular: return "formatterSuffixSingular" - case .gameCenterLeaderboard: return "gameCenterLeaderboard" - case .gameCenterLeaderboardImage: return "gameCenterLeaderboardImage" - case .locale: return "locale" - case .name: return "name" - case .unknown(let rawValue): return rawValue - } + public struct GameCenterLeaderboardLocalizations: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var formatterOverride: Self { + .init(rawValue: "formatterOverride") + } + + public static var formatterSuffix: Self { + .init(rawValue: "formatterSuffix") } + public static var formatterSuffixSingular: Self { + .init(rawValue: "formatterSuffixSingular") + } + + public static var gameCenterLeaderboard: Self { + .init(rawValue: "gameCenterLeaderboard") + } + + public static var gameCenterLeaderboardImage: Self { + .init(rawValue: "gameCenterLeaderboardImage") + } + + public static var locale: Self { + .init(rawValue: "locale") + } + + public static var name: Self { + .init(rawValue: "name") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "formatterOverride": self = .formatterOverride - case "formatterSuffix": self = .formatterSuffix - case "formatterSuffixSingular": self = .formatterSuffixSingular - case "gameCenterLeaderboard": self = .gameCenterLeaderboard - case "gameCenterLeaderboardImage": self = .gameCenterLeaderboardImage - case "locale": self = .locale - case "name": self = .name - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } @@ -182,25 +192,23 @@ extension V1.GameCenterLeaderboardLocalizations.ById.GET { } } - public enum Include: Hashable, Codable, RawRepresentable { - case gameCenterLeaderboard - case gameCenterLeaderboardImage - case unknown(String) + public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var gameCenterLeaderboard: Self { + .init(rawValue: "gameCenterLeaderboard") + } - public var rawValue: String { - switch self { - case .gameCenterLeaderboard: return "gameCenterLeaderboard" - case .gameCenterLeaderboardImage: return "gameCenterLeaderboardImage" - case .unknown(let rawValue): return rawValue - } + public static var gameCenterLeaderboardImage: Self { + .init(rawValue: "gameCenterLeaderboardImage") } + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "gameCenterLeaderboard": self = .gameCenterLeaderboard - case "gameCenterLeaderboardImage": self = .gameCenterLeaderboardImage - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterLeaderboardLocalizations/ById/GameCenterLeaderboardLocalizationsById.PATCH.2430b72.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterLeaderboardLocalizations/ById/GameCenterLeaderboardLocalizationsById.PATCH.2430b72.generated.swift index 83fd4511..e705d938 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterLeaderboardLocalizations/ById/GameCenterLeaderboardLocalizationsById.PATCH.2430b72.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterLeaderboardLocalizations/ById/GameCenterLeaderboardLocalizationsById.PATCH.2430b72.generated.swift @@ -48,9 +48,12 @@ extension V1.GameCenterLeaderboardLocalizations.ById { /// - Returns: **200**, Single GameCenterLeaderboardLocalization as `GameCenterLeaderboardLocalizationResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **422**, Unprocessable request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -64,6 +67,9 @@ extension V1.GameCenterLeaderboardLocalizations.ById { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) @@ -73,6 +79,12 @@ extension V1.GameCenterLeaderboardLocalizations.ById { case 409: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 422: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterLeaderboardLocalizations/ById/Relationships/GameCenterLeaderboardImage/GameCenterLeaderboardLocalizationsByIdRelationshipsGameCenterLeaderboardImage.GET.a6e0f98.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterLeaderboardLocalizations/ById/Relationships/GameCenterLeaderboardImage/GameCenterLeaderboardLocalizationsByIdRelationshipsGameCenterLeaderboardImage.GET.a6e0f98.generated.swift new file mode 100644 index 00000000..0ace81e2 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterLeaderboardLocalizations/ById/Relationships/GameCenterLeaderboardImage/GameCenterLeaderboardLocalizationsByIdRelationshipsGameCenterLeaderboardImage.GET.a6e0f98.generated.swift @@ -0,0 +1,86 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.GameCenterLeaderboardLocalizations.ById.Relationships.GameCenterLeaderboardImage { + public struct GET: Endpoint { + public typealias Response = GameCenterLeaderboardLocalizationGameCenterLeaderboardImageLinkageResponse + + public var path: String { + "/v1/gameCenterLeaderboardLocalizations/\(id)/relationships/gameCenterLeaderboardImage" + } + + /// the id of the requested resource + public var id: String + + public var parameters: Parameters = Parameters() + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + components?.queryItems = [ + + ].filter { $0.value != nil } + if components?.queryItems?.isEmpty ?? false { + components?.queryItems = nil + } + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "GET" + return urlRequest + } + + /// - Returns: **200**, Related linkage as `GameCenterLeaderboardLocalizationGameCenterLeaderboardImageLinkageResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(GameCenterLeaderboardLocalizationGameCenterLeaderboardImageLinkageResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +extension V1.GameCenterLeaderboardLocalizations.ById.Relationships.GameCenterLeaderboardImage.GET { + public struct Parameters: Hashable { + + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterLeaderboardLocalizations/GameCenterLeaderboardLocalizations.POST.a888ab8.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterLeaderboardLocalizations/GameCenterLeaderboardLocalizations.POST.a888ab8.generated.swift index b50e232e..f629c5ff 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterLeaderboardLocalizations/GameCenterLeaderboardLocalizations.POST.a888ab8.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterLeaderboardLocalizations/GameCenterLeaderboardLocalizations.POST.a888ab8.generated.swift @@ -41,8 +41,11 @@ extension V1.GameCenterLeaderboardLocalizations { /// - Returns: **201**, Single GameCenterLeaderboardLocalization as `GameCenterLeaderboardLocalizationResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **422**, Unprocessable request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -56,12 +59,21 @@ extension V1.GameCenterLeaderboardLocalizations { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 409: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 422: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterLeaderboardReleases/ById/GameCenterLeaderboardReleasesById.DELETE.a2786c0.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterLeaderboardReleases/ById/GameCenterLeaderboardReleasesById.DELETE.a2786c0.generated.swift index b9f74011..c8b062b9 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterLeaderboardReleases/ById/GameCenterLeaderboardReleasesById.DELETE.a2786c0.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterLeaderboardReleases/ById/GameCenterLeaderboardReleasesById.DELETE.a2786c0.generated.swift @@ -31,11 +31,12 @@ extension V1.GameCenterLeaderboardReleases.ById { return urlRequest } - /// - Returns: **204**, Success (no content) /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -43,12 +44,12 @@ extension V1.GameCenterLeaderboardReleases.ById { } switch urlResponse.statusCode { - case 204: - return - case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) @@ -58,6 +59,9 @@ extension V1.GameCenterLeaderboardReleases.ById { case 409: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterLeaderboardReleases/ById/GameCenterLeaderboardReleasesById.GET.a2786c0.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterLeaderboardReleases/ById/GameCenterLeaderboardReleasesById.GET.a2786c0.generated.swift index fedccd25..bddc890f 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterLeaderboardReleases/ById/GameCenterLeaderboardReleasesById.GET.a2786c0.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterLeaderboardReleases/ById/GameCenterLeaderboardReleasesById.GET.a2786c0.generated.swift @@ -44,8 +44,10 @@ extension V1.GameCenterLeaderboardReleases.ById { /// - Returns: **200**, Single GameCenterLeaderboardRelease as `GameCenterLeaderboardReleaseResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -59,12 +61,18 @@ extension V1.GameCenterLeaderboardReleases.ById { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 404: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -87,28 +95,27 @@ extension V1.GameCenterLeaderboardReleases.ById.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum GameCenterLeaderboardReleases: Hashable, Codable, RawRepresentable { - case gameCenterDetail - case gameCenterLeaderboard - case live - case unknown(String) - - public var rawValue: String { - switch self { - case .gameCenterDetail: return "gameCenterDetail" - case .gameCenterLeaderboard: return "gameCenterLeaderboard" - case .live: return "live" - case .unknown(let rawValue): return rawValue - } + public struct GameCenterLeaderboardReleases: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var gameCenterDetail: Self { + .init(rawValue: "gameCenterDetail") } + public static var gameCenterLeaderboard: Self { + .init(rawValue: "gameCenterLeaderboard") + } + + public static var live: Self { + .init(rawValue: "live") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "gameCenterDetail": self = .gameCenterDetail - case "gameCenterLeaderboard": self = .gameCenterLeaderboard - case "live": self = .live - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } @@ -126,25 +133,23 @@ extension V1.GameCenterLeaderboardReleases.ById.GET { } } - public enum Include: Hashable, Codable, RawRepresentable { - case gameCenterDetail - case gameCenterLeaderboard - case unknown(String) + public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var gameCenterDetail: Self { + .init(rawValue: "gameCenterDetail") + } - public var rawValue: String { - switch self { - case .gameCenterDetail: return "gameCenterDetail" - case .gameCenterLeaderboard: return "gameCenterLeaderboard" - case .unknown(let rawValue): return rawValue - } + public static var gameCenterLeaderboard: Self { + .init(rawValue: "gameCenterLeaderboard") } + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "gameCenterDetail": self = .gameCenterDetail - case "gameCenterLeaderboard": self = .gameCenterLeaderboard - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterLeaderboardReleases/GameCenterLeaderboardReleases.POST.f8bdb62.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterLeaderboardReleases/GameCenterLeaderboardReleases.POST.f8bdb62.generated.swift index e5db3a87..1e03c4bd 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterLeaderboardReleases/GameCenterLeaderboardReleases.POST.f8bdb62.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterLeaderboardReleases/GameCenterLeaderboardReleases.POST.f8bdb62.generated.swift @@ -41,8 +41,11 @@ extension V1.GameCenterLeaderboardReleases { /// - Returns: **201**, Single GameCenterLeaderboardRelease as `GameCenterLeaderboardReleaseResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **422**, Unprocessable request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -56,12 +59,21 @@ extension V1.GameCenterLeaderboardReleases { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 409: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 422: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterLeaderboardSetImages/ById/GameCenterLeaderboardSetImagesById.DELETE.7256c04.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterLeaderboardSetImages/ById/GameCenterLeaderboardSetImagesById.DELETE.7256c04.generated.swift index 8fbbd082..776c6143 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterLeaderboardSetImages/ById/GameCenterLeaderboardSetImagesById.DELETE.7256c04.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterLeaderboardSetImages/ById/GameCenterLeaderboardSetImagesById.DELETE.7256c04.generated.swift @@ -31,11 +31,12 @@ extension V1.GameCenterLeaderboardSetImages.ById { return urlRequest } - /// - Returns: **204**, Success (no content) /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -43,12 +44,12 @@ extension V1.GameCenterLeaderboardSetImages.ById { } switch urlResponse.statusCode { - case 204: - return - case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) @@ -58,6 +59,9 @@ extension V1.GameCenterLeaderboardSetImages.ById { case 409: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterLeaderboardSetImages/ById/GameCenterLeaderboardSetImagesById.GET.7256c04.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterLeaderboardSetImages/ById/GameCenterLeaderboardSetImagesById.GET.7256c04.generated.swift index c948939b..58b39f32 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterLeaderboardSetImages/ById/GameCenterLeaderboardSetImagesById.GET.7256c04.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterLeaderboardSetImages/ById/GameCenterLeaderboardSetImagesById.GET.7256c04.generated.swift @@ -44,8 +44,10 @@ extension V1.GameCenterLeaderboardSetImages.ById { /// - Returns: **200**, Single GameCenterLeaderboardSetImage as `GameCenterLeaderboardSetImageResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -59,12 +61,18 @@ extension V1.GameCenterLeaderboardSetImages.ById { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 404: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -87,40 +95,39 @@ extension V1.GameCenterLeaderboardSetImages.ById.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum GameCenterLeaderboardSetImages: Hashable, Codable, RawRepresentable { - case assetDeliveryState - case fileName - case fileSize - case gameCenterLeaderboardSetLocalization - case imageAsset - case uploadOperations - case uploaded - case unknown(String) - - public var rawValue: String { - switch self { - case .assetDeliveryState: return "assetDeliveryState" - case .fileName: return "fileName" - case .fileSize: return "fileSize" - case .gameCenterLeaderboardSetLocalization: return "gameCenterLeaderboardSetLocalization" - case .imageAsset: return "imageAsset" - case .uploadOperations: return "uploadOperations" - case .uploaded: return "uploaded" - case .unknown(let rawValue): return rawValue - } + public struct GameCenterLeaderboardSetImages: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var assetDeliveryState: Self { + .init(rawValue: "assetDeliveryState") + } + + public static var fileName: Self { + .init(rawValue: "fileName") } + public static var fileSize: Self { + .init(rawValue: "fileSize") + } + + public static var gameCenterLeaderboardSetLocalization: Self { + .init(rawValue: "gameCenterLeaderboardSetLocalization") + } + + public static var imageAsset: Self { + .init(rawValue: "imageAsset") + } + + public static var uploadOperations: Self { + .init(rawValue: "uploadOperations") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "assetDeliveryState": self = .assetDeliveryState - case "fileName": self = .fileName - case "fileSize": self = .fileSize - case "gameCenterLeaderboardSetLocalization": self = .gameCenterLeaderboardSetLocalization - case "imageAsset": self = .imageAsset - case "uploadOperations": self = .uploadOperations - case "uploaded": self = .uploaded - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } @@ -138,22 +145,19 @@ extension V1.GameCenterLeaderboardSetImages.ById.GET { } } - public enum Include: Hashable, Codable, RawRepresentable { - case gameCenterLeaderboardSetLocalization - case unknown(String) + public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var gameCenterLeaderboardSetLocalization: Self { + .init(rawValue: "gameCenterLeaderboardSetLocalization") + } - public var rawValue: String { - switch self { - case .gameCenterLeaderboardSetLocalization: return "gameCenterLeaderboardSetLocalization" - case .unknown(let rawValue): return rawValue - } + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "gameCenterLeaderboardSetLocalization": self = .gameCenterLeaderboardSetLocalization - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterLeaderboardSetImages/ById/GameCenterLeaderboardSetImagesById.PATCH.7256c04.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterLeaderboardSetImages/ById/GameCenterLeaderboardSetImagesById.PATCH.7256c04.generated.swift index 5d779b02..42da9a5f 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterLeaderboardSetImages/ById/GameCenterLeaderboardSetImagesById.PATCH.7256c04.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterLeaderboardSetImages/ById/GameCenterLeaderboardSetImagesById.PATCH.7256c04.generated.swift @@ -48,9 +48,12 @@ extension V1.GameCenterLeaderboardSetImages.ById { /// - Returns: **200**, Single GameCenterLeaderboardSetImage as `GameCenterLeaderboardSetImageResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **422**, Unprocessable request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -64,6 +67,9 @@ extension V1.GameCenterLeaderboardSetImages.ById { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) @@ -73,6 +79,12 @@ extension V1.GameCenterLeaderboardSetImages.ById { case 409: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 422: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterLeaderboardSetImages/GameCenterLeaderboardSetImages.POST.c6bb25f.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterLeaderboardSetImages/GameCenterLeaderboardSetImages.POST.c6bb25f.generated.swift index 3d937b46..1bf888a1 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterLeaderboardSetImages/GameCenterLeaderboardSetImages.POST.c6bb25f.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterLeaderboardSetImages/GameCenterLeaderboardSetImages.POST.c6bb25f.generated.swift @@ -41,8 +41,11 @@ extension V1.GameCenterLeaderboardSetImages { /// - Returns: **201**, Single GameCenterLeaderboardSetImage as `GameCenterLeaderboardSetImageResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **422**, Unprocessable request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -56,12 +59,21 @@ extension V1.GameCenterLeaderboardSetImages { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 409: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 422: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterLeaderboardSetLocalizations/ById/GameCenterLeaderboardSetImage/GameCenterLeaderboardSetLocalizationsByIdGameCenterLeaderboardSetImage.GET.b014917.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterLeaderboardSetLocalizations/ById/GameCenterLeaderboardSetImage/GameCenterLeaderboardSetLocalizationsByIdGameCenterLeaderboardSetImage.GET.b014917.generated.swift index 71395c2e..e4446a9e 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterLeaderboardSetLocalizations/ById/GameCenterLeaderboardSetImage/GameCenterLeaderboardSetLocalizationsByIdGameCenterLeaderboardSetImage.GET.b014917.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterLeaderboardSetLocalizations/ById/GameCenterLeaderboardSetImage/GameCenterLeaderboardSetLocalizationsByIdGameCenterLeaderboardSetImage.GET.b014917.generated.swift @@ -46,8 +46,10 @@ extension V1.GameCenterLeaderboardSetLocalizations.ById.GameCenterLeaderboardSet /// - Returns: **200**, Single GameCenterLeaderboardSetImage as `GameCenterLeaderboardSetImageResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -61,12 +63,18 @@ extension V1.GameCenterLeaderboardSetLocalizations.ById.GameCenterLeaderboardSet case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 404: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -89,68 +97,67 @@ extension V1.GameCenterLeaderboardSetLocalizations.ById.GameCenterLeaderboardSet private var values: [AnyHashable: AnyHashable] = [:] - public enum GameCenterLeaderboardSetImages: Hashable, Codable, RawRepresentable { - case assetDeliveryState - case fileName - case fileSize - case gameCenterLeaderboardSetLocalization - case imageAsset - case uploadOperations - case uploaded - case unknown(String) - - public var rawValue: String { - switch self { - case .assetDeliveryState: return "assetDeliveryState" - case .fileName: return "fileName" - case .fileSize: return "fileSize" - case .gameCenterLeaderboardSetLocalization: return "gameCenterLeaderboardSetLocalization" - case .imageAsset: return "imageAsset" - case .uploadOperations: return "uploadOperations" - case .uploaded: return "uploaded" - case .unknown(let rawValue): return rawValue - } + public struct GameCenterLeaderboardSetImages: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var assetDeliveryState: Self { + .init(rawValue: "assetDeliveryState") + } + + public static var fileName: Self { + .init(rawValue: "fileName") + } + + public static var fileSize: Self { + .init(rawValue: "fileSize") } + public static var gameCenterLeaderboardSetLocalization: Self { + .init(rawValue: "gameCenterLeaderboardSetLocalization") + } + + public static var imageAsset: Self { + .init(rawValue: "imageAsset") + } + + public static var uploadOperations: Self { + .init(rawValue: "uploadOperations") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "assetDeliveryState": self = .assetDeliveryState - case "fileName": self = .fileName - case "fileSize": self = .fileSize - case "gameCenterLeaderboardSetLocalization": self = .gameCenterLeaderboardSetLocalization - case "imageAsset": self = .imageAsset - case "uploadOperations": self = .uploadOperations - case "uploaded": self = .uploaded - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum GameCenterLeaderboardSetLocalizations: Hashable, Codable, RawRepresentable { - case gameCenterLeaderboardSet - case gameCenterLeaderboardSetImage - case locale - case name - case unknown(String) + public struct GameCenterLeaderboardSetLocalizations: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var gameCenterLeaderboardSet: Self { + .init(rawValue: "gameCenterLeaderboardSet") + } + + public static var gameCenterLeaderboardSetImage: Self { + .init(rawValue: "gameCenterLeaderboardSetImage") + } + + public static var locale: Self { + .init(rawValue: "locale") + } + + public static var name: Self { + .init(rawValue: "name") + } - public var rawValue: String { - switch self { - case .gameCenterLeaderboardSet: return "gameCenterLeaderboardSet" - case .gameCenterLeaderboardSetImage: return "gameCenterLeaderboardSetImage" - case .locale: return "locale" - case .name: return "name" - case .unknown(let rawValue): return rawValue - } + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "gameCenterLeaderboardSet": self = .gameCenterLeaderboardSet - case "gameCenterLeaderboardSetImage": self = .gameCenterLeaderboardSetImage - case "locale": self = .locale - case "name": self = .name - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } @@ -173,22 +180,19 @@ extension V1.GameCenterLeaderboardSetLocalizations.ById.GameCenterLeaderboardSet } } - public enum Include: Hashable, Codable, RawRepresentable { - case gameCenterLeaderboardSetLocalization - case unknown(String) + public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var gameCenterLeaderboardSetLocalization: Self { + .init(rawValue: "gameCenterLeaderboardSetLocalization") + } - public var rawValue: String { - switch self { - case .gameCenterLeaderboardSetLocalization: return "gameCenterLeaderboardSetLocalization" - case .unknown(let rawValue): return rawValue - } + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "gameCenterLeaderboardSetLocalization": self = .gameCenterLeaderboardSetLocalization - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterLeaderboardSetLocalizations/ById/GameCenterLeaderboardSetLocalizationsById.DELETE.34b0638.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterLeaderboardSetLocalizations/ById/GameCenterLeaderboardSetLocalizationsById.DELETE.34b0638.generated.swift index b2586545..1a3a57ab 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterLeaderboardSetLocalizations/ById/GameCenterLeaderboardSetLocalizationsById.DELETE.34b0638.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterLeaderboardSetLocalizations/ById/GameCenterLeaderboardSetLocalizationsById.DELETE.34b0638.generated.swift @@ -31,11 +31,12 @@ extension V1.GameCenterLeaderboardSetLocalizations.ById { return urlRequest } - /// - Returns: **204**, Success (no content) /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -43,12 +44,12 @@ extension V1.GameCenterLeaderboardSetLocalizations.ById { } switch urlResponse.statusCode { - case 204: - return - case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) @@ -58,6 +59,9 @@ extension V1.GameCenterLeaderboardSetLocalizations.ById { case 409: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterLeaderboardSetLocalizations/ById/GameCenterLeaderboardSetLocalizationsById.GET.34b0638.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterLeaderboardSetLocalizations/ById/GameCenterLeaderboardSetLocalizationsById.GET.34b0638.generated.swift index 4bea4d18..ace23901 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterLeaderboardSetLocalizations/ById/GameCenterLeaderboardSetLocalizationsById.GET.34b0638.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterLeaderboardSetLocalizations/ById/GameCenterLeaderboardSetLocalizationsById.GET.34b0638.generated.swift @@ -46,8 +46,10 @@ extension V1.GameCenterLeaderboardSetLocalizations.ById { /// - Returns: **200**, Single GameCenterLeaderboardSetLocalization as `GameCenterLeaderboardSetLocalizationResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -61,12 +63,18 @@ extension V1.GameCenterLeaderboardSetLocalizations.ById { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 404: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -89,68 +97,67 @@ extension V1.GameCenterLeaderboardSetLocalizations.ById.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum GameCenterLeaderboardSetImages: Hashable, Codable, RawRepresentable { - case assetDeliveryState - case fileName - case fileSize - case gameCenterLeaderboardSetLocalization - case imageAsset - case uploadOperations - case uploaded - case unknown(String) - - public var rawValue: String { - switch self { - case .assetDeliveryState: return "assetDeliveryState" - case .fileName: return "fileName" - case .fileSize: return "fileSize" - case .gameCenterLeaderboardSetLocalization: return "gameCenterLeaderboardSetLocalization" - case .imageAsset: return "imageAsset" - case .uploadOperations: return "uploadOperations" - case .uploaded: return "uploaded" - case .unknown(let rawValue): return rawValue - } + public struct GameCenterLeaderboardSetImages: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var assetDeliveryState: Self { + .init(rawValue: "assetDeliveryState") + } + + public static var fileName: Self { + .init(rawValue: "fileName") + } + + public static var fileSize: Self { + .init(rawValue: "fileSize") + } + + public static var gameCenterLeaderboardSetLocalization: Self { + .init(rawValue: "gameCenterLeaderboardSetLocalization") + } + + public static var imageAsset: Self { + .init(rawValue: "imageAsset") + } + + public static var uploadOperations: Self { + .init(rawValue: "uploadOperations") + } + + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "assetDeliveryState": self = .assetDeliveryState - case "fileName": self = .fileName - case "fileSize": self = .fileSize - case "gameCenterLeaderboardSetLocalization": self = .gameCenterLeaderboardSetLocalization - case "imageAsset": self = .imageAsset - case "uploadOperations": self = .uploadOperations - case "uploaded": self = .uploaded - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum GameCenterLeaderboardSetLocalizations: Hashable, Codable, RawRepresentable { - case gameCenterLeaderboardSet - case gameCenterLeaderboardSetImage - case locale - case name - case unknown(String) + public struct GameCenterLeaderboardSetLocalizations: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var gameCenterLeaderboardSet: Self { + .init(rawValue: "gameCenterLeaderboardSet") + } + + public static var gameCenterLeaderboardSetImage: Self { + .init(rawValue: "gameCenterLeaderboardSetImage") + } + + public static var locale: Self { + .init(rawValue: "locale") + } + + public static var name: Self { + .init(rawValue: "name") + } - public var rawValue: String { - switch self { - case .gameCenterLeaderboardSet: return "gameCenterLeaderboardSet" - case .gameCenterLeaderboardSetImage: return "gameCenterLeaderboardSetImage" - case .locale: return "locale" - case .name: return "name" - case .unknown(let rawValue): return rawValue - } + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "gameCenterLeaderboardSet": self = .gameCenterLeaderboardSet - case "gameCenterLeaderboardSetImage": self = .gameCenterLeaderboardSetImage - case "locale": self = .locale - case "name": self = .name - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } @@ -173,25 +180,23 @@ extension V1.GameCenterLeaderboardSetLocalizations.ById.GET { } } - public enum Include: Hashable, Codable, RawRepresentable { - case gameCenterLeaderboardSet - case gameCenterLeaderboardSetImage - case unknown(String) + public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var gameCenterLeaderboardSet: Self { + .init(rawValue: "gameCenterLeaderboardSet") + } - public var rawValue: String { - switch self { - case .gameCenterLeaderboardSet: return "gameCenterLeaderboardSet" - case .gameCenterLeaderboardSetImage: return "gameCenterLeaderboardSetImage" - case .unknown(let rawValue): return rawValue - } + public static var gameCenterLeaderboardSetImage: Self { + .init(rawValue: "gameCenterLeaderboardSetImage") } + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "gameCenterLeaderboardSet": self = .gameCenterLeaderboardSet - case "gameCenterLeaderboardSetImage": self = .gameCenterLeaderboardSetImage - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterLeaderboardSetLocalizations/ById/GameCenterLeaderboardSetLocalizationsById.PATCH.34b0638.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterLeaderboardSetLocalizations/ById/GameCenterLeaderboardSetLocalizationsById.PATCH.34b0638.generated.swift index cf1403f1..ef5490ab 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterLeaderboardSetLocalizations/ById/GameCenterLeaderboardSetLocalizationsById.PATCH.34b0638.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterLeaderboardSetLocalizations/ById/GameCenterLeaderboardSetLocalizationsById.PATCH.34b0638.generated.swift @@ -48,9 +48,12 @@ extension V1.GameCenterLeaderboardSetLocalizations.ById { /// - Returns: **200**, Single GameCenterLeaderboardSetLocalization as `GameCenterLeaderboardSetLocalizationResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **422**, Unprocessable request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -64,6 +67,9 @@ extension V1.GameCenterLeaderboardSetLocalizations.ById { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) @@ -73,6 +79,12 @@ extension V1.GameCenterLeaderboardSetLocalizations.ById { case 409: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 422: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterLeaderboardSetLocalizations/ById/Relationships/GameCenterLeaderboardSetImage/GameCenterLeaderboardSetLocalizationsByIdRelationshipsGameCenterLeaderboardSetImage.GET.92d4c95.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterLeaderboardSetLocalizations/ById/Relationships/GameCenterLeaderboardSetImage/GameCenterLeaderboardSetLocalizationsByIdRelationshipsGameCenterLeaderboardSetImage.GET.92d4c95.generated.swift new file mode 100644 index 00000000..0a217415 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterLeaderboardSetLocalizations/ById/Relationships/GameCenterLeaderboardSetImage/GameCenterLeaderboardSetLocalizationsByIdRelationshipsGameCenterLeaderboardSetImage.GET.92d4c95.generated.swift @@ -0,0 +1,86 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.GameCenterLeaderboardSetLocalizations.ById.Relationships.GameCenterLeaderboardSetImage { + public struct GET: Endpoint { + public typealias Response = GameCenterLeaderboardSetLocalizationGameCenterLeaderboardSetImageLinkageResponse + + public var path: String { + "/v1/gameCenterLeaderboardSetLocalizations/\(id)/relationships/gameCenterLeaderboardSetImage" + } + + /// the id of the requested resource + public var id: String + + public var parameters: Parameters = Parameters() + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + components?.queryItems = [ + + ].filter { $0.value != nil } + if components?.queryItems?.isEmpty ?? false { + components?.queryItems = nil + } + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "GET" + return urlRequest + } + + /// - Returns: **200**, Related linkage as `GameCenterLeaderboardSetLocalizationGameCenterLeaderboardSetImageLinkageResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(GameCenterLeaderboardSetLocalizationGameCenterLeaderboardSetImageLinkageResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +extension V1.GameCenterLeaderboardSetLocalizations.ById.Relationships.GameCenterLeaderboardSetImage.GET { + public struct Parameters: Hashable { + + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterLeaderboardSetLocalizations/GameCenterLeaderboardSetLocalizations.POST.305e38b.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterLeaderboardSetLocalizations/GameCenterLeaderboardSetLocalizations.POST.305e38b.generated.swift index 262ef70e..8d98c127 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterLeaderboardSetLocalizations/GameCenterLeaderboardSetLocalizations.POST.305e38b.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterLeaderboardSetLocalizations/GameCenterLeaderboardSetLocalizations.POST.305e38b.generated.swift @@ -41,8 +41,11 @@ extension V1.GameCenterLeaderboardSetLocalizations { /// - Returns: **201**, Single GameCenterLeaderboardSetLocalization as `GameCenterLeaderboardSetLocalizationResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **422**, Unprocessable request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -56,12 +59,21 @@ extension V1.GameCenterLeaderboardSetLocalizations { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 409: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 422: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterLeaderboardSetMemberLocalizations/ById/GameCenterLeaderboard/GameCenterLeaderboardSetMemberLocalizationsByIdGameCenterLeaderboard.GET.58b4616.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterLeaderboardSetMemberLocalizations/ById/GameCenterLeaderboard/GameCenterLeaderboardSetMemberLocalizationsByIdGameCenterLeaderboard.GET.58b4616.generated.swift index 346ad5bc..353a7298 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterLeaderboardSetMemberLocalizations/ById/GameCenterLeaderboard/GameCenterLeaderboardSetMemberLocalizationsByIdGameCenterLeaderboard.GET.58b4616.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterLeaderboardSetMemberLocalizations/ById/GameCenterLeaderboard/GameCenterLeaderboardSetMemberLocalizationsByIdGameCenterLeaderboard.GET.58b4616.generated.swift @@ -28,6 +28,10 @@ extension V1.GameCenterLeaderboardSetMemberLocalizations.ById.GameCenterLeaderbo components?.path = path components?.queryItems = [ + URLQueryItem(name: "fields[gameCenterActivities]", + value: parameters.fields[.gameCenterActivities]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "fields[gameCenterChallenges]", + value: parameters.fields[.gameCenterChallenges]?.map { "\($0)" }.joined(separator: ",")), URLQueryItem(name: "fields[gameCenterDetails]", value: parameters.fields[.gameCenterDetails]?.map { "\($0)" }.joined(separator: ",")), URLQueryItem(name: "fields[gameCenterGroups]", @@ -60,8 +64,10 @@ extension V1.GameCenterLeaderboardSetMemberLocalizations.ById.GameCenterLeaderbo /// - Returns: **200**, Single GameCenterLeaderboard as `GameCenterLeaderboardResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -75,12 +81,18 @@ extension V1.GameCenterLeaderboardSetMemberLocalizations.ById.GameCenterLeaderbo case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 404: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -105,262 +117,461 @@ extension V1.GameCenterLeaderboardSetMemberLocalizations.ById.GameCenterLeaderbo private var values: [AnyHashable: AnyHashable] = [:] - public enum GameCenterDetails: Hashable, Codable, RawRepresentable { - case achievementReleases - case app - case arcadeEnabled - case challengeEnabled - case defaultGroupLeaderboard - case defaultLeaderboard - case gameCenterAchievements - case gameCenterAppVersions - case gameCenterGroup - case gameCenterLeaderboardSets - case gameCenterLeaderboards - case leaderboardReleases - case leaderboardSetReleases - case unknown(String) - - public var rawValue: String { - switch self { - case .achievementReleases: return "achievementReleases" - case .app: return "app" - case .arcadeEnabled: return "arcadeEnabled" - case .challengeEnabled: return "challengeEnabled" - case .defaultGroupLeaderboard: return "defaultGroupLeaderboard" - case .defaultLeaderboard: return "defaultLeaderboard" - case .gameCenterAchievements: return "gameCenterAchievements" - case .gameCenterAppVersions: return "gameCenterAppVersions" - case .gameCenterGroup: return "gameCenterGroup" - case .gameCenterLeaderboardSets: return "gameCenterLeaderboardSets" - case .gameCenterLeaderboards: return "gameCenterLeaderboards" - case .leaderboardReleases: return "leaderboardReleases" - case .leaderboardSetReleases: return "leaderboardSetReleases" - case .unknown(let rawValue): return rawValue - } + public struct GameCenterActivities: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var achievements: Self { + .init(rawValue: "achievements") + } + + public static var archived: Self { + .init(rawValue: "archived") + } + + public static var gameCenterDetail: Self { + .init(rawValue: "gameCenterDetail") + } + + public static var gameCenterGroup: Self { + .init(rawValue: "gameCenterGroup") + } + + public static var leaderboards: Self { + .init(rawValue: "leaderboards") + } + + public static var maximumPlayersCount: Self { + .init(rawValue: "maximumPlayersCount") + } + + public static var minimumPlayersCount: Self { + .init(rawValue: "minimumPlayersCount") + } + + public static var playStyle: Self { + .init(rawValue: "playStyle") + } + + public static var properties: Self { + .init(rawValue: "properties") + } + + public static var referenceName: Self { + .init(rawValue: "referenceName") + } + + public static var supportsPartyCode: Self { + .init(rawValue: "supportsPartyCode") + } + + public static var vendorIdentifier: Self { + .init(rawValue: "vendorIdentifier") + } + + public static var versions: Self { + .init(rawValue: "versions") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct GameCenterChallenges: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var allowedDurations: Self { + .init(rawValue: "allowedDurations") + } + + public static var archived: Self { + .init(rawValue: "archived") + } + + public static var challengeType: Self { + .init(rawValue: "challengeType") + } + + public static var gameCenterDetail: Self { + .init(rawValue: "gameCenterDetail") + } + + public static var gameCenterGroup: Self { + .init(rawValue: "gameCenterGroup") + } + + public static var leaderboard: Self { + .init(rawValue: "leaderboard") + } + + public static var referenceName: Self { + .init(rawValue: "referenceName") + } + + public static var repeatable: Self { + .init(rawValue: "repeatable") + } + + public static var vendorIdentifier: Self { + .init(rawValue: "vendorIdentifier") + } + + public static var versions: Self { + .init(rawValue: "versions") } + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "achievementReleases": self = .achievementReleases - case "app": self = .app - case "arcadeEnabled": self = .arcadeEnabled - case "challengeEnabled": self = .challengeEnabled - case "defaultGroupLeaderboard": self = .defaultGroupLeaderboard - case "defaultLeaderboard": self = .defaultLeaderboard - case "gameCenterAchievements": self = .gameCenterAchievements - case "gameCenterAppVersions": self = .gameCenterAppVersions - case "gameCenterGroup": self = .gameCenterGroup - case "gameCenterLeaderboardSets": self = .gameCenterLeaderboardSets - case "gameCenterLeaderboards": self = .gameCenterLeaderboards - case "leaderboardReleases": self = .leaderboardReleases - case "leaderboardSetReleases": self = .leaderboardSetReleases - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum GameCenterGroups: Hashable, Codable, RawRepresentable { - case gameCenterAchievements - case gameCenterDetails - case gameCenterLeaderboardSets - case gameCenterLeaderboards - case referenceName - case unknown(String) - - public var rawValue: String { - switch self { - case .gameCenterAchievements: return "gameCenterAchievements" - case .gameCenterDetails: return "gameCenterDetails" - case .gameCenterLeaderboardSets: return "gameCenterLeaderboardSets" - case .gameCenterLeaderboards: return "gameCenterLeaderboards" - case .referenceName: return "referenceName" - case .unknown(let rawValue): return rawValue - } + public struct GameCenterDetails: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var achievementReleases: Self { + .init(rawValue: "achievementReleases") + } + + public static var activityReleases: Self { + .init(rawValue: "activityReleases") + } + + public static var app: Self { + .init(rawValue: "app") + } + + public static var arcadeEnabled: Self { + .init(rawValue: "arcadeEnabled") + } + + public static var challengeEnabled: Self { + .init(rawValue: "challengeEnabled") + } + + public static var challengeReleases: Self { + .init(rawValue: "challengeReleases") + } + + public static var challengesMinimumPlatformVersions: Self { + .init(rawValue: "challengesMinimumPlatformVersions") + } + + public static var defaultGroupLeaderboard: Self { + .init(rawValue: "defaultGroupLeaderboard") + } + + public static var defaultLeaderboard: Self { + .init(rawValue: "defaultLeaderboard") + } + + public static var gameCenterAchievements: Self { + .init(rawValue: "gameCenterAchievements") + } + + public static var gameCenterActivities: Self { + .init(rawValue: "gameCenterActivities") + } + + public static var gameCenterAppVersions: Self { + .init(rawValue: "gameCenterAppVersions") + } + + public static var gameCenterChallenges: Self { + .init(rawValue: "gameCenterChallenges") + } + + public static var gameCenterGroup: Self { + .init(rawValue: "gameCenterGroup") + } + + public static var gameCenterLeaderboardSets: Self { + .init(rawValue: "gameCenterLeaderboardSets") + } + + public static var gameCenterLeaderboards: Self { + .init(rawValue: "gameCenterLeaderboards") + } + + public static var leaderboardReleases: Self { + .init(rawValue: "leaderboardReleases") + } + + public static var leaderboardSetReleases: Self { + .init(rawValue: "leaderboardSetReleases") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct GameCenterGroups: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var gameCenterAchievements: Self { + .init(rawValue: "gameCenterAchievements") + } + + public static var gameCenterActivities: Self { + .init(rawValue: "gameCenterActivities") + } + + public static var gameCenterChallenges: Self { + .init(rawValue: "gameCenterChallenges") + } + + public static var gameCenterDetails: Self { + .init(rawValue: "gameCenterDetails") + } + + public static var gameCenterLeaderboardSets: Self { + .init(rawValue: "gameCenterLeaderboardSets") + } + + public static var gameCenterLeaderboards: Self { + .init(rawValue: "gameCenterLeaderboards") + } + + public static var referenceName: Self { + .init(rawValue: "referenceName") } + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "gameCenterAchievements": self = .gameCenterAchievements - case "gameCenterDetails": self = .gameCenterDetails - case "gameCenterLeaderboardSets": self = .gameCenterLeaderboardSets - case "gameCenterLeaderboards": self = .gameCenterLeaderboards - case "referenceName": self = .referenceName - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum GameCenterLeaderboardLocalizations: Hashable, Codable, RawRepresentable { - case formatterOverride - case formatterSuffix - case formatterSuffixSingular - case gameCenterLeaderboard - case gameCenterLeaderboardImage - case locale - case name - case unknown(String) - - public var rawValue: String { - switch self { - case .formatterOverride: return "formatterOverride" - case .formatterSuffix: return "formatterSuffix" - case .formatterSuffixSingular: return "formatterSuffixSingular" - case .gameCenterLeaderboard: return "gameCenterLeaderboard" - case .gameCenterLeaderboardImage: return "gameCenterLeaderboardImage" - case .locale: return "locale" - case .name: return "name" - case .unknown(let rawValue): return rawValue - } + public struct GameCenterLeaderboardLocalizations: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var formatterOverride: Self { + .init(rawValue: "formatterOverride") + } + + public static var formatterSuffix: Self { + .init(rawValue: "formatterSuffix") + } + + public static var formatterSuffixSingular: Self { + .init(rawValue: "formatterSuffixSingular") + } + + public static var gameCenterLeaderboard: Self { + .init(rawValue: "gameCenterLeaderboard") + } + + public static var gameCenterLeaderboardImage: Self { + .init(rawValue: "gameCenterLeaderboardImage") } + public static var locale: Self { + .init(rawValue: "locale") + } + + public static var name: Self { + .init(rawValue: "name") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "formatterOverride": self = .formatterOverride - case "formatterSuffix": self = .formatterSuffix - case "formatterSuffixSingular": self = .formatterSuffixSingular - case "gameCenterLeaderboard": self = .gameCenterLeaderboard - case "gameCenterLeaderboardImage": self = .gameCenterLeaderboardImage - case "locale": self = .locale - case "name": self = .name - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum GameCenterLeaderboardReleases: Hashable, Codable, RawRepresentable { - case gameCenterDetail - case gameCenterLeaderboard - case live - case unknown(String) + public struct GameCenterLeaderboardReleases: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var gameCenterDetail: Self { + .init(rawValue: "gameCenterDetail") + } + + public static var gameCenterLeaderboard: Self { + .init(rawValue: "gameCenterLeaderboard") + } - public var rawValue: String { - switch self { - case .gameCenterDetail: return "gameCenterDetail" - case .gameCenterLeaderboard: return "gameCenterLeaderboard" - case .live: return "live" - case .unknown(let rawValue): return rawValue - } + public static var live: Self { + .init(rawValue: "live") } + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "gameCenterDetail": self = .gameCenterDetail - case "gameCenterLeaderboard": self = .gameCenterLeaderboard - case "live": self = .live - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum GameCenterLeaderboardSets: Hashable, Codable, RawRepresentable { - case gameCenterDetail - case gameCenterGroup - case gameCenterLeaderboards - case groupLeaderboardSet - case localizations - case referenceName - case releases - case vendorIdentifier - case unknown(String) - - public var rawValue: String { - switch self { - case .gameCenterDetail: return "gameCenterDetail" - case .gameCenterGroup: return "gameCenterGroup" - case .gameCenterLeaderboards: return "gameCenterLeaderboards" - case .groupLeaderboardSet: return "groupLeaderboardSet" - case .localizations: return "localizations" - case .referenceName: return "referenceName" - case .releases: return "releases" - case .vendorIdentifier: return "vendorIdentifier" - case .unknown(let rawValue): return rawValue - } + public struct GameCenterLeaderboardSets: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var gameCenterDetail: Self { + .init(rawValue: "gameCenterDetail") } + public static var gameCenterGroup: Self { + .init(rawValue: "gameCenterGroup") + } + + public static var gameCenterLeaderboards: Self { + .init(rawValue: "gameCenterLeaderboards") + } + + public static var groupLeaderboardSet: Self { + .init(rawValue: "groupLeaderboardSet") + } + + public static var localizations: Self { + .init(rawValue: "localizations") + } + + public static var referenceName: Self { + .init(rawValue: "referenceName") + } + + public static var releases: Self { + .init(rawValue: "releases") + } + + public static var vendorIdentifier: Self { + .init(rawValue: "vendorIdentifier") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "gameCenterDetail": self = .gameCenterDetail - case "gameCenterGroup": self = .gameCenterGroup - case "gameCenterLeaderboards": self = .gameCenterLeaderboards - case "groupLeaderboardSet": self = .groupLeaderboardSet - case "localizations": self = .localizations - case "referenceName": self = .referenceName - case "releases": self = .releases - case "vendorIdentifier": self = .vendorIdentifier - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum GameCenterLeaderboards: Hashable, Codable, RawRepresentable { - case archived - case defaultFormatter - case gameCenterDetail - case gameCenterGroup - case gameCenterLeaderboardSets - case groupLeaderboard - case localizations - case recurrenceDuration - case recurrenceRule - case recurrenceStartDate - case referenceName - case releases - case scoreRangeEnd - case scoreRangeStart - case scoreSortType - case submissionType - case vendorIdentifier - case unknown(String) - - public var rawValue: String { - switch self { - case .archived: return "archived" - case .defaultFormatter: return "defaultFormatter" - case .gameCenterDetail: return "gameCenterDetail" - case .gameCenterGroup: return "gameCenterGroup" - case .gameCenterLeaderboardSets: return "gameCenterLeaderboardSets" - case .groupLeaderboard: return "groupLeaderboard" - case .localizations: return "localizations" - case .recurrenceDuration: return "recurrenceDuration" - case .recurrenceRule: return "recurrenceRule" - case .recurrenceStartDate: return "recurrenceStartDate" - case .referenceName: return "referenceName" - case .releases: return "releases" - case .scoreRangeEnd: return "scoreRangeEnd" - case .scoreRangeStart: return "scoreRangeStart" - case .scoreSortType: return "scoreSortType" - case .submissionType: return "submissionType" - case .vendorIdentifier: return "vendorIdentifier" - case .unknown(let rawValue): return rawValue - } + public struct GameCenterLeaderboards: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var activity: Self { + .init(rawValue: "activity") + } + + public static var activityProperties: Self { + .init(rawValue: "activityProperties") + } + + public static var archived: Self { + .init(rawValue: "archived") + } + + public static var challenge: Self { + .init(rawValue: "challenge") + } + + public static var defaultFormatter: Self { + .init(rawValue: "defaultFormatter") + } + + public static var gameCenterDetail: Self { + .init(rawValue: "gameCenterDetail") + } + + public static var gameCenterGroup: Self { + .init(rawValue: "gameCenterGroup") + } + + public static var gameCenterLeaderboardSets: Self { + .init(rawValue: "gameCenterLeaderboardSets") + } + + public static var groupLeaderboard: Self { + .init(rawValue: "groupLeaderboard") + } + + public static var localizations: Self { + .init(rawValue: "localizations") + } + + public static var recurrenceDuration: Self { + .init(rawValue: "recurrenceDuration") + } + + public static var recurrenceRule: Self { + .init(rawValue: "recurrenceRule") + } + + public static var recurrenceStartDate: Self { + .init(rawValue: "recurrenceStartDate") + } + + public static var referenceName: Self { + .init(rawValue: "referenceName") + } + + public static var releases: Self { + .init(rawValue: "releases") + } + + public static var scoreRangeEnd: Self { + .init(rawValue: "scoreRangeEnd") + } + + public static var scoreRangeStart: Self { + .init(rawValue: "scoreRangeStart") } + public static var scoreSortType: Self { + .init(rawValue: "scoreSortType") + } + + public static var submissionType: Self { + .init(rawValue: "submissionType") + } + + public static var vendorIdentifier: Self { + .init(rawValue: "vendorIdentifier") + } + + public static var visibility: Self { + .init(rawValue: "visibility") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "archived": self = .archived - case "defaultFormatter": self = .defaultFormatter - case "gameCenterDetail": self = .gameCenterDetail - case "gameCenterGroup": self = .gameCenterGroup - case "gameCenterLeaderboardSets": self = .gameCenterLeaderboardSets - case "groupLeaderboard": self = .groupLeaderboard - case "localizations": self = .localizations - case "recurrenceDuration": self = .recurrenceDuration - case "recurrenceRule": self = .recurrenceRule - case "recurrenceStartDate": self = .recurrenceStartDate - case "referenceName": self = .referenceName - case "releases": self = .releases - case "scoreRangeEnd": self = .scoreRangeEnd - case "scoreRangeStart": self = .scoreRangeStart - case "scoreSortType": self = .scoreSortType - case "submissionType": self = .submissionType - case "vendorIdentifier": self = .vendorIdentifier - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } public struct Relation: Hashable { + /// the fields to include for returned resources of type gameCenterActivities + public static var gameCenterActivities: Relation<[GameCenterActivities]?> { + .init(key: "fields[gameCenterActivities]") + } + + /// the fields to include for returned resources of type gameCenterChallenges + public static var gameCenterChallenges: Relation<[GameCenterChallenges]?> { + .init(key: "fields[gameCenterChallenges]") + } + /// the fields to include for returned resources of type gameCenterDetails public static var gameCenterDetails: Relation<[GameCenterDetails]?> { .init(key: "fields[gameCenterDetails]") @@ -399,37 +610,47 @@ extension V1.GameCenterLeaderboardSetMemberLocalizations.ById.GameCenterLeaderbo } } - public enum Include: Hashable, Codable, RawRepresentable { - case gameCenterDetail - case gameCenterGroup - case gameCenterLeaderboardSets - case groupLeaderboard - case localizations - case releases - case unknown(String) - - public var rawValue: String { - switch self { - case .gameCenterDetail: return "gameCenterDetail" - case .gameCenterGroup: return "gameCenterGroup" - case .gameCenterLeaderboardSets: return "gameCenterLeaderboardSets" - case .groupLeaderboard: return "groupLeaderboard" - case .localizations: return "localizations" - case .releases: return "releases" - case .unknown(let rawValue): return rawValue - } + public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var activity: Self { + .init(rawValue: "activity") + } + + public static var challenge: Self { + .init(rawValue: "challenge") } + public static var gameCenterDetail: Self { + .init(rawValue: "gameCenterDetail") + } + + public static var gameCenterGroup: Self { + .init(rawValue: "gameCenterGroup") + } + + public static var gameCenterLeaderboardSets: Self { + .init(rawValue: "gameCenterLeaderboardSets") + } + + public static var groupLeaderboard: Self { + .init(rawValue: "groupLeaderboard") + } + + public static var localizations: Self { + .init(rawValue: "localizations") + } + + public static var releases: Self { + .init(rawValue: "releases") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "gameCenterDetail": self = .gameCenterDetail - case "gameCenterGroup": self = .gameCenterGroup - case "gameCenterLeaderboardSets": self = .gameCenterLeaderboardSets - case "groupLeaderboard": self = .groupLeaderboard - case "localizations": self = .localizations - case "releases": self = .releases - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterLeaderboardSetMemberLocalizations/ById/GameCenterLeaderboardSet/GameCenterLeaderboardSetMemberLocalizationsByIdGameCenterLeaderboardSet.GET.b1e4b3a.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterLeaderboardSetMemberLocalizations/ById/GameCenterLeaderboardSet/GameCenterLeaderboardSetMemberLocalizationsByIdGameCenterLeaderboardSet.GET.b1e4b3a.generated.swift index bb18f7a5..788709c2 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterLeaderboardSetMemberLocalizations/ById/GameCenterLeaderboardSet/GameCenterLeaderboardSetMemberLocalizationsByIdGameCenterLeaderboardSet.GET.b1e4b3a.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterLeaderboardSetMemberLocalizations/ById/GameCenterLeaderboardSet/GameCenterLeaderboardSetMemberLocalizationsByIdGameCenterLeaderboardSet.GET.b1e4b3a.generated.swift @@ -60,8 +60,10 @@ extension V1.GameCenterLeaderboardSetMemberLocalizations.ById.GameCenterLeaderbo /// - Returns: **200**, Single GameCenterLeaderboardSet as `GameCenterLeaderboardSetResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -75,12 +77,18 @@ extension V1.GameCenterLeaderboardSetMemberLocalizations.ById.GameCenterLeaderbo case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 404: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -105,249 +113,319 @@ extension V1.GameCenterLeaderboardSetMemberLocalizations.ById.GameCenterLeaderbo private var values: [AnyHashable: AnyHashable] = [:] - public enum GameCenterDetails: Hashable, Codable, RawRepresentable { - case achievementReleases - case app - case arcadeEnabled - case challengeEnabled - case defaultGroupLeaderboard - case defaultLeaderboard - case gameCenterAchievements - case gameCenterAppVersions - case gameCenterGroup - case gameCenterLeaderboardSets - case gameCenterLeaderboards - case leaderboardReleases - case leaderboardSetReleases - case unknown(String) - - public var rawValue: String { - switch self { - case .achievementReleases: return "achievementReleases" - case .app: return "app" - case .arcadeEnabled: return "arcadeEnabled" - case .challengeEnabled: return "challengeEnabled" - case .defaultGroupLeaderboard: return "defaultGroupLeaderboard" - case .defaultLeaderboard: return "defaultLeaderboard" - case .gameCenterAchievements: return "gameCenterAchievements" - case .gameCenterAppVersions: return "gameCenterAppVersions" - case .gameCenterGroup: return "gameCenterGroup" - case .gameCenterLeaderboardSets: return "gameCenterLeaderboardSets" - case .gameCenterLeaderboards: return "gameCenterLeaderboards" - case .leaderboardReleases: return "leaderboardReleases" - case .leaderboardSetReleases: return "leaderboardSetReleases" - case .unknown(let rawValue): return rawValue - } + public struct GameCenterDetails: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var achievementReleases: Self { + .init(rawValue: "achievementReleases") + } + + public static var activityReleases: Self { + .init(rawValue: "activityReleases") + } + + public static var app: Self { + .init(rawValue: "app") + } + + public static var arcadeEnabled: Self { + .init(rawValue: "arcadeEnabled") } + public static var challengeEnabled: Self { + .init(rawValue: "challengeEnabled") + } + + public static var challengeReleases: Self { + .init(rawValue: "challengeReleases") + } + + public static var challengesMinimumPlatformVersions: Self { + .init(rawValue: "challengesMinimumPlatformVersions") + } + + public static var defaultGroupLeaderboard: Self { + .init(rawValue: "defaultGroupLeaderboard") + } + + public static var defaultLeaderboard: Self { + .init(rawValue: "defaultLeaderboard") + } + + public static var gameCenterAchievements: Self { + .init(rawValue: "gameCenterAchievements") + } + + public static var gameCenterActivities: Self { + .init(rawValue: "gameCenterActivities") + } + + public static var gameCenterAppVersions: Self { + .init(rawValue: "gameCenterAppVersions") + } + + public static var gameCenterChallenges: Self { + .init(rawValue: "gameCenterChallenges") + } + + public static var gameCenterGroup: Self { + .init(rawValue: "gameCenterGroup") + } + + public static var gameCenterLeaderboardSets: Self { + .init(rawValue: "gameCenterLeaderboardSets") + } + + public static var gameCenterLeaderboards: Self { + .init(rawValue: "gameCenterLeaderboards") + } + + public static var leaderboardReleases: Self { + .init(rawValue: "leaderboardReleases") + } + + public static var leaderboardSetReleases: Self { + .init(rawValue: "leaderboardSetReleases") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "achievementReleases": self = .achievementReleases - case "app": self = .app - case "arcadeEnabled": self = .arcadeEnabled - case "challengeEnabled": self = .challengeEnabled - case "defaultGroupLeaderboard": self = .defaultGroupLeaderboard - case "defaultLeaderboard": self = .defaultLeaderboard - case "gameCenterAchievements": self = .gameCenterAchievements - case "gameCenterAppVersions": self = .gameCenterAppVersions - case "gameCenterGroup": self = .gameCenterGroup - case "gameCenterLeaderboardSets": self = .gameCenterLeaderboardSets - case "gameCenterLeaderboards": self = .gameCenterLeaderboards - case "leaderboardReleases": self = .leaderboardReleases - case "leaderboardSetReleases": self = .leaderboardSetReleases - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum GameCenterGroups: Hashable, Codable, RawRepresentable { - case gameCenterAchievements - case gameCenterDetails - case gameCenterLeaderboardSets - case gameCenterLeaderboards - case referenceName - case unknown(String) - - public var rawValue: String { - switch self { - case .gameCenterAchievements: return "gameCenterAchievements" - case .gameCenterDetails: return "gameCenterDetails" - case .gameCenterLeaderboardSets: return "gameCenterLeaderboardSets" - case .gameCenterLeaderboards: return "gameCenterLeaderboards" - case .referenceName: return "referenceName" - case .unknown(let rawValue): return rawValue - } + public struct GameCenterGroups: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var gameCenterAchievements: Self { + .init(rawValue: "gameCenterAchievements") + } + + public static var gameCenterActivities: Self { + .init(rawValue: "gameCenterActivities") + } + + public static var gameCenterChallenges: Self { + .init(rawValue: "gameCenterChallenges") + } + + public static var gameCenterDetails: Self { + .init(rawValue: "gameCenterDetails") + } + + public static var gameCenterLeaderboardSets: Self { + .init(rawValue: "gameCenterLeaderboardSets") + } + + public static var gameCenterLeaderboards: Self { + .init(rawValue: "gameCenterLeaderboards") + } + + public static var referenceName: Self { + .init(rawValue: "referenceName") + } + + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "gameCenterAchievements": self = .gameCenterAchievements - case "gameCenterDetails": self = .gameCenterDetails - case "gameCenterLeaderboardSets": self = .gameCenterLeaderboardSets - case "gameCenterLeaderboards": self = .gameCenterLeaderboards - case "referenceName": self = .referenceName - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum GameCenterLeaderboardSetLocalizations: Hashable, Codable, RawRepresentable { - case gameCenterLeaderboardSet - case gameCenterLeaderboardSetImage - case locale - case name - case unknown(String) + public struct GameCenterLeaderboardSetLocalizations: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var gameCenterLeaderboardSet: Self { + .init(rawValue: "gameCenterLeaderboardSet") + } - public var rawValue: String { - switch self { - case .gameCenterLeaderboardSet: return "gameCenterLeaderboardSet" - case .gameCenterLeaderboardSetImage: return "gameCenterLeaderboardSetImage" - case .locale: return "locale" - case .name: return "name" - case .unknown(let rawValue): return rawValue - } + public static var gameCenterLeaderboardSetImage: Self { + .init(rawValue: "gameCenterLeaderboardSetImage") } + public static var locale: Self { + .init(rawValue: "locale") + } + + public static var name: Self { + .init(rawValue: "name") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "gameCenterLeaderboardSet": self = .gameCenterLeaderboardSet - case "gameCenterLeaderboardSetImage": self = .gameCenterLeaderboardSetImage - case "locale": self = .locale - case "name": self = .name - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum GameCenterLeaderboardSetReleases: Hashable, Codable, RawRepresentable { - case gameCenterDetail - case gameCenterLeaderboardSet - case live - case unknown(String) + public struct GameCenterLeaderboardSetReleases: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var gameCenterDetail: Self { + .init(rawValue: "gameCenterDetail") + } + + public static var gameCenterLeaderboardSet: Self { + .init(rawValue: "gameCenterLeaderboardSet") + } + + public static var live: Self { + .init(rawValue: "live") + } - public var rawValue: String { - switch self { - case .gameCenterDetail: return "gameCenterDetail" - case .gameCenterLeaderboardSet: return "gameCenterLeaderboardSet" - case .live: return "live" - case .unknown(let rawValue): return rawValue - } + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "gameCenterDetail": self = .gameCenterDetail - case "gameCenterLeaderboardSet": self = .gameCenterLeaderboardSet - case "live": self = .live - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum GameCenterLeaderboardSets: Hashable, Codable, RawRepresentable { - case gameCenterDetail - case gameCenterGroup - case gameCenterLeaderboards - case groupLeaderboardSet - case localizations - case referenceName - case releases - case vendorIdentifier - case unknown(String) - - public var rawValue: String { - switch self { - case .gameCenterDetail: return "gameCenterDetail" - case .gameCenterGroup: return "gameCenterGroup" - case .gameCenterLeaderboards: return "gameCenterLeaderboards" - case .groupLeaderboardSet: return "groupLeaderboardSet" - case .localizations: return "localizations" - case .referenceName: return "referenceName" - case .releases: return "releases" - case .vendorIdentifier: return "vendorIdentifier" - case .unknown(let rawValue): return rawValue - } + public struct GameCenterLeaderboardSets: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var gameCenterDetail: Self { + .init(rawValue: "gameCenterDetail") + } + + public static var gameCenterGroup: Self { + .init(rawValue: "gameCenterGroup") } + public static var gameCenterLeaderboards: Self { + .init(rawValue: "gameCenterLeaderboards") + } + + public static var groupLeaderboardSet: Self { + .init(rawValue: "groupLeaderboardSet") + } + + public static var localizations: Self { + .init(rawValue: "localizations") + } + + public static var referenceName: Self { + .init(rawValue: "referenceName") + } + + public static var releases: Self { + .init(rawValue: "releases") + } + + public static var vendorIdentifier: Self { + .init(rawValue: "vendorIdentifier") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "gameCenterDetail": self = .gameCenterDetail - case "gameCenterGroup": self = .gameCenterGroup - case "gameCenterLeaderboards": self = .gameCenterLeaderboards - case "groupLeaderboardSet": self = .groupLeaderboardSet - case "localizations": self = .localizations - case "referenceName": self = .referenceName - case "releases": self = .releases - case "vendorIdentifier": self = .vendorIdentifier - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum GameCenterLeaderboards: Hashable, Codable, RawRepresentable { - case archived - case defaultFormatter - case gameCenterDetail - case gameCenterGroup - case gameCenterLeaderboardSets - case groupLeaderboard - case localizations - case recurrenceDuration - case recurrenceRule - case recurrenceStartDate - case referenceName - case releases - case scoreRangeEnd - case scoreRangeStart - case scoreSortType - case submissionType - case vendorIdentifier - case unknown(String) - - public var rawValue: String { - switch self { - case .archived: return "archived" - case .defaultFormatter: return "defaultFormatter" - case .gameCenterDetail: return "gameCenterDetail" - case .gameCenterGroup: return "gameCenterGroup" - case .gameCenterLeaderboardSets: return "gameCenterLeaderboardSets" - case .groupLeaderboard: return "groupLeaderboard" - case .localizations: return "localizations" - case .recurrenceDuration: return "recurrenceDuration" - case .recurrenceRule: return "recurrenceRule" - case .recurrenceStartDate: return "recurrenceStartDate" - case .referenceName: return "referenceName" - case .releases: return "releases" - case .scoreRangeEnd: return "scoreRangeEnd" - case .scoreRangeStart: return "scoreRangeStart" - case .scoreSortType: return "scoreSortType" - case .submissionType: return "submissionType" - case .vendorIdentifier: return "vendorIdentifier" - case .unknown(let rawValue): return rawValue - } + public struct GameCenterLeaderboards: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var activity: Self { + .init(rawValue: "activity") + } + + public static var activityProperties: Self { + .init(rawValue: "activityProperties") + } + + public static var archived: Self { + .init(rawValue: "archived") + } + + public static var challenge: Self { + .init(rawValue: "challenge") + } + + public static var defaultFormatter: Self { + .init(rawValue: "defaultFormatter") + } + + public static var gameCenterDetail: Self { + .init(rawValue: "gameCenterDetail") + } + + public static var gameCenterGroup: Self { + .init(rawValue: "gameCenterGroup") + } + + public static var gameCenterLeaderboardSets: Self { + .init(rawValue: "gameCenterLeaderboardSets") + } + + public static var groupLeaderboard: Self { + .init(rawValue: "groupLeaderboard") + } + + public static var localizations: Self { + .init(rawValue: "localizations") + } + + public static var recurrenceDuration: Self { + .init(rawValue: "recurrenceDuration") + } + + public static var recurrenceRule: Self { + .init(rawValue: "recurrenceRule") } + public static var recurrenceStartDate: Self { + .init(rawValue: "recurrenceStartDate") + } + + public static var referenceName: Self { + .init(rawValue: "referenceName") + } + + public static var releases: Self { + .init(rawValue: "releases") + } + + public static var scoreRangeEnd: Self { + .init(rawValue: "scoreRangeEnd") + } + + public static var scoreRangeStart: Self { + .init(rawValue: "scoreRangeStart") + } + + public static var scoreSortType: Self { + .init(rawValue: "scoreSortType") + } + + public static var submissionType: Self { + .init(rawValue: "submissionType") + } + + public static var vendorIdentifier: Self { + .init(rawValue: "vendorIdentifier") + } + + public static var visibility: Self { + .init(rawValue: "visibility") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "archived": self = .archived - case "defaultFormatter": self = .defaultFormatter - case "gameCenterDetail": self = .gameCenterDetail - case "gameCenterGroup": self = .gameCenterGroup - case "gameCenterLeaderboardSets": self = .gameCenterLeaderboardSets - case "groupLeaderboard": self = .groupLeaderboard - case "localizations": self = .localizations - case "recurrenceDuration": self = .recurrenceDuration - case "recurrenceRule": self = .recurrenceRule - case "recurrenceStartDate": self = .recurrenceStartDate - case "referenceName": self = .referenceName - case "releases": self = .releases - case "scoreRangeEnd": self = .scoreRangeEnd - case "scoreRangeStart": self = .scoreRangeStart - case "scoreSortType": self = .scoreSortType - case "submissionType": self = .submissionType - case "vendorIdentifier": self = .vendorIdentifier - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } @@ -390,37 +468,39 @@ extension V1.GameCenterLeaderboardSetMemberLocalizations.ById.GameCenterLeaderbo } } - public enum Include: Hashable, Codable, RawRepresentable { - case gameCenterDetail - case gameCenterGroup - case gameCenterLeaderboards - case groupLeaderboardSet - case localizations - case releases - case unknown(String) - - public var rawValue: String { - switch self { - case .gameCenterDetail: return "gameCenterDetail" - case .gameCenterGroup: return "gameCenterGroup" - case .gameCenterLeaderboards: return "gameCenterLeaderboards" - case .groupLeaderboardSet: return "groupLeaderboardSet" - case .localizations: return "localizations" - case .releases: return "releases" - case .unknown(let rawValue): return rawValue - } + public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var gameCenterDetail: Self { + .init(rawValue: "gameCenterDetail") + } + + public static var gameCenterGroup: Self { + .init(rawValue: "gameCenterGroup") + } + + public static var gameCenterLeaderboards: Self { + .init(rawValue: "gameCenterLeaderboards") + } + + public static var groupLeaderboardSet: Self { + .init(rawValue: "groupLeaderboardSet") + } + + public static var localizations: Self { + .init(rawValue: "localizations") + } + + public static var releases: Self { + .init(rawValue: "releases") } + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "gameCenterDetail": self = .gameCenterDetail - case "gameCenterGroup": self = .gameCenterGroup - case "gameCenterLeaderboards": self = .gameCenterLeaderboards - case "groupLeaderboardSet": self = .groupLeaderboardSet - case "localizations": self = .localizations - case "releases": self = .releases - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterLeaderboardSetMemberLocalizations/ById/GameCenterLeaderboardSetMemberLocalizationsById.DELETE.45631f6.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterLeaderboardSetMemberLocalizations/ById/GameCenterLeaderboardSetMemberLocalizationsById.DELETE.45631f6.generated.swift index 6bb27364..556c65d9 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterLeaderboardSetMemberLocalizations/ById/GameCenterLeaderboardSetMemberLocalizationsById.DELETE.45631f6.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterLeaderboardSetMemberLocalizations/ById/GameCenterLeaderboardSetMemberLocalizationsById.DELETE.45631f6.generated.swift @@ -31,11 +31,12 @@ extension V1.GameCenterLeaderboardSetMemberLocalizations.ById { return urlRequest } - /// - Returns: **204**, Success (no content) /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -43,12 +44,12 @@ extension V1.GameCenterLeaderboardSetMemberLocalizations.ById { } switch urlResponse.statusCode { - case 204: - return - case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) @@ -58,6 +59,9 @@ extension V1.GameCenterLeaderboardSetMemberLocalizations.ById { case 409: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterLeaderboardSetMemberLocalizations/ById/GameCenterLeaderboardSetMemberLocalizationsById.PATCH.45631f6.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterLeaderboardSetMemberLocalizations/ById/GameCenterLeaderboardSetMemberLocalizationsById.PATCH.45631f6.generated.swift index d4fea4d7..3c0923cd 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterLeaderboardSetMemberLocalizations/ById/GameCenterLeaderboardSetMemberLocalizationsById.PATCH.45631f6.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterLeaderboardSetMemberLocalizations/ById/GameCenterLeaderboardSetMemberLocalizationsById.PATCH.45631f6.generated.swift @@ -48,9 +48,12 @@ extension V1.GameCenterLeaderboardSetMemberLocalizations.ById { /// - Returns: **200**, Single GameCenterLeaderboardSetMemberLocalization as `GameCenterLeaderboardSetMemberLocalizationResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **422**, Unprocessable request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -64,6 +67,9 @@ extension V1.GameCenterLeaderboardSetMemberLocalizations.ById { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) @@ -73,6 +79,12 @@ extension V1.GameCenterLeaderboardSetMemberLocalizations.ById { case 409: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 422: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterLeaderboardSetMemberLocalizations/ById/Relationships/GameCenterLeaderboard/GameCenterLeaderboardSetMemberLocalizationsByIdRelationshipsGameCenterLeaderboard.GET.c79b006.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterLeaderboardSetMemberLocalizations/ById/Relationships/GameCenterLeaderboard/GameCenterLeaderboardSetMemberLocalizationsByIdRelationshipsGameCenterLeaderboard.GET.c79b006.generated.swift new file mode 100644 index 00000000..ad123c91 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterLeaderboardSetMemberLocalizations/ById/Relationships/GameCenterLeaderboard/GameCenterLeaderboardSetMemberLocalizationsByIdRelationshipsGameCenterLeaderboard.GET.c79b006.generated.swift @@ -0,0 +1,86 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.GameCenterLeaderboardSetMemberLocalizations.ById.Relationships.GameCenterLeaderboard { + public struct GET: Endpoint { + public typealias Response = GameCenterLeaderboardSetMemberLocalizationGameCenterLeaderboardLinkageResponse + + public var path: String { + "/v1/gameCenterLeaderboardSetMemberLocalizations/\(id)/relationships/gameCenterLeaderboard" + } + + /// the id of the requested resource + public var id: String + + public var parameters: Parameters = Parameters() + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + components?.queryItems = [ + + ].filter { $0.value != nil } + if components?.queryItems?.isEmpty ?? false { + components?.queryItems = nil + } + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "GET" + return urlRequest + } + + /// - Returns: **200**, Related linkage as `GameCenterLeaderboardSetMemberLocalizationGameCenterLeaderboardLinkageResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(GameCenterLeaderboardSetMemberLocalizationGameCenterLeaderboardLinkageResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +extension V1.GameCenterLeaderboardSetMemberLocalizations.ById.Relationships.GameCenterLeaderboard.GET { + public struct Parameters: Hashable { + + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterLeaderboardSetMemberLocalizations/ById/Relationships/GameCenterLeaderboardSet/GameCenterLeaderboardSetMemberLocalizationsByIdRelationshipsGameCenterLeaderboardSet.GET.accdc75.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterLeaderboardSetMemberLocalizations/ById/Relationships/GameCenterLeaderboardSet/GameCenterLeaderboardSetMemberLocalizationsByIdRelationshipsGameCenterLeaderboardSet.GET.accdc75.generated.swift new file mode 100644 index 00000000..a124150d --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterLeaderboardSetMemberLocalizations/ById/Relationships/GameCenterLeaderboardSet/GameCenterLeaderboardSetMemberLocalizationsByIdRelationshipsGameCenterLeaderboardSet.GET.accdc75.generated.swift @@ -0,0 +1,86 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.GameCenterLeaderboardSetMemberLocalizations.ById.Relationships.GameCenterLeaderboardSet { + public struct GET: Endpoint { + public typealias Response = GameCenterLeaderboardSetMemberLocalizationGameCenterLeaderboardSetLinkageResponse + + public var path: String { + "/v1/gameCenterLeaderboardSetMemberLocalizations/\(id)/relationships/gameCenterLeaderboardSet" + } + + /// the id of the requested resource + public var id: String + + public var parameters: Parameters = Parameters() + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + components?.queryItems = [ + + ].filter { $0.value != nil } + if components?.queryItems?.isEmpty ?? false { + components?.queryItems = nil + } + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "GET" + return urlRequest + } + + /// - Returns: **200**, Related linkage as `GameCenterLeaderboardSetMemberLocalizationGameCenterLeaderboardSetLinkageResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(GameCenterLeaderboardSetMemberLocalizationGameCenterLeaderboardSetLinkageResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +extension V1.GameCenterLeaderboardSetMemberLocalizations.ById.Relationships.GameCenterLeaderboardSet.GET { + public struct Parameters: Hashable { + + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterLeaderboardSetMemberLocalizations/GameCenterLeaderboardSetMemberLocalizations.GET.9af70d9.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterLeaderboardSetMemberLocalizations/GameCenterLeaderboardSetMemberLocalizations.GET.9af70d9.generated.swift index f6304a51..257c9bde 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterLeaderboardSetMemberLocalizations/GameCenterLeaderboardSetMemberLocalizations.GET.9af70d9.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterLeaderboardSetMemberLocalizations/GameCenterLeaderboardSetMemberLocalizations.GET.9af70d9.generated.swift @@ -51,7 +51,9 @@ extension V1.GameCenterLeaderboardSetMemberLocalizations { /// - Returns: **200**, List of GameCenterLeaderboardSetMemberLocalizations as `GameCenterLeaderboardSetMemberLocalizationsResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -65,9 +67,15 @@ extension V1.GameCenterLeaderboardSetMemberLocalizations { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -95,138 +103,171 @@ extension V1.GameCenterLeaderboardSetMemberLocalizations.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum GameCenterLeaderboardSetMemberLocalizations: Hashable, Codable, RawRepresentable { - case gameCenterLeaderboard - case gameCenterLeaderboardSet - case locale - case name - case unknown(String) + public struct GameCenterLeaderboardSetMemberLocalizations: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var gameCenterLeaderboard: Self { + .init(rawValue: "gameCenterLeaderboard") + } + + public static var gameCenterLeaderboardSet: Self { + .init(rawValue: "gameCenterLeaderboardSet") + } + + public static var locale: Self { + .init(rawValue: "locale") + } + + public static var name: Self { + .init(rawValue: "name") + } - public var rawValue: String { - switch self { - case .gameCenterLeaderboard: return "gameCenterLeaderboard" - case .gameCenterLeaderboardSet: return "gameCenterLeaderboardSet" - case .locale: return "locale" - case .name: return "name" - case .unknown(let rawValue): return rawValue - } + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "gameCenterLeaderboard": self = .gameCenterLeaderboard - case "gameCenterLeaderboardSet": self = .gameCenterLeaderboardSet - case "locale": self = .locale - case "name": self = .name - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum GameCenterLeaderboardSets: Hashable, Codable, RawRepresentable { - case gameCenterDetail - case gameCenterGroup - case gameCenterLeaderboards - case groupLeaderboardSet - case localizations - case referenceName - case releases - case vendorIdentifier - case unknown(String) - - public var rawValue: String { - switch self { - case .gameCenterDetail: return "gameCenterDetail" - case .gameCenterGroup: return "gameCenterGroup" - case .gameCenterLeaderboards: return "gameCenterLeaderboards" - case .groupLeaderboardSet: return "groupLeaderboardSet" - case .localizations: return "localizations" - case .referenceName: return "referenceName" - case .releases: return "releases" - case .vendorIdentifier: return "vendorIdentifier" - case .unknown(let rawValue): return rawValue - } + public struct GameCenterLeaderboardSets: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var gameCenterDetail: Self { + .init(rawValue: "gameCenterDetail") + } + + public static var gameCenterGroup: Self { + .init(rawValue: "gameCenterGroup") + } + + public static var gameCenterLeaderboards: Self { + .init(rawValue: "gameCenterLeaderboards") + } + + public static var groupLeaderboardSet: Self { + .init(rawValue: "groupLeaderboardSet") + } + + public static var localizations: Self { + .init(rawValue: "localizations") } + public static var referenceName: Self { + .init(rawValue: "referenceName") + } + + public static var releases: Self { + .init(rawValue: "releases") + } + + public static var vendorIdentifier: Self { + .init(rawValue: "vendorIdentifier") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "gameCenterDetail": self = .gameCenterDetail - case "gameCenterGroup": self = .gameCenterGroup - case "gameCenterLeaderboards": self = .gameCenterLeaderboards - case "groupLeaderboardSet": self = .groupLeaderboardSet - case "localizations": self = .localizations - case "referenceName": self = .referenceName - case "releases": self = .releases - case "vendorIdentifier": self = .vendorIdentifier - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum GameCenterLeaderboards: Hashable, Codable, RawRepresentable { - case archived - case defaultFormatter - case gameCenterDetail - case gameCenterGroup - case gameCenterLeaderboardSets - case groupLeaderboard - case localizations - case recurrenceDuration - case recurrenceRule - case recurrenceStartDate - case referenceName - case releases - case scoreRangeEnd - case scoreRangeStart - case scoreSortType - case submissionType - case vendorIdentifier - case unknown(String) - - public var rawValue: String { - switch self { - case .archived: return "archived" - case .defaultFormatter: return "defaultFormatter" - case .gameCenterDetail: return "gameCenterDetail" - case .gameCenterGroup: return "gameCenterGroup" - case .gameCenterLeaderboardSets: return "gameCenterLeaderboardSets" - case .groupLeaderboard: return "groupLeaderboard" - case .localizations: return "localizations" - case .recurrenceDuration: return "recurrenceDuration" - case .recurrenceRule: return "recurrenceRule" - case .recurrenceStartDate: return "recurrenceStartDate" - case .referenceName: return "referenceName" - case .releases: return "releases" - case .scoreRangeEnd: return "scoreRangeEnd" - case .scoreRangeStart: return "scoreRangeStart" - case .scoreSortType: return "scoreSortType" - case .submissionType: return "submissionType" - case .vendorIdentifier: return "vendorIdentifier" - case .unknown(let rawValue): return rawValue - } + public struct GameCenterLeaderboards: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var activity: Self { + .init(rawValue: "activity") + } + + public static var activityProperties: Self { + .init(rawValue: "activityProperties") + } + + public static var archived: Self { + .init(rawValue: "archived") + } + + public static var challenge: Self { + .init(rawValue: "challenge") + } + + public static var defaultFormatter: Self { + .init(rawValue: "defaultFormatter") + } + + public static var gameCenterDetail: Self { + .init(rawValue: "gameCenterDetail") } + public static var gameCenterGroup: Self { + .init(rawValue: "gameCenterGroup") + } + + public static var gameCenterLeaderboardSets: Self { + .init(rawValue: "gameCenterLeaderboardSets") + } + + public static var groupLeaderboard: Self { + .init(rawValue: "groupLeaderboard") + } + + public static var localizations: Self { + .init(rawValue: "localizations") + } + + public static var recurrenceDuration: Self { + .init(rawValue: "recurrenceDuration") + } + + public static var recurrenceRule: Self { + .init(rawValue: "recurrenceRule") + } + + public static var recurrenceStartDate: Self { + .init(rawValue: "recurrenceStartDate") + } + + public static var referenceName: Self { + .init(rawValue: "referenceName") + } + + public static var releases: Self { + .init(rawValue: "releases") + } + + public static var scoreRangeEnd: Self { + .init(rawValue: "scoreRangeEnd") + } + + public static var scoreRangeStart: Self { + .init(rawValue: "scoreRangeStart") + } + + public static var scoreSortType: Self { + .init(rawValue: "scoreSortType") + } + + public static var submissionType: Self { + .init(rawValue: "submissionType") + } + + public static var vendorIdentifier: Self { + .init(rawValue: "vendorIdentifier") + } + + public static var visibility: Self { + .init(rawValue: "visibility") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "archived": self = .archived - case "defaultFormatter": self = .defaultFormatter - case "gameCenterDetail": self = .gameCenterDetail - case "gameCenterGroup": self = .gameCenterGroup - case "gameCenterLeaderboardSets": self = .gameCenterLeaderboardSets - case "groupLeaderboard": self = .groupLeaderboard - case "localizations": self = .localizations - case "recurrenceDuration": self = .recurrenceDuration - case "recurrenceRule": self = .recurrenceRule - case "recurrenceStartDate": self = .recurrenceStartDate - case "referenceName": self = .referenceName - case "releases": self = .releases - case "scoreRangeEnd": self = .scoreRangeEnd - case "scoreRangeStart": self = .scoreRangeStart - case "scoreSortType": self = .scoreSortType - case "submissionType": self = .submissionType - case "vendorIdentifier": self = .vendorIdentifier - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } @@ -281,25 +322,23 @@ extension V1.GameCenterLeaderboardSetMemberLocalizations.GET { } } - public enum Include: Hashable, Codable, RawRepresentable { - case gameCenterLeaderboard - case gameCenterLeaderboardSet - case unknown(String) + public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var gameCenterLeaderboard: Self { + .init(rawValue: "gameCenterLeaderboard") + } - public var rawValue: String { - switch self { - case .gameCenterLeaderboard: return "gameCenterLeaderboard" - case .gameCenterLeaderboardSet: return "gameCenterLeaderboardSet" - case .unknown(let rawValue): return rawValue - } + public static var gameCenterLeaderboardSet: Self { + .init(rawValue: "gameCenterLeaderboardSet") } + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "gameCenterLeaderboard": self = .gameCenterLeaderboard - case "gameCenterLeaderboardSet": self = .gameCenterLeaderboardSet - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterLeaderboardSetMemberLocalizations/GameCenterLeaderboardSetMemberLocalizations.POST.9af70d9.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterLeaderboardSetMemberLocalizations/GameCenterLeaderboardSetMemberLocalizations.POST.9af70d9.generated.swift index e0fa92c2..d7361124 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterLeaderboardSetMemberLocalizations/GameCenterLeaderboardSetMemberLocalizations.POST.9af70d9.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterLeaderboardSetMemberLocalizations/GameCenterLeaderboardSetMemberLocalizations.POST.9af70d9.generated.swift @@ -41,8 +41,11 @@ extension V1.GameCenterLeaderboardSetMemberLocalizations { /// - Returns: **201**, Single GameCenterLeaderboardSetMemberLocalization as `GameCenterLeaderboardSetMemberLocalizationResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **422**, Unprocessable request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -56,12 +59,21 @@ extension V1.GameCenterLeaderboardSetMemberLocalizations { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 409: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 422: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterLeaderboardSetReleases/ById/GameCenterLeaderboardSetReleasesById.DELETE.76004f9.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterLeaderboardSetReleases/ById/GameCenterLeaderboardSetReleasesById.DELETE.76004f9.generated.swift index e74157fb..3b70a6d1 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterLeaderboardSetReleases/ById/GameCenterLeaderboardSetReleasesById.DELETE.76004f9.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterLeaderboardSetReleases/ById/GameCenterLeaderboardSetReleasesById.DELETE.76004f9.generated.swift @@ -31,11 +31,12 @@ extension V1.GameCenterLeaderboardSetReleases.ById { return urlRequest } - /// - Returns: **204**, Success (no content) /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -43,12 +44,12 @@ extension V1.GameCenterLeaderboardSetReleases.ById { } switch urlResponse.statusCode { - case 204: - return - case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) @@ -58,6 +59,9 @@ extension V1.GameCenterLeaderboardSetReleases.ById { case 409: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterLeaderboardSetReleases/ById/GameCenterLeaderboardSetReleasesById.GET.76004f9.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterLeaderboardSetReleases/ById/GameCenterLeaderboardSetReleasesById.GET.76004f9.generated.swift index e95d51bb..db8c3379 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterLeaderboardSetReleases/ById/GameCenterLeaderboardSetReleasesById.GET.76004f9.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterLeaderboardSetReleases/ById/GameCenterLeaderboardSetReleasesById.GET.76004f9.generated.swift @@ -44,8 +44,10 @@ extension V1.GameCenterLeaderboardSetReleases.ById { /// - Returns: **200**, Single GameCenterLeaderboardSetRelease as `GameCenterLeaderboardSetReleaseResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -59,12 +61,18 @@ extension V1.GameCenterLeaderboardSetReleases.ById { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 404: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -87,28 +95,27 @@ extension V1.GameCenterLeaderboardSetReleases.ById.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum GameCenterLeaderboardSetReleases: Hashable, Codable, RawRepresentable { - case gameCenterDetail - case gameCenterLeaderboardSet - case live - case unknown(String) - - public var rawValue: String { - switch self { - case .gameCenterDetail: return "gameCenterDetail" - case .gameCenterLeaderboardSet: return "gameCenterLeaderboardSet" - case .live: return "live" - case .unknown(let rawValue): return rawValue - } + public struct GameCenterLeaderboardSetReleases: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var gameCenterDetail: Self { + .init(rawValue: "gameCenterDetail") } + public static var gameCenterLeaderboardSet: Self { + .init(rawValue: "gameCenterLeaderboardSet") + } + + public static var live: Self { + .init(rawValue: "live") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "gameCenterDetail": self = .gameCenterDetail - case "gameCenterLeaderboardSet": self = .gameCenterLeaderboardSet - case "live": self = .live - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } @@ -126,25 +133,23 @@ extension V1.GameCenterLeaderboardSetReleases.ById.GET { } } - public enum Include: Hashable, Codable, RawRepresentable { - case gameCenterDetail - case gameCenterLeaderboardSet - case unknown(String) + public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var gameCenterDetail: Self { + .init(rawValue: "gameCenterDetail") + } - public var rawValue: String { - switch self { - case .gameCenterDetail: return "gameCenterDetail" - case .gameCenterLeaderboardSet: return "gameCenterLeaderboardSet" - case .unknown(let rawValue): return rawValue - } + public static var gameCenterLeaderboardSet: Self { + .init(rawValue: "gameCenterLeaderboardSet") } + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "gameCenterDetail": self = .gameCenterDetail - case "gameCenterLeaderboardSet": self = .gameCenterLeaderboardSet - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterLeaderboardSetReleases/GameCenterLeaderboardSetReleases.POST.b8fcd20.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterLeaderboardSetReleases/GameCenterLeaderboardSetReleases.POST.b8fcd20.generated.swift index 95c24086..aa99dbdc 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterLeaderboardSetReleases/GameCenterLeaderboardSetReleases.POST.b8fcd20.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterLeaderboardSetReleases/GameCenterLeaderboardSetReleases.POST.b8fcd20.generated.swift @@ -41,8 +41,11 @@ extension V1.GameCenterLeaderboardSetReleases { /// - Returns: **201**, Single GameCenterLeaderboardSetRelease as `GameCenterLeaderboardSetReleaseResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **422**, Unprocessable request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -56,12 +59,21 @@ extension V1.GameCenterLeaderboardSetReleases { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 409: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 422: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterLeaderboardSets/ById/GameCenterLeaderboardSetsById.DELETE.6529e2e.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterLeaderboardSets/ById/GameCenterLeaderboardSetsById.DELETE.6529e2e.generated.swift index 7a3b5c14..f14cca78 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterLeaderboardSets/ById/GameCenterLeaderboardSetsById.DELETE.6529e2e.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterLeaderboardSets/ById/GameCenterLeaderboardSetsById.DELETE.6529e2e.generated.swift @@ -31,11 +31,12 @@ extension V1.GameCenterLeaderboardSets.ById { return urlRequest } - /// - Returns: **204**, Success (no content) /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -43,12 +44,12 @@ extension V1.GameCenterLeaderboardSets.ById { } switch urlResponse.statusCode { - case 204: - return - case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) @@ -58,6 +59,9 @@ extension V1.GameCenterLeaderboardSets.ById { case 409: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterLeaderboardSets/ById/GameCenterLeaderboardSetsById.GET.6529e2e.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterLeaderboardSets/ById/GameCenterLeaderboardSetsById.GET.6529e2e.generated.swift index 49f62bc3..04ba7105 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterLeaderboardSets/ById/GameCenterLeaderboardSetsById.GET.6529e2e.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterLeaderboardSets/ById/GameCenterLeaderboardSetsById.GET.6529e2e.generated.swift @@ -56,8 +56,10 @@ extension V1.GameCenterLeaderboardSets.ById { /// - Returns: **200**, Single GameCenterLeaderboardSet as `GameCenterLeaderboardSetResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -71,12 +73,18 @@ extension V1.GameCenterLeaderboardSets.ById { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 404: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -101,163 +109,195 @@ extension V1.GameCenterLeaderboardSets.ById.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum GameCenterLeaderboardSetLocalizations: Hashable, Codable, RawRepresentable { - case gameCenterLeaderboardSet - case gameCenterLeaderboardSetImage - case locale - case name - case unknown(String) + public struct GameCenterLeaderboardSetLocalizations: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var gameCenterLeaderboardSet: Self { + .init(rawValue: "gameCenterLeaderboardSet") + } + + public static var gameCenterLeaderboardSetImage: Self { + .init(rawValue: "gameCenterLeaderboardSetImage") + } + + public static var locale: Self { + .init(rawValue: "locale") + } - public var rawValue: String { - switch self { - case .gameCenterLeaderboardSet: return "gameCenterLeaderboardSet" - case .gameCenterLeaderboardSetImage: return "gameCenterLeaderboardSetImage" - case .locale: return "locale" - case .name: return "name" - case .unknown(let rawValue): return rawValue - } + public static var name: Self { + .init(rawValue: "name") } + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "gameCenterLeaderboardSet": self = .gameCenterLeaderboardSet - case "gameCenterLeaderboardSetImage": self = .gameCenterLeaderboardSetImage - case "locale": self = .locale - case "name": self = .name - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum GameCenterLeaderboardSetReleases: Hashable, Codable, RawRepresentable { - case gameCenterDetail - case gameCenterLeaderboardSet - case live - case unknown(String) + public struct GameCenterLeaderboardSetReleases: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var gameCenterDetail: Self { + .init(rawValue: "gameCenterDetail") + } + + public static var gameCenterLeaderboardSet: Self { + .init(rawValue: "gameCenterLeaderboardSet") + } - public var rawValue: String { - switch self { - case .gameCenterDetail: return "gameCenterDetail" - case .gameCenterLeaderboardSet: return "gameCenterLeaderboardSet" - case .live: return "live" - case .unknown(let rawValue): return rawValue - } + public static var live: Self { + .init(rawValue: "live") } + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "gameCenterDetail": self = .gameCenterDetail - case "gameCenterLeaderboardSet": self = .gameCenterLeaderboardSet - case "live": self = .live - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum GameCenterLeaderboardSets: Hashable, Codable, RawRepresentable { - case gameCenterDetail - case gameCenterGroup - case gameCenterLeaderboards - case groupLeaderboardSet - case localizations - case referenceName - case releases - case vendorIdentifier - case unknown(String) - - public var rawValue: String { - switch self { - case .gameCenterDetail: return "gameCenterDetail" - case .gameCenterGroup: return "gameCenterGroup" - case .gameCenterLeaderboards: return "gameCenterLeaderboards" - case .groupLeaderboardSet: return "groupLeaderboardSet" - case .localizations: return "localizations" - case .referenceName: return "referenceName" - case .releases: return "releases" - case .vendorIdentifier: return "vendorIdentifier" - case .unknown(let rawValue): return rawValue - } + public struct GameCenterLeaderboardSets: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var gameCenterDetail: Self { + .init(rawValue: "gameCenterDetail") + } + + public static var gameCenterGroup: Self { + .init(rawValue: "gameCenterGroup") + } + + public static var gameCenterLeaderboards: Self { + .init(rawValue: "gameCenterLeaderboards") + } + + public static var groupLeaderboardSet: Self { + .init(rawValue: "groupLeaderboardSet") } + public static var localizations: Self { + .init(rawValue: "localizations") + } + + public static var referenceName: Self { + .init(rawValue: "referenceName") + } + + public static var releases: Self { + .init(rawValue: "releases") + } + + public static var vendorIdentifier: Self { + .init(rawValue: "vendorIdentifier") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "gameCenterDetail": self = .gameCenterDetail - case "gameCenterGroup": self = .gameCenterGroup - case "gameCenterLeaderboards": self = .gameCenterLeaderboards - case "groupLeaderboardSet": self = .groupLeaderboardSet - case "localizations": self = .localizations - case "referenceName": self = .referenceName - case "releases": self = .releases - case "vendorIdentifier": self = .vendorIdentifier - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum GameCenterLeaderboards: Hashable, Codable, RawRepresentable { - case archived - case defaultFormatter - case gameCenterDetail - case gameCenterGroup - case gameCenterLeaderboardSets - case groupLeaderboard - case localizations - case recurrenceDuration - case recurrenceRule - case recurrenceStartDate - case referenceName - case releases - case scoreRangeEnd - case scoreRangeStart - case scoreSortType - case submissionType - case vendorIdentifier - case unknown(String) - - public var rawValue: String { - switch self { - case .archived: return "archived" - case .defaultFormatter: return "defaultFormatter" - case .gameCenterDetail: return "gameCenterDetail" - case .gameCenterGroup: return "gameCenterGroup" - case .gameCenterLeaderboardSets: return "gameCenterLeaderboardSets" - case .groupLeaderboard: return "groupLeaderboard" - case .localizations: return "localizations" - case .recurrenceDuration: return "recurrenceDuration" - case .recurrenceRule: return "recurrenceRule" - case .recurrenceStartDate: return "recurrenceStartDate" - case .referenceName: return "referenceName" - case .releases: return "releases" - case .scoreRangeEnd: return "scoreRangeEnd" - case .scoreRangeStart: return "scoreRangeStart" - case .scoreSortType: return "scoreSortType" - case .submissionType: return "submissionType" - case .vendorIdentifier: return "vendorIdentifier" - case .unknown(let rawValue): return rawValue - } + public struct GameCenterLeaderboards: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var activity: Self { + .init(rawValue: "activity") + } + + public static var activityProperties: Self { + .init(rawValue: "activityProperties") + } + + public static var archived: Self { + .init(rawValue: "archived") + } + + public static var challenge: Self { + .init(rawValue: "challenge") + } + + public static var defaultFormatter: Self { + .init(rawValue: "defaultFormatter") + } + + public static var gameCenterDetail: Self { + .init(rawValue: "gameCenterDetail") + } + + public static var gameCenterGroup: Self { + .init(rawValue: "gameCenterGroup") } + public static var gameCenterLeaderboardSets: Self { + .init(rawValue: "gameCenterLeaderboardSets") + } + + public static var groupLeaderboard: Self { + .init(rawValue: "groupLeaderboard") + } + + public static var localizations: Self { + .init(rawValue: "localizations") + } + + public static var recurrenceDuration: Self { + .init(rawValue: "recurrenceDuration") + } + + public static var recurrenceRule: Self { + .init(rawValue: "recurrenceRule") + } + + public static var recurrenceStartDate: Self { + .init(rawValue: "recurrenceStartDate") + } + + public static var referenceName: Self { + .init(rawValue: "referenceName") + } + + public static var releases: Self { + .init(rawValue: "releases") + } + + public static var scoreRangeEnd: Self { + .init(rawValue: "scoreRangeEnd") + } + + public static var scoreRangeStart: Self { + .init(rawValue: "scoreRangeStart") + } + + public static var scoreSortType: Self { + .init(rawValue: "scoreSortType") + } + + public static var submissionType: Self { + .init(rawValue: "submissionType") + } + + public static var vendorIdentifier: Self { + .init(rawValue: "vendorIdentifier") + } + + public static var visibility: Self { + .init(rawValue: "visibility") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "archived": self = .archived - case "defaultFormatter": self = .defaultFormatter - case "gameCenterDetail": self = .gameCenterDetail - case "gameCenterGroup": self = .gameCenterGroup - case "gameCenterLeaderboardSets": self = .gameCenterLeaderboardSets - case "groupLeaderboard": self = .groupLeaderboard - case "localizations": self = .localizations - case "recurrenceDuration": self = .recurrenceDuration - case "recurrenceRule": self = .recurrenceRule - case "recurrenceStartDate": self = .recurrenceStartDate - case "referenceName": self = .referenceName - case "releases": self = .releases - case "scoreRangeEnd": self = .scoreRangeEnd - case "scoreRangeStart": self = .scoreRangeStart - case "scoreSortType": self = .scoreSortType - case "submissionType": self = .submissionType - case "vendorIdentifier": self = .vendorIdentifier - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } @@ -290,37 +330,39 @@ extension V1.GameCenterLeaderboardSets.ById.GET { } } - public enum Include: Hashable, Codable, RawRepresentable { - case gameCenterDetail - case gameCenterGroup - case gameCenterLeaderboards - case groupLeaderboardSet - case localizations - case releases - case unknown(String) - - public var rawValue: String { - switch self { - case .gameCenterDetail: return "gameCenterDetail" - case .gameCenterGroup: return "gameCenterGroup" - case .gameCenterLeaderboards: return "gameCenterLeaderboards" - case .groupLeaderboardSet: return "groupLeaderboardSet" - case .localizations: return "localizations" - case .releases: return "releases" - case .unknown(let rawValue): return rawValue - } + public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var gameCenterDetail: Self { + .init(rawValue: "gameCenterDetail") } + public static var gameCenterGroup: Self { + .init(rawValue: "gameCenterGroup") + } + + public static var gameCenterLeaderboards: Self { + .init(rawValue: "gameCenterLeaderboards") + } + + public static var groupLeaderboardSet: Self { + .init(rawValue: "groupLeaderboardSet") + } + + public static var localizations: Self { + .init(rawValue: "localizations") + } + + public static var releases: Self { + .init(rawValue: "releases") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "gameCenterDetail": self = .gameCenterDetail - case "gameCenterGroup": self = .gameCenterGroup - case "gameCenterLeaderboards": self = .gameCenterLeaderboards - case "groupLeaderboardSet": self = .groupLeaderboardSet - case "localizations": self = .localizations - case "releases": self = .releases - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterLeaderboardSets/ById/GameCenterLeaderboardSetsById.PATCH.6529e2e.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterLeaderboardSets/ById/GameCenterLeaderboardSetsById.PATCH.6529e2e.generated.swift index cbded566..4f69ae44 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterLeaderboardSets/ById/GameCenterLeaderboardSetsById.PATCH.6529e2e.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterLeaderboardSets/ById/GameCenterLeaderboardSetsById.PATCH.6529e2e.generated.swift @@ -48,9 +48,12 @@ extension V1.GameCenterLeaderboardSets.ById { /// - Returns: **200**, Single GameCenterLeaderboardSet as `GameCenterLeaderboardSetResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **422**, Unprocessable request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -64,6 +67,9 @@ extension V1.GameCenterLeaderboardSets.ById { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) @@ -73,6 +79,12 @@ extension V1.GameCenterLeaderboardSets.ById { case 409: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 422: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterLeaderboardSets/ById/GameCenterLeaderboards/GameCenterLeaderboardSetsByIdGameCenterLeaderboards.GET.db53a38.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterLeaderboardSets/ById/GameCenterLeaderboards/GameCenterLeaderboardSetsByIdGameCenterLeaderboards.GET.db53a38.generated.swift index 82ec7033..0cd87606 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterLeaderboardSets/ById/GameCenterLeaderboards/GameCenterLeaderboardSetsByIdGameCenterLeaderboards.GET.db53a38.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterLeaderboardSets/ById/GameCenterLeaderboards/GameCenterLeaderboardSetsByIdGameCenterLeaderboards.GET.db53a38.generated.swift @@ -28,6 +28,10 @@ extension V1.GameCenterLeaderboardSets.ById.GameCenterLeaderboards { components?.path = path components?.queryItems = [ + URLQueryItem(name: "fields[gameCenterActivities]", + value: parameters.fields[.gameCenterActivities]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "fields[gameCenterChallenges]", + value: parameters.fields[.gameCenterChallenges]?.map { "\($0)" }.joined(separator: ",")), URLQueryItem(name: "fields[gameCenterDetails]", value: parameters.fields[.gameCenterDetails]?.map { "\($0)" }.joined(separator: ",")), URLQueryItem(name: "fields[gameCenterGroups]", @@ -68,8 +72,10 @@ extension V1.GameCenterLeaderboardSets.ById.GameCenterLeaderboards { /// - Returns: **200**, List of GameCenterLeaderboards as `GameCenterLeaderboardsResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -83,12 +89,18 @@ extension V1.GameCenterLeaderboardSets.ById.GameCenterLeaderboards { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 404: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -116,262 +128,461 @@ extension V1.GameCenterLeaderboardSets.ById.GameCenterLeaderboards.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum GameCenterDetails: Hashable, Codable, RawRepresentable { - case achievementReleases - case app - case arcadeEnabled - case challengeEnabled - case defaultGroupLeaderboard - case defaultLeaderboard - case gameCenterAchievements - case gameCenterAppVersions - case gameCenterGroup - case gameCenterLeaderboardSets - case gameCenterLeaderboards - case leaderboardReleases - case leaderboardSetReleases - case unknown(String) - - public var rawValue: String { - switch self { - case .achievementReleases: return "achievementReleases" - case .app: return "app" - case .arcadeEnabled: return "arcadeEnabled" - case .challengeEnabled: return "challengeEnabled" - case .defaultGroupLeaderboard: return "defaultGroupLeaderboard" - case .defaultLeaderboard: return "defaultLeaderboard" - case .gameCenterAchievements: return "gameCenterAchievements" - case .gameCenterAppVersions: return "gameCenterAppVersions" - case .gameCenterGroup: return "gameCenterGroup" - case .gameCenterLeaderboardSets: return "gameCenterLeaderboardSets" - case .gameCenterLeaderboards: return "gameCenterLeaderboards" - case .leaderboardReleases: return "leaderboardReleases" - case .leaderboardSetReleases: return "leaderboardSetReleases" - case .unknown(let rawValue): return rawValue - } + public struct GameCenterActivities: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var achievements: Self { + .init(rawValue: "achievements") + } + + public static var archived: Self { + .init(rawValue: "archived") + } + + public static var gameCenterDetail: Self { + .init(rawValue: "gameCenterDetail") + } + + public static var gameCenterGroup: Self { + .init(rawValue: "gameCenterGroup") + } + + public static var leaderboards: Self { + .init(rawValue: "leaderboards") + } + + public static var maximumPlayersCount: Self { + .init(rawValue: "maximumPlayersCount") + } + + public static var minimumPlayersCount: Self { + .init(rawValue: "minimumPlayersCount") + } + + public static var playStyle: Self { + .init(rawValue: "playStyle") + } + + public static var properties: Self { + .init(rawValue: "properties") + } + + public static var referenceName: Self { + .init(rawValue: "referenceName") + } + + public static var supportsPartyCode: Self { + .init(rawValue: "supportsPartyCode") + } + + public static var vendorIdentifier: Self { + .init(rawValue: "vendorIdentifier") + } + + public static var versions: Self { + .init(rawValue: "versions") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct GameCenterChallenges: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var allowedDurations: Self { + .init(rawValue: "allowedDurations") + } + + public static var archived: Self { + .init(rawValue: "archived") + } + + public static var challengeType: Self { + .init(rawValue: "challengeType") + } + + public static var gameCenterDetail: Self { + .init(rawValue: "gameCenterDetail") + } + + public static var gameCenterGroup: Self { + .init(rawValue: "gameCenterGroup") + } + + public static var leaderboard: Self { + .init(rawValue: "leaderboard") + } + + public static var referenceName: Self { + .init(rawValue: "referenceName") + } + + public static var repeatable: Self { + .init(rawValue: "repeatable") + } + + public static var vendorIdentifier: Self { + .init(rawValue: "vendorIdentifier") + } + + public static var versions: Self { + .init(rawValue: "versions") } + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "achievementReleases": self = .achievementReleases - case "app": self = .app - case "arcadeEnabled": self = .arcadeEnabled - case "challengeEnabled": self = .challengeEnabled - case "defaultGroupLeaderboard": self = .defaultGroupLeaderboard - case "defaultLeaderboard": self = .defaultLeaderboard - case "gameCenterAchievements": self = .gameCenterAchievements - case "gameCenterAppVersions": self = .gameCenterAppVersions - case "gameCenterGroup": self = .gameCenterGroup - case "gameCenterLeaderboardSets": self = .gameCenterLeaderboardSets - case "gameCenterLeaderboards": self = .gameCenterLeaderboards - case "leaderboardReleases": self = .leaderboardReleases - case "leaderboardSetReleases": self = .leaderboardSetReleases - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum GameCenterGroups: Hashable, Codable, RawRepresentable { - case gameCenterAchievements - case gameCenterDetails - case gameCenterLeaderboardSets - case gameCenterLeaderboards - case referenceName - case unknown(String) - - public var rawValue: String { - switch self { - case .gameCenterAchievements: return "gameCenterAchievements" - case .gameCenterDetails: return "gameCenterDetails" - case .gameCenterLeaderboardSets: return "gameCenterLeaderboardSets" - case .gameCenterLeaderboards: return "gameCenterLeaderboards" - case .referenceName: return "referenceName" - case .unknown(let rawValue): return rawValue - } + public struct GameCenterDetails: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var achievementReleases: Self { + .init(rawValue: "achievementReleases") + } + + public static var activityReleases: Self { + .init(rawValue: "activityReleases") + } + + public static var app: Self { + .init(rawValue: "app") + } + + public static var arcadeEnabled: Self { + .init(rawValue: "arcadeEnabled") + } + + public static var challengeEnabled: Self { + .init(rawValue: "challengeEnabled") + } + + public static var challengeReleases: Self { + .init(rawValue: "challengeReleases") + } + + public static var challengesMinimumPlatformVersions: Self { + .init(rawValue: "challengesMinimumPlatformVersions") + } + + public static var defaultGroupLeaderboard: Self { + .init(rawValue: "defaultGroupLeaderboard") + } + + public static var defaultLeaderboard: Self { + .init(rawValue: "defaultLeaderboard") + } + + public static var gameCenterAchievements: Self { + .init(rawValue: "gameCenterAchievements") + } + + public static var gameCenterActivities: Self { + .init(rawValue: "gameCenterActivities") + } + + public static var gameCenterAppVersions: Self { + .init(rawValue: "gameCenterAppVersions") + } + + public static var gameCenterChallenges: Self { + .init(rawValue: "gameCenterChallenges") + } + + public static var gameCenterGroup: Self { + .init(rawValue: "gameCenterGroup") + } + + public static var gameCenterLeaderboardSets: Self { + .init(rawValue: "gameCenterLeaderboardSets") + } + + public static var gameCenterLeaderboards: Self { + .init(rawValue: "gameCenterLeaderboards") + } + + public static var leaderboardReleases: Self { + .init(rawValue: "leaderboardReleases") + } + + public static var leaderboardSetReleases: Self { + .init(rawValue: "leaderboardSetReleases") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct GameCenterGroups: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var gameCenterAchievements: Self { + .init(rawValue: "gameCenterAchievements") + } + + public static var gameCenterActivities: Self { + .init(rawValue: "gameCenterActivities") + } + + public static var gameCenterChallenges: Self { + .init(rawValue: "gameCenterChallenges") + } + + public static var gameCenterDetails: Self { + .init(rawValue: "gameCenterDetails") + } + + public static var gameCenterLeaderboardSets: Self { + .init(rawValue: "gameCenterLeaderboardSets") + } + + public static var gameCenterLeaderboards: Self { + .init(rawValue: "gameCenterLeaderboards") + } + + public static var referenceName: Self { + .init(rawValue: "referenceName") } + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "gameCenterAchievements": self = .gameCenterAchievements - case "gameCenterDetails": self = .gameCenterDetails - case "gameCenterLeaderboardSets": self = .gameCenterLeaderboardSets - case "gameCenterLeaderboards": self = .gameCenterLeaderboards - case "referenceName": self = .referenceName - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum GameCenterLeaderboardLocalizations: Hashable, Codable, RawRepresentable { - case formatterOverride - case formatterSuffix - case formatterSuffixSingular - case gameCenterLeaderboard - case gameCenterLeaderboardImage - case locale - case name - case unknown(String) - - public var rawValue: String { - switch self { - case .formatterOverride: return "formatterOverride" - case .formatterSuffix: return "formatterSuffix" - case .formatterSuffixSingular: return "formatterSuffixSingular" - case .gameCenterLeaderboard: return "gameCenterLeaderboard" - case .gameCenterLeaderboardImage: return "gameCenterLeaderboardImage" - case .locale: return "locale" - case .name: return "name" - case .unknown(let rawValue): return rawValue - } + public struct GameCenterLeaderboardLocalizations: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var formatterOverride: Self { + .init(rawValue: "formatterOverride") + } + + public static var formatterSuffix: Self { + .init(rawValue: "formatterSuffix") + } + + public static var formatterSuffixSingular: Self { + .init(rawValue: "formatterSuffixSingular") + } + + public static var gameCenterLeaderboard: Self { + .init(rawValue: "gameCenterLeaderboard") + } + + public static var gameCenterLeaderboardImage: Self { + .init(rawValue: "gameCenterLeaderboardImage") } + public static var locale: Self { + .init(rawValue: "locale") + } + + public static var name: Self { + .init(rawValue: "name") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "formatterOverride": self = .formatterOverride - case "formatterSuffix": self = .formatterSuffix - case "formatterSuffixSingular": self = .formatterSuffixSingular - case "gameCenterLeaderboard": self = .gameCenterLeaderboard - case "gameCenterLeaderboardImage": self = .gameCenterLeaderboardImage - case "locale": self = .locale - case "name": self = .name - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum GameCenterLeaderboardReleases: Hashable, Codable, RawRepresentable { - case gameCenterDetail - case gameCenterLeaderboard - case live - case unknown(String) + public struct GameCenterLeaderboardReleases: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var gameCenterDetail: Self { + .init(rawValue: "gameCenterDetail") + } + + public static var gameCenterLeaderboard: Self { + .init(rawValue: "gameCenterLeaderboard") + } - public var rawValue: String { - switch self { - case .gameCenterDetail: return "gameCenterDetail" - case .gameCenterLeaderboard: return "gameCenterLeaderboard" - case .live: return "live" - case .unknown(let rawValue): return rawValue - } + public static var live: Self { + .init(rawValue: "live") } + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "gameCenterDetail": self = .gameCenterDetail - case "gameCenterLeaderboard": self = .gameCenterLeaderboard - case "live": self = .live - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum GameCenterLeaderboardSets: Hashable, Codable, RawRepresentable { - case gameCenterDetail - case gameCenterGroup - case gameCenterLeaderboards - case groupLeaderboardSet - case localizations - case referenceName - case releases - case vendorIdentifier - case unknown(String) - - public var rawValue: String { - switch self { - case .gameCenterDetail: return "gameCenterDetail" - case .gameCenterGroup: return "gameCenterGroup" - case .gameCenterLeaderboards: return "gameCenterLeaderboards" - case .groupLeaderboardSet: return "groupLeaderboardSet" - case .localizations: return "localizations" - case .referenceName: return "referenceName" - case .releases: return "releases" - case .vendorIdentifier: return "vendorIdentifier" - case .unknown(let rawValue): return rawValue - } + public struct GameCenterLeaderboardSets: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var gameCenterDetail: Self { + .init(rawValue: "gameCenterDetail") } + public static var gameCenterGroup: Self { + .init(rawValue: "gameCenterGroup") + } + + public static var gameCenterLeaderboards: Self { + .init(rawValue: "gameCenterLeaderboards") + } + + public static var groupLeaderboardSet: Self { + .init(rawValue: "groupLeaderboardSet") + } + + public static var localizations: Self { + .init(rawValue: "localizations") + } + + public static var referenceName: Self { + .init(rawValue: "referenceName") + } + + public static var releases: Self { + .init(rawValue: "releases") + } + + public static var vendorIdentifier: Self { + .init(rawValue: "vendorIdentifier") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "gameCenterDetail": self = .gameCenterDetail - case "gameCenterGroup": self = .gameCenterGroup - case "gameCenterLeaderboards": self = .gameCenterLeaderboards - case "groupLeaderboardSet": self = .groupLeaderboardSet - case "localizations": self = .localizations - case "referenceName": self = .referenceName - case "releases": self = .releases - case "vendorIdentifier": self = .vendorIdentifier - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum GameCenterLeaderboards: Hashable, Codable, RawRepresentable { - case archived - case defaultFormatter - case gameCenterDetail - case gameCenterGroup - case gameCenterLeaderboardSets - case groupLeaderboard - case localizations - case recurrenceDuration - case recurrenceRule - case recurrenceStartDate - case referenceName - case releases - case scoreRangeEnd - case scoreRangeStart - case scoreSortType - case submissionType - case vendorIdentifier - case unknown(String) - - public var rawValue: String { - switch self { - case .archived: return "archived" - case .defaultFormatter: return "defaultFormatter" - case .gameCenterDetail: return "gameCenterDetail" - case .gameCenterGroup: return "gameCenterGroup" - case .gameCenterLeaderboardSets: return "gameCenterLeaderboardSets" - case .groupLeaderboard: return "groupLeaderboard" - case .localizations: return "localizations" - case .recurrenceDuration: return "recurrenceDuration" - case .recurrenceRule: return "recurrenceRule" - case .recurrenceStartDate: return "recurrenceStartDate" - case .referenceName: return "referenceName" - case .releases: return "releases" - case .scoreRangeEnd: return "scoreRangeEnd" - case .scoreRangeStart: return "scoreRangeStart" - case .scoreSortType: return "scoreSortType" - case .submissionType: return "submissionType" - case .vendorIdentifier: return "vendorIdentifier" - case .unknown(let rawValue): return rawValue - } + public struct GameCenterLeaderboards: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var activity: Self { + .init(rawValue: "activity") + } + + public static var activityProperties: Self { + .init(rawValue: "activityProperties") + } + + public static var archived: Self { + .init(rawValue: "archived") + } + + public static var challenge: Self { + .init(rawValue: "challenge") + } + + public static var defaultFormatter: Self { + .init(rawValue: "defaultFormatter") + } + + public static var gameCenterDetail: Self { + .init(rawValue: "gameCenterDetail") + } + + public static var gameCenterGroup: Self { + .init(rawValue: "gameCenterGroup") + } + + public static var gameCenterLeaderboardSets: Self { + .init(rawValue: "gameCenterLeaderboardSets") + } + + public static var groupLeaderboard: Self { + .init(rawValue: "groupLeaderboard") + } + + public static var localizations: Self { + .init(rawValue: "localizations") + } + + public static var recurrenceDuration: Self { + .init(rawValue: "recurrenceDuration") + } + + public static var recurrenceRule: Self { + .init(rawValue: "recurrenceRule") + } + + public static var recurrenceStartDate: Self { + .init(rawValue: "recurrenceStartDate") + } + + public static var referenceName: Self { + .init(rawValue: "referenceName") + } + + public static var releases: Self { + .init(rawValue: "releases") + } + + public static var scoreRangeEnd: Self { + .init(rawValue: "scoreRangeEnd") + } + + public static var scoreRangeStart: Self { + .init(rawValue: "scoreRangeStart") } + public static var scoreSortType: Self { + .init(rawValue: "scoreSortType") + } + + public static var submissionType: Self { + .init(rawValue: "submissionType") + } + + public static var vendorIdentifier: Self { + .init(rawValue: "vendorIdentifier") + } + + public static var visibility: Self { + .init(rawValue: "visibility") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "archived": self = .archived - case "defaultFormatter": self = .defaultFormatter - case "gameCenterDetail": self = .gameCenterDetail - case "gameCenterGroup": self = .gameCenterGroup - case "gameCenterLeaderboardSets": self = .gameCenterLeaderboardSets - case "groupLeaderboard": self = .groupLeaderboard - case "localizations": self = .localizations - case "recurrenceDuration": self = .recurrenceDuration - case "recurrenceRule": self = .recurrenceRule - case "recurrenceStartDate": self = .recurrenceStartDate - case "referenceName": self = .referenceName - case "releases": self = .releases - case "scoreRangeEnd": self = .scoreRangeEnd - case "scoreRangeStart": self = .scoreRangeStart - case "scoreSortType": self = .scoreSortType - case "submissionType": self = .submissionType - case "vendorIdentifier": self = .vendorIdentifier - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } public struct Relation: Hashable { + /// the fields to include for returned resources of type gameCenterActivities + public static var gameCenterActivities: Relation<[GameCenterActivities]?> { + .init(key: "fields[gameCenterActivities]") + } + + /// the fields to include for returned resources of type gameCenterChallenges + public static var gameCenterChallenges: Relation<[GameCenterChallenges]?> { + .init(key: "fields[gameCenterChallenges]") + } + /// the fields to include for returned resources of type gameCenterDetails public static var gameCenterDetails: Relation<[GameCenterDetails]?> { .init(key: "fields[gameCenterDetails]") @@ -442,37 +653,47 @@ extension V1.GameCenterLeaderboardSets.ById.GameCenterLeaderboards.GET { } } - public enum Include: Hashable, Codable, RawRepresentable { - case gameCenterDetail - case gameCenterGroup - case gameCenterLeaderboardSets - case groupLeaderboard - case localizations - case releases - case unknown(String) - - public var rawValue: String { - switch self { - case .gameCenterDetail: return "gameCenterDetail" - case .gameCenterGroup: return "gameCenterGroup" - case .gameCenterLeaderboardSets: return "gameCenterLeaderboardSets" - case .groupLeaderboard: return "groupLeaderboard" - case .localizations: return "localizations" - case .releases: return "releases" - case .unknown(let rawValue): return rawValue - } + public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var activity: Self { + .init(rawValue: "activity") + } + + public static var challenge: Self { + .init(rawValue: "challenge") } + public static var gameCenterDetail: Self { + .init(rawValue: "gameCenterDetail") + } + + public static var gameCenterGroup: Self { + .init(rawValue: "gameCenterGroup") + } + + public static var gameCenterLeaderboardSets: Self { + .init(rawValue: "gameCenterLeaderboardSets") + } + + public static var groupLeaderboard: Self { + .init(rawValue: "groupLeaderboard") + } + + public static var localizations: Self { + .init(rawValue: "localizations") + } + + public static var releases: Self { + .init(rawValue: "releases") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "gameCenterDetail": self = .gameCenterDetail - case "gameCenterGroup": self = .gameCenterGroup - case "gameCenterLeaderboardSets": self = .gameCenterLeaderboardSets - case "groupLeaderboard": self = .groupLeaderboard - case "localizations": self = .localizations - case "releases": self = .releases - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterLeaderboardSets/ById/GroupLeaderboardSet/GameCenterLeaderboardSetsByIdGroupLeaderboardSet.GET.ddc5a04.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterLeaderboardSets/ById/GroupLeaderboardSet/GameCenterLeaderboardSetsByIdGroupLeaderboardSet.GET.ddc5a04.generated.swift index 773ffe69..396e7c7f 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterLeaderboardSets/ById/GroupLeaderboardSet/GameCenterLeaderboardSetsByIdGroupLeaderboardSet.GET.ddc5a04.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterLeaderboardSets/ById/GroupLeaderboardSet/GameCenterLeaderboardSetsByIdGroupLeaderboardSet.GET.ddc5a04.generated.swift @@ -7,6 +7,7 @@ import FoundationNetworking #endif extension V1.GameCenterLeaderboardSets.ById.GroupLeaderboardSet { + @available(*, deprecated) public struct GET: Endpoint { public typealias Response = GameCenterLeaderboardSetResponse @@ -60,8 +61,10 @@ extension V1.GameCenterLeaderboardSets.ById.GroupLeaderboardSet { /// - Returns: **200**, Single GameCenterLeaderboardSet as `GameCenterLeaderboardSetResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -75,12 +78,18 @@ extension V1.GameCenterLeaderboardSets.ById.GroupLeaderboardSet { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 404: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -105,249 +114,319 @@ extension V1.GameCenterLeaderboardSets.ById.GroupLeaderboardSet.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum GameCenterDetails: Hashable, Codable, RawRepresentable { - case achievementReleases - case app - case arcadeEnabled - case challengeEnabled - case defaultGroupLeaderboard - case defaultLeaderboard - case gameCenterAchievements - case gameCenterAppVersions - case gameCenterGroup - case gameCenterLeaderboardSets - case gameCenterLeaderboards - case leaderboardReleases - case leaderboardSetReleases - case unknown(String) - - public var rawValue: String { - switch self { - case .achievementReleases: return "achievementReleases" - case .app: return "app" - case .arcadeEnabled: return "arcadeEnabled" - case .challengeEnabled: return "challengeEnabled" - case .defaultGroupLeaderboard: return "defaultGroupLeaderboard" - case .defaultLeaderboard: return "defaultLeaderboard" - case .gameCenterAchievements: return "gameCenterAchievements" - case .gameCenterAppVersions: return "gameCenterAppVersions" - case .gameCenterGroup: return "gameCenterGroup" - case .gameCenterLeaderboardSets: return "gameCenterLeaderboardSets" - case .gameCenterLeaderboards: return "gameCenterLeaderboards" - case .leaderboardReleases: return "leaderboardReleases" - case .leaderboardSetReleases: return "leaderboardSetReleases" - case .unknown(let rawValue): return rawValue - } + public struct GameCenterDetails: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var achievementReleases: Self { + .init(rawValue: "achievementReleases") + } + + public static var activityReleases: Self { + .init(rawValue: "activityReleases") + } + + public static var app: Self { + .init(rawValue: "app") + } + + public static var arcadeEnabled: Self { + .init(rawValue: "arcadeEnabled") } + public static var challengeEnabled: Self { + .init(rawValue: "challengeEnabled") + } + + public static var challengeReleases: Self { + .init(rawValue: "challengeReleases") + } + + public static var challengesMinimumPlatformVersions: Self { + .init(rawValue: "challengesMinimumPlatformVersions") + } + + public static var defaultGroupLeaderboard: Self { + .init(rawValue: "defaultGroupLeaderboard") + } + + public static var defaultLeaderboard: Self { + .init(rawValue: "defaultLeaderboard") + } + + public static var gameCenterAchievements: Self { + .init(rawValue: "gameCenterAchievements") + } + + public static var gameCenterActivities: Self { + .init(rawValue: "gameCenterActivities") + } + + public static var gameCenterAppVersions: Self { + .init(rawValue: "gameCenterAppVersions") + } + + public static var gameCenterChallenges: Self { + .init(rawValue: "gameCenterChallenges") + } + + public static var gameCenterGroup: Self { + .init(rawValue: "gameCenterGroup") + } + + public static var gameCenterLeaderboardSets: Self { + .init(rawValue: "gameCenterLeaderboardSets") + } + + public static var gameCenterLeaderboards: Self { + .init(rawValue: "gameCenterLeaderboards") + } + + public static var leaderboardReleases: Self { + .init(rawValue: "leaderboardReleases") + } + + public static var leaderboardSetReleases: Self { + .init(rawValue: "leaderboardSetReleases") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "achievementReleases": self = .achievementReleases - case "app": self = .app - case "arcadeEnabled": self = .arcadeEnabled - case "challengeEnabled": self = .challengeEnabled - case "defaultGroupLeaderboard": self = .defaultGroupLeaderboard - case "defaultLeaderboard": self = .defaultLeaderboard - case "gameCenterAchievements": self = .gameCenterAchievements - case "gameCenterAppVersions": self = .gameCenterAppVersions - case "gameCenterGroup": self = .gameCenterGroup - case "gameCenterLeaderboardSets": self = .gameCenterLeaderboardSets - case "gameCenterLeaderboards": self = .gameCenterLeaderboards - case "leaderboardReleases": self = .leaderboardReleases - case "leaderboardSetReleases": self = .leaderboardSetReleases - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum GameCenterGroups: Hashable, Codable, RawRepresentable { - case gameCenterAchievements - case gameCenterDetails - case gameCenterLeaderboardSets - case gameCenterLeaderboards - case referenceName - case unknown(String) - - public var rawValue: String { - switch self { - case .gameCenterAchievements: return "gameCenterAchievements" - case .gameCenterDetails: return "gameCenterDetails" - case .gameCenterLeaderboardSets: return "gameCenterLeaderboardSets" - case .gameCenterLeaderboards: return "gameCenterLeaderboards" - case .referenceName: return "referenceName" - case .unknown(let rawValue): return rawValue - } + public struct GameCenterGroups: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var gameCenterAchievements: Self { + .init(rawValue: "gameCenterAchievements") + } + + public static var gameCenterActivities: Self { + .init(rawValue: "gameCenterActivities") + } + + public static var gameCenterChallenges: Self { + .init(rawValue: "gameCenterChallenges") + } + + public static var gameCenterDetails: Self { + .init(rawValue: "gameCenterDetails") + } + + public static var gameCenterLeaderboardSets: Self { + .init(rawValue: "gameCenterLeaderboardSets") + } + + public static var gameCenterLeaderboards: Self { + .init(rawValue: "gameCenterLeaderboards") + } + + public static var referenceName: Self { + .init(rawValue: "referenceName") + } + + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "gameCenterAchievements": self = .gameCenterAchievements - case "gameCenterDetails": self = .gameCenterDetails - case "gameCenterLeaderboardSets": self = .gameCenterLeaderboardSets - case "gameCenterLeaderboards": self = .gameCenterLeaderboards - case "referenceName": self = .referenceName - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum GameCenterLeaderboardSetLocalizations: Hashable, Codable, RawRepresentable { - case gameCenterLeaderboardSet - case gameCenterLeaderboardSetImage - case locale - case name - case unknown(String) + public struct GameCenterLeaderboardSetLocalizations: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var gameCenterLeaderboardSet: Self { + .init(rawValue: "gameCenterLeaderboardSet") + } - public var rawValue: String { - switch self { - case .gameCenterLeaderboardSet: return "gameCenterLeaderboardSet" - case .gameCenterLeaderboardSetImage: return "gameCenterLeaderboardSetImage" - case .locale: return "locale" - case .name: return "name" - case .unknown(let rawValue): return rawValue - } + public static var gameCenterLeaderboardSetImage: Self { + .init(rawValue: "gameCenterLeaderboardSetImage") } + public static var locale: Self { + .init(rawValue: "locale") + } + + public static var name: Self { + .init(rawValue: "name") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "gameCenterLeaderboardSet": self = .gameCenterLeaderboardSet - case "gameCenterLeaderboardSetImage": self = .gameCenterLeaderboardSetImage - case "locale": self = .locale - case "name": self = .name - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum GameCenterLeaderboardSetReleases: Hashable, Codable, RawRepresentable { - case gameCenterDetail - case gameCenterLeaderboardSet - case live - case unknown(String) + public struct GameCenterLeaderboardSetReleases: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var gameCenterDetail: Self { + .init(rawValue: "gameCenterDetail") + } + + public static var gameCenterLeaderboardSet: Self { + .init(rawValue: "gameCenterLeaderboardSet") + } + + public static var live: Self { + .init(rawValue: "live") + } - public var rawValue: String { - switch self { - case .gameCenterDetail: return "gameCenterDetail" - case .gameCenterLeaderboardSet: return "gameCenterLeaderboardSet" - case .live: return "live" - case .unknown(let rawValue): return rawValue - } + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "gameCenterDetail": self = .gameCenterDetail - case "gameCenterLeaderboardSet": self = .gameCenterLeaderboardSet - case "live": self = .live - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum GameCenterLeaderboardSets: Hashable, Codable, RawRepresentable { - case gameCenterDetail - case gameCenterGroup - case gameCenterLeaderboards - case groupLeaderboardSet - case localizations - case referenceName - case releases - case vendorIdentifier - case unknown(String) - - public var rawValue: String { - switch self { - case .gameCenterDetail: return "gameCenterDetail" - case .gameCenterGroup: return "gameCenterGroup" - case .gameCenterLeaderboards: return "gameCenterLeaderboards" - case .groupLeaderboardSet: return "groupLeaderboardSet" - case .localizations: return "localizations" - case .referenceName: return "referenceName" - case .releases: return "releases" - case .vendorIdentifier: return "vendorIdentifier" - case .unknown(let rawValue): return rawValue - } + public struct GameCenterLeaderboardSets: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var gameCenterDetail: Self { + .init(rawValue: "gameCenterDetail") + } + + public static var gameCenterGroup: Self { + .init(rawValue: "gameCenterGroup") } + public static var gameCenterLeaderboards: Self { + .init(rawValue: "gameCenterLeaderboards") + } + + public static var groupLeaderboardSet: Self { + .init(rawValue: "groupLeaderboardSet") + } + + public static var localizations: Self { + .init(rawValue: "localizations") + } + + public static var referenceName: Self { + .init(rawValue: "referenceName") + } + + public static var releases: Self { + .init(rawValue: "releases") + } + + public static var vendorIdentifier: Self { + .init(rawValue: "vendorIdentifier") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "gameCenterDetail": self = .gameCenterDetail - case "gameCenterGroup": self = .gameCenterGroup - case "gameCenterLeaderboards": self = .gameCenterLeaderboards - case "groupLeaderboardSet": self = .groupLeaderboardSet - case "localizations": self = .localizations - case "referenceName": self = .referenceName - case "releases": self = .releases - case "vendorIdentifier": self = .vendorIdentifier - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum GameCenterLeaderboards: Hashable, Codable, RawRepresentable { - case archived - case defaultFormatter - case gameCenterDetail - case gameCenterGroup - case gameCenterLeaderboardSets - case groupLeaderboard - case localizations - case recurrenceDuration - case recurrenceRule - case recurrenceStartDate - case referenceName - case releases - case scoreRangeEnd - case scoreRangeStart - case scoreSortType - case submissionType - case vendorIdentifier - case unknown(String) - - public var rawValue: String { - switch self { - case .archived: return "archived" - case .defaultFormatter: return "defaultFormatter" - case .gameCenterDetail: return "gameCenterDetail" - case .gameCenterGroup: return "gameCenterGroup" - case .gameCenterLeaderboardSets: return "gameCenterLeaderboardSets" - case .groupLeaderboard: return "groupLeaderboard" - case .localizations: return "localizations" - case .recurrenceDuration: return "recurrenceDuration" - case .recurrenceRule: return "recurrenceRule" - case .recurrenceStartDate: return "recurrenceStartDate" - case .referenceName: return "referenceName" - case .releases: return "releases" - case .scoreRangeEnd: return "scoreRangeEnd" - case .scoreRangeStart: return "scoreRangeStart" - case .scoreSortType: return "scoreSortType" - case .submissionType: return "submissionType" - case .vendorIdentifier: return "vendorIdentifier" - case .unknown(let rawValue): return rawValue - } + public struct GameCenterLeaderboards: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var activity: Self { + .init(rawValue: "activity") + } + + public static var activityProperties: Self { + .init(rawValue: "activityProperties") + } + + public static var archived: Self { + .init(rawValue: "archived") + } + + public static var challenge: Self { + .init(rawValue: "challenge") + } + + public static var defaultFormatter: Self { + .init(rawValue: "defaultFormatter") + } + + public static var gameCenterDetail: Self { + .init(rawValue: "gameCenterDetail") + } + + public static var gameCenterGroup: Self { + .init(rawValue: "gameCenterGroup") + } + + public static var gameCenterLeaderboardSets: Self { + .init(rawValue: "gameCenterLeaderboardSets") + } + + public static var groupLeaderboard: Self { + .init(rawValue: "groupLeaderboard") + } + + public static var localizations: Self { + .init(rawValue: "localizations") + } + + public static var recurrenceDuration: Self { + .init(rawValue: "recurrenceDuration") + } + + public static var recurrenceRule: Self { + .init(rawValue: "recurrenceRule") } + public static var recurrenceStartDate: Self { + .init(rawValue: "recurrenceStartDate") + } + + public static var referenceName: Self { + .init(rawValue: "referenceName") + } + + public static var releases: Self { + .init(rawValue: "releases") + } + + public static var scoreRangeEnd: Self { + .init(rawValue: "scoreRangeEnd") + } + + public static var scoreRangeStart: Self { + .init(rawValue: "scoreRangeStart") + } + + public static var scoreSortType: Self { + .init(rawValue: "scoreSortType") + } + + public static var submissionType: Self { + .init(rawValue: "submissionType") + } + + public static var vendorIdentifier: Self { + .init(rawValue: "vendorIdentifier") + } + + public static var visibility: Self { + .init(rawValue: "visibility") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "archived": self = .archived - case "defaultFormatter": self = .defaultFormatter - case "gameCenterDetail": self = .gameCenterDetail - case "gameCenterGroup": self = .gameCenterGroup - case "gameCenterLeaderboardSets": self = .gameCenterLeaderboardSets - case "groupLeaderboard": self = .groupLeaderboard - case "localizations": self = .localizations - case "recurrenceDuration": self = .recurrenceDuration - case "recurrenceRule": self = .recurrenceRule - case "recurrenceStartDate": self = .recurrenceStartDate - case "referenceName": self = .referenceName - case "releases": self = .releases - case "scoreRangeEnd": self = .scoreRangeEnd - case "scoreRangeStart": self = .scoreRangeStart - case "scoreSortType": self = .scoreSortType - case "submissionType": self = .submissionType - case "vendorIdentifier": self = .vendorIdentifier - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } @@ -390,37 +469,39 @@ extension V1.GameCenterLeaderboardSets.ById.GroupLeaderboardSet.GET { } } - public enum Include: Hashable, Codable, RawRepresentable { - case gameCenterDetail - case gameCenterGroup - case gameCenterLeaderboards - case groupLeaderboardSet - case localizations - case releases - case unknown(String) - - public var rawValue: String { - switch self { - case .gameCenterDetail: return "gameCenterDetail" - case .gameCenterGroup: return "gameCenterGroup" - case .gameCenterLeaderboards: return "gameCenterLeaderboards" - case .groupLeaderboardSet: return "groupLeaderboardSet" - case .localizations: return "localizations" - case .releases: return "releases" - case .unknown(let rawValue): return rawValue - } + public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var gameCenterDetail: Self { + .init(rawValue: "gameCenterDetail") + } + + public static var gameCenterGroup: Self { + .init(rawValue: "gameCenterGroup") + } + + public static var gameCenterLeaderboards: Self { + .init(rawValue: "gameCenterLeaderboards") + } + + public static var groupLeaderboardSet: Self { + .init(rawValue: "groupLeaderboardSet") + } + + public static var localizations: Self { + .init(rawValue: "localizations") + } + + public static var releases: Self { + .init(rawValue: "releases") } + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "gameCenterDetail": self = .gameCenterDetail - case "gameCenterGroup": self = .gameCenterGroup - case "gameCenterLeaderboards": self = .gameCenterLeaderboards - case "groupLeaderboardSet": self = .groupLeaderboardSet - case "localizations": self = .localizations - case "releases": self = .releases - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterLeaderboardSets/ById/Localizations/GameCenterLeaderboardSetsByIdLocalizations.GET.28f9cb6.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterLeaderboardSets/ById/Localizations/GameCenterLeaderboardSetsByIdLocalizations.GET.28f9cb6.generated.swift index b50cde83..fa1f91a6 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterLeaderboardSets/ById/Localizations/GameCenterLeaderboardSetsByIdLocalizations.GET.28f9cb6.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterLeaderboardSets/ById/Localizations/GameCenterLeaderboardSetsByIdLocalizations.GET.28f9cb6.generated.swift @@ -50,8 +50,10 @@ extension V1.GameCenterLeaderboardSets.ById.Localizations { /// - Returns: **200**, List of GameCenterLeaderboardSetLocalizations as `GameCenterLeaderboardSetLocalizationsResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -65,12 +67,18 @@ extension V1.GameCenterLeaderboardSets.ById.Localizations { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 404: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -96,108 +104,111 @@ extension V1.GameCenterLeaderboardSets.ById.Localizations.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum GameCenterLeaderboardSetImages: Hashable, Codable, RawRepresentable { - case assetDeliveryState - case fileName - case fileSize - case gameCenterLeaderboardSetLocalization - case imageAsset - case uploadOperations - case uploaded - case unknown(String) - - public var rawValue: String { - switch self { - case .assetDeliveryState: return "assetDeliveryState" - case .fileName: return "fileName" - case .fileSize: return "fileSize" - case .gameCenterLeaderboardSetLocalization: return "gameCenterLeaderboardSetLocalization" - case .imageAsset: return "imageAsset" - case .uploadOperations: return "uploadOperations" - case .uploaded: return "uploaded" - case .unknown(let rawValue): return rawValue - } + public struct GameCenterLeaderboardSetImages: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var assetDeliveryState: Self { + .init(rawValue: "assetDeliveryState") + } + + public static var fileName: Self { + .init(rawValue: "fileName") + } + + public static var fileSize: Self { + .init(rawValue: "fileSize") + } + + public static var gameCenterLeaderboardSetLocalization: Self { + .init(rawValue: "gameCenterLeaderboardSetLocalization") + } + + public static var imageAsset: Self { + .init(rawValue: "imageAsset") } + public static var uploadOperations: Self { + .init(rawValue: "uploadOperations") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "assetDeliveryState": self = .assetDeliveryState - case "fileName": self = .fileName - case "fileSize": self = .fileSize - case "gameCenterLeaderboardSetLocalization": self = .gameCenterLeaderboardSetLocalization - case "imageAsset": self = .imageAsset - case "uploadOperations": self = .uploadOperations - case "uploaded": self = .uploaded - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum GameCenterLeaderboardSetLocalizations: Hashable, Codable, RawRepresentable { - case gameCenterLeaderboardSet - case gameCenterLeaderboardSetImage - case locale - case name - case unknown(String) + public struct GameCenterLeaderboardSetLocalizations: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var gameCenterLeaderboardSet: Self { + .init(rawValue: "gameCenterLeaderboardSet") + } + + public static var gameCenterLeaderboardSetImage: Self { + .init(rawValue: "gameCenterLeaderboardSetImage") + } + + public static var locale: Self { + .init(rawValue: "locale") + } + + public static var name: Self { + .init(rawValue: "name") + } - public var rawValue: String { - switch self { - case .gameCenterLeaderboardSet: return "gameCenterLeaderboardSet" - case .gameCenterLeaderboardSetImage: return "gameCenterLeaderboardSetImage" - case .locale: return "locale" - case .name: return "name" - case .unknown(let rawValue): return rawValue - } + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "gameCenterLeaderboardSet": self = .gameCenterLeaderboardSet - case "gameCenterLeaderboardSetImage": self = .gameCenterLeaderboardSetImage - case "locale": self = .locale - case "name": self = .name - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum GameCenterLeaderboardSets: Hashable, Codable, RawRepresentable { - case gameCenterDetail - case gameCenterGroup - case gameCenterLeaderboards - case groupLeaderboardSet - case localizations - case referenceName - case releases - case vendorIdentifier - case unknown(String) - - public var rawValue: String { - switch self { - case .gameCenterDetail: return "gameCenterDetail" - case .gameCenterGroup: return "gameCenterGroup" - case .gameCenterLeaderboards: return "gameCenterLeaderboards" - case .groupLeaderboardSet: return "groupLeaderboardSet" - case .localizations: return "localizations" - case .referenceName: return "referenceName" - case .releases: return "releases" - case .vendorIdentifier: return "vendorIdentifier" - case .unknown(let rawValue): return rawValue - } + public struct GameCenterLeaderboardSets: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var gameCenterDetail: Self { + .init(rawValue: "gameCenterDetail") + } + + public static var gameCenterGroup: Self { + .init(rawValue: "gameCenterGroup") + } + + public static var gameCenterLeaderboards: Self { + .init(rawValue: "gameCenterLeaderboards") + } + + public static var groupLeaderboardSet: Self { + .init(rawValue: "groupLeaderboardSet") + } + + public static var localizations: Self { + .init(rawValue: "localizations") + } + + public static var referenceName: Self { + .init(rawValue: "referenceName") + } + + public static var releases: Self { + .init(rawValue: "releases") + } + + public static var vendorIdentifier: Self { + .init(rawValue: "vendorIdentifier") } + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "gameCenterDetail": self = .gameCenterDetail - case "gameCenterGroup": self = .gameCenterGroup - case "gameCenterLeaderboards": self = .gameCenterLeaderboards - case "groupLeaderboardSet": self = .groupLeaderboardSet - case "localizations": self = .localizations - case "referenceName": self = .referenceName - case "releases": self = .releases - case "vendorIdentifier": self = .vendorIdentifier - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } @@ -225,25 +236,23 @@ extension V1.GameCenterLeaderboardSets.ById.Localizations.GET { } } - public enum Include: Hashable, Codable, RawRepresentable { - case gameCenterLeaderboardSet - case gameCenterLeaderboardSetImage - case unknown(String) + public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var gameCenterLeaderboardSet: Self { + .init(rawValue: "gameCenterLeaderboardSet") + } - public var rawValue: String { - switch self { - case .gameCenterLeaderboardSet: return "gameCenterLeaderboardSet" - case .gameCenterLeaderboardSetImage: return "gameCenterLeaderboardSetImage" - case .unknown(let rawValue): return rawValue - } + public static var gameCenterLeaderboardSetImage: Self { + .init(rawValue: "gameCenterLeaderboardSetImage") + } + + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "gameCenterLeaderboardSet": self = .gameCenterLeaderboardSet - case "gameCenterLeaderboardSetImage": self = .gameCenterLeaderboardSetImage - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterLeaderboardSets/ById/Relationships/GameCenterLeaderboards/GameCenterLeaderboardSetsByIdRelationshipsGameCenterLeaderboards.DELETE.048f1ad.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterLeaderboardSets/ById/Relationships/GameCenterLeaderboards/GameCenterLeaderboardSetsByIdRelationshipsGameCenterLeaderboards.DELETE.048f1ad.generated.swift index 8884407e..353d2d58 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterLeaderboardSets/ById/Relationships/GameCenterLeaderboards/GameCenterLeaderboardSetsByIdRelationshipsGameCenterLeaderboards.DELETE.048f1ad.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterLeaderboardSets/ById/Relationships/GameCenterLeaderboards/GameCenterLeaderboardSetsByIdRelationshipsGameCenterLeaderboards.DELETE.048f1ad.generated.swift @@ -31,10 +31,12 @@ extension V1.GameCenterLeaderboardSets.ById.Relationships.GameCenterLeaderboards return urlRequest } - /// - Returns: **204**, Success (no content) + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **422**, Unprocessable request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -42,8 +44,8 @@ extension V1.GameCenterLeaderboardSets.ById.Relationships.GameCenterLeaderboards } switch urlResponse.statusCode { - case 204: - return + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) @@ -54,6 +56,12 @@ extension V1.GameCenterLeaderboardSets.ById.Relationships.GameCenterLeaderboards case 409: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 422: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterLeaderboardSets/ById/Relationships/GameCenterLeaderboards/GameCenterLeaderboardSetsByIdRelationshipsGameCenterLeaderboards.GET.048f1ad.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterLeaderboardSets/ById/Relationships/GameCenterLeaderboards/GameCenterLeaderboardSetsByIdRelationshipsGameCenterLeaderboards.GET.048f1ad.generated.swift index 7848e5c0..44efdd64 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterLeaderboardSets/ById/Relationships/GameCenterLeaderboards/GameCenterLeaderboardSetsByIdRelationshipsGameCenterLeaderboards.GET.048f1ad.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterLeaderboardSets/ById/Relationships/GameCenterLeaderboards/GameCenterLeaderboardSetsByIdRelationshipsGameCenterLeaderboards.GET.048f1ad.generated.swift @@ -42,8 +42,10 @@ extension V1.GameCenterLeaderboardSets.ById.Relationships.GameCenterLeaderboards /// - Returns: **200**, List of related linkages as `GameCenterLeaderboardSetGameCenterLeaderboardsLinkagesResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -57,12 +59,18 @@ extension V1.GameCenterLeaderboardSets.ById.Relationships.GameCenterLeaderboards case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 404: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterLeaderboardSets/ById/Relationships/GameCenterLeaderboards/GameCenterLeaderboardSetsByIdRelationshipsGameCenterLeaderboards.PATCH.048f1ad.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterLeaderboardSets/ById/Relationships/GameCenterLeaderboards/GameCenterLeaderboardSetsByIdRelationshipsGameCenterLeaderboards.PATCH.048f1ad.generated.swift index b30e038e..fbadf38c 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterLeaderboardSets/ById/Relationships/GameCenterLeaderboards/GameCenterLeaderboardSetsByIdRelationshipsGameCenterLeaderboards.PATCH.048f1ad.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterLeaderboardSets/ById/Relationships/GameCenterLeaderboards/GameCenterLeaderboardSetsByIdRelationshipsGameCenterLeaderboards.PATCH.048f1ad.generated.swift @@ -46,10 +46,12 @@ extension V1.GameCenterLeaderboardSets.ById.Relationships.GameCenterLeaderboards return urlRequest } - /// - Returns: **204**, Success (no content) + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **422**, Unprocessable request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -57,8 +59,8 @@ extension V1.GameCenterLeaderboardSets.ById.Relationships.GameCenterLeaderboards } switch urlResponse.statusCode { - case 204: - return + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) @@ -69,6 +71,12 @@ extension V1.GameCenterLeaderboardSets.ById.Relationships.GameCenterLeaderboards case 409: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 422: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterLeaderboardSets/ById/Relationships/GameCenterLeaderboards/GameCenterLeaderboardSetsByIdRelationshipsGameCenterLeaderboards.POST.048f1ad.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterLeaderboardSets/ById/Relationships/GameCenterLeaderboards/GameCenterLeaderboardSetsByIdRelationshipsGameCenterLeaderboards.POST.048f1ad.generated.swift index 59fcbc3d..9e3bd46c 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterLeaderboardSets/ById/Relationships/GameCenterLeaderboards/GameCenterLeaderboardSetsByIdRelationshipsGameCenterLeaderboards.POST.048f1ad.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterLeaderboardSets/ById/Relationships/GameCenterLeaderboards/GameCenterLeaderboardSetsByIdRelationshipsGameCenterLeaderboards.POST.048f1ad.generated.swift @@ -46,10 +46,12 @@ extension V1.GameCenterLeaderboardSets.ById.Relationships.GameCenterLeaderboards return urlRequest } - /// - Returns: **204**, Success (no content) + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **422**, Unprocessable request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -57,8 +59,8 @@ extension V1.GameCenterLeaderboardSets.ById.Relationships.GameCenterLeaderboards } switch urlResponse.statusCode { - case 204: - return + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) @@ -69,6 +71,12 @@ extension V1.GameCenterLeaderboardSets.ById.Relationships.GameCenterLeaderboards case 409: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 422: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterLeaderboardSets/ById/Relationships/GroupLeaderboardSet/GameCenterLeaderboardSetsByIdRelationshipsGroupLeaderboardSet.GET.67e0c36.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterLeaderboardSets/ById/Relationships/GroupLeaderboardSet/GameCenterLeaderboardSetsByIdRelationshipsGroupLeaderboardSet.GET.67e0c36.generated.swift index 5a6a8f0f..84707051 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterLeaderboardSets/ById/Relationships/GroupLeaderboardSet/GameCenterLeaderboardSetsByIdRelationshipsGroupLeaderboardSet.GET.67e0c36.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterLeaderboardSets/ById/Relationships/GroupLeaderboardSet/GameCenterLeaderboardSetsByIdRelationshipsGroupLeaderboardSet.GET.67e0c36.generated.swift @@ -7,6 +7,7 @@ import FoundationNetworking #endif extension V1.GameCenterLeaderboardSets.ById.Relationships.GroupLeaderboardSet { + @available(*, deprecated) public struct GET: Endpoint { public typealias Response = GameCenterLeaderboardSetGroupLeaderboardSetLinkageResponse @@ -41,8 +42,10 @@ extension V1.GameCenterLeaderboardSets.ById.Relationships.GroupLeaderboardSet { /// - Returns: **200**, Related linkage as `GameCenterLeaderboardSetGroupLeaderboardSetLinkageResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -56,12 +59,18 @@ extension V1.GameCenterLeaderboardSets.ById.Relationships.GroupLeaderboardSet { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 404: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterLeaderboardSets/ById/Relationships/GroupLeaderboardSet/GameCenterLeaderboardSetsByIdRelationshipsGroupLeaderboardSet.PATCH.67e0c36.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterLeaderboardSets/ById/Relationships/GroupLeaderboardSet/GameCenterLeaderboardSetsByIdRelationshipsGroupLeaderboardSet.PATCH.67e0c36.generated.swift index 1cfb509a..b6ebb68c 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterLeaderboardSets/ById/Relationships/GroupLeaderboardSet/GameCenterLeaderboardSetsByIdRelationshipsGroupLeaderboardSet.PATCH.67e0c36.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterLeaderboardSets/ById/Relationships/GroupLeaderboardSet/GameCenterLeaderboardSetsByIdRelationshipsGroupLeaderboardSet.PATCH.67e0c36.generated.swift @@ -7,6 +7,7 @@ import FoundationNetworking #endif extension V1.GameCenterLeaderboardSets.ById.Relationships.GroupLeaderboardSet { + @available(*, deprecated) public struct PATCH: Endpoint { public typealias Parameters = GameCenterLeaderboardSetGroupLeaderboardSetLinkageRequest public typealias Response = Void @@ -46,10 +47,12 @@ extension V1.GameCenterLeaderboardSets.ById.Relationships.GroupLeaderboardSet { return urlRequest } - /// - Returns: **204**, Success (no content) + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **422**, Unprocessable request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -57,8 +60,8 @@ extension V1.GameCenterLeaderboardSets.ById.Relationships.GroupLeaderboardSet { } switch urlResponse.statusCode { - case 204: - return + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) @@ -69,6 +72,12 @@ extension V1.GameCenterLeaderboardSets.ById.Relationships.GroupLeaderboardSet { case 409: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 422: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterLeaderboardSets/ById/Relationships/Localizations/GameCenterLeaderboardSetsByIdRelationshipsLocalizations.GET.aefd59c.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterLeaderboardSets/ById/Relationships/Localizations/GameCenterLeaderboardSetsByIdRelationshipsLocalizations.GET.aefd59c.generated.swift new file mode 100644 index 00000000..9337778b --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterLeaderboardSets/ById/Relationships/Localizations/GameCenterLeaderboardSetsByIdRelationshipsLocalizations.GET.aefd59c.generated.swift @@ -0,0 +1,88 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.GameCenterLeaderboardSets.ById.Relationships.Localizations { + public struct GET: Endpoint { + public typealias Response = GameCenterLeaderboardSetLocalizationsLinkagesResponse + + public var path: String { + "/v1/gameCenterLeaderboardSets/\(id)/relationships/localizations" + } + + /// the id of the requested resource + public var id: String + + public var parameters: Parameters = Parameters() + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + components?.queryItems = [ + URLQueryItem(name: "limit", + value: parameters.limit.map { "\($0)" }) + ].filter { $0.value != nil } + if components?.queryItems?.isEmpty ?? false { + components?.queryItems = nil + } + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "GET" + return urlRequest + } + + /// - Returns: **200**, List of related linkages as `GameCenterLeaderboardSetLocalizationsLinkagesResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(GameCenterLeaderboardSetLocalizationsLinkagesResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +extension V1.GameCenterLeaderboardSets.ById.Relationships.Localizations.GET { + public struct Parameters: Hashable { + /// maximum resources per page + public var limit: Int? + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterLeaderboardSets/ById/Relationships/Releases/GameCenterLeaderboardSetsByIdRelationshipsReleases.GET.5d777b2.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterLeaderboardSets/ById/Relationships/Releases/GameCenterLeaderboardSetsByIdRelationshipsReleases.GET.5d777b2.generated.swift new file mode 100644 index 00000000..9092b9d9 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterLeaderboardSets/ById/Relationships/Releases/GameCenterLeaderboardSetsByIdRelationshipsReleases.GET.5d777b2.generated.swift @@ -0,0 +1,88 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.GameCenterLeaderboardSets.ById.Relationships.Releases { + public struct GET: Endpoint { + public typealias Response = GameCenterLeaderboardSetReleasesLinkagesResponse + + public var path: String { + "/v1/gameCenterLeaderboardSets/\(id)/relationships/releases" + } + + /// the id of the requested resource + public var id: String + + public var parameters: Parameters = Parameters() + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + components?.queryItems = [ + URLQueryItem(name: "limit", + value: parameters.limit.map { "\($0)" }) + ].filter { $0.value != nil } + if components?.queryItems?.isEmpty ?? false { + components?.queryItems = nil + } + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "GET" + return urlRequest + } + + /// - Returns: **200**, List of related linkages as `GameCenterLeaderboardSetReleasesLinkagesResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(GameCenterLeaderboardSetReleasesLinkagesResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +extension V1.GameCenterLeaderboardSets.ById.Relationships.Releases.GET { + public struct Parameters: Hashable { + /// maximum resources per page + public var limit: Int? + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterLeaderboardSets/ById/Releases/GameCenterLeaderboardSetsByIdReleases.GET.9a8ef38.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterLeaderboardSets/ById/Releases/GameCenterLeaderboardSetsByIdReleases.GET.9a8ef38.generated.swift index 6979ce6a..dafbf1a6 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterLeaderboardSets/ById/Releases/GameCenterLeaderboardSetsByIdReleases.GET.9a8ef38.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterLeaderboardSets/ById/Releases/GameCenterLeaderboardSetsByIdReleases.GET.9a8ef38.generated.swift @@ -54,8 +54,10 @@ extension V1.GameCenterLeaderboardSets.ById.Releases { /// - Returns: **200**, List of GameCenterLeaderboardSetReleases as `GameCenterLeaderboardSetReleasesResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -69,12 +71,18 @@ extension V1.GameCenterLeaderboardSets.ById.Releases { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 404: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -102,123 +110,155 @@ extension V1.GameCenterLeaderboardSets.ById.Releases.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum GameCenterDetails: Hashable, Codable, RawRepresentable { - case achievementReleases - case app - case arcadeEnabled - case challengeEnabled - case defaultGroupLeaderboard - case defaultLeaderboard - case gameCenterAchievements - case gameCenterAppVersions - case gameCenterGroup - case gameCenterLeaderboardSets - case gameCenterLeaderboards - case leaderboardReleases - case leaderboardSetReleases - case unknown(String) - - public var rawValue: String { - switch self { - case .achievementReleases: return "achievementReleases" - case .app: return "app" - case .arcadeEnabled: return "arcadeEnabled" - case .challengeEnabled: return "challengeEnabled" - case .defaultGroupLeaderboard: return "defaultGroupLeaderboard" - case .defaultLeaderboard: return "defaultLeaderboard" - case .gameCenterAchievements: return "gameCenterAchievements" - case .gameCenterAppVersions: return "gameCenterAppVersions" - case .gameCenterGroup: return "gameCenterGroup" - case .gameCenterLeaderboardSets: return "gameCenterLeaderboardSets" - case .gameCenterLeaderboards: return "gameCenterLeaderboards" - case .leaderboardReleases: return "leaderboardReleases" - case .leaderboardSetReleases: return "leaderboardSetReleases" - case .unknown(let rawValue): return rawValue - } + public struct GameCenterDetails: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var achievementReleases: Self { + .init(rawValue: "achievementReleases") + } + + public static var activityReleases: Self { + .init(rawValue: "activityReleases") + } + + public static var app: Self { + .init(rawValue: "app") + } + + public static var arcadeEnabled: Self { + .init(rawValue: "arcadeEnabled") + } + + public static var challengeEnabled: Self { + .init(rawValue: "challengeEnabled") + } + + public static var challengeReleases: Self { + .init(rawValue: "challengeReleases") + } + + public static var challengesMinimumPlatformVersions: Self { + .init(rawValue: "challengesMinimumPlatformVersions") + } + + public static var defaultGroupLeaderboard: Self { + .init(rawValue: "defaultGroupLeaderboard") + } + + public static var defaultLeaderboard: Self { + .init(rawValue: "defaultLeaderboard") + } + + public static var gameCenterAchievements: Self { + .init(rawValue: "gameCenterAchievements") + } + + public static var gameCenterActivities: Self { + .init(rawValue: "gameCenterActivities") + } + + public static var gameCenterAppVersions: Self { + .init(rawValue: "gameCenterAppVersions") + } + + public static var gameCenterChallenges: Self { + .init(rawValue: "gameCenterChallenges") + } + + public static var gameCenterGroup: Self { + .init(rawValue: "gameCenterGroup") + } + + public static var gameCenterLeaderboardSets: Self { + .init(rawValue: "gameCenterLeaderboardSets") + } + + public static var gameCenterLeaderboards: Self { + .init(rawValue: "gameCenterLeaderboards") + } + + public static var leaderboardReleases: Self { + .init(rawValue: "leaderboardReleases") + } + + public static var leaderboardSetReleases: Self { + .init(rawValue: "leaderboardSetReleases") + } + + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "achievementReleases": self = .achievementReleases - case "app": self = .app - case "arcadeEnabled": self = .arcadeEnabled - case "challengeEnabled": self = .challengeEnabled - case "defaultGroupLeaderboard": self = .defaultGroupLeaderboard - case "defaultLeaderboard": self = .defaultLeaderboard - case "gameCenterAchievements": self = .gameCenterAchievements - case "gameCenterAppVersions": self = .gameCenterAppVersions - case "gameCenterGroup": self = .gameCenterGroup - case "gameCenterLeaderboardSets": self = .gameCenterLeaderboardSets - case "gameCenterLeaderboards": self = .gameCenterLeaderboards - case "leaderboardReleases": self = .leaderboardReleases - case "leaderboardSetReleases": self = .leaderboardSetReleases - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum GameCenterLeaderboardSetReleases: Hashable, Codable, RawRepresentable { - case gameCenterDetail - case gameCenterLeaderboardSet - case live - case unknown(String) + public struct GameCenterLeaderboardSetReleases: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var gameCenterDetail: Self { + .init(rawValue: "gameCenterDetail") + } + + public static var gameCenterLeaderboardSet: Self { + .init(rawValue: "gameCenterLeaderboardSet") + } + + public static var live: Self { + .init(rawValue: "live") + } - public var rawValue: String { - switch self { - case .gameCenterDetail: return "gameCenterDetail" - case .gameCenterLeaderboardSet: return "gameCenterLeaderboardSet" - case .live: return "live" - case .unknown(let rawValue): return rawValue - } + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "gameCenterDetail": self = .gameCenterDetail - case "gameCenterLeaderboardSet": self = .gameCenterLeaderboardSet - case "live": self = .live - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum GameCenterLeaderboardSets: Hashable, Codable, RawRepresentable { - case gameCenterDetail - case gameCenterGroup - case gameCenterLeaderboards - case groupLeaderboardSet - case localizations - case referenceName - case releases - case vendorIdentifier - case unknown(String) - - public var rawValue: String { - switch self { - case .gameCenterDetail: return "gameCenterDetail" - case .gameCenterGroup: return "gameCenterGroup" - case .gameCenterLeaderboards: return "gameCenterLeaderboards" - case .groupLeaderboardSet: return "groupLeaderboardSet" - case .localizations: return "localizations" - case .referenceName: return "referenceName" - case .releases: return "releases" - case .vendorIdentifier: return "vendorIdentifier" - case .unknown(let rawValue): return rawValue - } + public struct GameCenterLeaderboardSets: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var gameCenterDetail: Self { + .init(rawValue: "gameCenterDetail") + } + + public static var gameCenterGroup: Self { + .init(rawValue: "gameCenterGroup") + } + + public static var gameCenterLeaderboards: Self { + .init(rawValue: "gameCenterLeaderboards") + } + + public static var groupLeaderboardSet: Self { + .init(rawValue: "groupLeaderboardSet") } + public static var localizations: Self { + .init(rawValue: "localizations") + } + + public static var referenceName: Self { + .init(rawValue: "referenceName") + } + + public static var releases: Self { + .init(rawValue: "releases") + } + + public static var vendorIdentifier: Self { + .init(rawValue: "vendorIdentifier") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "gameCenterDetail": self = .gameCenterDetail - case "gameCenterGroup": self = .gameCenterGroup - case "gameCenterLeaderboards": self = .gameCenterLeaderboards - case "groupLeaderboardSet": self = .groupLeaderboardSet - case "localizations": self = .localizations - case "referenceName": self = .referenceName - case "releases": self = .releases - case "vendorIdentifier": self = .vendorIdentifier - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } @@ -273,25 +313,23 @@ extension V1.GameCenterLeaderboardSets.ById.Releases.GET { } } - public enum Include: Hashable, Codable, RawRepresentable { - case gameCenterDetail - case gameCenterLeaderboardSet - case unknown(String) + public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var gameCenterDetail: Self { + .init(rawValue: "gameCenterDetail") + } - public var rawValue: String { - switch self { - case .gameCenterDetail: return "gameCenterDetail" - case .gameCenterLeaderboardSet: return "gameCenterLeaderboardSet" - case .unknown(let rawValue): return rawValue - } + public static var gameCenterLeaderboardSet: Self { + .init(rawValue: "gameCenterLeaderboardSet") } + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "gameCenterDetail": self = .gameCenterDetail - case "gameCenterLeaderboardSet": self = .gameCenterLeaderboardSet - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterLeaderboardSets/GameCenterLeaderboardSets.POST.075cd04.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterLeaderboardSets/GameCenterLeaderboardSets.POST.075cd04.generated.swift index df57bd85..cf5c1617 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterLeaderboardSets/GameCenterLeaderboardSets.POST.075cd04.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterLeaderboardSets/GameCenterLeaderboardSets.POST.075cd04.generated.swift @@ -41,8 +41,11 @@ extension V1.GameCenterLeaderboardSets { /// - Returns: **201**, Single GameCenterLeaderboardSet as `GameCenterLeaderboardSetResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **422**, Unprocessable request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -56,12 +59,21 @@ extension V1.GameCenterLeaderboardSets { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 409: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 422: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterLeaderboards/ById/GameCenterLeaderboardsById.DELETE.3a3f5a7.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterLeaderboards/ById/GameCenterLeaderboardsById.DELETE.3a3f5a7.generated.swift index f93e2664..11e5d72e 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterLeaderboards/ById/GameCenterLeaderboardsById.DELETE.3a3f5a7.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterLeaderboards/ById/GameCenterLeaderboardsById.DELETE.3a3f5a7.generated.swift @@ -31,11 +31,12 @@ extension V1.GameCenterLeaderboards.ById { return urlRequest } - /// - Returns: **204**, Success (no content) /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -43,12 +44,12 @@ extension V1.GameCenterLeaderboards.ById { } switch urlResponse.statusCode { - case 204: - return - case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) @@ -58,6 +59,9 @@ extension V1.GameCenterLeaderboards.ById { case 409: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterLeaderboards/ById/GameCenterLeaderboardsById.GET.3a3f5a7.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterLeaderboards/ById/GameCenterLeaderboardsById.GET.3a3f5a7.generated.swift index a42c39ff..cf30427d 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterLeaderboards/ById/GameCenterLeaderboardsById.GET.3a3f5a7.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterLeaderboards/ById/GameCenterLeaderboardsById.GET.3a3f5a7.generated.swift @@ -54,8 +54,10 @@ extension V1.GameCenterLeaderboards.ById { /// - Returns: **200**, Single GameCenterLeaderboard as `GameCenterLeaderboardResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -69,12 +71,18 @@ extension V1.GameCenterLeaderboards.ById { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 404: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -99,132 +107,163 @@ extension V1.GameCenterLeaderboards.ById.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum GameCenterLeaderboardLocalizations: Hashable, Codable, RawRepresentable { - case formatterOverride - case formatterSuffix - case formatterSuffixSingular - case gameCenterLeaderboard - case gameCenterLeaderboardImage - case locale - case name - case unknown(String) - - public var rawValue: String { - switch self { - case .formatterOverride: return "formatterOverride" - case .formatterSuffix: return "formatterSuffix" - case .formatterSuffixSingular: return "formatterSuffixSingular" - case .gameCenterLeaderboard: return "gameCenterLeaderboard" - case .gameCenterLeaderboardImage: return "gameCenterLeaderboardImage" - case .locale: return "locale" - case .name: return "name" - case .unknown(let rawValue): return rawValue - } + public struct GameCenterLeaderboardLocalizations: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var formatterOverride: Self { + .init(rawValue: "formatterOverride") + } + + public static var formatterSuffix: Self { + .init(rawValue: "formatterSuffix") + } + + public static var formatterSuffixSingular: Self { + .init(rawValue: "formatterSuffixSingular") + } + + public static var gameCenterLeaderboard: Self { + .init(rawValue: "gameCenterLeaderboard") + } + + public static var gameCenterLeaderboardImage: Self { + .init(rawValue: "gameCenterLeaderboardImage") + } + + public static var locale: Self { + .init(rawValue: "locale") } + public static var name: Self { + .init(rawValue: "name") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "formatterOverride": self = .formatterOverride - case "formatterSuffix": self = .formatterSuffix - case "formatterSuffixSingular": self = .formatterSuffixSingular - case "gameCenterLeaderboard": self = .gameCenterLeaderboard - case "gameCenterLeaderboardImage": self = .gameCenterLeaderboardImage - case "locale": self = .locale - case "name": self = .name - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum GameCenterLeaderboardReleases: Hashable, Codable, RawRepresentable { - case gameCenterDetail - case gameCenterLeaderboard - case live - case unknown(String) + public struct GameCenterLeaderboardReleases: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var gameCenterDetail: Self { + .init(rawValue: "gameCenterDetail") + } + + public static var gameCenterLeaderboard: Self { + .init(rawValue: "gameCenterLeaderboard") + } + + public static var live: Self { + .init(rawValue: "live") + } - public var rawValue: String { - switch self { - case .gameCenterDetail: return "gameCenterDetail" - case .gameCenterLeaderboard: return "gameCenterLeaderboard" - case .live: return "live" - case .unknown(let rawValue): return rawValue - } + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "gameCenterDetail": self = .gameCenterDetail - case "gameCenterLeaderboard": self = .gameCenterLeaderboard - case "live": self = .live - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum GameCenterLeaderboards: Hashable, Codable, RawRepresentable { - case archived - case defaultFormatter - case gameCenterDetail - case gameCenterGroup - case gameCenterLeaderboardSets - case groupLeaderboard - case localizations - case recurrenceDuration - case recurrenceRule - case recurrenceStartDate - case referenceName - case releases - case scoreRangeEnd - case scoreRangeStart - case scoreSortType - case submissionType - case vendorIdentifier - case unknown(String) - - public var rawValue: String { - switch self { - case .archived: return "archived" - case .defaultFormatter: return "defaultFormatter" - case .gameCenterDetail: return "gameCenterDetail" - case .gameCenterGroup: return "gameCenterGroup" - case .gameCenterLeaderboardSets: return "gameCenterLeaderboardSets" - case .groupLeaderboard: return "groupLeaderboard" - case .localizations: return "localizations" - case .recurrenceDuration: return "recurrenceDuration" - case .recurrenceRule: return "recurrenceRule" - case .recurrenceStartDate: return "recurrenceStartDate" - case .referenceName: return "referenceName" - case .releases: return "releases" - case .scoreRangeEnd: return "scoreRangeEnd" - case .scoreRangeStart: return "scoreRangeStart" - case .scoreSortType: return "scoreSortType" - case .submissionType: return "submissionType" - case .vendorIdentifier: return "vendorIdentifier" - case .unknown(let rawValue): return rawValue - } + public struct GameCenterLeaderboards: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var activity: Self { + .init(rawValue: "activity") + } + + public static var activityProperties: Self { + .init(rawValue: "activityProperties") + } + + public static var archived: Self { + .init(rawValue: "archived") + } + + public static var challenge: Self { + .init(rawValue: "challenge") + } + + public static var defaultFormatter: Self { + .init(rawValue: "defaultFormatter") } + public static var gameCenterDetail: Self { + .init(rawValue: "gameCenterDetail") + } + + public static var gameCenterGroup: Self { + .init(rawValue: "gameCenterGroup") + } + + public static var gameCenterLeaderboardSets: Self { + .init(rawValue: "gameCenterLeaderboardSets") + } + + public static var groupLeaderboard: Self { + .init(rawValue: "groupLeaderboard") + } + + public static var localizations: Self { + .init(rawValue: "localizations") + } + + public static var recurrenceDuration: Self { + .init(rawValue: "recurrenceDuration") + } + + public static var recurrenceRule: Self { + .init(rawValue: "recurrenceRule") + } + + public static var recurrenceStartDate: Self { + .init(rawValue: "recurrenceStartDate") + } + + public static var referenceName: Self { + .init(rawValue: "referenceName") + } + + public static var releases: Self { + .init(rawValue: "releases") + } + + public static var scoreRangeEnd: Self { + .init(rawValue: "scoreRangeEnd") + } + + public static var scoreRangeStart: Self { + .init(rawValue: "scoreRangeStart") + } + + public static var scoreSortType: Self { + .init(rawValue: "scoreSortType") + } + + public static var submissionType: Self { + .init(rawValue: "submissionType") + } + + public static var vendorIdentifier: Self { + .init(rawValue: "vendorIdentifier") + } + + public static var visibility: Self { + .init(rawValue: "visibility") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "archived": self = .archived - case "defaultFormatter": self = .defaultFormatter - case "gameCenterDetail": self = .gameCenterDetail - case "gameCenterGroup": self = .gameCenterGroup - case "gameCenterLeaderboardSets": self = .gameCenterLeaderboardSets - case "groupLeaderboard": self = .groupLeaderboard - case "localizations": self = .localizations - case "recurrenceDuration": self = .recurrenceDuration - case "recurrenceRule": self = .recurrenceRule - case "recurrenceStartDate": self = .recurrenceStartDate - case "referenceName": self = .referenceName - case "releases": self = .releases - case "scoreRangeEnd": self = .scoreRangeEnd - case "scoreRangeStart": self = .scoreRangeStart - case "scoreSortType": self = .scoreSortType - case "submissionType": self = .submissionType - case "vendorIdentifier": self = .vendorIdentifier - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } @@ -252,37 +291,47 @@ extension V1.GameCenterLeaderboards.ById.GET { } } - public enum Include: Hashable, Codable, RawRepresentable { - case gameCenterDetail - case gameCenterGroup - case gameCenterLeaderboardSets - case groupLeaderboard - case localizations - case releases - case unknown(String) - - public var rawValue: String { - switch self { - case .gameCenterDetail: return "gameCenterDetail" - case .gameCenterGroup: return "gameCenterGroup" - case .gameCenterLeaderboardSets: return "gameCenterLeaderboardSets" - case .groupLeaderboard: return "groupLeaderboard" - case .localizations: return "localizations" - case .releases: return "releases" - case .unknown(let rawValue): return rawValue - } + public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var activity: Self { + .init(rawValue: "activity") + } + + public static var challenge: Self { + .init(rawValue: "challenge") + } + + public static var gameCenterDetail: Self { + .init(rawValue: "gameCenterDetail") + } + + public static var gameCenterGroup: Self { + .init(rawValue: "gameCenterGroup") + } + + public static var gameCenterLeaderboardSets: Self { + .init(rawValue: "gameCenterLeaderboardSets") } + public static var groupLeaderboard: Self { + .init(rawValue: "groupLeaderboard") + } + + public static var localizations: Self { + .init(rawValue: "localizations") + } + + public static var releases: Self { + .init(rawValue: "releases") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "gameCenterDetail": self = .gameCenterDetail - case "gameCenterGroup": self = .gameCenterGroup - case "gameCenterLeaderboardSets": self = .gameCenterLeaderboardSets - case "groupLeaderboard": self = .groupLeaderboard - case "localizations": self = .localizations - case "releases": self = .releases - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterLeaderboards/ById/GameCenterLeaderboardsById.PATCH.3a3f5a7.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterLeaderboards/ById/GameCenterLeaderboardsById.PATCH.3a3f5a7.generated.swift index e876b20d..b202054e 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterLeaderboards/ById/GameCenterLeaderboardsById.PATCH.3a3f5a7.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterLeaderboards/ById/GameCenterLeaderboardsById.PATCH.3a3f5a7.generated.swift @@ -48,9 +48,12 @@ extension V1.GameCenterLeaderboards.ById { /// - Returns: **200**, Single GameCenterLeaderboard as `GameCenterLeaderboardResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **422**, Unprocessable request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -64,6 +67,9 @@ extension V1.GameCenterLeaderboards.ById { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) @@ -73,6 +79,12 @@ extension V1.GameCenterLeaderboards.ById { case 409: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 422: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterLeaderboards/ById/GroupLeaderboard/GameCenterLeaderboardsByIdGroupLeaderboard.GET.67a613a.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterLeaderboards/ById/GroupLeaderboard/GameCenterLeaderboardsByIdGroupLeaderboard.GET.67a613a.generated.swift index 8b2321d5..0c4146e7 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterLeaderboards/ById/GroupLeaderboard/GameCenterLeaderboardsByIdGroupLeaderboard.GET.67a613a.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterLeaderboards/ById/GroupLeaderboard/GameCenterLeaderboardsByIdGroupLeaderboard.GET.67a613a.generated.swift @@ -7,6 +7,7 @@ import FoundationNetworking #endif extension V1.GameCenterLeaderboards.ById.GroupLeaderboard { + @available(*, deprecated) public struct GET: Endpoint { public typealias Response = GameCenterLeaderboardResponse @@ -28,6 +29,10 @@ extension V1.GameCenterLeaderboards.ById.GroupLeaderboard { components?.path = path components?.queryItems = [ + URLQueryItem(name: "fields[gameCenterActivities]", + value: parameters.fields[.gameCenterActivities]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "fields[gameCenterChallenges]", + value: parameters.fields[.gameCenterChallenges]?.map { "\($0)" }.joined(separator: ",")), URLQueryItem(name: "fields[gameCenterDetails]", value: parameters.fields[.gameCenterDetails]?.map { "\($0)" }.joined(separator: ",")), URLQueryItem(name: "fields[gameCenterGroups]", @@ -60,8 +65,10 @@ extension V1.GameCenterLeaderboards.ById.GroupLeaderboard { /// - Returns: **200**, Single GameCenterLeaderboard as `GameCenterLeaderboardResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -75,12 +82,18 @@ extension V1.GameCenterLeaderboards.ById.GroupLeaderboard { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 404: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -105,262 +118,461 @@ extension V1.GameCenterLeaderboards.ById.GroupLeaderboard.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum GameCenterDetails: Hashable, Codable, RawRepresentable { - case achievementReleases - case app - case arcadeEnabled - case challengeEnabled - case defaultGroupLeaderboard - case defaultLeaderboard - case gameCenterAchievements - case gameCenterAppVersions - case gameCenterGroup - case gameCenterLeaderboardSets - case gameCenterLeaderboards - case leaderboardReleases - case leaderboardSetReleases - case unknown(String) - - public var rawValue: String { - switch self { - case .achievementReleases: return "achievementReleases" - case .app: return "app" - case .arcadeEnabled: return "arcadeEnabled" - case .challengeEnabled: return "challengeEnabled" - case .defaultGroupLeaderboard: return "defaultGroupLeaderboard" - case .defaultLeaderboard: return "defaultLeaderboard" - case .gameCenterAchievements: return "gameCenterAchievements" - case .gameCenterAppVersions: return "gameCenterAppVersions" - case .gameCenterGroup: return "gameCenterGroup" - case .gameCenterLeaderboardSets: return "gameCenterLeaderboardSets" - case .gameCenterLeaderboards: return "gameCenterLeaderboards" - case .leaderboardReleases: return "leaderboardReleases" - case .leaderboardSetReleases: return "leaderboardSetReleases" - case .unknown(let rawValue): return rawValue - } + public struct GameCenterActivities: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var achievements: Self { + .init(rawValue: "achievements") + } + + public static var archived: Self { + .init(rawValue: "archived") + } + + public static var gameCenterDetail: Self { + .init(rawValue: "gameCenterDetail") + } + + public static var gameCenterGroup: Self { + .init(rawValue: "gameCenterGroup") + } + + public static var leaderboards: Self { + .init(rawValue: "leaderboards") + } + + public static var maximumPlayersCount: Self { + .init(rawValue: "maximumPlayersCount") + } + + public static var minimumPlayersCount: Self { + .init(rawValue: "minimumPlayersCount") + } + + public static var playStyle: Self { + .init(rawValue: "playStyle") + } + + public static var properties: Self { + .init(rawValue: "properties") + } + + public static var referenceName: Self { + .init(rawValue: "referenceName") + } + + public static var supportsPartyCode: Self { + .init(rawValue: "supportsPartyCode") + } + + public static var vendorIdentifier: Self { + .init(rawValue: "vendorIdentifier") + } + + public static var versions: Self { + .init(rawValue: "versions") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct GameCenterChallenges: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var allowedDurations: Self { + .init(rawValue: "allowedDurations") + } + + public static var archived: Self { + .init(rawValue: "archived") + } + + public static var challengeType: Self { + .init(rawValue: "challengeType") + } + + public static var gameCenterDetail: Self { + .init(rawValue: "gameCenterDetail") + } + + public static var gameCenterGroup: Self { + .init(rawValue: "gameCenterGroup") + } + + public static var leaderboard: Self { + .init(rawValue: "leaderboard") + } + + public static var referenceName: Self { + .init(rawValue: "referenceName") + } + + public static var repeatable: Self { + .init(rawValue: "repeatable") + } + + public static var vendorIdentifier: Self { + .init(rawValue: "vendorIdentifier") + } + + public static var versions: Self { + .init(rawValue: "versions") } + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "achievementReleases": self = .achievementReleases - case "app": self = .app - case "arcadeEnabled": self = .arcadeEnabled - case "challengeEnabled": self = .challengeEnabled - case "defaultGroupLeaderboard": self = .defaultGroupLeaderboard - case "defaultLeaderboard": self = .defaultLeaderboard - case "gameCenterAchievements": self = .gameCenterAchievements - case "gameCenterAppVersions": self = .gameCenterAppVersions - case "gameCenterGroup": self = .gameCenterGroup - case "gameCenterLeaderboardSets": self = .gameCenterLeaderboardSets - case "gameCenterLeaderboards": self = .gameCenterLeaderboards - case "leaderboardReleases": self = .leaderboardReleases - case "leaderboardSetReleases": self = .leaderboardSetReleases - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum GameCenterGroups: Hashable, Codable, RawRepresentable { - case gameCenterAchievements - case gameCenterDetails - case gameCenterLeaderboardSets - case gameCenterLeaderboards - case referenceName - case unknown(String) - - public var rawValue: String { - switch self { - case .gameCenterAchievements: return "gameCenterAchievements" - case .gameCenterDetails: return "gameCenterDetails" - case .gameCenterLeaderboardSets: return "gameCenterLeaderboardSets" - case .gameCenterLeaderboards: return "gameCenterLeaderboards" - case .referenceName: return "referenceName" - case .unknown(let rawValue): return rawValue - } + public struct GameCenterDetails: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var achievementReleases: Self { + .init(rawValue: "achievementReleases") + } + + public static var activityReleases: Self { + .init(rawValue: "activityReleases") + } + + public static var app: Self { + .init(rawValue: "app") + } + + public static var arcadeEnabled: Self { + .init(rawValue: "arcadeEnabled") + } + + public static var challengeEnabled: Self { + .init(rawValue: "challengeEnabled") + } + + public static var challengeReleases: Self { + .init(rawValue: "challengeReleases") + } + + public static var challengesMinimumPlatformVersions: Self { + .init(rawValue: "challengesMinimumPlatformVersions") + } + + public static var defaultGroupLeaderboard: Self { + .init(rawValue: "defaultGroupLeaderboard") + } + + public static var defaultLeaderboard: Self { + .init(rawValue: "defaultLeaderboard") + } + + public static var gameCenterAchievements: Self { + .init(rawValue: "gameCenterAchievements") + } + + public static var gameCenterActivities: Self { + .init(rawValue: "gameCenterActivities") + } + + public static var gameCenterAppVersions: Self { + .init(rawValue: "gameCenterAppVersions") + } + + public static var gameCenterChallenges: Self { + .init(rawValue: "gameCenterChallenges") + } + + public static var gameCenterGroup: Self { + .init(rawValue: "gameCenterGroup") + } + + public static var gameCenterLeaderboardSets: Self { + .init(rawValue: "gameCenterLeaderboardSets") + } + + public static var gameCenterLeaderboards: Self { + .init(rawValue: "gameCenterLeaderboards") + } + + public static var leaderboardReleases: Self { + .init(rawValue: "leaderboardReleases") + } + + public static var leaderboardSetReleases: Self { + .init(rawValue: "leaderboardSetReleases") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct GameCenterGroups: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var gameCenterAchievements: Self { + .init(rawValue: "gameCenterAchievements") + } + + public static var gameCenterActivities: Self { + .init(rawValue: "gameCenterActivities") + } + + public static var gameCenterChallenges: Self { + .init(rawValue: "gameCenterChallenges") + } + + public static var gameCenterDetails: Self { + .init(rawValue: "gameCenterDetails") + } + + public static var gameCenterLeaderboardSets: Self { + .init(rawValue: "gameCenterLeaderboardSets") + } + + public static var gameCenterLeaderboards: Self { + .init(rawValue: "gameCenterLeaderboards") + } + + public static var referenceName: Self { + .init(rawValue: "referenceName") } + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "gameCenterAchievements": self = .gameCenterAchievements - case "gameCenterDetails": self = .gameCenterDetails - case "gameCenterLeaderboardSets": self = .gameCenterLeaderboardSets - case "gameCenterLeaderboards": self = .gameCenterLeaderboards - case "referenceName": self = .referenceName - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum GameCenterLeaderboardLocalizations: Hashable, Codable, RawRepresentable { - case formatterOverride - case formatterSuffix - case formatterSuffixSingular - case gameCenterLeaderboard - case gameCenterLeaderboardImage - case locale - case name - case unknown(String) - - public var rawValue: String { - switch self { - case .formatterOverride: return "formatterOverride" - case .formatterSuffix: return "formatterSuffix" - case .formatterSuffixSingular: return "formatterSuffixSingular" - case .gameCenterLeaderboard: return "gameCenterLeaderboard" - case .gameCenterLeaderboardImage: return "gameCenterLeaderboardImage" - case .locale: return "locale" - case .name: return "name" - case .unknown(let rawValue): return rawValue - } + public struct GameCenterLeaderboardLocalizations: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var formatterOverride: Self { + .init(rawValue: "formatterOverride") + } + + public static var formatterSuffix: Self { + .init(rawValue: "formatterSuffix") + } + + public static var formatterSuffixSingular: Self { + .init(rawValue: "formatterSuffixSingular") + } + + public static var gameCenterLeaderboard: Self { + .init(rawValue: "gameCenterLeaderboard") + } + + public static var gameCenterLeaderboardImage: Self { + .init(rawValue: "gameCenterLeaderboardImage") } + public static var locale: Self { + .init(rawValue: "locale") + } + + public static var name: Self { + .init(rawValue: "name") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "formatterOverride": self = .formatterOverride - case "formatterSuffix": self = .formatterSuffix - case "formatterSuffixSingular": self = .formatterSuffixSingular - case "gameCenterLeaderboard": self = .gameCenterLeaderboard - case "gameCenterLeaderboardImage": self = .gameCenterLeaderboardImage - case "locale": self = .locale - case "name": self = .name - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum GameCenterLeaderboardReleases: Hashable, Codable, RawRepresentable { - case gameCenterDetail - case gameCenterLeaderboard - case live - case unknown(String) + public struct GameCenterLeaderboardReleases: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var gameCenterDetail: Self { + .init(rawValue: "gameCenterDetail") + } + + public static var gameCenterLeaderboard: Self { + .init(rawValue: "gameCenterLeaderboard") + } - public var rawValue: String { - switch self { - case .gameCenterDetail: return "gameCenterDetail" - case .gameCenterLeaderboard: return "gameCenterLeaderboard" - case .live: return "live" - case .unknown(let rawValue): return rawValue - } + public static var live: Self { + .init(rawValue: "live") } + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "gameCenterDetail": self = .gameCenterDetail - case "gameCenterLeaderboard": self = .gameCenterLeaderboard - case "live": self = .live - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum GameCenterLeaderboardSets: Hashable, Codable, RawRepresentable { - case gameCenterDetail - case gameCenterGroup - case gameCenterLeaderboards - case groupLeaderboardSet - case localizations - case referenceName - case releases - case vendorIdentifier - case unknown(String) - - public var rawValue: String { - switch self { - case .gameCenterDetail: return "gameCenterDetail" - case .gameCenterGroup: return "gameCenterGroup" - case .gameCenterLeaderboards: return "gameCenterLeaderboards" - case .groupLeaderboardSet: return "groupLeaderboardSet" - case .localizations: return "localizations" - case .referenceName: return "referenceName" - case .releases: return "releases" - case .vendorIdentifier: return "vendorIdentifier" - case .unknown(let rawValue): return rawValue - } + public struct GameCenterLeaderboardSets: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var gameCenterDetail: Self { + .init(rawValue: "gameCenterDetail") } + public static var gameCenterGroup: Self { + .init(rawValue: "gameCenterGroup") + } + + public static var gameCenterLeaderboards: Self { + .init(rawValue: "gameCenterLeaderboards") + } + + public static var groupLeaderboardSet: Self { + .init(rawValue: "groupLeaderboardSet") + } + + public static var localizations: Self { + .init(rawValue: "localizations") + } + + public static var referenceName: Self { + .init(rawValue: "referenceName") + } + + public static var releases: Self { + .init(rawValue: "releases") + } + + public static var vendorIdentifier: Self { + .init(rawValue: "vendorIdentifier") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "gameCenterDetail": self = .gameCenterDetail - case "gameCenterGroup": self = .gameCenterGroup - case "gameCenterLeaderboards": self = .gameCenterLeaderboards - case "groupLeaderboardSet": self = .groupLeaderboardSet - case "localizations": self = .localizations - case "referenceName": self = .referenceName - case "releases": self = .releases - case "vendorIdentifier": self = .vendorIdentifier - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum GameCenterLeaderboards: Hashable, Codable, RawRepresentable { - case archived - case defaultFormatter - case gameCenterDetail - case gameCenterGroup - case gameCenterLeaderboardSets - case groupLeaderboard - case localizations - case recurrenceDuration - case recurrenceRule - case recurrenceStartDate - case referenceName - case releases - case scoreRangeEnd - case scoreRangeStart - case scoreSortType - case submissionType - case vendorIdentifier - case unknown(String) - - public var rawValue: String { - switch self { - case .archived: return "archived" - case .defaultFormatter: return "defaultFormatter" - case .gameCenterDetail: return "gameCenterDetail" - case .gameCenterGroup: return "gameCenterGroup" - case .gameCenterLeaderboardSets: return "gameCenterLeaderboardSets" - case .groupLeaderboard: return "groupLeaderboard" - case .localizations: return "localizations" - case .recurrenceDuration: return "recurrenceDuration" - case .recurrenceRule: return "recurrenceRule" - case .recurrenceStartDate: return "recurrenceStartDate" - case .referenceName: return "referenceName" - case .releases: return "releases" - case .scoreRangeEnd: return "scoreRangeEnd" - case .scoreRangeStart: return "scoreRangeStart" - case .scoreSortType: return "scoreSortType" - case .submissionType: return "submissionType" - case .vendorIdentifier: return "vendorIdentifier" - case .unknown(let rawValue): return rawValue - } + public struct GameCenterLeaderboards: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var activity: Self { + .init(rawValue: "activity") + } + + public static var activityProperties: Self { + .init(rawValue: "activityProperties") + } + + public static var archived: Self { + .init(rawValue: "archived") + } + + public static var challenge: Self { + .init(rawValue: "challenge") + } + + public static var defaultFormatter: Self { + .init(rawValue: "defaultFormatter") + } + + public static var gameCenterDetail: Self { + .init(rawValue: "gameCenterDetail") + } + + public static var gameCenterGroup: Self { + .init(rawValue: "gameCenterGroup") + } + + public static var gameCenterLeaderboardSets: Self { + .init(rawValue: "gameCenterLeaderboardSets") + } + + public static var groupLeaderboard: Self { + .init(rawValue: "groupLeaderboard") + } + + public static var localizations: Self { + .init(rawValue: "localizations") + } + + public static var recurrenceDuration: Self { + .init(rawValue: "recurrenceDuration") + } + + public static var recurrenceRule: Self { + .init(rawValue: "recurrenceRule") + } + + public static var recurrenceStartDate: Self { + .init(rawValue: "recurrenceStartDate") + } + + public static var referenceName: Self { + .init(rawValue: "referenceName") + } + + public static var releases: Self { + .init(rawValue: "releases") + } + + public static var scoreRangeEnd: Self { + .init(rawValue: "scoreRangeEnd") + } + + public static var scoreRangeStart: Self { + .init(rawValue: "scoreRangeStart") } + public static var scoreSortType: Self { + .init(rawValue: "scoreSortType") + } + + public static var submissionType: Self { + .init(rawValue: "submissionType") + } + + public static var vendorIdentifier: Self { + .init(rawValue: "vendorIdentifier") + } + + public static var visibility: Self { + .init(rawValue: "visibility") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "archived": self = .archived - case "defaultFormatter": self = .defaultFormatter - case "gameCenterDetail": self = .gameCenterDetail - case "gameCenterGroup": self = .gameCenterGroup - case "gameCenterLeaderboardSets": self = .gameCenterLeaderboardSets - case "groupLeaderboard": self = .groupLeaderboard - case "localizations": self = .localizations - case "recurrenceDuration": self = .recurrenceDuration - case "recurrenceRule": self = .recurrenceRule - case "recurrenceStartDate": self = .recurrenceStartDate - case "referenceName": self = .referenceName - case "releases": self = .releases - case "scoreRangeEnd": self = .scoreRangeEnd - case "scoreRangeStart": self = .scoreRangeStart - case "scoreSortType": self = .scoreSortType - case "submissionType": self = .submissionType - case "vendorIdentifier": self = .vendorIdentifier - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } public struct Relation: Hashable { + /// the fields to include for returned resources of type gameCenterActivities + public static var gameCenterActivities: Relation<[GameCenterActivities]?> { + .init(key: "fields[gameCenterActivities]") + } + + /// the fields to include for returned resources of type gameCenterChallenges + public static var gameCenterChallenges: Relation<[GameCenterChallenges]?> { + .init(key: "fields[gameCenterChallenges]") + } + /// the fields to include for returned resources of type gameCenterDetails public static var gameCenterDetails: Relation<[GameCenterDetails]?> { .init(key: "fields[gameCenterDetails]") @@ -399,37 +611,47 @@ extension V1.GameCenterLeaderboards.ById.GroupLeaderboard.GET { } } - public enum Include: Hashable, Codable, RawRepresentable { - case gameCenterDetail - case gameCenterGroup - case gameCenterLeaderboardSets - case groupLeaderboard - case localizations - case releases - case unknown(String) - - public var rawValue: String { - switch self { - case .gameCenterDetail: return "gameCenterDetail" - case .gameCenterGroup: return "gameCenterGroup" - case .gameCenterLeaderboardSets: return "gameCenterLeaderboardSets" - case .groupLeaderboard: return "groupLeaderboard" - case .localizations: return "localizations" - case .releases: return "releases" - case .unknown(let rawValue): return rawValue - } + public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var activity: Self { + .init(rawValue: "activity") + } + + public static var challenge: Self { + .init(rawValue: "challenge") } + public static var gameCenterDetail: Self { + .init(rawValue: "gameCenterDetail") + } + + public static var gameCenterGroup: Self { + .init(rawValue: "gameCenterGroup") + } + + public static var gameCenterLeaderboardSets: Self { + .init(rawValue: "gameCenterLeaderboardSets") + } + + public static var groupLeaderboard: Self { + .init(rawValue: "groupLeaderboard") + } + + public static var localizations: Self { + .init(rawValue: "localizations") + } + + public static var releases: Self { + .init(rawValue: "releases") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "gameCenterDetail": self = .gameCenterDetail - case "gameCenterGroup": self = .gameCenterGroup - case "gameCenterLeaderboardSets": self = .gameCenterLeaderboardSets - case "groupLeaderboard": self = .groupLeaderboard - case "localizations": self = .localizations - case "releases": self = .releases - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterLeaderboards/ById/Localizations/GameCenterLeaderboardsByIdLocalizations.GET.bb221ae.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterLeaderboards/ById/Localizations/GameCenterLeaderboardsByIdLocalizations.GET.bb221ae.generated.swift index ffa06fe3..df16bbd2 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterLeaderboards/ById/Localizations/GameCenterLeaderboardsByIdLocalizations.GET.bb221ae.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterLeaderboards/ById/Localizations/GameCenterLeaderboardsByIdLocalizations.GET.bb221ae.generated.swift @@ -50,8 +50,10 @@ extension V1.GameCenterLeaderboards.ById.Localizations { /// - Returns: **200**, List of GameCenterLeaderboardLocalizations as `GameCenterLeaderboardLocalizationsResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -65,12 +67,18 @@ extension V1.GameCenterLeaderboards.ById.Localizations { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 404: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -96,144 +104,175 @@ extension V1.GameCenterLeaderboards.ById.Localizations.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum GameCenterLeaderboardImages: Hashable, Codable, RawRepresentable { - case assetDeliveryState - case fileName - case fileSize - case gameCenterLeaderboardLocalization - case imageAsset - case uploadOperations - case uploaded - case unknown(String) - - public var rawValue: String { - switch self { - case .assetDeliveryState: return "assetDeliveryState" - case .fileName: return "fileName" - case .fileSize: return "fileSize" - case .gameCenterLeaderboardLocalization: return "gameCenterLeaderboardLocalization" - case .imageAsset: return "imageAsset" - case .uploadOperations: return "uploadOperations" - case .uploaded: return "uploaded" - case .unknown(let rawValue): return rawValue - } + public struct GameCenterLeaderboardImages: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var assetDeliveryState: Self { + .init(rawValue: "assetDeliveryState") + } + + public static var fileName: Self { + .init(rawValue: "fileName") } + public static var fileSize: Self { + .init(rawValue: "fileSize") + } + + public static var gameCenterLeaderboardLocalization: Self { + .init(rawValue: "gameCenterLeaderboardLocalization") + } + + public static var imageAsset: Self { + .init(rawValue: "imageAsset") + } + + public static var uploadOperations: Self { + .init(rawValue: "uploadOperations") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "assetDeliveryState": self = .assetDeliveryState - case "fileName": self = .fileName - case "fileSize": self = .fileSize - case "gameCenterLeaderboardLocalization": self = .gameCenterLeaderboardLocalization - case "imageAsset": self = .imageAsset - case "uploadOperations": self = .uploadOperations - case "uploaded": self = .uploaded - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum GameCenterLeaderboardLocalizations: Hashable, Codable, RawRepresentable { - case formatterOverride - case formatterSuffix - case formatterSuffixSingular - case gameCenterLeaderboard - case gameCenterLeaderboardImage - case locale - case name - case unknown(String) - - public var rawValue: String { - switch self { - case .formatterOverride: return "formatterOverride" - case .formatterSuffix: return "formatterSuffix" - case .formatterSuffixSingular: return "formatterSuffixSingular" - case .gameCenterLeaderboard: return "gameCenterLeaderboard" - case .gameCenterLeaderboardImage: return "gameCenterLeaderboardImage" - case .locale: return "locale" - case .name: return "name" - case .unknown(let rawValue): return rawValue - } + public struct GameCenterLeaderboardLocalizations: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var formatterOverride: Self { + .init(rawValue: "formatterOverride") + } + + public static var formatterSuffix: Self { + .init(rawValue: "formatterSuffix") + } + + public static var formatterSuffixSingular: Self { + .init(rawValue: "formatterSuffixSingular") } + public static var gameCenterLeaderboard: Self { + .init(rawValue: "gameCenterLeaderboard") + } + + public static var gameCenterLeaderboardImage: Self { + .init(rawValue: "gameCenterLeaderboardImage") + } + + public static var locale: Self { + .init(rawValue: "locale") + } + + public static var name: Self { + .init(rawValue: "name") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "formatterOverride": self = .formatterOverride - case "formatterSuffix": self = .formatterSuffix - case "formatterSuffixSingular": self = .formatterSuffixSingular - case "gameCenterLeaderboard": self = .gameCenterLeaderboard - case "gameCenterLeaderboardImage": self = .gameCenterLeaderboardImage - case "locale": self = .locale - case "name": self = .name - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum GameCenterLeaderboards: Hashable, Codable, RawRepresentable { - case archived - case defaultFormatter - case gameCenterDetail - case gameCenterGroup - case gameCenterLeaderboardSets - case groupLeaderboard - case localizations - case recurrenceDuration - case recurrenceRule - case recurrenceStartDate - case referenceName - case releases - case scoreRangeEnd - case scoreRangeStart - case scoreSortType - case submissionType - case vendorIdentifier - case unknown(String) - - public var rawValue: String { - switch self { - case .archived: return "archived" - case .defaultFormatter: return "defaultFormatter" - case .gameCenterDetail: return "gameCenterDetail" - case .gameCenterGroup: return "gameCenterGroup" - case .gameCenterLeaderboardSets: return "gameCenterLeaderboardSets" - case .groupLeaderboard: return "groupLeaderboard" - case .localizations: return "localizations" - case .recurrenceDuration: return "recurrenceDuration" - case .recurrenceRule: return "recurrenceRule" - case .recurrenceStartDate: return "recurrenceStartDate" - case .referenceName: return "referenceName" - case .releases: return "releases" - case .scoreRangeEnd: return "scoreRangeEnd" - case .scoreRangeStart: return "scoreRangeStart" - case .scoreSortType: return "scoreSortType" - case .submissionType: return "submissionType" - case .vendorIdentifier: return "vendorIdentifier" - case .unknown(let rawValue): return rawValue - } + public struct GameCenterLeaderboards: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var activity: Self { + .init(rawValue: "activity") + } + + public static var activityProperties: Self { + .init(rawValue: "activityProperties") + } + + public static var archived: Self { + .init(rawValue: "archived") } + public static var challenge: Self { + .init(rawValue: "challenge") + } + + public static var defaultFormatter: Self { + .init(rawValue: "defaultFormatter") + } + + public static var gameCenterDetail: Self { + .init(rawValue: "gameCenterDetail") + } + + public static var gameCenterGroup: Self { + .init(rawValue: "gameCenterGroup") + } + + public static var gameCenterLeaderboardSets: Self { + .init(rawValue: "gameCenterLeaderboardSets") + } + + public static var groupLeaderboard: Self { + .init(rawValue: "groupLeaderboard") + } + + public static var localizations: Self { + .init(rawValue: "localizations") + } + + public static var recurrenceDuration: Self { + .init(rawValue: "recurrenceDuration") + } + + public static var recurrenceRule: Self { + .init(rawValue: "recurrenceRule") + } + + public static var recurrenceStartDate: Self { + .init(rawValue: "recurrenceStartDate") + } + + public static var referenceName: Self { + .init(rawValue: "referenceName") + } + + public static var releases: Self { + .init(rawValue: "releases") + } + + public static var scoreRangeEnd: Self { + .init(rawValue: "scoreRangeEnd") + } + + public static var scoreRangeStart: Self { + .init(rawValue: "scoreRangeStart") + } + + public static var scoreSortType: Self { + .init(rawValue: "scoreSortType") + } + + public static var submissionType: Self { + .init(rawValue: "submissionType") + } + + public static var vendorIdentifier: Self { + .init(rawValue: "vendorIdentifier") + } + + public static var visibility: Self { + .init(rawValue: "visibility") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "archived": self = .archived - case "defaultFormatter": self = .defaultFormatter - case "gameCenterDetail": self = .gameCenterDetail - case "gameCenterGroup": self = .gameCenterGroup - case "gameCenterLeaderboardSets": self = .gameCenterLeaderboardSets - case "groupLeaderboard": self = .groupLeaderboard - case "localizations": self = .localizations - case "recurrenceDuration": self = .recurrenceDuration - case "recurrenceRule": self = .recurrenceRule - case "recurrenceStartDate": self = .recurrenceStartDate - case "referenceName": self = .referenceName - case "releases": self = .releases - case "scoreRangeEnd": self = .scoreRangeEnd - case "scoreRangeStart": self = .scoreRangeStart - case "scoreSortType": self = .scoreSortType - case "submissionType": self = .submissionType - case "vendorIdentifier": self = .vendorIdentifier - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } @@ -261,25 +300,23 @@ extension V1.GameCenterLeaderboards.ById.Localizations.GET { } } - public enum Include: Hashable, Codable, RawRepresentable { - case gameCenterLeaderboard - case gameCenterLeaderboardImage - case unknown(String) + public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var gameCenterLeaderboard: Self { + .init(rawValue: "gameCenterLeaderboard") + } + + public static var gameCenterLeaderboardImage: Self { + .init(rawValue: "gameCenterLeaderboardImage") + } - public var rawValue: String { - switch self { - case .gameCenterLeaderboard: return "gameCenterLeaderboard" - case .gameCenterLeaderboardImage: return "gameCenterLeaderboardImage" - case .unknown(let rawValue): return rawValue - } + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "gameCenterLeaderboard": self = .gameCenterLeaderboard - case "gameCenterLeaderboardImage": self = .gameCenterLeaderboardImage - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppPreOrders/ById/AppPreOrdersById.PATCH.7c9dbe6.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterLeaderboards/ById/Relationships/Activity/GameCenterLeaderboardsByIdRelationshipsActivity.PATCH.336d35f.generated.swift similarity index 74% rename from Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppPreOrders/ById/AppPreOrdersById.PATCH.7c9dbe6.generated.swift rename to Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterLeaderboards/ById/Relationships/Activity/GameCenterLeaderboardsByIdRelationshipsActivity.PATCH.336d35f.generated.swift index 36215e82..2da21a36 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppPreOrders/ById/AppPreOrdersById.PATCH.7c9dbe6.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterLeaderboards/ById/Relationships/Activity/GameCenterLeaderboardsByIdRelationshipsActivity.PATCH.336d35f.generated.swift @@ -6,20 +6,19 @@ import Foundation import FoundationNetworking #endif -extension V1.AppPreOrders.ById { - @available(*, deprecated) +extension V1.GameCenterLeaderboards.ById.Relationships.Activity { public struct PATCH: Endpoint { - public typealias Parameters = AppPreOrderUpdateRequest - public typealias Response = AppPreOrderResponse + public typealias Parameters = GameCenterLeaderboardActivityLinkageRequest + public typealias Response = Void public var path: String { - "/v1/appPreOrders/\(id)" + "/v1/gameCenterLeaderboards/\(id)/relationships/activity" } /// the id of the requested resource public var id: String - /// AppPreOrder representation + /// Related linkage public var parameters: Parameters public init( @@ -47,11 +46,12 @@ extension V1.AppPreOrders.ById { return urlRequest } - /// - Returns: **200**, Single AppPreOrder as `AppPreOrderResponse` - /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **422**, Unprocessable request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -59,10 +59,7 @@ extension V1.AppPreOrders.ById { } switch urlResponse.statusCode { - case 200: - return try jsonDecoder.decode(AppPreOrderResponse.self, from: data) - - case 400: + case 401: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 403: @@ -74,6 +71,12 @@ extension V1.AppPreOrders.ById { case 409: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 422: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterLeaderboards/ById/Relationships/Challenge/GameCenterLeaderboardsByIdRelationshipsChallenge.PATCH.9533bb8.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterLeaderboards/ById/Relationships/Challenge/GameCenterLeaderboardsByIdRelationshipsChallenge.PATCH.9533bb8.generated.swift new file mode 100644 index 00000000..d9e16d62 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterLeaderboards/ById/Relationships/Challenge/GameCenterLeaderboardsByIdRelationshipsChallenge.PATCH.9533bb8.generated.swift @@ -0,0 +1,87 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.GameCenterLeaderboards.ById.Relationships.Challenge { + public struct PATCH: Endpoint { + public typealias Parameters = GameCenterLeaderboardChallengeLinkageRequest + public typealias Response = Void + + public var path: String { + "/v1/gameCenterLeaderboards/\(id)/relationships/challenge" + } + + /// the id of the requested resource + public var id: String + + /// Related linkage + public var parameters: Parameters + + public init( + id: String, + parameters: Parameters + ) { + self.id = id + self.parameters = parameters + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "PATCH" + + var jsonEncoder: JSONEncoder { + let encoder = JSONEncoder() + return encoder + } + + urlRequest?.httpBody = try jsonEncoder.encode(parameters) + urlRequest?.setValue("application/json", forHTTPHeaderField: "Content-Type") + return urlRequest + } + + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **422**, Unprocessable request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 409: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 422: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterLeaderboards/ById/Relationships/GroupLeaderboard/GameCenterLeaderboardsByIdRelationshipsGroupLeaderboard.GET.6b8f8be.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterLeaderboards/ById/Relationships/GroupLeaderboard/GameCenterLeaderboardsByIdRelationshipsGroupLeaderboard.GET.6b8f8be.generated.swift index fdbd080a..e8dbfff2 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterLeaderboards/ById/Relationships/GroupLeaderboard/GameCenterLeaderboardsByIdRelationshipsGroupLeaderboard.GET.6b8f8be.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterLeaderboards/ById/Relationships/GroupLeaderboard/GameCenterLeaderboardsByIdRelationshipsGroupLeaderboard.GET.6b8f8be.generated.swift @@ -7,6 +7,7 @@ import FoundationNetworking #endif extension V1.GameCenterLeaderboards.ById.Relationships.GroupLeaderboard { + @available(*, deprecated) public struct GET: Endpoint { public typealias Response = GameCenterLeaderboardGroupLeaderboardLinkageResponse @@ -41,8 +42,10 @@ extension V1.GameCenterLeaderboards.ById.Relationships.GroupLeaderboard { /// - Returns: **200**, Related linkage as `GameCenterLeaderboardGroupLeaderboardLinkageResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -56,12 +59,18 @@ extension V1.GameCenterLeaderboards.ById.Relationships.GroupLeaderboard { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 404: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterLeaderboards/ById/Relationships/GroupLeaderboard/GameCenterLeaderboardsByIdRelationshipsGroupLeaderboard.PATCH.6b8f8be.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterLeaderboards/ById/Relationships/GroupLeaderboard/GameCenterLeaderboardsByIdRelationshipsGroupLeaderboard.PATCH.6b8f8be.generated.swift index e08d1b80..cf1c8b44 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterLeaderboards/ById/Relationships/GroupLeaderboard/GameCenterLeaderboardsByIdRelationshipsGroupLeaderboard.PATCH.6b8f8be.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterLeaderboards/ById/Relationships/GroupLeaderboard/GameCenterLeaderboardsByIdRelationshipsGroupLeaderboard.PATCH.6b8f8be.generated.swift @@ -7,6 +7,7 @@ import FoundationNetworking #endif extension V1.GameCenterLeaderboards.ById.Relationships.GroupLeaderboard { + @available(*, deprecated) public struct PATCH: Endpoint { public typealias Parameters = GameCenterLeaderboardGroupLeaderboardLinkageRequest public typealias Response = Void @@ -46,10 +47,12 @@ extension V1.GameCenterLeaderboards.ById.Relationships.GroupLeaderboard { return urlRequest } - /// - Returns: **204**, Success (no content) + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **422**, Unprocessable request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -57,8 +60,8 @@ extension V1.GameCenterLeaderboards.ById.Relationships.GroupLeaderboard { } switch urlResponse.statusCode { - case 204: - return + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) @@ -69,6 +72,12 @@ extension V1.GameCenterLeaderboards.ById.Relationships.GroupLeaderboard { case 409: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 422: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterLeaderboards/ById/Relationships/Localizations/GameCenterLeaderboardsByIdRelationshipsLocalizations.GET.0d8aed4.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterLeaderboards/ById/Relationships/Localizations/GameCenterLeaderboardsByIdRelationshipsLocalizations.GET.0d8aed4.generated.swift new file mode 100644 index 00000000..82a4c601 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterLeaderboards/ById/Relationships/Localizations/GameCenterLeaderboardsByIdRelationshipsLocalizations.GET.0d8aed4.generated.swift @@ -0,0 +1,88 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.GameCenterLeaderboards.ById.Relationships.Localizations { + public struct GET: Endpoint { + public typealias Response = GameCenterLeaderboardLocalizationsLinkagesResponse + + public var path: String { + "/v1/gameCenterLeaderboards/\(id)/relationships/localizations" + } + + /// the id of the requested resource + public var id: String + + public var parameters: Parameters = Parameters() + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + components?.queryItems = [ + URLQueryItem(name: "limit", + value: parameters.limit.map { "\($0)" }) + ].filter { $0.value != nil } + if components?.queryItems?.isEmpty ?? false { + components?.queryItems = nil + } + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "GET" + return urlRequest + } + + /// - Returns: **200**, List of related linkages as `GameCenterLeaderboardLocalizationsLinkagesResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(GameCenterLeaderboardLocalizationsLinkagesResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +extension V1.GameCenterLeaderboards.ById.Relationships.Localizations.GET { + public struct Parameters: Hashable { + /// maximum resources per page + public var limit: Int? + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterLeaderboards/ById/Relationships/Releases/GameCenterLeaderboardsByIdRelationshipsReleases.GET.b492f17.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterLeaderboards/ById/Relationships/Releases/GameCenterLeaderboardsByIdRelationshipsReleases.GET.b492f17.generated.swift new file mode 100644 index 00000000..f8f1a875 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterLeaderboards/ById/Relationships/Releases/GameCenterLeaderboardsByIdRelationshipsReleases.GET.b492f17.generated.swift @@ -0,0 +1,88 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.GameCenterLeaderboards.ById.Relationships.Releases { + public struct GET: Endpoint { + public typealias Response = GameCenterLeaderboardReleasesLinkagesResponse + + public var path: String { + "/v1/gameCenterLeaderboards/\(id)/relationships/releases" + } + + /// the id of the requested resource + public var id: String + + public var parameters: Parameters = Parameters() + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + components?.queryItems = [ + URLQueryItem(name: "limit", + value: parameters.limit.map { "\($0)" }) + ].filter { $0.value != nil } + if components?.queryItems?.isEmpty ?? false { + components?.queryItems = nil + } + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "GET" + return urlRequest + } + + /// - Returns: **200**, List of related linkages as `GameCenterLeaderboardReleasesLinkagesResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(GameCenterLeaderboardReleasesLinkagesResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +extension V1.GameCenterLeaderboards.ById.Relationships.Releases.GET { + public struct Parameters: Hashable { + /// maximum resources per page + public var limit: Int? + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterLeaderboards/ById/Releases/GameCenterLeaderboardsByIdReleases.GET.da84c20.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterLeaderboards/ById/Releases/GameCenterLeaderboardsByIdReleases.GET.da84c20.generated.swift index 5b400224..13bd082a 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterLeaderboards/ById/Releases/GameCenterLeaderboardsByIdReleases.GET.da84c20.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterLeaderboards/ById/Releases/GameCenterLeaderboardsByIdReleases.GET.da84c20.generated.swift @@ -54,8 +54,10 @@ extension V1.GameCenterLeaderboards.ById.Releases { /// - Returns: **200**, List of GameCenterLeaderboardReleases as `GameCenterLeaderboardReleasesResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -69,12 +71,18 @@ extension V1.GameCenterLeaderboards.ById.Releases { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 404: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -102,150 +110,207 @@ extension V1.GameCenterLeaderboards.ById.Releases.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum GameCenterDetails: Hashable, Codable, RawRepresentable { - case achievementReleases - case app - case arcadeEnabled - case challengeEnabled - case defaultGroupLeaderboard - case defaultLeaderboard - case gameCenterAchievements - case gameCenterAppVersions - case gameCenterGroup - case gameCenterLeaderboardSets - case gameCenterLeaderboards - case leaderboardReleases - case leaderboardSetReleases - case unknown(String) - - public var rawValue: String { - switch self { - case .achievementReleases: return "achievementReleases" - case .app: return "app" - case .arcadeEnabled: return "arcadeEnabled" - case .challengeEnabled: return "challengeEnabled" - case .defaultGroupLeaderboard: return "defaultGroupLeaderboard" - case .defaultLeaderboard: return "defaultLeaderboard" - case .gameCenterAchievements: return "gameCenterAchievements" - case .gameCenterAppVersions: return "gameCenterAppVersions" - case .gameCenterGroup: return "gameCenterGroup" - case .gameCenterLeaderboardSets: return "gameCenterLeaderboardSets" - case .gameCenterLeaderboards: return "gameCenterLeaderboards" - case .leaderboardReleases: return "leaderboardReleases" - case .leaderboardSetReleases: return "leaderboardSetReleases" - case .unknown(let rawValue): return rawValue - } + public struct GameCenterDetails: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var achievementReleases: Self { + .init(rawValue: "achievementReleases") + } + + public static var activityReleases: Self { + .init(rawValue: "activityReleases") + } + + public static var app: Self { + .init(rawValue: "app") + } + + public static var arcadeEnabled: Self { + .init(rawValue: "arcadeEnabled") + } + + public static var challengeEnabled: Self { + .init(rawValue: "challengeEnabled") + } + + public static var challengeReleases: Self { + .init(rawValue: "challengeReleases") + } + + public static var challengesMinimumPlatformVersions: Self { + .init(rawValue: "challengesMinimumPlatformVersions") + } + + public static var defaultGroupLeaderboard: Self { + .init(rawValue: "defaultGroupLeaderboard") + } + + public static var defaultLeaderboard: Self { + .init(rawValue: "defaultLeaderboard") + } + + public static var gameCenterAchievements: Self { + .init(rawValue: "gameCenterAchievements") + } + + public static var gameCenterActivities: Self { + .init(rawValue: "gameCenterActivities") } + public static var gameCenterAppVersions: Self { + .init(rawValue: "gameCenterAppVersions") + } + + public static var gameCenterChallenges: Self { + .init(rawValue: "gameCenterChallenges") + } + + public static var gameCenterGroup: Self { + .init(rawValue: "gameCenterGroup") + } + + public static var gameCenterLeaderboardSets: Self { + .init(rawValue: "gameCenterLeaderboardSets") + } + + public static var gameCenterLeaderboards: Self { + .init(rawValue: "gameCenterLeaderboards") + } + + public static var leaderboardReleases: Self { + .init(rawValue: "leaderboardReleases") + } + + public static var leaderboardSetReleases: Self { + .init(rawValue: "leaderboardSetReleases") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "achievementReleases": self = .achievementReleases - case "app": self = .app - case "arcadeEnabled": self = .arcadeEnabled - case "challengeEnabled": self = .challengeEnabled - case "defaultGroupLeaderboard": self = .defaultGroupLeaderboard - case "defaultLeaderboard": self = .defaultLeaderboard - case "gameCenterAchievements": self = .gameCenterAchievements - case "gameCenterAppVersions": self = .gameCenterAppVersions - case "gameCenterGroup": self = .gameCenterGroup - case "gameCenterLeaderboardSets": self = .gameCenterLeaderboardSets - case "gameCenterLeaderboards": self = .gameCenterLeaderboards - case "leaderboardReleases": self = .leaderboardReleases - case "leaderboardSetReleases": self = .leaderboardSetReleases - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum GameCenterLeaderboardReleases: Hashable, Codable, RawRepresentable { - case gameCenterDetail - case gameCenterLeaderboard - case live - case unknown(String) + public struct GameCenterLeaderboardReleases: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var gameCenterDetail: Self { + .init(rawValue: "gameCenterDetail") + } + + public static var gameCenterLeaderboard: Self { + .init(rawValue: "gameCenterLeaderboard") + } + + public static var live: Self { + .init(rawValue: "live") + } - public var rawValue: String { - switch self { - case .gameCenterDetail: return "gameCenterDetail" - case .gameCenterLeaderboard: return "gameCenterLeaderboard" - case .live: return "live" - case .unknown(let rawValue): return rawValue - } + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "gameCenterDetail": self = .gameCenterDetail - case "gameCenterLeaderboard": self = .gameCenterLeaderboard - case "live": self = .live - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum GameCenterLeaderboards: Hashable, Codable, RawRepresentable { - case archived - case defaultFormatter - case gameCenterDetail - case gameCenterGroup - case gameCenterLeaderboardSets - case groupLeaderboard - case localizations - case recurrenceDuration - case recurrenceRule - case recurrenceStartDate - case referenceName - case releases - case scoreRangeEnd - case scoreRangeStart - case scoreSortType - case submissionType - case vendorIdentifier - case unknown(String) - - public var rawValue: String { - switch self { - case .archived: return "archived" - case .defaultFormatter: return "defaultFormatter" - case .gameCenterDetail: return "gameCenterDetail" - case .gameCenterGroup: return "gameCenterGroup" - case .gameCenterLeaderboardSets: return "gameCenterLeaderboardSets" - case .groupLeaderboard: return "groupLeaderboard" - case .localizations: return "localizations" - case .recurrenceDuration: return "recurrenceDuration" - case .recurrenceRule: return "recurrenceRule" - case .recurrenceStartDate: return "recurrenceStartDate" - case .referenceName: return "referenceName" - case .releases: return "releases" - case .scoreRangeEnd: return "scoreRangeEnd" - case .scoreRangeStart: return "scoreRangeStart" - case .scoreSortType: return "scoreSortType" - case .submissionType: return "submissionType" - case .vendorIdentifier: return "vendorIdentifier" - case .unknown(let rawValue): return rawValue - } + public struct GameCenterLeaderboards: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var activity: Self { + .init(rawValue: "activity") + } + + public static var activityProperties: Self { + .init(rawValue: "activityProperties") + } + + public static var archived: Self { + .init(rawValue: "archived") + } + + public static var challenge: Self { + .init(rawValue: "challenge") + } + + public static var defaultFormatter: Self { + .init(rawValue: "defaultFormatter") + } + + public static var gameCenterDetail: Self { + .init(rawValue: "gameCenterDetail") + } + + public static var gameCenterGroup: Self { + .init(rawValue: "gameCenterGroup") + } + + public static var gameCenterLeaderboardSets: Self { + .init(rawValue: "gameCenterLeaderboardSets") + } + + public static var groupLeaderboard: Self { + .init(rawValue: "groupLeaderboard") + } + + public static var localizations: Self { + .init(rawValue: "localizations") + } + + public static var recurrenceDuration: Self { + .init(rawValue: "recurrenceDuration") + } + + public static var recurrenceRule: Self { + .init(rawValue: "recurrenceRule") + } + + public static var recurrenceStartDate: Self { + .init(rawValue: "recurrenceStartDate") + } + + public static var referenceName: Self { + .init(rawValue: "referenceName") + } + + public static var releases: Self { + .init(rawValue: "releases") + } + + public static var scoreRangeEnd: Self { + .init(rawValue: "scoreRangeEnd") + } + + public static var scoreRangeStart: Self { + .init(rawValue: "scoreRangeStart") + } + + public static var scoreSortType: Self { + .init(rawValue: "scoreSortType") + } + + public static var submissionType: Self { + .init(rawValue: "submissionType") + } + + public static var vendorIdentifier: Self { + .init(rawValue: "vendorIdentifier") + } + + public static var visibility: Self { + .init(rawValue: "visibility") } + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "archived": self = .archived - case "defaultFormatter": self = .defaultFormatter - case "gameCenterDetail": self = .gameCenterDetail - case "gameCenterGroup": self = .gameCenterGroup - case "gameCenterLeaderboardSets": self = .gameCenterLeaderboardSets - case "groupLeaderboard": self = .groupLeaderboard - case "localizations": self = .localizations - case "recurrenceDuration": self = .recurrenceDuration - case "recurrenceRule": self = .recurrenceRule - case "recurrenceStartDate": self = .recurrenceStartDate - case "referenceName": self = .referenceName - case "releases": self = .releases - case "scoreRangeEnd": self = .scoreRangeEnd - case "scoreRangeStart": self = .scoreRangeStart - case "scoreSortType": self = .scoreSortType - case "submissionType": self = .submissionType - case "vendorIdentifier": self = .vendorIdentifier - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } @@ -300,25 +365,23 @@ extension V1.GameCenterLeaderboards.ById.Releases.GET { } } - public enum Include: Hashable, Codable, RawRepresentable { - case gameCenterDetail - case gameCenterLeaderboard - case unknown(String) + public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var gameCenterDetail: Self { + .init(rawValue: "gameCenterDetail") + } - public var rawValue: String { - switch self { - case .gameCenterDetail: return "gameCenterDetail" - case .gameCenterLeaderboard: return "gameCenterLeaderboard" - case .unknown(let rawValue): return rawValue - } + public static var gameCenterLeaderboard: Self { + .init(rawValue: "gameCenterLeaderboard") + } + + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "gameCenterDetail": self = .gameCenterDetail - case "gameCenterLeaderboard": self = .gameCenterLeaderboard - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterLeaderboards/GameCenterLeaderboards.POST.97f27b8.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterLeaderboards/GameCenterLeaderboards.POST.97f27b8.generated.swift index 8d13a475..c43e746a 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterLeaderboards/GameCenterLeaderboards.POST.97f27b8.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterLeaderboards/GameCenterLeaderboards.POST.97f27b8.generated.swift @@ -41,8 +41,11 @@ extension V1.GameCenterLeaderboards { /// - Returns: **201**, Single GameCenterLeaderboard as `GameCenterLeaderboardResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **422**, Unprocessable request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -56,12 +59,21 @@ extension V1.GameCenterLeaderboards { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 409: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 422: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterMatchmakingQueues/ById/GameCenterMatchmakingQueuesById.DELETE.40e9852.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterMatchmakingQueues/ById/GameCenterMatchmakingQueuesById.DELETE.40e9852.generated.swift index 2c4bb401..8d6d5b0d 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterMatchmakingQueues/ById/GameCenterMatchmakingQueuesById.DELETE.40e9852.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterMatchmakingQueues/ById/GameCenterMatchmakingQueuesById.DELETE.40e9852.generated.swift @@ -31,11 +31,12 @@ extension V1.GameCenterMatchmakingQueues.ById { return urlRequest } - /// - Returns: **204**, Success (no content) /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -43,12 +44,12 @@ extension V1.GameCenterMatchmakingQueues.ById { } switch urlResponse.statusCode { - case 204: - return - case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) @@ -58,6 +59,9 @@ extension V1.GameCenterMatchmakingQueues.ById { case 409: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterMatchmakingQueues/ById/GameCenterMatchmakingQueuesById.GET.40e9852.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterMatchmakingQueues/ById/GameCenterMatchmakingQueuesById.GET.40e9852.generated.swift index 20d79862..9c4bb734 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterMatchmakingQueues/ById/GameCenterMatchmakingQueuesById.GET.40e9852.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterMatchmakingQueues/ById/GameCenterMatchmakingQueuesById.GET.40e9852.generated.swift @@ -44,8 +44,10 @@ extension V1.GameCenterMatchmakingQueues.ById { /// - Returns: **200**, Single GameCenterMatchmakingQueue as `GameCenterMatchmakingQueueResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -59,12 +61,18 @@ extension V1.GameCenterMatchmakingQueues.ById { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 404: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -87,28 +95,31 @@ extension V1.GameCenterMatchmakingQueues.ById.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum GameCenterMatchmakingQueues: Hashable, Codable, RawRepresentable { - case experimentRuleSet - case referenceName - case ruleSet - case unknown(String) - - public var rawValue: String { - switch self { - case .experimentRuleSet: return "experimentRuleSet" - case .referenceName: return "referenceName" - case .ruleSet: return "ruleSet" - case .unknown(let rawValue): return rawValue - } + public struct GameCenterMatchmakingQueues: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var classicMatchmakingBundleIds: Self { + .init(rawValue: "classicMatchmakingBundleIds") + } + + public static var experimentRuleSet: Self { + .init(rawValue: "experimentRuleSet") + } + + public static var referenceName: Self { + .init(rawValue: "referenceName") + } + + public static var ruleSet: Self { + .init(rawValue: "ruleSet") } + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "experimentRuleSet": self = .experimentRuleSet - case "referenceName": self = .referenceName - case "ruleSet": self = .ruleSet - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } @@ -126,25 +137,23 @@ extension V1.GameCenterMatchmakingQueues.ById.GET { } } - public enum Include: Hashable, Codable, RawRepresentable { - case experimentRuleSet - case ruleSet - case unknown(String) + public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var experimentRuleSet: Self { + .init(rawValue: "experimentRuleSet") + } - public var rawValue: String { - switch self { - case .experimentRuleSet: return "experimentRuleSet" - case .ruleSet: return "ruleSet" - case .unknown(let rawValue): return rawValue - } + public static var ruleSet: Self { + .init(rawValue: "ruleSet") } + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "experimentRuleSet": self = .experimentRuleSet - case "ruleSet": self = .ruleSet - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterMatchmakingQueues/ById/GameCenterMatchmakingQueuesById.PATCH.40e9852.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterMatchmakingQueues/ById/GameCenterMatchmakingQueuesById.PATCH.40e9852.generated.swift index 2055d79f..ec0225fa 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterMatchmakingQueues/ById/GameCenterMatchmakingQueuesById.PATCH.40e9852.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterMatchmakingQueues/ById/GameCenterMatchmakingQueuesById.PATCH.40e9852.generated.swift @@ -48,9 +48,12 @@ extension V1.GameCenterMatchmakingQueues.ById { /// - Returns: **200**, Single GameCenterMatchmakingQueue as `GameCenterMatchmakingQueueResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **422**, Unprocessable request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -64,6 +67,9 @@ extension V1.GameCenterMatchmakingQueues.ById { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) @@ -73,6 +79,12 @@ extension V1.GameCenterMatchmakingQueues.ById { case 409: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 422: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterMatchmakingQueues/ById/Metrics/ExperimentMatchmakingQueueSizes/GameCenterMatchmakingQueuesByIdMetricsExperimentMatchmakingQueueSizes.GET.b93214f.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterMatchmakingQueues/ById/Metrics/ExperimentMatchmakingQueueSizes/GameCenterMatchmakingQueuesByIdMetricsExperimentMatchmakingQueueSizes.GET.b93214f.generated.swift index 7e128bfe..bccd93bf 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterMatchmakingQueues/ById/Metrics/ExperimentMatchmakingQueueSizes/GameCenterMatchmakingQueuesByIdMetricsExperimentMatchmakingQueueSizes.GET.b93214f.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterMatchmakingQueues/ById/Metrics/ExperimentMatchmakingQueueSizes/GameCenterMatchmakingQueuesByIdMetricsExperimentMatchmakingQueueSizes.GET.b93214f.generated.swift @@ -29,7 +29,7 @@ extension V1.GameCenterMatchmakingQueues.ById.Metrics.ExperimentMatchmakingQueue components?.queryItems = [ URLQueryItem(name: "granularity", - value: parameters.granularity.map { "\($0)" }.joined(separator: ",")), + value: parameters.granularity.map { "\($0)" }), URLQueryItem(name: "limit", value: parameters.limit.map { "\($0)" }), URLQueryItem(name: "sort", @@ -46,8 +46,10 @@ extension V1.GameCenterMatchmakingQueues.ById.Metrics.ExperimentMatchmakingQueue /// - Returns: **200**, Metrics data response as `GameCenterMatchmakingQueueSizesV1MetricResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -61,12 +63,18 @@ extension V1.GameCenterMatchmakingQueues.ById.Metrics.ExperimentMatchmakingQueue case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 404: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -77,7 +85,7 @@ extension V1.GameCenterMatchmakingQueues.ById.Metrics.ExperimentMatchmakingQueue extension V1.GameCenterMatchmakingQueues.ById.Metrics.ExperimentMatchmakingQueueSizes.GET { public struct Parameters: Hashable { /// the granularity of the per-group dataset - public var granularity: [Granularity] = [] + public var granularity: Granularity? /// maximum number of groups to return per page public var limit: Int? @@ -85,68 +93,71 @@ extension V1.GameCenterMatchmakingQueues.ById.Metrics.ExperimentMatchmakingQueue /// comma-separated list of sort expressions; metrics will be sorted as specified public var sort: [Sort]? - public enum Granularity: Hashable, Codable, RawRepresentable { - case p1D - case pT15M - case pT1H - case unknown(String) + public struct Granularity: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var p1D: Self { + .init(rawValue: "P1D") + } + + public static var pT15M: Self { + .init(rawValue: "PT15M") + } + + public static var pT1H: Self { + .init(rawValue: "PT1H") + } - public var rawValue: String { - switch self { - case .p1D: return "P1D" - case .pT15M: return "PT15M" - case .pT1H: return "PT1H" - case .unknown(let rawValue): return rawValue - } + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "P1D": self = .p1D - case "PT15M": self = .pT15M - case "PT1H": self = .pT1H - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum Sort: Hashable, Codable, RawRepresentable { - case averageNumberOfRequests - case averageNumberOfRequestsDesc - case count - case countDesc - case p50NumberOfRequests - case p50NumberOfRequestsDesc - case p95NumberOfRequests - case p95NumberOfRequestsDesc - case unknown(String) - - public var rawValue: String { - switch self { - case .averageNumberOfRequests: return "averageNumberOfRequests" - case .averageNumberOfRequestsDesc: return "-averageNumberOfRequests" - case .count: return "count" - case .countDesc: return "-count" - case .p50NumberOfRequests: return "p50NumberOfRequests" - case .p50NumberOfRequestsDesc: return "-p50NumberOfRequests" - case .p95NumberOfRequests: return "p95NumberOfRequests" - case .p95NumberOfRequestsDesc: return "-p95NumberOfRequests" - case .unknown(let rawValue): return rawValue - } + public struct Sort: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var averageNumberOfRequests: Self { + .init(rawValue: "averageNumberOfRequests") + } + + public static var averageNumberOfRequestsDesc: Self { + .init(rawValue: "-averageNumberOfRequests") + } + + public static var count: Self { + .init(rawValue: "count") } + public static var countDesc: Self { + .init(rawValue: "-count") + } + + public static var p50NumberOfRequests: Self { + .init(rawValue: "p50NumberOfRequests") + } + + public static var p50NumberOfRequestsDesc: Self { + .init(rawValue: "-p50NumberOfRequests") + } + + public static var p95NumberOfRequests: Self { + .init(rawValue: "p95NumberOfRequests") + } + + public static var p95NumberOfRequestsDesc: Self { + .init(rawValue: "-p95NumberOfRequests") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "averageNumberOfRequests": self = .averageNumberOfRequests - case "-averageNumberOfRequests": self = .averageNumberOfRequestsDesc - case "count": self = .count - case "-count": self = .countDesc - case "p50NumberOfRequests": self = .p50NumberOfRequests - case "-p50NumberOfRequests": self = .p50NumberOfRequestsDesc - case "p95NumberOfRequests": self = .p95NumberOfRequests - case "-p95NumberOfRequests": self = .p95NumberOfRequestsDesc - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterMatchmakingQueues/ById/Metrics/ExperimentMatchmakingRequests/GameCenterMatchmakingQueuesByIdMetricsExperimentMatchmakingRequests.GET.114c537.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterMatchmakingQueues/ById/Metrics/ExperimentMatchmakingRequests/GameCenterMatchmakingQueuesByIdMetricsExperimentMatchmakingRequests.GET.114c537.generated.swift index 52e52e8a..f048c8ae 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterMatchmakingQueues/ById/Metrics/ExperimentMatchmakingRequests/GameCenterMatchmakingQueuesByIdMetricsExperimentMatchmakingRequests.GET.114c537.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterMatchmakingQueues/ById/Metrics/ExperimentMatchmakingRequests/GameCenterMatchmakingQueuesByIdMetricsExperimentMatchmakingRequests.GET.114c537.generated.swift @@ -33,7 +33,7 @@ extension V1.GameCenterMatchmakingQueues.ById.Metrics.ExperimentMatchmakingReque URLQueryItem(name: "filter[result]", value: parameters.filter[.result].map { "\($0)" }), URLQueryItem(name: "granularity", - value: parameters.granularity.map { "\($0)" }.joined(separator: ",")), + value: parameters.granularity.map { "\($0)" }), URLQueryItem(name: "groupBy", value: parameters.groupBy?.map { "\($0)" }.joined(separator: ",")), URLQueryItem(name: "limit", @@ -52,8 +52,10 @@ extension V1.GameCenterMatchmakingQueues.ById.Metrics.ExperimentMatchmakingReque /// - Returns: **200**, Metrics data response as `GameCenterMatchmakingQueueRequestsV1MetricResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -67,12 +69,18 @@ extension V1.GameCenterMatchmakingQueues.ById.Metrics.ExperimentMatchmakingReque case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 404: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -85,7 +93,7 @@ extension V1.GameCenterMatchmakingQueues.ById.Metrics.ExperimentMatchmakingReque public var filter: Filter = Filter() /// the granularity of the per-group dataset - public var granularity: [Granularity] = [] + public var granularity: Granularity? /// the dimension by which to group the results public var groupBy: [GroupBy]? @@ -104,28 +112,27 @@ extension V1.GameCenterMatchmakingQueues.ById.Metrics.ExperimentMatchmakingReque private var values: [AnyHashable: AnyHashable] = [:] - public enum Result: Hashable, Codable, RawRepresentable { - case canceled - case expired - case matched - case unknown(String) - - public var rawValue: String { - switch self { - case .canceled: return "CANCELED" - case .expired: return "EXPIRED" - case .matched: return "MATCHED" - case .unknown(let rawValue): return rawValue - } + public struct Result: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var canceled: Self { + .init(rawValue: "CANCELED") + } + + public static var expired: Self { + .init(rawValue: "EXPIRED") } + public static var matched: Self { + .init(rawValue: "MATCHED") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "CANCELED": self = .canceled - case "EXPIRED": self = .expired - case "MATCHED": self = .matched - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } @@ -148,90 +155,91 @@ extension V1.GameCenterMatchmakingQueues.ById.Metrics.ExperimentMatchmakingReque } } - public enum Granularity: Hashable, Codable, RawRepresentable { - case p1D - case pT15M - case pT1H - case unknown(String) - - public var rawValue: String { - switch self { - case .p1D: return "P1D" - case .pT15M: return "PT15M" - case .pT1H: return "PT1H" - case .unknown(let rawValue): return rawValue - } + public struct Granularity: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var p1D: Self { + .init(rawValue: "P1D") } + public static var pT15M: Self { + .init(rawValue: "PT15M") + } + + public static var pT1H: Self { + .init(rawValue: "PT1H") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "P1D": self = .p1D - case "PT15M": self = .pT15M - case "PT1H": self = .pT1H - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum GroupBy: Hashable, Codable, RawRepresentable { - case gameCenterDetail - case result - case unknown(String) + public struct GroupBy: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var gameCenterDetail: Self { + .init(rawValue: "gameCenterDetail") + } - public var rawValue: String { - switch self { - case .gameCenterDetail: return "gameCenterDetail" - case .result: return "result" - case .unknown(let rawValue): return rawValue - } + public static var result: Self { + .init(rawValue: "result") } + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "gameCenterDetail": self = .gameCenterDetail - case "result": self = .result - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum Sort: Hashable, Codable, RawRepresentable { - case averageSecondsInQueue - case averageSecondsInQueueDesc - case count - case countDesc - case p50SecondsInQueue - case p50SecondsInQueueDesc - case p95SecondsInQueue - case p95SecondsInQueueDesc - case unknown(String) - - public var rawValue: String { - switch self { - case .averageSecondsInQueue: return "averageSecondsInQueue" - case .averageSecondsInQueueDesc: return "-averageSecondsInQueue" - case .count: return "count" - case .countDesc: return "-count" - case .p50SecondsInQueue: return "p50SecondsInQueue" - case .p50SecondsInQueueDesc: return "-p50SecondsInQueue" - case .p95SecondsInQueue: return "p95SecondsInQueue" - case .p95SecondsInQueueDesc: return "-p95SecondsInQueue" - case .unknown(let rawValue): return rawValue - } + public struct Sort: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var averageSecondsInQueue: Self { + .init(rawValue: "averageSecondsInQueue") + } + + public static var averageSecondsInQueueDesc: Self { + .init(rawValue: "-averageSecondsInQueue") + } + + public static var count: Self { + .init(rawValue: "count") + } + + public static var countDesc: Self { + .init(rawValue: "-count") + } + + public static var p50SecondsInQueue: Self { + .init(rawValue: "p50SecondsInQueue") + } + + public static var p50SecondsInQueueDesc: Self { + .init(rawValue: "-p50SecondsInQueue") } + public static var p95SecondsInQueue: Self { + .init(rawValue: "p95SecondsInQueue") + } + + public static var p95SecondsInQueueDesc: Self { + .init(rawValue: "-p95SecondsInQueue") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "averageSecondsInQueue": self = .averageSecondsInQueue - case "-averageSecondsInQueue": self = .averageSecondsInQueueDesc - case "count": self = .count - case "-count": self = .countDesc - case "p50SecondsInQueue": self = .p50SecondsInQueue - case "-p50SecondsInQueue": self = .p50SecondsInQueueDesc - case "p95SecondsInQueue": self = .p95SecondsInQueue - case "-p95SecondsInQueue": self = .p95SecondsInQueueDesc - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterMatchmakingQueues/ById/Metrics/MatchmakingQueueSizes/GameCenterMatchmakingQueuesByIdMetricsMatchmakingQueueSizes.GET.c49fcc2.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterMatchmakingQueues/ById/Metrics/MatchmakingQueueSizes/GameCenterMatchmakingQueuesByIdMetricsMatchmakingQueueSizes.GET.c49fcc2.generated.swift index a6233250..a133c27d 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterMatchmakingQueues/ById/Metrics/MatchmakingQueueSizes/GameCenterMatchmakingQueuesByIdMetricsMatchmakingQueueSizes.GET.c49fcc2.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterMatchmakingQueues/ById/Metrics/MatchmakingQueueSizes/GameCenterMatchmakingQueuesByIdMetricsMatchmakingQueueSizes.GET.c49fcc2.generated.swift @@ -29,7 +29,7 @@ extension V1.GameCenterMatchmakingQueues.ById.Metrics.MatchmakingQueueSizes { components?.queryItems = [ URLQueryItem(name: "granularity", - value: parameters.granularity.map { "\($0)" }.joined(separator: ",")), + value: parameters.granularity.map { "\($0)" }), URLQueryItem(name: "limit", value: parameters.limit.map { "\($0)" }), URLQueryItem(name: "sort", @@ -46,8 +46,10 @@ extension V1.GameCenterMatchmakingQueues.ById.Metrics.MatchmakingQueueSizes { /// - Returns: **200**, Metrics data response as `GameCenterMatchmakingQueueSizesV1MetricResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -61,12 +63,18 @@ extension V1.GameCenterMatchmakingQueues.ById.Metrics.MatchmakingQueueSizes { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 404: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -77,7 +85,7 @@ extension V1.GameCenterMatchmakingQueues.ById.Metrics.MatchmakingQueueSizes { extension V1.GameCenterMatchmakingQueues.ById.Metrics.MatchmakingQueueSizes.GET { public struct Parameters: Hashable { /// the granularity of the per-group dataset - public var granularity: [Granularity] = [] + public var granularity: Granularity? /// maximum number of groups to return per page public var limit: Int? @@ -85,68 +93,71 @@ extension V1.GameCenterMatchmakingQueues.ById.Metrics.MatchmakingQueueSizes.GET /// comma-separated list of sort expressions; metrics will be sorted as specified public var sort: [Sort]? - public enum Granularity: Hashable, Codable, RawRepresentable { - case p1D - case pT15M - case pT1H - case unknown(String) + public struct Granularity: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var p1D: Self { + .init(rawValue: "P1D") + } + + public static var pT15M: Self { + .init(rawValue: "PT15M") + } + + public static var pT1H: Self { + .init(rawValue: "PT1H") + } - public var rawValue: String { - switch self { - case .p1D: return "P1D" - case .pT15M: return "PT15M" - case .pT1H: return "PT1H" - case .unknown(let rawValue): return rawValue - } + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "P1D": self = .p1D - case "PT15M": self = .pT15M - case "PT1H": self = .pT1H - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum Sort: Hashable, Codable, RawRepresentable { - case averageNumberOfRequests - case averageNumberOfRequestsDesc - case count - case countDesc - case p50NumberOfRequests - case p50NumberOfRequestsDesc - case p95NumberOfRequests - case p95NumberOfRequestsDesc - case unknown(String) - - public var rawValue: String { - switch self { - case .averageNumberOfRequests: return "averageNumberOfRequests" - case .averageNumberOfRequestsDesc: return "-averageNumberOfRequests" - case .count: return "count" - case .countDesc: return "-count" - case .p50NumberOfRequests: return "p50NumberOfRequests" - case .p50NumberOfRequestsDesc: return "-p50NumberOfRequests" - case .p95NumberOfRequests: return "p95NumberOfRequests" - case .p95NumberOfRequestsDesc: return "-p95NumberOfRequests" - case .unknown(let rawValue): return rawValue - } + public struct Sort: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var averageNumberOfRequests: Self { + .init(rawValue: "averageNumberOfRequests") + } + + public static var averageNumberOfRequestsDesc: Self { + .init(rawValue: "-averageNumberOfRequests") + } + + public static var count: Self { + .init(rawValue: "count") } + public static var countDesc: Self { + .init(rawValue: "-count") + } + + public static var p50NumberOfRequests: Self { + .init(rawValue: "p50NumberOfRequests") + } + + public static var p50NumberOfRequestsDesc: Self { + .init(rawValue: "-p50NumberOfRequests") + } + + public static var p95NumberOfRequests: Self { + .init(rawValue: "p95NumberOfRequests") + } + + public static var p95NumberOfRequestsDesc: Self { + .init(rawValue: "-p95NumberOfRequests") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "averageNumberOfRequests": self = .averageNumberOfRequests - case "-averageNumberOfRequests": self = .averageNumberOfRequestsDesc - case "count": self = .count - case "-count": self = .countDesc - case "p50NumberOfRequests": self = .p50NumberOfRequests - case "-p50NumberOfRequests": self = .p50NumberOfRequestsDesc - case "p95NumberOfRequests": self = .p95NumberOfRequests - case "-p95NumberOfRequests": self = .p95NumberOfRequestsDesc - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterMatchmakingQueues/ById/Metrics/MatchmakingRequests/GameCenterMatchmakingQueuesByIdMetricsMatchmakingRequests.GET.e14edf2.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterMatchmakingQueues/ById/Metrics/MatchmakingRequests/GameCenterMatchmakingQueuesByIdMetricsMatchmakingRequests.GET.e14edf2.generated.swift index 7341f1f5..eed059b5 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterMatchmakingQueues/ById/Metrics/MatchmakingRequests/GameCenterMatchmakingQueuesByIdMetricsMatchmakingRequests.GET.e14edf2.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterMatchmakingQueues/ById/Metrics/MatchmakingRequests/GameCenterMatchmakingQueuesByIdMetricsMatchmakingRequests.GET.e14edf2.generated.swift @@ -33,7 +33,7 @@ extension V1.GameCenterMatchmakingQueues.ById.Metrics.MatchmakingRequests { URLQueryItem(name: "filter[result]", value: parameters.filter[.result].map { "\($0)" }), URLQueryItem(name: "granularity", - value: parameters.granularity.map { "\($0)" }.joined(separator: ",")), + value: parameters.granularity.map { "\($0)" }), URLQueryItem(name: "groupBy", value: parameters.groupBy?.map { "\($0)" }.joined(separator: ",")), URLQueryItem(name: "limit", @@ -52,8 +52,10 @@ extension V1.GameCenterMatchmakingQueues.ById.Metrics.MatchmakingRequests { /// - Returns: **200**, Metrics data response as `GameCenterMatchmakingQueueRequestsV1MetricResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -67,12 +69,18 @@ extension V1.GameCenterMatchmakingQueues.ById.Metrics.MatchmakingRequests { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 404: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -85,7 +93,7 @@ extension V1.GameCenterMatchmakingQueues.ById.Metrics.MatchmakingRequests.GET { public var filter: Filter = Filter() /// the granularity of the per-group dataset - public var granularity: [Granularity] = [] + public var granularity: Granularity? /// the dimension by which to group the results public var groupBy: [GroupBy]? @@ -104,28 +112,27 @@ extension V1.GameCenterMatchmakingQueues.ById.Metrics.MatchmakingRequests.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum Result: Hashable, Codable, RawRepresentable { - case canceled - case expired - case matched - case unknown(String) - - public var rawValue: String { - switch self { - case .canceled: return "CANCELED" - case .expired: return "EXPIRED" - case .matched: return "MATCHED" - case .unknown(let rawValue): return rawValue - } + public struct Result: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var canceled: Self { + .init(rawValue: "CANCELED") + } + + public static var expired: Self { + .init(rawValue: "EXPIRED") } + public static var matched: Self { + .init(rawValue: "MATCHED") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "CANCELED": self = .canceled - case "EXPIRED": self = .expired - case "MATCHED": self = .matched - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } @@ -148,90 +155,91 @@ extension V1.GameCenterMatchmakingQueues.ById.Metrics.MatchmakingRequests.GET { } } - public enum Granularity: Hashable, Codable, RawRepresentable { - case p1D - case pT15M - case pT1H - case unknown(String) - - public var rawValue: String { - switch self { - case .p1D: return "P1D" - case .pT15M: return "PT15M" - case .pT1H: return "PT1H" - case .unknown(let rawValue): return rawValue - } + public struct Granularity: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var p1D: Self { + .init(rawValue: "P1D") } + public static var pT15M: Self { + .init(rawValue: "PT15M") + } + + public static var pT1H: Self { + .init(rawValue: "PT1H") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "P1D": self = .p1D - case "PT15M": self = .pT15M - case "PT1H": self = .pT1H - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum GroupBy: Hashable, Codable, RawRepresentable { - case gameCenterDetail - case result - case unknown(String) + public struct GroupBy: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var gameCenterDetail: Self { + .init(rawValue: "gameCenterDetail") + } - public var rawValue: String { - switch self { - case .gameCenterDetail: return "gameCenterDetail" - case .result: return "result" - case .unknown(let rawValue): return rawValue - } + public static var result: Self { + .init(rawValue: "result") } + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "gameCenterDetail": self = .gameCenterDetail - case "result": self = .result - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum Sort: Hashable, Codable, RawRepresentable { - case averageSecondsInQueue - case averageSecondsInQueueDesc - case count - case countDesc - case p50SecondsInQueue - case p50SecondsInQueueDesc - case p95SecondsInQueue - case p95SecondsInQueueDesc - case unknown(String) - - public var rawValue: String { - switch self { - case .averageSecondsInQueue: return "averageSecondsInQueue" - case .averageSecondsInQueueDesc: return "-averageSecondsInQueue" - case .count: return "count" - case .countDesc: return "-count" - case .p50SecondsInQueue: return "p50SecondsInQueue" - case .p50SecondsInQueueDesc: return "-p50SecondsInQueue" - case .p95SecondsInQueue: return "p95SecondsInQueue" - case .p95SecondsInQueueDesc: return "-p95SecondsInQueue" - case .unknown(let rawValue): return rawValue - } + public struct Sort: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var averageSecondsInQueue: Self { + .init(rawValue: "averageSecondsInQueue") + } + + public static var averageSecondsInQueueDesc: Self { + .init(rawValue: "-averageSecondsInQueue") + } + + public static var count: Self { + .init(rawValue: "count") + } + + public static var countDesc: Self { + .init(rawValue: "-count") + } + + public static var p50SecondsInQueue: Self { + .init(rawValue: "p50SecondsInQueue") + } + + public static var p50SecondsInQueueDesc: Self { + .init(rawValue: "-p50SecondsInQueue") } + public static var p95SecondsInQueue: Self { + .init(rawValue: "p95SecondsInQueue") + } + + public static var p95SecondsInQueueDesc: Self { + .init(rawValue: "-p95SecondsInQueue") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "averageSecondsInQueue": self = .averageSecondsInQueue - case "-averageSecondsInQueue": self = .averageSecondsInQueueDesc - case "count": self = .count - case "-count": self = .countDesc - case "p50SecondsInQueue": self = .p50SecondsInQueue - case "-p50SecondsInQueue": self = .p50SecondsInQueueDesc - case "p95SecondsInQueue": self = .p95SecondsInQueue - case "-p95SecondsInQueue": self = .p95SecondsInQueueDesc - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterMatchmakingQueues/ById/Metrics/MatchmakingSessions/GameCenterMatchmakingQueuesByIdMetricsMatchmakingSessions.GET.a4c9340.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterMatchmakingQueues/ById/Metrics/MatchmakingSessions/GameCenterMatchmakingQueuesByIdMetricsMatchmakingSessions.GET.a4c9340.generated.swift index 14ad99d5..f319b1a0 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterMatchmakingQueues/ById/Metrics/MatchmakingSessions/GameCenterMatchmakingQueuesByIdMetricsMatchmakingSessions.GET.a4c9340.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterMatchmakingQueues/ById/Metrics/MatchmakingSessions/GameCenterMatchmakingQueuesByIdMetricsMatchmakingSessions.GET.a4c9340.generated.swift @@ -29,7 +29,7 @@ extension V1.GameCenterMatchmakingQueues.ById.Metrics.MatchmakingSessions { components?.queryItems = [ URLQueryItem(name: "granularity", - value: parameters.granularity.map { "\($0)" }.joined(separator: ",")), + value: parameters.granularity.map { "\($0)" }), URLQueryItem(name: "limit", value: parameters.limit.map { "\($0)" }), URLQueryItem(name: "sort", @@ -46,8 +46,10 @@ extension V1.GameCenterMatchmakingQueues.ById.Metrics.MatchmakingSessions { /// - Returns: **200**, Metrics data response as `GameCenterMatchmakingSessionsV1MetricResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -61,12 +63,18 @@ extension V1.GameCenterMatchmakingQueues.ById.Metrics.MatchmakingSessions { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 404: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -77,7 +85,7 @@ extension V1.GameCenterMatchmakingQueues.ById.Metrics.MatchmakingSessions { extension V1.GameCenterMatchmakingQueues.ById.Metrics.MatchmakingSessions.GET { public struct Parameters: Hashable { /// the granularity of the per-group dataset - public var granularity: [Granularity] = [] + public var granularity: Granularity? /// maximum number of groups to return per page public var limit: Int? @@ -85,68 +93,71 @@ extension V1.GameCenterMatchmakingQueues.ById.Metrics.MatchmakingSessions.GET { /// comma-separated list of sort expressions; metrics will be sorted as specified public var sort: [Sort]? - public enum Granularity: Hashable, Codable, RawRepresentable { - case p1D - case pT15M - case pT1H - case unknown(String) + public struct Granularity: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var p1D: Self { + .init(rawValue: "P1D") + } + + public static var pT15M: Self { + .init(rawValue: "PT15M") + } + + public static var pT1H: Self { + .init(rawValue: "PT1H") + } - public var rawValue: String { - switch self { - case .p1D: return "P1D" - case .pT15M: return "PT15M" - case .pT1H: return "PT1H" - case .unknown(let rawValue): return rawValue - } + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "P1D": self = .p1D - case "PT15M": self = .pT15M - case "PT1H": self = .pT1H - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum Sort: Hashable, Codable, RawRepresentable { - case averagePlayerCount - case averagePlayerCountDesc - case count - case countDesc - case p50PlayerCount - case p50PlayerCountDesc - case p95PlayerCount - case p95PlayerCountDesc - case unknown(String) - - public var rawValue: String { - switch self { - case .averagePlayerCount: return "averagePlayerCount" - case .averagePlayerCountDesc: return "-averagePlayerCount" - case .count: return "count" - case .countDesc: return "-count" - case .p50PlayerCount: return "p50PlayerCount" - case .p50PlayerCountDesc: return "-p50PlayerCount" - case .p95PlayerCount: return "p95PlayerCount" - case .p95PlayerCountDesc: return "-p95PlayerCount" - case .unknown(let rawValue): return rawValue - } + public struct Sort: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var averagePlayerCount: Self { + .init(rawValue: "averagePlayerCount") + } + + public static var averagePlayerCountDesc: Self { + .init(rawValue: "-averagePlayerCount") + } + + public static var count: Self { + .init(rawValue: "count") } + public static var countDesc: Self { + .init(rawValue: "-count") + } + + public static var p50PlayerCount: Self { + .init(rawValue: "p50PlayerCount") + } + + public static var p50PlayerCountDesc: Self { + .init(rawValue: "-p50PlayerCount") + } + + public static var p95PlayerCount: Self { + .init(rawValue: "p95PlayerCount") + } + + public static var p95PlayerCountDesc: Self { + .init(rawValue: "-p95PlayerCount") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "averagePlayerCount": self = .averagePlayerCount - case "-averagePlayerCount": self = .averagePlayerCountDesc - case "count": self = .count - case "-count": self = .countDesc - case "p50PlayerCount": self = .p50PlayerCount - case "-p50PlayerCount": self = .p50PlayerCountDesc - case "p95PlayerCount": self = .p95PlayerCount - case "-p95PlayerCount": self = .p95PlayerCountDesc - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterMatchmakingQueues/GameCenterMatchmakingQueues.GET.906e511.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterMatchmakingQueues/GameCenterMatchmakingQueues.GET.906e511.generated.swift index ade925d4..5e5ff9f9 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterMatchmakingQueues/GameCenterMatchmakingQueues.GET.906e511.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterMatchmakingQueues/GameCenterMatchmakingQueues.GET.906e511.generated.swift @@ -43,7 +43,9 @@ extension V1.GameCenterMatchmakingQueues { /// - Returns: **200**, List of GameCenterMatchmakingQueues as `GameCenterMatchmakingQueuesResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -57,9 +59,15 @@ extension V1.GameCenterMatchmakingQueues { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -85,28 +93,31 @@ extension V1.GameCenterMatchmakingQueues.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum GameCenterMatchmakingQueues: Hashable, Codable, RawRepresentable { - case experimentRuleSet - case referenceName - case ruleSet - case unknown(String) - - public var rawValue: String { - switch self { - case .experimentRuleSet: return "experimentRuleSet" - case .referenceName: return "referenceName" - case .ruleSet: return "ruleSet" - case .unknown(let rawValue): return rawValue - } + public struct GameCenterMatchmakingQueues: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var classicMatchmakingBundleIds: Self { + .init(rawValue: "classicMatchmakingBundleIds") + } + + public static var experimentRuleSet: Self { + .init(rawValue: "experimentRuleSet") + } + + public static var referenceName: Self { + .init(rawValue: "referenceName") + } + + public static var ruleSet: Self { + .init(rawValue: "ruleSet") } + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "experimentRuleSet": self = .experimentRuleSet - case "referenceName": self = .referenceName - case "ruleSet": self = .ruleSet - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } @@ -124,25 +135,23 @@ extension V1.GameCenterMatchmakingQueues.GET { } } - public enum Include: Hashable, Codable, RawRepresentable { - case experimentRuleSet - case ruleSet - case unknown(String) + public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var experimentRuleSet: Self { + .init(rawValue: "experimentRuleSet") + } - public var rawValue: String { - switch self { - case .experimentRuleSet: return "experimentRuleSet" - case .ruleSet: return "ruleSet" - case .unknown(let rawValue): return rawValue - } + public static var ruleSet: Self { + .init(rawValue: "ruleSet") } + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "experimentRuleSet": self = .experimentRuleSet - case "ruleSet": self = .ruleSet - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterMatchmakingQueues/GameCenterMatchmakingQueues.POST.906e511.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterMatchmakingQueues/GameCenterMatchmakingQueues.POST.906e511.generated.swift index 9a0372fe..fab21e72 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterMatchmakingQueues/GameCenterMatchmakingQueues.POST.906e511.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterMatchmakingQueues/GameCenterMatchmakingQueues.POST.906e511.generated.swift @@ -41,8 +41,11 @@ extension V1.GameCenterMatchmakingQueues { /// - Returns: **201**, Single GameCenterMatchmakingQueue as `GameCenterMatchmakingQueueResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **422**, Unprocessable request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -56,12 +59,21 @@ extension V1.GameCenterMatchmakingQueues { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 409: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 422: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterMatchmakingRuleSetTests/GameCenterMatchmakingRuleSetTests.POST.5b6028a.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterMatchmakingRuleSetTests/GameCenterMatchmakingRuleSetTests.POST.5b6028a.generated.swift index 65163f8a..62754ea2 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterMatchmakingRuleSetTests/GameCenterMatchmakingRuleSetTests.POST.5b6028a.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterMatchmakingRuleSetTests/GameCenterMatchmakingRuleSetTests.POST.5b6028a.generated.swift @@ -41,8 +41,11 @@ extension V1.GameCenterMatchmakingRuleSetTests { /// - Returns: **201**, Single GameCenterMatchmakingRuleSetTest as `GameCenterMatchmakingRuleSetTestResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **422**, Unprocessable request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -56,12 +59,21 @@ extension V1.GameCenterMatchmakingRuleSetTests { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 409: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 422: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterMatchmakingRuleSets/ById/GameCenterMatchmakingRuleSetsById.DELETE.c70f4a2.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterMatchmakingRuleSets/ById/GameCenterMatchmakingRuleSetsById.DELETE.c70f4a2.generated.swift index 7e1b7099..78f1c792 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterMatchmakingRuleSets/ById/GameCenterMatchmakingRuleSetsById.DELETE.c70f4a2.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterMatchmakingRuleSets/ById/GameCenterMatchmakingRuleSetsById.DELETE.c70f4a2.generated.swift @@ -31,11 +31,12 @@ extension V1.GameCenterMatchmakingRuleSets.ById { return urlRequest } - /// - Returns: **204**, Success (no content) /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -43,12 +44,12 @@ extension V1.GameCenterMatchmakingRuleSets.ById { } switch urlResponse.statusCode { - case 204: - return - case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) @@ -58,6 +59,9 @@ extension V1.GameCenterMatchmakingRuleSets.ById { case 409: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterMatchmakingRuleSets/ById/GameCenterMatchmakingRuleSetsById.GET.c70f4a2.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterMatchmakingRuleSets/ById/GameCenterMatchmakingRuleSetsById.GET.c70f4a2.generated.swift index c9001b25..ee5ceb91 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterMatchmakingRuleSets/ById/GameCenterMatchmakingRuleSetsById.GET.c70f4a2.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterMatchmakingRuleSets/ById/GameCenterMatchmakingRuleSetsById.GET.c70f4a2.generated.swift @@ -56,8 +56,10 @@ extension V1.GameCenterMatchmakingRuleSets.ById { /// - Returns: **200**, Single GameCenterMatchmakingRuleSet as `GameCenterMatchmakingRuleSetResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -71,12 +73,18 @@ extension V1.GameCenterMatchmakingRuleSets.ById { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 404: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -101,127 +109,127 @@ extension V1.GameCenterMatchmakingRuleSets.ById.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum GameCenterMatchmakingQueues: Hashable, Codable, RawRepresentable { - case experimentRuleSet - case referenceName - case ruleSet - case unknown(String) + public struct GameCenterMatchmakingQueues: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var classicMatchmakingBundleIds: Self { + .init(rawValue: "classicMatchmakingBundleIds") + } + + public static var experimentRuleSet: Self { + .init(rawValue: "experimentRuleSet") + } - public var rawValue: String { - switch self { - case .experimentRuleSet: return "experimentRuleSet" - case .referenceName: return "referenceName" - case .ruleSet: return "ruleSet" - case .unknown(let rawValue): return rawValue - } + public static var referenceName: Self { + .init(rawValue: "referenceName") } + public static var ruleSet: Self { + .init(rawValue: "ruleSet") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "experimentRuleSet": self = .experimentRuleSet - case "referenceName": self = .referenceName - case "ruleSet": self = .ruleSet - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum GameCenterMatchmakingRuleSets: Hashable, Codable, RawRepresentable { - case matchmakingQueues - case maxPlayers - case minPlayers - case referenceName - case ruleLanguageVersion - case rules - case teams - case unknown(String) - - public var rawValue: String { - switch self { - case .matchmakingQueues: return "matchmakingQueues" - case .maxPlayers: return "maxPlayers" - case .minPlayers: return "minPlayers" - case .referenceName: return "referenceName" - case .ruleLanguageVersion: return "ruleLanguageVersion" - case .rules: return "rules" - case .teams: return "teams" - case .unknown(let rawValue): return rawValue - } + public struct GameCenterMatchmakingRuleSets: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var matchmakingQueues: Self { + .init(rawValue: "matchmakingQueues") + } + + public static var maxPlayers: Self { + .init(rawValue: "maxPlayers") + } + + public static var minPlayers: Self { + .init(rawValue: "minPlayers") + } + + public static var referenceName: Self { + .init(rawValue: "referenceName") + } + + public static var ruleLanguageVersion: Self { + .init(rawValue: "ruleLanguageVersion") + } + + public static var rules: Self { + .init(rawValue: "rules") + } + + public static var teams: Self { + .init(rawValue: "teams") + } + + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "matchmakingQueues": self = .matchmakingQueues - case "maxPlayers": self = .maxPlayers - case "minPlayers": self = .minPlayers - case "referenceName": self = .referenceName - case "ruleLanguageVersion": self = .ruleLanguageVersion - case "rules": self = .rules - case "teams": self = .teams - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum GameCenterMatchmakingRules: Hashable, Codable, RawRepresentable { - case description - case expression - case referenceName - case ruleSet - case type - case weight - case unknown(String) - - public var rawValue: String { - switch self { - case .description: return "description" - case .expression: return "expression" - case .referenceName: return "referenceName" - case .ruleSet: return "ruleSet" - case .type: return "type" - case .weight: return "weight" - case .unknown(let rawValue): return rawValue - } + public struct GameCenterMatchmakingRules: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var description: Self { + .init(rawValue: "description") + } + + public static var expression: Self { + .init(rawValue: "expression") + } + + public static var referenceName: Self { + .init(rawValue: "referenceName") + } + + public static var type: Self { + .init(rawValue: "type") } + public static var weight: Self { + .init(rawValue: "weight") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "description": self = .description - case "expression": self = .expression - case "referenceName": self = .referenceName - case "ruleSet": self = .ruleSet - case "type": self = .type - case "weight": self = .weight - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum GameCenterMatchmakingTeams: Hashable, Codable, RawRepresentable { - case maxPlayers - case minPlayers - case referenceName - case ruleSet - case unknown(String) + public struct GameCenterMatchmakingTeams: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var maxPlayers: Self { + .init(rawValue: "maxPlayers") + } + + public static var minPlayers: Self { + .init(rawValue: "minPlayers") + } + + public static var referenceName: Self { + .init(rawValue: "referenceName") + } - public var rawValue: String { - switch self { - case .maxPlayers: return "maxPlayers" - case .minPlayers: return "minPlayers" - case .referenceName: return "referenceName" - case .ruleSet: return "ruleSet" - case .unknown(let rawValue): return rawValue - } + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "maxPlayers": self = .maxPlayers - case "minPlayers": self = .minPlayers - case "referenceName": self = .referenceName - case "ruleSet": self = .ruleSet - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } @@ -254,28 +262,27 @@ extension V1.GameCenterMatchmakingRuleSets.ById.GET { } } - public enum Include: Hashable, Codable, RawRepresentable { - case matchmakingQueues - case rules - case teams - case unknown(String) + public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var matchmakingQueues: Self { + .init(rawValue: "matchmakingQueues") + } - public var rawValue: String { - switch self { - case .matchmakingQueues: return "matchmakingQueues" - case .rules: return "rules" - case .teams: return "teams" - case .unknown(let rawValue): return rawValue - } + public static var rules: Self { + .init(rawValue: "rules") } + public static var teams: Self { + .init(rawValue: "teams") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "matchmakingQueues": self = .matchmakingQueues - case "rules": self = .rules - case "teams": self = .teams - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterMatchmakingRuleSets/ById/GameCenterMatchmakingRuleSetsById.PATCH.c70f4a2.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterMatchmakingRuleSets/ById/GameCenterMatchmakingRuleSetsById.PATCH.c70f4a2.generated.swift index eeba3a47..74866967 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterMatchmakingRuleSets/ById/GameCenterMatchmakingRuleSetsById.PATCH.c70f4a2.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterMatchmakingRuleSets/ById/GameCenterMatchmakingRuleSetsById.PATCH.c70f4a2.generated.swift @@ -48,9 +48,12 @@ extension V1.GameCenterMatchmakingRuleSets.ById { /// - Returns: **200**, Single GameCenterMatchmakingRuleSet as `GameCenterMatchmakingRuleSetResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **422**, Unprocessable request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -64,6 +67,9 @@ extension V1.GameCenterMatchmakingRuleSets.ById { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) @@ -73,6 +79,12 @@ extension V1.GameCenterMatchmakingRuleSets.ById { case 409: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 422: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterMatchmakingRuleSets/ById/MatchmakingQueues/GameCenterMatchmakingRuleSetsByIdMatchmakingQueues.GET.26f697c.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterMatchmakingRuleSets/ById/MatchmakingQueues/GameCenterMatchmakingRuleSetsByIdMatchmakingQueues.GET.26f697c.generated.swift index b7171235..a99042cc 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterMatchmakingRuleSets/ById/MatchmakingQueues/GameCenterMatchmakingRuleSetsByIdMatchmakingQueues.GET.26f697c.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterMatchmakingRuleSets/ById/MatchmakingQueues/GameCenterMatchmakingRuleSetsByIdMatchmakingQueues.GET.26f697c.generated.swift @@ -48,8 +48,10 @@ extension V1.GameCenterMatchmakingRuleSets.ById.MatchmakingQueues { /// - Returns: **200**, List of GameCenterMatchmakingQueues as `GameCenterMatchmakingQueuesResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -63,12 +65,18 @@ extension V1.GameCenterMatchmakingRuleSets.ById.MatchmakingQueues { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 404: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -94,65 +102,71 @@ extension V1.GameCenterMatchmakingRuleSets.ById.MatchmakingQueues.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum GameCenterMatchmakingQueues: Hashable, Codable, RawRepresentable { - case experimentRuleSet - case referenceName - case ruleSet - case unknown(String) + public struct GameCenterMatchmakingQueues: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var classicMatchmakingBundleIds: Self { + .init(rawValue: "classicMatchmakingBundleIds") + } + + public static var experimentRuleSet: Self { + .init(rawValue: "experimentRuleSet") + } + + public static var referenceName: Self { + .init(rawValue: "referenceName") + } - public var rawValue: String { - switch self { - case .experimentRuleSet: return "experimentRuleSet" - case .referenceName: return "referenceName" - case .ruleSet: return "ruleSet" - case .unknown(let rawValue): return rawValue - } + public static var ruleSet: Self { + .init(rawValue: "ruleSet") } + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "experimentRuleSet": self = .experimentRuleSet - case "referenceName": self = .referenceName - case "ruleSet": self = .ruleSet - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum GameCenterMatchmakingRuleSets: Hashable, Codable, RawRepresentable { - case matchmakingQueues - case maxPlayers - case minPlayers - case referenceName - case ruleLanguageVersion - case rules - case teams - case unknown(String) - - public var rawValue: String { - switch self { - case .matchmakingQueues: return "matchmakingQueues" - case .maxPlayers: return "maxPlayers" - case .minPlayers: return "minPlayers" - case .referenceName: return "referenceName" - case .ruleLanguageVersion: return "ruleLanguageVersion" - case .rules: return "rules" - case .teams: return "teams" - case .unknown(let rawValue): return rawValue - } + public struct GameCenterMatchmakingRuleSets: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var matchmakingQueues: Self { + .init(rawValue: "matchmakingQueues") + } + + public static var maxPlayers: Self { + .init(rawValue: "maxPlayers") + } + + public static var minPlayers: Self { + .init(rawValue: "minPlayers") } + public static var referenceName: Self { + .init(rawValue: "referenceName") + } + + public static var ruleLanguageVersion: Self { + .init(rawValue: "ruleLanguageVersion") + } + + public static var rules: Self { + .init(rawValue: "rules") + } + + public static var teams: Self { + .init(rawValue: "teams") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "matchmakingQueues": self = .matchmakingQueues - case "maxPlayers": self = .maxPlayers - case "minPlayers": self = .minPlayers - case "referenceName": self = .referenceName - case "ruleLanguageVersion": self = .ruleLanguageVersion - case "rules": self = .rules - case "teams": self = .teams - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } @@ -175,25 +189,23 @@ extension V1.GameCenterMatchmakingRuleSets.ById.MatchmakingQueues.GET { } } - public enum Include: Hashable, Codable, RawRepresentable { - case experimentRuleSet - case ruleSet - case unknown(String) + public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var experimentRuleSet: Self { + .init(rawValue: "experimentRuleSet") + } - public var rawValue: String { - switch self { - case .experimentRuleSet: return "experimentRuleSet" - case .ruleSet: return "ruleSet" - case .unknown(let rawValue): return rawValue - } + public static var ruleSet: Self { + .init(rawValue: "ruleSet") } + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "experimentRuleSet": self = .experimentRuleSet - case "ruleSet": self = .ruleSet - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterMatchmakingRuleSets/ById/Relationships/MatchmakingQueues/GameCenterMatchmakingRuleSetsByIdRelationshipsMatchmakingQueues.GET.21e41b7.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterMatchmakingRuleSets/ById/Relationships/MatchmakingQueues/GameCenterMatchmakingRuleSetsByIdRelationshipsMatchmakingQueues.GET.21e41b7.generated.swift new file mode 100644 index 00000000..e08fac8d --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterMatchmakingRuleSets/ById/Relationships/MatchmakingQueues/GameCenterMatchmakingRuleSetsByIdRelationshipsMatchmakingQueues.GET.21e41b7.generated.swift @@ -0,0 +1,88 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.GameCenterMatchmakingRuleSets.ById.Relationships.MatchmakingQueues { + public struct GET: Endpoint { + public typealias Response = GameCenterMatchmakingRuleSetMatchmakingQueuesLinkagesResponse + + public var path: String { + "/v1/gameCenterMatchmakingRuleSets/\(id)/relationships/matchmakingQueues" + } + + /// the id of the requested resource + public var id: String + + public var parameters: Parameters = Parameters() + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + components?.queryItems = [ + URLQueryItem(name: "limit", + value: parameters.limit.map { "\($0)" }) + ].filter { $0.value != nil } + if components?.queryItems?.isEmpty ?? false { + components?.queryItems = nil + } + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "GET" + return urlRequest + } + + /// - Returns: **200**, List of related linkages as `GameCenterMatchmakingRuleSetMatchmakingQueuesLinkagesResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(GameCenterMatchmakingRuleSetMatchmakingQueuesLinkagesResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +extension V1.GameCenterMatchmakingRuleSets.ById.Relationships.MatchmakingQueues.GET { + public struct Parameters: Hashable { + /// maximum resources per page + public var limit: Int? + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterMatchmakingRuleSets/ById/Relationships/Rules/GameCenterMatchmakingRuleSetsByIdRelationshipsRules.GET.109bd75.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterMatchmakingRuleSets/ById/Relationships/Rules/GameCenterMatchmakingRuleSetsByIdRelationshipsRules.GET.109bd75.generated.swift new file mode 100644 index 00000000..fbb02235 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterMatchmakingRuleSets/ById/Relationships/Rules/GameCenterMatchmakingRuleSetsByIdRelationshipsRules.GET.109bd75.generated.swift @@ -0,0 +1,88 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.GameCenterMatchmakingRuleSets.ById.Relationships.Rules { + public struct GET: Endpoint { + public typealias Response = GameCenterMatchmakingRuleSetRulesLinkagesResponse + + public var path: String { + "/v1/gameCenterMatchmakingRuleSets/\(id)/relationships/rules" + } + + /// the id of the requested resource + public var id: String + + public var parameters: Parameters = Parameters() + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + components?.queryItems = [ + URLQueryItem(name: "limit", + value: parameters.limit.map { "\($0)" }) + ].filter { $0.value != nil } + if components?.queryItems?.isEmpty ?? false { + components?.queryItems = nil + } + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "GET" + return urlRequest + } + + /// - Returns: **200**, List of related linkages as `GameCenterMatchmakingRuleSetRulesLinkagesResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(GameCenterMatchmakingRuleSetRulesLinkagesResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +extension V1.GameCenterMatchmakingRuleSets.ById.Relationships.Rules.GET { + public struct Parameters: Hashable { + /// maximum resources per page + public var limit: Int? + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterMatchmakingRuleSets/ById/Relationships/Teams/GameCenterMatchmakingRuleSetsByIdRelationshipsTeams.GET.638b2b8.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterMatchmakingRuleSets/ById/Relationships/Teams/GameCenterMatchmakingRuleSetsByIdRelationshipsTeams.GET.638b2b8.generated.swift new file mode 100644 index 00000000..185ae841 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterMatchmakingRuleSets/ById/Relationships/Teams/GameCenterMatchmakingRuleSetsByIdRelationshipsTeams.GET.638b2b8.generated.swift @@ -0,0 +1,88 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.GameCenterMatchmakingRuleSets.ById.Relationships.Teams { + public struct GET: Endpoint { + public typealias Response = GameCenterMatchmakingRuleSetTeamsLinkagesResponse + + public var path: String { + "/v1/gameCenterMatchmakingRuleSets/\(id)/relationships/teams" + } + + /// the id of the requested resource + public var id: String + + public var parameters: Parameters = Parameters() + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + components?.queryItems = [ + URLQueryItem(name: "limit", + value: parameters.limit.map { "\($0)" }) + ].filter { $0.value != nil } + if components?.queryItems?.isEmpty ?? false { + components?.queryItems = nil + } + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "GET" + return urlRequest + } + + /// - Returns: **200**, List of related linkages as `GameCenterMatchmakingRuleSetTeamsLinkagesResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(GameCenterMatchmakingRuleSetTeamsLinkagesResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +extension V1.GameCenterMatchmakingRuleSets.ById.Relationships.Teams.GET { + public struct Parameters: Hashable { + /// maximum resources per page + public var limit: Int? + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterMatchmakingRuleSets/ById/Rules/GameCenterMatchmakingRuleSetsByIdRules.GET.9a5e9ae.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterMatchmakingRuleSets/ById/Rules/GameCenterMatchmakingRuleSetsByIdRules.GET.9a5e9ae.generated.swift index 264ed3da..fe5b1b9f 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterMatchmakingRuleSets/ById/Rules/GameCenterMatchmakingRuleSetsByIdRules.GET.9a5e9ae.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterMatchmakingRuleSets/ById/Rules/GameCenterMatchmakingRuleSetsByIdRules.GET.9a5e9ae.generated.swift @@ -44,8 +44,10 @@ extension V1.GameCenterMatchmakingRuleSets.ById.Rules { /// - Returns: **200**, List of GameCenterMatchmakingRules as `GameCenterMatchmakingRulesResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -59,12 +61,18 @@ extension V1.GameCenterMatchmakingRuleSets.ById.Rules { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 404: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -87,37 +95,35 @@ extension V1.GameCenterMatchmakingRuleSets.ById.Rules.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum GameCenterMatchmakingRules: Hashable, Codable, RawRepresentable { - case description - case expression - case referenceName - case ruleSet - case type - case weight - case unknown(String) - - public var rawValue: String { - switch self { - case .description: return "description" - case .expression: return "expression" - case .referenceName: return "referenceName" - case .ruleSet: return "ruleSet" - case .type: return "type" - case .weight: return "weight" - case .unknown(let rawValue): return rawValue - } + public struct GameCenterMatchmakingRules: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var description: Self { + .init(rawValue: "description") + } + + public static var expression: Self { + .init(rawValue: "expression") + } + + public static var referenceName: Self { + .init(rawValue: "referenceName") } + public static var type: Self { + .init(rawValue: "type") + } + + public static var weight: Self { + .init(rawValue: "weight") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "description": self = .description - case "expression": self = .expression - case "referenceName": self = .referenceName - case "ruleSet": self = .ruleSet - case "type": self = .type - case "weight": self = .weight - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterMatchmakingRuleSets/ById/Teams/GameCenterMatchmakingRuleSetsByIdTeams.GET.66c196f.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterMatchmakingRuleSets/ById/Teams/GameCenterMatchmakingRuleSetsByIdTeams.GET.66c196f.generated.swift index 6c59e730..5648add3 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterMatchmakingRuleSets/ById/Teams/GameCenterMatchmakingRuleSetsByIdTeams.GET.66c196f.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterMatchmakingRuleSets/ById/Teams/GameCenterMatchmakingRuleSetsByIdTeams.GET.66c196f.generated.swift @@ -44,8 +44,10 @@ extension V1.GameCenterMatchmakingRuleSets.ById.Teams { /// - Returns: **200**, List of GameCenterMatchmakingTeams as `GameCenterMatchmakingTeamsResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -59,12 +61,18 @@ extension V1.GameCenterMatchmakingRuleSets.ById.Teams { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 404: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -87,31 +95,27 @@ extension V1.GameCenterMatchmakingRuleSets.ById.Teams.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum GameCenterMatchmakingTeams: Hashable, Codable, RawRepresentable { - case maxPlayers - case minPlayers - case referenceName - case ruleSet - case unknown(String) - - public var rawValue: String { - switch self { - case .maxPlayers: return "maxPlayers" - case .minPlayers: return "minPlayers" - case .referenceName: return "referenceName" - case .ruleSet: return "ruleSet" - case .unknown(let rawValue): return rawValue - } + public struct GameCenterMatchmakingTeams: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var maxPlayers: Self { + .init(rawValue: "maxPlayers") + } + + public static var minPlayers: Self { + .init(rawValue: "minPlayers") } + public static var referenceName: Self { + .init(rawValue: "referenceName") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "maxPlayers": self = .maxPlayers - case "minPlayers": self = .minPlayers - case "referenceName": self = .referenceName - case "ruleSet": self = .ruleSet - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterMatchmakingRuleSets/GameCenterMatchmakingRuleSets.GET.88552e0.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterMatchmakingRuleSets/GameCenterMatchmakingRuleSets.GET.88552e0.generated.swift index 12ec8833..3415b163 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterMatchmakingRuleSets/GameCenterMatchmakingRuleSets.GET.88552e0.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterMatchmakingRuleSets/GameCenterMatchmakingRuleSets.GET.88552e0.generated.swift @@ -55,7 +55,9 @@ extension V1.GameCenterMatchmakingRuleSets { /// - Returns: **200**, List of GameCenterMatchmakingRuleSets as `GameCenterMatchmakingRuleSetsResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -69,9 +71,15 @@ extension V1.GameCenterMatchmakingRuleSets { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -97,127 +105,127 @@ extension V1.GameCenterMatchmakingRuleSets.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum GameCenterMatchmakingQueues: Hashable, Codable, RawRepresentable { - case experimentRuleSet - case referenceName - case ruleSet - case unknown(String) + public struct GameCenterMatchmakingQueues: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var classicMatchmakingBundleIds: Self { + .init(rawValue: "classicMatchmakingBundleIds") + } + + public static var experimentRuleSet: Self { + .init(rawValue: "experimentRuleSet") + } - public var rawValue: String { - switch self { - case .experimentRuleSet: return "experimentRuleSet" - case .referenceName: return "referenceName" - case .ruleSet: return "ruleSet" - case .unknown(let rawValue): return rawValue - } + public static var referenceName: Self { + .init(rawValue: "referenceName") } + public static var ruleSet: Self { + .init(rawValue: "ruleSet") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "experimentRuleSet": self = .experimentRuleSet - case "referenceName": self = .referenceName - case "ruleSet": self = .ruleSet - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum GameCenterMatchmakingRuleSets: Hashable, Codable, RawRepresentable { - case matchmakingQueues - case maxPlayers - case minPlayers - case referenceName - case ruleLanguageVersion - case rules - case teams - case unknown(String) - - public var rawValue: String { - switch self { - case .matchmakingQueues: return "matchmakingQueues" - case .maxPlayers: return "maxPlayers" - case .minPlayers: return "minPlayers" - case .referenceName: return "referenceName" - case .ruleLanguageVersion: return "ruleLanguageVersion" - case .rules: return "rules" - case .teams: return "teams" - case .unknown(let rawValue): return rawValue - } + public struct GameCenterMatchmakingRuleSets: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var matchmakingQueues: Self { + .init(rawValue: "matchmakingQueues") + } + + public static var maxPlayers: Self { + .init(rawValue: "maxPlayers") + } + + public static var minPlayers: Self { + .init(rawValue: "minPlayers") + } + + public static var referenceName: Self { + .init(rawValue: "referenceName") + } + + public static var ruleLanguageVersion: Self { + .init(rawValue: "ruleLanguageVersion") + } + + public static var rules: Self { + .init(rawValue: "rules") + } + + public static var teams: Self { + .init(rawValue: "teams") + } + + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "matchmakingQueues": self = .matchmakingQueues - case "maxPlayers": self = .maxPlayers - case "minPlayers": self = .minPlayers - case "referenceName": self = .referenceName - case "ruleLanguageVersion": self = .ruleLanguageVersion - case "rules": self = .rules - case "teams": self = .teams - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum GameCenterMatchmakingRules: Hashable, Codable, RawRepresentable { - case description - case expression - case referenceName - case ruleSet - case type - case weight - case unknown(String) - - public var rawValue: String { - switch self { - case .description: return "description" - case .expression: return "expression" - case .referenceName: return "referenceName" - case .ruleSet: return "ruleSet" - case .type: return "type" - case .weight: return "weight" - case .unknown(let rawValue): return rawValue - } + public struct GameCenterMatchmakingRules: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var description: Self { + .init(rawValue: "description") + } + + public static var expression: Self { + .init(rawValue: "expression") + } + + public static var referenceName: Self { + .init(rawValue: "referenceName") + } + + public static var type: Self { + .init(rawValue: "type") } + public static var weight: Self { + .init(rawValue: "weight") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "description": self = .description - case "expression": self = .expression - case "referenceName": self = .referenceName - case "ruleSet": self = .ruleSet - case "type": self = .type - case "weight": self = .weight - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum GameCenterMatchmakingTeams: Hashable, Codable, RawRepresentable { - case maxPlayers - case minPlayers - case referenceName - case ruleSet - case unknown(String) + public struct GameCenterMatchmakingTeams: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var maxPlayers: Self { + .init(rawValue: "maxPlayers") + } + + public static var minPlayers: Self { + .init(rawValue: "minPlayers") + } + + public static var referenceName: Self { + .init(rawValue: "referenceName") + } - public var rawValue: String { - switch self { - case .maxPlayers: return "maxPlayers" - case .minPlayers: return "minPlayers" - case .referenceName: return "referenceName" - case .ruleSet: return "ruleSet" - case .unknown(let rawValue): return rawValue - } + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "maxPlayers": self = .maxPlayers - case "minPlayers": self = .minPlayers - case "referenceName": self = .referenceName - case "ruleSet": self = .ruleSet - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } @@ -250,28 +258,27 @@ extension V1.GameCenterMatchmakingRuleSets.GET { } } - public enum Include: Hashable, Codable, RawRepresentable { - case matchmakingQueues - case rules - case teams - case unknown(String) + public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var matchmakingQueues: Self { + .init(rawValue: "matchmakingQueues") + } - public var rawValue: String { - switch self { - case .matchmakingQueues: return "matchmakingQueues" - case .rules: return "rules" - case .teams: return "teams" - case .unknown(let rawValue): return rawValue - } + public static var rules: Self { + .init(rawValue: "rules") } + public static var teams: Self { + .init(rawValue: "teams") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "matchmakingQueues": self = .matchmakingQueues - case "rules": self = .rules - case "teams": self = .teams - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterMatchmakingRuleSets/GameCenterMatchmakingRuleSets.POST.88552e0.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterMatchmakingRuleSets/GameCenterMatchmakingRuleSets.POST.88552e0.generated.swift index b6ec62c4..f4e22436 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterMatchmakingRuleSets/GameCenterMatchmakingRuleSets.POST.88552e0.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterMatchmakingRuleSets/GameCenterMatchmakingRuleSets.POST.88552e0.generated.swift @@ -41,8 +41,11 @@ extension V1.GameCenterMatchmakingRuleSets { /// - Returns: **201**, Single GameCenterMatchmakingRuleSet as `GameCenterMatchmakingRuleSetResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **422**, Unprocessable request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -56,12 +59,21 @@ extension V1.GameCenterMatchmakingRuleSets { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 409: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 422: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterMatchmakingRules/ById/GameCenterMatchmakingRulesById.DELETE.962af29.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterMatchmakingRules/ById/GameCenterMatchmakingRulesById.DELETE.962af29.generated.swift index dbb30b28..286eab8c 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterMatchmakingRules/ById/GameCenterMatchmakingRulesById.DELETE.962af29.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterMatchmakingRules/ById/GameCenterMatchmakingRulesById.DELETE.962af29.generated.swift @@ -31,11 +31,12 @@ extension V1.GameCenterMatchmakingRules.ById { return urlRequest } - /// - Returns: **204**, Success (no content) /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -43,12 +44,12 @@ extension V1.GameCenterMatchmakingRules.ById { } switch urlResponse.statusCode { - case 204: - return - case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) @@ -58,6 +59,9 @@ extension V1.GameCenterMatchmakingRules.ById { case 409: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterMatchmakingRules/ById/GameCenterMatchmakingRulesById.PATCH.962af29.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterMatchmakingRules/ById/GameCenterMatchmakingRulesById.PATCH.962af29.generated.swift index 918b531c..99dc1488 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterMatchmakingRules/ById/GameCenterMatchmakingRulesById.PATCH.962af29.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterMatchmakingRules/ById/GameCenterMatchmakingRulesById.PATCH.962af29.generated.swift @@ -48,9 +48,12 @@ extension V1.GameCenterMatchmakingRules.ById { /// - Returns: **200**, Single GameCenterMatchmakingRule as `GameCenterMatchmakingRuleResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **422**, Unprocessable request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -64,6 +67,9 @@ extension V1.GameCenterMatchmakingRules.ById { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) @@ -73,6 +79,12 @@ extension V1.GameCenterMatchmakingRules.ById { case 409: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 422: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterMatchmakingRules/ById/Metrics/MatchmakingBooleanRuleResults/GameCenterMatchmakingRulesByIdMetricsMatchmakingBooleanRuleResults.GET.af8fe6c.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterMatchmakingRules/ById/Metrics/MatchmakingBooleanRuleResults/GameCenterMatchmakingRulesByIdMetricsMatchmakingBooleanRuleResults.GET.af8fe6c.generated.swift index d001c1d9..01ff07eb 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterMatchmakingRules/ById/Metrics/MatchmakingBooleanRuleResults/GameCenterMatchmakingRulesByIdMetricsMatchmakingBooleanRuleResults.GET.af8fe6c.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterMatchmakingRules/ById/Metrics/MatchmakingBooleanRuleResults/GameCenterMatchmakingRulesByIdMetricsMatchmakingBooleanRuleResults.GET.af8fe6c.generated.swift @@ -33,7 +33,7 @@ extension V1.GameCenterMatchmakingRules.ById.Metrics.MatchmakingBooleanRuleResul URLQueryItem(name: "filter[result]", value: parameters.filter[.result].map { "\($0)" }), URLQueryItem(name: "granularity", - value: parameters.granularity.map { "\($0)" }.joined(separator: ",")), + value: parameters.granularity.map { "\($0)" }), URLQueryItem(name: "groupBy", value: parameters.groupBy?.map { "\($0)" }.joined(separator: ",")), URLQueryItem(name: "limit", @@ -52,8 +52,10 @@ extension V1.GameCenterMatchmakingRules.ById.Metrics.MatchmakingBooleanRuleResul /// - Returns: **200**, Metrics data response as `GameCenterMatchmakingBooleanRuleResultsV1MetricResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -67,12 +69,18 @@ extension V1.GameCenterMatchmakingRules.ById.Metrics.MatchmakingBooleanRuleResul case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 404: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -85,7 +93,7 @@ extension V1.GameCenterMatchmakingRules.ById.Metrics.MatchmakingBooleanRuleResul public var filter: Filter = Filter() /// the granularity of the per-group dataset - public var granularity: [Granularity] = [] + public var granularity: Granularity? /// the dimension by which to group the results public var groupBy: [GroupBy]? @@ -123,72 +131,67 @@ extension V1.GameCenterMatchmakingRules.ById.Metrics.MatchmakingBooleanRuleResul } } - public enum Granularity: Hashable, Codable, RawRepresentable { - case p1D - case pT15M - case pT1H - case unknown(String) - - public var rawValue: String { - switch self { - case .p1D: return "P1D" - case .pT15M: return "PT15M" - case .pT1H: return "PT1H" - case .unknown(let rawValue): return rawValue - } + public struct Granularity: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var p1D: Self { + .init(rawValue: "P1D") + } + + public static var pT15M: Self { + .init(rawValue: "PT15M") } + public static var pT1H: Self { + .init(rawValue: "PT1H") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "P1D": self = .p1D - case "PT15M": self = .pT15M - case "PT1H": self = .pT1H - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum GroupBy: Hashable, Codable, RawRepresentable { - case gameCenterMatchmakingQueue - case result - case unknown(String) + public struct GroupBy: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var gameCenterMatchmakingQueue: Self { + .init(rawValue: "gameCenterMatchmakingQueue") + } - public var rawValue: String { - switch self { - case .gameCenterMatchmakingQueue: return "gameCenterMatchmakingQueue" - case .result: return "result" - case .unknown(let rawValue): return rawValue - } + public static var result: Self { + .init(rawValue: "result") + } + + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "gameCenterMatchmakingQueue": self = .gameCenterMatchmakingQueue - case "result": self = .result - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum Sort: Hashable, Codable, RawRepresentable { - case count - case countDesc - case unknown(String) + public struct Sort: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var count: Self { + .init(rawValue: "count") + } - public var rawValue: String { - switch self { - case .count: return "count" - case .countDesc: return "-count" - case .unknown(let rawValue): return rawValue - } + public static var countDesc: Self { + .init(rawValue: "-count") + } + + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "count": self = .count - case "-count": self = .countDesc - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterMatchmakingRules/ById/Metrics/MatchmakingNumberRuleResults/GameCenterMatchmakingRulesByIdMetricsMatchmakingNumberRuleResults.GET.a1f635a.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterMatchmakingRules/ById/Metrics/MatchmakingNumberRuleResults/GameCenterMatchmakingRulesByIdMetricsMatchmakingNumberRuleResults.GET.a1f635a.generated.swift index f5121173..7f210235 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterMatchmakingRules/ById/Metrics/MatchmakingNumberRuleResults/GameCenterMatchmakingRulesByIdMetricsMatchmakingNumberRuleResults.GET.a1f635a.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterMatchmakingRules/ById/Metrics/MatchmakingNumberRuleResults/GameCenterMatchmakingRulesByIdMetricsMatchmakingNumberRuleResults.GET.a1f635a.generated.swift @@ -31,7 +31,7 @@ extension V1.GameCenterMatchmakingRules.ById.Metrics.MatchmakingNumberRuleResult URLQueryItem(name: "filter[gameCenterMatchmakingQueue]", value: parameters.filter[.gameCenterMatchmakingQueue].map { "\($0)" }), URLQueryItem(name: "granularity", - value: parameters.granularity.map { "\($0)" }.joined(separator: ",")), + value: parameters.granularity.map { "\($0)" }), URLQueryItem(name: "groupBy", value: parameters.groupBy?.map { "\($0)" }.joined(separator: ",")), URLQueryItem(name: "limit", @@ -50,8 +50,10 @@ extension V1.GameCenterMatchmakingRules.ById.Metrics.MatchmakingNumberRuleResult /// - Returns: **200**, Metrics data response as `GameCenterMatchmakingNumberRuleResultsV1MetricResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -65,12 +67,18 @@ extension V1.GameCenterMatchmakingRules.ById.Metrics.MatchmakingNumberRuleResult case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 404: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -83,7 +91,7 @@ extension V1.GameCenterMatchmakingRules.ById.Metrics.MatchmakingNumberRuleResult public var filter: Filter = Filter() /// the granularity of the per-group dataset - public var granularity: [Granularity] = [] + public var granularity: Granularity? /// the dimension by which to group the results public var groupBy: [GroupBy]? @@ -116,87 +124,87 @@ extension V1.GameCenterMatchmakingRules.ById.Metrics.MatchmakingNumberRuleResult } } - public enum Granularity: Hashable, Codable, RawRepresentable { - case p1D - case pT15M - case pT1H - case unknown(String) - - public var rawValue: String { - switch self { - case .p1D: return "P1D" - case .pT15M: return "PT15M" - case .pT1H: return "PT1H" - case .unknown(let rawValue): return rawValue - } + public struct Granularity: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var p1D: Self { + .init(rawValue: "P1D") + } + + public static var pT15M: Self { + .init(rawValue: "PT15M") + } + + public static var pT1H: Self { + .init(rawValue: "PT1H") } + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "P1D": self = .p1D - case "PT15M": self = .pT15M - case "PT1H": self = .pT1H - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum GroupBy: Hashable, Codable, RawRepresentable { - case gameCenterMatchmakingQueue - case unknown(String) + public struct GroupBy: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var gameCenterMatchmakingQueue: Self { + .init(rawValue: "gameCenterMatchmakingQueue") + } - public var rawValue: String { - switch self { - case .gameCenterMatchmakingQueue: return "gameCenterMatchmakingQueue" - case .unknown(let rawValue): return rawValue - } + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "gameCenterMatchmakingQueue": self = .gameCenterMatchmakingQueue - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum Sort: Hashable, Codable, RawRepresentable { - case averageResult - case averageResultDesc - case count - case countDesc - case p50Result - case p50ResultDesc - case p95Result - case p95ResultDesc - case unknown(String) - - public var rawValue: String { - switch self { - case .averageResult: return "averageResult" - case .averageResultDesc: return "-averageResult" - case .count: return "count" - case .countDesc: return "-count" - case .p50Result: return "p50Result" - case .p50ResultDesc: return "-p50Result" - case .p95Result: return "p95Result" - case .p95ResultDesc: return "-p95Result" - case .unknown(let rawValue): return rawValue - } + public struct Sort: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var averageResult: Self { + .init(rawValue: "averageResult") } + public static var averageResultDesc: Self { + .init(rawValue: "-averageResult") + } + + public static var count: Self { + .init(rawValue: "count") + } + + public static var countDesc: Self { + .init(rawValue: "-count") + } + + public static var p50Result: Self { + .init(rawValue: "p50Result") + } + + public static var p50ResultDesc: Self { + .init(rawValue: "-p50Result") + } + + public static var p95Result: Self { + .init(rawValue: "p95Result") + } + + public static var p95ResultDesc: Self { + .init(rawValue: "-p95Result") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "averageResult": self = .averageResult - case "-averageResult": self = .averageResultDesc - case "count": self = .count - case "-count": self = .countDesc - case "p50Result": self = .p50Result - case "-p50Result": self = .p50ResultDesc - case "p95Result": self = .p95Result - case "-p95Result": self = .p95ResultDesc - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterMatchmakingRules/ById/Metrics/MatchmakingRuleErrors/GameCenterMatchmakingRulesByIdMetricsMatchmakingRuleErrors.GET.c5ce74b.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterMatchmakingRules/ById/Metrics/MatchmakingRuleErrors/GameCenterMatchmakingRulesByIdMetricsMatchmakingRuleErrors.GET.c5ce74b.generated.swift index 3369494a..5efb3dc7 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterMatchmakingRules/ById/Metrics/MatchmakingRuleErrors/GameCenterMatchmakingRulesByIdMetricsMatchmakingRuleErrors.GET.c5ce74b.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterMatchmakingRules/ById/Metrics/MatchmakingRuleErrors/GameCenterMatchmakingRulesByIdMetricsMatchmakingRuleErrors.GET.c5ce74b.generated.swift @@ -31,7 +31,7 @@ extension V1.GameCenterMatchmakingRules.ById.Metrics.MatchmakingRuleErrors { URLQueryItem(name: "filter[gameCenterMatchmakingQueue]", value: parameters.filter[.gameCenterMatchmakingQueue].map { "\($0)" }), URLQueryItem(name: "granularity", - value: parameters.granularity.map { "\($0)" }.joined(separator: ",")), + value: parameters.granularity.map { "\($0)" }), URLQueryItem(name: "groupBy", value: parameters.groupBy?.map { "\($0)" }.joined(separator: ",")), URLQueryItem(name: "limit", @@ -50,8 +50,10 @@ extension V1.GameCenterMatchmakingRules.ById.Metrics.MatchmakingRuleErrors { /// - Returns: **200**, Metrics data response as `GameCenterMatchmakingRuleErrorsV1MetricResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -65,12 +67,18 @@ extension V1.GameCenterMatchmakingRules.ById.Metrics.MatchmakingRuleErrors { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 404: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -83,7 +91,7 @@ extension V1.GameCenterMatchmakingRules.ById.Metrics.MatchmakingRuleErrors.GET { public var filter: Filter = Filter() /// the granularity of the per-group dataset - public var granularity: [Granularity] = [] + public var granularity: Granularity? /// the dimension by which to group the results public var groupBy: [GroupBy]? @@ -116,69 +124,63 @@ extension V1.GameCenterMatchmakingRules.ById.Metrics.MatchmakingRuleErrors.GET { } } - public enum Granularity: Hashable, Codable, RawRepresentable { - case p1D - case pT15M - case pT1H - case unknown(String) - - public var rawValue: String { - switch self { - case .p1D: return "P1D" - case .pT15M: return "PT15M" - case .pT1H: return "PT1H" - case .unknown(let rawValue): return rawValue - } + public struct Granularity: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var p1D: Self { + .init(rawValue: "P1D") + } + + public static var pT15M: Self { + .init(rawValue: "PT15M") + } + + public static var pT1H: Self { + .init(rawValue: "PT1H") } + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "P1D": self = .p1D - case "PT15M": self = .pT15M - case "PT1H": self = .pT1H - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum GroupBy: Hashable, Codable, RawRepresentable { - case gameCenterMatchmakingQueue - case unknown(String) + public struct GroupBy: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var gameCenterMatchmakingQueue: Self { + .init(rawValue: "gameCenterMatchmakingQueue") + } - public var rawValue: String { - switch self { - case .gameCenterMatchmakingQueue: return "gameCenterMatchmakingQueue" - case .unknown(let rawValue): return rawValue - } + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "gameCenterMatchmakingQueue": self = .gameCenterMatchmakingQueue - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum Sort: Hashable, Codable, RawRepresentable { - case count - case countDesc - case unknown(String) + public struct Sort: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var count: Self { + .init(rawValue: "count") + } - public var rawValue: String { - switch self { - case .count: return "count" - case .countDesc: return "-count" - case .unknown(let rawValue): return rawValue - } + public static var countDesc: Self { + .init(rawValue: "-count") + } + + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "count": self = .count - case "-count": self = .countDesc - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterMatchmakingRules/GameCenterMatchmakingRules.POST.318d415.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterMatchmakingRules/GameCenterMatchmakingRules.POST.318d415.generated.swift index 6854765e..6eea9117 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterMatchmakingRules/GameCenterMatchmakingRules.POST.318d415.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterMatchmakingRules/GameCenterMatchmakingRules.POST.318d415.generated.swift @@ -41,8 +41,11 @@ extension V1.GameCenterMatchmakingRules { /// - Returns: **201**, Single GameCenterMatchmakingRule as `GameCenterMatchmakingRuleResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **422**, Unprocessable request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -56,12 +59,21 @@ extension V1.GameCenterMatchmakingRules { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 409: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 422: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterMatchmakingTeams/ById/GameCenterMatchmakingTeamsById.DELETE.d8cc2e0.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterMatchmakingTeams/ById/GameCenterMatchmakingTeamsById.DELETE.d8cc2e0.generated.swift index d9902b80..ddd19c66 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterMatchmakingTeams/ById/GameCenterMatchmakingTeamsById.DELETE.d8cc2e0.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterMatchmakingTeams/ById/GameCenterMatchmakingTeamsById.DELETE.d8cc2e0.generated.swift @@ -31,11 +31,12 @@ extension V1.GameCenterMatchmakingTeams.ById { return urlRequest } - /// - Returns: **204**, Success (no content) /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -43,12 +44,12 @@ extension V1.GameCenterMatchmakingTeams.ById { } switch urlResponse.statusCode { - case 204: - return - case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) @@ -58,6 +59,9 @@ extension V1.GameCenterMatchmakingTeams.ById { case 409: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterMatchmakingTeams/ById/GameCenterMatchmakingTeamsById.PATCH.d8cc2e0.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterMatchmakingTeams/ById/GameCenterMatchmakingTeamsById.PATCH.d8cc2e0.generated.swift index 6ebcda84..e1d8ddfc 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterMatchmakingTeams/ById/GameCenterMatchmakingTeamsById.PATCH.d8cc2e0.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterMatchmakingTeams/ById/GameCenterMatchmakingTeamsById.PATCH.d8cc2e0.generated.swift @@ -48,9 +48,12 @@ extension V1.GameCenterMatchmakingTeams.ById { /// - Returns: **200**, Single GameCenterMatchmakingTeam as `GameCenterMatchmakingTeamResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **422**, Unprocessable request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -64,6 +67,9 @@ extension V1.GameCenterMatchmakingTeams.ById { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) @@ -73,6 +79,12 @@ extension V1.GameCenterMatchmakingTeams.ById { case 409: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 422: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterMatchmakingTeams/GameCenterMatchmakingTeams.POST.951ff87.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterMatchmakingTeams/GameCenterMatchmakingTeams.POST.951ff87.generated.swift index 4272f193..72785b98 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterMatchmakingTeams/GameCenterMatchmakingTeams.POST.951ff87.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterMatchmakingTeams/GameCenterMatchmakingTeams.POST.951ff87.generated.swift @@ -41,8 +41,11 @@ extension V1.GameCenterMatchmakingTeams { /// - Returns: **201**, Single GameCenterMatchmakingTeam as `GameCenterMatchmakingTeamResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **422**, Unprocessable request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -56,12 +59,21 @@ extension V1.GameCenterMatchmakingTeams { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 409: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 422: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterPlayerAchievementSubmissions/GameCenterPlayerAchievementSubmissions.POST.50bb913.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterPlayerAchievementSubmissions/GameCenterPlayerAchievementSubmissions.POST.50bb913.generated.swift new file mode 100644 index 00000000..41a2fdb5 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/GameCenterPlayerAchievementSubmissions/GameCenterPlayerAchievementSubmissions.POST.50bb913.generated.swift @@ -0,0 +1,84 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.GameCenterPlayerAchievementSubmissions { + public struct POST: Endpoint { + public typealias Parameters = GameCenterPlayerAchievementSubmissionCreateRequest + public typealias Response = GameCenterPlayerAchievementSubmissionResponse + + public var path: String { + "/v1/gameCenterPlayerAchievementSubmissions" + } + + /// GameCenterPlayerAchievementSubmission representation + public var parameters: Parameters + + public init(parameters: Parameters) { + self.parameters = parameters + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "POST" + + var jsonEncoder: JSONEncoder { + let encoder = JSONEncoder() + return encoder + } + + urlRequest?.httpBody = try jsonEncoder.encode(parameters) + urlRequest?.setValue("application/json", forHTTPHeaderField: "Content-Type") + return urlRequest + } + + /// - Returns: **201**, Single GameCenterPlayerAchievementSubmission as `GameCenterPlayerAchievementSubmissionResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **422**, Unprocessable request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 201: + return try jsonDecoder.decode(GameCenterPlayerAchievementSubmissionResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 409: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 422: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/InAppPurchaseAppStoreReviewScreenshots/ById/InAppPurchaseAppStoreReviewScreenshotsById.DELETE.66cbd18.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/InAppPurchaseAppStoreReviewScreenshots/ById/InAppPurchaseAppStoreReviewScreenshotsById.DELETE.66cbd18.generated.swift index 12e3d39a..177b09ec 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/InAppPurchaseAppStoreReviewScreenshots/ById/InAppPurchaseAppStoreReviewScreenshotsById.DELETE.66cbd18.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/InAppPurchaseAppStoreReviewScreenshots/ById/InAppPurchaseAppStoreReviewScreenshotsById.DELETE.66cbd18.generated.swift @@ -31,11 +31,12 @@ extension V1.InAppPurchaseAppStoreReviewScreenshots.ById { return urlRequest } - /// - Returns: **204**, Success (no content) /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -43,12 +44,12 @@ extension V1.InAppPurchaseAppStoreReviewScreenshots.ById { } switch urlResponse.statusCode { - case 204: - return - case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) @@ -58,6 +59,9 @@ extension V1.InAppPurchaseAppStoreReviewScreenshots.ById { case 409: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/InAppPurchaseAppStoreReviewScreenshots/ById/InAppPurchaseAppStoreReviewScreenshotsById.GET.66cbd18.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/InAppPurchaseAppStoreReviewScreenshots/ById/InAppPurchaseAppStoreReviewScreenshotsById.GET.66cbd18.generated.swift index 3d7722ac..6e8f566d 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/InAppPurchaseAppStoreReviewScreenshots/ById/InAppPurchaseAppStoreReviewScreenshotsById.GET.66cbd18.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/InAppPurchaseAppStoreReviewScreenshots/ById/InAppPurchaseAppStoreReviewScreenshotsById.GET.66cbd18.generated.swift @@ -44,8 +44,10 @@ extension V1.InAppPurchaseAppStoreReviewScreenshots.ById { /// - Returns: **200**, Single InAppPurchaseAppStoreReviewScreenshot as `InAppPurchaseAppStoreReviewScreenshotResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -59,12 +61,18 @@ extension V1.InAppPurchaseAppStoreReviewScreenshots.ById { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 404: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -87,49 +95,51 @@ extension V1.InAppPurchaseAppStoreReviewScreenshots.ById.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum InAppPurchaseAppStoreReviewScreenshots: Hashable, Codable, RawRepresentable { - case assetDeliveryState - case assetToken - case assetType - case fileName - case fileSize - case imageAsset - case inAppPurchaseV2 - case sourceFileChecksum - case uploadOperations - case uploaded - case unknown(String) - - public var rawValue: String { - switch self { - case .assetDeliveryState: return "assetDeliveryState" - case .assetToken: return "assetToken" - case .assetType: return "assetType" - case .fileName: return "fileName" - case .fileSize: return "fileSize" - case .imageAsset: return "imageAsset" - case .inAppPurchaseV2: return "inAppPurchaseV2" - case .sourceFileChecksum: return "sourceFileChecksum" - case .uploadOperations: return "uploadOperations" - case .uploaded: return "uploaded" - case .unknown(let rawValue): return rawValue - } + public struct InAppPurchaseAppStoreReviewScreenshots: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var assetDeliveryState: Self { + .init(rawValue: "assetDeliveryState") + } + + public static var assetToken: Self { + .init(rawValue: "assetToken") + } + + public static var assetType: Self { + .init(rawValue: "assetType") + } + + public static var fileName: Self { + .init(rawValue: "fileName") + } + + public static var fileSize: Self { + .init(rawValue: "fileSize") + } + + public static var imageAsset: Self { + .init(rawValue: "imageAsset") } + public static var inAppPurchaseV2: Self { + .init(rawValue: "inAppPurchaseV2") + } + + public static var sourceFileChecksum: Self { + .init(rawValue: "sourceFileChecksum") + } + + public static var uploadOperations: Self { + .init(rawValue: "uploadOperations") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "assetDeliveryState": self = .assetDeliveryState - case "assetToken": self = .assetToken - case "assetType": self = .assetType - case "fileName": self = .fileName - case "fileSize": self = .fileSize - case "imageAsset": self = .imageAsset - case "inAppPurchaseV2": self = .inAppPurchaseV2 - case "sourceFileChecksum": self = .sourceFileChecksum - case "uploadOperations": self = .uploadOperations - case "uploaded": self = .uploaded - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } @@ -147,22 +157,19 @@ extension V1.InAppPurchaseAppStoreReviewScreenshots.ById.GET { } } - public enum Include: Hashable, Codable, RawRepresentable { - case inAppPurchaseV2 - case unknown(String) + public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var inAppPurchaseV2: Self { + .init(rawValue: "inAppPurchaseV2") + } - public var rawValue: String { - switch self { - case .inAppPurchaseV2: return "inAppPurchaseV2" - case .unknown(let rawValue): return rawValue - } + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "inAppPurchaseV2": self = .inAppPurchaseV2 - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/InAppPurchaseAppStoreReviewScreenshots/ById/InAppPurchaseAppStoreReviewScreenshotsById.PATCH.66cbd18.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/InAppPurchaseAppStoreReviewScreenshots/ById/InAppPurchaseAppStoreReviewScreenshotsById.PATCH.66cbd18.generated.swift index 40160f19..64822207 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/InAppPurchaseAppStoreReviewScreenshots/ById/InAppPurchaseAppStoreReviewScreenshotsById.PATCH.66cbd18.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/InAppPurchaseAppStoreReviewScreenshots/ById/InAppPurchaseAppStoreReviewScreenshotsById.PATCH.66cbd18.generated.swift @@ -48,9 +48,12 @@ extension V1.InAppPurchaseAppStoreReviewScreenshots.ById { /// - Returns: **200**, Single InAppPurchaseAppStoreReviewScreenshot as `InAppPurchaseAppStoreReviewScreenshotResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **422**, Unprocessable request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -64,6 +67,9 @@ extension V1.InAppPurchaseAppStoreReviewScreenshots.ById { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) @@ -73,6 +79,12 @@ extension V1.InAppPurchaseAppStoreReviewScreenshots.ById { case 409: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 422: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/InAppPurchaseAppStoreReviewScreenshots/InAppPurchaseAppStoreReviewScreenshots.POST.25a6772.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/InAppPurchaseAppStoreReviewScreenshots/InAppPurchaseAppStoreReviewScreenshots.POST.25a6772.generated.swift index 24b52b57..5e21d713 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/InAppPurchaseAppStoreReviewScreenshots/InAppPurchaseAppStoreReviewScreenshots.POST.25a6772.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/InAppPurchaseAppStoreReviewScreenshots/InAppPurchaseAppStoreReviewScreenshots.POST.25a6772.generated.swift @@ -41,8 +41,11 @@ extension V1.InAppPurchaseAppStoreReviewScreenshots { /// - Returns: **201**, Single InAppPurchaseAppStoreReviewScreenshot as `InAppPurchaseAppStoreReviewScreenshotResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **422**, Unprocessable request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -56,12 +59,21 @@ extension V1.InAppPurchaseAppStoreReviewScreenshots { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 409: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 422: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/InAppPurchaseAvailabilities/ById/AvailableTerritories/InAppPurchaseAvailabilitiesByIdAvailableTerritories.GET.a435fd4.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/InAppPurchaseAvailabilities/ById/AvailableTerritories/InAppPurchaseAvailabilitiesByIdAvailableTerritories.GET.a435fd4.generated.swift index c04d49c1..6b1f563a 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/InAppPurchaseAvailabilities/ById/AvailableTerritories/InAppPurchaseAvailabilitiesByIdAvailableTerritories.GET.a435fd4.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/InAppPurchaseAvailabilities/ById/AvailableTerritories/InAppPurchaseAvailabilitiesByIdAvailableTerritories.GET.a435fd4.generated.swift @@ -44,8 +44,10 @@ extension V1.InAppPurchaseAvailabilities.ById.AvailableTerritories { /// - Returns: **200**, List of Territories as `TerritoriesResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -59,12 +61,18 @@ extension V1.InAppPurchaseAvailabilities.ById.AvailableTerritories { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 404: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -87,22 +95,19 @@ extension V1.InAppPurchaseAvailabilities.ById.AvailableTerritories.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum Territories: Hashable, Codable, RawRepresentable { - case currency - case unknown(String) + public struct Territories: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var currency: Self { + .init(rawValue: "currency") + } - public var rawValue: String { - switch self { - case .currency: return "currency" - case .unknown(let rawValue): return rawValue - } + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "currency": self = .currency - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/InAppPurchaseAvailabilities/ById/InAppPurchaseAvailabilitiesById.GET.535cad0.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/InAppPurchaseAvailabilities/ById/InAppPurchaseAvailabilitiesById.GET.535cad0.generated.swift index 65959847..2131b635 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/InAppPurchaseAvailabilities/ById/InAppPurchaseAvailabilitiesById.GET.535cad0.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/InAppPurchaseAvailabilities/ById/InAppPurchaseAvailabilitiesById.GET.535cad0.generated.swift @@ -48,8 +48,10 @@ extension V1.InAppPurchaseAvailabilities.ById { /// - Returns: **200**, Single InAppPurchaseAvailability as `InAppPurchaseAvailabilityResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -63,12 +65,18 @@ extension V1.InAppPurchaseAvailabilities.ById { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 404: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -93,47 +101,39 @@ extension V1.InAppPurchaseAvailabilities.ById.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum InAppPurchaseAvailabilities: Hashable, Codable, RawRepresentable { - case availableInNewTerritories - case availableTerritories - case inAppPurchase - case unknown(String) - - public var rawValue: String { - switch self { - case .availableInNewTerritories: return "availableInNewTerritories" - case .availableTerritories: return "availableTerritories" - case .inAppPurchase: return "inAppPurchase" - case .unknown(let rawValue): return rawValue - } + public struct InAppPurchaseAvailabilities: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var availableInNewTerritories: Self { + .init(rawValue: "availableInNewTerritories") + } + + public static var availableTerritories: Self { + .init(rawValue: "availableTerritories") + } + + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "availableInNewTerritories": self = .availableInNewTerritories - case "availableTerritories": self = .availableTerritories - case "inAppPurchase": self = .inAppPurchase - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum Territories: Hashable, Codable, RawRepresentable { - case currency - case unknown(String) + public struct Territories: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var currency: Self { + .init(rawValue: "currency") + } - public var rawValue: String { - switch self { - case .currency: return "currency" - case .unknown(let rawValue): return rawValue - } + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "currency": self = .currency - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } @@ -156,22 +156,19 @@ extension V1.InAppPurchaseAvailabilities.ById.GET { } } - public enum Include: Hashable, Codable, RawRepresentable { - case availableTerritories - case unknown(String) + public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var availableTerritories: Self { + .init(rawValue: "availableTerritories") + } - public var rawValue: String { - switch self { - case .availableTerritories: return "availableTerritories" - case .unknown(let rawValue): return rawValue - } + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "availableTerritories": self = .availableTerritories - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/InAppPurchaseAvailabilities/ById/Relationships/AvailableTerritories/InAppPurchaseAvailabilitiesByIdRelationshipsAvailableTerritories.GET.16c122b.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/InAppPurchaseAvailabilities/ById/Relationships/AvailableTerritories/InAppPurchaseAvailabilitiesByIdRelationshipsAvailableTerritories.GET.16c122b.generated.swift new file mode 100644 index 00000000..53b5f406 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/InAppPurchaseAvailabilities/ById/Relationships/AvailableTerritories/InAppPurchaseAvailabilitiesByIdRelationshipsAvailableTerritories.GET.16c122b.generated.swift @@ -0,0 +1,88 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.InAppPurchaseAvailabilities.ById.Relationships.AvailableTerritories { + public struct GET: Endpoint { + public typealias Response = InAppPurchaseAvailabilityAvailableTerritoriesLinkagesResponse + + public var path: String { + "/v1/inAppPurchaseAvailabilities/\(id)/relationships/availableTerritories" + } + + /// the id of the requested resource + public var id: String + + public var parameters: Parameters = Parameters() + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + components?.queryItems = [ + URLQueryItem(name: "limit", + value: parameters.limit.map { "\($0)" }) + ].filter { $0.value != nil } + if components?.queryItems?.isEmpty ?? false { + components?.queryItems = nil + } + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "GET" + return urlRequest + } + + /// - Returns: **200**, List of related linkages as `InAppPurchaseAvailabilityAvailableTerritoriesLinkagesResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(InAppPurchaseAvailabilityAvailableTerritoriesLinkagesResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +extension V1.InAppPurchaseAvailabilities.ById.Relationships.AvailableTerritories.GET { + public struct Parameters: Hashable { + /// maximum resources per page + public var limit: Int? + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/InAppPurchaseAvailabilities/InAppPurchaseAvailabilities.POST.a7bca8a.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/InAppPurchaseAvailabilities/InAppPurchaseAvailabilities.POST.a7bca8a.generated.swift index 81e242e8..912cc9c6 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/InAppPurchaseAvailabilities/InAppPurchaseAvailabilities.POST.a7bca8a.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/InAppPurchaseAvailabilities/InAppPurchaseAvailabilities.POST.a7bca8a.generated.swift @@ -41,8 +41,11 @@ extension V1.InAppPurchaseAvailabilities { /// - Returns: **201**, Single InAppPurchaseAvailability as `InAppPurchaseAvailabilityResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **422**, Unprocessable request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -56,12 +59,21 @@ extension V1.InAppPurchaseAvailabilities { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 409: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 422: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/InAppPurchaseContents/ById/InAppPurchaseContentsById.GET.b1b4b4b.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/InAppPurchaseContents/ById/InAppPurchaseContentsById.GET.b1b4b4b.generated.swift index ccbe848a..fde85528 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/InAppPurchaseContents/ById/InAppPurchaseContentsById.GET.b1b4b4b.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/InAppPurchaseContents/ById/InAppPurchaseContentsById.GET.b1b4b4b.generated.swift @@ -44,8 +44,10 @@ extension V1.InAppPurchaseContents.ById { /// - Returns: **200**, Single InAppPurchaseContent as `InAppPurchaseContentResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -59,12 +61,18 @@ extension V1.InAppPurchaseContents.ById { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 404: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -87,34 +95,35 @@ extension V1.InAppPurchaseContents.ById.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum InAppPurchaseContents: Hashable, Codable, RawRepresentable { - case fileName - case fileSize - case inAppPurchaseV2 - case lastModifiedDate - case url - case unknown(String) - - public var rawValue: String { - switch self { - case .fileName: return "fileName" - case .fileSize: return "fileSize" - case .inAppPurchaseV2: return "inAppPurchaseV2" - case .lastModifiedDate: return "lastModifiedDate" - case .url: return "url" - case .unknown(let rawValue): return rawValue - } + public struct InAppPurchaseContents: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var fileName: Self { + .init(rawValue: "fileName") + } + + public static var fileSize: Self { + .init(rawValue: "fileSize") + } + + public static var inAppPurchaseV2: Self { + .init(rawValue: "inAppPurchaseV2") + } + + public static var lastModifiedDate: Self { + .init(rawValue: "lastModifiedDate") } + public static var url: Self { + .init(rawValue: "url") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "fileName": self = .fileName - case "fileSize": self = .fileSize - case "inAppPurchaseV2": self = .inAppPurchaseV2 - case "lastModifiedDate": self = .lastModifiedDate - case "url": self = .url - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } @@ -132,22 +141,19 @@ extension V1.InAppPurchaseContents.ById.GET { } } - public enum Include: Hashable, Codable, RawRepresentable { - case inAppPurchaseV2 - case unknown(String) + public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var inAppPurchaseV2: Self { + .init(rawValue: "inAppPurchaseV2") + } - public var rawValue: String { - switch self { - case .inAppPurchaseV2: return "inAppPurchaseV2" - case .unknown(let rawValue): return rawValue - } + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "inAppPurchaseV2": self = .inAppPurchaseV2 - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/InAppPurchaseImages/ById/InAppPurchaseImagesById.DELETE.9dc78df.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/InAppPurchaseImages/ById/InAppPurchaseImagesById.DELETE.9dc78df.generated.swift new file mode 100644 index 00000000..9b001cec --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/InAppPurchaseImages/ById/InAppPurchaseImagesById.DELETE.9dc78df.generated.swift @@ -0,0 +1,72 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.InAppPurchaseImages.ById { + public struct DELETE: Endpoint { + public typealias Parameters = Never + public typealias Response = Void + + public var path: String { + "/v1/inAppPurchaseImages/\(id)" + } + + /// the id of the requested resource + public var id: String + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "DELETE" + return urlRequest + } + + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 409: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/PromotedPurchaseImages/ById/PromotedPurchaseImagesById.GET.307096c.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/InAppPurchaseImages/ById/InAppPurchaseImagesById.GET.9dc78df.generated.swift similarity index 50% rename from Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/PromotedPurchaseImages/ById/PromotedPurchaseImagesById.GET.307096c.generated.swift rename to Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/InAppPurchaseImages/ById/InAppPurchaseImagesById.GET.9dc78df.generated.swift index 07aeb190..4f225afc 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/PromotedPurchaseImages/ById/PromotedPurchaseImagesById.GET.307096c.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/InAppPurchaseImages/ById/InAppPurchaseImagesById.GET.9dc78df.generated.swift @@ -6,12 +6,12 @@ import Foundation import FoundationNetworking #endif -extension V1.PromotedPurchaseImages.ById { +extension V1.InAppPurchaseImages.ById { public struct GET: Endpoint { - public typealias Response = PromotedPurchaseImageResponse + public typealias Response = InAppPurchaseImageResponse public var path: String { - "/v1/promotedPurchaseImages/\(id)" + "/v1/inAppPurchaseImages/\(id)" } /// the id of the requested resource @@ -28,8 +28,8 @@ extension V1.PromotedPurchaseImages.ById { components?.path = path components?.queryItems = [ - URLQueryItem(name: "fields[promotedPurchaseImages]", - value: parameters.fields[.promotedPurchaseImages]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "fields[inAppPurchaseImages]", + value: parameters.fields[.inAppPurchaseImages]?.map { "\($0)" }.joined(separator: ",")), URLQueryItem(name: "include", value: parameters.include?.map { "\($0)" }.joined(separator: ",")) ].filter { $0.value != nil } @@ -42,10 +42,12 @@ extension V1.PromotedPurchaseImages.ById { return urlRequest } - /// - Returns: **200**, Single PromotedPurchaseImage as `PromotedPurchaseImageResponse` + /// - Returns: **200**, Single InAppPurchaseImage as `InAppPurchaseImageResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -54,17 +56,23 @@ extension V1.PromotedPurchaseImages.ById { switch urlResponse.statusCode { case 200: - return try jsonDecoder.decode(PromotedPurchaseImageResponse.self, from: data) + return try jsonDecoder.decode(InAppPurchaseImageResponse.self, from: data) case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 404: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -72,7 +80,7 @@ extension V1.PromotedPurchaseImages.ById { } } -extension V1.PromotedPurchaseImages.ById.GET { +extension V1.InAppPurchaseImages.ById.GET { public struct Parameters: Hashable { public var fields: Fields = Fields() @@ -87,56 +95,54 @@ extension V1.PromotedPurchaseImages.ById.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum PromotedPurchaseImages: Hashable, Codable, RawRepresentable { - case assetToken - case assetType - case fileName - case fileSize - case imageAsset - case promotedPurchase - case sourceFileChecksum - case state - case uploadOperations - case uploaded - case unknown(String) - - public var rawValue: String { - switch self { - case .assetToken: return "assetToken" - case .assetType: return "assetType" - case .fileName: return "fileName" - case .fileSize: return "fileSize" - case .imageAsset: return "imageAsset" - case .promotedPurchase: return "promotedPurchase" - case .sourceFileChecksum: return "sourceFileChecksum" - case .state: return "state" - case .uploadOperations: return "uploadOperations" - case .uploaded: return "uploaded" - case .unknown(let rawValue): return rawValue - } + public struct InAppPurchaseImages: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var assetToken: Self { + .init(rawValue: "assetToken") } + public static var fileName: Self { + .init(rawValue: "fileName") + } + + public static var fileSize: Self { + .init(rawValue: "fileSize") + } + + public static var imageAsset: Self { + .init(rawValue: "imageAsset") + } + + public static var inAppPurchase: Self { + .init(rawValue: "inAppPurchase") + } + + public static var sourceFileChecksum: Self { + .init(rawValue: "sourceFileChecksum") + } + + public static var state: Self { + .init(rawValue: "state") + } + + public static var uploadOperations: Self { + .init(rawValue: "uploadOperations") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "assetToken": self = .assetToken - case "assetType": self = .assetType - case "fileName": self = .fileName - case "fileSize": self = .fileSize - case "imageAsset": self = .imageAsset - case "promotedPurchase": self = .promotedPurchase - case "sourceFileChecksum": self = .sourceFileChecksum - case "state": self = .state - case "uploadOperations": self = .uploadOperations - case "uploaded": self = .uploaded - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } public struct Relation: Hashable { - /// the fields to include for returned resources of type promotedPurchaseImages - public static var promotedPurchaseImages: Relation<[PromotedPurchaseImages]?> { - .init(key: "fields[promotedPurchaseImages]") + /// the fields to include for returned resources of type inAppPurchaseImages + public static var inAppPurchaseImages: Relation<[InAppPurchaseImages]?> { + .init(key: "fields[inAppPurchaseImages]") } internal let key: String @@ -147,22 +153,19 @@ extension V1.PromotedPurchaseImages.ById.GET { } } - public enum Include: Hashable, Codable, RawRepresentable { - case promotedPurchase - case unknown(String) + public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var inAppPurchase: Self { + .init(rawValue: "inAppPurchase") + } - public var rawValue: String { - switch self { - case .promotedPurchase: return "promotedPurchase" - case .unknown(let rawValue): return rawValue - } + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "promotedPurchase": self = .promotedPurchase - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/InAppPurchaseImages/ById/InAppPurchaseImagesById.PATCH.9dc78df.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/InAppPurchaseImages/ById/InAppPurchaseImagesById.PATCH.9dc78df.generated.swift new file mode 100644 index 00000000..31f7d765 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/InAppPurchaseImages/ById/InAppPurchaseImagesById.PATCH.9dc78df.generated.swift @@ -0,0 +1,95 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.InAppPurchaseImages.ById { + public struct PATCH: Endpoint { + public typealias Parameters = InAppPurchaseImageUpdateRequest + public typealias Response = InAppPurchaseImageResponse + + public var path: String { + "/v1/inAppPurchaseImages/\(id)" + } + + /// the id of the requested resource + public var id: String + + /// InAppPurchaseImage representation + public var parameters: Parameters + + public init( + id: String, + parameters: Parameters + ) { + self.id = id + self.parameters = parameters + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "PATCH" + + var jsonEncoder: JSONEncoder { + let encoder = JSONEncoder() + return encoder + } + + urlRequest?.httpBody = try jsonEncoder.encode(parameters) + urlRequest?.setValue("application/json", forHTTPHeaderField: "Content-Type") + return urlRequest + } + + /// - Returns: **200**, Single InAppPurchaseImage as `InAppPurchaseImageResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **422**, Unprocessable request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(InAppPurchaseImageResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 409: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 422: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/InAppPurchaseImages/InAppPurchaseImages.POST.a0ba306.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/InAppPurchaseImages/InAppPurchaseImages.POST.a0ba306.generated.swift new file mode 100644 index 00000000..bbfc4de6 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/InAppPurchaseImages/InAppPurchaseImages.POST.a0ba306.generated.swift @@ -0,0 +1,84 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.InAppPurchaseImages { + public struct POST: Endpoint { + public typealias Parameters = InAppPurchaseImageCreateRequest + public typealias Response = InAppPurchaseImageResponse + + public var path: String { + "/v1/inAppPurchaseImages" + } + + /// InAppPurchaseImage representation + public var parameters: Parameters + + public init(parameters: Parameters) { + self.parameters = parameters + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "POST" + + var jsonEncoder: JSONEncoder { + let encoder = JSONEncoder() + return encoder + } + + urlRequest?.httpBody = try jsonEncoder.encode(parameters) + urlRequest?.setValue("application/json", forHTTPHeaderField: "Content-Type") + return urlRequest + } + + /// - Returns: **201**, Single InAppPurchaseImage as `InAppPurchaseImageResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **422**, Unprocessable request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 201: + return try jsonDecoder.decode(InAppPurchaseImageResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 409: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 422: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/InAppPurchaseLocalizations/ById/InAppPurchaseLocalizationsById.DELETE.36e69d9.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/InAppPurchaseLocalizations/ById/InAppPurchaseLocalizationsById.DELETE.36e69d9.generated.swift index a2f8e8c4..0d90f768 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/InAppPurchaseLocalizations/ById/InAppPurchaseLocalizationsById.DELETE.36e69d9.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/InAppPurchaseLocalizations/ById/InAppPurchaseLocalizationsById.DELETE.36e69d9.generated.swift @@ -31,11 +31,12 @@ extension V1.InAppPurchaseLocalizations.ById { return urlRequest } - /// - Returns: **204**, Success (no content) /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -43,12 +44,12 @@ extension V1.InAppPurchaseLocalizations.ById { } switch urlResponse.statusCode { - case 204: - return - case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) @@ -58,6 +59,9 @@ extension V1.InAppPurchaseLocalizations.ById { case 409: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/InAppPurchaseLocalizations/ById/InAppPurchaseLocalizationsById.GET.36e69d9.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/InAppPurchaseLocalizations/ById/InAppPurchaseLocalizationsById.GET.36e69d9.generated.swift index ccf326a7..2f1e0ee1 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/InAppPurchaseLocalizations/ById/InAppPurchaseLocalizationsById.GET.36e69d9.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/InAppPurchaseLocalizations/ById/InAppPurchaseLocalizationsById.GET.36e69d9.generated.swift @@ -44,8 +44,10 @@ extension V1.InAppPurchaseLocalizations.ById { /// - Returns: **200**, Single InAppPurchaseLocalization as `InAppPurchaseLocalizationResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -59,12 +61,18 @@ extension V1.InAppPurchaseLocalizations.ById { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 404: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -87,34 +95,35 @@ extension V1.InAppPurchaseLocalizations.ById.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum InAppPurchaseLocalizations: Hashable, Codable, RawRepresentable { - case description - case inAppPurchaseV2 - case locale - case name - case state - case unknown(String) - - public var rawValue: String { - switch self { - case .description: return "description" - case .inAppPurchaseV2: return "inAppPurchaseV2" - case .locale: return "locale" - case .name: return "name" - case .state: return "state" - case .unknown(let rawValue): return rawValue - } + public struct InAppPurchaseLocalizations: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var description: Self { + .init(rawValue: "description") + } + + public static var inAppPurchaseV2: Self { + .init(rawValue: "inAppPurchaseV2") + } + + public static var locale: Self { + .init(rawValue: "locale") + } + + public static var name: Self { + .init(rawValue: "name") } + public static var state: Self { + .init(rawValue: "state") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "description": self = .description - case "inAppPurchaseV2": self = .inAppPurchaseV2 - case "locale": self = .locale - case "name": self = .name - case "state": self = .state - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } @@ -132,22 +141,19 @@ extension V1.InAppPurchaseLocalizations.ById.GET { } } - public enum Include: Hashable, Codable, RawRepresentable { - case inAppPurchaseV2 - case unknown(String) + public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var inAppPurchaseV2: Self { + .init(rawValue: "inAppPurchaseV2") + } - public var rawValue: String { - switch self { - case .inAppPurchaseV2: return "inAppPurchaseV2" - case .unknown(let rawValue): return rawValue - } + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "inAppPurchaseV2": self = .inAppPurchaseV2 - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/InAppPurchaseLocalizations/ById/InAppPurchaseLocalizationsById.PATCH.36e69d9.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/InAppPurchaseLocalizations/ById/InAppPurchaseLocalizationsById.PATCH.36e69d9.generated.swift index 4303fab7..676d1c4f 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/InAppPurchaseLocalizations/ById/InAppPurchaseLocalizationsById.PATCH.36e69d9.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/InAppPurchaseLocalizations/ById/InAppPurchaseLocalizationsById.PATCH.36e69d9.generated.swift @@ -48,9 +48,12 @@ extension V1.InAppPurchaseLocalizations.ById { /// - Returns: **200**, Single InAppPurchaseLocalization as `InAppPurchaseLocalizationResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **422**, Unprocessable request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -64,6 +67,9 @@ extension V1.InAppPurchaseLocalizations.ById { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) @@ -73,6 +79,12 @@ extension V1.InAppPurchaseLocalizations.ById { case 409: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 422: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/InAppPurchaseLocalizations/InAppPurchaseLocalizations.POST.62f9ff4.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/InAppPurchaseLocalizations/InAppPurchaseLocalizations.POST.62f9ff4.generated.swift index 9b35c7cb..4457b722 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/InAppPurchaseLocalizations/InAppPurchaseLocalizations.POST.62f9ff4.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/InAppPurchaseLocalizations/InAppPurchaseLocalizations.POST.62f9ff4.generated.swift @@ -41,8 +41,11 @@ extension V1.InAppPurchaseLocalizations { /// - Returns: **201**, Single InAppPurchaseLocalization as `InAppPurchaseLocalizationResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **422**, Unprocessable request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -56,12 +59,21 @@ extension V1.InAppPurchaseLocalizations { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 409: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 422: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppPricePoints/AppPricePoints.GET.fee089a.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/InAppPurchasePricePoints/ById/Equalizations/InAppPurchasePricePointsByIdEqualizations.GET.6f0ca23.generated.swift similarity index 57% rename from Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppPricePoints/AppPricePoints.GET.fee089a.generated.swift rename to Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/InAppPurchasePricePoints/ById/Equalizations/InAppPurchasePricePointsByIdEqualizations.GET.6f0ca23.generated.swift index 02e9667d..b36a38f1 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppPricePoints/AppPricePoints.GET.fee089a.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/InAppPurchasePricePoints/ById/Equalizations/InAppPurchasePricePointsByIdEqualizations.GET.6f0ca23.generated.swift @@ -6,19 +6,21 @@ import Foundation import FoundationNetworking #endif -extension V1.AppPricePoints { - @available(*, deprecated) +extension V1.InAppPurchasePricePoints.ById.Equalizations { public struct GET: Endpoint { - public typealias Response = AppPricePointsResponse + public typealias Response = InAppPurchasePricePointsResponse public var path: String { - "/v1/appPricePoints" + "/v1/inAppPurchasePricePoints/\(id)/equalizations" } - public var parameters: Parameters = Parameters() + /// the id of the requested resource + public var id: String - public init() { + public var parameters: Parameters = Parameters() + public init(id: String) { + self.id = id } public func request(with baseURL: URL) throws -> URLRequest? { @@ -26,12 +28,12 @@ extension V1.AppPricePoints { components?.path = path components?.queryItems = [ - URLQueryItem(name: "fields[appPricePoints]", - value: parameters.fields[.appPricePoints]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "fields[inAppPurchasePricePoints]", + value: parameters.fields[.inAppPurchasePricePoints]?.map { "\($0)" }.joined(separator: ",")), URLQueryItem(name: "fields[territories]", value: parameters.fields[.territories]?.map { "\($0)" }.joined(separator: ",")), - URLQueryItem(name: "filter[priceTier]", - value: parameters.filter[.priceTier]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "filter[inAppPurchaseV2]", + value: parameters.filter[.inAppPurchaseV2]?.map { "\($0)" }.joined(separator: ",")), URLQueryItem(name: "filter[territory]", value: parameters.filter[.territory]?.map { "\($0)" }.joined(separator: ",")), URLQueryItem(name: "include", @@ -48,9 +50,12 @@ extension V1.AppPricePoints { return urlRequest } - /// - Returns: **200**, List of AppPricePoints as `AppPricePointsResponse` + /// - Returns: **200**, List of InAppPurchasePricePoints as `InAppPurchasePricePointsResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -59,14 +64,23 @@ extension V1.AppPricePoints { switch urlResponse.statusCode { case 200: - return try jsonDecoder.decode(AppPricePointsResponse.self, from: data) + return try jsonDecoder.decode(InAppPurchasePricePointsResponse.self, from: data) case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -74,7 +88,7 @@ extension V1.AppPricePoints { } } -extension V1.AppPricePoints.GET { +extension V1.InAppPurchasePricePoints.ById.Equalizations.GET { public struct Parameters: Hashable { public var fields: Fields = Fields() @@ -94,57 +108,54 @@ extension V1.AppPricePoints.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum AppPricePoints: Hashable, Codable, RawRepresentable { - case customerPrice - case priceTier - case proceeds - case territory - case unknown(String) - - public var rawValue: String { - switch self { - case .customerPrice: return "customerPrice" - case .priceTier: return "priceTier" - case .proceeds: return "proceeds" - case .territory: return "territory" - case .unknown(let rawValue): return rawValue - } + public struct InAppPurchasePricePoints: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var customerPrice: Self { + .init(rawValue: "customerPrice") + } + + public static var equalizations: Self { + .init(rawValue: "equalizations") + } + + public static var proceeds: Self { + .init(rawValue: "proceeds") } + public static var territory: Self { + .init(rawValue: "territory") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "customerPrice": self = .customerPrice - case "priceTier": self = .priceTier - case "proceeds": self = .proceeds - case "territory": self = .territory - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum Territories: Hashable, Codable, RawRepresentable { - case currency - case unknown(String) + public struct Territories: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var currency: Self { + .init(rawValue: "currency") + } - public var rawValue: String { - switch self { - case .currency: return "currency" - case .unknown(let rawValue): return rawValue - } + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "currency": self = .currency - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } public struct Relation: Hashable { - /// the fields to include for returned resources of type appPricePoints - public static var appPricePoints: Relation<[AppPricePoints]?> { - .init(key: "fields[appPricePoints]") + /// the fields to include for returned resources of type inAppPurchasePricePoints + public static var inAppPurchasePricePoints: Relation<[InAppPurchasePricePoints]?> { + .init(key: "fields[inAppPurchasePricePoints]") } /// the fields to include for returned resources of type territories @@ -169,9 +180,9 @@ extension V1.AppPricePoints.GET { private var values: [AnyHashable: AnyHashable] = [:] public struct Relation: Hashable { - /// filter by id(s) of related 'priceTier' - public static var priceTier: Relation<[String]?> { - .init(key: "filter[priceTier]") + /// filter by id(s) of related 'inAppPurchaseV2' + public static var inAppPurchaseV2: Relation<[String]?> { + .init(key: "filter[inAppPurchaseV2]") } /// filter by id(s) of related 'territory' @@ -187,25 +198,19 @@ extension V1.AppPricePoints.GET { } } - public enum Include: Hashable, Codable, RawRepresentable { - case priceTier - case territory - case unknown(String) + public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var territory: Self { + .init(rawValue: "territory") + } - public var rawValue: String { - switch self { - case .priceTier: return "priceTier" - case .territory: return "territory" - case .unknown(let rawValue): return rawValue - } + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "priceTier": self = .priceTier - case "territory": self = .territory - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/InAppPurchasePricePoints/ById/Relationships/Equalizations/InAppPurchasePricePointsByIdRelationshipsEqualizations.GET.9c3df36.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/InAppPurchasePricePoints/ById/Relationships/Equalizations/InAppPurchasePricePointsByIdRelationshipsEqualizations.GET.9c3df36.generated.swift new file mode 100644 index 00000000..5ee0cd87 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/InAppPurchasePricePoints/ById/Relationships/Equalizations/InAppPurchasePricePointsByIdRelationshipsEqualizations.GET.9c3df36.generated.swift @@ -0,0 +1,88 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.InAppPurchasePricePoints.ById.Relationships.Equalizations { + public struct GET: Endpoint { + public typealias Response = InAppPurchasePricePointEqualizationsLinkagesResponse + + public var path: String { + "/v1/inAppPurchasePricePoints/\(id)/relationships/equalizations" + } + + /// the id of the requested resource + public var id: String + + public var parameters: Parameters = Parameters() + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + components?.queryItems = [ + URLQueryItem(name: "limit", + value: parameters.limit.map { "\($0)" }) + ].filter { $0.value != nil } + if components?.queryItems?.isEmpty ?? false { + components?.queryItems = nil + } + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "GET" + return urlRequest + } + + /// - Returns: **200**, List of related linkages as `InAppPurchasePricePointEqualizationsLinkagesResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(InAppPurchasePricePointEqualizationsLinkagesResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +extension V1.InAppPurchasePricePoints.ById.Relationships.Equalizations.GET { + public struct Parameters: Hashable { + /// maximum resources per page + public var limit: Int? + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/InAppPurchasePriceSchedules/ById/AutomaticPrices/InAppPurchasePriceSchedulesByIdAutomaticPrices.GET.0489234.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/InAppPurchasePriceSchedules/ById/AutomaticPrices/InAppPurchasePriceSchedulesByIdAutomaticPrices.GET.0489234.generated.swift index d2bda4e3..9c2b1266 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/InAppPurchasePriceSchedules/ById/AutomaticPrices/InAppPurchasePriceSchedulesByIdAutomaticPrices.GET.0489234.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/InAppPurchasePriceSchedules/ById/AutomaticPrices/InAppPurchasePriceSchedulesByIdAutomaticPrices.GET.0489234.generated.swift @@ -52,8 +52,10 @@ extension V1.InAppPurchasePriceSchedules.ById.AutomaticPrices { /// - Returns: **200**, List of InAppPurchasePrices as `InAppPurchasePricesResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -67,12 +69,18 @@ extension V1.InAppPurchasePriceSchedules.ById.AutomaticPrices { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 404: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -100,87 +108,79 @@ extension V1.InAppPurchasePriceSchedules.ById.AutomaticPrices.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum InAppPurchasePricePoints: Hashable, Codable, RawRepresentable { - case customerPrice - case inAppPurchaseV2 - case priceTier - case proceeds - case territory - case unknown(String) - - public var rawValue: String { - switch self { - case .customerPrice: return "customerPrice" - case .inAppPurchaseV2: return "inAppPurchaseV2" - case .priceTier: return "priceTier" - case .proceeds: return "proceeds" - case .territory: return "territory" - case .unknown(let rawValue): return rawValue - } + public struct InAppPurchasePricePoints: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var customerPrice: Self { + .init(rawValue: "customerPrice") + } + + public static var equalizations: Self { + .init(rawValue: "equalizations") + } + + public static var proceeds: Self { + .init(rawValue: "proceeds") } + public static var territory: Self { + .init(rawValue: "territory") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "customerPrice": self = .customerPrice - case "inAppPurchaseV2": self = .inAppPurchaseV2 - case "priceTier": self = .priceTier - case "proceeds": self = .proceeds - case "territory": self = .territory - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum InAppPurchasePrices: Hashable, Codable, RawRepresentable { - case endDate - case inAppPurchasePricePoint - case inAppPurchaseV2 - case manual - case startDate - case territory - case unknown(String) - - public var rawValue: String { - switch self { - case .endDate: return "endDate" - case .inAppPurchasePricePoint: return "inAppPurchasePricePoint" - case .inAppPurchaseV2: return "inAppPurchaseV2" - case .manual: return "manual" - case .startDate: return "startDate" - case .territory: return "territory" - case .unknown(let rawValue): return rawValue - } + public struct InAppPurchasePrices: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var endDate: Self { + .init(rawValue: "endDate") + } + + public static var inAppPurchasePricePoint: Self { + .init(rawValue: "inAppPurchasePricePoint") + } + + public static var manual: Self { + .init(rawValue: "manual") + } + + public static var startDate: Self { + .init(rawValue: "startDate") + } + + public static var territory: Self { + .init(rawValue: "territory") + } + + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "endDate": self = .endDate - case "inAppPurchasePricePoint": self = .inAppPurchasePricePoint - case "inAppPurchaseV2": self = .inAppPurchaseV2 - case "manual": self = .manual - case "startDate": self = .startDate - case "territory": self = .territory - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum Territories: Hashable, Codable, RawRepresentable { - case currency - case unknown(String) + public struct Territories: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var currency: Self { + .init(rawValue: "currency") + } - public var rawValue: String { - switch self { - case .currency: return "currency" - case .unknown(let rawValue): return rawValue - } + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "currency": self = .currency - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } @@ -230,25 +230,23 @@ extension V1.InAppPurchasePriceSchedules.ById.AutomaticPrices.GET { } } - public enum Include: Hashable, Codable, RawRepresentable { - case inAppPurchasePricePoint - case territory - case unknown(String) + public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var inAppPurchasePricePoint: Self { + .init(rawValue: "inAppPurchasePricePoint") + } - public var rawValue: String { - switch self { - case .inAppPurchasePricePoint: return "inAppPurchasePricePoint" - case .territory: return "territory" - case .unknown(let rawValue): return rawValue - } + public static var territory: Self { + .init(rawValue: "territory") } + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "inAppPurchasePricePoint": self = .inAppPurchasePricePoint - case "territory": self = .territory - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/InAppPurchasePriceSchedules/ById/BaseTerritory/InAppPurchasePriceSchedulesByIdBaseTerritory.GET.63bd028.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/InAppPurchasePriceSchedules/ById/BaseTerritory/InAppPurchasePriceSchedulesByIdBaseTerritory.GET.63bd028.generated.swift index 0cd11a4e..ca666393 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/InAppPurchasePriceSchedules/ById/BaseTerritory/InAppPurchasePriceSchedulesByIdBaseTerritory.GET.63bd028.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/InAppPurchasePriceSchedules/ById/BaseTerritory/InAppPurchasePriceSchedulesByIdBaseTerritory.GET.63bd028.generated.swift @@ -42,8 +42,10 @@ extension V1.InAppPurchasePriceSchedules.ById.BaseTerritory { /// - Returns: **200**, Single Territory as `TerritoryResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -57,12 +59,18 @@ extension V1.InAppPurchasePriceSchedules.ById.BaseTerritory { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 404: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -82,22 +90,19 @@ extension V1.InAppPurchasePriceSchedules.ById.BaseTerritory.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum Territories: Hashable, Codable, RawRepresentable { - case currency - case unknown(String) + public struct Territories: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var currency: Self { + .init(rawValue: "currency") + } - public var rawValue: String { - switch self { - case .currency: return "currency" - case .unknown(let rawValue): return rawValue - } + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "currency": self = .currency - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/InAppPurchasePriceSchedules/ById/InAppPurchasePriceSchedulesById.GET.ef73501.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/InAppPurchasePriceSchedules/ById/InAppPurchasePriceSchedulesById.GET.ef73501.generated.swift index 33c59e46..07d8ebcd 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/InAppPurchasePriceSchedules/ById/InAppPurchasePriceSchedulesById.GET.ef73501.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/InAppPurchasePriceSchedules/ById/InAppPurchasePriceSchedulesById.GET.ef73501.generated.swift @@ -52,8 +52,10 @@ extension V1.InAppPurchasePriceSchedules.ById { /// - Returns: **200**, Single InAppPurchasePriceSchedule as `InAppPurchasePriceScheduleResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -67,12 +69,18 @@ extension V1.InAppPurchasePriceSchedules.ById { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 404: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -97,84 +105,75 @@ extension V1.InAppPurchasePriceSchedules.ById.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum InAppPurchasePriceSchedules: Hashable, Codable, RawRepresentable { - case automaticPrices - case baseTerritory - case inAppPurchase - case manualPrices - case unknown(String) - - public var rawValue: String { - switch self { - case .automaticPrices: return "automaticPrices" - case .baseTerritory: return "baseTerritory" - case .inAppPurchase: return "inAppPurchase" - case .manualPrices: return "manualPrices" - case .unknown(let rawValue): return rawValue - } + public struct InAppPurchasePriceSchedules: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var automaticPrices: Self { + .init(rawValue: "automaticPrices") } + public static var baseTerritory: Self { + .init(rawValue: "baseTerritory") + } + + public static var manualPrices: Self { + .init(rawValue: "manualPrices") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "automaticPrices": self = .automaticPrices - case "baseTerritory": self = .baseTerritory - case "inAppPurchase": self = .inAppPurchase - case "manualPrices": self = .manualPrices - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum InAppPurchasePrices: Hashable, Codable, RawRepresentable { - case endDate - case inAppPurchasePricePoint - case inAppPurchaseV2 - case manual - case startDate - case territory - case unknown(String) - - public var rawValue: String { - switch self { - case .endDate: return "endDate" - case .inAppPurchasePricePoint: return "inAppPurchasePricePoint" - case .inAppPurchaseV2: return "inAppPurchaseV2" - case .manual: return "manual" - case .startDate: return "startDate" - case .territory: return "territory" - case .unknown(let rawValue): return rawValue - } + public struct InAppPurchasePrices: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var endDate: Self { + .init(rawValue: "endDate") + } + + public static var inAppPurchasePricePoint: Self { + .init(rawValue: "inAppPurchasePricePoint") + } + + public static var manual: Self { + .init(rawValue: "manual") + } + + public static var startDate: Self { + .init(rawValue: "startDate") } + public static var territory: Self { + .init(rawValue: "territory") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "endDate": self = .endDate - case "inAppPurchasePricePoint": self = .inAppPurchasePricePoint - case "inAppPurchaseV2": self = .inAppPurchaseV2 - case "manual": self = .manual - case "startDate": self = .startDate - case "territory": self = .territory - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum Territories: Hashable, Codable, RawRepresentable { - case currency - case unknown(String) + public struct Territories: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var currency: Self { + .init(rawValue: "currency") + } - public var rawValue: String { - switch self { - case .currency: return "currency" - case .unknown(let rawValue): return rawValue - } + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "currency": self = .currency - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } @@ -202,31 +201,27 @@ extension V1.InAppPurchasePriceSchedules.ById.GET { } } - public enum Include: Hashable, Codable, RawRepresentable { - case automaticPrices - case baseTerritory - case inAppPurchase - case manualPrices - case unknown(String) - - public var rawValue: String { - switch self { - case .automaticPrices: return "automaticPrices" - case .baseTerritory: return "baseTerritory" - case .inAppPurchase: return "inAppPurchase" - case .manualPrices: return "manualPrices" - case .unknown(let rawValue): return rawValue - } + public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var automaticPrices: Self { + .init(rawValue: "automaticPrices") } + public static var baseTerritory: Self { + .init(rawValue: "baseTerritory") + } + + public static var manualPrices: Self { + .init(rawValue: "manualPrices") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "automaticPrices": self = .automaticPrices - case "baseTerritory": self = .baseTerritory - case "inAppPurchase": self = .inAppPurchase - case "manualPrices": self = .manualPrices - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/InAppPurchasePriceSchedules/ById/ManualPrices/InAppPurchasePriceSchedulesByIdManualPrices.GET.291dbba.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/InAppPurchasePriceSchedules/ById/ManualPrices/InAppPurchasePriceSchedulesByIdManualPrices.GET.291dbba.generated.swift index f795b7bd..9ce79479 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/InAppPurchasePriceSchedules/ById/ManualPrices/InAppPurchasePriceSchedulesByIdManualPrices.GET.291dbba.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/InAppPurchasePriceSchedules/ById/ManualPrices/InAppPurchasePriceSchedulesByIdManualPrices.GET.291dbba.generated.swift @@ -52,8 +52,10 @@ extension V1.InAppPurchasePriceSchedules.ById.ManualPrices { /// - Returns: **200**, List of InAppPurchasePrices as `InAppPurchasePricesResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -67,12 +69,18 @@ extension V1.InAppPurchasePriceSchedules.ById.ManualPrices { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 404: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -100,87 +108,79 @@ extension V1.InAppPurchasePriceSchedules.ById.ManualPrices.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum InAppPurchasePricePoints: Hashable, Codable, RawRepresentable { - case customerPrice - case inAppPurchaseV2 - case priceTier - case proceeds - case territory - case unknown(String) - - public var rawValue: String { - switch self { - case .customerPrice: return "customerPrice" - case .inAppPurchaseV2: return "inAppPurchaseV2" - case .priceTier: return "priceTier" - case .proceeds: return "proceeds" - case .territory: return "territory" - case .unknown(let rawValue): return rawValue - } + public struct InAppPurchasePricePoints: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var customerPrice: Self { + .init(rawValue: "customerPrice") + } + + public static var equalizations: Self { + .init(rawValue: "equalizations") + } + + public static var proceeds: Self { + .init(rawValue: "proceeds") } + public static var territory: Self { + .init(rawValue: "territory") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "customerPrice": self = .customerPrice - case "inAppPurchaseV2": self = .inAppPurchaseV2 - case "priceTier": self = .priceTier - case "proceeds": self = .proceeds - case "territory": self = .territory - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum InAppPurchasePrices: Hashable, Codable, RawRepresentable { - case endDate - case inAppPurchasePricePoint - case inAppPurchaseV2 - case manual - case startDate - case territory - case unknown(String) - - public var rawValue: String { - switch self { - case .endDate: return "endDate" - case .inAppPurchasePricePoint: return "inAppPurchasePricePoint" - case .inAppPurchaseV2: return "inAppPurchaseV2" - case .manual: return "manual" - case .startDate: return "startDate" - case .territory: return "territory" - case .unknown(let rawValue): return rawValue - } + public struct InAppPurchasePrices: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var endDate: Self { + .init(rawValue: "endDate") + } + + public static var inAppPurchasePricePoint: Self { + .init(rawValue: "inAppPurchasePricePoint") + } + + public static var manual: Self { + .init(rawValue: "manual") + } + + public static var startDate: Self { + .init(rawValue: "startDate") + } + + public static var territory: Self { + .init(rawValue: "territory") + } + + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "endDate": self = .endDate - case "inAppPurchasePricePoint": self = .inAppPurchasePricePoint - case "inAppPurchaseV2": self = .inAppPurchaseV2 - case "manual": self = .manual - case "startDate": self = .startDate - case "territory": self = .territory - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum Territories: Hashable, Codable, RawRepresentable { - case currency - case unknown(String) + public struct Territories: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var currency: Self { + .init(rawValue: "currency") + } - public var rawValue: String { - switch self { - case .currency: return "currency" - case .unknown(let rawValue): return rawValue - } + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "currency": self = .currency - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } @@ -230,25 +230,23 @@ extension V1.InAppPurchasePriceSchedules.ById.ManualPrices.GET { } } - public enum Include: Hashable, Codable, RawRepresentable { - case inAppPurchasePricePoint - case territory - case unknown(String) + public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var inAppPurchasePricePoint: Self { + .init(rawValue: "inAppPurchasePricePoint") + } - public var rawValue: String { - switch self { - case .inAppPurchasePricePoint: return "inAppPurchasePricePoint" - case .territory: return "territory" - case .unknown(let rawValue): return rawValue - } + public static var territory: Self { + .init(rawValue: "territory") } + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "inAppPurchasePricePoint": self = .inAppPurchasePricePoint - case "territory": self = .territory - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/InAppPurchasePriceSchedules/ById/Relationships/AutomaticPrices/InAppPurchasePriceSchedulesByIdRelationshipsAutomaticPrices.GET.5858f49.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/InAppPurchasePriceSchedules/ById/Relationships/AutomaticPrices/InAppPurchasePriceSchedulesByIdRelationshipsAutomaticPrices.GET.5858f49.generated.swift new file mode 100644 index 00000000..914c289a --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/InAppPurchasePriceSchedules/ById/Relationships/AutomaticPrices/InAppPurchasePriceSchedulesByIdRelationshipsAutomaticPrices.GET.5858f49.generated.swift @@ -0,0 +1,88 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.InAppPurchasePriceSchedules.ById.Relationships.AutomaticPrices { + public struct GET: Endpoint { + public typealias Response = InAppPurchasePriceScheduleAutomaticPricesLinkagesResponse + + public var path: String { + "/v1/inAppPurchasePriceSchedules/\(id)/relationships/automaticPrices" + } + + /// the id of the requested resource + public var id: String + + public var parameters: Parameters = Parameters() + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + components?.queryItems = [ + URLQueryItem(name: "limit", + value: parameters.limit.map { "\($0)" }) + ].filter { $0.value != nil } + if components?.queryItems?.isEmpty ?? false { + components?.queryItems = nil + } + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "GET" + return urlRequest + } + + /// - Returns: **200**, List of related linkages as `InAppPurchasePriceScheduleAutomaticPricesLinkagesResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(InAppPurchasePriceScheduleAutomaticPricesLinkagesResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +extension V1.InAppPurchasePriceSchedules.ById.Relationships.AutomaticPrices.GET { + public struct Parameters: Hashable { + /// maximum resources per page + public var limit: Int? + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/InAppPurchasePriceSchedules/ById/Relationships/BaseTerritory/InAppPurchasePriceSchedulesByIdRelationshipsBaseTerritory.GET.3dbbaa2.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/InAppPurchasePriceSchedules/ById/Relationships/BaseTerritory/InAppPurchasePriceSchedulesByIdRelationshipsBaseTerritory.GET.3dbbaa2.generated.swift new file mode 100644 index 00000000..90059323 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/InAppPurchasePriceSchedules/ById/Relationships/BaseTerritory/InAppPurchasePriceSchedulesByIdRelationshipsBaseTerritory.GET.3dbbaa2.generated.swift @@ -0,0 +1,86 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.InAppPurchasePriceSchedules.ById.Relationships.BaseTerritory { + public struct GET: Endpoint { + public typealias Response = InAppPurchasePriceScheduleBaseTerritoryLinkageResponse + + public var path: String { + "/v1/inAppPurchasePriceSchedules/\(id)/relationships/baseTerritory" + } + + /// the id of the requested resource + public var id: String + + public var parameters: Parameters = Parameters() + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + components?.queryItems = [ + + ].filter { $0.value != nil } + if components?.queryItems?.isEmpty ?? false { + components?.queryItems = nil + } + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "GET" + return urlRequest + } + + /// - Returns: **200**, Related linkage as `InAppPurchasePriceScheduleBaseTerritoryLinkageResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(InAppPurchasePriceScheduleBaseTerritoryLinkageResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +extension V1.InAppPurchasePriceSchedules.ById.Relationships.BaseTerritory.GET { + public struct Parameters: Hashable { + + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/InAppPurchasePriceSchedules/ById/Relationships/ManualPrices/InAppPurchasePriceSchedulesByIdRelationshipsManualPrices.GET.9b39a6f.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/InAppPurchasePriceSchedules/ById/Relationships/ManualPrices/InAppPurchasePriceSchedulesByIdRelationshipsManualPrices.GET.9b39a6f.generated.swift new file mode 100644 index 00000000..5da03999 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/InAppPurchasePriceSchedules/ById/Relationships/ManualPrices/InAppPurchasePriceSchedulesByIdRelationshipsManualPrices.GET.9b39a6f.generated.swift @@ -0,0 +1,88 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.InAppPurchasePriceSchedules.ById.Relationships.ManualPrices { + public struct GET: Endpoint { + public typealias Response = InAppPurchasePriceScheduleManualPricesLinkagesResponse + + public var path: String { + "/v1/inAppPurchasePriceSchedules/\(id)/relationships/manualPrices" + } + + /// the id of the requested resource + public var id: String + + public var parameters: Parameters = Parameters() + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + components?.queryItems = [ + URLQueryItem(name: "limit", + value: parameters.limit.map { "\($0)" }) + ].filter { $0.value != nil } + if components?.queryItems?.isEmpty ?? false { + components?.queryItems = nil + } + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "GET" + return urlRequest + } + + /// - Returns: **200**, List of related linkages as `InAppPurchasePriceScheduleManualPricesLinkagesResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(InAppPurchasePriceScheduleManualPricesLinkagesResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +extension V1.InAppPurchasePriceSchedules.ById.Relationships.ManualPrices.GET { + public struct Parameters: Hashable { + /// maximum resources per page + public var limit: Int? + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/InAppPurchasePriceSchedules/InAppPurchasePriceSchedules.POST.7f8bfd9.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/InAppPurchasePriceSchedules/InAppPurchasePriceSchedules.POST.7f8bfd9.generated.swift index fefe937c..280f6172 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/InAppPurchasePriceSchedules/InAppPurchasePriceSchedules.POST.7f8bfd9.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/InAppPurchasePriceSchedules/InAppPurchasePriceSchedules.POST.7f8bfd9.generated.swift @@ -41,8 +41,11 @@ extension V1.InAppPurchasePriceSchedules { /// - Returns: **201**, Single InAppPurchasePriceSchedule as `InAppPurchasePriceScheduleResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **422**, Unprocessable request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -56,12 +59,21 @@ extension V1.InAppPurchasePriceSchedules { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 409: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 422: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/InAppPurchaseSubmissions/InAppPurchaseSubmissions.POST.0d31d8f.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/InAppPurchaseSubmissions/InAppPurchaseSubmissions.POST.0d31d8f.generated.swift index 8f7fb193..03692b37 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/InAppPurchaseSubmissions/InAppPurchaseSubmissions.POST.0d31d8f.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/InAppPurchaseSubmissions/InAppPurchaseSubmissions.POST.0d31d8f.generated.swift @@ -41,8 +41,11 @@ extension V1.InAppPurchaseSubmissions { /// - Returns: **201**, Single InAppPurchaseSubmission as `InAppPurchaseSubmissionResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **422**, Unprocessable request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -56,12 +59,21 @@ extension V1.InAppPurchaseSubmissions { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 409: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 422: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/InAppPurchases/ById/InAppPurchasesById.GET.81fb623.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/InAppPurchases/ById/InAppPurchasesById.GET.81fb623.generated.swift index 204a6a17..0bd29c60 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/InAppPurchases/ById/InAppPurchasesById.GET.81fb623.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/InAppPurchases/ById/InAppPurchasesById.GET.81fb623.generated.swift @@ -47,8 +47,10 @@ extension V1.InAppPurchases.ById { /// - Returns: **200**, Single InAppPurchase as `InAppPurchaseResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -62,12 +64,18 @@ extension V1.InAppPurchases.ById { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 404: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -92,34 +100,35 @@ extension V1.InAppPurchases.ById.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum InAppPurchases: Hashable, Codable, RawRepresentable { - case apps - case inAppPurchaseType - case productId - case referenceName - case state - case unknown(String) - - public var rawValue: String { - switch self { - case .apps: return "apps" - case .inAppPurchaseType: return "inAppPurchaseType" - case .productId: return "productId" - case .referenceName: return "referenceName" - case .state: return "state" - case .unknown(let rawValue): return rawValue - } + public struct InAppPurchases: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var apps: Self { + .init(rawValue: "apps") + } + + public static var inAppPurchaseType: Self { + .init(rawValue: "inAppPurchaseType") + } + + public static var productId: Self { + .init(rawValue: "productId") + } + + public static var referenceName: Self { + .init(rawValue: "referenceName") } + public static var state: Self { + .init(rawValue: "state") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "apps": self = .apps - case "inAppPurchaseType": self = .inAppPurchaseType - case "productId": self = .productId - case "referenceName": self = .referenceName - case "state": self = .state - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } @@ -137,22 +146,19 @@ extension V1.InAppPurchases.ById.GET { } } - public enum Include: Hashable, Codable, RawRepresentable { - case apps - case unknown(String) + public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var apps: Self { + .init(rawValue: "apps") + } - public var rawValue: String { - switch self { - case .apps: return "apps" - case .unknown(let rawValue): return rawValue - } + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "apps": self = .apps - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/MarketplaceSearchDetails/ById/MarketplaceSearchDetailsById.DELETE.50b8a11.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/MarketplaceSearchDetails/ById/MarketplaceSearchDetailsById.DELETE.50b8a11.generated.swift new file mode 100644 index 00000000..ff964421 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/MarketplaceSearchDetails/ById/MarketplaceSearchDetailsById.DELETE.50b8a11.generated.swift @@ -0,0 +1,72 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.MarketplaceSearchDetails.ById { + public struct DELETE: Endpoint { + public typealias Parameters = Never + public typealias Response = Void + + public var path: String { + "/v1/marketplaceSearchDetails/\(id)" + } + + /// the id of the requested resource + public var id: String + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "DELETE" + return urlRequest + } + + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 409: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/MarketplaceSearchDetails/ById/MarketplaceSearchDetailsById.PATCH.50b8a11.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/MarketplaceSearchDetails/ById/MarketplaceSearchDetailsById.PATCH.50b8a11.generated.swift new file mode 100644 index 00000000..7fe06291 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/MarketplaceSearchDetails/ById/MarketplaceSearchDetailsById.PATCH.50b8a11.generated.swift @@ -0,0 +1,95 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.MarketplaceSearchDetails.ById { + public struct PATCH: Endpoint { + public typealias Parameters = MarketplaceSearchDetailUpdateRequest + public typealias Response = MarketplaceSearchDetailResponse + + public var path: String { + "/v1/marketplaceSearchDetails/\(id)" + } + + /// the id of the requested resource + public var id: String + + /// MarketplaceSearchDetail representation + public var parameters: Parameters + + public init( + id: String, + parameters: Parameters + ) { + self.id = id + self.parameters = parameters + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "PATCH" + + var jsonEncoder: JSONEncoder { + let encoder = JSONEncoder() + return encoder + } + + urlRequest?.httpBody = try jsonEncoder.encode(parameters) + urlRequest?.setValue("application/json", forHTTPHeaderField: "Content-Type") + return urlRequest + } + + /// - Returns: **200**, Single MarketplaceSearchDetail as `MarketplaceSearchDetailResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **422**, Unprocessable request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(MarketplaceSearchDetailResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 409: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 422: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/MarketplaceSearchDetails/MarketplaceSearchDetails.POST.20dda23.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/MarketplaceSearchDetails/MarketplaceSearchDetails.POST.20dda23.generated.swift new file mode 100644 index 00000000..d9c72546 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/MarketplaceSearchDetails/MarketplaceSearchDetails.POST.20dda23.generated.swift @@ -0,0 +1,84 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.MarketplaceSearchDetails { + public struct POST: Endpoint { + public typealias Parameters = MarketplaceSearchDetailCreateRequest + public typealias Response = MarketplaceSearchDetailResponse + + public var path: String { + "/v1/marketplaceSearchDetails" + } + + /// MarketplaceSearchDetail representation + public var parameters: Parameters + + public init(parameters: Parameters) { + self.parameters = parameters + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "POST" + + var jsonEncoder: JSONEncoder { + let encoder = JSONEncoder() + return encoder + } + + urlRequest?.httpBody = try jsonEncoder.encode(parameters) + urlRequest?.setValue("application/json", forHTTPHeaderField: "Content-Type") + return urlRequest + } + + /// - Returns: **201**, Single MarketplaceSearchDetail as `MarketplaceSearchDetailResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **422**, Unprocessable request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 201: + return try jsonDecoder.decode(MarketplaceSearchDetailResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 409: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 422: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/MarketplaceWebhooks/ById/MarketplaceWebhooksById.DELETE.40c121d.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/MarketplaceWebhooks/ById/MarketplaceWebhooksById.DELETE.40c121d.generated.swift new file mode 100644 index 00000000..9465bd9f --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/MarketplaceWebhooks/ById/MarketplaceWebhooksById.DELETE.40c121d.generated.swift @@ -0,0 +1,72 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.MarketplaceWebhooks.ById { + public struct DELETE: Endpoint { + public typealias Parameters = Never + public typealias Response = Void + + public var path: String { + "/v1/marketplaceWebhooks/\(id)" + } + + /// the id of the requested resource + public var id: String + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "DELETE" + return urlRequest + } + + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 409: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/MarketplaceWebhooks/ById/MarketplaceWebhooksById.PATCH.40c121d.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/MarketplaceWebhooks/ById/MarketplaceWebhooksById.PATCH.40c121d.generated.swift new file mode 100644 index 00000000..4cc9db19 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/MarketplaceWebhooks/ById/MarketplaceWebhooksById.PATCH.40c121d.generated.swift @@ -0,0 +1,95 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.MarketplaceWebhooks.ById { + public struct PATCH: Endpoint { + public typealias Parameters = MarketplaceWebhookUpdateRequest + public typealias Response = MarketplaceWebhookResponse + + public var path: String { + "/v1/marketplaceWebhooks/\(id)" + } + + /// the id of the requested resource + public var id: String + + /// MarketplaceWebhook representation + public var parameters: Parameters + + public init( + id: String, + parameters: Parameters + ) { + self.id = id + self.parameters = parameters + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "PATCH" + + var jsonEncoder: JSONEncoder { + let encoder = JSONEncoder() + return encoder + } + + urlRequest?.httpBody = try jsonEncoder.encode(parameters) + urlRequest?.setValue("application/json", forHTTPHeaderField: "Content-Type") + return urlRequest + } + + /// - Returns: **200**, Single MarketplaceWebhook as `MarketplaceWebhookResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **422**, Unprocessable request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(MarketplaceWebhookResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 409: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 422: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppAvailabilities/ById/AvailableTerritories/AppAvailabilitiesByIdAvailableTerritories.GET.c407e06.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/MarketplaceWebhooks/MarketplaceWebhooks.GET.3bb82e0.generated.swift similarity index 64% rename from Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppAvailabilities/ById/AvailableTerritories/AppAvailabilitiesByIdAvailableTerritories.GET.c407e06.generated.swift rename to Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/MarketplaceWebhooks/MarketplaceWebhooks.GET.3bb82e0.generated.swift index 54f1ab2b..79c6eefe 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppAvailabilities/ById/AvailableTerritories/AppAvailabilitiesByIdAvailableTerritories.GET.c407e06.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/MarketplaceWebhooks/MarketplaceWebhooks.GET.3bb82e0.generated.swift @@ -6,22 +6,18 @@ import Foundation import FoundationNetworking #endif -extension V1.AppAvailabilities.ById.AvailableTerritories { - @available(*, deprecated) +extension V1.MarketplaceWebhooks { public struct GET: Endpoint { - public typealias Response = TerritoriesResponse + public typealias Response = MarketplaceWebhooksResponse public var path: String { - "/v1/appAvailabilities/\(id)/availableTerritories" + "/v1/marketplaceWebhooks" } - /// the id of the requested resource - public var id: String - public var parameters: Parameters = Parameters() - public init(id: String) { - self.id = id + public init() { + } public func request(with baseURL: URL) throws -> URLRequest? { @@ -29,8 +25,8 @@ extension V1.AppAvailabilities.ById.AvailableTerritories { components?.path = path components?.queryItems = [ - URLQueryItem(name: "fields[territories]", - value: parameters.fields[.territories]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "fields[marketplaceWebhooks]", + value: parameters.fields[.marketplaceWebhooks]?.map { "\($0)" }.joined(separator: ",")), URLQueryItem(name: "limit", value: parameters.limit.map { "\($0)" }) ].filter { $0.value != nil } @@ -43,10 +39,11 @@ extension V1.AppAvailabilities.ById.AvailableTerritories { return urlRequest } - /// - Returns: **200**, List of Territories as `TerritoriesResponse` + /// - Returns: **200**, List of MarketplaceWebhooks as `MarketplaceWebhooksResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` - /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -55,15 +52,18 @@ extension V1.AppAvailabilities.ById.AvailableTerritories { switch urlResponse.statusCode { case 200: - return try jsonDecoder.decode(TerritoriesResponse.self, from: data) + return try jsonDecoder.decode(MarketplaceWebhooksResponse.self, from: data) case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) - case 404: + case 429: throw try jsonDecoder.decode(ErrorResponse.self, from: data) default: @@ -73,7 +73,7 @@ extension V1.AppAvailabilities.ById.AvailableTerritories { } } -extension V1.AppAvailabilities.ById.AvailableTerritories.GET { +extension V1.MarketplaceWebhooks.GET { public struct Parameters: Hashable { public var fields: Fields = Fields() @@ -88,29 +88,26 @@ extension V1.AppAvailabilities.ById.AvailableTerritories.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum Territories: Hashable, Codable, RawRepresentable { - case currency - case unknown(String) + public struct MarketplaceWebhooks: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var endpointUrl: Self { + .init(rawValue: "endpointUrl") + } - public var rawValue: String { - switch self { - case .currency: return "currency" - case .unknown(let rawValue): return rawValue - } + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "currency": self = .currency - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } public struct Relation: Hashable { - /// the fields to include for returned resources of type territories - public static var territories: Relation<[Territories]?> { - .init(key: "fields[territories]") + /// the fields to include for returned resources of type marketplaceWebhooks + public static var marketplaceWebhooks: Relation<[MarketplaceWebhooks]?> { + .init(key: "fields[marketplaceWebhooks]") } internal let key: String diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/MarketplaceWebhooks/MarketplaceWebhooks.POST.3bb82e0.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/MarketplaceWebhooks/MarketplaceWebhooks.POST.3bb82e0.generated.swift new file mode 100644 index 00000000..afc8ad6c --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/MarketplaceWebhooks/MarketplaceWebhooks.POST.3bb82e0.generated.swift @@ -0,0 +1,84 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.MarketplaceWebhooks { + public struct POST: Endpoint { + public typealias Parameters = MarketplaceWebhookCreateRequest + public typealias Response = MarketplaceWebhookResponse + + public var path: String { + "/v1/marketplaceWebhooks" + } + + /// MarketplaceWebhook representation + public var parameters: Parameters + + public init(parameters: Parameters) { + self.parameters = parameters + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "POST" + + var jsonEncoder: JSONEncoder { + let encoder = JSONEncoder() + return encoder + } + + urlRequest?.httpBody = try jsonEncoder.encode(parameters) + urlRequest?.setValue("application/json", forHTTPHeaderField: "Content-Type") + return urlRequest + } + + /// - Returns: **201**, Single MarketplaceWebhook as `MarketplaceWebhookResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **422**, Unprocessable request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 201: + return try jsonDecoder.decode(MarketplaceWebhookResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 409: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 422: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/MerchantIds/ById/Certificates/MerchantIdsByIdCertificates.GET.09c9050.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/MerchantIds/ById/Certificates/MerchantIdsByIdCertificates.GET.09c9050.generated.swift new file mode 100644 index 00000000..93fd4f68 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/MerchantIds/ById/Certificates/MerchantIdsByIdCertificates.GET.09c9050.generated.swift @@ -0,0 +1,394 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.MerchantIds.ById.Certificates { + public struct GET: Endpoint { + public typealias Response = CertificatesResponse + + public var path: String { + "/v1/merchantIds/\(id)/certificates" + } + + /// the id of the requested resource + public var id: String + + public var parameters: Parameters = Parameters() + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + components?.queryItems = [ + URLQueryItem(name: "fields[certificates]", + value: parameters.fields[.certificates]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "fields[passTypeIds]", + value: parameters.fields[.passTypeIds]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "filter[certificateType]", + value: parameters.filter[.certificateType]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "filter[displayName]", + value: parameters.filter[.displayName]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "filter[id]", + value: parameters.filter[.id]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "filter[serialNumber]", + value: parameters.filter[.serialNumber]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "include", + value: parameters.include?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "limit", + value: parameters.limit.map { "\($0)" }), + URLQueryItem(name: "sort", + value: parameters.sort?.map { "\($0)" }.joined(separator: ",")) + ].filter { $0.value != nil } + if components?.queryItems?.isEmpty ?? false { + components?.queryItems = nil + } + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "GET" + return urlRequest + } + + /// - Returns: **200**, List of Certificates as `CertificatesResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(CertificatesResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +extension V1.MerchantIds.ById.Certificates.GET { + public struct Parameters: Hashable { + public var fields: Fields = Fields() + + public var filter: Filter = Filter() + + /// comma-separated list of relationships to include + public var include: [Include]? + + /// maximum resources per page + public var limit: Int? + + /// comma-separated list of sort expressions; resources will be sorted as specified + public var sort: [Sort]? + + public struct Fields: Hashable { + public subscript (_ relation: Relation) -> T { + get { values[relation]?.base as! T } + set { values[relation] = AnyHashable(newValue) } + } + + private var values: [AnyHashable: AnyHashable] = [:] + + public struct Certificates: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var activated: Self { + .init(rawValue: "activated") + } + + public static var certificateContent: Self { + .init(rawValue: "certificateContent") + } + + public static var certificateType: Self { + .init(rawValue: "certificateType") + } + + public static var displayName: Self { + .init(rawValue: "displayName") + } + + public static var expirationDate: Self { + .init(rawValue: "expirationDate") + } + + public static var name: Self { + .init(rawValue: "name") + } + + public static var passTypeId: Self { + .init(rawValue: "passTypeId") + } + + public static var platform: Self { + .init(rawValue: "platform") + } + + public static var serialNumber: Self { + .init(rawValue: "serialNumber") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct PassTypeIds: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var certificates: Self { + .init(rawValue: "certificates") + } + + public static var identifier: Self { + .init(rawValue: "identifier") + } + + public static var name: Self { + .init(rawValue: "name") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct Relation: Hashable { + /// the fields to include for returned resources of type certificates + public static var certificates: Relation<[Certificates]?> { + .init(key: "fields[certificates]") + } + + /// the fields to include for returned resources of type passTypeIds + public static var passTypeIds: Relation<[PassTypeIds]?> { + .init(key: "fields[passTypeIds]") + } + + internal let key: String + + public func hash(into hasher: inout Hasher) { + hasher.combine(key) + } + } + } + + public struct Filter: Hashable { + public subscript (_ relation: Relation) -> T { + get { values[relation]?.base as! T } + set { values[relation] = AnyHashable(newValue) } + } + + private var values: [AnyHashable: AnyHashable] = [:] + + public struct CertificateType: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var applePay: Self { + .init(rawValue: "APPLE_PAY") + } + + public static var applePayMerchantIdentity: Self { + .init(rawValue: "APPLE_PAY_MERCHANT_IDENTITY") + } + + public static var applePayPspIdentity: Self { + .init(rawValue: "APPLE_PAY_PSP_IDENTITY") + } + + public static var applePayRsa: Self { + .init(rawValue: "APPLE_PAY_RSA") + } + + public static var developerIdApplication: Self { + .init(rawValue: "DEVELOPER_ID_APPLICATION") + } + + public static var developerIdApplicationG2: Self { + .init(rawValue: "DEVELOPER_ID_APPLICATION_G2") + } + + public static var developerIdKext: Self { + .init(rawValue: "DEVELOPER_ID_KEXT") + } + + public static var developerIdKextG2: Self { + .init(rawValue: "DEVELOPER_ID_KEXT_G2") + } + + public static var development: Self { + .init(rawValue: "DEVELOPMENT") + } + + public static var distribution: Self { + .init(rawValue: "DISTRIBUTION") + } + + public static var iOSDevelopment: Self { + .init(rawValue: "IOS_DEVELOPMENT") + } + + public static var iOSDistribution: Self { + .init(rawValue: "IOS_DISTRIBUTION") + } + + public static var identityAccess: Self { + .init(rawValue: "IDENTITY_ACCESS") + } + + public static var macAppDevelopment: Self { + .init(rawValue: "MAC_APP_DEVELOPMENT") + } + + public static var macAppDistribution: Self { + .init(rawValue: "MAC_APP_DISTRIBUTION") + } + + public static var macInstallerDistribution: Self { + .init(rawValue: "MAC_INSTALLER_DISTRIBUTION") + } + + public static var passTypeId: Self { + .init(rawValue: "PASS_TYPE_ID") + } + + public static var passTypeIdWithNfc: Self { + .init(rawValue: "PASS_TYPE_ID_WITH_NFC") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct Relation: Hashable { + /// filter by attribute 'certificateType' + public static var certificateType: Relation<[CertificateType]?> { + .init(key: "filter[certificateType]") + } + + /// filter by attribute 'displayName' + public static var displayName: Relation<[String]?> { + .init(key: "filter[displayName]") + } + + /// filter by id(s) + public static var id: Relation<[String]?> { + .init(key: "filter[id]") + } + + /// filter by attribute 'serialNumber' + public static var serialNumber: Relation<[String]?> { + .init(key: "filter[serialNumber]") + } + + internal let key: String + + public func hash(into hasher: inout Hasher) { + hasher.combine(key) + } + } + } + + public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var passTypeId: Self { + .init(rawValue: "passTypeId") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct Sort: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var certificateType: Self { + .init(rawValue: "certificateType") + } + + public static var certificateTypeDesc: Self { + .init(rawValue: "-certificateType") + } + + public static var displayName: Self { + .init(rawValue: "displayName") + } + + public static var displayNameDesc: Self { + .init(rawValue: "-displayName") + } + + public static var id: Self { + .init(rawValue: "id") + } + + public static var idDesc: Self { + .init(rawValue: "-id") + } + + public static var serialNumber: Self { + .init(rawValue: "serialNumber") + } + + public static var serialNumberDesc: Self { + .init(rawValue: "-serialNumber") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppPreOrders/ById/AppPreOrdersById.DELETE.7c9dbe6.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/MerchantIds/ById/MerchantIdsById.DELETE.a4c15f7.generated.swift similarity index 82% rename from Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppPreOrders/ById/AppPreOrdersById.DELETE.7c9dbe6.generated.swift rename to Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/MerchantIds/ById/MerchantIdsById.DELETE.a4c15f7.generated.swift index 65c3dcd8..21895057 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppPreOrders/ById/AppPreOrdersById.DELETE.7c9dbe6.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/MerchantIds/ById/MerchantIdsById.DELETE.a4c15f7.generated.swift @@ -6,14 +6,13 @@ import Foundation import FoundationNetworking #endif -extension V1.AppPreOrders.ById { - @available(*, deprecated) +extension V1.MerchantIds.ById { public struct DELETE: Endpoint { public typealias Parameters = Never public typealias Response = Void public var path: String { - "/v1/appPreOrders/\(id)" + "/v1/merchantIds/\(id)" } /// the id of the requested resource @@ -32,11 +31,12 @@ extension V1.AppPreOrders.ById { return urlRequest } - /// - Returns: **204**, Success (no content) /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -44,12 +44,12 @@ extension V1.AppPreOrders.ById { } switch urlResponse.statusCode { - case 204: - return - case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) @@ -59,6 +59,9 @@ extension V1.AppPreOrders.ById { case 409: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/MerchantIds/ById/MerchantIdsById.GET.a4c15f7.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/MerchantIds/ById/MerchantIdsById.GET.a4c15f7.generated.swift new file mode 100644 index 00000000..efec282f --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/MerchantIds/ById/MerchantIdsById.GET.a4c15f7.generated.swift @@ -0,0 +1,235 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.MerchantIds.ById { + public struct GET: Endpoint { + public typealias Response = MerchantIdResponse + + public var path: String { + "/v1/merchantIds/\(id)" + } + + /// the id of the requested resource + public var id: String + + public var parameters: Parameters = Parameters() + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + components?.queryItems = [ + URLQueryItem(name: "fields[certificates]", + value: parameters.fields[.certificates]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "fields[merchantIds]", + value: parameters.fields[.merchantIds]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "include", + value: parameters.include?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "limit[certificates]", + value: parameters.limit[.certificates].map { "\($0)" }) + ].filter { $0.value != nil } + if components?.queryItems?.isEmpty ?? false { + components?.queryItems = nil + } + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "GET" + return urlRequest + } + + /// - Returns: **200**, Single MerchantId as `MerchantIdResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(MerchantIdResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +extension V1.MerchantIds.ById.GET { + public struct Parameters: Hashable { + public var fields: Fields = Fields() + + /// comma-separated list of relationships to include + public var include: [Include]? + + public var limit: Limit = Limit() + + public struct Fields: Hashable { + public subscript (_ relation: Relation) -> T { + get { values[relation]?.base as! T } + set { values[relation] = AnyHashable(newValue) } + } + + private var values: [AnyHashable: AnyHashable] = [:] + + public struct Certificates: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var activated: Self { + .init(rawValue: "activated") + } + + public static var certificateContent: Self { + .init(rawValue: "certificateContent") + } + + public static var certificateType: Self { + .init(rawValue: "certificateType") + } + + public static var displayName: Self { + .init(rawValue: "displayName") + } + + public static var expirationDate: Self { + .init(rawValue: "expirationDate") + } + + public static var name: Self { + .init(rawValue: "name") + } + + public static var passTypeId: Self { + .init(rawValue: "passTypeId") + } + + public static var platform: Self { + .init(rawValue: "platform") + } + + public static var serialNumber: Self { + .init(rawValue: "serialNumber") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct MerchantIds: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var certificates: Self { + .init(rawValue: "certificates") + } + + public static var identifier: Self { + .init(rawValue: "identifier") + } + + public static var name: Self { + .init(rawValue: "name") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct Relation: Hashable { + /// the fields to include for returned resources of type certificates + public static var certificates: Relation<[Certificates]?> { + .init(key: "fields[certificates]") + } + + /// the fields to include for returned resources of type merchantIds + public static var merchantIds: Relation<[MerchantIds]?> { + .init(key: "fields[merchantIds]") + } + + internal let key: String + + public func hash(into hasher: inout Hasher) { + hasher.combine(key) + } + } + } + + public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var certificates: Self { + .init(rawValue: "certificates") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct Limit: Hashable { + public subscript (_ relation: Relation) -> T { + get { values[relation]?.base as! T } + set { values[relation] = AnyHashable(newValue) } + } + + private var values: [AnyHashable: AnyHashable] = [:] + + public struct Relation: Hashable { + /// maximum number of related certificates returned (when they are included) + public static var certificates: Relation { + .init(key: "limit[certificates]") + } + + internal let key: String + + public func hash(into hasher: inout Hasher) { + hasher.combine(key) + } + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/MerchantIds/ById/MerchantIdsById.PATCH.a4c15f7.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/MerchantIds/ById/MerchantIdsById.PATCH.a4c15f7.generated.swift new file mode 100644 index 00000000..a1e0726c --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/MerchantIds/ById/MerchantIdsById.PATCH.a4c15f7.generated.swift @@ -0,0 +1,95 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.MerchantIds.ById { + public struct PATCH: Endpoint { + public typealias Parameters = MerchantIdUpdateRequest + public typealias Response = MerchantIdResponse + + public var path: String { + "/v1/merchantIds/\(id)" + } + + /// the id of the requested resource + public var id: String + + /// MerchantId representation + public var parameters: Parameters + + public init( + id: String, + parameters: Parameters + ) { + self.id = id + self.parameters = parameters + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "PATCH" + + var jsonEncoder: JSONEncoder { + let encoder = JSONEncoder() + return encoder + } + + urlRequest?.httpBody = try jsonEncoder.encode(parameters) + urlRequest?.setValue("application/json", forHTTPHeaderField: "Content-Type") + return urlRequest + } + + /// - Returns: **200**, Single MerchantId as `MerchantIdResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **422**, Unprocessable request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(MerchantIdResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 409: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 422: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/MerchantIds/ById/Relationships/Certificates/MerchantIdsByIdRelationshipsCertificates.GET.7cb8d86.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/MerchantIds/ById/Relationships/Certificates/MerchantIdsByIdRelationshipsCertificates.GET.7cb8d86.generated.swift new file mode 100644 index 00000000..982bfded --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/MerchantIds/ById/Relationships/Certificates/MerchantIdsByIdRelationshipsCertificates.GET.7cb8d86.generated.swift @@ -0,0 +1,88 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.MerchantIds.ById.Relationships.Certificates { + public struct GET: Endpoint { + public typealias Response = MerchantIdCertificatesLinkagesResponse + + public var path: String { + "/v1/merchantIds/\(id)/relationships/certificates" + } + + /// the id of the requested resource + public var id: String + + public var parameters: Parameters = Parameters() + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + components?.queryItems = [ + URLQueryItem(name: "limit", + value: parameters.limit.map { "\($0)" }) + ].filter { $0.value != nil } + if components?.queryItems?.isEmpty ?? false { + components?.queryItems = nil + } + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "GET" + return urlRequest + } + + /// - Returns: **200**, List of related linkages as `MerchantIdCertificatesLinkagesResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(MerchantIdCertificatesLinkagesResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +extension V1.MerchantIds.ById.Relationships.Certificates.GET { + public struct Parameters: Hashable { + /// maximum resources per page + public var limit: Int? + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/MerchantIds/MerchantIds.GET.f84be12.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/MerchantIds/MerchantIds.GET.f84be12.generated.swift new file mode 100644 index 00000000..8d593d9c --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/MerchantIds/MerchantIds.GET.f84be12.generated.swift @@ -0,0 +1,302 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.MerchantIds { + public struct GET: Endpoint { + public typealias Response = MerchantIdsResponse + + public var path: String { + "/v1/merchantIds" + } + + public var parameters: Parameters = Parameters() + + public init() { + + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + components?.queryItems = [ + URLQueryItem(name: "fields[certificates]", + value: parameters.fields[.certificates]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "fields[merchantIds]", + value: parameters.fields[.merchantIds]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "filter[identifier]", + value: parameters.filter[.identifier]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "filter[name]", + value: parameters.filter[.name]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "include", + value: parameters.include?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "limit[certificates]", + value: parameters.limit[.certificates].map { "\($0)" }), + URLQueryItem(name: "limit", + value: parameters.limit[].map { "\($0)" }), + URLQueryItem(name: "sort", + value: parameters.sort?.map { "\($0)" }.joined(separator: ",")) + ].filter { $0.value != nil } + if components?.queryItems?.isEmpty ?? false { + components?.queryItems = nil + } + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "GET" + return urlRequest + } + + /// - Returns: **200**, List of MerchantIds as `MerchantIdsResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(MerchantIdsResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +extension V1.MerchantIds.GET { + public struct Parameters: Hashable { + public var fields: Fields = Fields() + + public var filter: Filter = Filter() + + /// comma-separated list of relationships to include + public var include: [Include]? + + /// maximum resources per page + public var limit: Limit = Limit() + + /// comma-separated list of sort expressions; resources will be sorted as specified + public var sort: [Sort]? + + public struct Fields: Hashable { + public subscript (_ relation: Relation) -> T { + get { values[relation]?.base as! T } + set { values[relation] = AnyHashable(newValue) } + } + + private var values: [AnyHashable: AnyHashable] = [:] + + public struct Certificates: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var activated: Self { + .init(rawValue: "activated") + } + + public static var certificateContent: Self { + .init(rawValue: "certificateContent") + } + + public static var certificateType: Self { + .init(rawValue: "certificateType") + } + + public static var displayName: Self { + .init(rawValue: "displayName") + } + + public static var expirationDate: Self { + .init(rawValue: "expirationDate") + } + + public static var name: Self { + .init(rawValue: "name") + } + + public static var passTypeId: Self { + .init(rawValue: "passTypeId") + } + + public static var platform: Self { + .init(rawValue: "platform") + } + + public static var serialNumber: Self { + .init(rawValue: "serialNumber") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct MerchantIds: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var certificates: Self { + .init(rawValue: "certificates") + } + + public static var identifier: Self { + .init(rawValue: "identifier") + } + + public static var name: Self { + .init(rawValue: "name") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct Relation: Hashable { + /// the fields to include for returned resources of type certificates + public static var certificates: Relation<[Certificates]?> { + .init(key: "fields[certificates]") + } + + /// the fields to include for returned resources of type merchantIds + public static var merchantIds: Relation<[MerchantIds]?> { + .init(key: "fields[merchantIds]") + } + + internal let key: String + + public func hash(into hasher: inout Hasher) { + hasher.combine(key) + } + } + } + + public struct Filter: Hashable { + public subscript (_ relation: Relation) -> T { + get { values[relation]?.base as! T } + set { values[relation] = AnyHashable(newValue) } + } + + private var values: [AnyHashable: AnyHashable] = [:] + + public struct Relation: Hashable { + /// filter by attribute 'identifier' + public static var identifier: Relation<[String]?> { + .init(key: "filter[identifier]") + } + + /// filter by attribute 'name' + public static var name: Relation<[String]?> { + .init(key: "filter[name]") + } + + internal let key: String + + public func hash(into hasher: inout Hasher) { + hasher.combine(key) + } + } + } + + public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var certificates: Self { + .init(rawValue: "certificates") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct Limit: Hashable { + public subscript () -> Int? { + get { self[Relation(key: "limit")] } + set { self[Relation(key: "limit")] = newValue } + } + + public subscript (_ relation: Relation) -> T { + get { values[relation]?.base as! T } + set { values[relation] = AnyHashable(newValue) } + } + + private var values: [AnyHashable: AnyHashable] = [:] + + public struct Relation: Hashable { + /// maximum number of related certificates returned (when they are included) + public static var certificates: Relation { + .init(key: "limit[certificates]") + } + + internal let key: String + + public func hash(into hasher: inout Hasher) { + hasher.combine(key) + } + } + } + + public struct Sort: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var identifier: Self { + .init(rawValue: "identifier") + } + + public static var identifierDesc: Self { + .init(rawValue: "-identifier") + } + + public static var name: Self { + .init(rawValue: "name") + } + + public static var nameDesc: Self { + .init(rawValue: "-name") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppStoreVersionSubmissions/AppStoreVersionSubmissions.POST.14cb2d6.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/MerchantIds/MerchantIds.POST.f84be12.generated.swift similarity index 68% rename from Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppStoreVersionSubmissions/AppStoreVersionSubmissions.POST.14cb2d6.generated.swift rename to Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/MerchantIds/MerchantIds.POST.f84be12.generated.swift index 37001e58..2dc928b0 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppStoreVersionSubmissions/AppStoreVersionSubmissions.POST.14cb2d6.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/MerchantIds/MerchantIds.POST.f84be12.generated.swift @@ -6,17 +6,16 @@ import Foundation import FoundationNetworking #endif -extension V1.AppStoreVersionSubmissions { - @available(*, deprecated) +extension V1.MerchantIds { public struct POST: Endpoint { - public typealias Parameters = AppStoreVersionSubmissionCreateRequest - public typealias Response = AppStoreVersionSubmissionResponse + public typealias Parameters = MerchantIdCreateRequest + public typealias Response = MerchantIdResponse public var path: String { - "/v1/appStoreVersionSubmissions" + "/v1/merchantIds" } - /// AppStoreVersionSubmission representation + /// MerchantId representation public var parameters: Parameters public init(parameters: Parameters) { @@ -40,10 +39,13 @@ extension V1.AppStoreVersionSubmissions { return urlRequest } - /// - Returns: **201**, Single AppStoreVersionSubmission as `AppStoreVersionSubmissionResponse` + /// - Returns: **201**, Single MerchantId as `MerchantIdResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **422**, Unprocessable request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -52,17 +54,26 @@ extension V1.AppStoreVersionSubmissions { switch urlResponse.statusCode { case 201: - return try jsonDecoder.decode(AppStoreVersionSubmissionResponse.self, from: data) + return try jsonDecoder.decode(MerchantIdResponse.self, from: data) case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 409: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 422: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Nominations/ById/NominationsById.DELETE.b051da8.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Nominations/ById/NominationsById.DELETE.b051da8.generated.swift new file mode 100644 index 00000000..25a05095 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Nominations/ById/NominationsById.DELETE.b051da8.generated.swift @@ -0,0 +1,72 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.Nominations.ById { + public struct DELETE: Endpoint { + public typealias Parameters = Never + public typealias Response = Void + + public var path: String { + "/v1/nominations/\(id)" + } + + /// the id of the requested resource + public var id: String + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "DELETE" + return urlRequest + } + + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 409: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Nominations/ById/NominationsById.GET.b051da8.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Nominations/ById/NominationsById.GET.b051da8.generated.swift new file mode 100644 index 00000000..5ee22edc --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Nominations/ById/NominationsById.GET.b051da8.generated.swift @@ -0,0 +1,290 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.Nominations.ById { + public struct GET: Endpoint { + public typealias Response = NominationResponse + + public var path: String { + "/v1/nominations/\(id)" + } + + /// the id of the requested resource + public var id: String + + public var parameters: Parameters = Parameters() + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + components?.queryItems = [ + URLQueryItem(name: "fields[nominations]", + value: parameters.fields[.nominations]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "include", + value: parameters.include?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "limit[inAppEvents]", + value: parameters.limit[.inAppEvents].map { "\($0)" }), + URLQueryItem(name: "limit[relatedApps]", + value: parameters.limit[.relatedApps].map { "\($0)" }), + URLQueryItem(name: "limit[supportedTerritories]", + value: parameters.limit[.supportedTerritories].map { "\($0)" }) + ].filter { $0.value != nil } + if components?.queryItems?.isEmpty ?? false { + components?.queryItems = nil + } + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "GET" + return urlRequest + } + + /// - Returns: **200**, Single Nomination as `NominationResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(NominationResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +extension V1.Nominations.ById.GET { + public struct Parameters: Hashable { + public var fields: Fields = Fields() + + /// comma-separated list of relationships to include + public var include: [Include]? + + public var limit: Limit = Limit() + + public struct Fields: Hashable { + public subscript (_ relation: Relation) -> T { + get { values[relation]?.base as! T } + set { values[relation] = AnyHashable(newValue) } + } + + private var values: [AnyHashable: AnyHashable] = [:] + + public struct Nominations: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var createdByActor: Self { + .init(rawValue: "createdByActor") + } + + public static var createdDate: Self { + .init(rawValue: "createdDate") + } + + public static var description: Self { + .init(rawValue: "description") + } + + public static var deviceFamilies: Self { + .init(rawValue: "deviceFamilies") + } + + public static var hasInAppEvents: Self { + .init(rawValue: "hasInAppEvents") + } + + public static var inAppEvents: Self { + .init(rawValue: "inAppEvents") + } + + public static var lastModifiedByActor: Self { + .init(rawValue: "lastModifiedByActor") + } + + public static var lastModifiedDate: Self { + .init(rawValue: "lastModifiedDate") + } + + public static var launchInSelectMarketsFirst: Self { + .init(rawValue: "launchInSelectMarketsFirst") + } + + public static var locales: Self { + .init(rawValue: "locales") + } + + public static var name: Self { + .init(rawValue: "name") + } + + public static var notes: Self { + .init(rawValue: "notes") + } + + public static var preOrderEnabled: Self { + .init(rawValue: "preOrderEnabled") + } + + public static var publishEndDate: Self { + .init(rawValue: "publishEndDate") + } + + public static var publishStartDate: Self { + .init(rawValue: "publishStartDate") + } + + public static var relatedApps: Self { + .init(rawValue: "relatedApps") + } + + public static var state: Self { + .init(rawValue: "state") + } + + public static var submittedByActor: Self { + .init(rawValue: "submittedByActor") + } + + public static var submittedDate: Self { + .init(rawValue: "submittedDate") + } + + public static var supplementalMaterialsUris: Self { + .init(rawValue: "supplementalMaterialsUris") + } + + public static var supportedTerritories: Self { + .init(rawValue: "supportedTerritories") + } + + public static var type: Self { + .init(rawValue: "type") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct Relation: Hashable { + /// the fields to include for returned resources of type nominations + public static var nominations: Relation<[Nominations]?> { + .init(key: "fields[nominations]") + } + + internal let key: String + + public func hash(into hasher: inout Hasher) { + hasher.combine(key) + } + } + } + + public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var createdByActor: Self { + .init(rawValue: "createdByActor") + } + + public static var inAppEvents: Self { + .init(rawValue: "inAppEvents") + } + + public static var lastModifiedByActor: Self { + .init(rawValue: "lastModifiedByActor") + } + + public static var relatedApps: Self { + .init(rawValue: "relatedApps") + } + + public static var submittedByActor: Self { + .init(rawValue: "submittedByActor") + } + + public static var supportedTerritories: Self { + .init(rawValue: "supportedTerritories") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct Limit: Hashable { + public subscript (_ relation: Relation) -> T { + get { values[relation]?.base as! T } + set { values[relation] = AnyHashable(newValue) } + } + + private var values: [AnyHashable: AnyHashable] = [:] + + public struct Relation: Hashable { + /// maximum number of related inAppEvents returned (when they are included) + public static var inAppEvents: Relation { + .init(key: "limit[inAppEvents]") + } + + /// maximum number of related relatedApps returned (when they are included) + public static var relatedApps: Relation { + .init(key: "limit[relatedApps]") + } + + /// maximum number of related supportedTerritories returned (when they are included) + public static var supportedTerritories: Relation { + .init(key: "limit[supportedTerritories]") + } + + internal let key: String + + public func hash(into hasher: inout Hasher) { + hasher.combine(key) + } + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Nominations/ById/NominationsById.PATCH.b051da8.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Nominations/ById/NominationsById.PATCH.b051da8.generated.swift new file mode 100644 index 00000000..12764247 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Nominations/ById/NominationsById.PATCH.b051da8.generated.swift @@ -0,0 +1,95 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.Nominations.ById { + public struct PATCH: Endpoint { + public typealias Parameters = NominationUpdateRequest + public typealias Response = NominationResponse + + public var path: String { + "/v1/nominations/\(id)" + } + + /// the id of the requested resource + public var id: String + + /// Nomination representation + public var parameters: Parameters + + public init( + id: String, + parameters: Parameters + ) { + self.id = id + self.parameters = parameters + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "PATCH" + + var jsonEncoder: JSONEncoder { + let encoder = JSONEncoder() + return encoder + } + + urlRequest?.httpBody = try jsonEncoder.encode(parameters) + urlRequest?.setValue("application/json", forHTTPHeaderField: "Content-Type") + return urlRequest + } + + /// - Returns: **200**, Single Nomination as `NominationResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **422**, Unprocessable request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(NominationResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 409: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 422: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Nominations/Nominations.GET.c0bf6fc.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Nominations/Nominations.GET.c0bf6fc.generated.swift new file mode 100644 index 00000000..d476083f --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Nominations/Nominations.GET.c0bf6fc.generated.swift @@ -0,0 +1,436 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.Nominations { + public struct GET: Endpoint { + public typealias Response = NominationsResponse + + public var path: String { + "/v1/nominations" + } + + public var parameters: Parameters = Parameters() + + public init() { + + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + components?.queryItems = [ + URLQueryItem(name: "fields[nominations]", + value: parameters.fields[.nominations]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "filter[relatedApps]", + value: parameters.filter[.relatedApps]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "filter[state]", + value: parameters.filter[.state]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "filter[type]", + value: parameters.filter[.type]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "include", + value: parameters.include?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "limit[inAppEvents]", + value: parameters.limit[.inAppEvents].map { "\($0)" }), + URLQueryItem(name: "limit[relatedApps]", + value: parameters.limit[.relatedApps].map { "\($0)" }), + URLQueryItem(name: "limit[supportedTerritories]", + value: parameters.limit[.supportedTerritories].map { "\($0)" }), + URLQueryItem(name: "limit", + value: parameters.limit[].map { "\($0)" }), + URLQueryItem(name: "sort", + value: parameters.sort?.map { "\($0)" }.joined(separator: ",")) + ].filter { $0.value != nil } + if components?.queryItems?.isEmpty ?? false { + components?.queryItems = nil + } + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "GET" + return urlRequest + } + + /// - Returns: **200**, List of Nominations as `NominationsResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(NominationsResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +extension V1.Nominations.GET { + public struct Parameters: Hashable { + public var fields: Fields = Fields() + + public var filter: Filter = Filter() + + /// comma-separated list of relationships to include + public var include: [Include]? + + /// maximum resources per page + public var limit: Limit = Limit() + + /// comma-separated list of sort expressions; resources will be sorted as specified + public var sort: [Sort]? + + public struct Fields: Hashable { + public subscript (_ relation: Relation) -> T { + get { values[relation]?.base as! T } + set { values[relation] = AnyHashable(newValue) } + } + + private var values: [AnyHashable: AnyHashable] = [:] + + public struct Nominations: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var createdByActor: Self { + .init(rawValue: "createdByActor") + } + + public static var createdDate: Self { + .init(rawValue: "createdDate") + } + + public static var description: Self { + .init(rawValue: "description") + } + + public static var deviceFamilies: Self { + .init(rawValue: "deviceFamilies") + } + + public static var hasInAppEvents: Self { + .init(rawValue: "hasInAppEvents") + } + + public static var inAppEvents: Self { + .init(rawValue: "inAppEvents") + } + + public static var lastModifiedByActor: Self { + .init(rawValue: "lastModifiedByActor") + } + + public static var lastModifiedDate: Self { + .init(rawValue: "lastModifiedDate") + } + + public static var launchInSelectMarketsFirst: Self { + .init(rawValue: "launchInSelectMarketsFirst") + } + + public static var locales: Self { + .init(rawValue: "locales") + } + + public static var name: Self { + .init(rawValue: "name") + } + + public static var notes: Self { + .init(rawValue: "notes") + } + + public static var preOrderEnabled: Self { + .init(rawValue: "preOrderEnabled") + } + + public static var publishEndDate: Self { + .init(rawValue: "publishEndDate") + } + + public static var publishStartDate: Self { + .init(rawValue: "publishStartDate") + } + + public static var relatedApps: Self { + .init(rawValue: "relatedApps") + } + + public static var state: Self { + .init(rawValue: "state") + } + + public static var submittedByActor: Self { + .init(rawValue: "submittedByActor") + } + + public static var submittedDate: Self { + .init(rawValue: "submittedDate") + } + + public static var supplementalMaterialsUris: Self { + .init(rawValue: "supplementalMaterialsUris") + } + + public static var supportedTerritories: Self { + .init(rawValue: "supportedTerritories") + } + + public static var type: Self { + .init(rawValue: "type") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct Relation: Hashable { + /// the fields to include for returned resources of type nominations + public static var nominations: Relation<[Nominations]?> { + .init(key: "fields[nominations]") + } + + internal let key: String + + public func hash(into hasher: inout Hasher) { + hasher.combine(key) + } + } + } + + public struct Filter: Hashable { + public subscript (_ relation: Relation) -> T { + get { values[relation]?.base as! T } + set { values[relation] = AnyHashable(newValue) } + } + + private var values: [AnyHashable: AnyHashable] = [:] + + public struct State: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var archived: Self { + .init(rawValue: "ARCHIVED") + } + + public static var draft: Self { + .init(rawValue: "DRAFT") + } + + public static var submitted: Self { + .init(rawValue: "SUBMITTED") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct `Type`: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var appEnhancements: Self { + .init(rawValue: "APP_ENHANCEMENTS") + } + + public static var appLaunch: Self { + .init(rawValue: "APP_LAUNCH") + } + + public static var newContent: Self { + .init(rawValue: "NEW_CONTENT") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct Relation: Hashable { + /// filter by id(s) of related 'relatedApps' + public static var relatedApps: Relation<[String]?> { + .init(key: "filter[relatedApps]") + } + + /// filter by attribute 'state' **(required)** + public static var state: Relation<[State]?> { + .init(key: "filter[state]") + } + + /// filter by attribute 'type' + public static var type: Relation<[`Type`]?> { + .init(key: "filter[type]") + } + + internal let key: String + + public func hash(into hasher: inout Hasher) { + hasher.combine(key) + } + } + } + + public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var createdByActor: Self { + .init(rawValue: "createdByActor") + } + + public static var inAppEvents: Self { + .init(rawValue: "inAppEvents") + } + + public static var lastModifiedByActor: Self { + .init(rawValue: "lastModifiedByActor") + } + + public static var relatedApps: Self { + .init(rawValue: "relatedApps") + } + + public static var submittedByActor: Self { + .init(rawValue: "submittedByActor") + } + + public static var supportedTerritories: Self { + .init(rawValue: "supportedTerritories") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct Limit: Hashable { + public subscript () -> Int? { + get { self[Relation(key: "limit")] } + set { self[Relation(key: "limit")] = newValue } + } + + public subscript (_ relation: Relation) -> T { + get { values[relation]?.base as! T } + set { values[relation] = AnyHashable(newValue) } + } + + private var values: [AnyHashable: AnyHashable] = [:] + + public struct Relation: Hashable { + /// maximum number of related inAppEvents returned (when they are included) + public static var inAppEvents: Relation { + .init(key: "limit[inAppEvents]") + } + + /// maximum number of related relatedApps returned (when they are included) + public static var relatedApps: Relation { + .init(key: "limit[relatedApps]") + } + + /// maximum number of related supportedTerritories returned (when they are included) + public static var supportedTerritories: Relation { + .init(key: "limit[supportedTerritories]") + } + + internal let key: String + + public func hash(into hasher: inout Hasher) { + hasher.combine(key) + } + } + } + + public struct Sort: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var lastModifiedDate: Self { + .init(rawValue: "lastModifiedDate") + } + + public static var lastModifiedDateDesc: Self { + .init(rawValue: "-lastModifiedDate") + } + + public static var name: Self { + .init(rawValue: "name") + } + + public static var nameDesc: Self { + .init(rawValue: "-name") + } + + public static var publishEndDate: Self { + .init(rawValue: "publishEndDate") + } + + public static var publishEndDateDesc: Self { + .init(rawValue: "-publishEndDate") + } + + public static var publishStartDate: Self { + .init(rawValue: "publishStartDate") + } + + public static var publishStartDateDesc: Self { + .init(rawValue: "-publishStartDate") + } + + public static var type: Self { + .init(rawValue: "type") + } + + public static var typeDesc: Self { + .init(rawValue: "-type") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/PromotedPurchaseImages/PromotedPurchaseImages.POST.6510a51.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Nominations/Nominations.POST.c0bf6fc.generated.swift similarity index 68% rename from Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/PromotedPurchaseImages/PromotedPurchaseImages.POST.6510a51.generated.swift rename to Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Nominations/Nominations.POST.c0bf6fc.generated.swift index d288ebb3..560b9865 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/PromotedPurchaseImages/PromotedPurchaseImages.POST.6510a51.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Nominations/Nominations.POST.c0bf6fc.generated.swift @@ -6,16 +6,16 @@ import Foundation import FoundationNetworking #endif -extension V1.PromotedPurchaseImages { +extension V1.Nominations { public struct POST: Endpoint { - public typealias Parameters = PromotedPurchaseImageCreateRequest - public typealias Response = PromotedPurchaseImageResponse + public typealias Parameters = NominationCreateRequest + public typealias Response = NominationResponse public var path: String { - "/v1/promotedPurchaseImages" + "/v1/nominations" } - /// PromotedPurchaseImage representation + /// Nomination representation public var parameters: Parameters public init(parameters: Parameters) { @@ -39,10 +39,13 @@ extension V1.PromotedPurchaseImages { return urlRequest } - /// - Returns: **201**, Single PromotedPurchaseImage as `PromotedPurchaseImageResponse` + /// - Returns: **201**, Single Nomination as `NominationResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **422**, Unprocessable request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -51,17 +54,26 @@ extension V1.PromotedPurchaseImages { switch urlResponse.statusCode { case 201: - return try jsonDecoder.decode(PromotedPurchaseImageResponse.self, from: data) + return try jsonDecoder.decode(NominationResponse.self, from: data) case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 409: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 422: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/PassTypeIds/ById/Certificates/PassTypeIdsByIdCertificates.GET.70cd78d.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/PassTypeIds/ById/Certificates/PassTypeIdsByIdCertificates.GET.70cd78d.generated.swift new file mode 100644 index 00000000..e7df0e1b --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/PassTypeIds/ById/Certificates/PassTypeIdsByIdCertificates.GET.70cd78d.generated.swift @@ -0,0 +1,394 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.PassTypeIds.ById.Certificates { + public struct GET: Endpoint { + public typealias Response = CertificatesResponse + + public var path: String { + "/v1/passTypeIds/\(id)/certificates" + } + + /// the id of the requested resource + public var id: String + + public var parameters: Parameters = Parameters() + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + components?.queryItems = [ + URLQueryItem(name: "fields[certificates]", + value: parameters.fields[.certificates]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "fields[passTypeIds]", + value: parameters.fields[.passTypeIds]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "filter[certificateType]", + value: parameters.filter[.certificateType]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "filter[displayName]", + value: parameters.filter[.displayName]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "filter[id]", + value: parameters.filter[.id]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "filter[serialNumber]", + value: parameters.filter[.serialNumber]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "include", + value: parameters.include?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "limit", + value: parameters.limit.map { "\($0)" }), + URLQueryItem(name: "sort", + value: parameters.sort?.map { "\($0)" }.joined(separator: ",")) + ].filter { $0.value != nil } + if components?.queryItems?.isEmpty ?? false { + components?.queryItems = nil + } + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "GET" + return urlRequest + } + + /// - Returns: **200**, List of Certificates as `CertificatesResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(CertificatesResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +extension V1.PassTypeIds.ById.Certificates.GET { + public struct Parameters: Hashable { + public var fields: Fields = Fields() + + public var filter: Filter = Filter() + + /// comma-separated list of relationships to include + public var include: [Include]? + + /// maximum resources per page + public var limit: Int? + + /// comma-separated list of sort expressions; resources will be sorted as specified + public var sort: [Sort]? + + public struct Fields: Hashable { + public subscript (_ relation: Relation) -> T { + get { values[relation]?.base as! T } + set { values[relation] = AnyHashable(newValue) } + } + + private var values: [AnyHashable: AnyHashable] = [:] + + public struct Certificates: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var activated: Self { + .init(rawValue: "activated") + } + + public static var certificateContent: Self { + .init(rawValue: "certificateContent") + } + + public static var certificateType: Self { + .init(rawValue: "certificateType") + } + + public static var displayName: Self { + .init(rawValue: "displayName") + } + + public static var expirationDate: Self { + .init(rawValue: "expirationDate") + } + + public static var name: Self { + .init(rawValue: "name") + } + + public static var passTypeId: Self { + .init(rawValue: "passTypeId") + } + + public static var platform: Self { + .init(rawValue: "platform") + } + + public static var serialNumber: Self { + .init(rawValue: "serialNumber") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct PassTypeIds: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var certificates: Self { + .init(rawValue: "certificates") + } + + public static var identifier: Self { + .init(rawValue: "identifier") + } + + public static var name: Self { + .init(rawValue: "name") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct Relation: Hashable { + /// the fields to include for returned resources of type certificates + public static var certificates: Relation<[Certificates]?> { + .init(key: "fields[certificates]") + } + + /// the fields to include for returned resources of type passTypeIds + public static var passTypeIds: Relation<[PassTypeIds]?> { + .init(key: "fields[passTypeIds]") + } + + internal let key: String + + public func hash(into hasher: inout Hasher) { + hasher.combine(key) + } + } + } + + public struct Filter: Hashable { + public subscript (_ relation: Relation) -> T { + get { values[relation]?.base as! T } + set { values[relation] = AnyHashable(newValue) } + } + + private var values: [AnyHashable: AnyHashable] = [:] + + public struct CertificateType: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var applePay: Self { + .init(rawValue: "APPLE_PAY") + } + + public static var applePayMerchantIdentity: Self { + .init(rawValue: "APPLE_PAY_MERCHANT_IDENTITY") + } + + public static var applePayPspIdentity: Self { + .init(rawValue: "APPLE_PAY_PSP_IDENTITY") + } + + public static var applePayRsa: Self { + .init(rawValue: "APPLE_PAY_RSA") + } + + public static var developerIdApplication: Self { + .init(rawValue: "DEVELOPER_ID_APPLICATION") + } + + public static var developerIdApplicationG2: Self { + .init(rawValue: "DEVELOPER_ID_APPLICATION_G2") + } + + public static var developerIdKext: Self { + .init(rawValue: "DEVELOPER_ID_KEXT") + } + + public static var developerIdKextG2: Self { + .init(rawValue: "DEVELOPER_ID_KEXT_G2") + } + + public static var development: Self { + .init(rawValue: "DEVELOPMENT") + } + + public static var distribution: Self { + .init(rawValue: "DISTRIBUTION") + } + + public static var iOSDevelopment: Self { + .init(rawValue: "IOS_DEVELOPMENT") + } + + public static var iOSDistribution: Self { + .init(rawValue: "IOS_DISTRIBUTION") + } + + public static var identityAccess: Self { + .init(rawValue: "IDENTITY_ACCESS") + } + + public static var macAppDevelopment: Self { + .init(rawValue: "MAC_APP_DEVELOPMENT") + } + + public static var macAppDistribution: Self { + .init(rawValue: "MAC_APP_DISTRIBUTION") + } + + public static var macInstallerDistribution: Self { + .init(rawValue: "MAC_INSTALLER_DISTRIBUTION") + } + + public static var passTypeId: Self { + .init(rawValue: "PASS_TYPE_ID") + } + + public static var passTypeIdWithNfc: Self { + .init(rawValue: "PASS_TYPE_ID_WITH_NFC") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct Relation: Hashable { + /// filter by attribute 'certificateType' + public static var certificateType: Relation<[CertificateType]?> { + .init(key: "filter[certificateType]") + } + + /// filter by attribute 'displayName' + public static var displayName: Relation<[String]?> { + .init(key: "filter[displayName]") + } + + /// filter by id(s) + public static var id: Relation<[String]?> { + .init(key: "filter[id]") + } + + /// filter by attribute 'serialNumber' + public static var serialNumber: Relation<[String]?> { + .init(key: "filter[serialNumber]") + } + + internal let key: String + + public func hash(into hasher: inout Hasher) { + hasher.combine(key) + } + } + } + + public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var passTypeId: Self { + .init(rawValue: "passTypeId") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct Sort: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var certificateType: Self { + .init(rawValue: "certificateType") + } + + public static var certificateTypeDesc: Self { + .init(rawValue: "-certificateType") + } + + public static var displayName: Self { + .init(rawValue: "displayName") + } + + public static var displayNameDesc: Self { + .init(rawValue: "-displayName") + } + + public static var id: Self { + .init(rawValue: "id") + } + + public static var idDesc: Self { + .init(rawValue: "-id") + } + + public static var serialNumber: Self { + .init(rawValue: "serialNumber") + } + + public static var serialNumberDesc: Self { + .init(rawValue: "-serialNumber") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/PassTypeIds/ById/PassTypeIdsById.DELETE.702ea05.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/PassTypeIds/ById/PassTypeIdsById.DELETE.702ea05.generated.swift new file mode 100644 index 00000000..c07c31a2 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/PassTypeIds/ById/PassTypeIdsById.DELETE.702ea05.generated.swift @@ -0,0 +1,72 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.PassTypeIds.ById { + public struct DELETE: Endpoint { + public typealias Parameters = Never + public typealias Response = Void + + public var path: String { + "/v1/passTypeIds/\(id)" + } + + /// the id of the requested resource + public var id: String + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "DELETE" + return urlRequest + } + + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 409: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/PassTypeIds/ById/PassTypeIdsById.GET.702ea05.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/PassTypeIds/ById/PassTypeIdsById.GET.702ea05.generated.swift new file mode 100644 index 00000000..c01751a1 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/PassTypeIds/ById/PassTypeIdsById.GET.702ea05.generated.swift @@ -0,0 +1,235 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.PassTypeIds.ById { + public struct GET: Endpoint { + public typealias Response = PassTypeIdResponse + + public var path: String { + "/v1/passTypeIds/\(id)" + } + + /// the id of the requested resource + public var id: String + + public var parameters: Parameters = Parameters() + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + components?.queryItems = [ + URLQueryItem(name: "fields[certificates]", + value: parameters.fields[.certificates]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "fields[passTypeIds]", + value: parameters.fields[.passTypeIds]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "include", + value: parameters.include?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "limit[certificates]", + value: parameters.limit[.certificates].map { "\($0)" }) + ].filter { $0.value != nil } + if components?.queryItems?.isEmpty ?? false { + components?.queryItems = nil + } + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "GET" + return urlRequest + } + + /// - Returns: **200**, Single PassTypeId as `PassTypeIdResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(PassTypeIdResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +extension V1.PassTypeIds.ById.GET { + public struct Parameters: Hashable { + public var fields: Fields = Fields() + + /// comma-separated list of relationships to include + public var include: [Include]? + + public var limit: Limit = Limit() + + public struct Fields: Hashable { + public subscript (_ relation: Relation) -> T { + get { values[relation]?.base as! T } + set { values[relation] = AnyHashable(newValue) } + } + + private var values: [AnyHashable: AnyHashable] = [:] + + public struct Certificates: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var activated: Self { + .init(rawValue: "activated") + } + + public static var certificateContent: Self { + .init(rawValue: "certificateContent") + } + + public static var certificateType: Self { + .init(rawValue: "certificateType") + } + + public static var displayName: Self { + .init(rawValue: "displayName") + } + + public static var expirationDate: Self { + .init(rawValue: "expirationDate") + } + + public static var name: Self { + .init(rawValue: "name") + } + + public static var passTypeId: Self { + .init(rawValue: "passTypeId") + } + + public static var platform: Self { + .init(rawValue: "platform") + } + + public static var serialNumber: Self { + .init(rawValue: "serialNumber") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct PassTypeIds: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var certificates: Self { + .init(rawValue: "certificates") + } + + public static var identifier: Self { + .init(rawValue: "identifier") + } + + public static var name: Self { + .init(rawValue: "name") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct Relation: Hashable { + /// the fields to include for returned resources of type certificates + public static var certificates: Relation<[Certificates]?> { + .init(key: "fields[certificates]") + } + + /// the fields to include for returned resources of type passTypeIds + public static var passTypeIds: Relation<[PassTypeIds]?> { + .init(key: "fields[passTypeIds]") + } + + internal let key: String + + public func hash(into hasher: inout Hasher) { + hasher.combine(key) + } + } + } + + public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var certificates: Self { + .init(rawValue: "certificates") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct Limit: Hashable { + public subscript (_ relation: Relation) -> T { + get { values[relation]?.base as! T } + set { values[relation] = AnyHashable(newValue) } + } + + private var values: [AnyHashable: AnyHashable] = [:] + + public struct Relation: Hashable { + /// maximum number of related certificates returned (when they are included) + public static var certificates: Relation { + .init(key: "limit[certificates]") + } + + internal let key: String + + public func hash(into hasher: inout Hasher) { + hasher.combine(key) + } + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/PassTypeIds/ById/PassTypeIdsById.PATCH.702ea05.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/PassTypeIds/ById/PassTypeIdsById.PATCH.702ea05.generated.swift new file mode 100644 index 00000000..f0c4e0be --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/PassTypeIds/ById/PassTypeIdsById.PATCH.702ea05.generated.swift @@ -0,0 +1,95 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.PassTypeIds.ById { + public struct PATCH: Endpoint { + public typealias Parameters = PassTypeIdUpdateRequest + public typealias Response = PassTypeIdResponse + + public var path: String { + "/v1/passTypeIds/\(id)" + } + + /// the id of the requested resource + public var id: String + + /// PassTypeId representation + public var parameters: Parameters + + public init( + id: String, + parameters: Parameters + ) { + self.id = id + self.parameters = parameters + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "PATCH" + + var jsonEncoder: JSONEncoder { + let encoder = JSONEncoder() + return encoder + } + + urlRequest?.httpBody = try jsonEncoder.encode(parameters) + urlRequest?.setValue("application/json", forHTTPHeaderField: "Content-Type") + return urlRequest + } + + /// - Returns: **200**, Single PassTypeId as `PassTypeIdResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **422**, Unprocessable request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(PassTypeIdResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 409: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 422: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/PassTypeIds/ById/Relationships/Certificates/PassTypeIdsByIdRelationshipsCertificates.GET.42f1856.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/PassTypeIds/ById/Relationships/Certificates/PassTypeIdsByIdRelationshipsCertificates.GET.42f1856.generated.swift new file mode 100644 index 00000000..e0931dff --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/PassTypeIds/ById/Relationships/Certificates/PassTypeIdsByIdRelationshipsCertificates.GET.42f1856.generated.swift @@ -0,0 +1,88 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.PassTypeIds.ById.Relationships.Certificates { + public struct GET: Endpoint { + public typealias Response = PassTypeIdCertificatesLinkagesResponse + + public var path: String { + "/v1/passTypeIds/\(id)/relationships/certificates" + } + + /// the id of the requested resource + public var id: String + + public var parameters: Parameters = Parameters() + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + components?.queryItems = [ + URLQueryItem(name: "limit", + value: parameters.limit.map { "\($0)" }) + ].filter { $0.value != nil } + if components?.queryItems?.isEmpty ?? false { + components?.queryItems = nil + } + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "GET" + return urlRequest + } + + /// - Returns: **200**, List of related linkages as `PassTypeIdCertificatesLinkagesResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(PassTypeIdCertificatesLinkagesResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +extension V1.PassTypeIds.ById.Relationships.Certificates.GET { + public struct Parameters: Hashable { + /// maximum resources per page + public var limit: Int? + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/PassTypeIds/PassTypeIds.GET.95793d2.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/PassTypeIds/PassTypeIds.GET.95793d2.generated.swift new file mode 100644 index 00000000..32956a02 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/PassTypeIds/PassTypeIds.GET.95793d2.generated.swift @@ -0,0 +1,317 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.PassTypeIds { + public struct GET: Endpoint { + public typealias Response = PassTypeIdsResponse + + public var path: String { + "/v1/passTypeIds" + } + + public var parameters: Parameters = Parameters() + + public init() { + + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + components?.queryItems = [ + URLQueryItem(name: "fields[certificates]", + value: parameters.fields[.certificates]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "fields[passTypeIds]", + value: parameters.fields[.passTypeIds]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "filter[id]", + value: parameters.filter[.id]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "filter[identifier]", + value: parameters.filter[.identifier]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "filter[name]", + value: parameters.filter[.name]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "include", + value: parameters.include?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "limit[certificates]", + value: parameters.limit[.certificates].map { "\($0)" }), + URLQueryItem(name: "limit", + value: parameters.limit[].map { "\($0)" }), + URLQueryItem(name: "sort", + value: parameters.sort?.map { "\($0)" }.joined(separator: ",")) + ].filter { $0.value != nil } + if components?.queryItems?.isEmpty ?? false { + components?.queryItems = nil + } + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "GET" + return urlRequest + } + + /// - Returns: **200**, List of PassTypeIds as `PassTypeIdsResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(PassTypeIdsResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +extension V1.PassTypeIds.GET { + public struct Parameters: Hashable { + public var fields: Fields = Fields() + + public var filter: Filter = Filter() + + /// comma-separated list of relationships to include + public var include: [Include]? + + /// maximum resources per page + public var limit: Limit = Limit() + + /// comma-separated list of sort expressions; resources will be sorted as specified + public var sort: [Sort]? + + public struct Fields: Hashable { + public subscript (_ relation: Relation) -> T { + get { values[relation]?.base as! T } + set { values[relation] = AnyHashable(newValue) } + } + + private var values: [AnyHashable: AnyHashable] = [:] + + public struct Certificates: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var activated: Self { + .init(rawValue: "activated") + } + + public static var certificateContent: Self { + .init(rawValue: "certificateContent") + } + + public static var certificateType: Self { + .init(rawValue: "certificateType") + } + + public static var displayName: Self { + .init(rawValue: "displayName") + } + + public static var expirationDate: Self { + .init(rawValue: "expirationDate") + } + + public static var name: Self { + .init(rawValue: "name") + } + + public static var passTypeId: Self { + .init(rawValue: "passTypeId") + } + + public static var platform: Self { + .init(rawValue: "platform") + } + + public static var serialNumber: Self { + .init(rawValue: "serialNumber") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct PassTypeIds: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var certificates: Self { + .init(rawValue: "certificates") + } + + public static var identifier: Self { + .init(rawValue: "identifier") + } + + public static var name: Self { + .init(rawValue: "name") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct Relation: Hashable { + /// the fields to include for returned resources of type certificates + public static var certificates: Relation<[Certificates]?> { + .init(key: "fields[certificates]") + } + + /// the fields to include for returned resources of type passTypeIds + public static var passTypeIds: Relation<[PassTypeIds]?> { + .init(key: "fields[passTypeIds]") + } + + internal let key: String + + public func hash(into hasher: inout Hasher) { + hasher.combine(key) + } + } + } + + public struct Filter: Hashable { + public subscript (_ relation: Relation) -> T { + get { values[relation]?.base as! T } + set { values[relation] = AnyHashable(newValue) } + } + + private var values: [AnyHashable: AnyHashable] = [:] + + public struct Relation: Hashable { + /// filter by id(s) + public static var id: Relation<[String]?> { + .init(key: "filter[id]") + } + + /// filter by attribute 'identifier' + public static var identifier: Relation<[String]?> { + .init(key: "filter[identifier]") + } + + /// filter by attribute 'name' + public static var name: Relation<[String]?> { + .init(key: "filter[name]") + } + + internal let key: String + + public func hash(into hasher: inout Hasher) { + hasher.combine(key) + } + } + } + + public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var certificates: Self { + .init(rawValue: "certificates") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct Limit: Hashable { + public subscript () -> Int? { + get { self[Relation(key: "limit")] } + set { self[Relation(key: "limit")] = newValue } + } + + public subscript (_ relation: Relation) -> T { + get { values[relation]?.base as! T } + set { values[relation] = AnyHashable(newValue) } + } + + private var values: [AnyHashable: AnyHashable] = [:] + + public struct Relation: Hashable { + /// maximum number of related certificates returned (when they are included) + public static var certificates: Relation { + .init(key: "limit[certificates]") + } + + internal let key: String + + public func hash(into hasher: inout Hasher) { + hasher.combine(key) + } + } + } + + public struct Sort: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var id: Self { + .init(rawValue: "id") + } + + public static var idDesc: Self { + .init(rawValue: "-id") + } + + public static var identifier: Self { + .init(rawValue: "identifier") + } + + public static var identifierDesc: Self { + .init(rawValue: "-identifier") + } + + public static var name: Self { + .init(rawValue: "name") + } + + public static var nameDesc: Self { + .init(rawValue: "-name") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/PassTypeIds/PassTypeIds.POST.95793d2.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/PassTypeIds/PassTypeIds.POST.95793d2.generated.swift new file mode 100644 index 00000000..c8ab9357 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/PassTypeIds/PassTypeIds.POST.95793d2.generated.swift @@ -0,0 +1,84 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.PassTypeIds { + public struct POST: Endpoint { + public typealias Parameters = PassTypeIdCreateRequest + public typealias Response = PassTypeIdResponse + + public var path: String { + "/v1/passTypeIds" + } + + /// PassTypeId representation + public var parameters: Parameters + + public init(parameters: Parameters) { + self.parameters = parameters + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "POST" + + var jsonEncoder: JSONEncoder { + let encoder = JSONEncoder() + return encoder + } + + urlRequest?.httpBody = try jsonEncoder.encode(parameters) + urlRequest?.setValue("application/json", forHTTPHeaderField: "Content-Type") + return urlRequest + } + + /// - Returns: **201**, Single PassTypeId as `PassTypeIdResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **422**, Unprocessable request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 201: + return try jsonDecoder.decode(PassTypeIdResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 409: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 422: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/PreReleaseVersions/ById/App/PreReleaseVersionsByIdApp.GET.ea361cf.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/PreReleaseVersions/ById/App/PreReleaseVersionsByIdApp.GET.ea361cf.generated.swift index b492abc7..df960ec0 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/PreReleaseVersions/ById/App/PreReleaseVersionsByIdApp.GET.ea361cf.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/PreReleaseVersions/ById/App/PreReleaseVersionsByIdApp.GET.ea361cf.generated.swift @@ -42,8 +42,10 @@ extension V1.PreReleaseVersions.ById.App { /// - Returns: **200**, Single App with get as `AppWithoutIncludesResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -57,12 +59,18 @@ extension V1.PreReleaseVersions.ById.App { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 404: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -82,151 +90,215 @@ extension V1.PreReleaseVersions.ById.App.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum Apps: Hashable, Codable, RawRepresentable { - case appAvailability - case appClips - case appCustomProductPages - case appEncryptionDeclarations - case appEvents - case appInfos - case appPricePoints - case appPriceSchedule - case appStoreVersionExperimentsV2 - case appStoreVersions - case availableInNewTerritories - case availableTerritories - case betaAppLocalizations - case betaAppReviewDetail - case betaGroups - case betaLicenseAgreement - case betaTesters - case builds - case bundleId - case ciProduct - case contentRightsDeclaration - case customerReviews - case endUserLicenseAgreement - case gameCenterDetail - case gameCenterEnabledVersions - case inAppPurchases - case inAppPurchasesV2 - case isOrEverWasMadeForKids - case name - case perfPowerMetrics - case preOrder - case preReleaseVersions - case pricePoints - case prices - case primaryLocale - case promotedPurchases - case reviewSubmissions - case sku - case subscriptionGracePeriod - case subscriptionGroups - case subscriptionStatusUrl - case subscriptionStatusUrlForSandbox - case subscriptionStatusUrlVersion - case subscriptionStatusUrlVersionForSandbox - case unknown(String) - - public var rawValue: String { - switch self { - case .appAvailability: return "appAvailability" - case .appClips: return "appClips" - case .appCustomProductPages: return "appCustomProductPages" - case .appEncryptionDeclarations: return "appEncryptionDeclarations" - case .appEvents: return "appEvents" - case .appInfos: return "appInfos" - case .appPricePoints: return "appPricePoints" - case .appPriceSchedule: return "appPriceSchedule" - case .appStoreVersionExperimentsV2: return "appStoreVersionExperimentsV2" - case .appStoreVersions: return "appStoreVersions" - case .availableInNewTerritories: return "availableInNewTerritories" - case .availableTerritories: return "availableTerritories" - case .betaAppLocalizations: return "betaAppLocalizations" - case .betaAppReviewDetail: return "betaAppReviewDetail" - case .betaGroups: return "betaGroups" - case .betaLicenseAgreement: return "betaLicenseAgreement" - case .betaTesters: return "betaTesters" - case .builds: return "builds" - case .bundleId: return "bundleId" - case .ciProduct: return "ciProduct" - case .contentRightsDeclaration: return "contentRightsDeclaration" - case .customerReviews: return "customerReviews" - case .endUserLicenseAgreement: return "endUserLicenseAgreement" - case .gameCenterDetail: return "gameCenterDetail" - case .gameCenterEnabledVersions: return "gameCenterEnabledVersions" - case .inAppPurchases: return "inAppPurchases" - case .inAppPurchasesV2: return "inAppPurchasesV2" - case .isOrEverWasMadeForKids: return "isOrEverWasMadeForKids" - case .name: return "name" - case .perfPowerMetrics: return "perfPowerMetrics" - case .preOrder: return "preOrder" - case .preReleaseVersions: return "preReleaseVersions" - case .pricePoints: return "pricePoints" - case .prices: return "prices" - case .primaryLocale: return "primaryLocale" - case .promotedPurchases: return "promotedPurchases" - case .reviewSubmissions: return "reviewSubmissions" - case .sku: return "sku" - case .subscriptionGracePeriod: return "subscriptionGracePeriod" - case .subscriptionGroups: return "subscriptionGroups" - case .subscriptionStatusUrl: return "subscriptionStatusUrl" - case .subscriptionStatusUrlForSandbox: return "subscriptionStatusUrlForSandbox" - case .subscriptionStatusUrlVersion: return "subscriptionStatusUrlVersion" - case .subscriptionStatusUrlVersionForSandbox: return "subscriptionStatusUrlVersionForSandbox" - case .unknown(let rawValue): return rawValue - } + public struct Apps: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var accessibilityDeclarations: Self { + .init(rawValue: "accessibilityDeclarations") + } + + public static var accessibilityUrl: Self { + .init(rawValue: "accessibilityUrl") + } + + public static var alternativeDistributionKey: Self { + .init(rawValue: "alternativeDistributionKey") + } + + public static var analyticsReportRequests: Self { + .init(rawValue: "analyticsReportRequests") + } + + public static var appAvailabilityV2: Self { + .init(rawValue: "appAvailabilityV2") + } + + public static var appClips: Self { + .init(rawValue: "appClips") } + public static var appCustomProductPages: Self { + .init(rawValue: "appCustomProductPages") + } + + public static var appEncryptionDeclarations: Self { + .init(rawValue: "appEncryptionDeclarations") + } + + public static var appEvents: Self { + .init(rawValue: "appEvents") + } + + public static var appInfos: Self { + .init(rawValue: "appInfos") + } + + public static var appPricePoints: Self { + .init(rawValue: "appPricePoints") + } + + public static var appPriceSchedule: Self { + .init(rawValue: "appPriceSchedule") + } + + public static var appStoreVersionExperimentsV2: Self { + .init(rawValue: "appStoreVersionExperimentsV2") + } + + public static var appStoreVersions: Self { + .init(rawValue: "appStoreVersions") + } + + public static var backgroundAssets: Self { + .init(rawValue: "backgroundAssets") + } + + public static var betaAppLocalizations: Self { + .init(rawValue: "betaAppLocalizations") + } + + public static var betaAppReviewDetail: Self { + .init(rawValue: "betaAppReviewDetail") + } + + public static var betaFeedbackCrashSubmissions: Self { + .init(rawValue: "betaFeedbackCrashSubmissions") + } + + public static var betaFeedbackScreenshotSubmissions: Self { + .init(rawValue: "betaFeedbackScreenshotSubmissions") + } + + public static var betaGroups: Self { + .init(rawValue: "betaGroups") + } + + public static var betaLicenseAgreement: Self { + .init(rawValue: "betaLicenseAgreement") + } + + public static var betaTesters: Self { + .init(rawValue: "betaTesters") + } + + public static var builds: Self { + .init(rawValue: "builds") + } + + public static var bundleId: Self { + .init(rawValue: "bundleId") + } + + public static var ciProduct: Self { + .init(rawValue: "ciProduct") + } + + public static var contentRightsDeclaration: Self { + .init(rawValue: "contentRightsDeclaration") + } + + public static var customerReviewSummarizations: Self { + .init(rawValue: "customerReviewSummarizations") + } + + public static var customerReviews: Self { + .init(rawValue: "customerReviews") + } + + public static var endUserLicenseAgreement: Self { + .init(rawValue: "endUserLicenseAgreement") + } + + public static var gameCenterDetail: Self { + .init(rawValue: "gameCenterDetail") + } + + public static var gameCenterEnabledVersions: Self { + .init(rawValue: "gameCenterEnabledVersions") + } + + public static var inAppPurchases: Self { + .init(rawValue: "inAppPurchases") + } + + public static var inAppPurchasesV2: Self { + .init(rawValue: "inAppPurchasesV2") + } + + public static var isOrEverWasMadeForKids: Self { + .init(rawValue: "isOrEverWasMadeForKids") + } + + public static var marketplaceSearchDetail: Self { + .init(rawValue: "marketplaceSearchDetail") + } + + public static var name: Self { + .init(rawValue: "name") + } + + public static var perfPowerMetrics: Self { + .init(rawValue: "perfPowerMetrics") + } + + public static var preReleaseVersions: Self { + .init(rawValue: "preReleaseVersions") + } + + public static var primaryLocale: Self { + .init(rawValue: "primaryLocale") + } + + public static var promotedPurchases: Self { + .init(rawValue: "promotedPurchases") + } + + public static var reviewSubmissions: Self { + .init(rawValue: "reviewSubmissions") + } + + public static var sku: Self { + .init(rawValue: "sku") + } + + public static var streamlinedPurchasingEnabled: Self { + .init(rawValue: "streamlinedPurchasingEnabled") + } + + public static var subscriptionGracePeriod: Self { + .init(rawValue: "subscriptionGracePeriod") + } + + public static var subscriptionGroups: Self { + .init(rawValue: "subscriptionGroups") + } + + public static var subscriptionStatusUrl: Self { + .init(rawValue: "subscriptionStatusUrl") + } + + public static var subscriptionStatusUrlForSandbox: Self { + .init(rawValue: "subscriptionStatusUrlForSandbox") + } + + public static var subscriptionStatusUrlVersion: Self { + .init(rawValue: "subscriptionStatusUrlVersion") + } + + public static var subscriptionStatusUrlVersionForSandbox: Self { + .init(rawValue: "subscriptionStatusUrlVersionForSandbox") + } + + public static var webhooks: Self { + .init(rawValue: "webhooks") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "appAvailability": self = .appAvailability - case "appClips": self = .appClips - case "appCustomProductPages": self = .appCustomProductPages - case "appEncryptionDeclarations": self = .appEncryptionDeclarations - case "appEvents": self = .appEvents - case "appInfos": self = .appInfos - case "appPricePoints": self = .appPricePoints - case "appPriceSchedule": self = .appPriceSchedule - case "appStoreVersionExperimentsV2": self = .appStoreVersionExperimentsV2 - case "appStoreVersions": self = .appStoreVersions - case "availableInNewTerritories": self = .availableInNewTerritories - case "availableTerritories": self = .availableTerritories - case "betaAppLocalizations": self = .betaAppLocalizations - case "betaAppReviewDetail": self = .betaAppReviewDetail - case "betaGroups": self = .betaGroups - case "betaLicenseAgreement": self = .betaLicenseAgreement - case "betaTesters": self = .betaTesters - case "builds": self = .builds - case "bundleId": self = .bundleId - case "ciProduct": self = .ciProduct - case "contentRightsDeclaration": self = .contentRightsDeclaration - case "customerReviews": self = .customerReviews - case "endUserLicenseAgreement": self = .endUserLicenseAgreement - case "gameCenterDetail": self = .gameCenterDetail - case "gameCenterEnabledVersions": self = .gameCenterEnabledVersions - case "inAppPurchases": self = .inAppPurchases - case "inAppPurchasesV2": self = .inAppPurchasesV2 - case "isOrEverWasMadeForKids": self = .isOrEverWasMadeForKids - case "name": self = .name - case "perfPowerMetrics": self = .perfPowerMetrics - case "preOrder": self = .preOrder - case "preReleaseVersions": self = .preReleaseVersions - case "pricePoints": self = .pricePoints - case "prices": self = .prices - case "primaryLocale": self = .primaryLocale - case "promotedPurchases": self = .promotedPurchases - case "reviewSubmissions": self = .reviewSubmissions - case "sku": self = .sku - case "subscriptionGracePeriod": self = .subscriptionGracePeriod - case "subscriptionGroups": self = .subscriptionGroups - case "subscriptionStatusUrl": self = .subscriptionStatusUrl - case "subscriptionStatusUrlForSandbox": self = .subscriptionStatusUrlForSandbox - case "subscriptionStatusUrlVersion": self = .subscriptionStatusUrlVersion - case "subscriptionStatusUrlVersionForSandbox": self = .subscriptionStatusUrlVersionForSandbox - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/PreReleaseVersions/ById/Builds/PreReleaseVersionsByIdBuilds.GET.dd40f29.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/PreReleaseVersions/ById/Builds/PreReleaseVersionsByIdBuilds.GET.dd40f29.generated.swift index 955186e6..60c936c9 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/PreReleaseVersions/ById/Builds/PreReleaseVersionsByIdBuilds.GET.dd40f29.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/PreReleaseVersions/ById/Builds/PreReleaseVersionsByIdBuilds.GET.dd40f29.generated.swift @@ -44,8 +44,10 @@ extension V1.PreReleaseVersions.ById.Builds { /// - Returns: **200**, List of Builds with get as `BuildsWithoutIncludesResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -59,12 +61,18 @@ extension V1.PreReleaseVersions.ById.Builds { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 404: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -87,91 +95,115 @@ extension V1.PreReleaseVersions.ById.Builds.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum Builds: Hashable, Codable, RawRepresentable { - case app - case appEncryptionDeclaration - case appStoreVersion - case betaAppReviewSubmission - case betaBuildLocalizations - case betaGroups - case buildAudienceType - case buildBetaDetail - case buildBundles - case computedMinMacOsVersion - case diagnosticSignatures - case expirationDate - case expired - case iconAssetToken - case icons - case individualTesters - case lsMinimumSystemVersion - case minOsVersion - case perfPowerMetrics - case preReleaseVersion - case processingState - case uploadedDate - case usesNonExemptEncryption - case version - case unknown(String) - - public var rawValue: String { - switch self { - case .app: return "app" - case .appEncryptionDeclaration: return "appEncryptionDeclaration" - case .appStoreVersion: return "appStoreVersion" - case .betaAppReviewSubmission: return "betaAppReviewSubmission" - case .betaBuildLocalizations: return "betaBuildLocalizations" - case .betaGroups: return "betaGroups" - case .buildAudienceType: return "buildAudienceType" - case .buildBetaDetail: return "buildBetaDetail" - case .buildBundles: return "buildBundles" - case .computedMinMacOsVersion: return "computedMinMacOsVersion" - case .diagnosticSignatures: return "diagnosticSignatures" - case .expirationDate: return "expirationDate" - case .expired: return "expired" - case .iconAssetToken: return "iconAssetToken" - case .icons: return "icons" - case .individualTesters: return "individualTesters" - case .lsMinimumSystemVersion: return "lsMinimumSystemVersion" - case .minOsVersion: return "minOsVersion" - case .perfPowerMetrics: return "perfPowerMetrics" - case .preReleaseVersion: return "preReleaseVersion" - case .processingState: return "processingState" - case .uploadedDate: return "uploadedDate" - case .usesNonExemptEncryption: return "usesNonExemptEncryption" - case .version: return "version" - case .unknown(let rawValue): return rawValue - } + public struct Builds: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var app: Self { + .init(rawValue: "app") + } + + public static var appEncryptionDeclaration: Self { + .init(rawValue: "appEncryptionDeclaration") + } + + public static var appStoreVersion: Self { + .init(rawValue: "appStoreVersion") + } + + public static var betaAppReviewSubmission: Self { + .init(rawValue: "betaAppReviewSubmission") + } + + public static var betaBuildLocalizations: Self { + .init(rawValue: "betaBuildLocalizations") + } + + public static var betaGroups: Self { + .init(rawValue: "betaGroups") + } + + public static var buildAudienceType: Self { + .init(rawValue: "buildAudienceType") + } + + public static var buildBetaDetail: Self { + .init(rawValue: "buildBetaDetail") + } + + public static var buildBundles: Self { + .init(rawValue: "buildBundles") + } + + public static var computedMinMacOsVersion: Self { + .init(rawValue: "computedMinMacOsVersion") + } + + public static var computedMinVisionOsVersion: Self { + .init(rawValue: "computedMinVisionOsVersion") + } + + public static var diagnosticSignatures: Self { + .init(rawValue: "diagnosticSignatures") + } + + public static var expirationDate: Self { + .init(rawValue: "expirationDate") } + public static var expired: Self { + .init(rawValue: "expired") + } + + public static var iconAssetToken: Self { + .init(rawValue: "iconAssetToken") + } + + public static var icons: Self { + .init(rawValue: "icons") + } + + public static var individualTesters: Self { + .init(rawValue: "individualTesters") + } + + public static var lsMinimumSystemVersion: Self { + .init(rawValue: "lsMinimumSystemVersion") + } + + public static var minOsVersion: Self { + .init(rawValue: "minOsVersion") + } + + public static var perfPowerMetrics: Self { + .init(rawValue: "perfPowerMetrics") + } + + public static var preReleaseVersion: Self { + .init(rawValue: "preReleaseVersion") + } + + public static var processingState: Self { + .init(rawValue: "processingState") + } + + public static var uploadedDate: Self { + .init(rawValue: "uploadedDate") + } + + public static var usesNonExemptEncryption: Self { + .init(rawValue: "usesNonExemptEncryption") + } + + public static var version: Self { + .init(rawValue: "version") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "app": self = .app - case "appEncryptionDeclaration": self = .appEncryptionDeclaration - case "appStoreVersion": self = .appStoreVersion - case "betaAppReviewSubmission": self = .betaAppReviewSubmission - case "betaBuildLocalizations": self = .betaBuildLocalizations - case "betaGroups": self = .betaGroups - case "buildAudienceType": self = .buildAudienceType - case "buildBetaDetail": self = .buildBetaDetail - case "buildBundles": self = .buildBundles - case "computedMinMacOsVersion": self = .computedMinMacOsVersion - case "diagnosticSignatures": self = .diagnosticSignatures - case "expirationDate": self = .expirationDate - case "expired": self = .expired - case "iconAssetToken": self = .iconAssetToken - case "icons": self = .icons - case "individualTesters": self = .individualTesters - case "lsMinimumSystemVersion": self = .lsMinimumSystemVersion - case "minOsVersion": self = .minOsVersion - case "perfPowerMetrics": self = .perfPowerMetrics - case "preReleaseVersion": self = .preReleaseVersion - case "processingState": self = .processingState - case "uploadedDate": self = .uploadedDate - case "usesNonExemptEncryption": self = .usesNonExemptEncryption - case "version": self = .version - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/PreReleaseVersions/ById/PreReleaseVersionsById.GET.e94aeb6.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/PreReleaseVersions/ById/PreReleaseVersionsById.GET.e94aeb6.generated.swift index fdfbfabe..69fe7f6b 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/PreReleaseVersions/ById/PreReleaseVersionsById.GET.e94aeb6.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/PreReleaseVersions/ById/PreReleaseVersionsById.GET.e94aeb6.generated.swift @@ -50,8 +50,10 @@ extension V1.PreReleaseVersions.ById { /// - Returns: **200**, Single PrereleaseVersion as `PrereleaseVersionResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -65,12 +67,18 @@ extension V1.PreReleaseVersions.ById { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 404: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -95,267 +103,355 @@ extension V1.PreReleaseVersions.ById.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum Apps: Hashable, Codable, RawRepresentable { - case appAvailability - case appClips - case appCustomProductPages - case appEncryptionDeclarations - case appEvents - case appInfos - case appPricePoints - case appPriceSchedule - case appStoreVersionExperimentsV2 - case appStoreVersions - case availableInNewTerritories - case availableTerritories - case betaAppLocalizations - case betaAppReviewDetail - case betaGroups - case betaLicenseAgreement - case betaTesters - case builds - case bundleId - case ciProduct - case contentRightsDeclaration - case customerReviews - case endUserLicenseAgreement - case gameCenterDetail - case gameCenterEnabledVersions - case inAppPurchases - case inAppPurchasesV2 - case isOrEverWasMadeForKids - case name - case perfPowerMetrics - case preOrder - case preReleaseVersions - case pricePoints - case prices - case primaryLocale - case promotedPurchases - case reviewSubmissions - case sku - case subscriptionGracePeriod - case subscriptionGroups - case subscriptionStatusUrl - case subscriptionStatusUrlForSandbox - case subscriptionStatusUrlVersion - case subscriptionStatusUrlVersionForSandbox - case unknown(String) - - public var rawValue: String { - switch self { - case .appAvailability: return "appAvailability" - case .appClips: return "appClips" - case .appCustomProductPages: return "appCustomProductPages" - case .appEncryptionDeclarations: return "appEncryptionDeclarations" - case .appEvents: return "appEvents" - case .appInfos: return "appInfos" - case .appPricePoints: return "appPricePoints" - case .appPriceSchedule: return "appPriceSchedule" - case .appStoreVersionExperimentsV2: return "appStoreVersionExperimentsV2" - case .appStoreVersions: return "appStoreVersions" - case .availableInNewTerritories: return "availableInNewTerritories" - case .availableTerritories: return "availableTerritories" - case .betaAppLocalizations: return "betaAppLocalizations" - case .betaAppReviewDetail: return "betaAppReviewDetail" - case .betaGroups: return "betaGroups" - case .betaLicenseAgreement: return "betaLicenseAgreement" - case .betaTesters: return "betaTesters" - case .builds: return "builds" - case .bundleId: return "bundleId" - case .ciProduct: return "ciProduct" - case .contentRightsDeclaration: return "contentRightsDeclaration" - case .customerReviews: return "customerReviews" - case .endUserLicenseAgreement: return "endUserLicenseAgreement" - case .gameCenterDetail: return "gameCenterDetail" - case .gameCenterEnabledVersions: return "gameCenterEnabledVersions" - case .inAppPurchases: return "inAppPurchases" - case .inAppPurchasesV2: return "inAppPurchasesV2" - case .isOrEverWasMadeForKids: return "isOrEverWasMadeForKids" - case .name: return "name" - case .perfPowerMetrics: return "perfPowerMetrics" - case .preOrder: return "preOrder" - case .preReleaseVersions: return "preReleaseVersions" - case .pricePoints: return "pricePoints" - case .prices: return "prices" - case .primaryLocale: return "primaryLocale" - case .promotedPurchases: return "promotedPurchases" - case .reviewSubmissions: return "reviewSubmissions" - case .sku: return "sku" - case .subscriptionGracePeriod: return "subscriptionGracePeriod" - case .subscriptionGroups: return "subscriptionGroups" - case .subscriptionStatusUrl: return "subscriptionStatusUrl" - case .subscriptionStatusUrlForSandbox: return "subscriptionStatusUrlForSandbox" - case .subscriptionStatusUrlVersion: return "subscriptionStatusUrlVersion" - case .subscriptionStatusUrlVersionForSandbox: return "subscriptionStatusUrlVersionForSandbox" - case .unknown(let rawValue): return rawValue - } + public struct Apps: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var accessibilityDeclarations: Self { + .init(rawValue: "accessibilityDeclarations") + } + + public static var accessibilityUrl: Self { + .init(rawValue: "accessibilityUrl") + } + + public static var alternativeDistributionKey: Self { + .init(rawValue: "alternativeDistributionKey") + } + + public static var analyticsReportRequests: Self { + .init(rawValue: "analyticsReportRequests") + } + + public static var appAvailabilityV2: Self { + .init(rawValue: "appAvailabilityV2") + } + + public static var appClips: Self { + .init(rawValue: "appClips") + } + + public static var appCustomProductPages: Self { + .init(rawValue: "appCustomProductPages") + } + + public static var appEncryptionDeclarations: Self { + .init(rawValue: "appEncryptionDeclarations") + } + + public static var appEvents: Self { + .init(rawValue: "appEvents") + } + + public static var appInfos: Self { + .init(rawValue: "appInfos") + } + + public static var appPricePoints: Self { + .init(rawValue: "appPricePoints") + } + + public static var appPriceSchedule: Self { + .init(rawValue: "appPriceSchedule") + } + + public static var appStoreVersionExperimentsV2: Self { + .init(rawValue: "appStoreVersionExperimentsV2") + } + + public static var appStoreVersions: Self { + .init(rawValue: "appStoreVersions") + } + + public static var backgroundAssets: Self { + .init(rawValue: "backgroundAssets") + } + + public static var betaAppLocalizations: Self { + .init(rawValue: "betaAppLocalizations") + } + + public static var betaAppReviewDetail: Self { + .init(rawValue: "betaAppReviewDetail") + } + + public static var betaFeedbackCrashSubmissions: Self { + .init(rawValue: "betaFeedbackCrashSubmissions") + } + + public static var betaFeedbackScreenshotSubmissions: Self { + .init(rawValue: "betaFeedbackScreenshotSubmissions") + } + + public static var betaGroups: Self { + .init(rawValue: "betaGroups") + } + + public static var betaLicenseAgreement: Self { + .init(rawValue: "betaLicenseAgreement") + } + + public static var betaTesters: Self { + .init(rawValue: "betaTesters") + } + + public static var builds: Self { + .init(rawValue: "builds") + } + + public static var bundleId: Self { + .init(rawValue: "bundleId") + } + + public static var ciProduct: Self { + .init(rawValue: "ciProduct") + } + + public static var contentRightsDeclaration: Self { + .init(rawValue: "contentRightsDeclaration") + } + + public static var customerReviewSummarizations: Self { + .init(rawValue: "customerReviewSummarizations") + } + + public static var customerReviews: Self { + .init(rawValue: "customerReviews") + } + + public static var endUserLicenseAgreement: Self { + .init(rawValue: "endUserLicenseAgreement") + } + + public static var gameCenterDetail: Self { + .init(rawValue: "gameCenterDetail") + } + + public static var gameCenterEnabledVersions: Self { + .init(rawValue: "gameCenterEnabledVersions") + } + + public static var inAppPurchases: Self { + .init(rawValue: "inAppPurchases") + } + + public static var inAppPurchasesV2: Self { + .init(rawValue: "inAppPurchasesV2") + } + + public static var isOrEverWasMadeForKids: Self { + .init(rawValue: "isOrEverWasMadeForKids") + } + + public static var marketplaceSearchDetail: Self { + .init(rawValue: "marketplaceSearchDetail") + } + + public static var name: Self { + .init(rawValue: "name") + } + + public static var perfPowerMetrics: Self { + .init(rawValue: "perfPowerMetrics") + } + + public static var preReleaseVersions: Self { + .init(rawValue: "preReleaseVersions") + } + + public static var primaryLocale: Self { + .init(rawValue: "primaryLocale") + } + + public static var promotedPurchases: Self { + .init(rawValue: "promotedPurchases") + } + + public static var reviewSubmissions: Self { + .init(rawValue: "reviewSubmissions") + } + + public static var sku: Self { + .init(rawValue: "sku") + } + + public static var streamlinedPurchasingEnabled: Self { + .init(rawValue: "streamlinedPurchasingEnabled") + } + + public static var subscriptionGracePeriod: Self { + .init(rawValue: "subscriptionGracePeriod") + } + + public static var subscriptionGroups: Self { + .init(rawValue: "subscriptionGroups") + } + + public static var subscriptionStatusUrl: Self { + .init(rawValue: "subscriptionStatusUrl") + } + + public static var subscriptionStatusUrlForSandbox: Self { + .init(rawValue: "subscriptionStatusUrlForSandbox") } + public static var subscriptionStatusUrlVersion: Self { + .init(rawValue: "subscriptionStatusUrlVersion") + } + + public static var subscriptionStatusUrlVersionForSandbox: Self { + .init(rawValue: "subscriptionStatusUrlVersionForSandbox") + } + + public static var webhooks: Self { + .init(rawValue: "webhooks") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "appAvailability": self = .appAvailability - case "appClips": self = .appClips - case "appCustomProductPages": self = .appCustomProductPages - case "appEncryptionDeclarations": self = .appEncryptionDeclarations - case "appEvents": self = .appEvents - case "appInfos": self = .appInfos - case "appPricePoints": self = .appPricePoints - case "appPriceSchedule": self = .appPriceSchedule - case "appStoreVersionExperimentsV2": self = .appStoreVersionExperimentsV2 - case "appStoreVersions": self = .appStoreVersions - case "availableInNewTerritories": self = .availableInNewTerritories - case "availableTerritories": self = .availableTerritories - case "betaAppLocalizations": self = .betaAppLocalizations - case "betaAppReviewDetail": self = .betaAppReviewDetail - case "betaGroups": self = .betaGroups - case "betaLicenseAgreement": self = .betaLicenseAgreement - case "betaTesters": self = .betaTesters - case "builds": self = .builds - case "bundleId": self = .bundleId - case "ciProduct": self = .ciProduct - case "contentRightsDeclaration": self = .contentRightsDeclaration - case "customerReviews": self = .customerReviews - case "endUserLicenseAgreement": self = .endUserLicenseAgreement - case "gameCenterDetail": self = .gameCenterDetail - case "gameCenterEnabledVersions": self = .gameCenterEnabledVersions - case "inAppPurchases": self = .inAppPurchases - case "inAppPurchasesV2": self = .inAppPurchasesV2 - case "isOrEverWasMadeForKids": self = .isOrEverWasMadeForKids - case "name": self = .name - case "perfPowerMetrics": self = .perfPowerMetrics - case "preOrder": self = .preOrder - case "preReleaseVersions": self = .preReleaseVersions - case "pricePoints": self = .pricePoints - case "prices": self = .prices - case "primaryLocale": self = .primaryLocale - case "promotedPurchases": self = .promotedPurchases - case "reviewSubmissions": self = .reviewSubmissions - case "sku": self = .sku - case "subscriptionGracePeriod": self = .subscriptionGracePeriod - case "subscriptionGroups": self = .subscriptionGroups - case "subscriptionStatusUrl": self = .subscriptionStatusUrl - case "subscriptionStatusUrlForSandbox": self = .subscriptionStatusUrlForSandbox - case "subscriptionStatusUrlVersion": self = .subscriptionStatusUrlVersion - case "subscriptionStatusUrlVersionForSandbox": self = .subscriptionStatusUrlVersionForSandbox - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum Builds: Hashable, Codable, RawRepresentable { - case app - case appEncryptionDeclaration - case appStoreVersion - case betaAppReviewSubmission - case betaBuildLocalizations - case betaGroups - case buildAudienceType - case buildBetaDetail - case buildBundles - case computedMinMacOsVersion - case diagnosticSignatures - case expirationDate - case expired - case iconAssetToken - case icons - case individualTesters - case lsMinimumSystemVersion - case minOsVersion - case perfPowerMetrics - case preReleaseVersion - case processingState - case uploadedDate - case usesNonExemptEncryption - case version - case unknown(String) - - public var rawValue: String { - switch self { - case .app: return "app" - case .appEncryptionDeclaration: return "appEncryptionDeclaration" - case .appStoreVersion: return "appStoreVersion" - case .betaAppReviewSubmission: return "betaAppReviewSubmission" - case .betaBuildLocalizations: return "betaBuildLocalizations" - case .betaGroups: return "betaGroups" - case .buildAudienceType: return "buildAudienceType" - case .buildBetaDetail: return "buildBetaDetail" - case .buildBundles: return "buildBundles" - case .computedMinMacOsVersion: return "computedMinMacOsVersion" - case .diagnosticSignatures: return "diagnosticSignatures" - case .expirationDate: return "expirationDate" - case .expired: return "expired" - case .iconAssetToken: return "iconAssetToken" - case .icons: return "icons" - case .individualTesters: return "individualTesters" - case .lsMinimumSystemVersion: return "lsMinimumSystemVersion" - case .minOsVersion: return "minOsVersion" - case .perfPowerMetrics: return "perfPowerMetrics" - case .preReleaseVersion: return "preReleaseVersion" - case .processingState: return "processingState" - case .uploadedDate: return "uploadedDate" - case .usesNonExemptEncryption: return "usesNonExemptEncryption" - case .version: return "version" - case .unknown(let rawValue): return rawValue - } + public struct Builds: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var app: Self { + .init(rawValue: "app") + } + + public static var appEncryptionDeclaration: Self { + .init(rawValue: "appEncryptionDeclaration") } + public static var appStoreVersion: Self { + .init(rawValue: "appStoreVersion") + } + + public static var betaAppReviewSubmission: Self { + .init(rawValue: "betaAppReviewSubmission") + } + + public static var betaBuildLocalizations: Self { + .init(rawValue: "betaBuildLocalizations") + } + + public static var betaGroups: Self { + .init(rawValue: "betaGroups") + } + + public static var buildAudienceType: Self { + .init(rawValue: "buildAudienceType") + } + + public static var buildBetaDetail: Self { + .init(rawValue: "buildBetaDetail") + } + + public static var buildBundles: Self { + .init(rawValue: "buildBundles") + } + + public static var computedMinMacOsVersion: Self { + .init(rawValue: "computedMinMacOsVersion") + } + + public static var computedMinVisionOsVersion: Self { + .init(rawValue: "computedMinVisionOsVersion") + } + + public static var diagnosticSignatures: Self { + .init(rawValue: "diagnosticSignatures") + } + + public static var expirationDate: Self { + .init(rawValue: "expirationDate") + } + + public static var expired: Self { + .init(rawValue: "expired") + } + + public static var iconAssetToken: Self { + .init(rawValue: "iconAssetToken") + } + + public static var icons: Self { + .init(rawValue: "icons") + } + + public static var individualTesters: Self { + .init(rawValue: "individualTesters") + } + + public static var lsMinimumSystemVersion: Self { + .init(rawValue: "lsMinimumSystemVersion") + } + + public static var minOsVersion: Self { + .init(rawValue: "minOsVersion") + } + + public static var perfPowerMetrics: Self { + .init(rawValue: "perfPowerMetrics") + } + + public static var preReleaseVersion: Self { + .init(rawValue: "preReleaseVersion") + } + + public static var processingState: Self { + .init(rawValue: "processingState") + } + + public static var uploadedDate: Self { + .init(rawValue: "uploadedDate") + } + + public static var usesNonExemptEncryption: Self { + .init(rawValue: "usesNonExemptEncryption") + } + + public static var version: Self { + .init(rawValue: "version") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "app": self = .app - case "appEncryptionDeclaration": self = .appEncryptionDeclaration - case "appStoreVersion": self = .appStoreVersion - case "betaAppReviewSubmission": self = .betaAppReviewSubmission - case "betaBuildLocalizations": self = .betaBuildLocalizations - case "betaGroups": self = .betaGroups - case "buildAudienceType": self = .buildAudienceType - case "buildBetaDetail": self = .buildBetaDetail - case "buildBundles": self = .buildBundles - case "computedMinMacOsVersion": self = .computedMinMacOsVersion - case "diagnosticSignatures": self = .diagnosticSignatures - case "expirationDate": self = .expirationDate - case "expired": self = .expired - case "iconAssetToken": self = .iconAssetToken - case "icons": self = .icons - case "individualTesters": self = .individualTesters - case "lsMinimumSystemVersion": self = .lsMinimumSystemVersion - case "minOsVersion": self = .minOsVersion - case "perfPowerMetrics": self = .perfPowerMetrics - case "preReleaseVersion": self = .preReleaseVersion - case "processingState": self = .processingState - case "uploadedDate": self = .uploadedDate - case "usesNonExemptEncryption": self = .usesNonExemptEncryption - case "version": self = .version - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum PreReleaseVersions: Hashable, Codable, RawRepresentable { - case app - case builds - case platform - case version - case unknown(String) + public struct PreReleaseVersions: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var app: Self { + .init(rawValue: "app") + } - public var rawValue: String { - switch self { - case .app: return "app" - case .builds: return "builds" - case .platform: return "platform" - case .version: return "version" - case .unknown(let rawValue): return rawValue - } + public static var builds: Self { + .init(rawValue: "builds") } + public static var platform: Self { + .init(rawValue: "platform") + } + + public static var version: Self { + .init(rawValue: "version") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "app": self = .app - case "builds": self = .builds - case "platform": self = .platform - case "version": self = .version - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } @@ -383,25 +479,23 @@ extension V1.PreReleaseVersions.ById.GET { } } - public enum Include: Hashable, Codable, RawRepresentable { - case app - case builds - case unknown(String) + public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var app: Self { + .init(rawValue: "app") + } + + public static var builds: Self { + .init(rawValue: "builds") + } - public var rawValue: String { - switch self { - case .app: return "app" - case .builds: return "builds" - case .unknown(let rawValue): return rawValue - } + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "app": self = .app - case "builds": self = .builds - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/PreReleaseVersions/ById/Relationships/App/PreReleaseVersionsByIdRelationshipsApp.GET.e10704f.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/PreReleaseVersions/ById/Relationships/App/PreReleaseVersionsByIdRelationshipsApp.GET.e10704f.generated.swift new file mode 100644 index 00000000..47941fc5 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/PreReleaseVersions/ById/Relationships/App/PreReleaseVersionsByIdRelationshipsApp.GET.e10704f.generated.swift @@ -0,0 +1,86 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.PreReleaseVersions.ById.Relationships.App { + public struct GET: Endpoint { + public typealias Response = PrereleaseVersionAppLinkageResponse + + public var path: String { + "/v1/preReleaseVersions/\(id)/relationships/app" + } + + /// the id of the requested resource + public var id: String + + public var parameters: Parameters = Parameters() + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + components?.queryItems = [ + + ].filter { $0.value != nil } + if components?.queryItems?.isEmpty ?? false { + components?.queryItems = nil + } + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "GET" + return urlRequest + } + + /// - Returns: **200**, Related linkage as `PrereleaseVersionAppLinkageResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(PrereleaseVersionAppLinkageResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +extension V1.PreReleaseVersions.ById.Relationships.App.GET { + public struct Parameters: Hashable { + + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/PreReleaseVersions/ById/Relationships/Builds/PreReleaseVersionsByIdRelationshipsBuilds.GET.feeeafe.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/PreReleaseVersions/ById/Relationships/Builds/PreReleaseVersionsByIdRelationshipsBuilds.GET.feeeafe.generated.swift new file mode 100644 index 00000000..2e969eff --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/PreReleaseVersions/ById/Relationships/Builds/PreReleaseVersionsByIdRelationshipsBuilds.GET.feeeafe.generated.swift @@ -0,0 +1,88 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.PreReleaseVersions.ById.Relationships.Builds { + public struct GET: Endpoint { + public typealias Response = PrereleaseVersionBuildsLinkagesResponse + + public var path: String { + "/v1/preReleaseVersions/\(id)/relationships/builds" + } + + /// the id of the requested resource + public var id: String + + public var parameters: Parameters = Parameters() + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + components?.queryItems = [ + URLQueryItem(name: "limit", + value: parameters.limit.map { "\($0)" }) + ].filter { $0.value != nil } + if components?.queryItems?.isEmpty ?? false { + components?.queryItems = nil + } + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "GET" + return urlRequest + } + + /// - Returns: **200**, List of related linkages as `PrereleaseVersionBuildsLinkagesResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(PrereleaseVersionBuildsLinkagesResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +extension V1.PreReleaseVersions.ById.Relationships.Builds.GET { + public struct Parameters: Hashable { + /// maximum resources per page + public var limit: Int? + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/PreReleaseVersions/PreReleaseVersions.GET.39a7a9a.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/PreReleaseVersions/PreReleaseVersions.GET.39a7a9a.generated.swift index af891ea8..1922647b 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/PreReleaseVersions/PreReleaseVersions.GET.39a7a9a.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/PreReleaseVersions/PreReleaseVersions.GET.39a7a9a.generated.swift @@ -33,6 +33,8 @@ extension V1.PreReleaseVersions { value: parameters.fields[.preReleaseVersions]?.map { "\($0)" }.joined(separator: ",")), URLQueryItem(name: "filter[app]", value: parameters.filter[.app]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "filter[builds.buildAudienceType]", + value: parameters.filter[.buildsBuildAudienceType]?.map { "\($0)" }.joined(separator: ",")), URLQueryItem(name: "filter[builds.expired]", value: parameters.filter[.buildsExpired]?.map { "\($0)" }.joined(separator: ",")), URLQueryItem(name: "filter[builds.processingState]", @@ -65,7 +67,9 @@ extension V1.PreReleaseVersions { /// - Returns: **200**, List of PreReleaseVersions as `PreReleaseVersionsResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -79,9 +83,15 @@ extension V1.PreReleaseVersions { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -112,267 +122,355 @@ extension V1.PreReleaseVersions.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum Apps: Hashable, Codable, RawRepresentable { - case appAvailability - case appClips - case appCustomProductPages - case appEncryptionDeclarations - case appEvents - case appInfos - case appPricePoints - case appPriceSchedule - case appStoreVersionExperimentsV2 - case appStoreVersions - case availableInNewTerritories - case availableTerritories - case betaAppLocalizations - case betaAppReviewDetail - case betaGroups - case betaLicenseAgreement - case betaTesters - case builds - case bundleId - case ciProduct - case contentRightsDeclaration - case customerReviews - case endUserLicenseAgreement - case gameCenterDetail - case gameCenterEnabledVersions - case inAppPurchases - case inAppPurchasesV2 - case isOrEverWasMadeForKids - case name - case perfPowerMetrics - case preOrder - case preReleaseVersions - case pricePoints - case prices - case primaryLocale - case promotedPurchases - case reviewSubmissions - case sku - case subscriptionGracePeriod - case subscriptionGroups - case subscriptionStatusUrl - case subscriptionStatusUrlForSandbox - case subscriptionStatusUrlVersion - case subscriptionStatusUrlVersionForSandbox - case unknown(String) - - public var rawValue: String { - switch self { - case .appAvailability: return "appAvailability" - case .appClips: return "appClips" - case .appCustomProductPages: return "appCustomProductPages" - case .appEncryptionDeclarations: return "appEncryptionDeclarations" - case .appEvents: return "appEvents" - case .appInfos: return "appInfos" - case .appPricePoints: return "appPricePoints" - case .appPriceSchedule: return "appPriceSchedule" - case .appStoreVersionExperimentsV2: return "appStoreVersionExperimentsV2" - case .appStoreVersions: return "appStoreVersions" - case .availableInNewTerritories: return "availableInNewTerritories" - case .availableTerritories: return "availableTerritories" - case .betaAppLocalizations: return "betaAppLocalizations" - case .betaAppReviewDetail: return "betaAppReviewDetail" - case .betaGroups: return "betaGroups" - case .betaLicenseAgreement: return "betaLicenseAgreement" - case .betaTesters: return "betaTesters" - case .builds: return "builds" - case .bundleId: return "bundleId" - case .ciProduct: return "ciProduct" - case .contentRightsDeclaration: return "contentRightsDeclaration" - case .customerReviews: return "customerReviews" - case .endUserLicenseAgreement: return "endUserLicenseAgreement" - case .gameCenterDetail: return "gameCenterDetail" - case .gameCenterEnabledVersions: return "gameCenterEnabledVersions" - case .inAppPurchases: return "inAppPurchases" - case .inAppPurchasesV2: return "inAppPurchasesV2" - case .isOrEverWasMadeForKids: return "isOrEverWasMadeForKids" - case .name: return "name" - case .perfPowerMetrics: return "perfPowerMetrics" - case .preOrder: return "preOrder" - case .preReleaseVersions: return "preReleaseVersions" - case .pricePoints: return "pricePoints" - case .prices: return "prices" - case .primaryLocale: return "primaryLocale" - case .promotedPurchases: return "promotedPurchases" - case .reviewSubmissions: return "reviewSubmissions" - case .sku: return "sku" - case .subscriptionGracePeriod: return "subscriptionGracePeriod" - case .subscriptionGroups: return "subscriptionGroups" - case .subscriptionStatusUrl: return "subscriptionStatusUrl" - case .subscriptionStatusUrlForSandbox: return "subscriptionStatusUrlForSandbox" - case .subscriptionStatusUrlVersion: return "subscriptionStatusUrlVersion" - case .subscriptionStatusUrlVersionForSandbox: return "subscriptionStatusUrlVersionForSandbox" - case .unknown(let rawValue): return rawValue - } + public struct Apps: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var accessibilityDeclarations: Self { + .init(rawValue: "accessibilityDeclarations") + } + + public static var accessibilityUrl: Self { + .init(rawValue: "accessibilityUrl") + } + + public static var alternativeDistributionKey: Self { + .init(rawValue: "alternativeDistributionKey") + } + + public static var analyticsReportRequests: Self { + .init(rawValue: "analyticsReportRequests") + } + + public static var appAvailabilityV2: Self { + .init(rawValue: "appAvailabilityV2") + } + + public static var appClips: Self { + .init(rawValue: "appClips") + } + + public static var appCustomProductPages: Self { + .init(rawValue: "appCustomProductPages") + } + + public static var appEncryptionDeclarations: Self { + .init(rawValue: "appEncryptionDeclarations") + } + + public static var appEvents: Self { + .init(rawValue: "appEvents") + } + + public static var appInfos: Self { + .init(rawValue: "appInfos") + } + + public static var appPricePoints: Self { + .init(rawValue: "appPricePoints") + } + + public static var appPriceSchedule: Self { + .init(rawValue: "appPriceSchedule") + } + + public static var appStoreVersionExperimentsV2: Self { + .init(rawValue: "appStoreVersionExperimentsV2") + } + + public static var appStoreVersions: Self { + .init(rawValue: "appStoreVersions") + } + + public static var backgroundAssets: Self { + .init(rawValue: "backgroundAssets") + } + + public static var betaAppLocalizations: Self { + .init(rawValue: "betaAppLocalizations") + } + + public static var betaAppReviewDetail: Self { + .init(rawValue: "betaAppReviewDetail") + } + + public static var betaFeedbackCrashSubmissions: Self { + .init(rawValue: "betaFeedbackCrashSubmissions") + } + + public static var betaFeedbackScreenshotSubmissions: Self { + .init(rawValue: "betaFeedbackScreenshotSubmissions") + } + + public static var betaGroups: Self { + .init(rawValue: "betaGroups") + } + + public static var betaLicenseAgreement: Self { + .init(rawValue: "betaLicenseAgreement") + } + + public static var betaTesters: Self { + .init(rawValue: "betaTesters") + } + + public static var builds: Self { + .init(rawValue: "builds") + } + + public static var bundleId: Self { + .init(rawValue: "bundleId") + } + + public static var ciProduct: Self { + .init(rawValue: "ciProduct") } + public static var contentRightsDeclaration: Self { + .init(rawValue: "contentRightsDeclaration") + } + + public static var customerReviewSummarizations: Self { + .init(rawValue: "customerReviewSummarizations") + } + + public static var customerReviews: Self { + .init(rawValue: "customerReviews") + } + + public static var endUserLicenseAgreement: Self { + .init(rawValue: "endUserLicenseAgreement") + } + + public static var gameCenterDetail: Self { + .init(rawValue: "gameCenterDetail") + } + + public static var gameCenterEnabledVersions: Self { + .init(rawValue: "gameCenterEnabledVersions") + } + + public static var inAppPurchases: Self { + .init(rawValue: "inAppPurchases") + } + + public static var inAppPurchasesV2: Self { + .init(rawValue: "inAppPurchasesV2") + } + + public static var isOrEverWasMadeForKids: Self { + .init(rawValue: "isOrEverWasMadeForKids") + } + + public static var marketplaceSearchDetail: Self { + .init(rawValue: "marketplaceSearchDetail") + } + + public static var name: Self { + .init(rawValue: "name") + } + + public static var perfPowerMetrics: Self { + .init(rawValue: "perfPowerMetrics") + } + + public static var preReleaseVersions: Self { + .init(rawValue: "preReleaseVersions") + } + + public static var primaryLocale: Self { + .init(rawValue: "primaryLocale") + } + + public static var promotedPurchases: Self { + .init(rawValue: "promotedPurchases") + } + + public static var reviewSubmissions: Self { + .init(rawValue: "reviewSubmissions") + } + + public static var sku: Self { + .init(rawValue: "sku") + } + + public static var streamlinedPurchasingEnabled: Self { + .init(rawValue: "streamlinedPurchasingEnabled") + } + + public static var subscriptionGracePeriod: Self { + .init(rawValue: "subscriptionGracePeriod") + } + + public static var subscriptionGroups: Self { + .init(rawValue: "subscriptionGroups") + } + + public static var subscriptionStatusUrl: Self { + .init(rawValue: "subscriptionStatusUrl") + } + + public static var subscriptionStatusUrlForSandbox: Self { + .init(rawValue: "subscriptionStatusUrlForSandbox") + } + + public static var subscriptionStatusUrlVersion: Self { + .init(rawValue: "subscriptionStatusUrlVersion") + } + + public static var subscriptionStatusUrlVersionForSandbox: Self { + .init(rawValue: "subscriptionStatusUrlVersionForSandbox") + } + + public static var webhooks: Self { + .init(rawValue: "webhooks") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "appAvailability": self = .appAvailability - case "appClips": self = .appClips - case "appCustomProductPages": self = .appCustomProductPages - case "appEncryptionDeclarations": self = .appEncryptionDeclarations - case "appEvents": self = .appEvents - case "appInfos": self = .appInfos - case "appPricePoints": self = .appPricePoints - case "appPriceSchedule": self = .appPriceSchedule - case "appStoreVersionExperimentsV2": self = .appStoreVersionExperimentsV2 - case "appStoreVersions": self = .appStoreVersions - case "availableInNewTerritories": self = .availableInNewTerritories - case "availableTerritories": self = .availableTerritories - case "betaAppLocalizations": self = .betaAppLocalizations - case "betaAppReviewDetail": self = .betaAppReviewDetail - case "betaGroups": self = .betaGroups - case "betaLicenseAgreement": self = .betaLicenseAgreement - case "betaTesters": self = .betaTesters - case "builds": self = .builds - case "bundleId": self = .bundleId - case "ciProduct": self = .ciProduct - case "contentRightsDeclaration": self = .contentRightsDeclaration - case "customerReviews": self = .customerReviews - case "endUserLicenseAgreement": self = .endUserLicenseAgreement - case "gameCenterDetail": self = .gameCenterDetail - case "gameCenterEnabledVersions": self = .gameCenterEnabledVersions - case "inAppPurchases": self = .inAppPurchases - case "inAppPurchasesV2": self = .inAppPurchasesV2 - case "isOrEverWasMadeForKids": self = .isOrEverWasMadeForKids - case "name": self = .name - case "perfPowerMetrics": self = .perfPowerMetrics - case "preOrder": self = .preOrder - case "preReleaseVersions": self = .preReleaseVersions - case "pricePoints": self = .pricePoints - case "prices": self = .prices - case "primaryLocale": self = .primaryLocale - case "promotedPurchases": self = .promotedPurchases - case "reviewSubmissions": self = .reviewSubmissions - case "sku": self = .sku - case "subscriptionGracePeriod": self = .subscriptionGracePeriod - case "subscriptionGroups": self = .subscriptionGroups - case "subscriptionStatusUrl": self = .subscriptionStatusUrl - case "subscriptionStatusUrlForSandbox": self = .subscriptionStatusUrlForSandbox - case "subscriptionStatusUrlVersion": self = .subscriptionStatusUrlVersion - case "subscriptionStatusUrlVersionForSandbox": self = .subscriptionStatusUrlVersionForSandbox - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum Builds: Hashable, Codable, RawRepresentable { - case app - case appEncryptionDeclaration - case appStoreVersion - case betaAppReviewSubmission - case betaBuildLocalizations - case betaGroups - case buildAudienceType - case buildBetaDetail - case buildBundles - case computedMinMacOsVersion - case diagnosticSignatures - case expirationDate - case expired - case iconAssetToken - case icons - case individualTesters - case lsMinimumSystemVersion - case minOsVersion - case perfPowerMetrics - case preReleaseVersion - case processingState - case uploadedDate - case usesNonExemptEncryption - case version - case unknown(String) - - public var rawValue: String { - switch self { - case .app: return "app" - case .appEncryptionDeclaration: return "appEncryptionDeclaration" - case .appStoreVersion: return "appStoreVersion" - case .betaAppReviewSubmission: return "betaAppReviewSubmission" - case .betaBuildLocalizations: return "betaBuildLocalizations" - case .betaGroups: return "betaGroups" - case .buildAudienceType: return "buildAudienceType" - case .buildBetaDetail: return "buildBetaDetail" - case .buildBundles: return "buildBundles" - case .computedMinMacOsVersion: return "computedMinMacOsVersion" - case .diagnosticSignatures: return "diagnosticSignatures" - case .expirationDate: return "expirationDate" - case .expired: return "expired" - case .iconAssetToken: return "iconAssetToken" - case .icons: return "icons" - case .individualTesters: return "individualTesters" - case .lsMinimumSystemVersion: return "lsMinimumSystemVersion" - case .minOsVersion: return "minOsVersion" - case .perfPowerMetrics: return "perfPowerMetrics" - case .preReleaseVersion: return "preReleaseVersion" - case .processingState: return "processingState" - case .uploadedDate: return "uploadedDate" - case .usesNonExemptEncryption: return "usesNonExemptEncryption" - case .version: return "version" - case .unknown(let rawValue): return rawValue - } + public struct Builds: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var app: Self { + .init(rawValue: "app") + } + + public static var appEncryptionDeclaration: Self { + .init(rawValue: "appEncryptionDeclaration") + } + + public static var appStoreVersion: Self { + .init(rawValue: "appStoreVersion") + } + + public static var betaAppReviewSubmission: Self { + .init(rawValue: "betaAppReviewSubmission") + } + + public static var betaBuildLocalizations: Self { + .init(rawValue: "betaBuildLocalizations") + } + + public static var betaGroups: Self { + .init(rawValue: "betaGroups") + } + + public static var buildAudienceType: Self { + .init(rawValue: "buildAudienceType") + } + + public static var buildBetaDetail: Self { + .init(rawValue: "buildBetaDetail") + } + + public static var buildBundles: Self { + .init(rawValue: "buildBundles") + } + + public static var computedMinMacOsVersion: Self { + .init(rawValue: "computedMinMacOsVersion") + } + + public static var computedMinVisionOsVersion: Self { + .init(rawValue: "computedMinVisionOsVersion") + } + + public static var diagnosticSignatures: Self { + .init(rawValue: "diagnosticSignatures") + } + + public static var expirationDate: Self { + .init(rawValue: "expirationDate") + } + + public static var expired: Self { + .init(rawValue: "expired") + } + + public static var iconAssetToken: Self { + .init(rawValue: "iconAssetToken") + } + + public static var icons: Self { + .init(rawValue: "icons") + } + + public static var individualTesters: Self { + .init(rawValue: "individualTesters") + } + + public static var lsMinimumSystemVersion: Self { + .init(rawValue: "lsMinimumSystemVersion") + } + + public static var minOsVersion: Self { + .init(rawValue: "minOsVersion") + } + + public static var perfPowerMetrics: Self { + .init(rawValue: "perfPowerMetrics") + } + + public static var preReleaseVersion: Self { + .init(rawValue: "preReleaseVersion") + } + + public static var processingState: Self { + .init(rawValue: "processingState") + } + + public static var uploadedDate: Self { + .init(rawValue: "uploadedDate") + } + + public static var usesNonExemptEncryption: Self { + .init(rawValue: "usesNonExemptEncryption") + } + + public static var version: Self { + .init(rawValue: "version") + } + + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "app": self = .app - case "appEncryptionDeclaration": self = .appEncryptionDeclaration - case "appStoreVersion": self = .appStoreVersion - case "betaAppReviewSubmission": self = .betaAppReviewSubmission - case "betaBuildLocalizations": self = .betaBuildLocalizations - case "betaGroups": self = .betaGroups - case "buildAudienceType": self = .buildAudienceType - case "buildBetaDetail": self = .buildBetaDetail - case "buildBundles": self = .buildBundles - case "computedMinMacOsVersion": self = .computedMinMacOsVersion - case "diagnosticSignatures": self = .diagnosticSignatures - case "expirationDate": self = .expirationDate - case "expired": self = .expired - case "iconAssetToken": self = .iconAssetToken - case "icons": self = .icons - case "individualTesters": self = .individualTesters - case "lsMinimumSystemVersion": self = .lsMinimumSystemVersion - case "minOsVersion": self = .minOsVersion - case "perfPowerMetrics": self = .perfPowerMetrics - case "preReleaseVersion": self = .preReleaseVersion - case "processingState": self = .processingState - case "uploadedDate": self = .uploadedDate - case "usesNonExemptEncryption": self = .usesNonExemptEncryption - case "version": self = .version - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum PreReleaseVersions: Hashable, Codable, RawRepresentable { - case app - case builds - case platform - case version - case unknown(String) + public struct PreReleaseVersions: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var app: Self { + .init(rawValue: "app") + } + + public static var builds: Self { + .init(rawValue: "builds") + } + + public static var platform: Self { + .init(rawValue: "platform") + } - public var rawValue: String { - switch self { - case .app: return "app" - case .builds: return "builds" - case .platform: return "platform" - case .version: return "version" - case .unknown(let rawValue): return rawValue - } + public static var version: Self { + .init(rawValue: "version") } + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "app": self = .app - case "builds": self = .builds - case "platform": self = .platform - case "version": self = .version - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } @@ -408,56 +506,79 @@ extension V1.PreReleaseVersions.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum BuildsProcessingState: Hashable, Codable, RawRepresentable { - case failed - case invalid - case processing - case valid - case unknown(String) + public struct BuildsBuildAudienceType: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var appStoreEligible: Self { + .init(rawValue: "APP_STORE_ELIGIBLE") + } + + public static var internalOnly: Self { + .init(rawValue: "INTERNAL_ONLY") + } - public var rawValue: String { - switch self { - case .failed: return "FAILED" - case .invalid: return "INVALID" - case .processing: return "PROCESSING" - case .valid: return "VALID" - case .unknown(let rawValue): return rawValue - } + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "FAILED": self = .failed - case "INVALID": self = .invalid - case "PROCESSING": self = .processing - case "VALID": self = .valid - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum Platform: Hashable, Codable, RawRepresentable { - case iOS - case macOS - case tvOS - case unknown(String) + public struct BuildsProcessingState: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var failed: Self { + .init(rawValue: "FAILED") + } + + public static var invalid: Self { + .init(rawValue: "INVALID") + } - public var rawValue: String { - switch self { - case .iOS: return "IOS" - case .macOS: return "MAC_OS" - case .tvOS: return "TV_OS" - case .unknown(let rawValue): return rawValue - } + public static var processing: Self { + .init(rawValue: "PROCESSING") } + public static var valid: Self { + .init(rawValue: "VALID") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "IOS": self = .iOS - case "MAC_OS": self = .macOS - case "TV_OS": self = .tvOS - default: self = .unknown(rawValue) - } + self.rawValue = rawValue + } + } + + public struct Platform: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var iOS: Self { + .init(rawValue: "IOS") + } + + public static var macOS: Self { + .init(rawValue: "MAC_OS") + } + + public static var tvOS: Self { + .init(rawValue: "TV_OS") + } + + public static var visionOS: Self { + .init(rawValue: "VISION_OS") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue } } @@ -467,6 +588,11 @@ extension V1.PreReleaseVersions.GET { .init(key: "filter[app]") } + /// filter by attribute 'builds.buildAudienceType' + public static var buildsBuildAudienceType: Relation<[BuildsBuildAudienceType]?> { + .init(key: "filter[builds.buildAudienceType]") + } + /// filter by attribute 'builds.expired' public static var buildsExpired: Relation<[String]?> { .init(key: "filter[builds.expired]") @@ -505,25 +631,23 @@ extension V1.PreReleaseVersions.GET { } } - public enum Include: Hashable, Codable, RawRepresentable { - case app - case builds - case unknown(String) + public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var app: Self { + .init(rawValue: "app") + } - public var rawValue: String { - switch self { - case .app: return "app" - case .builds: return "builds" - case .unknown(let rawValue): return rawValue - } + public static var builds: Self { + .init(rawValue: "builds") + } + + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "app": self = .app - case "builds": self = .builds - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } @@ -554,25 +678,23 @@ extension V1.PreReleaseVersions.GET { } } - public enum Sort: Hashable, Codable, RawRepresentable { - case version - case versionDesc - case unknown(String) + public struct Sort: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var version: Self { + .init(rawValue: "version") + } - public var rawValue: String { - switch self { - case .version: return "version" - case .versionDesc: return "-version" - case .unknown(let rawValue): return rawValue - } + public static var versionDesc: Self { + .init(rawValue: "-version") + } + + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "version": self = .version - case "-version": self = .versionDesc - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Profiles/ById/BundleId/ProfilesByIdBundleId.GET.df3df84.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Profiles/ById/BundleId/ProfilesByIdBundleId.GET.df3df84.generated.swift index 29f228e9..d89190d6 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Profiles/ById/BundleId/ProfilesByIdBundleId.GET.df3df84.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Profiles/ById/BundleId/ProfilesByIdBundleId.GET.df3df84.generated.swift @@ -42,8 +42,10 @@ extension V1.Profiles.ById.BundleId { /// - Returns: **200**, Single BundleId with get as `BundleIdWithoutIncludesResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -57,12 +59,18 @@ extension V1.Profiles.ById.BundleId { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 404: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -82,40 +90,43 @@ extension V1.Profiles.ById.BundleId.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum BundleIds: Hashable, Codable, RawRepresentable { - case app - case bundleIdCapabilities - case identifier - case name - case platform - case profiles - case seedId - case unknown(String) - - public var rawValue: String { - switch self { - case .app: return "app" - case .bundleIdCapabilities: return "bundleIdCapabilities" - case .identifier: return "identifier" - case .name: return "name" - case .platform: return "platform" - case .profiles: return "profiles" - case .seedId: return "seedId" - case .unknown(let rawValue): return rawValue - } + public struct BundleIds: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var app: Self { + .init(rawValue: "app") + } + + public static var bundleIdCapabilities: Self { + .init(rawValue: "bundleIdCapabilities") + } + + public static var identifier: Self { + .init(rawValue: "identifier") + } + + public static var name: Self { + .init(rawValue: "name") } + public static var platform: Self { + .init(rawValue: "platform") + } + + public static var profiles: Self { + .init(rawValue: "profiles") + } + + public static var seedId: Self { + .init(rawValue: "seedId") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "app": self = .app - case "bundleIdCapabilities": self = .bundleIdCapabilities - case "identifier": self = .identifier - case "name": self = .name - case "platform": self = .platform - case "profiles": self = .profiles - case "seedId": self = .seedId - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Profiles/ById/Certificates/ProfilesByIdCertificates.GET.4aba5e8.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Profiles/ById/Certificates/ProfilesByIdCertificates.GET.4aba5e8.generated.swift index de69379f..ed471a9c 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Profiles/ById/Certificates/ProfilesByIdCertificates.GET.4aba5e8.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Profiles/ById/Certificates/ProfilesByIdCertificates.GET.4aba5e8.generated.swift @@ -44,8 +44,10 @@ extension V1.Profiles.ById.Certificates { /// - Returns: **200**, List of Certificates with get as `CertificatesWithoutIncludesResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -59,12 +61,18 @@ extension V1.Profiles.ById.Certificates { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 404: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -87,43 +95,51 @@ extension V1.Profiles.ById.Certificates.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum Certificates: Hashable, Codable, RawRepresentable { - case certificateContent - case certificateType - case csrContent - case displayName - case expirationDate - case name - case platform - case serialNumber - case unknown(String) - - public var rawValue: String { - switch self { - case .certificateContent: return "certificateContent" - case .certificateType: return "certificateType" - case .csrContent: return "csrContent" - case .displayName: return "displayName" - case .expirationDate: return "expirationDate" - case .name: return "name" - case .platform: return "platform" - case .serialNumber: return "serialNumber" - case .unknown(let rawValue): return rawValue - } + public struct Certificates: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var activated: Self { + .init(rawValue: "activated") + } + + public static var certificateContent: Self { + .init(rawValue: "certificateContent") + } + + public static var certificateType: Self { + .init(rawValue: "certificateType") + } + + public static var displayName: Self { + .init(rawValue: "displayName") + } + + public static var expirationDate: Self { + .init(rawValue: "expirationDate") } + public static var name: Self { + .init(rawValue: "name") + } + + public static var passTypeId: Self { + .init(rawValue: "passTypeId") + } + + public static var platform: Self { + .init(rawValue: "platform") + } + + public static var serialNumber: Self { + .init(rawValue: "serialNumber") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "certificateContent": self = .certificateContent - case "certificateType": self = .certificateType - case "csrContent": self = .csrContent - case "displayName": self = .displayName - case "expirationDate": self = .expirationDate - case "name": self = .name - case "platform": self = .platform - case "serialNumber": self = .serialNumber - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Profiles/ById/Devices/ProfilesByIdDevices.GET.f79fc7a.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Profiles/ById/Devices/ProfilesByIdDevices.GET.f79fc7a.generated.swift index 4b08f52a..ee57f97f 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Profiles/ById/Devices/ProfilesByIdDevices.GET.f79fc7a.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Profiles/ById/Devices/ProfilesByIdDevices.GET.f79fc7a.generated.swift @@ -44,8 +44,10 @@ extension V1.Profiles.ById.Devices { /// - Returns: **200**, List of Devices with get as `DevicesWithoutIncludesResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -59,12 +61,18 @@ extension V1.Profiles.ById.Devices { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 404: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -87,40 +95,43 @@ extension V1.Profiles.ById.Devices.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum Devices: Hashable, Codable, RawRepresentable { - case addedDate - case deviceClass - case model - case name - case platform - case status - case udid - case unknown(String) - - public var rawValue: String { - switch self { - case .addedDate: return "addedDate" - case .deviceClass: return "deviceClass" - case .model: return "model" - case .name: return "name" - case .platform: return "platform" - case .status: return "status" - case .udid: return "udid" - case .unknown(let rawValue): return rawValue - } + public struct Devices: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var addedDate: Self { + .init(rawValue: "addedDate") + } + + public static var deviceClass: Self { + .init(rawValue: "deviceClass") + } + + public static var model: Self { + .init(rawValue: "model") + } + + public static var name: Self { + .init(rawValue: "name") } + public static var platform: Self { + .init(rawValue: "platform") + } + + public static var status: Self { + .init(rawValue: "status") + } + + public static var udid: Self { + .init(rawValue: "udid") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "addedDate": self = .addedDate - case "deviceClass": self = .deviceClass - case "model": self = .model - case "name": self = .name - case "platform": self = .platform - case "status": self = .status - case "udid": self = .udid - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Profiles/ById/ProfilesById.DELETE.4f505d4.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Profiles/ById/ProfilesById.DELETE.4f505d4.generated.swift index 517d588f..5c3e155a 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Profiles/ById/ProfilesById.DELETE.4f505d4.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Profiles/ById/ProfilesById.DELETE.4f505d4.generated.swift @@ -31,11 +31,12 @@ extension V1.Profiles.ById { return urlRequest } - /// - Returns: **204**, Success (no content) /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -43,12 +44,12 @@ extension V1.Profiles.ById { } switch urlResponse.statusCode { - case 204: - return - case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) @@ -58,6 +59,9 @@ extension V1.Profiles.ById { case 409: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Profiles/ById/ProfilesById.GET.4f505d4.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Profiles/ById/ProfilesById.GET.4f505d4.generated.swift index a7e06c92..691bfa14 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Profiles/ById/ProfilesById.GET.4f505d4.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Profiles/ById/ProfilesById.GET.4f505d4.generated.swift @@ -54,8 +54,10 @@ extension V1.Profiles.ById { /// - Returns: **200**, Single Profile as `ProfileResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -69,12 +71,18 @@ extension V1.Profiles.ById { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 404: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -99,166 +107,187 @@ extension V1.Profiles.ById.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum BundleIds: Hashable, Codable, RawRepresentable { - case app - case bundleIdCapabilities - case identifier - case name - case platform - case profiles - case seedId - case unknown(String) - - public var rawValue: String { - switch self { - case .app: return "app" - case .bundleIdCapabilities: return "bundleIdCapabilities" - case .identifier: return "identifier" - case .name: return "name" - case .platform: return "platform" - case .profiles: return "profiles" - case .seedId: return "seedId" - case .unknown(let rawValue): return rawValue - } + public struct BundleIds: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var app: Self { + .init(rawValue: "app") + } + + public static var bundleIdCapabilities: Self { + .init(rawValue: "bundleIdCapabilities") } + public static var identifier: Self { + .init(rawValue: "identifier") + } + + public static var name: Self { + .init(rawValue: "name") + } + + public static var platform: Self { + .init(rawValue: "platform") + } + + public static var profiles: Self { + .init(rawValue: "profiles") + } + + public static var seedId: Self { + .init(rawValue: "seedId") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "app": self = .app - case "bundleIdCapabilities": self = .bundleIdCapabilities - case "identifier": self = .identifier - case "name": self = .name - case "platform": self = .platform - case "profiles": self = .profiles - case "seedId": self = .seedId - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum Certificates: Hashable, Codable, RawRepresentable { - case certificateContent - case certificateType - case csrContent - case displayName - case expirationDate - case name - case platform - case serialNumber - case unknown(String) - - public var rawValue: String { - switch self { - case .certificateContent: return "certificateContent" - case .certificateType: return "certificateType" - case .csrContent: return "csrContent" - case .displayName: return "displayName" - case .expirationDate: return "expirationDate" - case .name: return "name" - case .platform: return "platform" - case .serialNumber: return "serialNumber" - case .unknown(let rawValue): return rawValue - } + public struct Certificates: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var activated: Self { + .init(rawValue: "activated") + } + + public static var certificateContent: Self { + .init(rawValue: "certificateContent") } + public static var certificateType: Self { + .init(rawValue: "certificateType") + } + + public static var displayName: Self { + .init(rawValue: "displayName") + } + + public static var expirationDate: Self { + .init(rawValue: "expirationDate") + } + + public static var name: Self { + .init(rawValue: "name") + } + + public static var passTypeId: Self { + .init(rawValue: "passTypeId") + } + + public static var platform: Self { + .init(rawValue: "platform") + } + + public static var serialNumber: Self { + .init(rawValue: "serialNumber") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "certificateContent": self = .certificateContent - case "certificateType": self = .certificateType - case "csrContent": self = .csrContent - case "displayName": self = .displayName - case "expirationDate": self = .expirationDate - case "name": self = .name - case "platform": self = .platform - case "serialNumber": self = .serialNumber - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum Devices: Hashable, Codable, RawRepresentable { - case addedDate - case deviceClass - case model - case name - case platform - case status - case udid - case unknown(String) - - public var rawValue: String { - switch self { - case .addedDate: return "addedDate" - case .deviceClass: return "deviceClass" - case .model: return "model" - case .name: return "name" - case .platform: return "platform" - case .status: return "status" - case .udid: return "udid" - case .unknown(let rawValue): return rawValue - } + public struct Devices: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var addedDate: Self { + .init(rawValue: "addedDate") + } + + public static var deviceClass: Self { + .init(rawValue: "deviceClass") + } + + public static var model: Self { + .init(rawValue: "model") } + public static var name: Self { + .init(rawValue: "name") + } + + public static var platform: Self { + .init(rawValue: "platform") + } + + public static var status: Self { + .init(rawValue: "status") + } + + public static var udid: Self { + .init(rawValue: "udid") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "addedDate": self = .addedDate - case "deviceClass": self = .deviceClass - case "model": self = .model - case "name": self = .name - case "platform": self = .platform - case "status": self = .status - case "udid": self = .udid - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum Profiles: Hashable, Codable, RawRepresentable { - case bundleId - case certificates - case createdDate - case devices - case expirationDate - case name - case platform - case profileContent - case profileState - case profileType - case uuid - case unknown(String) - - public var rawValue: String { - switch self { - case .bundleId: return "bundleId" - case .certificates: return "certificates" - case .createdDate: return "createdDate" - case .devices: return "devices" - case .expirationDate: return "expirationDate" - case .name: return "name" - case .platform: return "platform" - case .profileContent: return "profileContent" - case .profileState: return "profileState" - case .profileType: return "profileType" - case .uuid: return "uuid" - case .unknown(let rawValue): return rawValue - } + public struct Profiles: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var bundleId: Self { + .init(rawValue: "bundleId") + } + + public static var certificates: Self { + .init(rawValue: "certificates") + } + + public static var createdDate: Self { + .init(rawValue: "createdDate") + } + + public static var devices: Self { + .init(rawValue: "devices") + } + + public static var expirationDate: Self { + .init(rawValue: "expirationDate") + } + + public static var name: Self { + .init(rawValue: "name") } + public static var platform: Self { + .init(rawValue: "platform") + } + + public static var profileContent: Self { + .init(rawValue: "profileContent") + } + + public static var profileState: Self { + .init(rawValue: "profileState") + } + + public static var profileType: Self { + .init(rawValue: "profileType") + } + + public static var uuid: Self { + .init(rawValue: "uuid") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "bundleId": self = .bundleId - case "certificates": self = .certificates - case "createdDate": self = .createdDate - case "devices": self = .devices - case "expirationDate": self = .expirationDate - case "name": self = .name - case "platform": self = .platform - case "profileContent": self = .profileContent - case "profileState": self = .profileState - case "profileType": self = .profileType - case "uuid": self = .uuid - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } @@ -291,28 +320,27 @@ extension V1.Profiles.ById.GET { } } - public enum Include: Hashable, Codable, RawRepresentable { - case bundleId - case certificates - case devices - case unknown(String) + public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var bundleId: Self { + .init(rawValue: "bundleId") + } - public var rawValue: String { - switch self { - case .bundleId: return "bundleId" - case .certificates: return "certificates" - case .devices: return "devices" - case .unknown(let rawValue): return rawValue - } + public static var certificates: Self { + .init(rawValue: "certificates") + } + + public static var devices: Self { + .init(rawValue: "devices") + } + + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "bundleId": self = .bundleId - case "certificates": self = .certificates - case "devices": self = .devices - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Profiles/ById/Relationships/BundleId/ProfilesByIdRelationshipsBundleId.GET.e318143.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Profiles/ById/Relationships/BundleId/ProfilesByIdRelationshipsBundleId.GET.e318143.generated.swift new file mode 100644 index 00000000..1dd6db31 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Profiles/ById/Relationships/BundleId/ProfilesByIdRelationshipsBundleId.GET.e318143.generated.swift @@ -0,0 +1,86 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.Profiles.ById.Relationships.BundleId { + public struct GET: Endpoint { + public typealias Response = ProfileBundleIdLinkageResponse + + public var path: String { + "/v1/profiles/\(id)/relationships/bundleId" + } + + /// the id of the requested resource + public var id: String + + public var parameters: Parameters = Parameters() + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + components?.queryItems = [ + + ].filter { $0.value != nil } + if components?.queryItems?.isEmpty ?? false { + components?.queryItems = nil + } + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "GET" + return urlRequest + } + + /// - Returns: **200**, Related linkage as `ProfileBundleIdLinkageResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(ProfileBundleIdLinkageResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +extension V1.Profiles.ById.Relationships.BundleId.GET { + public struct Parameters: Hashable { + + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Profiles/ById/Relationships/Certificates/ProfilesByIdRelationshipsCertificates.GET.d413fd5.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Profiles/ById/Relationships/Certificates/ProfilesByIdRelationshipsCertificates.GET.d413fd5.generated.swift new file mode 100644 index 00000000..be7fc3fe --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Profiles/ById/Relationships/Certificates/ProfilesByIdRelationshipsCertificates.GET.d413fd5.generated.swift @@ -0,0 +1,88 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.Profiles.ById.Relationships.Certificates { + public struct GET: Endpoint { + public typealias Response = ProfileCertificatesLinkagesResponse + + public var path: String { + "/v1/profiles/\(id)/relationships/certificates" + } + + /// the id of the requested resource + public var id: String + + public var parameters: Parameters = Parameters() + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + components?.queryItems = [ + URLQueryItem(name: "limit", + value: parameters.limit.map { "\($0)" }) + ].filter { $0.value != nil } + if components?.queryItems?.isEmpty ?? false { + components?.queryItems = nil + } + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "GET" + return urlRequest + } + + /// - Returns: **200**, List of related linkages as `ProfileCertificatesLinkagesResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(ProfileCertificatesLinkagesResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +extension V1.Profiles.ById.Relationships.Certificates.GET { + public struct Parameters: Hashable { + /// maximum resources per page + public var limit: Int? + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Profiles/ById/Relationships/Devices/ProfilesByIdRelationshipsDevices.GET.939dcf5.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Profiles/ById/Relationships/Devices/ProfilesByIdRelationshipsDevices.GET.939dcf5.generated.swift new file mode 100644 index 00000000..75450a49 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Profiles/ById/Relationships/Devices/ProfilesByIdRelationshipsDevices.GET.939dcf5.generated.swift @@ -0,0 +1,88 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.Profiles.ById.Relationships.Devices { + public struct GET: Endpoint { + public typealias Response = ProfileDevicesLinkagesResponse + + public var path: String { + "/v1/profiles/\(id)/relationships/devices" + } + + /// the id of the requested resource + public var id: String + + public var parameters: Parameters = Parameters() + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + components?.queryItems = [ + URLQueryItem(name: "limit", + value: parameters.limit.map { "\($0)" }) + ].filter { $0.value != nil } + if components?.queryItems?.isEmpty ?? false { + components?.queryItems = nil + } + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "GET" + return urlRequest + } + + /// - Returns: **200**, List of related linkages as `ProfileDevicesLinkagesResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(ProfileDevicesLinkagesResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +extension V1.Profiles.ById.Relationships.Devices.GET { + public struct Parameters: Hashable { + /// maximum resources per page + public var limit: Int? + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Profiles/Profiles.GET.d776efa.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Profiles/Profiles.GET.d776efa.generated.swift index c992ca2d..b857cd79 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Profiles/Profiles.GET.d776efa.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Profiles/Profiles.GET.d776efa.generated.swift @@ -63,7 +63,9 @@ extension V1.Profiles { /// - Returns: **200**, List of Profiles as `ProfilesResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -77,9 +79,15 @@ extension V1.Profiles { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -110,166 +118,187 @@ extension V1.Profiles.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum BundleIds: Hashable, Codable, RawRepresentable { - case app - case bundleIdCapabilities - case identifier - case name - case platform - case profiles - case seedId - case unknown(String) - - public var rawValue: String { - switch self { - case .app: return "app" - case .bundleIdCapabilities: return "bundleIdCapabilities" - case .identifier: return "identifier" - case .name: return "name" - case .platform: return "platform" - case .profiles: return "profiles" - case .seedId: return "seedId" - case .unknown(let rawValue): return rawValue - } + public struct BundleIds: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var app: Self { + .init(rawValue: "app") + } + + public static var bundleIdCapabilities: Self { + .init(rawValue: "bundleIdCapabilities") + } + + public static var identifier: Self { + .init(rawValue: "identifier") + } + + public static var name: Self { + .init(rawValue: "name") + } + + public static var platform: Self { + .init(rawValue: "platform") + } + + public static var profiles: Self { + .init(rawValue: "profiles") + } + + public static var seedId: Self { + .init(rawValue: "seedId") + } + + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "app": self = .app - case "bundleIdCapabilities": self = .bundleIdCapabilities - case "identifier": self = .identifier - case "name": self = .name - case "platform": self = .platform - case "profiles": self = .profiles - case "seedId": self = .seedId - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum Certificates: Hashable, Codable, RawRepresentable { - case certificateContent - case certificateType - case csrContent - case displayName - case expirationDate - case name - case platform - case serialNumber - case unknown(String) - - public var rawValue: String { - switch self { - case .certificateContent: return "certificateContent" - case .certificateType: return "certificateType" - case .csrContent: return "csrContent" - case .displayName: return "displayName" - case .expirationDate: return "expirationDate" - case .name: return "name" - case .platform: return "platform" - case .serialNumber: return "serialNumber" - case .unknown(let rawValue): return rawValue - } + public struct Certificates: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var activated: Self { + .init(rawValue: "activated") + } + + public static var certificateContent: Self { + .init(rawValue: "certificateContent") + } + + public static var certificateType: Self { + .init(rawValue: "certificateType") + } + + public static var displayName: Self { + .init(rawValue: "displayName") + } + + public static var expirationDate: Self { + .init(rawValue: "expirationDate") + } + + public static var name: Self { + .init(rawValue: "name") + } + + public static var passTypeId: Self { + .init(rawValue: "passTypeId") + } + + public static var platform: Self { + .init(rawValue: "platform") + } + + public static var serialNumber: Self { + .init(rawValue: "serialNumber") + } + + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "certificateContent": self = .certificateContent - case "certificateType": self = .certificateType - case "csrContent": self = .csrContent - case "displayName": self = .displayName - case "expirationDate": self = .expirationDate - case "name": self = .name - case "platform": self = .platform - case "serialNumber": self = .serialNumber - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum Devices: Hashable, Codable, RawRepresentable { - case addedDate - case deviceClass - case model - case name - case platform - case status - case udid - case unknown(String) - - public var rawValue: String { - switch self { - case .addedDate: return "addedDate" - case .deviceClass: return "deviceClass" - case .model: return "model" - case .name: return "name" - case .platform: return "platform" - case .status: return "status" - case .udid: return "udid" - case .unknown(let rawValue): return rawValue - } + public struct Devices: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var addedDate: Self { + .init(rawValue: "addedDate") + } + + public static var deviceClass: Self { + .init(rawValue: "deviceClass") + } + + public static var model: Self { + .init(rawValue: "model") + } + + public static var name: Self { + .init(rawValue: "name") + } + + public static var platform: Self { + .init(rawValue: "platform") + } + + public static var status: Self { + .init(rawValue: "status") + } + + public static var udid: Self { + .init(rawValue: "udid") + } + + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "addedDate": self = .addedDate - case "deviceClass": self = .deviceClass - case "model": self = .model - case "name": self = .name - case "platform": self = .platform - case "status": self = .status - case "udid": self = .udid - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum Profiles: Hashable, Codable, RawRepresentable { - case bundleId - case certificates - case createdDate - case devices - case expirationDate - case name - case platform - case profileContent - case profileState - case profileType - case uuid - case unknown(String) - - public var rawValue: String { - switch self { - case .bundleId: return "bundleId" - case .certificates: return "certificates" - case .createdDate: return "createdDate" - case .devices: return "devices" - case .expirationDate: return "expirationDate" - case .name: return "name" - case .platform: return "platform" - case .profileContent: return "profileContent" - case .profileState: return "profileState" - case .profileType: return "profileType" - case .uuid: return "uuid" - case .unknown(let rawValue): return rawValue - } + public struct Profiles: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var bundleId: Self { + .init(rawValue: "bundleId") + } + + public static var certificates: Self { + .init(rawValue: "certificates") + } + + public static var createdDate: Self { + .init(rawValue: "createdDate") + } + + public static var devices: Self { + .init(rawValue: "devices") + } + + public static var expirationDate: Self { + .init(rawValue: "expirationDate") + } + + public static var name: Self { + .init(rawValue: "name") + } + + public static var platform: Self { + .init(rawValue: "platform") + } + + public static var profileContent: Self { + .init(rawValue: "profileContent") + } + + public static var profileState: Self { + .init(rawValue: "profileState") + } + + public static var profileType: Self { + .init(rawValue: "profileType") + } + + public static var uuid: Self { + .init(rawValue: "uuid") } + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "bundleId": self = .bundleId - case "certificates": self = .certificates - case "createdDate": self = .createdDate - case "devices": self = .devices - case "expirationDate": self = .expirationDate - case "name": self = .name - case "platform": self = .platform - case "profileContent": self = .profileContent - case "profileState": self = .profileState - case "profileType": self = .profileType - case "uuid": self = .uuid - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } @@ -310,83 +339,91 @@ extension V1.Profiles.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum ProfileState: Hashable, Codable, RawRepresentable { - case active - case invalid - case unknown(String) + public struct ProfileState: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var active: Self { + .init(rawValue: "ACTIVE") + } - public var rawValue: String { - switch self { - case .active: return "ACTIVE" - case .invalid: return "INVALID" - case .unknown(let rawValue): return rawValue - } + public static var invalid: Self { + .init(rawValue: "INVALID") } + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "ACTIVE": self = .active - case "INVALID": self = .invalid - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum ProfileType: Hashable, Codable, RawRepresentable { - case iOSAppAdhoc - case iOSAppDevelopment - case iOSAppInhouse - case iOSAppStore - case macAppDevelopment - case macAppDirect - case macAppStore - case macCatalystAppDevelopment - case macCatalystAppDirect - case macCatalystAppStore - case tvOSAppAdhoc - case tvOSAppDevelopment - case tvOSAppInhouse - case tvOSAppStore - case unknown(String) - - public var rawValue: String { - switch self { - case .iOSAppAdhoc: return "IOS_APP_ADHOC" - case .iOSAppDevelopment: return "IOS_APP_DEVELOPMENT" - case .iOSAppInhouse: return "IOS_APP_INHOUSE" - case .iOSAppStore: return "IOS_APP_STORE" - case .macAppDevelopment: return "MAC_APP_DEVELOPMENT" - case .macAppDirect: return "MAC_APP_DIRECT" - case .macAppStore: return "MAC_APP_STORE" - case .macCatalystAppDevelopment: return "MAC_CATALYST_APP_DEVELOPMENT" - case .macCatalystAppDirect: return "MAC_CATALYST_APP_DIRECT" - case .macCatalystAppStore: return "MAC_CATALYST_APP_STORE" - case .tvOSAppAdhoc: return "TVOS_APP_ADHOC" - case .tvOSAppDevelopment: return "TVOS_APP_DEVELOPMENT" - case .tvOSAppInhouse: return "TVOS_APP_INHOUSE" - case .tvOSAppStore: return "TVOS_APP_STORE" - case .unknown(let rawValue): return rawValue - } + public struct ProfileType: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var iOSAppAdhoc: Self { + .init(rawValue: "IOS_APP_ADHOC") + } + + public static var iOSAppDevelopment: Self { + .init(rawValue: "IOS_APP_DEVELOPMENT") + } + + public static var iOSAppInhouse: Self { + .init(rawValue: "IOS_APP_INHOUSE") + } + + public static var iOSAppStore: Self { + .init(rawValue: "IOS_APP_STORE") + } + + public static var macAppDevelopment: Self { + .init(rawValue: "MAC_APP_DEVELOPMENT") + } + + public static var macAppDirect: Self { + .init(rawValue: "MAC_APP_DIRECT") + } + + public static var macAppStore: Self { + .init(rawValue: "MAC_APP_STORE") + } + + public static var macCatalystAppDevelopment: Self { + .init(rawValue: "MAC_CATALYST_APP_DEVELOPMENT") + } + + public static var macCatalystAppDirect: Self { + .init(rawValue: "MAC_CATALYST_APP_DIRECT") + } + + public static var macCatalystAppStore: Self { + .init(rawValue: "MAC_CATALYST_APP_STORE") + } + + public static var tvOSAppAdhoc: Self { + .init(rawValue: "TVOS_APP_ADHOC") + } + + public static var tvOSAppDevelopment: Self { + .init(rawValue: "TVOS_APP_DEVELOPMENT") } + public static var tvOSAppInhouse: Self { + .init(rawValue: "TVOS_APP_INHOUSE") + } + + public static var tvOSAppStore: Self { + .init(rawValue: "TVOS_APP_STORE") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "IOS_APP_ADHOC": self = .iOSAppAdhoc - case "IOS_APP_DEVELOPMENT": self = .iOSAppDevelopment - case "IOS_APP_INHOUSE": self = .iOSAppInhouse - case "IOS_APP_STORE": self = .iOSAppStore - case "MAC_APP_DEVELOPMENT": self = .macAppDevelopment - case "MAC_APP_DIRECT": self = .macAppDirect - case "MAC_APP_STORE": self = .macAppStore - case "MAC_CATALYST_APP_DEVELOPMENT": self = .macCatalystAppDevelopment - case "MAC_CATALYST_APP_DIRECT": self = .macCatalystAppDirect - case "MAC_CATALYST_APP_STORE": self = .macCatalystAppStore - case "TVOS_APP_ADHOC": self = .tvOSAppAdhoc - case "TVOS_APP_DEVELOPMENT": self = .tvOSAppDevelopment - case "TVOS_APP_INHOUSE": self = .tvOSAppInhouse - case "TVOS_APP_STORE": self = .tvOSAppStore - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } @@ -419,28 +456,27 @@ extension V1.Profiles.GET { } } - public enum Include: Hashable, Codable, RawRepresentable { - case bundleId - case certificates - case devices - case unknown(String) + public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var bundleId: Self { + .init(rawValue: "bundleId") + } - public var rawValue: String { - switch self { - case .bundleId: return "bundleId" - case .certificates: return "certificates" - case .devices: return "devices" - case .unknown(let rawValue): return rawValue - } + public static var certificates: Self { + .init(rawValue: "certificates") } + public static var devices: Self { + .init(rawValue: "devices") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "bundleId": self = .bundleId - case "certificates": self = .certificates - case "devices": self = .devices - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } @@ -476,43 +512,47 @@ extension V1.Profiles.GET { } } - public enum Sort: Hashable, Codable, RawRepresentable { - case id - case idDesc - case name - case nameDesc - case profileState - case profileStateDesc - case profileType - case profileTypeDesc - case unknown(String) - - public var rawValue: String { - switch self { - case .id: return "id" - case .idDesc: return "-id" - case .name: return "name" - case .nameDesc: return "-name" - case .profileState: return "profileState" - case .profileStateDesc: return "-profileState" - case .profileType: return "profileType" - case .profileTypeDesc: return "-profileType" - case .unknown(let rawValue): return rawValue - } + public struct Sort: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var id: Self { + .init(rawValue: "id") + } + + public static var idDesc: Self { + .init(rawValue: "-id") + } + + public static var name: Self { + .init(rawValue: "name") + } + + public static var nameDesc: Self { + .init(rawValue: "-name") + } + + public static var profileState: Self { + .init(rawValue: "profileState") + } + + public static var profileStateDesc: Self { + .init(rawValue: "-profileState") } + public static var profileType: Self { + .init(rawValue: "profileType") + } + + public static var profileTypeDesc: Self { + .init(rawValue: "-profileType") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "id": self = .id - case "-id": self = .idDesc - case "name": self = .name - case "-name": self = .nameDesc - case "profileState": self = .profileState - case "-profileState": self = .profileStateDesc - case "profileType": self = .profileType - case "-profileType": self = .profileTypeDesc - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Profiles/Profiles.POST.d776efa.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Profiles/Profiles.POST.d776efa.generated.swift index 89194480..e1a08bb2 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Profiles/Profiles.POST.d776efa.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Profiles/Profiles.POST.d776efa.generated.swift @@ -41,8 +41,11 @@ extension V1.Profiles { /// - Returns: **201**, Single Profile as `ProfileResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **422**, Unprocessable request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -56,12 +59,21 @@ extension V1.Profiles { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 409: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 422: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/PromotedPurchases/ById/PromotedPurchasesById.DELETE.1e5319f.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/PromotedPurchases/ById/PromotedPurchasesById.DELETE.1e5319f.generated.swift index 65fc91c1..1eb8b3fb 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/PromotedPurchases/ById/PromotedPurchasesById.DELETE.1e5319f.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/PromotedPurchases/ById/PromotedPurchasesById.DELETE.1e5319f.generated.swift @@ -31,11 +31,12 @@ extension V1.PromotedPurchases.ById { return urlRequest } - /// - Returns: **204**, Success (no content) /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -43,12 +44,12 @@ extension V1.PromotedPurchases.ById { } switch urlResponse.statusCode { - case 204: - return - case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) @@ -58,6 +59,9 @@ extension V1.PromotedPurchases.ById { case 409: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/PromotedPurchases/ById/PromotedPurchasesById.GET.1e5319f.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/PromotedPurchases/ById/PromotedPurchasesById.GET.1e5319f.generated.swift index 90a8252e..d754b1fd 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/PromotedPurchases/ById/PromotedPurchasesById.GET.1e5319f.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/PromotedPurchases/ById/PromotedPurchasesById.GET.1e5319f.generated.swift @@ -28,14 +28,10 @@ extension V1.PromotedPurchases.ById { components?.path = path components?.queryItems = [ - URLQueryItem(name: "fields[promotedPurchaseImages]", - value: parameters.fields[.promotedPurchaseImages]?.map { "\($0)" }.joined(separator: ",")), URLQueryItem(name: "fields[promotedPurchases]", value: parameters.fields[.promotedPurchases]?.map { "\($0)" }.joined(separator: ",")), URLQueryItem(name: "include", - value: parameters.include?.map { "\($0)" }.joined(separator: ",")), - URLQueryItem(name: "limit[promotionImages]", - value: parameters.limit[.promotionImages].map { "\($0)" }) + value: parameters.include?.map { "\($0)" }.joined(separator: ",")) ].filter { $0.value != nil } if components?.queryItems?.isEmpty ?? false { components?.queryItems = nil @@ -48,8 +44,10 @@ extension V1.PromotedPurchases.ById { /// - Returns: **200**, Single PromotedPurchase as `PromotedPurchaseResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -63,12 +61,18 @@ extension V1.PromotedPurchases.ById { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 404: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -83,8 +87,6 @@ extension V1.PromotedPurchases.ById.GET { /// comma-separated list of relationships to include public var include: [Include]? - public var limit: Limit = Limit() - public struct Fields: Hashable { public subscript (_ relation: Relation) -> T { get { values[relation]?.base as! T } @@ -93,95 +95,39 @@ extension V1.PromotedPurchases.ById.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum PromotedPurchaseImages: Hashable, Codable, RawRepresentable { - case assetToken - case assetType - case fileName - case fileSize - case imageAsset - case promotedPurchase - case sourceFileChecksum - case state - case uploadOperations - case uploaded - case unknown(String) - - public var rawValue: String { - switch self { - case .assetToken: return "assetToken" - case .assetType: return "assetType" - case .fileName: return "fileName" - case .fileSize: return "fileSize" - case .imageAsset: return "imageAsset" - case .promotedPurchase: return "promotedPurchase" - case .sourceFileChecksum: return "sourceFileChecksum" - case .state: return "state" - case .uploadOperations: return "uploadOperations" - case .uploaded: return "uploaded" - case .unknown(let rawValue): return rawValue - } + public struct PromotedPurchases: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var enabled: Self { + .init(rawValue: "enabled") } - public init(rawValue: String) { - switch rawValue { - case "assetToken": self = .assetToken - case "assetType": self = .assetType - case "fileName": self = .fileName - case "fileSize": self = .fileSize - case "imageAsset": self = .imageAsset - case "promotedPurchase": self = .promotedPurchase - case "sourceFileChecksum": self = .sourceFileChecksum - case "state": self = .state - case "uploadOperations": self = .uploadOperations - case "uploaded": self = .uploaded - default: self = .unknown(rawValue) - } + public static var inAppPurchaseV2: Self { + .init(rawValue: "inAppPurchaseV2") + } + + public static var state: Self { + .init(rawValue: "state") } - } - public enum PromotedPurchases: Hashable, Codable, RawRepresentable { - case app - case enabled - case inAppPurchaseV2 - case promotionImages - case state - case subscription - case visibleForAllUsers - case unknown(String) - - public var rawValue: String { - switch self { - case .app: return "app" - case .enabled: return "enabled" - case .inAppPurchaseV2: return "inAppPurchaseV2" - case .promotionImages: return "promotionImages" - case .state: return "state" - case .subscription: return "subscription" - case .visibleForAllUsers: return "visibleForAllUsers" - case .unknown(let rawValue): return rawValue - } + public static var subscription: Self { + .init(rawValue: "subscription") } + public static var visibleForAllUsers: Self { + .init(rawValue: "visibleForAllUsers") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "app": self = .app - case "enabled": self = .enabled - case "inAppPurchaseV2": self = .inAppPurchaseV2 - case "promotionImages": self = .promotionImages - case "state": self = .state - case "subscription": self = .subscription - case "visibleForAllUsers": self = .visibleForAllUsers - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } public struct Relation: Hashable { - /// the fields to include for returned resources of type promotedPurchaseImages - public static var promotedPurchaseImages: Relation<[PromotedPurchaseImages]?> { - .init(key: "fields[promotedPurchaseImages]") - } - /// the fields to include for returned resources of type promotedPurchases public static var promotedPurchases: Relation<[PromotedPurchases]?> { .init(key: "fields[promotedPurchases]") @@ -195,50 +141,23 @@ extension V1.PromotedPurchases.ById.GET { } } - public enum Include: Hashable, Codable, RawRepresentable { - case inAppPurchaseV2 - case promotionImages - case subscription - case unknown(String) - - public var rawValue: String { - switch self { - case .inAppPurchaseV2: return "inAppPurchaseV2" - case .promotionImages: return "promotionImages" - case .subscription: return "subscription" - case .unknown(let rawValue): return rawValue - } + public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var inAppPurchaseV2: Self { + .init(rawValue: "inAppPurchaseV2") } - public init(rawValue: String) { - switch rawValue { - case "inAppPurchaseV2": self = .inAppPurchaseV2 - case "promotionImages": self = .promotionImages - case "subscription": self = .subscription - default: self = .unknown(rawValue) - } + public static var subscription: Self { + .init(rawValue: "subscription") } - } - public struct Limit: Hashable { - public subscript (_ relation: Relation) -> T { - get { values[relation]?.base as! T } - set { values[relation] = AnyHashable(newValue) } + public var description: String { + rawValue } - private var values: [AnyHashable: AnyHashable] = [:] - - public struct Relation: Hashable { - /// maximum number of related promotionImages returned (when they are included) - public static var promotionImages: Relation { - .init(key: "limit[promotionImages]") - } - - internal let key: String + public var rawValue: String - public func hash(into hasher: inout Hasher) { - hasher.combine(key) - } + public init(rawValue: String) { + self.rawValue = rawValue } } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/PromotedPurchases/ById/PromotedPurchasesById.PATCH.1e5319f.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/PromotedPurchases/ById/PromotedPurchasesById.PATCH.1e5319f.generated.swift index 5dbf5cde..4e9c7ace 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/PromotedPurchases/ById/PromotedPurchasesById.PATCH.1e5319f.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/PromotedPurchases/ById/PromotedPurchasesById.PATCH.1e5319f.generated.swift @@ -48,9 +48,12 @@ extension V1.PromotedPurchases.ById { /// - Returns: **200**, Single PromotedPurchase as `PromotedPurchaseResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **422**, Unprocessable request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -64,6 +67,9 @@ extension V1.PromotedPurchases.ById { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) @@ -73,6 +79,12 @@ extension V1.PromotedPurchases.ById { case 409: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 422: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/PromotedPurchases/ById/PromotionImages/PromotedPurchasesByIdPromotionImages.GET.4b831e7.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/PromotedPurchases/ById/PromotionImages/PromotedPurchasesByIdPromotionImages.GET.4b831e7.generated.swift deleted file mode 100644 index 8a217896..00000000 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/PromotedPurchases/ById/PromotionImages/PromotedPurchasesByIdPromotionImages.GET.4b831e7.generated.swift +++ /dev/null @@ -1,220 +0,0 @@ -// autogenerated - -// swiftlint:disable all -import Foundation -#if canImport(FoundationNetworking) -import FoundationNetworking -#endif - -extension V1.PromotedPurchases.ById.PromotionImages { - public struct GET: Endpoint { - public typealias Response = PromotedPurchaseImagesResponse - - public var path: String { - "/v1/promotedPurchases/\(id)/promotionImages" - } - - /// the id of the requested resource - public var id: String - - public var parameters: Parameters = Parameters() - - public init(id: String) { - self.id = id - } - - public func request(with baseURL: URL) throws -> URLRequest? { - var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) - components?.path = path - - components?.queryItems = [ - URLQueryItem(name: "fields[promotedPurchaseImages]", - value: parameters.fields[.promotedPurchaseImages]?.map { "\($0)" }.joined(separator: ",")), - URLQueryItem(name: "fields[promotedPurchases]", - value: parameters.fields[.promotedPurchases]?.map { "\($0)" }.joined(separator: ",")), - URLQueryItem(name: "include", - value: parameters.include?.map { "\($0)" }.joined(separator: ",")), - URLQueryItem(name: "limit", - value: parameters.limit.map { "\($0)" }) - ].filter { $0.value != nil } - if components?.queryItems?.isEmpty ?? false { - components?.queryItems = nil - } - - var urlRequest = components?.url.map { URLRequest(url: $0) } - urlRequest?.httpMethod = "GET" - return urlRequest - } - - /// - Returns: **200**, List of PromotedPurchaseImages as `PromotedPurchaseImagesResponse` - /// - Throws: **400**, Parameter error(s) as `ErrorResponse` - /// - Throws: **403**, Forbidden error as `ErrorResponse` - /// - Throws: **404**, Not found error as `ErrorResponse` - public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { - var jsonDecoder: JSONDecoder { - let decoder = JSONDecoder() - return decoder - } - - switch urlResponse.statusCode { - case 200: - return try jsonDecoder.decode(PromotedPurchaseImagesResponse.self, from: data) - - case 400: - throw try jsonDecoder.decode(ErrorResponse.self, from: data) - - case 403: - throw try jsonDecoder.decode(ErrorResponse.self, from: data) - - case 404: - throw try jsonDecoder.decode(ErrorResponse.self, from: data) - - default: - throw try jsonDecoder.decode(ErrorResponse.self, from: data) - } - } - } -} - -extension V1.PromotedPurchases.ById.PromotionImages.GET { - public struct Parameters: Hashable { - public var fields: Fields = Fields() - - /// comma-separated list of relationships to include - public var include: [Include]? - - /// maximum resources per page - public var limit: Int? - - public struct Fields: Hashable { - public subscript (_ relation: Relation) -> T { - get { values[relation]?.base as! T } - set { values[relation] = AnyHashable(newValue) } - } - - private var values: [AnyHashable: AnyHashable] = [:] - - public enum PromotedPurchaseImages: Hashable, Codable, RawRepresentable { - case assetToken - case assetType - case fileName - case fileSize - case imageAsset - case promotedPurchase - case sourceFileChecksum - case state - case uploadOperations - case uploaded - case unknown(String) - - public var rawValue: String { - switch self { - case .assetToken: return "assetToken" - case .assetType: return "assetType" - case .fileName: return "fileName" - case .fileSize: return "fileSize" - case .imageAsset: return "imageAsset" - case .promotedPurchase: return "promotedPurchase" - case .sourceFileChecksum: return "sourceFileChecksum" - case .state: return "state" - case .uploadOperations: return "uploadOperations" - case .uploaded: return "uploaded" - case .unknown(let rawValue): return rawValue - } - } - - public init(rawValue: String) { - switch rawValue { - case "assetToken": self = .assetToken - case "assetType": self = .assetType - case "fileName": self = .fileName - case "fileSize": self = .fileSize - case "imageAsset": self = .imageAsset - case "promotedPurchase": self = .promotedPurchase - case "sourceFileChecksum": self = .sourceFileChecksum - case "state": self = .state - case "uploadOperations": self = .uploadOperations - case "uploaded": self = .uploaded - default: self = .unknown(rawValue) - } - } - } - - public enum PromotedPurchases: Hashable, Codable, RawRepresentable { - case app - case enabled - case inAppPurchaseV2 - case promotionImages - case state - case subscription - case visibleForAllUsers - case unknown(String) - - public var rawValue: String { - switch self { - case .app: return "app" - case .enabled: return "enabled" - case .inAppPurchaseV2: return "inAppPurchaseV2" - case .promotionImages: return "promotionImages" - case .state: return "state" - case .subscription: return "subscription" - case .visibleForAllUsers: return "visibleForAllUsers" - case .unknown(let rawValue): return rawValue - } - } - - public init(rawValue: String) { - switch rawValue { - case "app": self = .app - case "enabled": self = .enabled - case "inAppPurchaseV2": self = .inAppPurchaseV2 - case "promotionImages": self = .promotionImages - case "state": self = .state - case "subscription": self = .subscription - case "visibleForAllUsers": self = .visibleForAllUsers - default: self = .unknown(rawValue) - } - } - } - - public struct Relation: Hashable { - /// the fields to include for returned resources of type promotedPurchaseImages - public static var promotedPurchaseImages: Relation<[PromotedPurchaseImages]?> { - .init(key: "fields[promotedPurchaseImages]") - } - - /// the fields to include for returned resources of type promotedPurchases - public static var promotedPurchases: Relation<[PromotedPurchases]?> { - .init(key: "fields[promotedPurchases]") - } - - internal let key: String - - public func hash(into hasher: inout Hasher) { - hasher.combine(key) - } - } - } - - public enum Include: Hashable, Codable, RawRepresentable { - case promotedPurchase - case unknown(String) - - public var rawValue: String { - switch self { - case .promotedPurchase: return "promotedPurchase" - case .unknown(let rawValue): return rawValue - } - } - - public init(rawValue: String) { - switch rawValue { - case "promotedPurchase": self = .promotedPurchase - default: self = .unknown(rawValue) - } - } - } - } -} - -// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/PromotedPurchases/PromotedPurchases.POST.f9a8746.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/PromotedPurchases/PromotedPurchases.POST.f9a8746.generated.swift index 0b1486e2..08e4c9eb 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/PromotedPurchases/PromotedPurchases.POST.f9a8746.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/PromotedPurchases/PromotedPurchases.POST.f9a8746.generated.swift @@ -41,8 +41,11 @@ extension V1.PromotedPurchases { /// - Returns: **201**, Single PromotedPurchase as `PromotedPurchaseResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **422**, Unprocessable request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -56,12 +59,21 @@ extension V1.PromotedPurchases { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 409: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 422: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/ReviewSubmissionItems/ById/ReviewSubmissionItemsById.DELETE.32784e2.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/ReviewSubmissionItems/ById/ReviewSubmissionItemsById.DELETE.32784e2.generated.swift index 15fd1b62..19536c52 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/ReviewSubmissionItems/ById/ReviewSubmissionItemsById.DELETE.32784e2.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/ReviewSubmissionItems/ById/ReviewSubmissionItemsById.DELETE.32784e2.generated.swift @@ -31,11 +31,12 @@ extension V1.ReviewSubmissionItems.ById { return urlRequest } - /// - Returns: **204**, Success (no content) /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -43,12 +44,12 @@ extension V1.ReviewSubmissionItems.ById { } switch urlResponse.statusCode { - case 204: - return - case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) @@ -58,6 +59,9 @@ extension V1.ReviewSubmissionItems.ById { case 409: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/ReviewSubmissionItems/ById/ReviewSubmissionItemsById.PATCH.32784e2.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/ReviewSubmissionItems/ById/ReviewSubmissionItemsById.PATCH.32784e2.generated.swift index 4050e5ed..6a6e148c 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/ReviewSubmissionItems/ById/ReviewSubmissionItemsById.PATCH.32784e2.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/ReviewSubmissionItems/ById/ReviewSubmissionItemsById.PATCH.32784e2.generated.swift @@ -48,9 +48,12 @@ extension V1.ReviewSubmissionItems.ById { /// - Returns: **200**, Single ReviewSubmissionItem as `ReviewSubmissionItemResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **422**, Unprocessable request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -64,6 +67,9 @@ extension V1.ReviewSubmissionItems.ById { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) @@ -73,6 +79,12 @@ extension V1.ReviewSubmissionItems.ById { case 409: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 422: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/ReviewSubmissionItems/ReviewSubmissionItems.POST.2be26fe.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/ReviewSubmissionItems/ReviewSubmissionItems.POST.2be26fe.generated.swift index d6bd3e6e..16d17ed2 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/ReviewSubmissionItems/ReviewSubmissionItems.POST.2be26fe.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/ReviewSubmissionItems/ReviewSubmissionItems.POST.2be26fe.generated.swift @@ -41,8 +41,11 @@ extension V1.ReviewSubmissionItems { /// - Returns: **201**, Single ReviewSubmissionItem as `ReviewSubmissionItemResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **422**, Unprocessable request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -56,12 +59,21 @@ extension V1.ReviewSubmissionItems { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 409: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 422: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/ReviewSubmissions/ById/Items/ReviewSubmissionsByIdItems.GET.82e114e.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/ReviewSubmissions/ById/Items/ReviewSubmissionsByIdItems.GET.82e114e.generated.swift index b40b9e00..f8a9d83f 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/ReviewSubmissions/ById/Items/ReviewSubmissionsByIdItems.GET.82e114e.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/ReviewSubmissions/ById/Items/ReviewSubmissionsByIdItems.GET.82e114e.generated.swift @@ -54,8 +54,10 @@ extension V1.ReviewSubmissions.ById.Items { /// - Returns: **200**, List of ReviewSubmissionItems as `ReviewSubmissionItemsResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -69,12 +71,18 @@ extension V1.ReviewSubmissions.ById.Items { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 404: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -100,257 +108,299 @@ extension V1.ReviewSubmissions.ById.Items.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum AppCustomProductPageVersions: Hashable, Codable, RawRepresentable { - case appCustomProductPage - case appCustomProductPageLocalizations - case state - case version - case unknown(String) + public struct AppCustomProductPageVersions: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var appCustomProductPage: Self { + .init(rawValue: "appCustomProductPage") + } + + public static var appCustomProductPageLocalizations: Self { + .init(rawValue: "appCustomProductPageLocalizations") + } + + public static var deepLink: Self { + .init(rawValue: "deepLink") + } + + public static var state: Self { + .init(rawValue: "state") + } - public var rawValue: String { - switch self { - case .appCustomProductPage: return "appCustomProductPage" - case .appCustomProductPageLocalizations: return "appCustomProductPageLocalizations" - case .state: return "state" - case .version: return "version" - case .unknown(let rawValue): return rawValue - } + public static var version: Self { + .init(rawValue: "version") } + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "appCustomProductPage": self = .appCustomProductPage - case "appCustomProductPageLocalizations": self = .appCustomProductPageLocalizations - case "state": self = .state - case "version": self = .version - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum AppEvents: Hashable, Codable, RawRepresentable { - case app - case archivedTerritorySchedules - case badge - case deepLink - case eventState - case localizations - case primaryLocale - case priority - case purchaseRequirement - case purpose - case referenceName - case territorySchedules - case unknown(String) - - public var rawValue: String { - switch self { - case .app: return "app" - case .archivedTerritorySchedules: return "archivedTerritorySchedules" - case .badge: return "badge" - case .deepLink: return "deepLink" - case .eventState: return "eventState" - case .localizations: return "localizations" - case .primaryLocale: return "primaryLocale" - case .priority: return "priority" - case .purchaseRequirement: return "purchaseRequirement" - case .purpose: return "purpose" - case .referenceName: return "referenceName" - case .territorySchedules: return "territorySchedules" - case .unknown(let rawValue): return rawValue - } + public struct AppEvents: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var archivedTerritorySchedules: Self { + .init(rawValue: "archivedTerritorySchedules") + } + + public static var badge: Self { + .init(rawValue: "badge") + } + + public static var deepLink: Self { + .init(rawValue: "deepLink") + } + + public static var eventState: Self { + .init(rawValue: "eventState") + } + + public static var localizations: Self { + .init(rawValue: "localizations") + } + + public static var primaryLocale: Self { + .init(rawValue: "primaryLocale") + } + + public static var priority: Self { + .init(rawValue: "priority") + } + + public static var purchaseRequirement: Self { + .init(rawValue: "purchaseRequirement") + } + + public static var purpose: Self { + .init(rawValue: "purpose") + } + + public static var referenceName: Self { + .init(rawValue: "referenceName") + } + + public static var territorySchedules: Self { + .init(rawValue: "territorySchedules") + } + + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "app": self = .app - case "archivedTerritorySchedules": self = .archivedTerritorySchedules - case "badge": self = .badge - case "deepLink": self = .deepLink - case "eventState": self = .eventState - case "localizations": self = .localizations - case "primaryLocale": self = .primaryLocale - case "priority": self = .priority - case "purchaseRequirement": self = .purchaseRequirement - case "purpose": self = .purpose - case "referenceName": self = .referenceName - case "territorySchedules": self = .territorySchedules - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum AppStoreVersionExperiments: Hashable, Codable, RawRepresentable { - case app - case appStoreVersion - case appStoreVersionExperimentTreatments - case controlVersions - case endDate - case latestControlVersion - case name - case platform - case reviewRequired - case startDate - case started - case state - case trafficProportion - case unknown(String) - - public var rawValue: String { - switch self { - case .app: return "app" - case .appStoreVersion: return "appStoreVersion" - case .appStoreVersionExperimentTreatments: return "appStoreVersionExperimentTreatments" - case .controlVersions: return "controlVersions" - case .endDate: return "endDate" - case .latestControlVersion: return "latestControlVersion" - case .name: return "name" - case .platform: return "platform" - case .reviewRequired: return "reviewRequired" - case .startDate: return "startDate" - case .started: return "started" - case .state: return "state" - case .trafficProportion: return "trafficProportion" - case .unknown(let rawValue): return rawValue - } + public struct AppStoreVersionExperiments: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var app: Self { + .init(rawValue: "app") + } + + public static var appStoreVersion: Self { + .init(rawValue: "appStoreVersion") + } + + public static var appStoreVersionExperimentTreatments: Self { + .init(rawValue: "appStoreVersionExperimentTreatments") + } + + public static var controlVersions: Self { + .init(rawValue: "controlVersions") + } + + public static var endDate: Self { + .init(rawValue: "endDate") + } + + public static var latestControlVersion: Self { + .init(rawValue: "latestControlVersion") + } + + public static var name: Self { + .init(rawValue: "name") + } + + public static var platform: Self { + .init(rawValue: "platform") + } + + public static var reviewRequired: Self { + .init(rawValue: "reviewRequired") } + public static var startDate: Self { + .init(rawValue: "startDate") + } + + public static var state: Self { + .init(rawValue: "state") + } + + public static var trafficProportion: Self { + .init(rawValue: "trafficProportion") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "app": self = .app - case "appStoreVersion": self = .appStoreVersion - case "appStoreVersionExperimentTreatments": self = .appStoreVersionExperimentTreatments - case "controlVersions": self = .controlVersions - case "endDate": self = .endDate - case "latestControlVersion": self = .latestControlVersion - case "name": self = .name - case "platform": self = .platform - case "reviewRequired": self = .reviewRequired - case "startDate": self = .startDate - case "started": self = .started - case "state": self = .state - case "trafficProportion": self = .trafficProportion - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum AppStoreVersions: Hashable, Codable, RawRepresentable { - case ageRatingDeclaration - case app - case appClipDefaultExperience - case appStoreReviewDetail - case appStoreState - case appStoreVersionExperiments - case appStoreVersionExperimentsV2 - case appStoreVersionLocalizations - case appStoreVersionPhasedRelease - case appStoreVersionSubmission - case build - case copyright - case createdDate - case customerReviews - case downloadable - case earliestReleaseDate - case platform - case releaseType - case routingAppCoverage - case versionString - case unknown(String) - - public var rawValue: String { - switch self { - case .ageRatingDeclaration: return "ageRatingDeclaration" - case .app: return "app" - case .appClipDefaultExperience: return "appClipDefaultExperience" - case .appStoreReviewDetail: return "appStoreReviewDetail" - case .appStoreState: return "appStoreState" - case .appStoreVersionExperiments: return "appStoreVersionExperiments" - case .appStoreVersionExperimentsV2: return "appStoreVersionExperimentsV2" - case .appStoreVersionLocalizations: return "appStoreVersionLocalizations" - case .appStoreVersionPhasedRelease: return "appStoreVersionPhasedRelease" - case .appStoreVersionSubmission: return "appStoreVersionSubmission" - case .build: return "build" - case .copyright: return "copyright" - case .createdDate: return "createdDate" - case .customerReviews: return "customerReviews" - case .downloadable: return "downloadable" - case .earliestReleaseDate: return "earliestReleaseDate" - case .platform: return "platform" - case .releaseType: return "releaseType" - case .routingAppCoverage: return "routingAppCoverage" - case .versionString: return "versionString" - case .unknown(let rawValue): return rawValue - } + public struct AppStoreVersions: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var ageRatingDeclaration: Self { + .init(rawValue: "ageRatingDeclaration") + } + + public static var alternativeDistributionPackage: Self { + .init(rawValue: "alternativeDistributionPackage") + } + + public static var app: Self { + .init(rawValue: "app") + } + + public static var appClipDefaultExperience: Self { + .init(rawValue: "appClipDefaultExperience") + } + + public static var appStoreReviewDetail: Self { + .init(rawValue: "appStoreReviewDetail") } + public static var appStoreState: Self { + .init(rawValue: "appStoreState") + } + + public static var appStoreVersionExperiments: Self { + .init(rawValue: "appStoreVersionExperiments") + } + + public static var appStoreVersionExperimentsV2: Self { + .init(rawValue: "appStoreVersionExperimentsV2") + } + + public static var appStoreVersionLocalizations: Self { + .init(rawValue: "appStoreVersionLocalizations") + } + + public static var appStoreVersionPhasedRelease: Self { + .init(rawValue: "appStoreVersionPhasedRelease") + } + + public static var appStoreVersionSubmission: Self { + .init(rawValue: "appStoreVersionSubmission") + } + + public static var appVersionState: Self { + .init(rawValue: "appVersionState") + } + + public static var build: Self { + .init(rawValue: "build") + } + + public static var copyright: Self { + .init(rawValue: "copyright") + } + + public static var createdDate: Self { + .init(rawValue: "createdDate") + } + + public static var customerReviews: Self { + .init(rawValue: "customerReviews") + } + + public static var downloadable: Self { + .init(rawValue: "downloadable") + } + + public static var earliestReleaseDate: Self { + .init(rawValue: "earliestReleaseDate") + } + + public static var gameCenterAppVersion: Self { + .init(rawValue: "gameCenterAppVersion") + } + + public static var platform: Self { + .init(rawValue: "platform") + } + + public static var releaseType: Self { + .init(rawValue: "releaseType") + } + + public static var reviewType: Self { + .init(rawValue: "reviewType") + } + + public static var routingAppCoverage: Self { + .init(rawValue: "routingAppCoverage") + } + + public static var usesIdfa: Self { + .init(rawValue: "usesIdfa") + } + + public static var versionString: Self { + .init(rawValue: "versionString") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "ageRatingDeclaration": self = .ageRatingDeclaration - case "app": self = .app - case "appClipDefaultExperience": self = .appClipDefaultExperience - case "appStoreReviewDetail": self = .appStoreReviewDetail - case "appStoreState": self = .appStoreState - case "appStoreVersionExperiments": self = .appStoreVersionExperiments - case "appStoreVersionExperimentsV2": self = .appStoreVersionExperimentsV2 - case "appStoreVersionLocalizations": self = .appStoreVersionLocalizations - case "appStoreVersionPhasedRelease": self = .appStoreVersionPhasedRelease - case "appStoreVersionSubmission": self = .appStoreVersionSubmission - case "build": self = .build - case "copyright": self = .copyright - case "createdDate": self = .createdDate - case "customerReviews": self = .customerReviews - case "downloadable": self = .downloadable - case "earliestReleaseDate": self = .earliestReleaseDate - case "platform": self = .platform - case "releaseType": self = .releaseType - case "routingAppCoverage": self = .routingAppCoverage - case "versionString": self = .versionString - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum ReviewSubmissionItems: Hashable, Codable, RawRepresentable { - case appCustomProductPageVersion - case appEvent - case appStoreVersion - case appStoreVersionExperiment - case appStoreVersionExperimentV2 - case removed - case resolved - case reviewSubmission - case state - case unknown(String) - - public var rawValue: String { - switch self { - case .appCustomProductPageVersion: return "appCustomProductPageVersion" - case .appEvent: return "appEvent" - case .appStoreVersion: return "appStoreVersion" - case .appStoreVersionExperiment: return "appStoreVersionExperiment" - case .appStoreVersionExperimentV2: return "appStoreVersionExperimentV2" - case .removed: return "removed" - case .resolved: return "resolved" - case .reviewSubmission: return "reviewSubmission" - case .state: return "state" - case .unknown(let rawValue): return rawValue - } + public struct ReviewSubmissionItems: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var appCustomProductPageVersion: Self { + .init(rawValue: "appCustomProductPageVersion") + } + + public static var appEvent: Self { + .init(rawValue: "appEvent") + } + + public static var appStoreVersion: Self { + .init(rawValue: "appStoreVersion") + } + + public static var appStoreVersionExperiment: Self { + .init(rawValue: "appStoreVersionExperiment") + } + + public static var appStoreVersionExperimentV2: Self { + .init(rawValue: "appStoreVersionExperimentV2") + } + + public static var state: Self { + .init(rawValue: "state") + } + + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "appCustomProductPageVersion": self = .appCustomProductPageVersion - case "appEvent": self = .appEvent - case "appStoreVersion": self = .appStoreVersion - case "appStoreVersionExperiment": self = .appStoreVersionExperiment - case "appStoreVersionExperimentV2": self = .appStoreVersionExperimentV2 - case "removed": self = .removed - case "resolved": self = .resolved - case "reviewSubmission": self = .reviewSubmission - case "state": self = .state - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } @@ -388,34 +438,35 @@ extension V1.ReviewSubmissions.ById.Items.GET { } } - public enum Include: Hashable, Codable, RawRepresentable { - case appCustomProductPageVersion - case appEvent - case appStoreVersion - case appStoreVersionExperiment - case appStoreVersionExperimentV2 - case unknown(String) - - public var rawValue: String { - switch self { - case .appCustomProductPageVersion: return "appCustomProductPageVersion" - case .appEvent: return "appEvent" - case .appStoreVersion: return "appStoreVersion" - case .appStoreVersionExperiment: return "appStoreVersionExperiment" - case .appStoreVersionExperimentV2: return "appStoreVersionExperimentV2" - case .unknown(let rawValue): return rawValue - } + public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var appCustomProductPageVersion: Self { + .init(rawValue: "appCustomProductPageVersion") + } + + public static var appEvent: Self { + .init(rawValue: "appEvent") + } + + public static var appStoreVersion: Self { + .init(rawValue: "appStoreVersion") } + public static var appStoreVersionExperiment: Self { + .init(rawValue: "appStoreVersionExperiment") + } + + public static var appStoreVersionExperimentV2: Self { + .init(rawValue: "appStoreVersionExperimentV2") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "appCustomProductPageVersion": self = .appCustomProductPageVersion - case "appEvent": self = .appEvent - case "appStoreVersion": self = .appStoreVersion - case "appStoreVersionExperiment": self = .appStoreVersionExperiment - case "appStoreVersionExperimentV2": self = .appStoreVersionExperimentV2 - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/ReviewSubmissions/ById/Relationships/Items/ReviewSubmissionsByIdRelationshipsItems.GET.73ca031.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/ReviewSubmissions/ById/Relationships/Items/ReviewSubmissionsByIdRelationshipsItems.GET.73ca031.generated.swift new file mode 100644 index 00000000..61f38ad0 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/ReviewSubmissions/ById/Relationships/Items/ReviewSubmissionsByIdRelationshipsItems.GET.73ca031.generated.swift @@ -0,0 +1,88 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.ReviewSubmissions.ById.Relationships.Items { + public struct GET: Endpoint { + public typealias Response = ReviewSubmissionItemsLinkagesResponse + + public var path: String { + "/v1/reviewSubmissions/\(id)/relationships/items" + } + + /// the id of the requested resource + public var id: String + + public var parameters: Parameters = Parameters() + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + components?.queryItems = [ + URLQueryItem(name: "limit", + value: parameters.limit.map { "\($0)" }) + ].filter { $0.value != nil } + if components?.queryItems?.isEmpty ?? false { + components?.queryItems = nil + } + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "GET" + return urlRequest + } + + /// - Returns: **200**, List of related linkages as `ReviewSubmissionItemsLinkagesResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(ReviewSubmissionItemsLinkagesResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +extension V1.ReviewSubmissions.ById.Relationships.Items.GET { + public struct Parameters: Hashable { + /// maximum resources per page + public var limit: Int? + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/ReviewSubmissions/ById/ReviewSubmissionsById.GET.1799edb.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/ReviewSubmissions/ById/ReviewSubmissionsById.GET.1799edb.generated.swift index 07e32ee0..f6dc56be 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/ReviewSubmissions/ById/ReviewSubmissionsById.GET.1799edb.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/ReviewSubmissions/ById/ReviewSubmissionsById.GET.1799edb.generated.swift @@ -48,8 +48,10 @@ extension V1.ReviewSubmissions.ById { /// - Returns: **200**, Single ReviewSubmission as `ReviewSubmissionResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -63,12 +65,18 @@ extension V1.ReviewSubmissions.ById { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 404: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -93,92 +101,83 @@ extension V1.ReviewSubmissions.ById.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum ReviewSubmissionItems: Hashable, Codable, RawRepresentable { - case appCustomProductPageVersion - case appEvent - case appStoreVersion - case appStoreVersionExperiment - case appStoreVersionExperimentV2 - case removed - case resolved - case reviewSubmission - case state - case unknown(String) - - public var rawValue: String { - switch self { - case .appCustomProductPageVersion: return "appCustomProductPageVersion" - case .appEvent: return "appEvent" - case .appStoreVersion: return "appStoreVersion" - case .appStoreVersionExperiment: return "appStoreVersionExperiment" - case .appStoreVersionExperimentV2: return "appStoreVersionExperimentV2" - case .removed: return "removed" - case .resolved: return "resolved" - case .reviewSubmission: return "reviewSubmission" - case .state: return "state" - case .unknown(let rawValue): return rawValue - } + public struct ReviewSubmissionItems: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var appCustomProductPageVersion: Self { + .init(rawValue: "appCustomProductPageVersion") + } + + public static var appEvent: Self { + .init(rawValue: "appEvent") + } + + public static var appStoreVersion: Self { + .init(rawValue: "appStoreVersion") + } + + public static var appStoreVersionExperiment: Self { + .init(rawValue: "appStoreVersionExperiment") + } + + public static var appStoreVersionExperimentV2: Self { + .init(rawValue: "appStoreVersionExperimentV2") } + public static var state: Self { + .init(rawValue: "state") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "appCustomProductPageVersion": self = .appCustomProductPageVersion - case "appEvent": self = .appEvent - case "appStoreVersion": self = .appStoreVersion - case "appStoreVersionExperiment": self = .appStoreVersionExperiment - case "appStoreVersionExperimentV2": self = .appStoreVersionExperimentV2 - case "removed": self = .removed - case "resolved": self = .resolved - case "reviewSubmission": self = .reviewSubmission - case "state": self = .state - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum ReviewSubmissions: Hashable, Codable, RawRepresentable { - case app - case appStoreVersionForReview - case canceled - case items - case lastUpdatedByActor - case platform - case state - case submitted - case submittedByActor - case submittedDate - case unknown(String) - - public var rawValue: String { - switch self { - case .app: return "app" - case .appStoreVersionForReview: return "appStoreVersionForReview" - case .canceled: return "canceled" - case .items: return "items" - case .lastUpdatedByActor: return "lastUpdatedByActor" - case .platform: return "platform" - case .state: return "state" - case .submitted: return "submitted" - case .submittedByActor: return "submittedByActor" - case .submittedDate: return "submittedDate" - case .unknown(let rawValue): return rawValue - } + public struct ReviewSubmissions: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var app: Self { + .init(rawValue: "app") + } + + public static var appStoreVersionForReview: Self { + .init(rawValue: "appStoreVersionForReview") + } + + public static var items: Self { + .init(rawValue: "items") } + public static var lastUpdatedByActor: Self { + .init(rawValue: "lastUpdatedByActor") + } + + public static var platform: Self { + .init(rawValue: "platform") + } + + public static var state: Self { + .init(rawValue: "state") + } + + public static var submittedByActor: Self { + .init(rawValue: "submittedByActor") + } + + public static var submittedDate: Self { + .init(rawValue: "submittedDate") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "app": self = .app - case "appStoreVersionForReview": self = .appStoreVersionForReview - case "canceled": self = .canceled - case "items": self = .items - case "lastUpdatedByActor": self = .lastUpdatedByActor - case "platform": self = .platform - case "state": self = .state - case "submitted": self = .submitted - case "submittedByActor": self = .submittedByActor - case "submittedDate": self = .submittedDate - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } @@ -201,34 +200,35 @@ extension V1.ReviewSubmissions.ById.GET { } } - public enum Include: Hashable, Codable, RawRepresentable { - case app - case appStoreVersionForReview - case items - case lastUpdatedByActor - case submittedByActor - case unknown(String) - - public var rawValue: String { - switch self { - case .app: return "app" - case .appStoreVersionForReview: return "appStoreVersionForReview" - case .items: return "items" - case .lastUpdatedByActor: return "lastUpdatedByActor" - case .submittedByActor: return "submittedByActor" - case .unknown(let rawValue): return rawValue - } + public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var app: Self { + .init(rawValue: "app") } + public static var appStoreVersionForReview: Self { + .init(rawValue: "appStoreVersionForReview") + } + + public static var items: Self { + .init(rawValue: "items") + } + + public static var lastUpdatedByActor: Self { + .init(rawValue: "lastUpdatedByActor") + } + + public static var submittedByActor: Self { + .init(rawValue: "submittedByActor") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "app": self = .app - case "appStoreVersionForReview": self = .appStoreVersionForReview - case "items": self = .items - case "lastUpdatedByActor": self = .lastUpdatedByActor - case "submittedByActor": self = .submittedByActor - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/ReviewSubmissions/ById/ReviewSubmissionsById.PATCH.1799edb.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/ReviewSubmissions/ById/ReviewSubmissionsById.PATCH.1799edb.generated.swift index 3fb32d32..0da7363e 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/ReviewSubmissions/ById/ReviewSubmissionsById.PATCH.1799edb.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/ReviewSubmissions/ById/ReviewSubmissionsById.PATCH.1799edb.generated.swift @@ -48,9 +48,12 @@ extension V1.ReviewSubmissions.ById { /// - Returns: **200**, Single ReviewSubmission as `ReviewSubmissionResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **422**, Unprocessable request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -64,6 +67,9 @@ extension V1.ReviewSubmissions.ById { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) @@ -73,6 +79,12 @@ extension V1.ReviewSubmissions.ById { case 409: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 422: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/ReviewSubmissions/ReviewSubmissions.GET.2271ac3.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/ReviewSubmissions/ReviewSubmissions.GET.2271ac3.generated.swift index f4065d4c..d27148c4 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/ReviewSubmissions/ReviewSubmissions.GET.2271ac3.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/ReviewSubmissions/ReviewSubmissions.GET.2271ac3.generated.swift @@ -53,7 +53,9 @@ extension V1.ReviewSubmissions { /// - Returns: **200**, List of ReviewSubmissions as `ReviewSubmissionsResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -67,9 +69,15 @@ extension V1.ReviewSubmissions { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -97,92 +105,83 @@ extension V1.ReviewSubmissions.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum ReviewSubmissionItems: Hashable, Codable, RawRepresentable { - case appCustomProductPageVersion - case appEvent - case appStoreVersion - case appStoreVersionExperiment - case appStoreVersionExperimentV2 - case removed - case resolved - case reviewSubmission - case state - case unknown(String) - - public var rawValue: String { - switch self { - case .appCustomProductPageVersion: return "appCustomProductPageVersion" - case .appEvent: return "appEvent" - case .appStoreVersion: return "appStoreVersion" - case .appStoreVersionExperiment: return "appStoreVersionExperiment" - case .appStoreVersionExperimentV2: return "appStoreVersionExperimentV2" - case .removed: return "removed" - case .resolved: return "resolved" - case .reviewSubmission: return "reviewSubmission" - case .state: return "state" - case .unknown(let rawValue): return rawValue - } + public struct ReviewSubmissionItems: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var appCustomProductPageVersion: Self { + .init(rawValue: "appCustomProductPageVersion") + } + + public static var appEvent: Self { + .init(rawValue: "appEvent") + } + + public static var appStoreVersion: Self { + .init(rawValue: "appStoreVersion") + } + + public static var appStoreVersionExperiment: Self { + .init(rawValue: "appStoreVersionExperiment") + } + + public static var appStoreVersionExperimentV2: Self { + .init(rawValue: "appStoreVersionExperimentV2") + } + + public static var state: Self { + .init(rawValue: "state") } + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "appCustomProductPageVersion": self = .appCustomProductPageVersion - case "appEvent": self = .appEvent - case "appStoreVersion": self = .appStoreVersion - case "appStoreVersionExperiment": self = .appStoreVersionExperiment - case "appStoreVersionExperimentV2": self = .appStoreVersionExperimentV2 - case "removed": self = .removed - case "resolved": self = .resolved - case "reviewSubmission": self = .reviewSubmission - case "state": self = .state - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum ReviewSubmissions: Hashable, Codable, RawRepresentable { - case app - case appStoreVersionForReview - case canceled - case items - case lastUpdatedByActor - case platform - case state - case submitted - case submittedByActor - case submittedDate - case unknown(String) - - public var rawValue: String { - switch self { - case .app: return "app" - case .appStoreVersionForReview: return "appStoreVersionForReview" - case .canceled: return "canceled" - case .items: return "items" - case .lastUpdatedByActor: return "lastUpdatedByActor" - case .platform: return "platform" - case .state: return "state" - case .submitted: return "submitted" - case .submittedByActor: return "submittedByActor" - case .submittedDate: return "submittedDate" - case .unknown(let rawValue): return rawValue - } + public struct ReviewSubmissions: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var app: Self { + .init(rawValue: "app") } + public static var appStoreVersionForReview: Self { + .init(rawValue: "appStoreVersionForReview") + } + + public static var items: Self { + .init(rawValue: "items") + } + + public static var lastUpdatedByActor: Self { + .init(rawValue: "lastUpdatedByActor") + } + + public static var platform: Self { + .init(rawValue: "platform") + } + + public static var state: Self { + .init(rawValue: "state") + } + + public static var submittedByActor: Self { + .init(rawValue: "submittedByActor") + } + + public static var submittedDate: Self { + .init(rawValue: "submittedDate") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "app": self = .app - case "appStoreVersionForReview": self = .appStoreVersionForReview - case "canceled": self = .canceled - case "items": self = .items - case "lastUpdatedByActor": self = .lastUpdatedByActor - case "platform": self = .platform - case "state": self = .state - case "submitted": self = .submitted - case "submittedByActor": self = .submittedByActor - case "submittedDate": self = .submittedDate - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } @@ -213,65 +212,71 @@ extension V1.ReviewSubmissions.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum Platform: Hashable, Codable, RawRepresentable { - case iOS - case macOS - case tvOS - case unknown(String) + public struct Platform: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var iOS: Self { + .init(rawValue: "IOS") + } + + public static var macOS: Self { + .init(rawValue: "MAC_OS") + } - public var rawValue: String { - switch self { - case .iOS: return "IOS" - case .macOS: return "MAC_OS" - case .tvOS: return "TV_OS" - case .unknown(let rawValue): return rawValue - } + public static var tvOS: Self { + .init(rawValue: "TV_OS") } + public static var visionOS: Self { + .init(rawValue: "VISION_OS") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "IOS": self = .iOS - case "MAC_OS": self = .macOS - case "TV_OS": self = .tvOS - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum State: Hashable, Codable, RawRepresentable { - case canceling - case complete - case completing - case inReview - case readyForReview - case unresolvedIssues - case waitingForReview - case unknown(String) - - public var rawValue: String { - switch self { - case .canceling: return "CANCELING" - case .complete: return "COMPLETE" - case .completing: return "COMPLETING" - case .inReview: return "IN_REVIEW" - case .readyForReview: return "READY_FOR_REVIEW" - case .unresolvedIssues: return "UNRESOLVED_ISSUES" - case .waitingForReview: return "WAITING_FOR_REVIEW" - case .unknown(let rawValue): return rawValue - } + public struct State: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var canceling: Self { + .init(rawValue: "CANCELING") + } + + public static var complete: Self { + .init(rawValue: "COMPLETE") } + public static var completing: Self { + .init(rawValue: "COMPLETING") + } + + public static var inReview: Self { + .init(rawValue: "IN_REVIEW") + } + + public static var readyForReview: Self { + .init(rawValue: "READY_FOR_REVIEW") + } + + public static var unresolvedIssues: Self { + .init(rawValue: "UNRESOLVED_ISSUES") + } + + public static var waitingForReview: Self { + .init(rawValue: "WAITING_FOR_REVIEW") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "CANCELING": self = .canceling - case "COMPLETE": self = .complete - case "COMPLETING": self = .completing - case "IN_REVIEW": self = .inReview - case "READY_FOR_REVIEW": self = .readyForReview - case "UNRESOLVED_ISSUES": self = .unresolvedIssues - case "WAITING_FOR_REVIEW": self = .waitingForReview - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } @@ -299,34 +304,35 @@ extension V1.ReviewSubmissions.GET { } } - public enum Include: Hashable, Codable, RawRepresentable { - case app - case appStoreVersionForReview - case items - case lastUpdatedByActor - case submittedByActor - case unknown(String) - - public var rawValue: String { - switch self { - case .app: return "app" - case .appStoreVersionForReview: return "appStoreVersionForReview" - case .items: return "items" - case .lastUpdatedByActor: return "lastUpdatedByActor" - case .submittedByActor: return "submittedByActor" - case .unknown(let rawValue): return rawValue - } + public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var app: Self { + .init(rawValue: "app") + } + + public static var appStoreVersionForReview: Self { + .init(rawValue: "appStoreVersionForReview") + } + + public static var items: Self { + .init(rawValue: "items") } + public static var lastUpdatedByActor: Self { + .init(rawValue: "lastUpdatedByActor") + } + + public static var submittedByActor: Self { + .init(rawValue: "submittedByActor") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "app": self = .app - case "appStoreVersionForReview": self = .appStoreVersionForReview - case "items": self = .items - case "lastUpdatedByActor": self = .lastUpdatedByActor - case "submittedByActor": self = .submittedByActor - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/ReviewSubmissions/ReviewSubmissions.POST.2271ac3.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/ReviewSubmissions/ReviewSubmissions.POST.2271ac3.generated.swift index eceff911..9c703c3d 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/ReviewSubmissions/ReviewSubmissions.POST.2271ac3.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/ReviewSubmissions/ReviewSubmissions.POST.2271ac3.generated.swift @@ -41,8 +41,11 @@ extension V1.ReviewSubmissions { /// - Returns: **201**, Single ReviewSubmission as `ReviewSubmissionResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **422**, Unprocessable request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -56,12 +59,21 @@ extension V1.ReviewSubmissions { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 409: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 422: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/RoutingAppCoverages/ById/RoutingAppCoveragesById.DELETE.2ec2ee8.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/RoutingAppCoverages/ById/RoutingAppCoveragesById.DELETE.2ec2ee8.generated.swift index 3208e9c8..d0a092e2 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/RoutingAppCoverages/ById/RoutingAppCoveragesById.DELETE.2ec2ee8.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/RoutingAppCoverages/ById/RoutingAppCoveragesById.DELETE.2ec2ee8.generated.swift @@ -31,11 +31,12 @@ extension V1.RoutingAppCoverages.ById { return urlRequest } - /// - Returns: **204**, Success (no content) /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -43,12 +44,12 @@ extension V1.RoutingAppCoverages.ById { } switch urlResponse.statusCode { - case 204: - return - case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) @@ -58,6 +59,9 @@ extension V1.RoutingAppCoverages.ById { case 409: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/RoutingAppCoverages/ById/RoutingAppCoveragesById.GET.2ec2ee8.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/RoutingAppCoverages/ById/RoutingAppCoveragesById.GET.2ec2ee8.generated.swift index e2a78338..05fbb257 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/RoutingAppCoverages/ById/RoutingAppCoveragesById.GET.2ec2ee8.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/RoutingAppCoverages/ById/RoutingAppCoveragesById.GET.2ec2ee8.generated.swift @@ -44,8 +44,10 @@ extension V1.RoutingAppCoverages.ById { /// - Returns: **200**, Single RoutingAppCoverage as `RoutingAppCoverageResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -59,12 +61,18 @@ extension V1.RoutingAppCoverages.ById { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 404: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -87,40 +95,39 @@ extension V1.RoutingAppCoverages.ById.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum RoutingAppCoverages: Hashable, Codable, RawRepresentable { - case appStoreVersion - case assetDeliveryState - case fileName - case fileSize - case sourceFileChecksum - case uploadOperations - case uploaded - case unknown(String) - - public var rawValue: String { - switch self { - case .appStoreVersion: return "appStoreVersion" - case .assetDeliveryState: return "assetDeliveryState" - case .fileName: return "fileName" - case .fileSize: return "fileSize" - case .sourceFileChecksum: return "sourceFileChecksum" - case .uploadOperations: return "uploadOperations" - case .uploaded: return "uploaded" - case .unknown(let rawValue): return rawValue - } + public struct RoutingAppCoverages: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var appStoreVersion: Self { + .init(rawValue: "appStoreVersion") + } + + public static var assetDeliveryState: Self { + .init(rawValue: "assetDeliveryState") } + public static var fileName: Self { + .init(rawValue: "fileName") + } + + public static var fileSize: Self { + .init(rawValue: "fileSize") + } + + public static var sourceFileChecksum: Self { + .init(rawValue: "sourceFileChecksum") + } + + public static var uploadOperations: Self { + .init(rawValue: "uploadOperations") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "appStoreVersion": self = .appStoreVersion - case "assetDeliveryState": self = .assetDeliveryState - case "fileName": self = .fileName - case "fileSize": self = .fileSize - case "sourceFileChecksum": self = .sourceFileChecksum - case "uploadOperations": self = .uploadOperations - case "uploaded": self = .uploaded - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } @@ -138,22 +145,19 @@ extension V1.RoutingAppCoverages.ById.GET { } } - public enum Include: Hashable, Codable, RawRepresentable { - case appStoreVersion - case unknown(String) + public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var appStoreVersion: Self { + .init(rawValue: "appStoreVersion") + } - public var rawValue: String { - switch self { - case .appStoreVersion: return "appStoreVersion" - case .unknown(let rawValue): return rawValue - } + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "appStoreVersion": self = .appStoreVersion - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/RoutingAppCoverages/ById/RoutingAppCoveragesById.PATCH.2ec2ee8.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/RoutingAppCoverages/ById/RoutingAppCoveragesById.PATCH.2ec2ee8.generated.swift index e4760544..f9073647 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/RoutingAppCoverages/ById/RoutingAppCoveragesById.PATCH.2ec2ee8.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/RoutingAppCoverages/ById/RoutingAppCoveragesById.PATCH.2ec2ee8.generated.swift @@ -48,9 +48,12 @@ extension V1.RoutingAppCoverages.ById { /// - Returns: **200**, Single RoutingAppCoverage as `RoutingAppCoverageResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **422**, Unprocessable request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -64,6 +67,9 @@ extension V1.RoutingAppCoverages.ById { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) @@ -73,6 +79,12 @@ extension V1.RoutingAppCoverages.ById { case 409: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 422: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/RoutingAppCoverages/RoutingAppCoverages.POST.a3dbf9e.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/RoutingAppCoverages/RoutingAppCoverages.POST.a3dbf9e.generated.swift index f13e3220..47a3e09a 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/RoutingAppCoverages/RoutingAppCoverages.POST.a3dbf9e.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/RoutingAppCoverages/RoutingAppCoverages.POST.a3dbf9e.generated.swift @@ -41,8 +41,11 @@ extension V1.RoutingAppCoverages { /// - Returns: **201**, Single RoutingAppCoverage as `RoutingAppCoverageResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **422**, Unprocessable request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -56,12 +59,21 @@ extension V1.RoutingAppCoverages { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 409: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 422: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/SalesReports/SalesReports.GET.e6b1814.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/SalesReports/SalesReports.GET.e6b1814.generated.swift index 1b60fcc0..030c2ef2 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/SalesReports/SalesReports.GET.e6b1814.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/SalesReports/SalesReports.GET.e6b1814.generated.swift @@ -49,7 +49,9 @@ extension V1.SalesReports { /// - Returns: **200**, List of SalesReports as `Data` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -63,9 +65,15 @@ extension V1.SalesReports { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -85,90 +93,115 @@ extension V1.SalesReports.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum Frequency: Hashable, Codable, RawRepresentable { - case daily - case monthly - case weekly - case yearly - case unknown(String) + public struct Frequency: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var daily: Self { + .init(rawValue: "DAILY") + } + + public static var monthly: Self { + .init(rawValue: "MONTHLY") + } + + public static var weekly: Self { + .init(rawValue: "WEEKLY") + } + + public static var yearly: Self { + .init(rawValue: "YEARLY") + } - public var rawValue: String { - switch self { - case .daily: return "DAILY" - case .monthly: return "MONTHLY" - case .weekly: return "WEEKLY" - case .yearly: return "YEARLY" - case .unknown(let rawValue): return rawValue - } + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "DAILY": self = .daily - case "MONTHLY": self = .monthly - case "WEEKLY": self = .weekly - case "YEARLY": self = .yearly - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum ReportSubType: Hashable, Codable, RawRepresentable { - case detailed - case summary - case unknown(String) + public struct ReportSubType: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var detailed: Self { + .init(rawValue: "DETAILED") + } + + public static var summary: Self { + .init(rawValue: "SUMMARY") + } + + public static var summaryChannel: Self { + .init(rawValue: "SUMMARY_CHANNEL") + } - public var rawValue: String { - switch self { - case .detailed: return "DETAILED" - case .summary: return "SUMMARY" - case .unknown(let rawValue): return rawValue - } + public static var summaryInstallType: Self { + .init(rawValue: "SUMMARY_INSTALL_TYPE") } + public static var summaryTerritory: Self { + .init(rawValue: "SUMMARY_TERRITORY") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "DETAILED": self = .detailed - case "SUMMARY": self = .summary - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum ReportType: Hashable, Codable, RawRepresentable { - case newsstand - case preOrder - case sales - case subscriber - case subscription - case subscriptionEvent - case subscriptionOfferCodeRedemption - case unknown(String) - - public var rawValue: String { - switch self { - case .newsstand: return "NEWSSTAND" - case .preOrder: return "PRE_ORDER" - case .sales: return "SALES" - case .subscriber: return "SUBSCRIBER" - case .subscription: return "SUBSCRIPTION" - case .subscriptionEvent: return "SUBSCRIPTION_EVENT" - case .subscriptionOfferCodeRedemption: return "SUBSCRIPTION_OFFER_CODE_REDEMPTION" - case .unknown(let rawValue): return rawValue - } + public struct ReportType: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var firstAnnual: Self { + .init(rawValue: "FIRST_ANNUAL") } + public static var installs: Self { + .init(rawValue: "INSTALLS") + } + + public static var newsstand: Self { + .init(rawValue: "NEWSSTAND") + } + + public static var preOrder: Self { + .init(rawValue: "PRE_ORDER") + } + + public static var sales: Self { + .init(rawValue: "SALES") + } + + public static var subscriber: Self { + .init(rawValue: "SUBSCRIBER") + } + + public static var subscription: Self { + .init(rawValue: "SUBSCRIPTION") + } + + public static var subscriptionEvent: Self { + .init(rawValue: "SUBSCRIPTION_EVENT") + } + + public static var subscriptionOfferCodeRedemption: Self { + .init(rawValue: "SUBSCRIPTION_OFFER_CODE_REDEMPTION") + } + + public static var winBackEligibility: Self { + .init(rawValue: "WIN_BACK_ELIGIBILITY") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "NEWSSTAND": self = .newsstand - case "PRE_ORDER": self = .preOrder - case "SALES": self = .sales - case "SUBSCRIBER": self = .subscriber - case "SUBSCRIPTION": self = .subscription - case "SUBSCRIPTION_EVENT": self = .subscriptionEvent - case "SUBSCRIPTION_OFFER_CODE_REDEMPTION": self = .subscriptionOfferCodeRedemption - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/ScmGitReferences/ById/ScmGitReferencesById.GET.fed25a4.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/ScmGitReferences/ById/ScmGitReferencesById.GET.fed25a4.generated.swift index 45352736..76c88412 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/ScmGitReferences/ById/ScmGitReferencesById.GET.fed25a4.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/ScmGitReferences/ById/ScmGitReferencesById.GET.fed25a4.generated.swift @@ -44,8 +44,10 @@ extension V1.ScmGitReferences.ById { /// - Returns: **200**, Single ScmGitReference as `ScmGitReferenceResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -59,12 +61,18 @@ extension V1.ScmGitReferences.ById { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 404: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -87,34 +95,35 @@ extension V1.ScmGitReferences.ById.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum ScmGitReferences: Hashable, Codable, RawRepresentable { - case canonicalName - case isDeleted - case kind - case name - case repository - case unknown(String) - - public var rawValue: String { - switch self { - case .canonicalName: return "canonicalName" - case .isDeleted: return "isDeleted" - case .kind: return "kind" - case .name: return "name" - case .repository: return "repository" - case .unknown(let rawValue): return rawValue - } + public struct ScmGitReferences: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var canonicalName: Self { + .init(rawValue: "canonicalName") + } + + public static var isDeleted: Self { + .init(rawValue: "isDeleted") + } + + public static var kind: Self { + .init(rawValue: "kind") + } + + public static var name: Self { + .init(rawValue: "name") } + public static var repository: Self { + .init(rawValue: "repository") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "canonicalName": self = .canonicalName - case "isDeleted": self = .isDeleted - case "kind": self = .kind - case "name": self = .name - case "repository": self = .repository - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } @@ -132,22 +141,19 @@ extension V1.ScmGitReferences.ById.GET { } } - public enum Include: Hashable, Codable, RawRepresentable { - case repository - case unknown(String) + public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var repository: Self { + .init(rawValue: "repository") + } - public var rawValue: String { - switch self { - case .repository: return "repository" - case .unknown(let rawValue): return rawValue - } + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "repository": self = .repository - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/ScmProviders/ById/Relationships/Repositories/ScmProvidersByIdRelationshipsRepositories.GET.f7c37c7.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/ScmProviders/ById/Relationships/Repositories/ScmProvidersByIdRelationshipsRepositories.GET.f7c37c7.generated.swift new file mode 100644 index 00000000..2a500811 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/ScmProviders/ById/Relationships/Repositories/ScmProvidersByIdRelationshipsRepositories.GET.f7c37c7.generated.swift @@ -0,0 +1,88 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.ScmProviders.ById.Relationships.Repositories { + public struct GET: Endpoint { + public typealias Response = ScmProviderRepositoriesLinkagesResponse + + public var path: String { + "/v1/scmProviders/\(id)/relationships/repositories" + } + + /// the id of the requested resource + public var id: String + + public var parameters: Parameters = Parameters() + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + components?.queryItems = [ + URLQueryItem(name: "limit", + value: parameters.limit.map { "\($0)" }) + ].filter { $0.value != nil } + if components?.queryItems?.isEmpty ?? false { + components?.queryItems = nil + } + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "GET" + return urlRequest + } + + /// - Returns: **200**, List of related linkages as `ScmProviderRepositoriesLinkagesResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(ScmProviderRepositoriesLinkagesResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +extension V1.ScmProviders.ById.Relationships.Repositories.GET { + public struct Parameters: Hashable { + /// maximum resources per page + public var limit: Int? + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/ScmProviders/ById/Repositories/ScmProvidersByIdRepositories.GET.d4fa50c.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/ScmProviders/ById/Repositories/ScmProvidersByIdRepositories.GET.d4fa50c.generated.swift index c6a2b8dc..e4349349 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/ScmProviders/ById/Repositories/ScmProvidersByIdRepositories.GET.d4fa50c.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/ScmProviders/ById/Repositories/ScmProvidersByIdRepositories.GET.d4fa50c.generated.swift @@ -52,8 +52,10 @@ extension V1.ScmProviders.ById.Repositories { /// - Returns: **200**, List of ScmRepositories as `ScmRepositoriesResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -67,12 +69,18 @@ extension V1.ScmProviders.ById.Repositories { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 404: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -100,102 +108,107 @@ extension V1.ScmProviders.ById.Repositories.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum ScmGitReferences: Hashable, Codable, RawRepresentable { - case canonicalName - case isDeleted - case kind - case name - case repository - case unknown(String) - - public var rawValue: String { - switch self { - case .canonicalName: return "canonicalName" - case .isDeleted: return "isDeleted" - case .kind: return "kind" - case .name: return "name" - case .repository: return "repository" - case .unknown(let rawValue): return rawValue - } + public struct ScmGitReferences: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var canonicalName: Self { + .init(rawValue: "canonicalName") + } + + public static var isDeleted: Self { + .init(rawValue: "isDeleted") + } + + public static var kind: Self { + .init(rawValue: "kind") + } + + public static var name: Self { + .init(rawValue: "name") + } + + public static var repository: Self { + .init(rawValue: "repository") } + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "canonicalName": self = .canonicalName - case "isDeleted": self = .isDeleted - case "kind": self = .kind - case "name": self = .name - case "repository": self = .repository - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum ScmProviders: Hashable, Codable, RawRepresentable { - case repositories - case scmProviderType - case url - case unknown(String) - - public var rawValue: String { - switch self { - case .repositories: return "repositories" - case .scmProviderType: return "scmProviderType" - case .url: return "url" - case .unknown(let rawValue): return rawValue - } + public struct ScmProviders: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var repositories: Self { + .init(rawValue: "repositories") + } + + public static var scmProviderType: Self { + .init(rawValue: "scmProviderType") + } + + public static var url: Self { + .init(rawValue: "url") + } + + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "repositories": self = .repositories - case "scmProviderType": self = .scmProviderType - case "url": self = .url - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum ScmRepositories: Hashable, Codable, RawRepresentable { - case defaultBranch - case gitReferences - case httpCloneUrl - case lastAccessedDate - case ownerName - case pullRequests - case repositoryName - case scmProvider - case sshCloneUrl - case unknown(String) - - public var rawValue: String { - switch self { - case .defaultBranch: return "defaultBranch" - case .gitReferences: return "gitReferences" - case .httpCloneUrl: return "httpCloneUrl" - case .lastAccessedDate: return "lastAccessedDate" - case .ownerName: return "ownerName" - case .pullRequests: return "pullRequests" - case .repositoryName: return "repositoryName" - case .scmProvider: return "scmProvider" - case .sshCloneUrl: return "sshCloneUrl" - case .unknown(let rawValue): return rawValue - } + public struct ScmRepositories: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var defaultBranch: Self { + .init(rawValue: "defaultBranch") + } + + public static var gitReferences: Self { + .init(rawValue: "gitReferences") } + public static var httpCloneUrl: Self { + .init(rawValue: "httpCloneUrl") + } + + public static var lastAccessedDate: Self { + .init(rawValue: "lastAccessedDate") + } + + public static var ownerName: Self { + .init(rawValue: "ownerName") + } + + public static var pullRequests: Self { + .init(rawValue: "pullRequests") + } + + public static var repositoryName: Self { + .init(rawValue: "repositoryName") + } + + public static var scmProvider: Self { + .init(rawValue: "scmProvider") + } + + public static var sshCloneUrl: Self { + .init(rawValue: "sshCloneUrl") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "defaultBranch": self = .defaultBranch - case "gitReferences": self = .gitReferences - case "httpCloneUrl": self = .httpCloneUrl - case "lastAccessedDate": self = .lastAccessedDate - case "ownerName": self = .ownerName - case "pullRequests": self = .pullRequests - case "repositoryName": self = .repositoryName - case "scmProvider": self = .scmProvider - case "sshCloneUrl": self = .sshCloneUrl - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } @@ -245,25 +258,23 @@ extension V1.ScmProviders.ById.Repositories.GET { } } - public enum Include: Hashable, Codable, RawRepresentable { - case defaultBranch - case scmProvider - case unknown(String) + public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var defaultBranch: Self { + .init(rawValue: "defaultBranch") + } - public var rawValue: String { - switch self { - case .defaultBranch: return "defaultBranch" - case .scmProvider: return "scmProvider" - case .unknown(let rawValue): return rawValue - } + public static var scmProvider: Self { + .init(rawValue: "scmProvider") + } + + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "defaultBranch": self = .defaultBranch - case "scmProvider": self = .scmProvider - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/ScmProviders/ById/ScmProvidersById.GET.1d89e59.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/ScmProviders/ById/ScmProvidersById.GET.1d89e59.generated.swift index e75a8aa2..e048315d 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/ScmProviders/ById/ScmProvidersById.GET.1d89e59.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/ScmProviders/ById/ScmProvidersById.GET.1d89e59.generated.swift @@ -29,9 +29,7 @@ extension V1.ScmProviders.ById { components?.queryItems = [ URLQueryItem(name: "fields[scmProviders]", - value: parameters.fields[.scmProviders]?.map { "\($0)" }.joined(separator: ",")), - URLQueryItem(name: "fields[scmRepositories]", - value: parameters.fields[.scmRepositories]?.map { "\($0)" }.joined(separator: ",")) + value: parameters.fields[.scmProviders]?.map { "\($0)" }.joined(separator: ",")) ].filter { $0.value != nil } if components?.queryItems?.isEmpty ?? false { components?.queryItems = nil @@ -44,8 +42,10 @@ extension V1.ScmProviders.ById { /// - Returns: **200**, Single ScmProvider as `ScmProviderResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -59,12 +59,18 @@ extension V1.ScmProviders.ById { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 404: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -84,71 +90,27 @@ extension V1.ScmProviders.ById.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum ScmProviders: Hashable, Codable, RawRepresentable { - case repositories - case scmProviderType - case url - case unknown(String) - - public var rawValue: String { - switch self { - case .repositories: return "repositories" - case .scmProviderType: return "scmProviderType" - case .url: return "url" - case .unknown(let rawValue): return rawValue - } + public struct ScmProviders: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var repositories: Self { + .init(rawValue: "repositories") } - public init(rawValue: String) { - switch rawValue { - case "repositories": self = .repositories - case "scmProviderType": self = .scmProviderType - case "url": self = .url - default: self = .unknown(rawValue) - } + public static var scmProviderType: Self { + .init(rawValue: "scmProviderType") } - } - public enum ScmRepositories: Hashable, Codable, RawRepresentable { - case defaultBranch - case gitReferences - case httpCloneUrl - case lastAccessedDate - case ownerName - case pullRequests - case repositoryName - case scmProvider - case sshCloneUrl - case unknown(String) - - public var rawValue: String { - switch self { - case .defaultBranch: return "defaultBranch" - case .gitReferences: return "gitReferences" - case .httpCloneUrl: return "httpCloneUrl" - case .lastAccessedDate: return "lastAccessedDate" - case .ownerName: return "ownerName" - case .pullRequests: return "pullRequests" - case .repositoryName: return "repositoryName" - case .scmProvider: return "scmProvider" - case .sshCloneUrl: return "sshCloneUrl" - case .unknown(let rawValue): return rawValue - } + public static var url: Self { + .init(rawValue: "url") } + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "defaultBranch": self = .defaultBranch - case "gitReferences": self = .gitReferences - case "httpCloneUrl": self = .httpCloneUrl - case "lastAccessedDate": self = .lastAccessedDate - case "ownerName": self = .ownerName - case "pullRequests": self = .pullRequests - case "repositoryName": self = .repositoryName - case "scmProvider": self = .scmProvider - case "sshCloneUrl": self = .sshCloneUrl - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } @@ -158,11 +120,6 @@ extension V1.ScmProviders.ById.GET { .init(key: "fields[scmProviders]") } - /// the fields to include for returned resources of type scmRepositories - public static var scmRepositories: Relation<[ScmRepositories]?> { - .init(key: "fields[scmRepositories]") - } - internal let key: String public func hash(into hasher: inout Hasher) { diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/ScmProviders/ScmProviders.GET.79f23b3.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/ScmProviders/ScmProviders.GET.79f23b3.generated.swift index 2bceb7ce..ac01e876 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/ScmProviders/ScmProviders.GET.79f23b3.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/ScmProviders/ScmProviders.GET.79f23b3.generated.swift @@ -27,8 +27,6 @@ extension V1.ScmProviders { components?.queryItems = [ URLQueryItem(name: "fields[scmProviders]", value: parameters.fields[.scmProviders]?.map { "\($0)" }.joined(separator: ",")), - URLQueryItem(name: "fields[scmRepositories]", - value: parameters.fields[.scmRepositories]?.map { "\($0)" }.joined(separator: ",")), URLQueryItem(name: "limit", value: parameters.limit.map { "\($0)" }) ].filter { $0.value != nil } @@ -43,7 +41,9 @@ extension V1.ScmProviders { /// - Returns: **200**, List of ScmProviders as `ScmProvidersResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -57,9 +57,15 @@ extension V1.ScmProviders { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -82,71 +88,27 @@ extension V1.ScmProviders.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum ScmProviders: Hashable, Codable, RawRepresentable { - case repositories - case scmProviderType - case url - case unknown(String) - - public var rawValue: String { - switch self { - case .repositories: return "repositories" - case .scmProviderType: return "scmProviderType" - case .url: return "url" - case .unknown(let rawValue): return rawValue - } + public struct ScmProviders: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var repositories: Self { + .init(rawValue: "repositories") } - public init(rawValue: String) { - switch rawValue { - case "repositories": self = .repositories - case "scmProviderType": self = .scmProviderType - case "url": self = .url - default: self = .unknown(rawValue) - } + public static var scmProviderType: Self { + .init(rawValue: "scmProviderType") } - } - public enum ScmRepositories: Hashable, Codable, RawRepresentable { - case defaultBranch - case gitReferences - case httpCloneUrl - case lastAccessedDate - case ownerName - case pullRequests - case repositoryName - case scmProvider - case sshCloneUrl - case unknown(String) - - public var rawValue: String { - switch self { - case .defaultBranch: return "defaultBranch" - case .gitReferences: return "gitReferences" - case .httpCloneUrl: return "httpCloneUrl" - case .lastAccessedDate: return "lastAccessedDate" - case .ownerName: return "ownerName" - case .pullRequests: return "pullRequests" - case .repositoryName: return "repositoryName" - case .scmProvider: return "scmProvider" - case .sshCloneUrl: return "sshCloneUrl" - case .unknown(let rawValue): return rawValue - } + public static var url: Self { + .init(rawValue: "url") } + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "defaultBranch": self = .defaultBranch - case "gitReferences": self = .gitReferences - case "httpCloneUrl": self = .httpCloneUrl - case "lastAccessedDate": self = .lastAccessedDate - case "ownerName": self = .ownerName - case "pullRequests": self = .pullRequests - case "repositoryName": self = .repositoryName - case "scmProvider": self = .scmProvider - case "sshCloneUrl": self = .sshCloneUrl - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } @@ -156,11 +118,6 @@ extension V1.ScmProviders.GET { .init(key: "fields[scmProviders]") } - /// the fields to include for returned resources of type scmRepositories - public static var scmRepositories: Relation<[ScmRepositories]?> { - .init(key: "fields[scmRepositories]") - } - internal let key: String public func hash(into hasher: inout Hasher) { diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/ScmPullRequests/ById/ScmPullRequestsById.GET.0538892.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/ScmPullRequests/ById/ScmPullRequestsById.GET.0538892.generated.swift index 11144bfc..1d23bf6c 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/ScmPullRequests/ById/ScmPullRequestsById.GET.0538892.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/ScmPullRequests/ById/ScmPullRequestsById.GET.0538892.generated.swift @@ -44,8 +44,10 @@ extension V1.ScmPullRequests.ById { /// - Returns: **200**, Single ScmPullRequest as `ScmPullRequestResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -59,12 +61,18 @@ extension V1.ScmPullRequests.ById { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 404: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -87,55 +95,63 @@ extension V1.ScmPullRequests.ById.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum ScmPullRequests: Hashable, Codable, RawRepresentable { - case destinationBranchName - case destinationRepositoryName - case destinationRepositoryOwner - case isClosed - case isCrossRepository - case number - case repository - case sourceBranchName - case sourceRepositoryName - case sourceRepositoryOwner - case title - case webUrl - case unknown(String) - - public var rawValue: String { - switch self { - case .destinationBranchName: return "destinationBranchName" - case .destinationRepositoryName: return "destinationRepositoryName" - case .destinationRepositoryOwner: return "destinationRepositoryOwner" - case .isClosed: return "isClosed" - case .isCrossRepository: return "isCrossRepository" - case .number: return "number" - case .repository: return "repository" - case .sourceBranchName: return "sourceBranchName" - case .sourceRepositoryName: return "sourceRepositoryName" - case .sourceRepositoryOwner: return "sourceRepositoryOwner" - case .title: return "title" - case .webUrl: return "webUrl" - case .unknown(let rawValue): return rawValue - } + public struct ScmPullRequests: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var destinationBranchName: Self { + .init(rawValue: "destinationBranchName") } + public static var destinationRepositoryName: Self { + .init(rawValue: "destinationRepositoryName") + } + + public static var destinationRepositoryOwner: Self { + .init(rawValue: "destinationRepositoryOwner") + } + + public static var isClosed: Self { + .init(rawValue: "isClosed") + } + + public static var isCrossRepository: Self { + .init(rawValue: "isCrossRepository") + } + + public static var number: Self { + .init(rawValue: "number") + } + + public static var repository: Self { + .init(rawValue: "repository") + } + + public static var sourceBranchName: Self { + .init(rawValue: "sourceBranchName") + } + + public static var sourceRepositoryName: Self { + .init(rawValue: "sourceRepositoryName") + } + + public static var sourceRepositoryOwner: Self { + .init(rawValue: "sourceRepositoryOwner") + } + + public static var title: Self { + .init(rawValue: "title") + } + + public static var webUrl: Self { + .init(rawValue: "webUrl") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "destinationBranchName": self = .destinationBranchName - case "destinationRepositoryName": self = .destinationRepositoryName - case "destinationRepositoryOwner": self = .destinationRepositoryOwner - case "isClosed": self = .isClosed - case "isCrossRepository": self = .isCrossRepository - case "number": self = .number - case "repository": self = .repository - case "sourceBranchName": self = .sourceBranchName - case "sourceRepositoryName": self = .sourceRepositoryName - case "sourceRepositoryOwner": self = .sourceRepositoryOwner - case "title": self = .title - case "webUrl": self = .webUrl - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } @@ -153,22 +169,19 @@ extension V1.ScmPullRequests.ById.GET { } } - public enum Include: Hashable, Codable, RawRepresentable { - case repository - case unknown(String) + public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var repository: Self { + .init(rawValue: "repository") + } - public var rawValue: String { - switch self { - case .repository: return "repository" - case .unknown(let rawValue): return rawValue - } + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "repository": self = .repository - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/ScmRepositories/ById/GitReferences/ScmRepositoriesByIdGitReferences.GET.4d19adc.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/ScmRepositories/ById/GitReferences/ScmRepositoriesByIdGitReferences.GET.4d19adc.generated.swift index d8e4724d..30165b39 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/ScmRepositories/ById/GitReferences/ScmRepositoriesByIdGitReferences.GET.4d19adc.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/ScmRepositories/ById/GitReferences/ScmRepositoriesByIdGitReferences.GET.4d19adc.generated.swift @@ -48,8 +48,10 @@ extension V1.ScmRepositories.ById.GitReferences { /// - Returns: **200**, List of ScmGitReferences as `ScmGitReferencesResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -63,12 +65,18 @@ extension V1.ScmRepositories.ById.GitReferences { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 404: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -94,77 +102,83 @@ extension V1.ScmRepositories.ById.GitReferences.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum ScmGitReferences: Hashable, Codable, RawRepresentable { - case canonicalName - case isDeleted - case kind - case name - case repository - case unknown(String) - - public var rawValue: String { - switch self { - case .canonicalName: return "canonicalName" - case .isDeleted: return "isDeleted" - case .kind: return "kind" - case .name: return "name" - case .repository: return "repository" - case .unknown(let rawValue): return rawValue - } + public struct ScmGitReferences: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var canonicalName: Self { + .init(rawValue: "canonicalName") + } + + public static var isDeleted: Self { + .init(rawValue: "isDeleted") + } + + public static var kind: Self { + .init(rawValue: "kind") + } + + public static var name: Self { + .init(rawValue: "name") } + public static var repository: Self { + .init(rawValue: "repository") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "canonicalName": self = .canonicalName - case "isDeleted": self = .isDeleted - case "kind": self = .kind - case "name": self = .name - case "repository": self = .repository - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum ScmRepositories: Hashable, Codable, RawRepresentable { - case defaultBranch - case gitReferences - case httpCloneUrl - case lastAccessedDate - case ownerName - case pullRequests - case repositoryName - case scmProvider - case sshCloneUrl - case unknown(String) - - public var rawValue: String { - switch self { - case .defaultBranch: return "defaultBranch" - case .gitReferences: return "gitReferences" - case .httpCloneUrl: return "httpCloneUrl" - case .lastAccessedDate: return "lastAccessedDate" - case .ownerName: return "ownerName" - case .pullRequests: return "pullRequests" - case .repositoryName: return "repositoryName" - case .scmProvider: return "scmProvider" - case .sshCloneUrl: return "sshCloneUrl" - case .unknown(let rawValue): return rawValue - } + public struct ScmRepositories: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var defaultBranch: Self { + .init(rawValue: "defaultBranch") + } + + public static var gitReferences: Self { + .init(rawValue: "gitReferences") + } + + public static var httpCloneUrl: Self { + .init(rawValue: "httpCloneUrl") } + public static var lastAccessedDate: Self { + .init(rawValue: "lastAccessedDate") + } + + public static var ownerName: Self { + .init(rawValue: "ownerName") + } + + public static var pullRequests: Self { + .init(rawValue: "pullRequests") + } + + public static var repositoryName: Self { + .init(rawValue: "repositoryName") + } + + public static var scmProvider: Self { + .init(rawValue: "scmProvider") + } + + public static var sshCloneUrl: Self { + .init(rawValue: "sshCloneUrl") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "defaultBranch": self = .defaultBranch - case "gitReferences": self = .gitReferences - case "httpCloneUrl": self = .httpCloneUrl - case "lastAccessedDate": self = .lastAccessedDate - case "ownerName": self = .ownerName - case "pullRequests": self = .pullRequests - case "repositoryName": self = .repositoryName - case "scmProvider": self = .scmProvider - case "sshCloneUrl": self = .sshCloneUrl - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } @@ -187,22 +201,19 @@ extension V1.ScmRepositories.ById.GitReferences.GET { } } - public enum Include: Hashable, Codable, RawRepresentable { - case repository - case unknown(String) + public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var repository: Self { + .init(rawValue: "repository") + } - public var rawValue: String { - switch self { - case .repository: return "repository" - case .unknown(let rawValue): return rawValue - } + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "repository": self = .repository - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/ScmRepositories/ById/PullRequests/ScmRepositoriesByIdPullRequests.GET.0ceb0e1.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/ScmRepositories/ById/PullRequests/ScmRepositoriesByIdPullRequests.GET.0ceb0e1.generated.swift index c7ae6700..a3644683 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/ScmRepositories/ById/PullRequests/ScmRepositoriesByIdPullRequests.GET.0ceb0e1.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/ScmRepositories/ById/PullRequests/ScmRepositoriesByIdPullRequests.GET.0ceb0e1.generated.swift @@ -48,8 +48,10 @@ extension V1.ScmRepositories.ById.PullRequests { /// - Returns: **200**, List of ScmPullRequests as `ScmPullRequestsResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -63,12 +65,18 @@ extension V1.ScmRepositories.ById.PullRequests { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 404: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -94,98 +102,111 @@ extension V1.ScmRepositories.ById.PullRequests.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum ScmPullRequests: Hashable, Codable, RawRepresentable { - case destinationBranchName - case destinationRepositoryName - case destinationRepositoryOwner - case isClosed - case isCrossRepository - case number - case repository - case sourceBranchName - case sourceRepositoryName - case sourceRepositoryOwner - case title - case webUrl - case unknown(String) - - public var rawValue: String { - switch self { - case .destinationBranchName: return "destinationBranchName" - case .destinationRepositoryName: return "destinationRepositoryName" - case .destinationRepositoryOwner: return "destinationRepositoryOwner" - case .isClosed: return "isClosed" - case .isCrossRepository: return "isCrossRepository" - case .number: return "number" - case .repository: return "repository" - case .sourceBranchName: return "sourceBranchName" - case .sourceRepositoryName: return "sourceRepositoryName" - case .sourceRepositoryOwner: return "sourceRepositoryOwner" - case .title: return "title" - case .webUrl: return "webUrl" - case .unknown(let rawValue): return rawValue - } + public struct ScmPullRequests: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var destinationBranchName: Self { + .init(rawValue: "destinationBranchName") + } + + public static var destinationRepositoryName: Self { + .init(rawValue: "destinationRepositoryName") + } + + public static var destinationRepositoryOwner: Self { + .init(rawValue: "destinationRepositoryOwner") + } + + public static var isClosed: Self { + .init(rawValue: "isClosed") + } + + public static var isCrossRepository: Self { + .init(rawValue: "isCrossRepository") + } + + public static var number: Self { + .init(rawValue: "number") + } + + public static var repository: Self { + .init(rawValue: "repository") + } + + public static var sourceBranchName: Self { + .init(rawValue: "sourceBranchName") + } + + public static var sourceRepositoryName: Self { + .init(rawValue: "sourceRepositoryName") + } + + public static var sourceRepositoryOwner: Self { + .init(rawValue: "sourceRepositoryOwner") + } + + public static var title: Self { + .init(rawValue: "title") + } + + public static var webUrl: Self { + .init(rawValue: "webUrl") } + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "destinationBranchName": self = .destinationBranchName - case "destinationRepositoryName": self = .destinationRepositoryName - case "destinationRepositoryOwner": self = .destinationRepositoryOwner - case "isClosed": self = .isClosed - case "isCrossRepository": self = .isCrossRepository - case "number": self = .number - case "repository": self = .repository - case "sourceBranchName": self = .sourceBranchName - case "sourceRepositoryName": self = .sourceRepositoryName - case "sourceRepositoryOwner": self = .sourceRepositoryOwner - case "title": self = .title - case "webUrl": self = .webUrl - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum ScmRepositories: Hashable, Codable, RawRepresentable { - case defaultBranch - case gitReferences - case httpCloneUrl - case lastAccessedDate - case ownerName - case pullRequests - case repositoryName - case scmProvider - case sshCloneUrl - case unknown(String) - - public var rawValue: String { - switch self { - case .defaultBranch: return "defaultBranch" - case .gitReferences: return "gitReferences" - case .httpCloneUrl: return "httpCloneUrl" - case .lastAccessedDate: return "lastAccessedDate" - case .ownerName: return "ownerName" - case .pullRequests: return "pullRequests" - case .repositoryName: return "repositoryName" - case .scmProvider: return "scmProvider" - case .sshCloneUrl: return "sshCloneUrl" - case .unknown(let rawValue): return rawValue - } + public struct ScmRepositories: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var defaultBranch: Self { + .init(rawValue: "defaultBranch") + } + + public static var gitReferences: Self { + .init(rawValue: "gitReferences") + } + + public static var httpCloneUrl: Self { + .init(rawValue: "httpCloneUrl") + } + + public static var lastAccessedDate: Self { + .init(rawValue: "lastAccessedDate") + } + + public static var ownerName: Self { + .init(rawValue: "ownerName") + } + + public static var pullRequests: Self { + .init(rawValue: "pullRequests") } + public static var repositoryName: Self { + .init(rawValue: "repositoryName") + } + + public static var scmProvider: Self { + .init(rawValue: "scmProvider") + } + + public static var sshCloneUrl: Self { + .init(rawValue: "sshCloneUrl") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "defaultBranch": self = .defaultBranch - case "gitReferences": self = .gitReferences - case "httpCloneUrl": self = .httpCloneUrl - case "lastAccessedDate": self = .lastAccessedDate - case "ownerName": self = .ownerName - case "pullRequests": self = .pullRequests - case "repositoryName": self = .repositoryName - case "scmProvider": self = .scmProvider - case "sshCloneUrl": self = .sshCloneUrl - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } @@ -208,22 +229,19 @@ extension V1.ScmRepositories.ById.PullRequests.GET { } } - public enum Include: Hashable, Codable, RawRepresentable { - case repository - case unknown(String) + public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var repository: Self { + .init(rawValue: "repository") + } - public var rawValue: String { - switch self { - case .repository: return "repository" - case .unknown(let rawValue): return rawValue - } + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "repository": self = .repository - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/ScmRepositories/ById/Relationships/GitReferences/ScmRepositoriesByIdRelationshipsGitReferences.GET.4c69e0b.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/ScmRepositories/ById/Relationships/GitReferences/ScmRepositoriesByIdRelationshipsGitReferences.GET.4c69e0b.generated.swift new file mode 100644 index 00000000..330a41e0 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/ScmRepositories/ById/Relationships/GitReferences/ScmRepositoriesByIdRelationshipsGitReferences.GET.4c69e0b.generated.swift @@ -0,0 +1,88 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.ScmRepositories.ById.Relationships.GitReferences { + public struct GET: Endpoint { + public typealias Response = ScmRepositoryGitReferencesLinkagesResponse + + public var path: String { + "/v1/scmRepositories/\(id)/relationships/gitReferences" + } + + /// the id of the requested resource + public var id: String + + public var parameters: Parameters = Parameters() + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + components?.queryItems = [ + URLQueryItem(name: "limit", + value: parameters.limit.map { "\($0)" }) + ].filter { $0.value != nil } + if components?.queryItems?.isEmpty ?? false { + components?.queryItems = nil + } + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "GET" + return urlRequest + } + + /// - Returns: **200**, List of related linkages as `ScmRepositoryGitReferencesLinkagesResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(ScmRepositoryGitReferencesLinkagesResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +extension V1.ScmRepositories.ById.Relationships.GitReferences.GET { + public struct Parameters: Hashable { + /// maximum resources per page + public var limit: Int? + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/ScmRepositories/ById/Relationships/PullRequests/ScmRepositoriesByIdRelationshipsPullRequests.GET.d3fe2a1.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/ScmRepositories/ById/Relationships/PullRequests/ScmRepositoriesByIdRelationshipsPullRequests.GET.d3fe2a1.generated.swift new file mode 100644 index 00000000..f05f1a50 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/ScmRepositories/ById/Relationships/PullRequests/ScmRepositoriesByIdRelationshipsPullRequests.GET.d3fe2a1.generated.swift @@ -0,0 +1,88 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.ScmRepositories.ById.Relationships.PullRequests { + public struct GET: Endpoint { + public typealias Response = ScmRepositoryPullRequestsLinkagesResponse + + public var path: String { + "/v1/scmRepositories/\(id)/relationships/pullRequests" + } + + /// the id of the requested resource + public var id: String + + public var parameters: Parameters = Parameters() + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + components?.queryItems = [ + URLQueryItem(name: "limit", + value: parameters.limit.map { "\($0)" }) + ].filter { $0.value != nil } + if components?.queryItems?.isEmpty ?? false { + components?.queryItems = nil + } + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "GET" + return urlRequest + } + + /// - Returns: **200**, List of related linkages as `ScmRepositoryPullRequestsLinkagesResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(ScmRepositoryPullRequestsLinkagesResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +extension V1.ScmRepositories.ById.Relationships.PullRequests.GET { + public struct Parameters: Hashable { + /// maximum resources per page + public var limit: Int? + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/ScmRepositories/ById/ScmRepositoriesById.GET.a4518c0.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/ScmRepositories/ById/ScmRepositoriesById.GET.a4518c0.generated.swift index 5f9479f0..68e563a7 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/ScmRepositories/ById/ScmRepositoriesById.GET.a4518c0.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/ScmRepositories/ById/ScmRepositoriesById.GET.a4518c0.generated.swift @@ -28,10 +28,6 @@ extension V1.ScmRepositories.ById { components?.path = path components?.queryItems = [ - URLQueryItem(name: "fields[scmGitReferences]", - value: parameters.fields[.scmGitReferences]?.map { "\($0)" }.joined(separator: ",")), - URLQueryItem(name: "fields[scmPullRequests]", - value: parameters.fields[.scmPullRequests]?.map { "\($0)" }.joined(separator: ",")), URLQueryItem(name: "fields[scmRepositories]", value: parameters.fields[.scmRepositories]?.map { "\($0)" }.joined(separator: ",")), URLQueryItem(name: "include", @@ -48,8 +44,10 @@ extension V1.ScmRepositories.ById { /// - Returns: **200**, Single ScmRepository as `ScmRepositoryResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -63,12 +61,18 @@ extension V1.ScmRepositories.ById { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 404: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -91,143 +95,55 @@ extension V1.ScmRepositories.ById.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum ScmGitReferences: Hashable, Codable, RawRepresentable { - case canonicalName - case isDeleted - case kind - case name - case repository - case unknown(String) - - public var rawValue: String { - switch self { - case .canonicalName: return "canonicalName" - case .isDeleted: return "isDeleted" - case .kind: return "kind" - case .name: return "name" - case .repository: return "repository" - case .unknown(let rawValue): return rawValue - } + public struct ScmRepositories: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var defaultBranch: Self { + .init(rawValue: "defaultBranch") } - public init(rawValue: String) { - switch rawValue { - case "canonicalName": self = .canonicalName - case "isDeleted": self = .isDeleted - case "kind": self = .kind - case "name": self = .name - case "repository": self = .repository - default: self = .unknown(rawValue) - } + public static var gitReferences: Self { + .init(rawValue: "gitReferences") } - } - public enum ScmPullRequests: Hashable, Codable, RawRepresentable { - case destinationBranchName - case destinationRepositoryName - case destinationRepositoryOwner - case isClosed - case isCrossRepository - case number - case repository - case sourceBranchName - case sourceRepositoryName - case sourceRepositoryOwner - case title - case webUrl - case unknown(String) - - public var rawValue: String { - switch self { - case .destinationBranchName: return "destinationBranchName" - case .destinationRepositoryName: return "destinationRepositoryName" - case .destinationRepositoryOwner: return "destinationRepositoryOwner" - case .isClosed: return "isClosed" - case .isCrossRepository: return "isCrossRepository" - case .number: return "number" - case .repository: return "repository" - case .sourceBranchName: return "sourceBranchName" - case .sourceRepositoryName: return "sourceRepositoryName" - case .sourceRepositoryOwner: return "sourceRepositoryOwner" - case .title: return "title" - case .webUrl: return "webUrl" - case .unknown(let rawValue): return rawValue - } + public static var httpCloneUrl: Self { + .init(rawValue: "httpCloneUrl") } - public init(rawValue: String) { - switch rawValue { - case "destinationBranchName": self = .destinationBranchName - case "destinationRepositoryName": self = .destinationRepositoryName - case "destinationRepositoryOwner": self = .destinationRepositoryOwner - case "isClosed": self = .isClosed - case "isCrossRepository": self = .isCrossRepository - case "number": self = .number - case "repository": self = .repository - case "sourceBranchName": self = .sourceBranchName - case "sourceRepositoryName": self = .sourceRepositoryName - case "sourceRepositoryOwner": self = .sourceRepositoryOwner - case "title": self = .title - case "webUrl": self = .webUrl - default: self = .unknown(rawValue) - } + public static var lastAccessedDate: Self { + .init(rawValue: "lastAccessedDate") } - } - public enum ScmRepositories: Hashable, Codable, RawRepresentable { - case defaultBranch - case gitReferences - case httpCloneUrl - case lastAccessedDate - case ownerName - case pullRequests - case repositoryName - case scmProvider - case sshCloneUrl - case unknown(String) - - public var rawValue: String { - switch self { - case .defaultBranch: return "defaultBranch" - case .gitReferences: return "gitReferences" - case .httpCloneUrl: return "httpCloneUrl" - case .lastAccessedDate: return "lastAccessedDate" - case .ownerName: return "ownerName" - case .pullRequests: return "pullRequests" - case .repositoryName: return "repositoryName" - case .scmProvider: return "scmProvider" - case .sshCloneUrl: return "sshCloneUrl" - case .unknown(let rawValue): return rawValue - } + public static var ownerName: Self { + .init(rawValue: "ownerName") } - public init(rawValue: String) { - switch rawValue { - case "defaultBranch": self = .defaultBranch - case "gitReferences": self = .gitReferences - case "httpCloneUrl": self = .httpCloneUrl - case "lastAccessedDate": self = .lastAccessedDate - case "ownerName": self = .ownerName - case "pullRequests": self = .pullRequests - case "repositoryName": self = .repositoryName - case "scmProvider": self = .scmProvider - case "sshCloneUrl": self = .sshCloneUrl - default: self = .unknown(rawValue) - } + public static var pullRequests: Self { + .init(rawValue: "pullRequests") } - } - public struct Relation: Hashable { - /// the fields to include for returned resources of type scmGitReferences - public static var scmGitReferences: Relation<[ScmGitReferences]?> { - .init(key: "fields[scmGitReferences]") + public static var repositoryName: Self { + .init(rawValue: "repositoryName") } - /// the fields to include for returned resources of type scmPullRequests - public static var scmPullRequests: Relation<[ScmPullRequests]?> { - .init(key: "fields[scmPullRequests]") + public static var scmProvider: Self { + .init(rawValue: "scmProvider") } + public static var sshCloneUrl: Self { + .init(rawValue: "sshCloneUrl") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct Relation: Hashable { /// the fields to include for returned resources of type scmRepositories public static var scmRepositories: Relation<[ScmRepositories]?> { .init(key: "fields[scmRepositories]") @@ -241,25 +157,23 @@ extension V1.ScmRepositories.ById.GET { } } - public enum Include: Hashable, Codable, RawRepresentable { - case defaultBranch - case scmProvider - case unknown(String) + public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var defaultBranch: Self { + .init(rawValue: "defaultBranch") + } - public var rawValue: String { - switch self { - case .defaultBranch: return "defaultBranch" - case .scmProvider: return "scmProvider" - case .unknown(let rawValue): return rawValue - } + public static var scmProvider: Self { + .init(rawValue: "scmProvider") + } + + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "defaultBranch": self = .defaultBranch - case "scmProvider": self = .scmProvider - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/ScmRepositories/ScmRepositories.GET.83c2368.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/ScmRepositories/ScmRepositories.GET.83c2368.generated.swift index 5b0453ea..7c788796 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/ScmRepositories/ScmRepositories.GET.83c2368.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/ScmRepositories/ScmRepositories.GET.83c2368.generated.swift @@ -25,10 +25,6 @@ extension V1.ScmRepositories { components?.path = path components?.queryItems = [ - URLQueryItem(name: "fields[scmGitReferences]", - value: parameters.fields[.scmGitReferences]?.map { "\($0)" }.joined(separator: ",")), - URLQueryItem(name: "fields[scmPullRequests]", - value: parameters.fields[.scmPullRequests]?.map { "\($0)" }.joined(separator: ",")), URLQueryItem(name: "fields[scmRepositories]", value: parameters.fields[.scmRepositories]?.map { "\($0)" }.joined(separator: ",")), URLQueryItem(name: "filter[id]", @@ -49,7 +45,9 @@ extension V1.ScmRepositories { /// - Returns: **200**, List of ScmRepositories as `ScmRepositoriesResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -63,9 +61,15 @@ extension V1.ScmRepositories { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -93,143 +97,55 @@ extension V1.ScmRepositories.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum ScmGitReferences: Hashable, Codable, RawRepresentable { - case canonicalName - case isDeleted - case kind - case name - case repository - case unknown(String) - - public var rawValue: String { - switch self { - case .canonicalName: return "canonicalName" - case .isDeleted: return "isDeleted" - case .kind: return "kind" - case .name: return "name" - case .repository: return "repository" - case .unknown(let rawValue): return rawValue - } + public struct ScmRepositories: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var defaultBranch: Self { + .init(rawValue: "defaultBranch") } - public init(rawValue: String) { - switch rawValue { - case "canonicalName": self = .canonicalName - case "isDeleted": self = .isDeleted - case "kind": self = .kind - case "name": self = .name - case "repository": self = .repository - default: self = .unknown(rawValue) - } + public static var gitReferences: Self { + .init(rawValue: "gitReferences") } - } - public enum ScmPullRequests: Hashable, Codable, RawRepresentable { - case destinationBranchName - case destinationRepositoryName - case destinationRepositoryOwner - case isClosed - case isCrossRepository - case number - case repository - case sourceBranchName - case sourceRepositoryName - case sourceRepositoryOwner - case title - case webUrl - case unknown(String) - - public var rawValue: String { - switch self { - case .destinationBranchName: return "destinationBranchName" - case .destinationRepositoryName: return "destinationRepositoryName" - case .destinationRepositoryOwner: return "destinationRepositoryOwner" - case .isClosed: return "isClosed" - case .isCrossRepository: return "isCrossRepository" - case .number: return "number" - case .repository: return "repository" - case .sourceBranchName: return "sourceBranchName" - case .sourceRepositoryName: return "sourceRepositoryName" - case .sourceRepositoryOwner: return "sourceRepositoryOwner" - case .title: return "title" - case .webUrl: return "webUrl" - case .unknown(let rawValue): return rawValue - } + public static var httpCloneUrl: Self { + .init(rawValue: "httpCloneUrl") } - public init(rawValue: String) { - switch rawValue { - case "destinationBranchName": self = .destinationBranchName - case "destinationRepositoryName": self = .destinationRepositoryName - case "destinationRepositoryOwner": self = .destinationRepositoryOwner - case "isClosed": self = .isClosed - case "isCrossRepository": self = .isCrossRepository - case "number": self = .number - case "repository": self = .repository - case "sourceBranchName": self = .sourceBranchName - case "sourceRepositoryName": self = .sourceRepositoryName - case "sourceRepositoryOwner": self = .sourceRepositoryOwner - case "title": self = .title - case "webUrl": self = .webUrl - default: self = .unknown(rawValue) - } + public static var lastAccessedDate: Self { + .init(rawValue: "lastAccessedDate") } - } - public enum ScmRepositories: Hashable, Codable, RawRepresentable { - case defaultBranch - case gitReferences - case httpCloneUrl - case lastAccessedDate - case ownerName - case pullRequests - case repositoryName - case scmProvider - case sshCloneUrl - case unknown(String) - - public var rawValue: String { - switch self { - case .defaultBranch: return "defaultBranch" - case .gitReferences: return "gitReferences" - case .httpCloneUrl: return "httpCloneUrl" - case .lastAccessedDate: return "lastAccessedDate" - case .ownerName: return "ownerName" - case .pullRequests: return "pullRequests" - case .repositoryName: return "repositoryName" - case .scmProvider: return "scmProvider" - case .sshCloneUrl: return "sshCloneUrl" - case .unknown(let rawValue): return rawValue - } + public static var ownerName: Self { + .init(rawValue: "ownerName") } - public init(rawValue: String) { - switch rawValue { - case "defaultBranch": self = .defaultBranch - case "gitReferences": self = .gitReferences - case "httpCloneUrl": self = .httpCloneUrl - case "lastAccessedDate": self = .lastAccessedDate - case "ownerName": self = .ownerName - case "pullRequests": self = .pullRequests - case "repositoryName": self = .repositoryName - case "scmProvider": self = .scmProvider - case "sshCloneUrl": self = .sshCloneUrl - default: self = .unknown(rawValue) - } + public static var pullRequests: Self { + .init(rawValue: "pullRequests") } - } - public struct Relation: Hashable { - /// the fields to include for returned resources of type scmGitReferences - public static var scmGitReferences: Relation<[ScmGitReferences]?> { - .init(key: "fields[scmGitReferences]") + public static var repositoryName: Self { + .init(rawValue: "repositoryName") } - /// the fields to include for returned resources of type scmPullRequests - public static var scmPullRequests: Relation<[ScmPullRequests]?> { - .init(key: "fields[scmPullRequests]") + public static var scmProvider: Self { + .init(rawValue: "scmProvider") } + public static var sshCloneUrl: Self { + .init(rawValue: "sshCloneUrl") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct Relation: Hashable { /// the fields to include for returned resources of type scmRepositories public static var scmRepositories: Relation<[ScmRepositories]?> { .init(key: "fields[scmRepositories]") @@ -265,25 +181,23 @@ extension V1.ScmRepositories.GET { } } - public enum Include: Hashable, Codable, RawRepresentable { - case defaultBranch - case scmProvider - case unknown(String) + public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var defaultBranch: Self { + .init(rawValue: "defaultBranch") + } - public var rawValue: String { - switch self { - case .defaultBranch: return "defaultBranch" - case .scmProvider: return "scmProvider" - case .unknown(let rawValue): return rawValue - } + public static var scmProvider: Self { + .init(rawValue: "scmProvider") + } + + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "defaultBranch": self = .defaultBranch - case "scmProvider": self = .scmProvider - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/SubscriptionAppStoreReviewScreenshots/ById/SubscriptionAppStoreReviewScreenshotsById.DELETE.1504677.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/SubscriptionAppStoreReviewScreenshots/ById/SubscriptionAppStoreReviewScreenshotsById.DELETE.1504677.generated.swift index 90798785..0d79a0d0 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/SubscriptionAppStoreReviewScreenshots/ById/SubscriptionAppStoreReviewScreenshotsById.DELETE.1504677.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/SubscriptionAppStoreReviewScreenshots/ById/SubscriptionAppStoreReviewScreenshotsById.DELETE.1504677.generated.swift @@ -31,11 +31,12 @@ extension V1.SubscriptionAppStoreReviewScreenshots.ById { return urlRequest } - /// - Returns: **204**, Success (no content) /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -43,12 +44,12 @@ extension V1.SubscriptionAppStoreReviewScreenshots.ById { } switch urlResponse.statusCode { - case 204: - return - case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) @@ -58,6 +59,9 @@ extension V1.SubscriptionAppStoreReviewScreenshots.ById { case 409: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/SubscriptionAppStoreReviewScreenshots/ById/SubscriptionAppStoreReviewScreenshotsById.GET.1504677.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/SubscriptionAppStoreReviewScreenshots/ById/SubscriptionAppStoreReviewScreenshotsById.GET.1504677.generated.swift index 63f5b641..8b4152aa 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/SubscriptionAppStoreReviewScreenshots/ById/SubscriptionAppStoreReviewScreenshotsById.GET.1504677.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/SubscriptionAppStoreReviewScreenshots/ById/SubscriptionAppStoreReviewScreenshotsById.GET.1504677.generated.swift @@ -44,8 +44,10 @@ extension V1.SubscriptionAppStoreReviewScreenshots.ById { /// - Returns: **200**, Single SubscriptionAppStoreReviewScreenshot as `SubscriptionAppStoreReviewScreenshotResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -59,12 +61,18 @@ extension V1.SubscriptionAppStoreReviewScreenshots.ById { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 404: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -87,49 +95,51 @@ extension V1.SubscriptionAppStoreReviewScreenshots.ById.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum SubscriptionAppStoreReviewScreenshots: Hashable, Codable, RawRepresentable { - case assetDeliveryState - case assetToken - case assetType - case fileName - case fileSize - case imageAsset - case sourceFileChecksum - case subscription - case uploadOperations - case uploaded - case unknown(String) - - public var rawValue: String { - switch self { - case .assetDeliveryState: return "assetDeliveryState" - case .assetToken: return "assetToken" - case .assetType: return "assetType" - case .fileName: return "fileName" - case .fileSize: return "fileSize" - case .imageAsset: return "imageAsset" - case .sourceFileChecksum: return "sourceFileChecksum" - case .subscription: return "subscription" - case .uploadOperations: return "uploadOperations" - case .uploaded: return "uploaded" - case .unknown(let rawValue): return rawValue - } + public struct SubscriptionAppStoreReviewScreenshots: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var assetDeliveryState: Self { + .init(rawValue: "assetDeliveryState") + } + + public static var assetToken: Self { + .init(rawValue: "assetToken") + } + + public static var assetType: Self { + .init(rawValue: "assetType") + } + + public static var fileName: Self { + .init(rawValue: "fileName") + } + + public static var fileSize: Self { + .init(rawValue: "fileSize") + } + + public static var imageAsset: Self { + .init(rawValue: "imageAsset") } + public static var sourceFileChecksum: Self { + .init(rawValue: "sourceFileChecksum") + } + + public static var subscription: Self { + .init(rawValue: "subscription") + } + + public static var uploadOperations: Self { + .init(rawValue: "uploadOperations") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "assetDeliveryState": self = .assetDeliveryState - case "assetToken": self = .assetToken - case "assetType": self = .assetType - case "fileName": self = .fileName - case "fileSize": self = .fileSize - case "imageAsset": self = .imageAsset - case "sourceFileChecksum": self = .sourceFileChecksum - case "subscription": self = .subscription - case "uploadOperations": self = .uploadOperations - case "uploaded": self = .uploaded - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } @@ -147,22 +157,19 @@ extension V1.SubscriptionAppStoreReviewScreenshots.ById.GET { } } - public enum Include: Hashable, Codable, RawRepresentable { - case subscription - case unknown(String) + public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var subscription: Self { + .init(rawValue: "subscription") + } - public var rawValue: String { - switch self { - case .subscription: return "subscription" - case .unknown(let rawValue): return rawValue - } + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "subscription": self = .subscription - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/SubscriptionAppStoreReviewScreenshots/ById/SubscriptionAppStoreReviewScreenshotsById.PATCH.1504677.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/SubscriptionAppStoreReviewScreenshots/ById/SubscriptionAppStoreReviewScreenshotsById.PATCH.1504677.generated.swift index 34f45702..d2356f90 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/SubscriptionAppStoreReviewScreenshots/ById/SubscriptionAppStoreReviewScreenshotsById.PATCH.1504677.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/SubscriptionAppStoreReviewScreenshots/ById/SubscriptionAppStoreReviewScreenshotsById.PATCH.1504677.generated.swift @@ -48,9 +48,12 @@ extension V1.SubscriptionAppStoreReviewScreenshots.ById { /// - Returns: **200**, Single SubscriptionAppStoreReviewScreenshot as `SubscriptionAppStoreReviewScreenshotResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **422**, Unprocessable request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -64,6 +67,9 @@ extension V1.SubscriptionAppStoreReviewScreenshots.ById { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) @@ -73,6 +79,12 @@ extension V1.SubscriptionAppStoreReviewScreenshots.ById { case 409: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 422: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/SubscriptionAppStoreReviewScreenshots/SubscriptionAppStoreReviewScreenshots.POST.687e771.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/SubscriptionAppStoreReviewScreenshots/SubscriptionAppStoreReviewScreenshots.POST.687e771.generated.swift index f4640bd5..e9a01134 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/SubscriptionAppStoreReviewScreenshots/SubscriptionAppStoreReviewScreenshots.POST.687e771.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/SubscriptionAppStoreReviewScreenshots/SubscriptionAppStoreReviewScreenshots.POST.687e771.generated.swift @@ -41,8 +41,11 @@ extension V1.SubscriptionAppStoreReviewScreenshots { /// - Returns: **201**, Single SubscriptionAppStoreReviewScreenshot as `SubscriptionAppStoreReviewScreenshotResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **422**, Unprocessable request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -56,12 +59,21 @@ extension V1.SubscriptionAppStoreReviewScreenshots { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 409: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 422: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/SubscriptionAvailabilities/ById/AvailableTerritories/SubscriptionAvailabilitiesByIdAvailableTerritories.GET.ec82b5e.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/SubscriptionAvailabilities/ById/AvailableTerritories/SubscriptionAvailabilitiesByIdAvailableTerritories.GET.ec82b5e.generated.swift index 949ec11a..cf4bd01b 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/SubscriptionAvailabilities/ById/AvailableTerritories/SubscriptionAvailabilitiesByIdAvailableTerritories.GET.ec82b5e.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/SubscriptionAvailabilities/ById/AvailableTerritories/SubscriptionAvailabilitiesByIdAvailableTerritories.GET.ec82b5e.generated.swift @@ -44,8 +44,10 @@ extension V1.SubscriptionAvailabilities.ById.AvailableTerritories { /// - Returns: **200**, List of Territories as `TerritoriesResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -59,12 +61,18 @@ extension V1.SubscriptionAvailabilities.ById.AvailableTerritories { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 404: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -87,22 +95,19 @@ extension V1.SubscriptionAvailabilities.ById.AvailableTerritories.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum Territories: Hashable, Codable, RawRepresentable { - case currency - case unknown(String) + public struct Territories: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var currency: Self { + .init(rawValue: "currency") + } - public var rawValue: String { - switch self { - case .currency: return "currency" - case .unknown(let rawValue): return rawValue - } + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "currency": self = .currency - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/SubscriptionAvailabilities/ById/Relationships/AvailableTerritories/SubscriptionAvailabilitiesByIdRelationshipsAvailableTerritories.GET.83b9b65.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/SubscriptionAvailabilities/ById/Relationships/AvailableTerritories/SubscriptionAvailabilitiesByIdRelationshipsAvailableTerritories.GET.83b9b65.generated.swift new file mode 100644 index 00000000..2daa91d1 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/SubscriptionAvailabilities/ById/Relationships/AvailableTerritories/SubscriptionAvailabilitiesByIdRelationshipsAvailableTerritories.GET.83b9b65.generated.swift @@ -0,0 +1,88 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.SubscriptionAvailabilities.ById.Relationships.AvailableTerritories { + public struct GET: Endpoint { + public typealias Response = SubscriptionAvailabilityAvailableTerritoriesLinkagesResponse + + public var path: String { + "/v1/subscriptionAvailabilities/\(id)/relationships/availableTerritories" + } + + /// the id of the requested resource + public var id: String + + public var parameters: Parameters = Parameters() + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + components?.queryItems = [ + URLQueryItem(name: "limit", + value: parameters.limit.map { "\($0)" }) + ].filter { $0.value != nil } + if components?.queryItems?.isEmpty ?? false { + components?.queryItems = nil + } + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "GET" + return urlRequest + } + + /// - Returns: **200**, List of related linkages as `SubscriptionAvailabilityAvailableTerritoriesLinkagesResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(SubscriptionAvailabilityAvailableTerritoriesLinkagesResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +extension V1.SubscriptionAvailabilities.ById.Relationships.AvailableTerritories.GET { + public struct Parameters: Hashable { + /// maximum resources per page + public var limit: Int? + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/SubscriptionAvailabilities/ById/SubscriptionAvailabilitiesById.GET.93e5129.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/SubscriptionAvailabilities/ById/SubscriptionAvailabilitiesById.GET.93e5129.generated.swift index 60484ba6..eff22af4 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/SubscriptionAvailabilities/ById/SubscriptionAvailabilitiesById.GET.93e5129.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/SubscriptionAvailabilities/ById/SubscriptionAvailabilitiesById.GET.93e5129.generated.swift @@ -48,8 +48,10 @@ extension V1.SubscriptionAvailabilities.ById { /// - Returns: **200**, Single SubscriptionAvailability as `SubscriptionAvailabilityResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -63,12 +65,18 @@ extension V1.SubscriptionAvailabilities.ById { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 404: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -93,47 +101,39 @@ extension V1.SubscriptionAvailabilities.ById.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum SubscriptionAvailabilities: Hashable, Codable, RawRepresentable { - case availableInNewTerritories - case availableTerritories - case subscription - case unknown(String) - - public var rawValue: String { - switch self { - case .availableInNewTerritories: return "availableInNewTerritories" - case .availableTerritories: return "availableTerritories" - case .subscription: return "subscription" - case .unknown(let rawValue): return rawValue - } + public struct SubscriptionAvailabilities: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var availableInNewTerritories: Self { + .init(rawValue: "availableInNewTerritories") + } + + public static var availableTerritories: Self { + .init(rawValue: "availableTerritories") + } + + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "availableInNewTerritories": self = .availableInNewTerritories - case "availableTerritories": self = .availableTerritories - case "subscription": self = .subscription - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum Territories: Hashable, Codable, RawRepresentable { - case currency - case unknown(String) + public struct Territories: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var currency: Self { + .init(rawValue: "currency") + } - public var rawValue: String { - switch self { - case .currency: return "currency" - case .unknown(let rawValue): return rawValue - } + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "currency": self = .currency - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } @@ -156,25 +156,19 @@ extension V1.SubscriptionAvailabilities.ById.GET { } } - public enum Include: Hashable, Codable, RawRepresentable { - case availableTerritories - case subscription - case unknown(String) + public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var availableTerritories: Self { + .init(rawValue: "availableTerritories") + } - public var rawValue: String { - switch self { - case .availableTerritories: return "availableTerritories" - case .subscription: return "subscription" - case .unknown(let rawValue): return rawValue - } + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "availableTerritories": self = .availableTerritories - case "subscription": self = .subscription - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/SubscriptionAvailabilities/SubscriptionAvailabilities.POST.55eb408.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/SubscriptionAvailabilities/SubscriptionAvailabilities.POST.55eb408.generated.swift index 70c8368f..3e784949 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/SubscriptionAvailabilities/SubscriptionAvailabilities.POST.55eb408.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/SubscriptionAvailabilities/SubscriptionAvailabilities.POST.55eb408.generated.swift @@ -41,8 +41,11 @@ extension V1.SubscriptionAvailabilities { /// - Returns: **201**, Single SubscriptionAvailability as `SubscriptionAvailabilityResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **422**, Unprocessable request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -56,12 +59,21 @@ extension V1.SubscriptionAvailabilities { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 409: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 422: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/SubscriptionGracePeriods/ById/SubscriptionGracePeriodsById.GET.86c7258.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/SubscriptionGracePeriods/ById/SubscriptionGracePeriodsById.GET.86c7258.generated.swift index cc9d3538..1078b108 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/SubscriptionGracePeriods/ById/SubscriptionGracePeriodsById.GET.86c7258.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/SubscriptionGracePeriods/ById/SubscriptionGracePeriodsById.GET.86c7258.generated.swift @@ -42,8 +42,10 @@ extension V1.SubscriptionGracePeriods.ById { /// - Returns: **200**, Single SubscriptionGracePeriod as `SubscriptionGracePeriodResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -57,12 +59,18 @@ extension V1.SubscriptionGracePeriods.ById { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 404: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -82,31 +90,31 @@ extension V1.SubscriptionGracePeriods.ById.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum SubscriptionGracePeriods: Hashable, Codable, RawRepresentable { - case duration - case optIn - case renewalType - case sandboxOptIn - case unknown(String) - - public var rawValue: String { - switch self { - case .duration: return "duration" - case .optIn: return "optIn" - case .renewalType: return "renewalType" - case .sandboxOptIn: return "sandboxOptIn" - case .unknown(let rawValue): return rawValue - } + public struct SubscriptionGracePeriods: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var duration: Self { + .init(rawValue: "duration") } + public static var optIn: Self { + .init(rawValue: "optIn") + } + + public static var renewalType: Self { + .init(rawValue: "renewalType") + } + + public static var sandboxOptIn: Self { + .init(rawValue: "sandboxOptIn") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "duration": self = .duration - case "optIn": self = .optIn - case "renewalType": self = .renewalType - case "sandboxOptIn": self = .sandboxOptIn - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/SubscriptionGracePeriods/ById/SubscriptionGracePeriodsById.PATCH.86c7258.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/SubscriptionGracePeriods/ById/SubscriptionGracePeriodsById.PATCH.86c7258.generated.swift index 24192bf3..e87a5a45 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/SubscriptionGracePeriods/ById/SubscriptionGracePeriodsById.PATCH.86c7258.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/SubscriptionGracePeriods/ById/SubscriptionGracePeriodsById.PATCH.86c7258.generated.swift @@ -48,9 +48,12 @@ extension V1.SubscriptionGracePeriods.ById { /// - Returns: **200**, Single SubscriptionGracePeriod as `SubscriptionGracePeriodResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **422**, Unprocessable request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -64,6 +67,9 @@ extension V1.SubscriptionGracePeriods.ById { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) @@ -73,6 +79,12 @@ extension V1.SubscriptionGracePeriods.ById { case 409: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 422: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/SubscriptionGroupLocalizations/ById/SubscriptionGroupLocalizationsById.DELETE.8ac8701.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/SubscriptionGroupLocalizations/ById/SubscriptionGroupLocalizationsById.DELETE.8ac8701.generated.swift index 1f59c5d9..0e509986 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/SubscriptionGroupLocalizations/ById/SubscriptionGroupLocalizationsById.DELETE.8ac8701.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/SubscriptionGroupLocalizations/ById/SubscriptionGroupLocalizationsById.DELETE.8ac8701.generated.swift @@ -31,11 +31,12 @@ extension V1.SubscriptionGroupLocalizations.ById { return urlRequest } - /// - Returns: **204**, Success (no content) /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -43,12 +44,12 @@ extension V1.SubscriptionGroupLocalizations.ById { } switch urlResponse.statusCode { - case 204: - return - case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) @@ -58,6 +59,9 @@ extension V1.SubscriptionGroupLocalizations.ById { case 409: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/SubscriptionGroupLocalizations/ById/SubscriptionGroupLocalizationsById.GET.8ac8701.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/SubscriptionGroupLocalizations/ById/SubscriptionGroupLocalizationsById.GET.8ac8701.generated.swift index 0b4c7a41..7cd72006 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/SubscriptionGroupLocalizations/ById/SubscriptionGroupLocalizationsById.GET.8ac8701.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/SubscriptionGroupLocalizations/ById/SubscriptionGroupLocalizationsById.GET.8ac8701.generated.swift @@ -44,8 +44,10 @@ extension V1.SubscriptionGroupLocalizations.ById { /// - Returns: **200**, Single SubscriptionGroupLocalization as `SubscriptionGroupLocalizationResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -59,12 +61,18 @@ extension V1.SubscriptionGroupLocalizations.ById { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 404: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -87,34 +95,35 @@ extension V1.SubscriptionGroupLocalizations.ById.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum SubscriptionGroupLocalizations: Hashable, Codable, RawRepresentable { - case customAppName - case locale - case name - case state - case subscriptionGroup - case unknown(String) - - public var rawValue: String { - switch self { - case .customAppName: return "customAppName" - case .locale: return "locale" - case .name: return "name" - case .state: return "state" - case .subscriptionGroup: return "subscriptionGroup" - case .unknown(let rawValue): return rawValue - } + public struct SubscriptionGroupLocalizations: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var customAppName: Self { + .init(rawValue: "customAppName") + } + + public static var locale: Self { + .init(rawValue: "locale") + } + + public static var name: Self { + .init(rawValue: "name") + } + + public static var state: Self { + .init(rawValue: "state") } + public static var subscriptionGroup: Self { + .init(rawValue: "subscriptionGroup") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "customAppName": self = .customAppName - case "locale": self = .locale - case "name": self = .name - case "state": self = .state - case "subscriptionGroup": self = .subscriptionGroup - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } @@ -132,22 +141,19 @@ extension V1.SubscriptionGroupLocalizations.ById.GET { } } - public enum Include: Hashable, Codable, RawRepresentable { - case subscriptionGroup - case unknown(String) + public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var subscriptionGroup: Self { + .init(rawValue: "subscriptionGroup") + } - public var rawValue: String { - switch self { - case .subscriptionGroup: return "subscriptionGroup" - case .unknown(let rawValue): return rawValue - } + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "subscriptionGroup": self = .subscriptionGroup - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/SubscriptionGroupLocalizations/ById/SubscriptionGroupLocalizationsById.PATCH.8ac8701.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/SubscriptionGroupLocalizations/ById/SubscriptionGroupLocalizationsById.PATCH.8ac8701.generated.swift index 72830db1..71637ab6 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/SubscriptionGroupLocalizations/ById/SubscriptionGroupLocalizationsById.PATCH.8ac8701.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/SubscriptionGroupLocalizations/ById/SubscriptionGroupLocalizationsById.PATCH.8ac8701.generated.swift @@ -48,9 +48,12 @@ extension V1.SubscriptionGroupLocalizations.ById { /// - Returns: **200**, Single SubscriptionGroupLocalization as `SubscriptionGroupLocalizationResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **422**, Unprocessable request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -64,6 +67,9 @@ extension V1.SubscriptionGroupLocalizations.ById { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) @@ -73,6 +79,12 @@ extension V1.SubscriptionGroupLocalizations.ById { case 409: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 422: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/SubscriptionGroupLocalizations/SubscriptionGroupLocalizations.POST.1dd2d21.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/SubscriptionGroupLocalizations/SubscriptionGroupLocalizations.POST.1dd2d21.generated.swift index 5fd8a03f..43b82488 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/SubscriptionGroupLocalizations/SubscriptionGroupLocalizations.POST.1dd2d21.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/SubscriptionGroupLocalizations/SubscriptionGroupLocalizations.POST.1dd2d21.generated.swift @@ -41,8 +41,11 @@ extension V1.SubscriptionGroupLocalizations { /// - Returns: **201**, Single SubscriptionGroupLocalization as `SubscriptionGroupLocalizationResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **422**, Unprocessable request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -56,12 +59,21 @@ extension V1.SubscriptionGroupLocalizations { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 409: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 422: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/SubscriptionGroupSubmissions/SubscriptionGroupSubmissions.POST.fa4dadd.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/SubscriptionGroupSubmissions/SubscriptionGroupSubmissions.POST.fa4dadd.generated.swift index b21e4036..973b4494 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/SubscriptionGroupSubmissions/SubscriptionGroupSubmissions.POST.fa4dadd.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/SubscriptionGroupSubmissions/SubscriptionGroupSubmissions.POST.fa4dadd.generated.swift @@ -41,8 +41,11 @@ extension V1.SubscriptionGroupSubmissions { /// - Returns: **201**, Single SubscriptionGroupSubmission as `SubscriptionGroupSubmissionResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **422**, Unprocessable request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -56,12 +59,21 @@ extension V1.SubscriptionGroupSubmissions { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 409: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 422: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/SubscriptionGroups/ById/Relationships/SubscriptionGroupLocalizations/SubscriptionGroupsByIdRelationshipsSubscriptionGroupLocalizations.GET.aef4047.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/SubscriptionGroups/ById/Relationships/SubscriptionGroupLocalizations/SubscriptionGroupsByIdRelationshipsSubscriptionGroupLocalizations.GET.aef4047.generated.swift new file mode 100644 index 00000000..dd8b776b --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/SubscriptionGroups/ById/Relationships/SubscriptionGroupLocalizations/SubscriptionGroupsByIdRelationshipsSubscriptionGroupLocalizations.GET.aef4047.generated.swift @@ -0,0 +1,88 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.SubscriptionGroups.ById.Relationships.SubscriptionGroupLocalizations { + public struct GET: Endpoint { + public typealias Response = SubscriptionGroupSubscriptionGroupLocalizationsLinkagesResponse + + public var path: String { + "/v1/subscriptionGroups/\(id)/relationships/subscriptionGroupLocalizations" + } + + /// the id of the requested resource + public var id: String + + public var parameters: Parameters = Parameters() + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + components?.queryItems = [ + URLQueryItem(name: "limit", + value: parameters.limit.map { "\($0)" }) + ].filter { $0.value != nil } + if components?.queryItems?.isEmpty ?? false { + components?.queryItems = nil + } + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "GET" + return urlRequest + } + + /// - Returns: **200**, List of related linkages as `SubscriptionGroupSubscriptionGroupLocalizationsLinkagesResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(SubscriptionGroupSubscriptionGroupLocalizationsLinkagesResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +extension V1.SubscriptionGroups.ById.Relationships.SubscriptionGroupLocalizations.GET { + public struct Parameters: Hashable { + /// maximum resources per page + public var limit: Int? + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/SubscriptionGroups/ById/Relationships/Subscriptions/SubscriptionGroupsByIdRelationshipsSubscriptions.GET.e652166.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/SubscriptionGroups/ById/Relationships/Subscriptions/SubscriptionGroupsByIdRelationshipsSubscriptions.GET.e652166.generated.swift new file mode 100644 index 00000000..5928ad5f --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/SubscriptionGroups/ById/Relationships/Subscriptions/SubscriptionGroupsByIdRelationshipsSubscriptions.GET.e652166.generated.swift @@ -0,0 +1,88 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.SubscriptionGroups.ById.Relationships.Subscriptions { + public struct GET: Endpoint { + public typealias Response = SubscriptionGroupSubscriptionsLinkagesResponse + + public var path: String { + "/v1/subscriptionGroups/\(id)/relationships/subscriptions" + } + + /// the id of the requested resource + public var id: String + + public var parameters: Parameters = Parameters() + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + components?.queryItems = [ + URLQueryItem(name: "limit", + value: parameters.limit.map { "\($0)" }) + ].filter { $0.value != nil } + if components?.queryItems?.isEmpty ?? false { + components?.queryItems = nil + } + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "GET" + return urlRequest + } + + /// - Returns: **200**, List of related linkages as `SubscriptionGroupSubscriptionsLinkagesResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(SubscriptionGroupSubscriptionsLinkagesResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +extension V1.SubscriptionGroups.ById.Relationships.Subscriptions.GET { + public struct Parameters: Hashable { + /// maximum resources per page + public var limit: Int? + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/SubscriptionGroups/ById/SubscriptionGroupLocalizations/SubscriptionGroupsByIdSubscriptionGroupLocalizations.GET.3b1b1be.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/SubscriptionGroups/ById/SubscriptionGroupLocalizations/SubscriptionGroupsByIdSubscriptionGroupLocalizations.GET.3b1b1be.generated.swift index 1dc97902..9d31d0b6 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/SubscriptionGroups/ById/SubscriptionGroupLocalizations/SubscriptionGroupsByIdSubscriptionGroupLocalizations.GET.3b1b1be.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/SubscriptionGroups/ById/SubscriptionGroupLocalizations/SubscriptionGroupsByIdSubscriptionGroupLocalizations.GET.3b1b1be.generated.swift @@ -48,8 +48,10 @@ extension V1.SubscriptionGroups.ById.SubscriptionGroupLocalizations { /// - Returns: **200**, List of SubscriptionGroupLocalizations as `SubscriptionGroupLocalizationsResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -63,12 +65,18 @@ extension V1.SubscriptionGroups.ById.SubscriptionGroupLocalizations { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 404: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -94,62 +102,59 @@ extension V1.SubscriptionGroups.ById.SubscriptionGroupLocalizations.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum SubscriptionGroupLocalizations: Hashable, Codable, RawRepresentable { - case customAppName - case locale - case name - case state - case subscriptionGroup - case unknown(String) - - public var rawValue: String { - switch self { - case .customAppName: return "customAppName" - case .locale: return "locale" - case .name: return "name" - case .state: return "state" - case .subscriptionGroup: return "subscriptionGroup" - case .unknown(let rawValue): return rawValue - } + public struct SubscriptionGroupLocalizations: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var customAppName: Self { + .init(rawValue: "customAppName") + } + + public static var locale: Self { + .init(rawValue: "locale") + } + + public static var name: Self { + .init(rawValue: "name") + } + + public static var state: Self { + .init(rawValue: "state") + } + + public static var subscriptionGroup: Self { + .init(rawValue: "subscriptionGroup") + } + + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "customAppName": self = .customAppName - case "locale": self = .locale - case "name": self = .name - case "state": self = .state - case "subscriptionGroup": self = .subscriptionGroup - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum SubscriptionGroups: Hashable, Codable, RawRepresentable { - case app - case referenceName - case subscriptionGroupLocalizations - case subscriptions - case unknown(String) - - public var rawValue: String { - switch self { - case .app: return "app" - case .referenceName: return "referenceName" - case .subscriptionGroupLocalizations: return "subscriptionGroupLocalizations" - case .subscriptions: return "subscriptions" - case .unknown(let rawValue): return rawValue - } + public struct SubscriptionGroups: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var referenceName: Self { + .init(rawValue: "referenceName") + } + + public static var subscriptionGroupLocalizations: Self { + .init(rawValue: "subscriptionGroupLocalizations") } + public static var subscriptions: Self { + .init(rawValue: "subscriptions") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "app": self = .app - case "referenceName": self = .referenceName - case "subscriptionGroupLocalizations": self = .subscriptionGroupLocalizations - case "subscriptions": self = .subscriptions - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } @@ -172,22 +177,19 @@ extension V1.SubscriptionGroups.ById.SubscriptionGroupLocalizations.GET { } } - public enum Include: Hashable, Codable, RawRepresentable { - case subscriptionGroup - case unknown(String) + public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var subscriptionGroup: Self { + .init(rawValue: "subscriptionGroup") + } - public var rawValue: String { - switch self { - case .subscriptionGroup: return "subscriptionGroup" - case .unknown(let rawValue): return rawValue - } + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "subscriptionGroup": self = .subscriptionGroup - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/SubscriptionGroups/ById/SubscriptionGroupsById.DELETE.216dec1.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/SubscriptionGroups/ById/SubscriptionGroupsById.DELETE.216dec1.generated.swift index 1527f7d3..772f306c 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/SubscriptionGroups/ById/SubscriptionGroupsById.DELETE.216dec1.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/SubscriptionGroups/ById/SubscriptionGroupsById.DELETE.216dec1.generated.swift @@ -31,11 +31,12 @@ extension V1.SubscriptionGroups.ById { return urlRequest } - /// - Returns: **204**, Success (no content) /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -43,12 +44,12 @@ extension V1.SubscriptionGroups.ById { } switch urlResponse.statusCode { - case 204: - return - case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) @@ -58,6 +59,9 @@ extension V1.SubscriptionGroups.ById { case 409: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/SubscriptionGroups/ById/SubscriptionGroupsById.GET.216dec1.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/SubscriptionGroups/ById/SubscriptionGroupsById.GET.216dec1.generated.swift index 659420cd..f6ebbc77 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/SubscriptionGroups/ById/SubscriptionGroupsById.GET.216dec1.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/SubscriptionGroups/ById/SubscriptionGroupsById.GET.216dec1.generated.swift @@ -52,8 +52,10 @@ extension V1.SubscriptionGroups.ById { /// - Returns: **200**, Single SubscriptionGroup as `SubscriptionGroupResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -67,12 +69,18 @@ extension V1.SubscriptionGroups.ById { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 404: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -97,132 +105,147 @@ extension V1.SubscriptionGroups.ById.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum SubscriptionGroupLocalizations: Hashable, Codable, RawRepresentable { - case customAppName - case locale - case name - case state - case subscriptionGroup - case unknown(String) - - public var rawValue: String { - switch self { - case .customAppName: return "customAppName" - case .locale: return "locale" - case .name: return "name" - case .state: return "state" - case .subscriptionGroup: return "subscriptionGroup" - case .unknown(let rawValue): return rawValue - } + public struct SubscriptionGroupLocalizations: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var customAppName: Self { + .init(rawValue: "customAppName") } + public static var locale: Self { + .init(rawValue: "locale") + } + + public static var name: Self { + .init(rawValue: "name") + } + + public static var state: Self { + .init(rawValue: "state") + } + + public static var subscriptionGroup: Self { + .init(rawValue: "subscriptionGroup") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "customAppName": self = .customAppName - case "locale": self = .locale - case "name": self = .name - case "state": self = .state - case "subscriptionGroup": self = .subscriptionGroup - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum SubscriptionGroups: Hashable, Codable, RawRepresentable { - case app - case referenceName - case subscriptionGroupLocalizations - case subscriptions - case unknown(String) + public struct SubscriptionGroups: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var referenceName: Self { + .init(rawValue: "referenceName") + } - public var rawValue: String { - switch self { - case .app: return "app" - case .referenceName: return "referenceName" - case .subscriptionGroupLocalizations: return "subscriptionGroupLocalizations" - case .subscriptions: return "subscriptions" - case .unknown(let rawValue): return rawValue - } + public static var subscriptionGroupLocalizations: Self { + .init(rawValue: "subscriptionGroupLocalizations") } + public static var subscriptions: Self { + .init(rawValue: "subscriptions") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "app": self = .app - case "referenceName": self = .referenceName - case "subscriptionGroupLocalizations": self = .subscriptionGroupLocalizations - case "subscriptions": self = .subscriptions - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum Subscriptions: Hashable, Codable, RawRepresentable { - case appStoreReviewScreenshot - case availableInAllTerritories - case familySharable - case group - case groupLevel - case introductoryOffers - case name - case offerCodes - case pricePoints - case prices - case productId - case promotedPurchase - case promotionalOffers - case reviewNote - case state - case subscriptionAvailability - case subscriptionLocalizations - case subscriptionPeriod - case unknown(String) - - public var rawValue: String { - switch self { - case .appStoreReviewScreenshot: return "appStoreReviewScreenshot" - case .availableInAllTerritories: return "availableInAllTerritories" - case .familySharable: return "familySharable" - case .group: return "group" - case .groupLevel: return "groupLevel" - case .introductoryOffers: return "introductoryOffers" - case .name: return "name" - case .offerCodes: return "offerCodes" - case .pricePoints: return "pricePoints" - case .prices: return "prices" - case .productId: return "productId" - case .promotedPurchase: return "promotedPurchase" - case .promotionalOffers: return "promotionalOffers" - case .reviewNote: return "reviewNote" - case .state: return "state" - case .subscriptionAvailability: return "subscriptionAvailability" - case .subscriptionLocalizations: return "subscriptionLocalizations" - case .subscriptionPeriod: return "subscriptionPeriod" - case .unknown(let rawValue): return rawValue - } + public struct Subscriptions: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var appStoreReviewScreenshot: Self { + .init(rawValue: "appStoreReviewScreenshot") + } + + public static var familySharable: Self { + .init(rawValue: "familySharable") + } + + public static var group: Self { + .init(rawValue: "group") + } + + public static var groupLevel: Self { + .init(rawValue: "groupLevel") + } + + public static var images: Self { + .init(rawValue: "images") + } + + public static var introductoryOffers: Self { + .init(rawValue: "introductoryOffers") + } + + public static var name: Self { + .init(rawValue: "name") } + public static var offerCodes: Self { + .init(rawValue: "offerCodes") + } + + public static var pricePoints: Self { + .init(rawValue: "pricePoints") + } + + public static var prices: Self { + .init(rawValue: "prices") + } + + public static var productId: Self { + .init(rawValue: "productId") + } + + public static var promotedPurchase: Self { + .init(rawValue: "promotedPurchase") + } + + public static var promotionalOffers: Self { + .init(rawValue: "promotionalOffers") + } + + public static var reviewNote: Self { + .init(rawValue: "reviewNote") + } + + public static var state: Self { + .init(rawValue: "state") + } + + public static var subscriptionAvailability: Self { + .init(rawValue: "subscriptionAvailability") + } + + public static var subscriptionLocalizations: Self { + .init(rawValue: "subscriptionLocalizations") + } + + public static var subscriptionPeriod: Self { + .init(rawValue: "subscriptionPeriod") + } + + public static var winBackOffers: Self { + .init(rawValue: "winBackOffers") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "appStoreReviewScreenshot": self = .appStoreReviewScreenshot - case "availableInAllTerritories": self = .availableInAllTerritories - case "familySharable": self = .familySharable - case "group": self = .group - case "groupLevel": self = .groupLevel - case "introductoryOffers": self = .introductoryOffers - case "name": self = .name - case "offerCodes": self = .offerCodes - case "pricePoints": self = .pricePoints - case "prices": self = .prices - case "productId": self = .productId - case "promotedPurchase": self = .promotedPurchase - case "promotionalOffers": self = .promotionalOffers - case "reviewNote": self = .reviewNote - case "state": self = .state - case "subscriptionAvailability": self = .subscriptionAvailability - case "subscriptionLocalizations": self = .subscriptionLocalizations - case "subscriptionPeriod": self = .subscriptionPeriod - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } @@ -250,25 +273,23 @@ extension V1.SubscriptionGroups.ById.GET { } } - public enum Include: Hashable, Codable, RawRepresentable { - case subscriptionGroupLocalizations - case subscriptions - case unknown(String) + public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var subscriptionGroupLocalizations: Self { + .init(rawValue: "subscriptionGroupLocalizations") + } - public var rawValue: String { - switch self { - case .subscriptionGroupLocalizations: return "subscriptionGroupLocalizations" - case .subscriptions: return "subscriptions" - case .unknown(let rawValue): return rawValue - } + public static var subscriptions: Self { + .init(rawValue: "subscriptions") } + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "subscriptionGroupLocalizations": self = .subscriptionGroupLocalizations - case "subscriptions": self = .subscriptions - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/SubscriptionGroups/ById/SubscriptionGroupsById.PATCH.216dec1.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/SubscriptionGroups/ById/SubscriptionGroupsById.PATCH.216dec1.generated.swift index 2957ba99..e4408985 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/SubscriptionGroups/ById/SubscriptionGroupsById.PATCH.216dec1.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/SubscriptionGroups/ById/SubscriptionGroupsById.PATCH.216dec1.generated.swift @@ -48,9 +48,12 @@ extension V1.SubscriptionGroups.ById { /// - Returns: **200**, Single SubscriptionGroup as `SubscriptionGroupResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **422**, Unprocessable request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -64,6 +67,9 @@ extension V1.SubscriptionGroups.ById { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) @@ -73,6 +79,12 @@ extension V1.SubscriptionGroups.ById { case 409: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 422: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/SubscriptionGroups/ById/Subscriptions/SubscriptionGroupsByIdSubscriptions.GET.c1878f2.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/SubscriptionGroups/ById/Subscriptions/SubscriptionGroupsByIdSubscriptions.GET.c1878f2.generated.swift index 17beb447..4cbbcd11 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/SubscriptionGroups/ById/Subscriptions/SubscriptionGroupsByIdSubscriptions.GET.c1878f2.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/SubscriptionGroups/ById/Subscriptions/SubscriptionGroupsByIdSubscriptions.GET.c1878f2.generated.swift @@ -36,6 +36,8 @@ extension V1.SubscriptionGroups.ById.Subscriptions { value: parameters.fields[.subscriptionAvailabilities]?.map { "\($0)" }.joined(separator: ",")), URLQueryItem(name: "fields[subscriptionGroups]", value: parameters.fields[.subscriptionGroups]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "fields[subscriptionImages]", + value: parameters.fields[.subscriptionImages]?.map { "\($0)" }.joined(separator: ",")), URLQueryItem(name: "fields[subscriptionIntroductoryOffers]", value: parameters.fields[.subscriptionIntroductoryOffers]?.map { "\($0)" }.joined(separator: ",")), URLQueryItem(name: "fields[subscriptionLocalizations]", @@ -48,6 +50,8 @@ extension V1.SubscriptionGroups.ById.Subscriptions { value: parameters.fields[.subscriptionPromotionalOffers]?.map { "\($0)" }.joined(separator: ",")), URLQueryItem(name: "fields[subscriptions]", value: parameters.fields[.subscriptions]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "fields[winBackOffers]", + value: parameters.fields[.winBackOffers]?.map { "\($0)" }.joined(separator: ",")), URLQueryItem(name: "filter[name]", value: parameters.filter[.name]?.map { "\($0)" }.joined(separator: ",")), URLQueryItem(name: "filter[productId]", @@ -56,6 +60,8 @@ extension V1.SubscriptionGroups.ById.Subscriptions { value: parameters.filter[.state]?.map { "\($0)" }.joined(separator: ",")), URLQueryItem(name: "include", value: parameters.include?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "limit[images]", + value: parameters.limit[.images].map { "\($0)" }), URLQueryItem(name: "limit[introductoryOffers]", value: parameters.limit[.introductoryOffers].map { "\($0)" }), URLQueryItem(name: "limit[offerCodes]", @@ -66,6 +72,8 @@ extension V1.SubscriptionGroups.ById.Subscriptions { value: parameters.limit[.promotionalOffers].map { "\($0)" }), URLQueryItem(name: "limit[subscriptionLocalizations]", value: parameters.limit[.subscriptionLocalizations].map { "\($0)" }), + URLQueryItem(name: "limit[winBackOffers]", + value: parameters.limit[.winBackOffers].map { "\($0)" }), URLQueryItem(name: "limit", value: parameters.limit[].map { "\($0)" }), URLQueryItem(name: "sort", @@ -82,8 +90,10 @@ extension V1.SubscriptionGroups.ById.Subscriptions { /// - Returns: **200**, List of Subscriptions as `SubscriptionsResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -97,12 +107,18 @@ extension V1.SubscriptionGroups.ById.Subscriptions { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 404: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -133,403 +149,523 @@ extension V1.SubscriptionGroups.ById.Subscriptions.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum PromotedPurchases: Hashable, Codable, RawRepresentable { - case app - case enabled - case inAppPurchaseV2 - case promotionImages - case state - case subscription - case visibleForAllUsers - case unknown(String) - - public var rawValue: String { - switch self { - case .app: return "app" - case .enabled: return "enabled" - case .inAppPurchaseV2: return "inAppPurchaseV2" - case .promotionImages: return "promotionImages" - case .state: return "state" - case .subscription: return "subscription" - case .visibleForAllUsers: return "visibleForAllUsers" - case .unknown(let rawValue): return rawValue - } + public struct PromotedPurchases: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var enabled: Self { + .init(rawValue: "enabled") + } + + public static var inAppPurchaseV2: Self { + .init(rawValue: "inAppPurchaseV2") + } + + public static var state: Self { + .init(rawValue: "state") + } + + public static var subscription: Self { + .init(rawValue: "subscription") } + public static var visibleForAllUsers: Self { + .init(rawValue: "visibleForAllUsers") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "app": self = .app - case "enabled": self = .enabled - case "inAppPurchaseV2": self = .inAppPurchaseV2 - case "promotionImages": self = .promotionImages - case "state": self = .state - case "subscription": self = .subscription - case "visibleForAllUsers": self = .visibleForAllUsers - default: self = .unknown(rawValue) - } - } - } - - public enum SubscriptionAppStoreReviewScreenshots: Hashable, Codable, RawRepresentable { - case assetDeliveryState - case assetToken - case assetType - case fileName - case fileSize - case imageAsset - case sourceFileChecksum - case subscription - case uploadOperations - case uploaded - case unknown(String) - - public var rawValue: String { - switch self { - case .assetDeliveryState: return "assetDeliveryState" - case .assetToken: return "assetToken" - case .assetType: return "assetType" - case .fileName: return "fileName" - case .fileSize: return "fileSize" - case .imageAsset: return "imageAsset" - case .sourceFileChecksum: return "sourceFileChecksum" - case .subscription: return "subscription" - case .uploadOperations: return "uploadOperations" - case .uploaded: return "uploaded" - case .unknown(let rawValue): return rawValue - } + self.rawValue = rawValue + } + } + + public struct SubscriptionAppStoreReviewScreenshots: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var assetDeliveryState: Self { + .init(rawValue: "assetDeliveryState") + } + + public static var assetToken: Self { + .init(rawValue: "assetToken") + } + + public static var assetType: Self { + .init(rawValue: "assetType") + } + + public static var fileName: Self { + .init(rawValue: "fileName") } + public static var fileSize: Self { + .init(rawValue: "fileSize") + } + + public static var imageAsset: Self { + .init(rawValue: "imageAsset") + } + + public static var sourceFileChecksum: Self { + .init(rawValue: "sourceFileChecksum") + } + + public static var subscription: Self { + .init(rawValue: "subscription") + } + + public static var uploadOperations: Self { + .init(rawValue: "uploadOperations") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "assetDeliveryState": self = .assetDeliveryState - case "assetToken": self = .assetToken - case "assetType": self = .assetType - case "fileName": self = .fileName - case "fileSize": self = .fileSize - case "imageAsset": self = .imageAsset - case "sourceFileChecksum": self = .sourceFileChecksum - case "subscription": self = .subscription - case "uploadOperations": self = .uploadOperations - case "uploaded": self = .uploaded - default: self = .unknown(rawValue) - } - } - } - - public enum SubscriptionAvailabilities: Hashable, Codable, RawRepresentable { - case availableInNewTerritories - case availableTerritories - case subscription - case unknown(String) - - public var rawValue: String { - switch self { - case .availableInNewTerritories: return "availableInNewTerritories" - case .availableTerritories: return "availableTerritories" - case .subscription: return "subscription" - case .unknown(let rawValue): return rawValue - } + self.rawValue = rawValue } + } + + public struct SubscriptionAvailabilities: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var availableInNewTerritories: Self { + .init(rawValue: "availableInNewTerritories") + } + + public static var availableTerritories: Self { + .init(rawValue: "availableTerritories") + } + + public var description: String { + rawValue + } + + public var rawValue: String public init(rawValue: String) { - switch rawValue { - case "availableInNewTerritories": self = .availableInNewTerritories - case "availableTerritories": self = .availableTerritories - case "subscription": self = .subscription - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum SubscriptionGroups: Hashable, Codable, RawRepresentable { - case app - case referenceName - case subscriptionGroupLocalizations - case subscriptions - case unknown(String) + public struct SubscriptionGroups: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var referenceName: Self { + .init(rawValue: "referenceName") + } + + public static var subscriptionGroupLocalizations: Self { + .init(rawValue: "subscriptionGroupLocalizations") + } - public var rawValue: String { - switch self { - case .app: return "app" - case .referenceName: return "referenceName" - case .subscriptionGroupLocalizations: return "subscriptionGroupLocalizations" - case .subscriptions: return "subscriptions" - case .unknown(let rawValue): return rawValue - } + public static var subscriptions: Self { + .init(rawValue: "subscriptions") } + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "app": self = .app - case "referenceName": self = .referenceName - case "subscriptionGroupLocalizations": self = .subscriptionGroupLocalizations - case "subscriptions": self = .subscriptions - default: self = .unknown(rawValue) - } - } - } - - public enum SubscriptionIntroductoryOffers: Hashable, Codable, RawRepresentable { - case duration - case endDate - case numberOfPeriods - case offerMode - case startDate - case subscription - case subscriptionPricePoint - case territory - case unknown(String) - - public var rawValue: String { - switch self { - case .duration: return "duration" - case .endDate: return "endDate" - case .numberOfPeriods: return "numberOfPeriods" - case .offerMode: return "offerMode" - case .startDate: return "startDate" - case .subscription: return "subscription" - case .subscriptionPricePoint: return "subscriptionPricePoint" - case .territory: return "territory" - case .unknown(let rawValue): return rawValue - } + self.rawValue = rawValue } + } + + public struct SubscriptionImages: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var assetToken: Self { + .init(rawValue: "assetToken") + } + + public static var fileName: Self { + .init(rawValue: "fileName") + } + + public static var fileSize: Self { + .init(rawValue: "fileSize") + } + + public static var imageAsset: Self { + .init(rawValue: "imageAsset") + } + + public static var sourceFileChecksum: Self { + .init(rawValue: "sourceFileChecksum") + } + + public static var state: Self { + .init(rawValue: "state") + } + + public static var subscription: Self { + .init(rawValue: "subscription") + } + + public static var uploadOperations: Self { + .init(rawValue: "uploadOperations") + } + + public var description: String { + rawValue + } + + public var rawValue: String public init(rawValue: String) { - switch rawValue { - case "duration": self = .duration - case "endDate": self = .endDate - case "numberOfPeriods": self = .numberOfPeriods - case "offerMode": self = .offerMode - case "startDate": self = .startDate - case "subscription": self = .subscription - case "subscriptionPricePoint": self = .subscriptionPricePoint - case "territory": self = .territory - default: self = .unknown(rawValue) - } - } - } - - public enum SubscriptionLocalizations: Hashable, Codable, RawRepresentable { - case description - case locale - case name - case state - case subscription - case unknown(String) - - public var rawValue: String { - switch self { - case .description: return "description" - case .locale: return "locale" - case .name: return "name" - case .state: return "state" - case .subscription: return "subscription" - case .unknown(let rawValue): return rawValue - } + self.rawValue = rawValue + } + } + + public struct SubscriptionIntroductoryOffers: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var duration: Self { + .init(rawValue: "duration") + } + + public static var endDate: Self { + .init(rawValue: "endDate") + } + + public static var numberOfPeriods: Self { + .init(rawValue: "numberOfPeriods") + } + + public static var offerMode: Self { + .init(rawValue: "offerMode") } + public static var startDate: Self { + .init(rawValue: "startDate") + } + + public static var subscription: Self { + .init(rawValue: "subscription") + } + + public static var subscriptionPricePoint: Self { + .init(rawValue: "subscriptionPricePoint") + } + + public static var territory: Self { + .init(rawValue: "territory") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "description": self = .description - case "locale": self = .locale - case "name": self = .name - case "state": self = .state - case "subscription": self = .subscription - default: self = .unknown(rawValue) - } - } - } - - public enum SubscriptionOfferCodes: Hashable, Codable, RawRepresentable { - case active - case customCodes - case customerEligibilities - case duration - case name - case numberOfPeriods - case offerEligibility - case offerMode - case oneTimeUseCodes - case prices - case subscription - case totalNumberOfCodes - case unknown(String) - - public var rawValue: String { - switch self { - case .active: return "active" - case .customCodes: return "customCodes" - case .customerEligibilities: return "customerEligibilities" - case .duration: return "duration" - case .name: return "name" - case .numberOfPeriods: return "numberOfPeriods" - case .offerEligibility: return "offerEligibility" - case .offerMode: return "offerMode" - case .oneTimeUseCodes: return "oneTimeUseCodes" - case .prices: return "prices" - case .subscription: return "subscription" - case .totalNumberOfCodes: return "totalNumberOfCodes" - case .unknown(let rawValue): return rawValue - } + self.rawValue = rawValue + } + } + + public struct SubscriptionLocalizations: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var description: Self { + .init(rawValue: "description") } + public static var locale: Self { + .init(rawValue: "locale") + } + + public static var name: Self { + .init(rawValue: "name") + } + + public static var state: Self { + .init(rawValue: "state") + } + + public static var subscription: Self { + .init(rawValue: "subscription") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "active": self = .active - case "customCodes": self = .customCodes - case "customerEligibilities": self = .customerEligibilities - case "duration": self = .duration - case "name": self = .name - case "numberOfPeriods": self = .numberOfPeriods - case "offerEligibility": self = .offerEligibility - case "offerMode": self = .offerMode - case "oneTimeUseCodes": self = .oneTimeUseCodes - case "prices": self = .prices - case "subscription": self = .subscription - case "totalNumberOfCodes": self = .totalNumberOfCodes - default: self = .unknown(rawValue) - } - } - } - - public enum SubscriptionPrices: Hashable, Codable, RawRepresentable { - case preserveCurrentPrice - case preserved - case startDate - case subscription - case subscriptionPricePoint - case territory - case unknown(String) - - public var rawValue: String { - switch self { - case .preserveCurrentPrice: return "preserveCurrentPrice" - case .preserved: return "preserved" - case .startDate: return "startDate" - case .subscription: return "subscription" - case .subscriptionPricePoint: return "subscriptionPricePoint" - case .territory: return "territory" - case .unknown(let rawValue): return rawValue - } + self.rawValue = rawValue } + } + + public struct SubscriptionOfferCodes: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var active: Self { + .init(rawValue: "active") + } + + public static var customCodes: Self { + .init(rawValue: "customCodes") + } + + public static var customerEligibilities: Self { + .init(rawValue: "customerEligibilities") + } + + public static var duration: Self { + .init(rawValue: "duration") + } + + public static var name: Self { + .init(rawValue: "name") + } + + public static var numberOfPeriods: Self { + .init(rawValue: "numberOfPeriods") + } + + public static var offerEligibility: Self { + .init(rawValue: "offerEligibility") + } + + public static var offerMode: Self { + .init(rawValue: "offerMode") + } + + public static var oneTimeUseCodes: Self { + .init(rawValue: "oneTimeUseCodes") + } + + public static var prices: Self { + .init(rawValue: "prices") + } + + public static var subscription: Self { + .init(rawValue: "subscription") + } + + public var description: String { + rawValue + } + + public var rawValue: String public init(rawValue: String) { - switch rawValue { - case "preserveCurrentPrice": self = .preserveCurrentPrice - case "preserved": self = .preserved - case "startDate": self = .startDate - case "subscription": self = .subscription - case "subscriptionPricePoint": self = .subscriptionPricePoint - case "territory": self = .territory - default: self = .unknown(rawValue) - } - } - } - - public enum SubscriptionPromotionalOffers: Hashable, Codable, RawRepresentable { - case duration - case name - case numberOfPeriods - case offerCode - case offerMode - case prices - case subscription - case unknown(String) - - public var rawValue: String { - switch self { - case .duration: return "duration" - case .name: return "name" - case .numberOfPeriods: return "numberOfPeriods" - case .offerCode: return "offerCode" - case .offerMode: return "offerMode" - case .prices: return "prices" - case .subscription: return "subscription" - case .unknown(let rawValue): return rawValue - } + self.rawValue = rawValue } + } + + public struct SubscriptionPrices: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var preserved: Self { + .init(rawValue: "preserved") + } + + public static var startDate: Self { + .init(rawValue: "startDate") + } + + public static var subscriptionPricePoint: Self { + .init(rawValue: "subscriptionPricePoint") + } + + public static var territory: Self { + .init(rawValue: "territory") + } + + public var description: String { + rawValue + } + + public var rawValue: String public init(rawValue: String) { - switch rawValue { - case "duration": self = .duration - case "name": self = .name - case "numberOfPeriods": self = .numberOfPeriods - case "offerCode": self = .offerCode - case "offerMode": self = .offerMode - case "prices": self = .prices - case "subscription": self = .subscription - default: self = .unknown(rawValue) - } - } - } - - public enum Subscriptions: Hashable, Codable, RawRepresentable { - case appStoreReviewScreenshot - case availableInAllTerritories - case familySharable - case group - case groupLevel - case introductoryOffers - case name - case offerCodes - case pricePoints - case prices - case productId - case promotedPurchase - case promotionalOffers - case reviewNote - case state - case subscriptionAvailability - case subscriptionLocalizations - case subscriptionPeriod - case unknown(String) - - public var rawValue: String { - switch self { - case .appStoreReviewScreenshot: return "appStoreReviewScreenshot" - case .availableInAllTerritories: return "availableInAllTerritories" - case .familySharable: return "familySharable" - case .group: return "group" - case .groupLevel: return "groupLevel" - case .introductoryOffers: return "introductoryOffers" - case .name: return "name" - case .offerCodes: return "offerCodes" - case .pricePoints: return "pricePoints" - case .prices: return "prices" - case .productId: return "productId" - case .promotedPurchase: return "promotedPurchase" - case .promotionalOffers: return "promotionalOffers" - case .reviewNote: return "reviewNote" - case .state: return "state" - case .subscriptionAvailability: return "subscriptionAvailability" - case .subscriptionLocalizations: return "subscriptionLocalizations" - case .subscriptionPeriod: return "subscriptionPeriod" - case .unknown(let rawValue): return rawValue - } + self.rawValue = rawValue + } + } + + public struct SubscriptionPromotionalOffers: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var duration: Self { + .init(rawValue: "duration") + } + + public static var name: Self { + .init(rawValue: "name") + } + + public static var numberOfPeriods: Self { + .init(rawValue: "numberOfPeriods") } + public static var offerCode: Self { + .init(rawValue: "offerCode") + } + + public static var offerMode: Self { + .init(rawValue: "offerMode") + } + + public static var prices: Self { + .init(rawValue: "prices") + } + + public static var subscription: Self { + .init(rawValue: "subscription") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "appStoreReviewScreenshot": self = .appStoreReviewScreenshot - case "availableInAllTerritories": self = .availableInAllTerritories - case "familySharable": self = .familySharable - case "group": self = .group - case "groupLevel": self = .groupLevel - case "introductoryOffers": self = .introductoryOffers - case "name": self = .name - case "offerCodes": self = .offerCodes - case "pricePoints": self = .pricePoints - case "prices": self = .prices - case "productId": self = .productId - case "promotedPurchase": self = .promotedPurchase - case "promotionalOffers": self = .promotionalOffers - case "reviewNote": self = .reviewNote - case "state": self = .state - case "subscriptionAvailability": self = .subscriptionAvailability - case "subscriptionLocalizations": self = .subscriptionLocalizations - case "subscriptionPeriod": self = .subscriptionPeriod - default: self = .unknown(rawValue) - } + self.rawValue = rawValue + } + } + + public struct Subscriptions: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var appStoreReviewScreenshot: Self { + .init(rawValue: "appStoreReviewScreenshot") + } + + public static var familySharable: Self { + .init(rawValue: "familySharable") + } + + public static var group: Self { + .init(rawValue: "group") + } + + public static var groupLevel: Self { + .init(rawValue: "groupLevel") + } + + public static var images: Self { + .init(rawValue: "images") + } + + public static var introductoryOffers: Self { + .init(rawValue: "introductoryOffers") + } + + public static var name: Self { + .init(rawValue: "name") + } + + public static var offerCodes: Self { + .init(rawValue: "offerCodes") + } + + public static var pricePoints: Self { + .init(rawValue: "pricePoints") + } + + public static var prices: Self { + .init(rawValue: "prices") + } + + public static var productId: Self { + .init(rawValue: "productId") + } + + public static var promotedPurchase: Self { + .init(rawValue: "promotedPurchase") + } + + public static var promotionalOffers: Self { + .init(rawValue: "promotionalOffers") + } + + public static var reviewNote: Self { + .init(rawValue: "reviewNote") + } + + public static var state: Self { + .init(rawValue: "state") + } + + public static var subscriptionAvailability: Self { + .init(rawValue: "subscriptionAvailability") + } + + public static var subscriptionLocalizations: Self { + .init(rawValue: "subscriptionLocalizations") + } + + public static var subscriptionPeriod: Self { + .init(rawValue: "subscriptionPeriod") + } + + public static var winBackOffers: Self { + .init(rawValue: "winBackOffers") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct WinBackOffers: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var customerEligibilityPaidSubscriptionDurationInMonths: Self { + .init(rawValue: "customerEligibilityPaidSubscriptionDurationInMonths") + } + + public static var customerEligibilityTimeSinceLastSubscribedInMonths: Self { + .init(rawValue: "customerEligibilityTimeSinceLastSubscribedInMonths") + } + + public static var customerEligibilityWaitBetweenOffersInMonths: Self { + .init(rawValue: "customerEligibilityWaitBetweenOffersInMonths") + } + + public static var duration: Self { + .init(rawValue: "duration") + } + + public static var endDate: Self { + .init(rawValue: "endDate") + } + + public static var offerId: Self { + .init(rawValue: "offerId") + } + + public static var offerMode: Self { + .init(rawValue: "offerMode") + } + + public static var periodCount: Self { + .init(rawValue: "periodCount") + } + + public static var prices: Self { + .init(rawValue: "prices") + } + + public static var priority: Self { + .init(rawValue: "priority") + } + + public static var promotionIntent: Self { + .init(rawValue: "promotionIntent") + } + + public static var referenceName: Self { + .init(rawValue: "referenceName") + } + + public static var startDate: Self { + .init(rawValue: "startDate") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue } } @@ -554,6 +690,11 @@ extension V1.SubscriptionGroups.ById.Subscriptions.GET { .init(key: "fields[subscriptionGroups]") } + /// the fields to include for returned resources of type subscriptionImages + public static var subscriptionImages: Relation<[SubscriptionImages]?> { + .init(key: "fields[subscriptionImages]") + } + /// the fields to include for returned resources of type subscriptionIntroductoryOffers public static var subscriptionIntroductoryOffers: Relation<[SubscriptionIntroductoryOffers]?> { .init(key: "fields[subscriptionIntroductoryOffers]") @@ -584,6 +725,11 @@ extension V1.SubscriptionGroups.ById.Subscriptions.GET { .init(key: "fields[subscriptions]") } + /// the fields to include for returned resources of type winBackOffers + public static var winBackOffers: Relation<[WinBackOffers]?> { + .init(key: "fields[winBackOffers]") + } + internal let key: String public func hash(into hasher: inout Hasher) { @@ -600,49 +746,55 @@ extension V1.SubscriptionGroups.ById.Subscriptions.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum State: Hashable, Codable, RawRepresentable { - case approved - case developerActionNeeded - case developerRemovedFromSale - case inReview - case missingMetadata - case pendingBinaryApproval - case readyToSubmit - case rejected - case removedFromSale - case waitingForReview - case unknown(String) - - public var rawValue: String { - switch self { - case .approved: return "APPROVED" - case .developerActionNeeded: return "DEVELOPER_ACTION_NEEDED" - case .developerRemovedFromSale: return "DEVELOPER_REMOVED_FROM_SALE" - case .inReview: return "IN_REVIEW" - case .missingMetadata: return "MISSING_METADATA" - case .pendingBinaryApproval: return "PENDING_BINARY_APPROVAL" - case .readyToSubmit: return "READY_TO_SUBMIT" - case .rejected: return "REJECTED" - case .removedFromSale: return "REMOVED_FROM_SALE" - case .waitingForReview: return "WAITING_FOR_REVIEW" - case .unknown(let rawValue): return rawValue - } + public struct State: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var approved: Self { + .init(rawValue: "APPROVED") + } + + public static var developerActionNeeded: Self { + .init(rawValue: "DEVELOPER_ACTION_NEEDED") + } + + public static var developerRemovedFromSale: Self { + .init(rawValue: "DEVELOPER_REMOVED_FROM_SALE") + } + + public static var inReview: Self { + .init(rawValue: "IN_REVIEW") + } + + public static var missingMetadata: Self { + .init(rawValue: "MISSING_METADATA") + } + + public static var pendingBinaryApproval: Self { + .init(rawValue: "PENDING_BINARY_APPROVAL") + } + + public static var readyToSubmit: Self { + .init(rawValue: "READY_TO_SUBMIT") + } + + public static var rejected: Self { + .init(rawValue: "REJECTED") + } + + public static var removedFromSale: Self { + .init(rawValue: "REMOVED_FROM_SALE") + } + + public static var waitingForReview: Self { + .init(rawValue: "WAITING_FOR_REVIEW") + } + + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "APPROVED": self = .approved - case "DEVELOPER_ACTION_NEEDED": self = .developerActionNeeded - case "DEVELOPER_REMOVED_FROM_SALE": self = .developerRemovedFromSale - case "IN_REVIEW": self = .inReview - case "MISSING_METADATA": self = .missingMetadata - case "PENDING_BINARY_APPROVAL": self = .pendingBinaryApproval - case "READY_TO_SUBMIT": self = .readyToSubmit - case "REJECTED": self = .rejected - case "REMOVED_FROM_SALE": self = .removedFromSale - case "WAITING_FOR_REVIEW": self = .waitingForReview - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } @@ -670,46 +822,59 @@ extension V1.SubscriptionGroups.ById.Subscriptions.GET { } } - public enum Include: Hashable, Codable, RawRepresentable { - case appStoreReviewScreenshot - case group - case introductoryOffers - case offerCodes - case prices - case promotedPurchase - case promotionalOffers - case subscriptionAvailability - case subscriptionLocalizations - case unknown(String) - - public var rawValue: String { - switch self { - case .appStoreReviewScreenshot: return "appStoreReviewScreenshot" - case .group: return "group" - case .introductoryOffers: return "introductoryOffers" - case .offerCodes: return "offerCodes" - case .prices: return "prices" - case .promotedPurchase: return "promotedPurchase" - case .promotionalOffers: return "promotionalOffers" - case .subscriptionAvailability: return "subscriptionAvailability" - case .subscriptionLocalizations: return "subscriptionLocalizations" - case .unknown(let rawValue): return rawValue - } + public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var appStoreReviewScreenshot: Self { + .init(rawValue: "appStoreReviewScreenshot") + } + + public static var group: Self { + .init(rawValue: "group") + } + + public static var images: Self { + .init(rawValue: "images") + } + + public static var introductoryOffers: Self { + .init(rawValue: "introductoryOffers") + } + + public static var offerCodes: Self { + .init(rawValue: "offerCodes") + } + + public static var prices: Self { + .init(rawValue: "prices") + } + + public static var promotedPurchase: Self { + .init(rawValue: "promotedPurchase") + } + + public static var promotionalOffers: Self { + .init(rawValue: "promotionalOffers") + } + + public static var subscriptionAvailability: Self { + .init(rawValue: "subscriptionAvailability") } + public static var subscriptionLocalizations: Self { + .init(rawValue: "subscriptionLocalizations") + } + + public static var winBackOffers: Self { + .init(rawValue: "winBackOffers") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "appStoreReviewScreenshot": self = .appStoreReviewScreenshot - case "group": self = .group - case "introductoryOffers": self = .introductoryOffers - case "offerCodes": self = .offerCodes - case "prices": self = .prices - case "promotedPurchase": self = .promotedPurchase - case "promotionalOffers": self = .promotionalOffers - case "subscriptionAvailability": self = .subscriptionAvailability - case "subscriptionLocalizations": self = .subscriptionLocalizations - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } @@ -727,6 +892,11 @@ extension V1.SubscriptionGroups.ById.Subscriptions.GET { private var values: [AnyHashable: AnyHashable] = [:] public struct Relation: Hashable { + /// maximum number of related images returned (when they are included) + public static var images: Relation { + .init(key: "limit[images]") + } + /// maximum number of related introductoryOffers returned (when they are included) public static var introductoryOffers: Relation { .init(key: "limit[introductoryOffers]") @@ -752,6 +922,11 @@ extension V1.SubscriptionGroups.ById.Subscriptions.GET { .init(key: "limit[subscriptionLocalizations]") } + /// maximum number of related winBackOffers returned (when they are included) + public static var winBackOffers: Relation { + .init(key: "limit[winBackOffers]") + } + internal let key: String public func hash(into hasher: inout Hasher) { @@ -760,25 +935,23 @@ extension V1.SubscriptionGroups.ById.Subscriptions.GET { } } - public enum Sort: Hashable, Codable, RawRepresentable { - case name - case nameDesc - case unknown(String) + public struct Sort: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var name: Self { + .init(rawValue: "name") + } - public var rawValue: String { - switch self { - case .name: return "name" - case .nameDesc: return "-name" - case .unknown(let rawValue): return rawValue - } + public static var nameDesc: Self { + .init(rawValue: "-name") } + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "name": self = .name - case "-name": self = .nameDesc - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/SubscriptionGroups/SubscriptionGroups.POST.7832dc5.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/SubscriptionGroups/SubscriptionGroups.POST.7832dc5.generated.swift index 13d06a93..617d81c7 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/SubscriptionGroups/SubscriptionGroups.POST.7832dc5.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/SubscriptionGroups/SubscriptionGroups.POST.7832dc5.generated.swift @@ -41,8 +41,11 @@ extension V1.SubscriptionGroups { /// - Returns: **201**, Single SubscriptionGroup as `SubscriptionGroupResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **422**, Unprocessable request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -56,12 +59,21 @@ extension V1.SubscriptionGroups { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 409: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 422: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/SubscriptionImages/ById/SubscriptionImagesById.DELETE.e335fd1.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/SubscriptionImages/ById/SubscriptionImagesById.DELETE.e335fd1.generated.swift new file mode 100644 index 00000000..d942eeb1 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/SubscriptionImages/ById/SubscriptionImagesById.DELETE.e335fd1.generated.swift @@ -0,0 +1,72 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.SubscriptionImages.ById { + public struct DELETE: Endpoint { + public typealias Parameters = Never + public typealias Response = Void + + public var path: String { + "/v1/subscriptionImages/\(id)" + } + + /// the id of the requested resource + public var id: String + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "DELETE" + return urlRequest + } + + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 409: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/SubscriptionImages/ById/SubscriptionImagesById.GET.e335fd1.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/SubscriptionImages/ById/SubscriptionImagesById.GET.e335fd1.generated.swift new file mode 100644 index 00000000..454fc518 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/SubscriptionImages/ById/SubscriptionImagesById.GET.e335fd1.generated.swift @@ -0,0 +1,174 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.SubscriptionImages.ById { + public struct GET: Endpoint { + public typealias Response = SubscriptionImageResponse + + public var path: String { + "/v1/subscriptionImages/\(id)" + } + + /// the id of the requested resource + public var id: String + + public var parameters: Parameters = Parameters() + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + components?.queryItems = [ + URLQueryItem(name: "fields[subscriptionImages]", + value: parameters.fields[.subscriptionImages]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "include", + value: parameters.include?.map { "\($0)" }.joined(separator: ",")) + ].filter { $0.value != nil } + if components?.queryItems?.isEmpty ?? false { + components?.queryItems = nil + } + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "GET" + return urlRequest + } + + /// - Returns: **200**, Single SubscriptionImage as `SubscriptionImageResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(SubscriptionImageResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +extension V1.SubscriptionImages.ById.GET { + public struct Parameters: Hashable { + public var fields: Fields = Fields() + + /// comma-separated list of relationships to include + public var include: [Include]? + + public struct Fields: Hashable { + public subscript (_ relation: Relation) -> T { + get { values[relation]?.base as! T } + set { values[relation] = AnyHashable(newValue) } + } + + private var values: [AnyHashable: AnyHashable] = [:] + + public struct SubscriptionImages: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var assetToken: Self { + .init(rawValue: "assetToken") + } + + public static var fileName: Self { + .init(rawValue: "fileName") + } + + public static var fileSize: Self { + .init(rawValue: "fileSize") + } + + public static var imageAsset: Self { + .init(rawValue: "imageAsset") + } + + public static var sourceFileChecksum: Self { + .init(rawValue: "sourceFileChecksum") + } + + public static var state: Self { + .init(rawValue: "state") + } + + public static var subscription: Self { + .init(rawValue: "subscription") + } + + public static var uploadOperations: Self { + .init(rawValue: "uploadOperations") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct Relation: Hashable { + /// the fields to include for returned resources of type subscriptionImages + public static var subscriptionImages: Relation<[SubscriptionImages]?> { + .init(key: "fields[subscriptionImages]") + } + + internal let key: String + + public func hash(into hasher: inout Hasher) { + hasher.combine(key) + } + } + } + + public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var subscription: Self { + .init(rawValue: "subscription") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/SubscriptionImages/ById/SubscriptionImagesById.PATCH.e335fd1.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/SubscriptionImages/ById/SubscriptionImagesById.PATCH.e335fd1.generated.swift new file mode 100644 index 00000000..003300a7 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/SubscriptionImages/ById/SubscriptionImagesById.PATCH.e335fd1.generated.swift @@ -0,0 +1,95 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.SubscriptionImages.ById { + public struct PATCH: Endpoint { + public typealias Parameters = SubscriptionImageUpdateRequest + public typealias Response = SubscriptionImageResponse + + public var path: String { + "/v1/subscriptionImages/\(id)" + } + + /// the id of the requested resource + public var id: String + + /// SubscriptionImage representation + public var parameters: Parameters + + public init( + id: String, + parameters: Parameters + ) { + self.id = id + self.parameters = parameters + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "PATCH" + + var jsonEncoder: JSONEncoder { + let encoder = JSONEncoder() + return encoder + } + + urlRequest?.httpBody = try jsonEncoder.encode(parameters) + urlRequest?.setValue("application/json", forHTTPHeaderField: "Content-Type") + return urlRequest + } + + /// - Returns: **200**, Single SubscriptionImage as `SubscriptionImageResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **422**, Unprocessable request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(SubscriptionImageResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 409: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 422: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/SubscriptionImages/SubscriptionImages.POST.d99e36c.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/SubscriptionImages/SubscriptionImages.POST.d99e36c.generated.swift new file mode 100644 index 00000000..2ba8d7db --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/SubscriptionImages/SubscriptionImages.POST.d99e36c.generated.swift @@ -0,0 +1,84 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.SubscriptionImages { + public struct POST: Endpoint { + public typealias Parameters = SubscriptionImageCreateRequest + public typealias Response = SubscriptionImageResponse + + public var path: String { + "/v1/subscriptionImages" + } + + /// SubscriptionImage representation + public var parameters: Parameters + + public init(parameters: Parameters) { + self.parameters = parameters + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "POST" + + var jsonEncoder: JSONEncoder { + let encoder = JSONEncoder() + return encoder + } + + urlRequest?.httpBody = try jsonEncoder.encode(parameters) + urlRequest?.setValue("application/json", forHTTPHeaderField: "Content-Type") + return urlRequest + } + + /// - Returns: **201**, Single SubscriptionImage as `SubscriptionImageResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **422**, Unprocessable request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 201: + return try jsonDecoder.decode(SubscriptionImageResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 409: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 422: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/SubscriptionIntroductoryOffers/ById/SubscriptionIntroductoryOffersById.DELETE.2d4490f.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/SubscriptionIntroductoryOffers/ById/SubscriptionIntroductoryOffersById.DELETE.2d4490f.generated.swift index e275b0a3..d2a90700 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/SubscriptionIntroductoryOffers/ById/SubscriptionIntroductoryOffersById.DELETE.2d4490f.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/SubscriptionIntroductoryOffers/ById/SubscriptionIntroductoryOffersById.DELETE.2d4490f.generated.swift @@ -31,11 +31,12 @@ extension V1.SubscriptionIntroductoryOffers.ById { return urlRequest } - /// - Returns: **204**, Success (no content) /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -43,12 +44,12 @@ extension V1.SubscriptionIntroductoryOffers.ById { } switch urlResponse.statusCode { - case 204: - return - case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) @@ -58,6 +59,9 @@ extension V1.SubscriptionIntroductoryOffers.ById { case 409: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/SubscriptionIntroductoryOffers/ById/SubscriptionIntroductoryOffersById.PATCH.2d4490f.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/SubscriptionIntroductoryOffers/ById/SubscriptionIntroductoryOffersById.PATCH.2d4490f.generated.swift index a21d4326..3bea813f 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/SubscriptionIntroductoryOffers/ById/SubscriptionIntroductoryOffersById.PATCH.2d4490f.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/SubscriptionIntroductoryOffers/ById/SubscriptionIntroductoryOffersById.PATCH.2d4490f.generated.swift @@ -48,9 +48,12 @@ extension V1.SubscriptionIntroductoryOffers.ById { /// - Returns: **200**, Single SubscriptionIntroductoryOffer as `SubscriptionIntroductoryOfferResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **422**, Unprocessable request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -64,6 +67,9 @@ extension V1.SubscriptionIntroductoryOffers.ById { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) @@ -73,6 +79,12 @@ extension V1.SubscriptionIntroductoryOffers.ById { case 409: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 422: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/SubscriptionIntroductoryOffers/SubscriptionIntroductoryOffers.POST.25d9919.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/SubscriptionIntroductoryOffers/SubscriptionIntroductoryOffers.POST.25d9919.generated.swift index 08f87814..3a97dfa1 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/SubscriptionIntroductoryOffers/SubscriptionIntroductoryOffers.POST.25d9919.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/SubscriptionIntroductoryOffers/SubscriptionIntroductoryOffers.POST.25d9919.generated.swift @@ -41,8 +41,11 @@ extension V1.SubscriptionIntroductoryOffers { /// - Returns: **201**, Single SubscriptionIntroductoryOffer as `SubscriptionIntroductoryOfferResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **422**, Unprocessable request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -56,12 +59,21 @@ extension V1.SubscriptionIntroductoryOffers { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 409: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 422: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/SubscriptionLocalizations/ById/SubscriptionLocalizationsById.DELETE.731e3ba.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/SubscriptionLocalizations/ById/SubscriptionLocalizationsById.DELETE.731e3ba.generated.swift index 07872669..dffbc7a6 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/SubscriptionLocalizations/ById/SubscriptionLocalizationsById.DELETE.731e3ba.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/SubscriptionLocalizations/ById/SubscriptionLocalizationsById.DELETE.731e3ba.generated.swift @@ -31,11 +31,12 @@ extension V1.SubscriptionLocalizations.ById { return urlRequest } - /// - Returns: **204**, Success (no content) /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -43,12 +44,12 @@ extension V1.SubscriptionLocalizations.ById { } switch urlResponse.statusCode { - case 204: - return - case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) @@ -58,6 +59,9 @@ extension V1.SubscriptionLocalizations.ById { case 409: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/SubscriptionLocalizations/ById/SubscriptionLocalizationsById.GET.731e3ba.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/SubscriptionLocalizations/ById/SubscriptionLocalizationsById.GET.731e3ba.generated.swift index c7d159b6..f1c1b814 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/SubscriptionLocalizations/ById/SubscriptionLocalizationsById.GET.731e3ba.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/SubscriptionLocalizations/ById/SubscriptionLocalizationsById.GET.731e3ba.generated.swift @@ -44,8 +44,10 @@ extension V1.SubscriptionLocalizations.ById { /// - Returns: **200**, Single SubscriptionLocalization as `SubscriptionLocalizationResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -59,12 +61,18 @@ extension V1.SubscriptionLocalizations.ById { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 404: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -87,34 +95,35 @@ extension V1.SubscriptionLocalizations.ById.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum SubscriptionLocalizations: Hashable, Codable, RawRepresentable { - case description - case locale - case name - case state - case subscription - case unknown(String) - - public var rawValue: String { - switch self { - case .description: return "description" - case .locale: return "locale" - case .name: return "name" - case .state: return "state" - case .subscription: return "subscription" - case .unknown(let rawValue): return rawValue - } + public struct SubscriptionLocalizations: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var description: Self { + .init(rawValue: "description") + } + + public static var locale: Self { + .init(rawValue: "locale") + } + + public static var name: Self { + .init(rawValue: "name") + } + + public static var state: Self { + .init(rawValue: "state") } + public static var subscription: Self { + .init(rawValue: "subscription") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "description": self = .description - case "locale": self = .locale - case "name": self = .name - case "state": self = .state - case "subscription": self = .subscription - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } @@ -132,22 +141,19 @@ extension V1.SubscriptionLocalizations.ById.GET { } } - public enum Include: Hashable, Codable, RawRepresentable { - case subscription - case unknown(String) + public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var subscription: Self { + .init(rawValue: "subscription") + } - public var rawValue: String { - switch self { - case .subscription: return "subscription" - case .unknown(let rawValue): return rawValue - } + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "subscription": self = .subscription - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/SubscriptionLocalizations/ById/SubscriptionLocalizationsById.PATCH.731e3ba.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/SubscriptionLocalizations/ById/SubscriptionLocalizationsById.PATCH.731e3ba.generated.swift index c6861cb4..3d612f80 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/SubscriptionLocalizations/ById/SubscriptionLocalizationsById.PATCH.731e3ba.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/SubscriptionLocalizations/ById/SubscriptionLocalizationsById.PATCH.731e3ba.generated.swift @@ -48,9 +48,12 @@ extension V1.SubscriptionLocalizations.ById { /// - Returns: **200**, Single SubscriptionLocalization as `SubscriptionLocalizationResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **422**, Unprocessable request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -64,6 +67,9 @@ extension V1.SubscriptionLocalizations.ById { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) @@ -73,6 +79,12 @@ extension V1.SubscriptionLocalizations.ById { case 409: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 422: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/SubscriptionLocalizations/SubscriptionLocalizations.POST.b0a7555.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/SubscriptionLocalizations/SubscriptionLocalizations.POST.b0a7555.generated.swift index 41b2c4eb..61d9c56d 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/SubscriptionLocalizations/SubscriptionLocalizations.POST.b0a7555.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/SubscriptionLocalizations/SubscriptionLocalizations.POST.b0a7555.generated.swift @@ -41,8 +41,11 @@ extension V1.SubscriptionLocalizations { /// - Returns: **201**, Single SubscriptionLocalization as `SubscriptionLocalizationResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **422**, Unprocessable request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -56,12 +59,21 @@ extension V1.SubscriptionLocalizations { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 409: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 422: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/SubscriptionOfferCodeCustomCodes/ById/SubscriptionOfferCodeCustomCodesById.GET.3300220.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/SubscriptionOfferCodeCustomCodes/ById/SubscriptionOfferCodeCustomCodesById.GET.3300220.generated.swift index ec108e7c..1cbe888c 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/SubscriptionOfferCodeCustomCodes/ById/SubscriptionOfferCodeCustomCodesById.GET.3300220.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/SubscriptionOfferCodeCustomCodes/ById/SubscriptionOfferCodeCustomCodesById.GET.3300220.generated.swift @@ -44,8 +44,10 @@ extension V1.SubscriptionOfferCodeCustomCodes.ById { /// - Returns: **200**, Single SubscriptionOfferCodeCustomCode as `SubscriptionOfferCodeCustomCodeResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -59,12 +61,18 @@ extension V1.SubscriptionOfferCodeCustomCodes.ById { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 404: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -87,37 +95,39 @@ extension V1.SubscriptionOfferCodeCustomCodes.ById.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum SubscriptionOfferCodeCustomCodes: Hashable, Codable, RawRepresentable { - case active - case createdDate - case customCode - case expirationDate - case numberOfCodes - case offerCode - case unknown(String) - - public var rawValue: String { - switch self { - case .active: return "active" - case .createdDate: return "createdDate" - case .customCode: return "customCode" - case .expirationDate: return "expirationDate" - case .numberOfCodes: return "numberOfCodes" - case .offerCode: return "offerCode" - case .unknown(let rawValue): return rawValue - } + public struct SubscriptionOfferCodeCustomCodes: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var active: Self { + .init(rawValue: "active") + } + + public static var createdDate: Self { + .init(rawValue: "createdDate") } + public static var customCode: Self { + .init(rawValue: "customCode") + } + + public static var expirationDate: Self { + .init(rawValue: "expirationDate") + } + + public static var numberOfCodes: Self { + .init(rawValue: "numberOfCodes") + } + + public static var offerCode: Self { + .init(rawValue: "offerCode") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "active": self = .active - case "createdDate": self = .createdDate - case "customCode": self = .customCode - case "expirationDate": self = .expirationDate - case "numberOfCodes": self = .numberOfCodes - case "offerCode": self = .offerCode - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } @@ -135,22 +145,19 @@ extension V1.SubscriptionOfferCodeCustomCodes.ById.GET { } } - public enum Include: Hashable, Codable, RawRepresentable { - case offerCode - case unknown(String) + public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var offerCode: Self { + .init(rawValue: "offerCode") + } - public var rawValue: String { - switch self { - case .offerCode: return "offerCode" - case .unknown(let rawValue): return rawValue - } + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "offerCode": self = .offerCode - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/SubscriptionOfferCodeCustomCodes/ById/SubscriptionOfferCodeCustomCodesById.PATCH.3300220.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/SubscriptionOfferCodeCustomCodes/ById/SubscriptionOfferCodeCustomCodesById.PATCH.3300220.generated.swift index 7b5996e8..c330114c 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/SubscriptionOfferCodeCustomCodes/ById/SubscriptionOfferCodeCustomCodesById.PATCH.3300220.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/SubscriptionOfferCodeCustomCodes/ById/SubscriptionOfferCodeCustomCodesById.PATCH.3300220.generated.swift @@ -48,9 +48,12 @@ extension V1.SubscriptionOfferCodeCustomCodes.ById { /// - Returns: **200**, Single SubscriptionOfferCodeCustomCode as `SubscriptionOfferCodeCustomCodeResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **422**, Unprocessable request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -64,6 +67,9 @@ extension V1.SubscriptionOfferCodeCustomCodes.ById { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) @@ -73,6 +79,12 @@ extension V1.SubscriptionOfferCodeCustomCodes.ById { case 409: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 422: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/SubscriptionOfferCodeCustomCodes/SubscriptionOfferCodeCustomCodes.POST.9c18b39.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/SubscriptionOfferCodeCustomCodes/SubscriptionOfferCodeCustomCodes.POST.9c18b39.generated.swift index 0f86d09d..8e972ca5 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/SubscriptionOfferCodeCustomCodes/SubscriptionOfferCodeCustomCodes.POST.9c18b39.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/SubscriptionOfferCodeCustomCodes/SubscriptionOfferCodeCustomCodes.POST.9c18b39.generated.swift @@ -41,8 +41,11 @@ extension V1.SubscriptionOfferCodeCustomCodes { /// - Returns: **201**, Single SubscriptionOfferCodeCustomCode as `SubscriptionOfferCodeCustomCodeResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **422**, Unprocessable request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -56,12 +59,21 @@ extension V1.SubscriptionOfferCodeCustomCodes { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 409: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 422: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/SubscriptionOfferCodeOneTimeUseCodes/ById/SubscriptionOfferCodeOneTimeUseCodesById.GET.5f16424.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/SubscriptionOfferCodeOneTimeUseCodes/ById/SubscriptionOfferCodeOneTimeUseCodesById.GET.5f16424.generated.swift index 79a94a53..0419acaa 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/SubscriptionOfferCodeOneTimeUseCodes/ById/SubscriptionOfferCodeOneTimeUseCodesById.GET.5f16424.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/SubscriptionOfferCodeOneTimeUseCodes/ById/SubscriptionOfferCodeOneTimeUseCodesById.GET.5f16424.generated.swift @@ -44,8 +44,10 @@ extension V1.SubscriptionOfferCodeOneTimeUseCodes.ById { /// - Returns: **200**, Single SubscriptionOfferCodeOneTimeUseCode as `SubscriptionOfferCodeOneTimeUseCodeResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -59,12 +61,18 @@ extension V1.SubscriptionOfferCodeOneTimeUseCodes.ById { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 404: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -87,37 +95,39 @@ extension V1.SubscriptionOfferCodeOneTimeUseCodes.ById.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum SubscriptionOfferCodeOneTimeUseCodes: Hashable, Codable, RawRepresentable { - case active - case createdDate - case expirationDate - case numberOfCodes - case offerCode - case values - case unknown(String) - - public var rawValue: String { - switch self { - case .active: return "active" - case .createdDate: return "createdDate" - case .expirationDate: return "expirationDate" - case .numberOfCodes: return "numberOfCodes" - case .offerCode: return "offerCode" - case .values: return "values" - case .unknown(let rawValue): return rawValue - } + public struct SubscriptionOfferCodeOneTimeUseCodes: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var active: Self { + .init(rawValue: "active") + } + + public static var createdDate: Self { + .init(rawValue: "createdDate") } + public static var expirationDate: Self { + .init(rawValue: "expirationDate") + } + + public static var numberOfCodes: Self { + .init(rawValue: "numberOfCodes") + } + + public static var offerCode: Self { + .init(rawValue: "offerCode") + } + + public static var values: Self { + .init(rawValue: "values") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "active": self = .active - case "createdDate": self = .createdDate - case "expirationDate": self = .expirationDate - case "numberOfCodes": self = .numberOfCodes - case "offerCode": self = .offerCode - case "values": self = .values - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } @@ -135,22 +145,19 @@ extension V1.SubscriptionOfferCodeOneTimeUseCodes.ById.GET { } } - public enum Include: Hashable, Codable, RawRepresentable { - case offerCode - case unknown(String) + public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var offerCode: Self { + .init(rawValue: "offerCode") + } - public var rawValue: String { - switch self { - case .offerCode: return "offerCode" - case .unknown(let rawValue): return rawValue - } + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "offerCode": self = .offerCode - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/SubscriptionOfferCodeOneTimeUseCodes/ById/SubscriptionOfferCodeOneTimeUseCodesById.PATCH.5f16424.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/SubscriptionOfferCodeOneTimeUseCodes/ById/SubscriptionOfferCodeOneTimeUseCodesById.PATCH.5f16424.generated.swift index d4af932a..cf2840a2 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/SubscriptionOfferCodeOneTimeUseCodes/ById/SubscriptionOfferCodeOneTimeUseCodesById.PATCH.5f16424.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/SubscriptionOfferCodeOneTimeUseCodes/ById/SubscriptionOfferCodeOneTimeUseCodesById.PATCH.5f16424.generated.swift @@ -48,9 +48,12 @@ extension V1.SubscriptionOfferCodeOneTimeUseCodes.ById { /// - Returns: **200**, Single SubscriptionOfferCodeOneTimeUseCode as `SubscriptionOfferCodeOneTimeUseCodeResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **422**, Unprocessable request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -64,6 +67,9 @@ extension V1.SubscriptionOfferCodeOneTimeUseCodes.ById { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) @@ -73,6 +79,12 @@ extension V1.SubscriptionOfferCodeOneTimeUseCodes.ById { case 409: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 422: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/SubscriptionOfferCodeOneTimeUseCodes/ById/Values/SubscriptionOfferCodeOneTimeUseCodesByIdValues.GET.ccf98b9.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/SubscriptionOfferCodeOneTimeUseCodes/ById/Values/SubscriptionOfferCodeOneTimeUseCodesByIdValues.GET.ccf98b9.generated.swift index 5fa693e9..ea1c0016 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/SubscriptionOfferCodeOneTimeUseCodes/ById/Values/SubscriptionOfferCodeOneTimeUseCodesByIdValues.GET.ccf98b9.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/SubscriptionOfferCodeOneTimeUseCodes/ById/Values/SubscriptionOfferCodeOneTimeUseCodesByIdValues.GET.ccf98b9.generated.swift @@ -41,8 +41,10 @@ extension V1.SubscriptionOfferCodeOneTimeUseCodes.ById.Values { /// - Returns: **200**, Single SubscriptionOfferCodeOneTimeUseCodeValue as `String` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -56,12 +58,18 @@ extension V1.SubscriptionOfferCodeOneTimeUseCodes.ById.Values { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 404: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/SubscriptionOfferCodeOneTimeUseCodes/SubscriptionOfferCodeOneTimeUseCodes.POST.52053ec.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/SubscriptionOfferCodeOneTimeUseCodes/SubscriptionOfferCodeOneTimeUseCodes.POST.52053ec.generated.swift index 4ea67439..73f5b401 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/SubscriptionOfferCodeOneTimeUseCodes/SubscriptionOfferCodeOneTimeUseCodes.POST.52053ec.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/SubscriptionOfferCodeOneTimeUseCodes/SubscriptionOfferCodeOneTimeUseCodes.POST.52053ec.generated.swift @@ -41,8 +41,11 @@ extension V1.SubscriptionOfferCodeOneTimeUseCodes { /// - Returns: **201**, Single SubscriptionOfferCodeOneTimeUseCode as `SubscriptionOfferCodeOneTimeUseCodeResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **422**, Unprocessable request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -56,12 +59,21 @@ extension V1.SubscriptionOfferCodeOneTimeUseCodes { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 409: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 422: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/SubscriptionOfferCodes/ById/CustomCodes/SubscriptionOfferCodesByIdCustomCodes.GET.2081035.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/SubscriptionOfferCodes/ById/CustomCodes/SubscriptionOfferCodesByIdCustomCodes.GET.2081035.generated.swift index d0f6d964..aecfd8d7 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/SubscriptionOfferCodes/ById/CustomCodes/SubscriptionOfferCodesByIdCustomCodes.GET.2081035.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/SubscriptionOfferCodes/ById/CustomCodes/SubscriptionOfferCodesByIdCustomCodes.GET.2081035.generated.swift @@ -48,8 +48,10 @@ extension V1.SubscriptionOfferCodes.ById.CustomCodes { /// - Returns: **200**, List of SubscriptionOfferCodeCustomCodes as `SubscriptionOfferCodeCustomCodesResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -63,12 +65,18 @@ extension V1.SubscriptionOfferCodes.ById.CustomCodes { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 404: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -94,89 +102,95 @@ extension V1.SubscriptionOfferCodes.ById.CustomCodes.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum SubscriptionOfferCodeCustomCodes: Hashable, Codable, RawRepresentable { - case active - case createdDate - case customCode - case expirationDate - case numberOfCodes - case offerCode - case unknown(String) - - public var rawValue: String { - switch self { - case .active: return "active" - case .createdDate: return "createdDate" - case .customCode: return "customCode" - case .expirationDate: return "expirationDate" - case .numberOfCodes: return "numberOfCodes" - case .offerCode: return "offerCode" - case .unknown(let rawValue): return rawValue - } + public struct SubscriptionOfferCodeCustomCodes: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var active: Self { + .init(rawValue: "active") + } + + public static var createdDate: Self { + .init(rawValue: "createdDate") + } + + public static var customCode: Self { + .init(rawValue: "customCode") + } + + public static var expirationDate: Self { + .init(rawValue: "expirationDate") + } + + public static var numberOfCodes: Self { + .init(rawValue: "numberOfCodes") + } + + public static var offerCode: Self { + .init(rawValue: "offerCode") } + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "active": self = .active - case "createdDate": self = .createdDate - case "customCode": self = .customCode - case "expirationDate": self = .expirationDate - case "numberOfCodes": self = .numberOfCodes - case "offerCode": self = .offerCode - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum SubscriptionOfferCodes: Hashable, Codable, RawRepresentable { - case active - case customCodes - case customerEligibilities - case duration - case name - case numberOfPeriods - case offerEligibility - case offerMode - case oneTimeUseCodes - case prices - case subscription - case totalNumberOfCodes - case unknown(String) - - public var rawValue: String { - switch self { - case .active: return "active" - case .customCodes: return "customCodes" - case .customerEligibilities: return "customerEligibilities" - case .duration: return "duration" - case .name: return "name" - case .numberOfPeriods: return "numberOfPeriods" - case .offerEligibility: return "offerEligibility" - case .offerMode: return "offerMode" - case .oneTimeUseCodes: return "oneTimeUseCodes" - case .prices: return "prices" - case .subscription: return "subscription" - case .totalNumberOfCodes: return "totalNumberOfCodes" - case .unknown(let rawValue): return rawValue - } + public struct SubscriptionOfferCodes: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var active: Self { + .init(rawValue: "active") + } + + public static var customCodes: Self { + .init(rawValue: "customCodes") + } + + public static var customerEligibilities: Self { + .init(rawValue: "customerEligibilities") + } + + public static var duration: Self { + .init(rawValue: "duration") + } + + public static var name: Self { + .init(rawValue: "name") + } + + public static var numberOfPeriods: Self { + .init(rawValue: "numberOfPeriods") + } + + public static var offerEligibility: Self { + .init(rawValue: "offerEligibility") + } + + public static var offerMode: Self { + .init(rawValue: "offerMode") + } + + public static var oneTimeUseCodes: Self { + .init(rawValue: "oneTimeUseCodes") } + public static var prices: Self { + .init(rawValue: "prices") + } + + public static var subscription: Self { + .init(rawValue: "subscription") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "active": self = .active - case "customCodes": self = .customCodes - case "customerEligibilities": self = .customerEligibilities - case "duration": self = .duration - case "name": self = .name - case "numberOfPeriods": self = .numberOfPeriods - case "offerEligibility": self = .offerEligibility - case "offerMode": self = .offerMode - case "oneTimeUseCodes": self = .oneTimeUseCodes - case "prices": self = .prices - case "subscription": self = .subscription - case "totalNumberOfCodes": self = .totalNumberOfCodes - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } @@ -199,22 +213,19 @@ extension V1.SubscriptionOfferCodes.ById.CustomCodes.GET { } } - public enum Include: Hashable, Codable, RawRepresentable { - case offerCode - case unknown(String) + public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var offerCode: Self { + .init(rawValue: "offerCode") + } - public var rawValue: String { - switch self { - case .offerCode: return "offerCode" - case .unknown(let rawValue): return rawValue - } + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "offerCode": self = .offerCode - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/SubscriptionOfferCodes/ById/OneTimeUseCodes/SubscriptionOfferCodesByIdOneTimeUseCodes.GET.2f05613.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/SubscriptionOfferCodes/ById/OneTimeUseCodes/SubscriptionOfferCodesByIdOneTimeUseCodes.GET.2f05613.generated.swift index dd79bdf4..b179be52 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/SubscriptionOfferCodes/ById/OneTimeUseCodes/SubscriptionOfferCodesByIdOneTimeUseCodes.GET.2f05613.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/SubscriptionOfferCodes/ById/OneTimeUseCodes/SubscriptionOfferCodesByIdOneTimeUseCodes.GET.2f05613.generated.swift @@ -48,8 +48,10 @@ extension V1.SubscriptionOfferCodes.ById.OneTimeUseCodes { /// - Returns: **200**, List of SubscriptionOfferCodeOneTimeUseCodes as `SubscriptionOfferCodeOneTimeUseCodesResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -63,12 +65,18 @@ extension V1.SubscriptionOfferCodes.ById.OneTimeUseCodes { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 404: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -94,89 +102,95 @@ extension V1.SubscriptionOfferCodes.ById.OneTimeUseCodes.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum SubscriptionOfferCodeOneTimeUseCodes: Hashable, Codable, RawRepresentable { - case active - case createdDate - case expirationDate - case numberOfCodes - case offerCode - case values - case unknown(String) - - public var rawValue: String { - switch self { - case .active: return "active" - case .createdDate: return "createdDate" - case .expirationDate: return "expirationDate" - case .numberOfCodes: return "numberOfCodes" - case .offerCode: return "offerCode" - case .values: return "values" - case .unknown(let rawValue): return rawValue - } + public struct SubscriptionOfferCodeOneTimeUseCodes: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var active: Self { + .init(rawValue: "active") + } + + public static var createdDate: Self { + .init(rawValue: "createdDate") + } + + public static var expirationDate: Self { + .init(rawValue: "expirationDate") + } + + public static var numberOfCodes: Self { + .init(rawValue: "numberOfCodes") + } + + public static var offerCode: Self { + .init(rawValue: "offerCode") + } + + public static var values: Self { + .init(rawValue: "values") } + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "active": self = .active - case "createdDate": self = .createdDate - case "expirationDate": self = .expirationDate - case "numberOfCodes": self = .numberOfCodes - case "offerCode": self = .offerCode - case "values": self = .values - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum SubscriptionOfferCodes: Hashable, Codable, RawRepresentable { - case active - case customCodes - case customerEligibilities - case duration - case name - case numberOfPeriods - case offerEligibility - case offerMode - case oneTimeUseCodes - case prices - case subscription - case totalNumberOfCodes - case unknown(String) - - public var rawValue: String { - switch self { - case .active: return "active" - case .customCodes: return "customCodes" - case .customerEligibilities: return "customerEligibilities" - case .duration: return "duration" - case .name: return "name" - case .numberOfPeriods: return "numberOfPeriods" - case .offerEligibility: return "offerEligibility" - case .offerMode: return "offerMode" - case .oneTimeUseCodes: return "oneTimeUseCodes" - case .prices: return "prices" - case .subscription: return "subscription" - case .totalNumberOfCodes: return "totalNumberOfCodes" - case .unknown(let rawValue): return rawValue - } + public struct SubscriptionOfferCodes: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var active: Self { + .init(rawValue: "active") + } + + public static var customCodes: Self { + .init(rawValue: "customCodes") + } + + public static var customerEligibilities: Self { + .init(rawValue: "customerEligibilities") + } + + public static var duration: Self { + .init(rawValue: "duration") + } + + public static var name: Self { + .init(rawValue: "name") + } + + public static var numberOfPeriods: Self { + .init(rawValue: "numberOfPeriods") + } + + public static var offerEligibility: Self { + .init(rawValue: "offerEligibility") + } + + public static var offerMode: Self { + .init(rawValue: "offerMode") + } + + public static var oneTimeUseCodes: Self { + .init(rawValue: "oneTimeUseCodes") } + public static var prices: Self { + .init(rawValue: "prices") + } + + public static var subscription: Self { + .init(rawValue: "subscription") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "active": self = .active - case "customCodes": self = .customCodes - case "customerEligibilities": self = .customerEligibilities - case "duration": self = .duration - case "name": self = .name - case "numberOfPeriods": self = .numberOfPeriods - case "offerEligibility": self = .offerEligibility - case "offerMode": self = .offerMode - case "oneTimeUseCodes": self = .oneTimeUseCodes - case "prices": self = .prices - case "subscription": self = .subscription - case "totalNumberOfCodes": self = .totalNumberOfCodes - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } @@ -199,22 +213,19 @@ extension V1.SubscriptionOfferCodes.ById.OneTimeUseCodes.GET { } } - public enum Include: Hashable, Codable, RawRepresentable { - case offerCode - case unknown(String) + public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var offerCode: Self { + .init(rawValue: "offerCode") + } - public var rawValue: String { - switch self { - case .offerCode: return "offerCode" - case .unknown(let rawValue): return rawValue - } + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "offerCode": self = .offerCode - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/SubscriptionOfferCodes/ById/Prices/SubscriptionOfferCodesByIdPrices.GET.86de8a9.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/SubscriptionOfferCodes/ById/Prices/SubscriptionOfferCodesByIdPrices.GET.86de8a9.generated.swift index 8567ab67..07d733f6 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/SubscriptionOfferCodes/ById/Prices/SubscriptionOfferCodesByIdPrices.GET.86de8a9.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/SubscriptionOfferCodes/ById/Prices/SubscriptionOfferCodesByIdPrices.GET.86de8a9.generated.swift @@ -52,8 +52,10 @@ extension V1.SubscriptionOfferCodes.ById.Prices { /// - Returns: **200**, List of SubscriptionOfferCodePrices as `SubscriptionOfferCodePricesResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -67,12 +69,18 @@ extension V1.SubscriptionOfferCodes.ById.Prices { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 404: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -100,78 +108,71 @@ extension V1.SubscriptionOfferCodes.ById.Prices.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum SubscriptionOfferCodePrices: Hashable, Codable, RawRepresentable { - case subscriptionPricePoint - case territory - case unknown(String) + public struct SubscriptionOfferCodePrices: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var subscriptionPricePoint: Self { + .init(rawValue: "subscriptionPricePoint") + } + + public static var territory: Self { + .init(rawValue: "territory") + } - public var rawValue: String { - switch self { - case .subscriptionPricePoint: return "subscriptionPricePoint" - case .territory: return "territory" - case .unknown(let rawValue): return rawValue - } + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "subscriptionPricePoint": self = .subscriptionPricePoint - case "territory": self = .territory - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum SubscriptionPricePoints: Hashable, Codable, RawRepresentable { - case customerPrice - case equalizations - case proceeds - case proceedsYear2 - case subscription - case territory - case unknown(String) - - public var rawValue: String { - switch self { - case .customerPrice: return "customerPrice" - case .equalizations: return "equalizations" - case .proceeds: return "proceeds" - case .proceedsYear2: return "proceedsYear2" - case .subscription: return "subscription" - case .territory: return "territory" - case .unknown(let rawValue): return rawValue - } + public struct SubscriptionPricePoints: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var customerPrice: Self { + .init(rawValue: "customerPrice") + } + + public static var equalizations: Self { + .init(rawValue: "equalizations") + } + + public static var proceeds: Self { + .init(rawValue: "proceeds") + } + + public static var proceedsYear2: Self { + .init(rawValue: "proceedsYear2") } + public static var territory: Self { + .init(rawValue: "territory") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "customerPrice": self = .customerPrice - case "equalizations": self = .equalizations - case "proceeds": self = .proceeds - case "proceedsYear2": self = .proceedsYear2 - case "subscription": self = .subscription - case "territory": self = .territory - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum Territories: Hashable, Codable, RawRepresentable { - case currency - case unknown(String) + public struct Territories: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var currency: Self { + .init(rawValue: "currency") + } - public var rawValue: String { - switch self { - case .currency: return "currency" - case .unknown(let rawValue): return rawValue - } + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "currency": self = .currency - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } @@ -221,25 +222,23 @@ extension V1.SubscriptionOfferCodes.ById.Prices.GET { } } - public enum Include: Hashable, Codable, RawRepresentable { - case subscriptionPricePoint - case territory - case unknown(String) + public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var subscriptionPricePoint: Self { + .init(rawValue: "subscriptionPricePoint") + } - public var rawValue: String { - switch self { - case .subscriptionPricePoint: return "subscriptionPricePoint" - case .territory: return "territory" - case .unknown(let rawValue): return rawValue - } + public static var territory: Self { + .init(rawValue: "territory") + } + + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "subscriptionPricePoint": self = .subscriptionPricePoint - case "territory": self = .territory - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/SubscriptionOfferCodes/ById/Relationships/CustomCodes/SubscriptionOfferCodesByIdRelationshipsCustomCodes.GET.64eecdf.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/SubscriptionOfferCodes/ById/Relationships/CustomCodes/SubscriptionOfferCodesByIdRelationshipsCustomCodes.GET.64eecdf.generated.swift new file mode 100644 index 00000000..85536d6c --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/SubscriptionOfferCodes/ById/Relationships/CustomCodes/SubscriptionOfferCodesByIdRelationshipsCustomCodes.GET.64eecdf.generated.swift @@ -0,0 +1,88 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.SubscriptionOfferCodes.ById.Relationships.CustomCodes { + public struct GET: Endpoint { + public typealias Response = SubscriptionOfferCodeCustomCodesLinkagesResponse + + public var path: String { + "/v1/subscriptionOfferCodes/\(id)/relationships/customCodes" + } + + /// the id of the requested resource + public var id: String + + public var parameters: Parameters = Parameters() + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + components?.queryItems = [ + URLQueryItem(name: "limit", + value: parameters.limit.map { "\($0)" }) + ].filter { $0.value != nil } + if components?.queryItems?.isEmpty ?? false { + components?.queryItems = nil + } + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "GET" + return urlRequest + } + + /// - Returns: **200**, List of related linkages as `SubscriptionOfferCodeCustomCodesLinkagesResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(SubscriptionOfferCodeCustomCodesLinkagesResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +extension V1.SubscriptionOfferCodes.ById.Relationships.CustomCodes.GET { + public struct Parameters: Hashable { + /// maximum resources per page + public var limit: Int? + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/SubscriptionOfferCodes/ById/Relationships/OneTimeUseCodes/SubscriptionOfferCodesByIdRelationshipsOneTimeUseCodes.GET.5a205ac.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/SubscriptionOfferCodes/ById/Relationships/OneTimeUseCodes/SubscriptionOfferCodesByIdRelationshipsOneTimeUseCodes.GET.5a205ac.generated.swift new file mode 100644 index 00000000..4825df7b --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/SubscriptionOfferCodes/ById/Relationships/OneTimeUseCodes/SubscriptionOfferCodesByIdRelationshipsOneTimeUseCodes.GET.5a205ac.generated.swift @@ -0,0 +1,88 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.SubscriptionOfferCodes.ById.Relationships.OneTimeUseCodes { + public struct GET: Endpoint { + public typealias Response = SubscriptionOfferCodeOneTimeUseCodesLinkagesResponse + + public var path: String { + "/v1/subscriptionOfferCodes/\(id)/relationships/oneTimeUseCodes" + } + + /// the id of the requested resource + public var id: String + + public var parameters: Parameters = Parameters() + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + components?.queryItems = [ + URLQueryItem(name: "limit", + value: parameters.limit.map { "\($0)" }) + ].filter { $0.value != nil } + if components?.queryItems?.isEmpty ?? false { + components?.queryItems = nil + } + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "GET" + return urlRequest + } + + /// - Returns: **200**, List of related linkages as `SubscriptionOfferCodeOneTimeUseCodesLinkagesResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(SubscriptionOfferCodeOneTimeUseCodesLinkagesResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +extension V1.SubscriptionOfferCodes.ById.Relationships.OneTimeUseCodes.GET { + public struct Parameters: Hashable { + /// maximum resources per page + public var limit: Int? + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/SubscriptionOfferCodes/ById/Relationships/Prices/SubscriptionOfferCodesByIdRelationshipsPrices.GET.4dfcb0d.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/SubscriptionOfferCodes/ById/Relationships/Prices/SubscriptionOfferCodesByIdRelationshipsPrices.GET.4dfcb0d.generated.swift new file mode 100644 index 00000000..abcea961 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/SubscriptionOfferCodes/ById/Relationships/Prices/SubscriptionOfferCodesByIdRelationshipsPrices.GET.4dfcb0d.generated.swift @@ -0,0 +1,88 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.SubscriptionOfferCodes.ById.Relationships.Prices { + public struct GET: Endpoint { + public typealias Response = SubscriptionOfferCodePricesLinkagesResponse + + public var path: String { + "/v1/subscriptionOfferCodes/\(id)/relationships/prices" + } + + /// the id of the requested resource + public var id: String + + public var parameters: Parameters = Parameters() + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + components?.queryItems = [ + URLQueryItem(name: "limit", + value: parameters.limit.map { "\($0)" }) + ].filter { $0.value != nil } + if components?.queryItems?.isEmpty ?? false { + components?.queryItems = nil + } + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "GET" + return urlRequest + } + + /// - Returns: **200**, List of related linkages as `SubscriptionOfferCodePricesLinkagesResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(SubscriptionOfferCodePricesLinkagesResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +extension V1.SubscriptionOfferCodes.ById.Relationships.Prices.GET { + public struct Parameters: Hashable { + /// maximum resources per page + public var limit: Int? + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/SubscriptionOfferCodes/ById/SubscriptionOfferCodesById.GET.6f18d2e.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/SubscriptionOfferCodes/ById/SubscriptionOfferCodesById.GET.6f18d2e.generated.swift index b1375e7d..1e9ec348 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/SubscriptionOfferCodes/ById/SubscriptionOfferCodesById.GET.6f18d2e.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/SubscriptionOfferCodes/ById/SubscriptionOfferCodesById.GET.6f18d2e.generated.swift @@ -56,8 +56,10 @@ extension V1.SubscriptionOfferCodes.ById { /// - Returns: **200**, Single SubscriptionOfferCode as `SubscriptionOfferCodeResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -71,12 +73,18 @@ extension V1.SubscriptionOfferCodes.ById { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 404: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -101,145 +109,151 @@ extension V1.SubscriptionOfferCodes.ById.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum SubscriptionOfferCodeCustomCodes: Hashable, Codable, RawRepresentable { - case active - case createdDate - case customCode - case expirationDate - case numberOfCodes - case offerCode - case unknown(String) - - public var rawValue: String { - switch self { - case .active: return "active" - case .createdDate: return "createdDate" - case .customCode: return "customCode" - case .expirationDate: return "expirationDate" - case .numberOfCodes: return "numberOfCodes" - case .offerCode: return "offerCode" - case .unknown(let rawValue): return rawValue - } + public struct SubscriptionOfferCodeCustomCodes: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var active: Self { + .init(rawValue: "active") } + public static var createdDate: Self { + .init(rawValue: "createdDate") + } + + public static var customCode: Self { + .init(rawValue: "customCode") + } + + public static var expirationDate: Self { + .init(rawValue: "expirationDate") + } + + public static var numberOfCodes: Self { + .init(rawValue: "numberOfCodes") + } + + public static var offerCode: Self { + .init(rawValue: "offerCode") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "active": self = .active - case "createdDate": self = .createdDate - case "customCode": self = .customCode - case "expirationDate": self = .expirationDate - case "numberOfCodes": self = .numberOfCodes - case "offerCode": self = .offerCode - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum SubscriptionOfferCodeOneTimeUseCodes: Hashable, Codable, RawRepresentable { - case active - case createdDate - case expirationDate - case numberOfCodes - case offerCode - case values - case unknown(String) - - public var rawValue: String { - switch self { - case .active: return "active" - case .createdDate: return "createdDate" - case .expirationDate: return "expirationDate" - case .numberOfCodes: return "numberOfCodes" - case .offerCode: return "offerCode" - case .values: return "values" - case .unknown(let rawValue): return rawValue - } + public struct SubscriptionOfferCodeOneTimeUseCodes: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var active: Self { + .init(rawValue: "active") } + public static var createdDate: Self { + .init(rawValue: "createdDate") + } + + public static var expirationDate: Self { + .init(rawValue: "expirationDate") + } + + public static var numberOfCodes: Self { + .init(rawValue: "numberOfCodes") + } + + public static var offerCode: Self { + .init(rawValue: "offerCode") + } + + public static var values: Self { + .init(rawValue: "values") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "active": self = .active - case "createdDate": self = .createdDate - case "expirationDate": self = .expirationDate - case "numberOfCodes": self = .numberOfCodes - case "offerCode": self = .offerCode - case "values": self = .values - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum SubscriptionOfferCodePrices: Hashable, Codable, RawRepresentable { - case subscriptionPricePoint - case territory - case unknown(String) + public struct SubscriptionOfferCodePrices: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var subscriptionPricePoint: Self { + .init(rawValue: "subscriptionPricePoint") + } + + public static var territory: Self { + .init(rawValue: "territory") + } - public var rawValue: String { - switch self { - case .subscriptionPricePoint: return "subscriptionPricePoint" - case .territory: return "territory" - case .unknown(let rawValue): return rawValue - } + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "subscriptionPricePoint": self = .subscriptionPricePoint - case "territory": self = .territory - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum SubscriptionOfferCodes: Hashable, Codable, RawRepresentable { - case active - case customCodes - case customerEligibilities - case duration - case name - case numberOfPeriods - case offerEligibility - case offerMode - case oneTimeUseCodes - case prices - case subscription - case totalNumberOfCodes - case unknown(String) - - public var rawValue: String { - switch self { - case .active: return "active" - case .customCodes: return "customCodes" - case .customerEligibilities: return "customerEligibilities" - case .duration: return "duration" - case .name: return "name" - case .numberOfPeriods: return "numberOfPeriods" - case .offerEligibility: return "offerEligibility" - case .offerMode: return "offerMode" - case .oneTimeUseCodes: return "oneTimeUseCodes" - case .prices: return "prices" - case .subscription: return "subscription" - case .totalNumberOfCodes: return "totalNumberOfCodes" - case .unknown(let rawValue): return rawValue - } + public struct SubscriptionOfferCodes: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var active: Self { + .init(rawValue: "active") } + public static var customCodes: Self { + .init(rawValue: "customCodes") + } + + public static var customerEligibilities: Self { + .init(rawValue: "customerEligibilities") + } + + public static var duration: Self { + .init(rawValue: "duration") + } + + public static var name: Self { + .init(rawValue: "name") + } + + public static var numberOfPeriods: Self { + .init(rawValue: "numberOfPeriods") + } + + public static var offerEligibility: Self { + .init(rawValue: "offerEligibility") + } + + public static var offerMode: Self { + .init(rawValue: "offerMode") + } + + public static var oneTimeUseCodes: Self { + .init(rawValue: "oneTimeUseCodes") + } + + public static var prices: Self { + .init(rawValue: "prices") + } + + public static var subscription: Self { + .init(rawValue: "subscription") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "active": self = .active - case "customCodes": self = .customCodes - case "customerEligibilities": self = .customerEligibilities - case "duration": self = .duration - case "name": self = .name - case "numberOfPeriods": self = .numberOfPeriods - case "offerEligibility": self = .offerEligibility - case "offerMode": self = .offerMode - case "oneTimeUseCodes": self = .oneTimeUseCodes - case "prices": self = .prices - case "subscription": self = .subscription - case "totalNumberOfCodes": self = .totalNumberOfCodes - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } @@ -272,31 +286,31 @@ extension V1.SubscriptionOfferCodes.ById.GET { } } - public enum Include: Hashable, Codable, RawRepresentable { - case customCodes - case oneTimeUseCodes - case prices - case subscription - case unknown(String) - - public var rawValue: String { - switch self { - case .customCodes: return "customCodes" - case .oneTimeUseCodes: return "oneTimeUseCodes" - case .prices: return "prices" - case .subscription: return "subscription" - case .unknown(let rawValue): return rawValue - } + public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var customCodes: Self { + .init(rawValue: "customCodes") + } + + public static var oneTimeUseCodes: Self { + .init(rawValue: "oneTimeUseCodes") } + public static var prices: Self { + .init(rawValue: "prices") + } + + public static var subscription: Self { + .init(rawValue: "subscription") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "customCodes": self = .customCodes - case "oneTimeUseCodes": self = .oneTimeUseCodes - case "prices": self = .prices - case "subscription": self = .subscription - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/SubscriptionOfferCodes/ById/SubscriptionOfferCodesById.PATCH.6f18d2e.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/SubscriptionOfferCodes/ById/SubscriptionOfferCodesById.PATCH.6f18d2e.generated.swift index d06431e9..1b7fc34c 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/SubscriptionOfferCodes/ById/SubscriptionOfferCodesById.PATCH.6f18d2e.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/SubscriptionOfferCodes/ById/SubscriptionOfferCodesById.PATCH.6f18d2e.generated.swift @@ -48,9 +48,12 @@ extension V1.SubscriptionOfferCodes.ById { /// - Returns: **200**, Single SubscriptionOfferCode as `SubscriptionOfferCodeResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **422**, Unprocessable request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -64,6 +67,9 @@ extension V1.SubscriptionOfferCodes.ById { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) @@ -73,6 +79,12 @@ extension V1.SubscriptionOfferCodes.ById { case 409: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 422: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/SubscriptionOfferCodes/SubscriptionOfferCodes.POST.23dd2c3.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/SubscriptionOfferCodes/SubscriptionOfferCodes.POST.23dd2c3.generated.swift index 75709d7a..41101cd2 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/SubscriptionOfferCodes/SubscriptionOfferCodes.POST.23dd2c3.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/SubscriptionOfferCodes/SubscriptionOfferCodes.POST.23dd2c3.generated.swift @@ -41,8 +41,11 @@ extension V1.SubscriptionOfferCodes { /// - Returns: **201**, Single SubscriptionOfferCode as `SubscriptionOfferCodeResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **422**, Unprocessable request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -56,12 +59,21 @@ extension V1.SubscriptionOfferCodes { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 409: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 422: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/SubscriptionPricePoints/ById/Equalizations/SubscriptionPricePointsByIdEqualizations.GET.044b8ee.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/SubscriptionPricePoints/ById/Equalizations/SubscriptionPricePointsByIdEqualizations.GET.044b8ee.generated.swift index cdde677f..083b4493 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/SubscriptionPricePoints/ById/Equalizations/SubscriptionPricePointsByIdEqualizations.GET.044b8ee.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/SubscriptionPricePoints/ById/Equalizations/SubscriptionPricePointsByIdEqualizations.GET.044b8ee.generated.swift @@ -52,8 +52,10 @@ extension V1.SubscriptionPricePoints.ById.Equalizations { /// - Returns: **200**, List of SubscriptionPricePoints as `SubscriptionPricePointsResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -67,12 +69,18 @@ extension V1.SubscriptionPricePoints.ById.Equalizations { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 404: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -100,56 +108,51 @@ extension V1.SubscriptionPricePoints.ById.Equalizations.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum SubscriptionPricePoints: Hashable, Codable, RawRepresentable { - case customerPrice - case equalizations - case proceeds - case proceedsYear2 - case subscription - case territory - case unknown(String) - - public var rawValue: String { - switch self { - case .customerPrice: return "customerPrice" - case .equalizations: return "equalizations" - case .proceeds: return "proceeds" - case .proceedsYear2: return "proceedsYear2" - case .subscription: return "subscription" - case .territory: return "territory" - case .unknown(let rawValue): return rawValue - } + public struct SubscriptionPricePoints: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var customerPrice: Self { + .init(rawValue: "customerPrice") + } + + public static var equalizations: Self { + .init(rawValue: "equalizations") } + public static var proceeds: Self { + .init(rawValue: "proceeds") + } + + public static var proceedsYear2: Self { + .init(rawValue: "proceedsYear2") + } + + public static var territory: Self { + .init(rawValue: "territory") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "customerPrice": self = .customerPrice - case "equalizations": self = .equalizations - case "proceeds": self = .proceeds - case "proceedsYear2": self = .proceedsYear2 - case "subscription": self = .subscription - case "territory": self = .territory - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum Territories: Hashable, Codable, RawRepresentable { - case currency - case unknown(String) + public struct Territories: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var currency: Self { + .init(rawValue: "currency") + } - public var rawValue: String { - switch self { - case .currency: return "currency" - case .unknown(let rawValue): return rawValue - } + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "currency": self = .currency - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } @@ -199,22 +202,19 @@ extension V1.SubscriptionPricePoints.ById.Equalizations.GET { } } - public enum Include: Hashable, Codable, RawRepresentable { - case territory - case unknown(String) + public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var territory: Self { + .init(rawValue: "territory") + } - public var rawValue: String { - switch self { - case .territory: return "territory" - case .unknown(let rawValue): return rawValue - } + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "territory": self = .territory - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/SubscriptionPricePoints/ById/Relationships/Equalizations/SubscriptionPricePointsByIdRelationshipsEqualizations.GET.1fb0014.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/SubscriptionPricePoints/ById/Relationships/Equalizations/SubscriptionPricePointsByIdRelationshipsEqualizations.GET.1fb0014.generated.swift new file mode 100644 index 00000000..60d9fbf7 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/SubscriptionPricePoints/ById/Relationships/Equalizations/SubscriptionPricePointsByIdRelationshipsEqualizations.GET.1fb0014.generated.swift @@ -0,0 +1,88 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.SubscriptionPricePoints.ById.Relationships.Equalizations { + public struct GET: Endpoint { + public typealias Response = SubscriptionPricePointEqualizationsLinkagesResponse + + public var path: String { + "/v1/subscriptionPricePoints/\(id)/relationships/equalizations" + } + + /// the id of the requested resource + public var id: String + + public var parameters: Parameters = Parameters() + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + components?.queryItems = [ + URLQueryItem(name: "limit", + value: parameters.limit.map { "\($0)" }) + ].filter { $0.value != nil } + if components?.queryItems?.isEmpty ?? false { + components?.queryItems = nil + } + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "GET" + return urlRequest + } + + /// - Returns: **200**, List of related linkages as `SubscriptionPricePointEqualizationsLinkagesResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(SubscriptionPricePointEqualizationsLinkagesResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +extension V1.SubscriptionPricePoints.ById.Relationships.Equalizations.GET { + public struct Parameters: Hashable { + /// maximum resources per page + public var limit: Int? + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/SubscriptionPricePoints/ById/SubscriptionPricePointsById.GET.a50bff2.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/SubscriptionPricePoints/ById/SubscriptionPricePointsById.GET.a50bff2.generated.swift index 23274141..8c949429 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/SubscriptionPricePoints/ById/SubscriptionPricePointsById.GET.a50bff2.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/SubscriptionPricePoints/ById/SubscriptionPricePointsById.GET.a50bff2.generated.swift @@ -44,8 +44,10 @@ extension V1.SubscriptionPricePoints.ById { /// - Returns: **200**, Single SubscriptionPricePoint as `SubscriptionPricePointResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -59,12 +61,18 @@ extension V1.SubscriptionPricePoints.ById { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 404: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -87,37 +95,35 @@ extension V1.SubscriptionPricePoints.ById.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum SubscriptionPricePoints: Hashable, Codable, RawRepresentable { - case customerPrice - case equalizations - case proceeds - case proceedsYear2 - case subscription - case territory - case unknown(String) - - public var rawValue: String { - switch self { - case .customerPrice: return "customerPrice" - case .equalizations: return "equalizations" - case .proceeds: return "proceeds" - case .proceedsYear2: return "proceedsYear2" - case .subscription: return "subscription" - case .territory: return "territory" - case .unknown(let rawValue): return rawValue - } + public struct SubscriptionPricePoints: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var customerPrice: Self { + .init(rawValue: "customerPrice") + } + + public static var equalizations: Self { + .init(rawValue: "equalizations") + } + + public static var proceeds: Self { + .init(rawValue: "proceeds") + } + + public static var proceedsYear2: Self { + .init(rawValue: "proceedsYear2") } + public static var territory: Self { + .init(rawValue: "territory") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "customerPrice": self = .customerPrice - case "equalizations": self = .equalizations - case "proceeds": self = .proceeds - case "proceedsYear2": self = .proceedsYear2 - case "subscription": self = .subscription - case "territory": self = .territory - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } @@ -135,22 +141,19 @@ extension V1.SubscriptionPricePoints.ById.GET { } } - public enum Include: Hashable, Codable, RawRepresentable { - case territory - case unknown(String) + public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var territory: Self { + .init(rawValue: "territory") + } - public var rawValue: String { - switch self { - case .territory: return "territory" - case .unknown(let rawValue): return rawValue - } + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "territory": self = .territory - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/SubscriptionPrices/ById/SubscriptionPricesById.DELETE.4db4d31.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/SubscriptionPrices/ById/SubscriptionPricesById.DELETE.4db4d31.generated.swift index ad59ba53..9ebdb488 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/SubscriptionPrices/ById/SubscriptionPricesById.DELETE.4db4d31.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/SubscriptionPrices/ById/SubscriptionPricesById.DELETE.4db4d31.generated.swift @@ -31,11 +31,12 @@ extension V1.SubscriptionPrices.ById { return urlRequest } - /// - Returns: **204**, Success (no content) /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -43,12 +44,12 @@ extension V1.SubscriptionPrices.ById { } switch urlResponse.statusCode { - case 204: - return - case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) @@ -58,6 +59,9 @@ extension V1.SubscriptionPrices.ById { case 409: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/SubscriptionPrices/SubscriptionPrices.POST.5874aae.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/SubscriptionPrices/SubscriptionPrices.POST.5874aae.generated.swift index 12cec468..83640492 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/SubscriptionPrices/SubscriptionPrices.POST.5874aae.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/SubscriptionPrices/SubscriptionPrices.POST.5874aae.generated.swift @@ -41,8 +41,11 @@ extension V1.SubscriptionPrices { /// - Returns: **201**, Single SubscriptionPrice as `SubscriptionPriceResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **422**, Unprocessable request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -56,12 +59,21 @@ extension V1.SubscriptionPrices { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 409: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 422: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/SubscriptionPromotionalOffers/ById/Prices/SubscriptionPromotionalOffersByIdPrices.GET.45d0d63.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/SubscriptionPromotionalOffers/ById/Prices/SubscriptionPromotionalOffersByIdPrices.GET.45d0d63.generated.swift index 1686a3a1..806984a6 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/SubscriptionPromotionalOffers/ById/Prices/SubscriptionPromotionalOffersByIdPrices.GET.45d0d63.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/SubscriptionPromotionalOffers/ById/Prices/SubscriptionPromotionalOffersByIdPrices.GET.45d0d63.generated.swift @@ -52,8 +52,10 @@ extension V1.SubscriptionPromotionalOffers.ById.Prices { /// - Returns: **200**, List of SubscriptionPromotionalOfferPrices as `SubscriptionPromotionalOfferPricesResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -67,12 +69,18 @@ extension V1.SubscriptionPromotionalOffers.ById.Prices { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 404: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -100,78 +108,71 @@ extension V1.SubscriptionPromotionalOffers.ById.Prices.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum SubscriptionPricePoints: Hashable, Codable, RawRepresentable { - case customerPrice - case equalizations - case proceeds - case proceedsYear2 - case subscription - case territory - case unknown(String) - - public var rawValue: String { - switch self { - case .customerPrice: return "customerPrice" - case .equalizations: return "equalizations" - case .proceeds: return "proceeds" - case .proceedsYear2: return "proceedsYear2" - case .subscription: return "subscription" - case .territory: return "territory" - case .unknown(let rawValue): return rawValue - } + public struct SubscriptionPricePoints: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var customerPrice: Self { + .init(rawValue: "customerPrice") + } + + public static var equalizations: Self { + .init(rawValue: "equalizations") + } + + public static var proceeds: Self { + .init(rawValue: "proceeds") + } + + public static var proceedsYear2: Self { + .init(rawValue: "proceedsYear2") + } + + public static var territory: Self { + .init(rawValue: "territory") + } + + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "customerPrice": self = .customerPrice - case "equalizations": self = .equalizations - case "proceeds": self = .proceeds - case "proceedsYear2": self = .proceedsYear2 - case "subscription": self = .subscription - case "territory": self = .territory - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum SubscriptionPromotionalOfferPrices: Hashable, Codable, RawRepresentable { - case subscriptionPricePoint - case territory - case unknown(String) + public struct SubscriptionPromotionalOfferPrices: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var subscriptionPricePoint: Self { + .init(rawValue: "subscriptionPricePoint") + } + + public static var territory: Self { + .init(rawValue: "territory") + } - public var rawValue: String { - switch self { - case .subscriptionPricePoint: return "subscriptionPricePoint" - case .territory: return "territory" - case .unknown(let rawValue): return rawValue - } + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "subscriptionPricePoint": self = .subscriptionPricePoint - case "territory": self = .territory - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum Territories: Hashable, Codable, RawRepresentable { - case currency - case unknown(String) + public struct Territories: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var currency: Self { + .init(rawValue: "currency") + } - public var rawValue: String { - switch self { - case .currency: return "currency" - case .unknown(let rawValue): return rawValue - } + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "currency": self = .currency - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } @@ -221,25 +222,23 @@ extension V1.SubscriptionPromotionalOffers.ById.Prices.GET { } } - public enum Include: Hashable, Codable, RawRepresentable { - case subscriptionPricePoint - case territory - case unknown(String) + public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var subscriptionPricePoint: Self { + .init(rawValue: "subscriptionPricePoint") + } - public var rawValue: String { - switch self { - case .subscriptionPricePoint: return "subscriptionPricePoint" - case .territory: return "territory" - case .unknown(let rawValue): return rawValue - } + public static var territory: Self { + .init(rawValue: "territory") + } + + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "subscriptionPricePoint": self = .subscriptionPricePoint - case "territory": self = .territory - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/SubscriptionPromotionalOffers/ById/Relationships/Prices/SubscriptionPromotionalOffersByIdRelationshipsPrices.GET.c230293.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/SubscriptionPromotionalOffers/ById/Relationships/Prices/SubscriptionPromotionalOffersByIdRelationshipsPrices.GET.c230293.generated.swift new file mode 100644 index 00000000..9cd8a3c7 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/SubscriptionPromotionalOffers/ById/Relationships/Prices/SubscriptionPromotionalOffersByIdRelationshipsPrices.GET.c230293.generated.swift @@ -0,0 +1,88 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.SubscriptionPromotionalOffers.ById.Relationships.Prices { + public struct GET: Endpoint { + public typealias Response = SubscriptionPromotionalOfferPricesLinkagesResponse + + public var path: String { + "/v1/subscriptionPromotionalOffers/\(id)/relationships/prices" + } + + /// the id of the requested resource + public var id: String + + public var parameters: Parameters = Parameters() + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + components?.queryItems = [ + URLQueryItem(name: "limit", + value: parameters.limit.map { "\($0)" }) + ].filter { $0.value != nil } + if components?.queryItems?.isEmpty ?? false { + components?.queryItems = nil + } + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "GET" + return urlRequest + } + + /// - Returns: **200**, List of related linkages as `SubscriptionPromotionalOfferPricesLinkagesResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(SubscriptionPromotionalOfferPricesLinkagesResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +extension V1.SubscriptionPromotionalOffers.ById.Relationships.Prices.GET { + public struct Parameters: Hashable { + /// maximum resources per page + public var limit: Int? + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/SubscriptionPromotionalOffers/ById/SubscriptionPromotionalOffersById.DELETE.c143fce.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/SubscriptionPromotionalOffers/ById/SubscriptionPromotionalOffersById.DELETE.c143fce.generated.swift index d808215c..cd9e0c80 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/SubscriptionPromotionalOffers/ById/SubscriptionPromotionalOffersById.DELETE.c143fce.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/SubscriptionPromotionalOffers/ById/SubscriptionPromotionalOffersById.DELETE.c143fce.generated.swift @@ -31,11 +31,12 @@ extension V1.SubscriptionPromotionalOffers.ById { return urlRequest } - /// - Returns: **204**, Success (no content) /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -43,12 +44,12 @@ extension V1.SubscriptionPromotionalOffers.ById { } switch urlResponse.statusCode { - case 204: - return - case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) @@ -58,6 +59,9 @@ extension V1.SubscriptionPromotionalOffers.ById { case 409: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/SubscriptionPromotionalOffers/ById/SubscriptionPromotionalOffersById.GET.c143fce.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/SubscriptionPromotionalOffers/ById/SubscriptionPromotionalOffersById.GET.c143fce.generated.swift index 1ee9d3b8..5ef9bb85 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/SubscriptionPromotionalOffers/ById/SubscriptionPromotionalOffersById.GET.c143fce.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/SubscriptionPromotionalOffers/ById/SubscriptionPromotionalOffersById.GET.c143fce.generated.swift @@ -48,8 +48,10 @@ extension V1.SubscriptionPromotionalOffers.ById { /// - Returns: **200**, Single SubscriptionPromotionalOffer as `SubscriptionPromotionalOfferResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -63,12 +65,18 @@ extension V1.SubscriptionPromotionalOffers.ById { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 404: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -93,62 +101,63 @@ extension V1.SubscriptionPromotionalOffers.ById.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum SubscriptionPromotionalOfferPrices: Hashable, Codable, RawRepresentable { - case subscriptionPricePoint - case territory - case unknown(String) + public struct SubscriptionPromotionalOfferPrices: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var subscriptionPricePoint: Self { + .init(rawValue: "subscriptionPricePoint") + } + + public static var territory: Self { + .init(rawValue: "territory") + } - public var rawValue: String { - switch self { - case .subscriptionPricePoint: return "subscriptionPricePoint" - case .territory: return "territory" - case .unknown(let rawValue): return rawValue - } + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "subscriptionPricePoint": self = .subscriptionPricePoint - case "territory": self = .territory - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum SubscriptionPromotionalOffers: Hashable, Codable, RawRepresentable { - case duration - case name - case numberOfPeriods - case offerCode - case offerMode - case prices - case subscription - case unknown(String) - - public var rawValue: String { - switch self { - case .duration: return "duration" - case .name: return "name" - case .numberOfPeriods: return "numberOfPeriods" - case .offerCode: return "offerCode" - case .offerMode: return "offerMode" - case .prices: return "prices" - case .subscription: return "subscription" - case .unknown(let rawValue): return rawValue - } + public struct SubscriptionPromotionalOffers: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var duration: Self { + .init(rawValue: "duration") } + public static var name: Self { + .init(rawValue: "name") + } + + public static var numberOfPeriods: Self { + .init(rawValue: "numberOfPeriods") + } + + public static var offerCode: Self { + .init(rawValue: "offerCode") + } + + public static var offerMode: Self { + .init(rawValue: "offerMode") + } + + public static var prices: Self { + .init(rawValue: "prices") + } + + public static var subscription: Self { + .init(rawValue: "subscription") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "duration": self = .duration - case "name": self = .name - case "numberOfPeriods": self = .numberOfPeriods - case "offerCode": self = .offerCode - case "offerMode": self = .offerMode - case "prices": self = .prices - case "subscription": self = .subscription - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } @@ -171,25 +180,23 @@ extension V1.SubscriptionPromotionalOffers.ById.GET { } } - public enum Include: Hashable, Codable, RawRepresentable { - case prices - case subscription - case unknown(String) + public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var prices: Self { + .init(rawValue: "prices") + } - public var rawValue: String { - switch self { - case .prices: return "prices" - case .subscription: return "subscription" - case .unknown(let rawValue): return rawValue - } + public static var subscription: Self { + .init(rawValue: "subscription") } + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "prices": self = .prices - case "subscription": self = .subscription - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/SubscriptionPromotionalOffers/ById/SubscriptionPromotionalOffersById.PATCH.c143fce.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/SubscriptionPromotionalOffers/ById/SubscriptionPromotionalOffersById.PATCH.c143fce.generated.swift index c4921793..ea7c0683 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/SubscriptionPromotionalOffers/ById/SubscriptionPromotionalOffersById.PATCH.c143fce.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/SubscriptionPromotionalOffers/ById/SubscriptionPromotionalOffersById.PATCH.c143fce.generated.swift @@ -48,9 +48,12 @@ extension V1.SubscriptionPromotionalOffers.ById { /// - Returns: **200**, Single SubscriptionPromotionalOffer as `SubscriptionPromotionalOfferResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **422**, Unprocessable request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -64,6 +67,9 @@ extension V1.SubscriptionPromotionalOffers.ById { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) @@ -73,6 +79,12 @@ extension V1.SubscriptionPromotionalOffers.ById { case 409: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 422: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/SubscriptionPromotionalOffers/SubscriptionPromotionalOffers.POST.ca956ba.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/SubscriptionPromotionalOffers/SubscriptionPromotionalOffers.POST.ca956ba.generated.swift index 147dcd18..f54f200e 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/SubscriptionPromotionalOffers/SubscriptionPromotionalOffers.POST.ca956ba.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/SubscriptionPromotionalOffers/SubscriptionPromotionalOffers.POST.ca956ba.generated.swift @@ -41,8 +41,11 @@ extension V1.SubscriptionPromotionalOffers { /// - Returns: **201**, Single SubscriptionPromotionalOffer as `SubscriptionPromotionalOfferResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **422**, Unprocessable request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -56,12 +59,21 @@ extension V1.SubscriptionPromotionalOffers { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 409: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 422: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/SubscriptionSubmissions/SubscriptionSubmissions.POST.ed372cf.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/SubscriptionSubmissions/SubscriptionSubmissions.POST.ed372cf.generated.swift index 0ded6287..5f9c8ce3 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/SubscriptionSubmissions/SubscriptionSubmissions.POST.ed372cf.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/SubscriptionSubmissions/SubscriptionSubmissions.POST.ed372cf.generated.swift @@ -41,8 +41,11 @@ extension V1.SubscriptionSubmissions { /// - Returns: **201**, Single SubscriptionSubmission as `SubscriptionSubmissionResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **422**, Unprocessable request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -56,12 +59,21 @@ extension V1.SubscriptionSubmissions { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 409: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 422: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Subscriptions/ById/AppStoreReviewScreenshot/SubscriptionsByIdAppStoreReviewScreenshot.GET.1e85fc9.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Subscriptions/ById/AppStoreReviewScreenshot/SubscriptionsByIdAppStoreReviewScreenshot.GET.1e85fc9.generated.swift index e54bbb63..86f70e84 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Subscriptions/ById/AppStoreReviewScreenshot/SubscriptionsByIdAppStoreReviewScreenshot.GET.1e85fc9.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Subscriptions/ById/AppStoreReviewScreenshot/SubscriptionsByIdAppStoreReviewScreenshot.GET.1e85fc9.generated.swift @@ -46,8 +46,10 @@ extension V1.Subscriptions.ById.AppStoreReviewScreenshot { /// - Returns: **200**, Single SubscriptionAppStoreReviewScreenshot as `SubscriptionAppStoreReviewScreenshotResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -61,12 +63,18 @@ extension V1.Subscriptions.ById.AppStoreReviewScreenshot { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 404: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -89,119 +97,139 @@ extension V1.Subscriptions.ById.AppStoreReviewScreenshot.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum SubscriptionAppStoreReviewScreenshots: Hashable, Codable, RawRepresentable { - case assetDeliveryState - case assetToken - case assetType - case fileName - case fileSize - case imageAsset - case sourceFileChecksum - case subscription - case uploadOperations - case uploaded - case unknown(String) - - public var rawValue: String { - switch self { - case .assetDeliveryState: return "assetDeliveryState" - case .assetToken: return "assetToken" - case .assetType: return "assetType" - case .fileName: return "fileName" - case .fileSize: return "fileSize" - case .imageAsset: return "imageAsset" - case .sourceFileChecksum: return "sourceFileChecksum" - case .subscription: return "subscription" - case .uploadOperations: return "uploadOperations" - case .uploaded: return "uploaded" - case .unknown(let rawValue): return rawValue - } + public struct SubscriptionAppStoreReviewScreenshots: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var assetDeliveryState: Self { + .init(rawValue: "assetDeliveryState") } + public static var assetToken: Self { + .init(rawValue: "assetToken") + } + + public static var assetType: Self { + .init(rawValue: "assetType") + } + + public static var fileName: Self { + .init(rawValue: "fileName") + } + + public static var fileSize: Self { + .init(rawValue: "fileSize") + } + + public static var imageAsset: Self { + .init(rawValue: "imageAsset") + } + + public static var sourceFileChecksum: Self { + .init(rawValue: "sourceFileChecksum") + } + + public static var subscription: Self { + .init(rawValue: "subscription") + } + + public static var uploadOperations: Self { + .init(rawValue: "uploadOperations") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "assetDeliveryState": self = .assetDeliveryState - case "assetToken": self = .assetToken - case "assetType": self = .assetType - case "fileName": self = .fileName - case "fileSize": self = .fileSize - case "imageAsset": self = .imageAsset - case "sourceFileChecksum": self = .sourceFileChecksum - case "subscription": self = .subscription - case "uploadOperations": self = .uploadOperations - case "uploaded": self = .uploaded - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum Subscriptions: Hashable, Codable, RawRepresentable { - case appStoreReviewScreenshot - case availableInAllTerritories - case familySharable - case group - case groupLevel - case introductoryOffers - case name - case offerCodes - case pricePoints - case prices - case productId - case promotedPurchase - case promotionalOffers - case reviewNote - case state - case subscriptionAvailability - case subscriptionLocalizations - case subscriptionPeriod - case unknown(String) - - public var rawValue: String { - switch self { - case .appStoreReviewScreenshot: return "appStoreReviewScreenshot" - case .availableInAllTerritories: return "availableInAllTerritories" - case .familySharable: return "familySharable" - case .group: return "group" - case .groupLevel: return "groupLevel" - case .introductoryOffers: return "introductoryOffers" - case .name: return "name" - case .offerCodes: return "offerCodes" - case .pricePoints: return "pricePoints" - case .prices: return "prices" - case .productId: return "productId" - case .promotedPurchase: return "promotedPurchase" - case .promotionalOffers: return "promotionalOffers" - case .reviewNote: return "reviewNote" - case .state: return "state" - case .subscriptionAvailability: return "subscriptionAvailability" - case .subscriptionLocalizations: return "subscriptionLocalizations" - case .subscriptionPeriod: return "subscriptionPeriod" - case .unknown(let rawValue): return rawValue - } + public struct Subscriptions: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var appStoreReviewScreenshot: Self { + .init(rawValue: "appStoreReviewScreenshot") + } + + public static var familySharable: Self { + .init(rawValue: "familySharable") + } + + public static var group: Self { + .init(rawValue: "group") + } + + public static var groupLevel: Self { + .init(rawValue: "groupLevel") + } + + public static var images: Self { + .init(rawValue: "images") + } + + public static var introductoryOffers: Self { + .init(rawValue: "introductoryOffers") } + public static var name: Self { + .init(rawValue: "name") + } + + public static var offerCodes: Self { + .init(rawValue: "offerCodes") + } + + public static var pricePoints: Self { + .init(rawValue: "pricePoints") + } + + public static var prices: Self { + .init(rawValue: "prices") + } + + public static var productId: Self { + .init(rawValue: "productId") + } + + public static var promotedPurchase: Self { + .init(rawValue: "promotedPurchase") + } + + public static var promotionalOffers: Self { + .init(rawValue: "promotionalOffers") + } + + public static var reviewNote: Self { + .init(rawValue: "reviewNote") + } + + public static var state: Self { + .init(rawValue: "state") + } + + public static var subscriptionAvailability: Self { + .init(rawValue: "subscriptionAvailability") + } + + public static var subscriptionLocalizations: Self { + .init(rawValue: "subscriptionLocalizations") + } + + public static var subscriptionPeriod: Self { + .init(rawValue: "subscriptionPeriod") + } + + public static var winBackOffers: Self { + .init(rawValue: "winBackOffers") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "appStoreReviewScreenshot": self = .appStoreReviewScreenshot - case "availableInAllTerritories": self = .availableInAllTerritories - case "familySharable": self = .familySharable - case "group": self = .group - case "groupLevel": self = .groupLevel - case "introductoryOffers": self = .introductoryOffers - case "name": self = .name - case "offerCodes": self = .offerCodes - case "pricePoints": self = .pricePoints - case "prices": self = .prices - case "productId": self = .productId - case "promotedPurchase": self = .promotedPurchase - case "promotionalOffers": self = .promotionalOffers - case "reviewNote": self = .reviewNote - case "state": self = .state - case "subscriptionAvailability": self = .subscriptionAvailability - case "subscriptionLocalizations": self = .subscriptionLocalizations - case "subscriptionPeriod": self = .subscriptionPeriod - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } @@ -224,22 +252,19 @@ extension V1.Subscriptions.ById.AppStoreReviewScreenshot.GET { } } - public enum Include: Hashable, Codable, RawRepresentable { - case subscription - case unknown(String) + public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var subscription: Self { + .init(rawValue: "subscription") + } - public var rawValue: String { - switch self { - case .subscription: return "subscription" - case .unknown(let rawValue): return rawValue - } + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "subscription": self = .subscription - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Subscriptions/ById/Images/SubscriptionsByIdImages.GET.dc8952a.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Subscriptions/ById/Images/SubscriptionsByIdImages.GET.dc8952a.generated.swift new file mode 100644 index 00000000..1d3c51d7 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Subscriptions/ById/Images/SubscriptionsByIdImages.GET.dc8952a.generated.swift @@ -0,0 +1,274 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.Subscriptions.ById.Images { + public struct GET: Endpoint { + public typealias Response = SubscriptionImagesResponse + + public var path: String { + "/v1/subscriptions/\(id)/images" + } + + /// the id of the requested resource + public var id: String + + public var parameters: Parameters = Parameters() + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + components?.queryItems = [ + URLQueryItem(name: "fields[subscriptionImages]", + value: parameters.fields[.subscriptionImages]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "fields[subscriptions]", + value: parameters.fields[.subscriptions]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "include", + value: parameters.include?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "limit", + value: parameters.limit.map { "\($0)" }) + ].filter { $0.value != nil } + if components?.queryItems?.isEmpty ?? false { + components?.queryItems = nil + } + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "GET" + return urlRequest + } + + /// - Returns: **200**, List of SubscriptionImages as `SubscriptionImagesResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(SubscriptionImagesResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +extension V1.Subscriptions.ById.Images.GET { + public struct Parameters: Hashable { + public var fields: Fields = Fields() + + /// comma-separated list of relationships to include + public var include: [Include]? + + /// maximum resources per page + public var limit: Int? + + public struct Fields: Hashable { + public subscript (_ relation: Relation) -> T { + get { values[relation]?.base as! T } + set { values[relation] = AnyHashable(newValue) } + } + + private var values: [AnyHashable: AnyHashable] = [:] + + public struct SubscriptionImages: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var assetToken: Self { + .init(rawValue: "assetToken") + } + + public static var fileName: Self { + .init(rawValue: "fileName") + } + + public static var fileSize: Self { + .init(rawValue: "fileSize") + } + + public static var imageAsset: Self { + .init(rawValue: "imageAsset") + } + + public static var sourceFileChecksum: Self { + .init(rawValue: "sourceFileChecksum") + } + + public static var state: Self { + .init(rawValue: "state") + } + + public static var subscription: Self { + .init(rawValue: "subscription") + } + + public static var uploadOperations: Self { + .init(rawValue: "uploadOperations") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct Subscriptions: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var appStoreReviewScreenshot: Self { + .init(rawValue: "appStoreReviewScreenshot") + } + + public static var familySharable: Self { + .init(rawValue: "familySharable") + } + + public static var group: Self { + .init(rawValue: "group") + } + + public static var groupLevel: Self { + .init(rawValue: "groupLevel") + } + + public static var images: Self { + .init(rawValue: "images") + } + + public static var introductoryOffers: Self { + .init(rawValue: "introductoryOffers") + } + + public static var name: Self { + .init(rawValue: "name") + } + + public static var offerCodes: Self { + .init(rawValue: "offerCodes") + } + + public static var pricePoints: Self { + .init(rawValue: "pricePoints") + } + + public static var prices: Self { + .init(rawValue: "prices") + } + + public static var productId: Self { + .init(rawValue: "productId") + } + + public static var promotedPurchase: Self { + .init(rawValue: "promotedPurchase") + } + + public static var promotionalOffers: Self { + .init(rawValue: "promotionalOffers") + } + + public static var reviewNote: Self { + .init(rawValue: "reviewNote") + } + + public static var state: Self { + .init(rawValue: "state") + } + + public static var subscriptionAvailability: Self { + .init(rawValue: "subscriptionAvailability") + } + + public static var subscriptionLocalizations: Self { + .init(rawValue: "subscriptionLocalizations") + } + + public static var subscriptionPeriod: Self { + .init(rawValue: "subscriptionPeriod") + } + + public static var winBackOffers: Self { + .init(rawValue: "winBackOffers") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct Relation: Hashable { + /// the fields to include for returned resources of type subscriptionImages + public static var subscriptionImages: Relation<[SubscriptionImages]?> { + .init(key: "fields[subscriptionImages]") + } + + /// the fields to include for returned resources of type subscriptions + public static var subscriptions: Relation<[Subscriptions]?> { + .init(key: "fields[subscriptions]") + } + + internal let key: String + + public func hash(into hasher: inout Hasher) { + hasher.combine(key) + } + } + } + + public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var subscription: Self { + .init(rawValue: "subscription") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Subscriptions/ById/IntroductoryOffers/SubscriptionsByIdIntroductoryOffers.GET.a4dd192.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Subscriptions/ById/IntroductoryOffers/SubscriptionsByIdIntroductoryOffers.GET.a4dd192.generated.swift index 0a5375f1..a6c412f3 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Subscriptions/ById/IntroductoryOffers/SubscriptionsByIdIntroductoryOffers.GET.a4dd192.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Subscriptions/ById/IntroductoryOffers/SubscriptionsByIdIntroductoryOffers.GET.a4dd192.generated.swift @@ -54,8 +54,10 @@ extension V1.Subscriptions.ById.IntroductoryOffers { /// - Returns: **200**, List of SubscriptionIntroductoryOffers as `SubscriptionIntroductoryOffersResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -69,12 +71,18 @@ extension V1.Subscriptions.ById.IntroductoryOffers { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 404: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -102,166 +110,183 @@ extension V1.Subscriptions.ById.IntroductoryOffers.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum SubscriptionIntroductoryOffers: Hashable, Codable, RawRepresentable { - case duration - case endDate - case numberOfPeriods - case offerMode - case startDate - case subscription - case subscriptionPricePoint - case territory - case unknown(String) - - public var rawValue: String { - switch self { - case .duration: return "duration" - case .endDate: return "endDate" - case .numberOfPeriods: return "numberOfPeriods" - case .offerMode: return "offerMode" - case .startDate: return "startDate" - case .subscription: return "subscription" - case .subscriptionPricePoint: return "subscriptionPricePoint" - case .territory: return "territory" - case .unknown(let rawValue): return rawValue - } + public struct SubscriptionIntroductoryOffers: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var duration: Self { + .init(rawValue: "duration") + } + + public static var endDate: Self { + .init(rawValue: "endDate") } + public static var numberOfPeriods: Self { + .init(rawValue: "numberOfPeriods") + } + + public static var offerMode: Self { + .init(rawValue: "offerMode") + } + + public static var startDate: Self { + .init(rawValue: "startDate") + } + + public static var subscription: Self { + .init(rawValue: "subscription") + } + + public static var subscriptionPricePoint: Self { + .init(rawValue: "subscriptionPricePoint") + } + + public static var territory: Self { + .init(rawValue: "territory") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "duration": self = .duration - case "endDate": self = .endDate - case "numberOfPeriods": self = .numberOfPeriods - case "offerMode": self = .offerMode - case "startDate": self = .startDate - case "subscription": self = .subscription - case "subscriptionPricePoint": self = .subscriptionPricePoint - case "territory": self = .territory - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum SubscriptionPricePoints: Hashable, Codable, RawRepresentable { - case customerPrice - case equalizations - case proceeds - case proceedsYear2 - case subscription - case territory - case unknown(String) - - public var rawValue: String { - switch self { - case .customerPrice: return "customerPrice" - case .equalizations: return "equalizations" - case .proceeds: return "proceeds" - case .proceedsYear2: return "proceedsYear2" - case .subscription: return "subscription" - case .territory: return "territory" - case .unknown(let rawValue): return rawValue - } + public struct SubscriptionPricePoints: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var customerPrice: Self { + .init(rawValue: "customerPrice") } + public static var equalizations: Self { + .init(rawValue: "equalizations") + } + + public static var proceeds: Self { + .init(rawValue: "proceeds") + } + + public static var proceedsYear2: Self { + .init(rawValue: "proceedsYear2") + } + + public static var territory: Self { + .init(rawValue: "territory") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "customerPrice": self = .customerPrice - case "equalizations": self = .equalizations - case "proceeds": self = .proceeds - case "proceedsYear2": self = .proceedsYear2 - case "subscription": self = .subscription - case "territory": self = .territory - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum Subscriptions: Hashable, Codable, RawRepresentable { - case appStoreReviewScreenshot - case availableInAllTerritories - case familySharable - case group - case groupLevel - case introductoryOffers - case name - case offerCodes - case pricePoints - case prices - case productId - case promotedPurchase - case promotionalOffers - case reviewNote - case state - case subscriptionAvailability - case subscriptionLocalizations - case subscriptionPeriod - case unknown(String) - - public var rawValue: String { - switch self { - case .appStoreReviewScreenshot: return "appStoreReviewScreenshot" - case .availableInAllTerritories: return "availableInAllTerritories" - case .familySharable: return "familySharable" - case .group: return "group" - case .groupLevel: return "groupLevel" - case .introductoryOffers: return "introductoryOffers" - case .name: return "name" - case .offerCodes: return "offerCodes" - case .pricePoints: return "pricePoints" - case .prices: return "prices" - case .productId: return "productId" - case .promotedPurchase: return "promotedPurchase" - case .promotionalOffers: return "promotionalOffers" - case .reviewNote: return "reviewNote" - case .state: return "state" - case .subscriptionAvailability: return "subscriptionAvailability" - case .subscriptionLocalizations: return "subscriptionLocalizations" - case .subscriptionPeriod: return "subscriptionPeriod" - case .unknown(let rawValue): return rawValue - } + public struct Subscriptions: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var appStoreReviewScreenshot: Self { + .init(rawValue: "appStoreReviewScreenshot") + } + + public static var familySharable: Self { + .init(rawValue: "familySharable") + } + + public static var group: Self { + .init(rawValue: "group") } + public static var groupLevel: Self { + .init(rawValue: "groupLevel") + } + + public static var images: Self { + .init(rawValue: "images") + } + + public static var introductoryOffers: Self { + .init(rawValue: "introductoryOffers") + } + + public static var name: Self { + .init(rawValue: "name") + } + + public static var offerCodes: Self { + .init(rawValue: "offerCodes") + } + + public static var pricePoints: Self { + .init(rawValue: "pricePoints") + } + + public static var prices: Self { + .init(rawValue: "prices") + } + + public static var productId: Self { + .init(rawValue: "productId") + } + + public static var promotedPurchase: Self { + .init(rawValue: "promotedPurchase") + } + + public static var promotionalOffers: Self { + .init(rawValue: "promotionalOffers") + } + + public static var reviewNote: Self { + .init(rawValue: "reviewNote") + } + + public static var state: Self { + .init(rawValue: "state") + } + + public static var subscriptionAvailability: Self { + .init(rawValue: "subscriptionAvailability") + } + + public static var subscriptionLocalizations: Self { + .init(rawValue: "subscriptionLocalizations") + } + + public static var subscriptionPeriod: Self { + .init(rawValue: "subscriptionPeriod") + } + + public static var winBackOffers: Self { + .init(rawValue: "winBackOffers") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "appStoreReviewScreenshot": self = .appStoreReviewScreenshot - case "availableInAllTerritories": self = .availableInAllTerritories - case "familySharable": self = .familySharable - case "group": self = .group - case "groupLevel": self = .groupLevel - case "introductoryOffers": self = .introductoryOffers - case "name": self = .name - case "offerCodes": self = .offerCodes - case "pricePoints": self = .pricePoints - case "prices": self = .prices - case "productId": self = .productId - case "promotedPurchase": self = .promotedPurchase - case "promotionalOffers": self = .promotionalOffers - case "reviewNote": self = .reviewNote - case "state": self = .state - case "subscriptionAvailability": self = .subscriptionAvailability - case "subscriptionLocalizations": self = .subscriptionLocalizations - case "subscriptionPeriod": self = .subscriptionPeriod - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum Territories: Hashable, Codable, RawRepresentable { - case currency - case unknown(String) + public struct Territories: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var currency: Self { + .init(rawValue: "currency") + } - public var rawValue: String { - switch self { - case .currency: return "currency" - case .unknown(let rawValue): return rawValue - } + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "currency": self = .currency - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } @@ -316,28 +341,27 @@ extension V1.Subscriptions.ById.IntroductoryOffers.GET { } } - public enum Include: Hashable, Codable, RawRepresentable { - case subscription - case subscriptionPricePoint - case territory - case unknown(String) + public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var subscription: Self { + .init(rawValue: "subscription") + } - public var rawValue: String { - switch self { - case .subscription: return "subscription" - case .subscriptionPricePoint: return "subscriptionPricePoint" - case .territory: return "territory" - case .unknown(let rawValue): return rawValue - } + public static var subscriptionPricePoint: Self { + .init(rawValue: "subscriptionPricePoint") + } + + public static var territory: Self { + .init(rawValue: "territory") + } + + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "subscription": self = .subscription - case "subscriptionPricePoint": self = .subscriptionPricePoint - case "territory": self = .territory - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Subscriptions/ById/OfferCodes/SubscriptionsByIdOfferCodes.GET.12e3713.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Subscriptions/ById/OfferCodes/SubscriptionsByIdOfferCodes.GET.12e3713.generated.swift index f669f283..b4d3f1eb 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Subscriptions/ById/OfferCodes/SubscriptionsByIdOfferCodes.GET.12e3713.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Subscriptions/ById/OfferCodes/SubscriptionsByIdOfferCodes.GET.12e3713.generated.swift @@ -62,8 +62,10 @@ extension V1.Subscriptions.ById.OfferCodes { /// - Returns: **200**, List of SubscriptionOfferCodes as `SubscriptionOfferCodesResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -77,12 +79,18 @@ extension V1.Subscriptions.ById.OfferCodes { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 404: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -110,215 +118,239 @@ extension V1.Subscriptions.ById.OfferCodes.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum SubscriptionOfferCodeCustomCodes: Hashable, Codable, RawRepresentable { - case active - case createdDate - case customCode - case expirationDate - case numberOfCodes - case offerCode - case unknown(String) - - public var rawValue: String { - switch self { - case .active: return "active" - case .createdDate: return "createdDate" - case .customCode: return "customCode" - case .expirationDate: return "expirationDate" - case .numberOfCodes: return "numberOfCodes" - case .offerCode: return "offerCode" - case .unknown(let rawValue): return rawValue - } + public struct SubscriptionOfferCodeCustomCodes: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var active: Self { + .init(rawValue: "active") + } + + public static var createdDate: Self { + .init(rawValue: "createdDate") + } + + public static var customCode: Self { + .init(rawValue: "customCode") + } + + public static var expirationDate: Self { + .init(rawValue: "expirationDate") + } + + public static var numberOfCodes: Self { + .init(rawValue: "numberOfCodes") + } + + public static var offerCode: Self { + .init(rawValue: "offerCode") } + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "active": self = .active - case "createdDate": self = .createdDate - case "customCode": self = .customCode - case "expirationDate": self = .expirationDate - case "numberOfCodes": self = .numberOfCodes - case "offerCode": self = .offerCode - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum SubscriptionOfferCodeOneTimeUseCodes: Hashable, Codable, RawRepresentable { - case active - case createdDate - case expirationDate - case numberOfCodes - case offerCode - case values - case unknown(String) - - public var rawValue: String { - switch self { - case .active: return "active" - case .createdDate: return "createdDate" - case .expirationDate: return "expirationDate" - case .numberOfCodes: return "numberOfCodes" - case .offerCode: return "offerCode" - case .values: return "values" - case .unknown(let rawValue): return rawValue - } + public struct SubscriptionOfferCodeOneTimeUseCodes: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var active: Self { + .init(rawValue: "active") + } + + public static var createdDate: Self { + .init(rawValue: "createdDate") + } + + public static var expirationDate: Self { + .init(rawValue: "expirationDate") + } + + public static var numberOfCodes: Self { + .init(rawValue: "numberOfCodes") + } + + public static var offerCode: Self { + .init(rawValue: "offerCode") + } + + public static var values: Self { + .init(rawValue: "values") } + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "active": self = .active - case "createdDate": self = .createdDate - case "expirationDate": self = .expirationDate - case "numberOfCodes": self = .numberOfCodes - case "offerCode": self = .offerCode - case "values": self = .values - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum SubscriptionOfferCodePrices: Hashable, Codable, RawRepresentable { - case subscriptionPricePoint - case territory - case unknown(String) + public struct SubscriptionOfferCodePrices: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var subscriptionPricePoint: Self { + .init(rawValue: "subscriptionPricePoint") + } - public var rawValue: String { - switch self { - case .subscriptionPricePoint: return "subscriptionPricePoint" - case .territory: return "territory" - case .unknown(let rawValue): return rawValue - } + public static var territory: Self { + .init(rawValue: "territory") } + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "subscriptionPricePoint": self = .subscriptionPricePoint - case "territory": self = .territory - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum SubscriptionOfferCodes: Hashable, Codable, RawRepresentable { - case active - case customCodes - case customerEligibilities - case duration - case name - case numberOfPeriods - case offerEligibility - case offerMode - case oneTimeUseCodes - case prices - case subscription - case totalNumberOfCodes - case unknown(String) - - public var rawValue: String { - switch self { - case .active: return "active" - case .customCodes: return "customCodes" - case .customerEligibilities: return "customerEligibilities" - case .duration: return "duration" - case .name: return "name" - case .numberOfPeriods: return "numberOfPeriods" - case .offerEligibility: return "offerEligibility" - case .offerMode: return "offerMode" - case .oneTimeUseCodes: return "oneTimeUseCodes" - case .prices: return "prices" - case .subscription: return "subscription" - case .totalNumberOfCodes: return "totalNumberOfCodes" - case .unknown(let rawValue): return rawValue - } + public struct SubscriptionOfferCodes: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var active: Self { + .init(rawValue: "active") + } + + public static var customCodes: Self { + .init(rawValue: "customCodes") + } + + public static var customerEligibilities: Self { + .init(rawValue: "customerEligibilities") + } + + public static var duration: Self { + .init(rawValue: "duration") + } + + public static var name: Self { + .init(rawValue: "name") + } + + public static var numberOfPeriods: Self { + .init(rawValue: "numberOfPeriods") + } + + public static var offerEligibility: Self { + .init(rawValue: "offerEligibility") + } + + public static var offerMode: Self { + .init(rawValue: "offerMode") + } + + public static var oneTimeUseCodes: Self { + .init(rawValue: "oneTimeUseCodes") + } + + public static var prices: Self { + .init(rawValue: "prices") + } + + public static var subscription: Self { + .init(rawValue: "subscription") } + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "active": self = .active - case "customCodes": self = .customCodes - case "customerEligibilities": self = .customerEligibilities - case "duration": self = .duration - case "name": self = .name - case "numberOfPeriods": self = .numberOfPeriods - case "offerEligibility": self = .offerEligibility - case "offerMode": self = .offerMode - case "oneTimeUseCodes": self = .oneTimeUseCodes - case "prices": self = .prices - case "subscription": self = .subscription - case "totalNumberOfCodes": self = .totalNumberOfCodes - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum Subscriptions: Hashable, Codable, RawRepresentable { - case appStoreReviewScreenshot - case availableInAllTerritories - case familySharable - case group - case groupLevel - case introductoryOffers - case name - case offerCodes - case pricePoints - case prices - case productId - case promotedPurchase - case promotionalOffers - case reviewNote - case state - case subscriptionAvailability - case subscriptionLocalizations - case subscriptionPeriod - case unknown(String) - - public var rawValue: String { - switch self { - case .appStoreReviewScreenshot: return "appStoreReviewScreenshot" - case .availableInAllTerritories: return "availableInAllTerritories" - case .familySharable: return "familySharable" - case .group: return "group" - case .groupLevel: return "groupLevel" - case .introductoryOffers: return "introductoryOffers" - case .name: return "name" - case .offerCodes: return "offerCodes" - case .pricePoints: return "pricePoints" - case .prices: return "prices" - case .productId: return "productId" - case .promotedPurchase: return "promotedPurchase" - case .promotionalOffers: return "promotionalOffers" - case .reviewNote: return "reviewNote" - case .state: return "state" - case .subscriptionAvailability: return "subscriptionAvailability" - case .subscriptionLocalizations: return "subscriptionLocalizations" - case .subscriptionPeriod: return "subscriptionPeriod" - case .unknown(let rawValue): return rawValue - } + public struct Subscriptions: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var appStoreReviewScreenshot: Self { + .init(rawValue: "appStoreReviewScreenshot") + } + + public static var familySharable: Self { + .init(rawValue: "familySharable") + } + + public static var group: Self { + .init(rawValue: "group") + } + + public static var groupLevel: Self { + .init(rawValue: "groupLevel") + } + + public static var images: Self { + .init(rawValue: "images") + } + + public static var introductoryOffers: Self { + .init(rawValue: "introductoryOffers") + } + + public static var name: Self { + .init(rawValue: "name") + } + + public static var offerCodes: Self { + .init(rawValue: "offerCodes") + } + + public static var pricePoints: Self { + .init(rawValue: "pricePoints") + } + + public static var prices: Self { + .init(rawValue: "prices") + } + + public static var productId: Self { + .init(rawValue: "productId") + } + + public static var promotedPurchase: Self { + .init(rawValue: "promotedPurchase") + } + + public static var promotionalOffers: Self { + .init(rawValue: "promotionalOffers") } + public static var reviewNote: Self { + .init(rawValue: "reviewNote") + } + + public static var state: Self { + .init(rawValue: "state") + } + + public static var subscriptionAvailability: Self { + .init(rawValue: "subscriptionAvailability") + } + + public static var subscriptionLocalizations: Self { + .init(rawValue: "subscriptionLocalizations") + } + + public static var subscriptionPeriod: Self { + .init(rawValue: "subscriptionPeriod") + } + + public static var winBackOffers: Self { + .init(rawValue: "winBackOffers") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "appStoreReviewScreenshot": self = .appStoreReviewScreenshot - case "availableInAllTerritories": self = .availableInAllTerritories - case "familySharable": self = .familySharable - case "group": self = .group - case "groupLevel": self = .groupLevel - case "introductoryOffers": self = .introductoryOffers - case "name": self = .name - case "offerCodes": self = .offerCodes - case "pricePoints": self = .pricePoints - case "prices": self = .prices - case "productId": self = .productId - case "promotedPurchase": self = .promotedPurchase - case "promotionalOffers": self = .promotionalOffers - case "reviewNote": self = .reviewNote - case "state": self = .state - case "subscriptionAvailability": self = .subscriptionAvailability - case "subscriptionLocalizations": self = .subscriptionLocalizations - case "subscriptionPeriod": self = .subscriptionPeriod - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } @@ -378,31 +410,31 @@ extension V1.Subscriptions.ById.OfferCodes.GET { } } - public enum Include: Hashable, Codable, RawRepresentable { - case customCodes - case oneTimeUseCodes - case prices - case subscription - case unknown(String) - - public var rawValue: String { - switch self { - case .customCodes: return "customCodes" - case .oneTimeUseCodes: return "oneTimeUseCodes" - case .prices: return "prices" - case .subscription: return "subscription" - case .unknown(let rawValue): return rawValue - } + public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var customCodes: Self { + .init(rawValue: "customCodes") + } + + public static var oneTimeUseCodes: Self { + .init(rawValue: "oneTimeUseCodes") + } + + public static var prices: Self { + .init(rawValue: "prices") } + public static var subscription: Self { + .init(rawValue: "subscription") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "customCodes": self = .customCodes - case "oneTimeUseCodes": self = .oneTimeUseCodes - case "prices": self = .prices - case "subscription": self = .subscription - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Subscriptions/ById/PricePoints/SubscriptionsByIdPricePoints.GET.423b6c1.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Subscriptions/ById/PricePoints/SubscriptionsByIdPricePoints.GET.423b6c1.generated.swift index 26e3c3ff..7486f4de 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Subscriptions/ById/PricePoints/SubscriptionsByIdPricePoints.GET.423b6c1.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Subscriptions/ById/PricePoints/SubscriptionsByIdPricePoints.GET.423b6c1.generated.swift @@ -50,8 +50,10 @@ extension V1.Subscriptions.ById.PricePoints { /// - Returns: **200**, List of SubscriptionPricePoints as `SubscriptionPricePointsResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -65,12 +67,18 @@ extension V1.Subscriptions.ById.PricePoints { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 404: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -98,56 +106,51 @@ extension V1.Subscriptions.ById.PricePoints.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum SubscriptionPricePoints: Hashable, Codable, RawRepresentable { - case customerPrice - case equalizations - case proceeds - case proceedsYear2 - case subscription - case territory - case unknown(String) - - public var rawValue: String { - switch self { - case .customerPrice: return "customerPrice" - case .equalizations: return "equalizations" - case .proceeds: return "proceeds" - case .proceedsYear2: return "proceedsYear2" - case .subscription: return "subscription" - case .territory: return "territory" - case .unknown(let rawValue): return rawValue - } + public struct SubscriptionPricePoints: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var customerPrice: Self { + .init(rawValue: "customerPrice") + } + + public static var equalizations: Self { + .init(rawValue: "equalizations") } + public static var proceeds: Self { + .init(rawValue: "proceeds") + } + + public static var proceedsYear2: Self { + .init(rawValue: "proceedsYear2") + } + + public static var territory: Self { + .init(rawValue: "territory") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "customerPrice": self = .customerPrice - case "equalizations": self = .equalizations - case "proceeds": self = .proceeds - case "proceedsYear2": self = .proceedsYear2 - case "subscription": self = .subscription - case "territory": self = .territory - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum Territories: Hashable, Codable, RawRepresentable { - case currency - case unknown(String) + public struct Territories: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var currency: Self { + .init(rawValue: "currency") + } - public var rawValue: String { - switch self { - case .currency: return "currency" - case .unknown(let rawValue): return rawValue - } + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "currency": self = .currency - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } @@ -192,22 +195,19 @@ extension V1.Subscriptions.ById.PricePoints.GET { } } - public enum Include: Hashable, Codable, RawRepresentable { - case territory - case unknown(String) + public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var territory: Self { + .init(rawValue: "territory") + } - public var rawValue: String { - switch self { - case .territory: return "territory" - case .unknown(let rawValue): return rawValue - } + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "territory": self = .territory - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Subscriptions/ById/Prices/SubscriptionsByIdPrices.GET.e41242b.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Subscriptions/ById/Prices/SubscriptionsByIdPrices.GET.e41242b.generated.swift index ffae25a6..1267d25d 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Subscriptions/ById/Prices/SubscriptionsByIdPrices.GET.e41242b.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Subscriptions/ById/Prices/SubscriptionsByIdPrices.GET.e41242b.generated.swift @@ -54,8 +54,10 @@ extension V1.Subscriptions.ById.Prices { /// - Returns: **200**, List of SubscriptionPrices as `SubscriptionPricesResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -69,12 +71,18 @@ extension V1.Subscriptions.ById.Prices { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 404: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -102,90 +110,79 @@ extension V1.Subscriptions.ById.Prices.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum SubscriptionPricePoints: Hashable, Codable, RawRepresentable { - case customerPrice - case equalizations - case proceeds - case proceedsYear2 - case subscription - case territory - case unknown(String) - - public var rawValue: String { - switch self { - case .customerPrice: return "customerPrice" - case .equalizations: return "equalizations" - case .proceeds: return "proceeds" - case .proceedsYear2: return "proceedsYear2" - case .subscription: return "subscription" - case .territory: return "territory" - case .unknown(let rawValue): return rawValue - } + public struct SubscriptionPricePoints: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var customerPrice: Self { + .init(rawValue: "customerPrice") + } + + public static var equalizations: Self { + .init(rawValue: "equalizations") + } + + public static var proceeds: Self { + .init(rawValue: "proceeds") } + public static var proceedsYear2: Self { + .init(rawValue: "proceedsYear2") + } + + public static var territory: Self { + .init(rawValue: "territory") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "customerPrice": self = .customerPrice - case "equalizations": self = .equalizations - case "proceeds": self = .proceeds - case "proceedsYear2": self = .proceedsYear2 - case "subscription": self = .subscription - case "territory": self = .territory - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum SubscriptionPrices: Hashable, Codable, RawRepresentable { - case preserveCurrentPrice - case preserved - case startDate - case subscription - case subscriptionPricePoint - case territory - case unknown(String) - - public var rawValue: String { - switch self { - case .preserveCurrentPrice: return "preserveCurrentPrice" - case .preserved: return "preserved" - case .startDate: return "startDate" - case .subscription: return "subscription" - case .subscriptionPricePoint: return "subscriptionPricePoint" - case .territory: return "territory" - case .unknown(let rawValue): return rawValue - } + public struct SubscriptionPrices: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var preserved: Self { + .init(rawValue: "preserved") + } + + public static var startDate: Self { + .init(rawValue: "startDate") + } + + public static var subscriptionPricePoint: Self { + .init(rawValue: "subscriptionPricePoint") + } + + public static var territory: Self { + .init(rawValue: "territory") + } + + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "preserveCurrentPrice": self = .preserveCurrentPrice - case "preserved": self = .preserved - case "startDate": self = .startDate - case "subscription": self = .subscription - case "subscriptionPricePoint": self = .subscriptionPricePoint - case "territory": self = .territory - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum Territories: Hashable, Codable, RawRepresentable { - case currency - case unknown(String) + public struct Territories: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var currency: Self { + .init(rawValue: "currency") + } - public var rawValue: String { - switch self { - case .currency: return "currency" - case .unknown(let rawValue): return rawValue - } + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "currency": self = .currency - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } @@ -240,25 +237,23 @@ extension V1.Subscriptions.ById.Prices.GET { } } - public enum Include: Hashable, Codable, RawRepresentable { - case subscriptionPricePoint - case territory - case unknown(String) + public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var subscriptionPricePoint: Self { + .init(rawValue: "subscriptionPricePoint") + } - public var rawValue: String { - switch self { - case .subscriptionPricePoint: return "subscriptionPricePoint" - case .territory: return "territory" - case .unknown(let rawValue): return rawValue - } + public static var territory: Self { + .init(rawValue: "territory") } + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "subscriptionPricePoint": self = .subscriptionPricePoint - case "territory": self = .territory - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Subscriptions/ById/PromotedPurchase/SubscriptionsByIdPromotedPurchase.GET.96fa960.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Subscriptions/ById/PromotedPurchase/SubscriptionsByIdPromotedPurchase.GET.96fa960.generated.swift index 31da4cc5..f12bb354 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Subscriptions/ById/PromotedPurchase/SubscriptionsByIdPromotedPurchase.GET.96fa960.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Subscriptions/ById/PromotedPurchase/SubscriptionsByIdPromotedPurchase.GET.96fa960.generated.swift @@ -30,16 +30,12 @@ extension V1.Subscriptions.ById.PromotedPurchase { components?.queryItems = [ URLQueryItem(name: "fields[inAppPurchases]", value: parameters.fields[.inAppPurchases]?.map { "\($0)" }.joined(separator: ",")), - URLQueryItem(name: "fields[promotedPurchaseImages]", - value: parameters.fields[.promotedPurchaseImages]?.map { "\($0)" }.joined(separator: ",")), URLQueryItem(name: "fields[promotedPurchases]", value: parameters.fields[.promotedPurchases]?.map { "\($0)" }.joined(separator: ",")), URLQueryItem(name: "fields[subscriptions]", value: parameters.fields[.subscriptions]?.map { "\($0)" }.joined(separator: ",")), URLQueryItem(name: "include", - value: parameters.include?.map { "\($0)" }.joined(separator: ",")), - URLQueryItem(name: "limit[promotionImages]", - value: parameters.limit[.promotionImages].map { "\($0)" }) + value: parameters.include?.map { "\($0)" }.joined(separator: ",")) ].filter { $0.value != nil } if components?.queryItems?.isEmpty ?? false { components?.queryItems = nil @@ -52,8 +48,10 @@ extension V1.Subscriptions.ById.PromotedPurchase { /// - Returns: **200**, Single PromotedPurchase as `PromotedPurchaseResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -67,12 +65,18 @@ extension V1.Subscriptions.ById.PromotedPurchase { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 404: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -87,8 +91,6 @@ extension V1.Subscriptions.ById.PromotedPurchase.GET { /// comma-separated list of relationships to include public var include: [Include]? - public var limit: Limit = Limit() - public struct Fields: Hashable { public subscript (_ relation: Relation) -> T { get { values[relation]?.base as! T } @@ -97,220 +99,195 @@ extension V1.Subscriptions.ById.PromotedPurchase.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum InAppPurchases: Hashable, Codable, RawRepresentable { - case app - case appStoreReviewScreenshot - case availableInAllTerritories - case content - case contentHosting - case familySharable - case iapPriceSchedule - case inAppPurchaseAvailability - case inAppPurchaseLocalizations - case inAppPurchaseType - case name - case pricePoints - case productId - case promotedPurchase - case reviewNote - case state - case unknown(String) - - public var rawValue: String { - switch self { - case .app: return "app" - case .appStoreReviewScreenshot: return "appStoreReviewScreenshot" - case .availableInAllTerritories: return "availableInAllTerritories" - case .content: return "content" - case .contentHosting: return "contentHosting" - case .familySharable: return "familySharable" - case .iapPriceSchedule: return "iapPriceSchedule" - case .inAppPurchaseAvailability: return "inAppPurchaseAvailability" - case .inAppPurchaseLocalizations: return "inAppPurchaseLocalizations" - case .inAppPurchaseType: return "inAppPurchaseType" - case .name: return "name" - case .pricePoints: return "pricePoints" - case .productId: return "productId" - case .promotedPurchase: return "promotedPurchase" - case .reviewNote: return "reviewNote" - case .state: return "state" - case .unknown(let rawValue): return rawValue - } + public struct InAppPurchases: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var appStoreReviewScreenshot: Self { + .init(rawValue: "appStoreReviewScreenshot") } - public init(rawValue: String) { - switch rawValue { - case "app": self = .app - case "appStoreReviewScreenshot": self = .appStoreReviewScreenshot - case "availableInAllTerritories": self = .availableInAllTerritories - case "content": self = .content - case "contentHosting": self = .contentHosting - case "familySharable": self = .familySharable - case "iapPriceSchedule": self = .iapPriceSchedule - case "inAppPurchaseAvailability": self = .inAppPurchaseAvailability - case "inAppPurchaseLocalizations": self = .inAppPurchaseLocalizations - case "inAppPurchaseType": self = .inAppPurchaseType - case "name": self = .name - case "pricePoints": self = .pricePoints - case "productId": self = .productId - case "promotedPurchase": self = .promotedPurchase - case "reviewNote": self = .reviewNote - case "state": self = .state - default: self = .unknown(rawValue) - } + public static var content: Self { + .init(rawValue: "content") + } + + public static var contentHosting: Self { + .init(rawValue: "contentHosting") + } + + public static var familySharable: Self { + .init(rawValue: "familySharable") + } + + public static var iapPriceSchedule: Self { + .init(rawValue: "iapPriceSchedule") + } + + public static var images: Self { + .init(rawValue: "images") + } + + public static var inAppPurchaseAvailability: Self { + .init(rawValue: "inAppPurchaseAvailability") + } + + public static var inAppPurchaseLocalizations: Self { + .init(rawValue: "inAppPurchaseLocalizations") + } + + public static var inAppPurchaseType: Self { + .init(rawValue: "inAppPurchaseType") + } + + public static var name: Self { + .init(rawValue: "name") + } + + public static var pricePoints: Self { + .init(rawValue: "pricePoints") + } + + public static var productId: Self { + .init(rawValue: "productId") + } + + public static var promotedPurchase: Self { + .init(rawValue: "promotedPurchase") + } + + public static var reviewNote: Self { + .init(rawValue: "reviewNote") + } + + public static var state: Self { + .init(rawValue: "state") } - } - public enum PromotedPurchaseImages: Hashable, Codable, RawRepresentable { - case assetToken - case assetType - case fileName - case fileSize - case imageAsset - case promotedPurchase - case sourceFileChecksum - case state - case uploadOperations - case uploaded - case unknown(String) - - public var rawValue: String { - switch self { - case .assetToken: return "assetToken" - case .assetType: return "assetType" - case .fileName: return "fileName" - case .fileSize: return "fileSize" - case .imageAsset: return "imageAsset" - case .promotedPurchase: return "promotedPurchase" - case .sourceFileChecksum: return "sourceFileChecksum" - case .state: return "state" - case .uploadOperations: return "uploadOperations" - case .uploaded: return "uploaded" - case .unknown(let rawValue): return rawValue - } + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "assetToken": self = .assetToken - case "assetType": self = .assetType - case "fileName": self = .fileName - case "fileSize": self = .fileSize - case "imageAsset": self = .imageAsset - case "promotedPurchase": self = .promotedPurchase - case "sourceFileChecksum": self = .sourceFileChecksum - case "state": self = .state - case "uploadOperations": self = .uploadOperations - case "uploaded": self = .uploaded - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum PromotedPurchases: Hashable, Codable, RawRepresentable { - case app - case enabled - case inAppPurchaseV2 - case promotionImages - case state - case subscription - case visibleForAllUsers - case unknown(String) - - public var rawValue: String { - switch self { - case .app: return "app" - case .enabled: return "enabled" - case .inAppPurchaseV2: return "inAppPurchaseV2" - case .promotionImages: return "promotionImages" - case .state: return "state" - case .subscription: return "subscription" - case .visibleForAllUsers: return "visibleForAllUsers" - case .unknown(let rawValue): return rawValue - } + public struct PromotedPurchases: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var enabled: Self { + .init(rawValue: "enabled") + } + + public static var inAppPurchaseV2: Self { + .init(rawValue: "inAppPurchaseV2") + } + + public static var state: Self { + .init(rawValue: "state") + } + + public static var subscription: Self { + .init(rawValue: "subscription") + } + + public static var visibleForAllUsers: Self { + .init(rawValue: "visibleForAllUsers") } + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "app": self = .app - case "enabled": self = .enabled - case "inAppPurchaseV2": self = .inAppPurchaseV2 - case "promotionImages": self = .promotionImages - case "state": self = .state - case "subscription": self = .subscription - case "visibleForAllUsers": self = .visibleForAllUsers - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum Subscriptions: Hashable, Codable, RawRepresentable { - case appStoreReviewScreenshot - case availableInAllTerritories - case familySharable - case group - case groupLevel - case introductoryOffers - case name - case offerCodes - case pricePoints - case prices - case productId - case promotedPurchase - case promotionalOffers - case reviewNote - case state - case subscriptionAvailability - case subscriptionLocalizations - case subscriptionPeriod - case unknown(String) - - public var rawValue: String { - switch self { - case .appStoreReviewScreenshot: return "appStoreReviewScreenshot" - case .availableInAllTerritories: return "availableInAllTerritories" - case .familySharable: return "familySharable" - case .group: return "group" - case .groupLevel: return "groupLevel" - case .introductoryOffers: return "introductoryOffers" - case .name: return "name" - case .offerCodes: return "offerCodes" - case .pricePoints: return "pricePoints" - case .prices: return "prices" - case .productId: return "productId" - case .promotedPurchase: return "promotedPurchase" - case .promotionalOffers: return "promotionalOffers" - case .reviewNote: return "reviewNote" - case .state: return "state" - case .subscriptionAvailability: return "subscriptionAvailability" - case .subscriptionLocalizations: return "subscriptionLocalizations" - case .subscriptionPeriod: return "subscriptionPeriod" - case .unknown(let rawValue): return rawValue - } + public struct Subscriptions: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var appStoreReviewScreenshot: Self { + .init(rawValue: "appStoreReviewScreenshot") + } + + public static var familySharable: Self { + .init(rawValue: "familySharable") + } + + public static var group: Self { + .init(rawValue: "group") + } + + public static var groupLevel: Self { + .init(rawValue: "groupLevel") + } + + public static var images: Self { + .init(rawValue: "images") + } + + public static var introductoryOffers: Self { + .init(rawValue: "introductoryOffers") + } + + public static var name: Self { + .init(rawValue: "name") + } + + public static var offerCodes: Self { + .init(rawValue: "offerCodes") + } + + public static var pricePoints: Self { + .init(rawValue: "pricePoints") + } + + public static var prices: Self { + .init(rawValue: "prices") + } + + public static var productId: Self { + .init(rawValue: "productId") + } + + public static var promotedPurchase: Self { + .init(rawValue: "promotedPurchase") + } + + public static var promotionalOffers: Self { + .init(rawValue: "promotionalOffers") + } + + public static var reviewNote: Self { + .init(rawValue: "reviewNote") + } + + public static var state: Self { + .init(rawValue: "state") + } + + public static var subscriptionAvailability: Self { + .init(rawValue: "subscriptionAvailability") + } + + public static var subscriptionLocalizations: Self { + .init(rawValue: "subscriptionLocalizations") + } + + public static var subscriptionPeriod: Self { + .init(rawValue: "subscriptionPeriod") + } + + public static var winBackOffers: Self { + .init(rawValue: "winBackOffers") } + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "appStoreReviewScreenshot": self = .appStoreReviewScreenshot - case "availableInAllTerritories": self = .availableInAllTerritories - case "familySharable": self = .familySharable - case "group": self = .group - case "groupLevel": self = .groupLevel - case "introductoryOffers": self = .introductoryOffers - case "name": self = .name - case "offerCodes": self = .offerCodes - case "pricePoints": self = .pricePoints - case "prices": self = .prices - case "productId": self = .productId - case "promotedPurchase": self = .promotedPurchase - case "promotionalOffers": self = .promotionalOffers - case "reviewNote": self = .reviewNote - case "state": self = .state - case "subscriptionAvailability": self = .subscriptionAvailability - case "subscriptionLocalizations": self = .subscriptionLocalizations - case "subscriptionPeriod": self = .subscriptionPeriod - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } @@ -320,11 +297,6 @@ extension V1.Subscriptions.ById.PromotedPurchase.GET { .init(key: "fields[inAppPurchases]") } - /// the fields to include for returned resources of type promotedPurchaseImages - public static var promotedPurchaseImages: Relation<[PromotedPurchaseImages]?> { - .init(key: "fields[promotedPurchaseImages]") - } - /// the fields to include for returned resources of type promotedPurchases public static var promotedPurchases: Relation<[PromotedPurchases]?> { .init(key: "fields[promotedPurchases]") @@ -343,50 +315,23 @@ extension V1.Subscriptions.ById.PromotedPurchase.GET { } } - public enum Include: Hashable, Codable, RawRepresentable { - case inAppPurchaseV2 - case promotionImages - case subscription - case unknown(String) - - public var rawValue: String { - switch self { - case .inAppPurchaseV2: return "inAppPurchaseV2" - case .promotionImages: return "promotionImages" - case .subscription: return "subscription" - case .unknown(let rawValue): return rawValue - } + public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var inAppPurchaseV2: Self { + .init(rawValue: "inAppPurchaseV2") } - public init(rawValue: String) { - switch rawValue { - case "inAppPurchaseV2": self = .inAppPurchaseV2 - case "promotionImages": self = .promotionImages - case "subscription": self = .subscription - default: self = .unknown(rawValue) - } + public static var subscription: Self { + .init(rawValue: "subscription") } - } - public struct Limit: Hashable { - public subscript (_ relation: Relation) -> T { - get { values[relation]?.base as! T } - set { values[relation] = AnyHashable(newValue) } + public var description: String { + rawValue } - private var values: [AnyHashable: AnyHashable] = [:] - - public struct Relation: Hashable { - /// maximum number of related promotionImages returned (when they are included) - public static var promotionImages: Relation { - .init(key: "limit[promotionImages]") - } + public var rawValue: String - internal let key: String - - public func hash(into hasher: inout Hasher) { - hasher.combine(key) - } + public init(rawValue: String) { + self.rawValue = rawValue } } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Subscriptions/ById/PromotionalOffers/SubscriptionsByIdPromotionalOffers.GET.0f955f5.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Subscriptions/ById/PromotionalOffers/SubscriptionsByIdPromotionalOffers.GET.0f955f5.generated.swift index e9e0293e..8b908462 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Subscriptions/ById/PromotionalOffers/SubscriptionsByIdPromotionalOffers.GET.0f955f5.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Subscriptions/ById/PromotionalOffers/SubscriptionsByIdPromotionalOffers.GET.0f955f5.generated.swift @@ -54,8 +54,10 @@ extension V1.Subscriptions.ById.PromotionalOffers { /// - Returns: **200**, List of SubscriptionPromotionalOffers as `SubscriptionPromotionalOffersResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -69,12 +71,18 @@ extension V1.Subscriptions.ById.PromotionalOffers { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 404: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -102,132 +110,151 @@ extension V1.Subscriptions.ById.PromotionalOffers.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum SubscriptionPromotionalOfferPrices: Hashable, Codable, RawRepresentable { - case subscriptionPricePoint - case territory - case unknown(String) + public struct SubscriptionPromotionalOfferPrices: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var subscriptionPricePoint: Self { + .init(rawValue: "subscriptionPricePoint") + } - public var rawValue: String { - switch self { - case .subscriptionPricePoint: return "subscriptionPricePoint" - case .territory: return "territory" - case .unknown(let rawValue): return rawValue - } + public static var territory: Self { + .init(rawValue: "territory") } + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "subscriptionPricePoint": self = .subscriptionPricePoint - case "territory": self = .territory - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum SubscriptionPromotionalOffers: Hashable, Codable, RawRepresentable { - case duration - case name - case numberOfPeriods - case offerCode - case offerMode - case prices - case subscription - case unknown(String) - - public var rawValue: String { - switch self { - case .duration: return "duration" - case .name: return "name" - case .numberOfPeriods: return "numberOfPeriods" - case .offerCode: return "offerCode" - case .offerMode: return "offerMode" - case .prices: return "prices" - case .subscription: return "subscription" - case .unknown(let rawValue): return rawValue - } + public struct SubscriptionPromotionalOffers: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var duration: Self { + .init(rawValue: "duration") + } + + public static var name: Self { + .init(rawValue: "name") + } + + public static var numberOfPeriods: Self { + .init(rawValue: "numberOfPeriods") + } + + public static var offerCode: Self { + .init(rawValue: "offerCode") + } + + public static var offerMode: Self { + .init(rawValue: "offerMode") + } + + public static var prices: Self { + .init(rawValue: "prices") + } + + public static var subscription: Self { + .init(rawValue: "subscription") + } + + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "duration": self = .duration - case "name": self = .name - case "numberOfPeriods": self = .numberOfPeriods - case "offerCode": self = .offerCode - case "offerMode": self = .offerMode - case "prices": self = .prices - case "subscription": self = .subscription - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum Subscriptions: Hashable, Codable, RawRepresentable { - case appStoreReviewScreenshot - case availableInAllTerritories - case familySharable - case group - case groupLevel - case introductoryOffers - case name - case offerCodes - case pricePoints - case prices - case productId - case promotedPurchase - case promotionalOffers - case reviewNote - case state - case subscriptionAvailability - case subscriptionLocalizations - case subscriptionPeriod - case unknown(String) - - public var rawValue: String { - switch self { - case .appStoreReviewScreenshot: return "appStoreReviewScreenshot" - case .availableInAllTerritories: return "availableInAllTerritories" - case .familySharable: return "familySharable" - case .group: return "group" - case .groupLevel: return "groupLevel" - case .introductoryOffers: return "introductoryOffers" - case .name: return "name" - case .offerCodes: return "offerCodes" - case .pricePoints: return "pricePoints" - case .prices: return "prices" - case .productId: return "productId" - case .promotedPurchase: return "promotedPurchase" - case .promotionalOffers: return "promotionalOffers" - case .reviewNote: return "reviewNote" - case .state: return "state" - case .subscriptionAvailability: return "subscriptionAvailability" - case .subscriptionLocalizations: return "subscriptionLocalizations" - case .subscriptionPeriod: return "subscriptionPeriod" - case .unknown(let rawValue): return rawValue - } + public struct Subscriptions: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var appStoreReviewScreenshot: Self { + .init(rawValue: "appStoreReviewScreenshot") + } + + public static var familySharable: Self { + .init(rawValue: "familySharable") + } + + public static var group: Self { + .init(rawValue: "group") + } + + public static var groupLevel: Self { + .init(rawValue: "groupLevel") + } + + public static var images: Self { + .init(rawValue: "images") + } + + public static var introductoryOffers: Self { + .init(rawValue: "introductoryOffers") + } + + public static var name: Self { + .init(rawValue: "name") + } + + public static var offerCodes: Self { + .init(rawValue: "offerCodes") + } + + public static var pricePoints: Self { + .init(rawValue: "pricePoints") + } + + public static var prices: Self { + .init(rawValue: "prices") + } + + public static var productId: Self { + .init(rawValue: "productId") + } + + public static var promotedPurchase: Self { + .init(rawValue: "promotedPurchase") + } + + public static var promotionalOffers: Self { + .init(rawValue: "promotionalOffers") + } + + public static var reviewNote: Self { + .init(rawValue: "reviewNote") + } + + public static var state: Self { + .init(rawValue: "state") } + public static var subscriptionAvailability: Self { + .init(rawValue: "subscriptionAvailability") + } + + public static var subscriptionLocalizations: Self { + .init(rawValue: "subscriptionLocalizations") + } + + public static var subscriptionPeriod: Self { + .init(rawValue: "subscriptionPeriod") + } + + public static var winBackOffers: Self { + .init(rawValue: "winBackOffers") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "appStoreReviewScreenshot": self = .appStoreReviewScreenshot - case "availableInAllTerritories": self = .availableInAllTerritories - case "familySharable": self = .familySharable - case "group": self = .group - case "groupLevel": self = .groupLevel - case "introductoryOffers": self = .introductoryOffers - case "name": self = .name - case "offerCodes": self = .offerCodes - case "pricePoints": self = .pricePoints - case "prices": self = .prices - case "productId": self = .productId - case "promotedPurchase": self = .promotedPurchase - case "promotionalOffers": self = .promotionalOffers - case "reviewNote": self = .reviewNote - case "state": self = .state - case "subscriptionAvailability": self = .subscriptionAvailability - case "subscriptionLocalizations": self = .subscriptionLocalizations - case "subscriptionPeriod": self = .subscriptionPeriod - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } @@ -277,25 +304,23 @@ extension V1.Subscriptions.ById.PromotionalOffers.GET { } } - public enum Include: Hashable, Codable, RawRepresentable { - case prices - case subscription - case unknown(String) + public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var prices: Self { + .init(rawValue: "prices") + } - public var rawValue: String { - switch self { - case .prices: return "prices" - case .subscription: return "subscription" - case .unknown(let rawValue): return rawValue - } + public static var subscription: Self { + .init(rawValue: "subscription") } + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "prices": self = .prices - case "subscription": self = .subscription - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Subscriptions/ById/Relationships/AppStoreReviewScreenshot/SubscriptionsByIdRelationshipsAppStoreReviewScreenshot.GET.b03d5c2.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Subscriptions/ById/Relationships/AppStoreReviewScreenshot/SubscriptionsByIdRelationshipsAppStoreReviewScreenshot.GET.b03d5c2.generated.swift new file mode 100644 index 00000000..21e96169 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Subscriptions/ById/Relationships/AppStoreReviewScreenshot/SubscriptionsByIdRelationshipsAppStoreReviewScreenshot.GET.b03d5c2.generated.swift @@ -0,0 +1,86 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.Subscriptions.ById.Relationships.AppStoreReviewScreenshot { + public struct GET: Endpoint { + public typealias Response = SubscriptionAppStoreReviewScreenshotLinkageResponse + + public var path: String { + "/v1/subscriptions/\(id)/relationships/appStoreReviewScreenshot" + } + + /// the id of the requested resource + public var id: String + + public var parameters: Parameters = Parameters() + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + components?.queryItems = [ + + ].filter { $0.value != nil } + if components?.queryItems?.isEmpty ?? false { + components?.queryItems = nil + } + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "GET" + return urlRequest + } + + /// - Returns: **200**, Related linkage as `SubscriptionAppStoreReviewScreenshotLinkageResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(SubscriptionAppStoreReviewScreenshotLinkageResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +extension V1.Subscriptions.ById.Relationships.AppStoreReviewScreenshot.GET { + public struct Parameters: Hashable { + + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Subscriptions/ById/Relationships/Images/SubscriptionsByIdRelationshipsImages.GET.041f9d7.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Subscriptions/ById/Relationships/Images/SubscriptionsByIdRelationshipsImages.GET.041f9d7.generated.swift new file mode 100644 index 00000000..13b6440c --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Subscriptions/ById/Relationships/Images/SubscriptionsByIdRelationshipsImages.GET.041f9d7.generated.swift @@ -0,0 +1,88 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.Subscriptions.ById.Relationships.Images { + public struct GET: Endpoint { + public typealias Response = SubscriptionImagesLinkagesResponse + + public var path: String { + "/v1/subscriptions/\(id)/relationships/images" + } + + /// the id of the requested resource + public var id: String + + public var parameters: Parameters = Parameters() + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + components?.queryItems = [ + URLQueryItem(name: "limit", + value: parameters.limit.map { "\($0)" }) + ].filter { $0.value != nil } + if components?.queryItems?.isEmpty ?? false { + components?.queryItems = nil + } + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "GET" + return urlRequest + } + + /// - Returns: **200**, List of related linkages as `SubscriptionImagesLinkagesResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(SubscriptionImagesLinkagesResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +extension V1.Subscriptions.ById.Relationships.Images.GET { + public struct Parameters: Hashable { + /// maximum resources per page + public var limit: Int? + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Subscriptions/ById/Relationships/IntroductoryOffers/SubscriptionsByIdRelationshipsIntroductoryOffers.DELETE.10ab867.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Subscriptions/ById/Relationships/IntroductoryOffers/SubscriptionsByIdRelationshipsIntroductoryOffers.DELETE.10ab867.generated.swift index d321b096..10b9668c 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Subscriptions/ById/Relationships/IntroductoryOffers/SubscriptionsByIdRelationshipsIntroductoryOffers.DELETE.10ab867.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Subscriptions/ById/Relationships/IntroductoryOffers/SubscriptionsByIdRelationshipsIntroductoryOffers.DELETE.10ab867.generated.swift @@ -31,10 +31,12 @@ extension V1.Subscriptions.ById.Relationships.IntroductoryOffers { return urlRequest } - /// - Returns: **204**, Success (no content) + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **422**, Unprocessable request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -42,8 +44,8 @@ extension V1.Subscriptions.ById.Relationships.IntroductoryOffers { } switch urlResponse.statusCode { - case 204: - return + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) @@ -54,6 +56,12 @@ extension V1.Subscriptions.ById.Relationships.IntroductoryOffers { case 409: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 422: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Subscriptions/ById/Relationships/IntroductoryOffers/SubscriptionsByIdRelationshipsIntroductoryOffers.GET.10ab867.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Subscriptions/ById/Relationships/IntroductoryOffers/SubscriptionsByIdRelationshipsIntroductoryOffers.GET.10ab867.generated.swift index e98b1e33..c6cd059c 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Subscriptions/ById/Relationships/IntroductoryOffers/SubscriptionsByIdRelationshipsIntroductoryOffers.GET.10ab867.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Subscriptions/ById/Relationships/IntroductoryOffers/SubscriptionsByIdRelationshipsIntroductoryOffers.GET.10ab867.generated.swift @@ -42,8 +42,10 @@ extension V1.Subscriptions.ById.Relationships.IntroductoryOffers { /// - Returns: **200**, List of related linkages as `SubscriptionIntroductoryOffersLinkagesResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -57,12 +59,18 @@ extension V1.Subscriptions.ById.Relationships.IntroductoryOffers { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 404: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Subscriptions/ById/Relationships/OfferCodes/SubscriptionsByIdRelationshipsOfferCodes.GET.9aeb85a.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Subscriptions/ById/Relationships/OfferCodes/SubscriptionsByIdRelationshipsOfferCodes.GET.9aeb85a.generated.swift new file mode 100644 index 00000000..310eb218 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Subscriptions/ById/Relationships/OfferCodes/SubscriptionsByIdRelationshipsOfferCodes.GET.9aeb85a.generated.swift @@ -0,0 +1,88 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.Subscriptions.ById.Relationships.OfferCodes { + public struct GET: Endpoint { + public typealias Response = SubscriptionOfferCodesLinkagesResponse + + public var path: String { + "/v1/subscriptions/\(id)/relationships/offerCodes" + } + + /// the id of the requested resource + public var id: String + + public var parameters: Parameters = Parameters() + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + components?.queryItems = [ + URLQueryItem(name: "limit", + value: parameters.limit.map { "\($0)" }) + ].filter { $0.value != nil } + if components?.queryItems?.isEmpty ?? false { + components?.queryItems = nil + } + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "GET" + return urlRequest + } + + /// - Returns: **200**, List of related linkages as `SubscriptionOfferCodesLinkagesResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(SubscriptionOfferCodesLinkagesResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +extension V1.Subscriptions.ById.Relationships.OfferCodes.GET { + public struct Parameters: Hashable { + /// maximum resources per page + public var limit: Int? + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Subscriptions/ById/Relationships/PricePoints/SubscriptionsByIdRelationshipsPricePoints.GET.35a9334.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Subscriptions/ById/Relationships/PricePoints/SubscriptionsByIdRelationshipsPricePoints.GET.35a9334.generated.swift new file mode 100644 index 00000000..aba79c2e --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Subscriptions/ById/Relationships/PricePoints/SubscriptionsByIdRelationshipsPricePoints.GET.35a9334.generated.swift @@ -0,0 +1,88 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.Subscriptions.ById.Relationships.PricePoints { + public struct GET: Endpoint { + public typealias Response = SubscriptionPricePointsLinkagesResponse + + public var path: String { + "/v1/subscriptions/\(id)/relationships/pricePoints" + } + + /// the id of the requested resource + public var id: String + + public var parameters: Parameters = Parameters() + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + components?.queryItems = [ + URLQueryItem(name: "limit", + value: parameters.limit.map { "\($0)" }) + ].filter { $0.value != nil } + if components?.queryItems?.isEmpty ?? false { + components?.queryItems = nil + } + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "GET" + return urlRequest + } + + /// - Returns: **200**, List of related linkages as `SubscriptionPricePointsLinkagesResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(SubscriptionPricePointsLinkagesResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +extension V1.Subscriptions.ById.Relationships.PricePoints.GET { + public struct Parameters: Hashable { + /// maximum resources per page + public var limit: Int? + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Subscriptions/ById/Relationships/Prices/SubscriptionsByIdRelationshipsPrices.DELETE.80efbd4.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Subscriptions/ById/Relationships/Prices/SubscriptionsByIdRelationshipsPrices.DELETE.80efbd4.generated.swift index 2225cacd..08b60e6b 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Subscriptions/ById/Relationships/Prices/SubscriptionsByIdRelationshipsPrices.DELETE.80efbd4.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Subscriptions/ById/Relationships/Prices/SubscriptionsByIdRelationshipsPrices.DELETE.80efbd4.generated.swift @@ -31,10 +31,12 @@ extension V1.Subscriptions.ById.Relationships.Prices { return urlRequest } - /// - Returns: **204**, Success (no content) + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **422**, Unprocessable request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -42,8 +44,8 @@ extension V1.Subscriptions.ById.Relationships.Prices { } switch urlResponse.statusCode { - case 204: - return + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) @@ -54,6 +56,12 @@ extension V1.Subscriptions.ById.Relationships.Prices { case 409: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 422: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Subscriptions/ById/Relationships/Prices/SubscriptionsByIdRelationshipsPrices.GET.80efbd4.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Subscriptions/ById/Relationships/Prices/SubscriptionsByIdRelationshipsPrices.GET.80efbd4.generated.swift index 3bb68431..088a4997 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Subscriptions/ById/Relationships/Prices/SubscriptionsByIdRelationshipsPrices.GET.80efbd4.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Subscriptions/ById/Relationships/Prices/SubscriptionsByIdRelationshipsPrices.GET.80efbd4.generated.swift @@ -42,8 +42,10 @@ extension V1.Subscriptions.ById.Relationships.Prices { /// - Returns: **200**, List of related linkages as `SubscriptionPricesLinkagesResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -57,12 +59,18 @@ extension V1.Subscriptions.ById.Relationships.Prices { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 404: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Subscriptions/ById/Relationships/PromotedPurchase/SubscriptionsByIdRelationshipsPromotedPurchase.GET.2f79e5f.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Subscriptions/ById/Relationships/PromotedPurchase/SubscriptionsByIdRelationshipsPromotedPurchase.GET.2f79e5f.generated.swift new file mode 100644 index 00000000..0024dedc --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Subscriptions/ById/Relationships/PromotedPurchase/SubscriptionsByIdRelationshipsPromotedPurchase.GET.2f79e5f.generated.swift @@ -0,0 +1,86 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.Subscriptions.ById.Relationships.PromotedPurchase { + public struct GET: Endpoint { + public typealias Response = SubscriptionPromotedPurchaseLinkageResponse + + public var path: String { + "/v1/subscriptions/\(id)/relationships/promotedPurchase" + } + + /// the id of the requested resource + public var id: String + + public var parameters: Parameters = Parameters() + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + components?.queryItems = [ + + ].filter { $0.value != nil } + if components?.queryItems?.isEmpty ?? false { + components?.queryItems = nil + } + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "GET" + return urlRequest + } + + /// - Returns: **200**, Related linkage as `SubscriptionPromotedPurchaseLinkageResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(SubscriptionPromotedPurchaseLinkageResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +extension V1.Subscriptions.ById.Relationships.PromotedPurchase.GET { + public struct Parameters: Hashable { + + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Subscriptions/ById/Relationships/PromotionalOffers/SubscriptionsByIdRelationshipsPromotionalOffers.GET.6d2ca03.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Subscriptions/ById/Relationships/PromotionalOffers/SubscriptionsByIdRelationshipsPromotionalOffers.GET.6d2ca03.generated.swift new file mode 100644 index 00000000..872b9e9c --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Subscriptions/ById/Relationships/PromotionalOffers/SubscriptionsByIdRelationshipsPromotionalOffers.GET.6d2ca03.generated.swift @@ -0,0 +1,88 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.Subscriptions.ById.Relationships.PromotionalOffers { + public struct GET: Endpoint { + public typealias Response = SubscriptionPromotionalOffersLinkagesResponse + + public var path: String { + "/v1/subscriptions/\(id)/relationships/promotionalOffers" + } + + /// the id of the requested resource + public var id: String + + public var parameters: Parameters = Parameters() + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + components?.queryItems = [ + URLQueryItem(name: "limit", + value: parameters.limit.map { "\($0)" }) + ].filter { $0.value != nil } + if components?.queryItems?.isEmpty ?? false { + components?.queryItems = nil + } + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "GET" + return urlRequest + } + + /// - Returns: **200**, List of related linkages as `SubscriptionPromotionalOffersLinkagesResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(SubscriptionPromotionalOffersLinkagesResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +extension V1.Subscriptions.ById.Relationships.PromotionalOffers.GET { + public struct Parameters: Hashable { + /// maximum resources per page + public var limit: Int? + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Subscriptions/ById/Relationships/SubscriptionAvailability/SubscriptionsByIdRelationshipsSubscriptionAvailability.GET.40de5dc.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Subscriptions/ById/Relationships/SubscriptionAvailability/SubscriptionsByIdRelationshipsSubscriptionAvailability.GET.40de5dc.generated.swift new file mode 100644 index 00000000..0f1147b3 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Subscriptions/ById/Relationships/SubscriptionAvailability/SubscriptionsByIdRelationshipsSubscriptionAvailability.GET.40de5dc.generated.swift @@ -0,0 +1,86 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.Subscriptions.ById.Relationships.SubscriptionAvailability { + public struct GET: Endpoint { + public typealias Response = SubscriptionSubscriptionAvailabilityLinkageResponse + + public var path: String { + "/v1/subscriptions/\(id)/relationships/subscriptionAvailability" + } + + /// the id of the requested resource + public var id: String + + public var parameters: Parameters = Parameters() + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + components?.queryItems = [ + + ].filter { $0.value != nil } + if components?.queryItems?.isEmpty ?? false { + components?.queryItems = nil + } + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "GET" + return urlRequest + } + + /// - Returns: **200**, Related linkage as `SubscriptionSubscriptionAvailabilityLinkageResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(SubscriptionSubscriptionAvailabilityLinkageResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +extension V1.Subscriptions.ById.Relationships.SubscriptionAvailability.GET { + public struct Parameters: Hashable { + + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Subscriptions/ById/Relationships/SubscriptionLocalizations/SubscriptionsByIdRelationshipsSubscriptionLocalizations.GET.93b5051.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Subscriptions/ById/Relationships/SubscriptionLocalizations/SubscriptionsByIdRelationshipsSubscriptionLocalizations.GET.93b5051.generated.swift new file mode 100644 index 00000000..27eeb5e8 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Subscriptions/ById/Relationships/SubscriptionLocalizations/SubscriptionsByIdRelationshipsSubscriptionLocalizations.GET.93b5051.generated.swift @@ -0,0 +1,88 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.Subscriptions.ById.Relationships.SubscriptionLocalizations { + public struct GET: Endpoint { + public typealias Response = SubscriptionSubscriptionLocalizationsLinkagesResponse + + public var path: String { + "/v1/subscriptions/\(id)/relationships/subscriptionLocalizations" + } + + /// the id of the requested resource + public var id: String + + public var parameters: Parameters = Parameters() + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + components?.queryItems = [ + URLQueryItem(name: "limit", + value: parameters.limit.map { "\($0)" }) + ].filter { $0.value != nil } + if components?.queryItems?.isEmpty ?? false { + components?.queryItems = nil + } + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "GET" + return urlRequest + } + + /// - Returns: **200**, List of related linkages as `SubscriptionSubscriptionLocalizationsLinkagesResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(SubscriptionSubscriptionLocalizationsLinkagesResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +extension V1.Subscriptions.ById.Relationships.SubscriptionLocalizations.GET { + public struct Parameters: Hashable { + /// maximum resources per page + public var limit: Int? + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Subscriptions/ById/Relationships/WinBackOffers/SubscriptionsByIdRelationshipsWinBackOffers.GET.ea511f7.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Subscriptions/ById/Relationships/WinBackOffers/SubscriptionsByIdRelationshipsWinBackOffers.GET.ea511f7.generated.swift new file mode 100644 index 00000000..72a9104b --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Subscriptions/ById/Relationships/WinBackOffers/SubscriptionsByIdRelationshipsWinBackOffers.GET.ea511f7.generated.swift @@ -0,0 +1,88 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.Subscriptions.ById.Relationships.WinBackOffers { + public struct GET: Endpoint { + public typealias Response = SubscriptionWinBackOffersLinkagesResponse + + public var path: String { + "/v1/subscriptions/\(id)/relationships/winBackOffers" + } + + /// the id of the requested resource + public var id: String + + public var parameters: Parameters = Parameters() + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + components?.queryItems = [ + URLQueryItem(name: "limit", + value: parameters.limit.map { "\($0)" }) + ].filter { $0.value != nil } + if components?.queryItems?.isEmpty ?? false { + components?.queryItems = nil + } + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "GET" + return urlRequest + } + + /// - Returns: **200**, List of related linkages as `SubscriptionWinBackOffersLinkagesResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(SubscriptionWinBackOffersLinkagesResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +extension V1.Subscriptions.ById.Relationships.WinBackOffers.GET { + public struct Parameters: Hashable { + /// maximum resources per page + public var limit: Int? + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Subscriptions/ById/SubscriptionAvailability/SubscriptionsByIdSubscriptionAvailability.GET.7ff32af.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Subscriptions/ById/SubscriptionAvailability/SubscriptionsByIdSubscriptionAvailability.GET.7ff32af.generated.swift index 45bd1838..8646c250 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Subscriptions/ById/SubscriptionAvailability/SubscriptionsByIdSubscriptionAvailability.GET.7ff32af.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Subscriptions/ById/SubscriptionAvailability/SubscriptionsByIdSubscriptionAvailability.GET.7ff32af.generated.swift @@ -30,8 +30,6 @@ extension V1.Subscriptions.ById.SubscriptionAvailability { components?.queryItems = [ URLQueryItem(name: "fields[subscriptionAvailabilities]", value: parameters.fields[.subscriptionAvailabilities]?.map { "\($0)" }.joined(separator: ",")), - URLQueryItem(name: "fields[subscriptions]", - value: parameters.fields[.subscriptions]?.map { "\($0)" }.joined(separator: ",")), URLQueryItem(name: "fields[territories]", value: parameters.fields[.territories]?.map { "\($0)" }.joined(separator: ",")), URLQueryItem(name: "include", @@ -50,8 +48,10 @@ extension V1.Subscriptions.ById.SubscriptionAvailability { /// - Returns: **200**, Single SubscriptionAvailability as `SubscriptionAvailabilityResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -65,12 +65,18 @@ extension V1.Subscriptions.ById.SubscriptionAvailability { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 404: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -95,117 +101,39 @@ extension V1.Subscriptions.ById.SubscriptionAvailability.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum SubscriptionAvailabilities: Hashable, Codable, RawRepresentable { - case availableInNewTerritories - case availableTerritories - case subscription - case unknown(String) - - public var rawValue: String { - switch self { - case .availableInNewTerritories: return "availableInNewTerritories" - case .availableTerritories: return "availableTerritories" - case .subscription: return "subscription" - case .unknown(let rawValue): return rawValue - } + public struct SubscriptionAvailabilities: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var availableInNewTerritories: Self { + .init(rawValue: "availableInNewTerritories") } - public init(rawValue: String) { - switch rawValue { - case "availableInNewTerritories": self = .availableInNewTerritories - case "availableTerritories": self = .availableTerritories - case "subscription": self = .subscription - default: self = .unknown(rawValue) - } + public static var availableTerritories: Self { + .init(rawValue: "availableTerritories") } - } - public enum Subscriptions: Hashable, Codable, RawRepresentable { - case appStoreReviewScreenshot - case availableInAllTerritories - case familySharable - case group - case groupLevel - case introductoryOffers - case name - case offerCodes - case pricePoints - case prices - case productId - case promotedPurchase - case promotionalOffers - case reviewNote - case state - case subscriptionAvailability - case subscriptionLocalizations - case subscriptionPeriod - case unknown(String) - - public var rawValue: String { - switch self { - case .appStoreReviewScreenshot: return "appStoreReviewScreenshot" - case .availableInAllTerritories: return "availableInAllTerritories" - case .familySharable: return "familySharable" - case .group: return "group" - case .groupLevel: return "groupLevel" - case .introductoryOffers: return "introductoryOffers" - case .name: return "name" - case .offerCodes: return "offerCodes" - case .pricePoints: return "pricePoints" - case .prices: return "prices" - case .productId: return "productId" - case .promotedPurchase: return "promotedPurchase" - case .promotionalOffers: return "promotionalOffers" - case .reviewNote: return "reviewNote" - case .state: return "state" - case .subscriptionAvailability: return "subscriptionAvailability" - case .subscriptionLocalizations: return "subscriptionLocalizations" - case .subscriptionPeriod: return "subscriptionPeriod" - case .unknown(let rawValue): return rawValue - } + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "appStoreReviewScreenshot": self = .appStoreReviewScreenshot - case "availableInAllTerritories": self = .availableInAllTerritories - case "familySharable": self = .familySharable - case "group": self = .group - case "groupLevel": self = .groupLevel - case "introductoryOffers": self = .introductoryOffers - case "name": self = .name - case "offerCodes": self = .offerCodes - case "pricePoints": self = .pricePoints - case "prices": self = .prices - case "productId": self = .productId - case "promotedPurchase": self = .promotedPurchase - case "promotionalOffers": self = .promotionalOffers - case "reviewNote": self = .reviewNote - case "state": self = .state - case "subscriptionAvailability": self = .subscriptionAvailability - case "subscriptionLocalizations": self = .subscriptionLocalizations - case "subscriptionPeriod": self = .subscriptionPeriod - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum Territories: Hashable, Codable, RawRepresentable { - case currency - case unknown(String) + public struct Territories: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var currency: Self { + .init(rawValue: "currency") + } - public var rawValue: String { - switch self { - case .currency: return "currency" - case .unknown(let rawValue): return rawValue - } + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "currency": self = .currency - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } @@ -215,11 +143,6 @@ extension V1.Subscriptions.ById.SubscriptionAvailability.GET { .init(key: "fields[subscriptionAvailabilities]") } - /// the fields to include for returned resources of type subscriptions - public static var subscriptions: Relation<[Subscriptions]?> { - .init(key: "fields[subscriptions]") - } - /// the fields to include for returned resources of type territories public static var territories: Relation<[Territories]?> { .init(key: "fields[territories]") @@ -233,25 +156,19 @@ extension V1.Subscriptions.ById.SubscriptionAvailability.GET { } } - public enum Include: Hashable, Codable, RawRepresentable { - case availableTerritories - case subscription - case unknown(String) + public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var availableTerritories: Self { + .init(rawValue: "availableTerritories") + } - public var rawValue: String { - switch self { - case .availableTerritories: return "availableTerritories" - case .subscription: return "subscription" - case .unknown(let rawValue): return rawValue - } + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "availableTerritories": self = .availableTerritories - case "subscription": self = .subscription - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Subscriptions/ById/SubscriptionLocalizations/SubscriptionsByIdSubscriptionLocalizations.GET.eef6109.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Subscriptions/ById/SubscriptionLocalizations/SubscriptionsByIdSubscriptionLocalizations.GET.eef6109.generated.swift index 3b62fe75..d4f55a18 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Subscriptions/ById/SubscriptionLocalizations/SubscriptionsByIdSubscriptionLocalizations.GET.eef6109.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Subscriptions/ById/SubscriptionLocalizations/SubscriptionsByIdSubscriptionLocalizations.GET.eef6109.generated.swift @@ -48,8 +48,10 @@ extension V1.Subscriptions.ById.SubscriptionLocalizations { /// - Returns: **200**, List of SubscriptionLocalizations as `SubscriptionLocalizationsResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -63,12 +65,18 @@ extension V1.Subscriptions.ById.SubscriptionLocalizations { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 404: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -94,104 +102,123 @@ extension V1.Subscriptions.ById.SubscriptionLocalizations.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum SubscriptionLocalizations: Hashable, Codable, RawRepresentable { - case description - case locale - case name - case state - case subscription - case unknown(String) - - public var rawValue: String { - switch self { - case .description: return "description" - case .locale: return "locale" - case .name: return "name" - case .state: return "state" - case .subscription: return "subscription" - case .unknown(let rawValue): return rawValue - } + public struct SubscriptionLocalizations: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var description: Self { + .init(rawValue: "description") + } + + public static var locale: Self { + .init(rawValue: "locale") + } + + public static var name: Self { + .init(rawValue: "name") } + public static var state: Self { + .init(rawValue: "state") + } + + public static var subscription: Self { + .init(rawValue: "subscription") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "description": self = .description - case "locale": self = .locale - case "name": self = .name - case "state": self = .state - case "subscription": self = .subscription - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum Subscriptions: Hashable, Codable, RawRepresentable { - case appStoreReviewScreenshot - case availableInAllTerritories - case familySharable - case group - case groupLevel - case introductoryOffers - case name - case offerCodes - case pricePoints - case prices - case productId - case promotedPurchase - case promotionalOffers - case reviewNote - case state - case subscriptionAvailability - case subscriptionLocalizations - case subscriptionPeriod - case unknown(String) - - public var rawValue: String { - switch self { - case .appStoreReviewScreenshot: return "appStoreReviewScreenshot" - case .availableInAllTerritories: return "availableInAllTerritories" - case .familySharable: return "familySharable" - case .group: return "group" - case .groupLevel: return "groupLevel" - case .introductoryOffers: return "introductoryOffers" - case .name: return "name" - case .offerCodes: return "offerCodes" - case .pricePoints: return "pricePoints" - case .prices: return "prices" - case .productId: return "productId" - case .promotedPurchase: return "promotedPurchase" - case .promotionalOffers: return "promotionalOffers" - case .reviewNote: return "reviewNote" - case .state: return "state" - case .subscriptionAvailability: return "subscriptionAvailability" - case .subscriptionLocalizations: return "subscriptionLocalizations" - case .subscriptionPeriod: return "subscriptionPeriod" - case .unknown(let rawValue): return rawValue - } + public struct Subscriptions: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var appStoreReviewScreenshot: Self { + .init(rawValue: "appStoreReviewScreenshot") + } + + public static var familySharable: Self { + .init(rawValue: "familySharable") + } + + public static var group: Self { + .init(rawValue: "group") + } + + public static var groupLevel: Self { + .init(rawValue: "groupLevel") + } + + public static var images: Self { + .init(rawValue: "images") + } + + public static var introductoryOffers: Self { + .init(rawValue: "introductoryOffers") + } + + public static var name: Self { + .init(rawValue: "name") + } + + public static var offerCodes: Self { + .init(rawValue: "offerCodes") } + public static var pricePoints: Self { + .init(rawValue: "pricePoints") + } + + public static var prices: Self { + .init(rawValue: "prices") + } + + public static var productId: Self { + .init(rawValue: "productId") + } + + public static var promotedPurchase: Self { + .init(rawValue: "promotedPurchase") + } + + public static var promotionalOffers: Self { + .init(rawValue: "promotionalOffers") + } + + public static var reviewNote: Self { + .init(rawValue: "reviewNote") + } + + public static var state: Self { + .init(rawValue: "state") + } + + public static var subscriptionAvailability: Self { + .init(rawValue: "subscriptionAvailability") + } + + public static var subscriptionLocalizations: Self { + .init(rawValue: "subscriptionLocalizations") + } + + public static var subscriptionPeriod: Self { + .init(rawValue: "subscriptionPeriod") + } + + public static var winBackOffers: Self { + .init(rawValue: "winBackOffers") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "appStoreReviewScreenshot": self = .appStoreReviewScreenshot - case "availableInAllTerritories": self = .availableInAllTerritories - case "familySharable": self = .familySharable - case "group": self = .group - case "groupLevel": self = .groupLevel - case "introductoryOffers": self = .introductoryOffers - case "name": self = .name - case "offerCodes": self = .offerCodes - case "pricePoints": self = .pricePoints - case "prices": self = .prices - case "productId": self = .productId - case "promotedPurchase": self = .promotedPurchase - case "promotionalOffers": self = .promotionalOffers - case "reviewNote": self = .reviewNote - case "state": self = .state - case "subscriptionAvailability": self = .subscriptionAvailability - case "subscriptionLocalizations": self = .subscriptionLocalizations - case "subscriptionPeriod": self = .subscriptionPeriod - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } @@ -214,22 +241,19 @@ extension V1.Subscriptions.ById.SubscriptionLocalizations.GET { } } - public enum Include: Hashable, Codable, RawRepresentable { - case subscription - case unknown(String) + public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var subscription: Self { + .init(rawValue: "subscription") + } - public var rawValue: String { - switch self { - case .subscription: return "subscription" - case .unknown(let rawValue): return rawValue - } + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "subscription": self = .subscription - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Subscriptions/ById/SubscriptionsById.DELETE.fc34fc5.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Subscriptions/ById/SubscriptionsById.DELETE.fc34fc5.generated.swift index 5e44aabd..a4e4050a 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Subscriptions/ById/SubscriptionsById.DELETE.fc34fc5.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Subscriptions/ById/SubscriptionsById.DELETE.fc34fc5.generated.swift @@ -31,11 +31,12 @@ extension V1.Subscriptions.ById { return urlRequest } - /// - Returns: **204**, Success (no content) /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -43,12 +44,12 @@ extension V1.Subscriptions.ById { } switch urlResponse.statusCode { - case 204: - return - case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) @@ -58,6 +59,9 @@ extension V1.Subscriptions.ById { case 409: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Subscriptions/ById/SubscriptionsById.GET.fc34fc5.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Subscriptions/ById/SubscriptionsById.GET.fc34fc5.generated.swift index 6679b6a7..74cd548e 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Subscriptions/ById/SubscriptionsById.GET.fc34fc5.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Subscriptions/ById/SubscriptionsById.GET.fc34fc5.generated.swift @@ -34,22 +34,26 @@ extension V1.Subscriptions.ById { value: parameters.fields[.subscriptionAppStoreReviewScreenshots]?.map { "\($0)" }.joined(separator: ",")), URLQueryItem(name: "fields[subscriptionAvailabilities]", value: parameters.fields[.subscriptionAvailabilities]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "fields[subscriptionImages]", + value: parameters.fields[.subscriptionImages]?.map { "\($0)" }.joined(separator: ",")), URLQueryItem(name: "fields[subscriptionIntroductoryOffers]", value: parameters.fields[.subscriptionIntroductoryOffers]?.map { "\($0)" }.joined(separator: ",")), URLQueryItem(name: "fields[subscriptionLocalizations]", value: parameters.fields[.subscriptionLocalizations]?.map { "\($0)" }.joined(separator: ",")), URLQueryItem(name: "fields[subscriptionOfferCodes]", value: parameters.fields[.subscriptionOfferCodes]?.map { "\($0)" }.joined(separator: ",")), - URLQueryItem(name: "fields[subscriptionPricePoints]", - value: parameters.fields[.subscriptionPricePoints]?.map { "\($0)" }.joined(separator: ",")), URLQueryItem(name: "fields[subscriptionPrices]", value: parameters.fields[.subscriptionPrices]?.map { "\($0)" }.joined(separator: ",")), URLQueryItem(name: "fields[subscriptionPromotionalOffers]", value: parameters.fields[.subscriptionPromotionalOffers]?.map { "\($0)" }.joined(separator: ",")), URLQueryItem(name: "fields[subscriptions]", value: parameters.fields[.subscriptions]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "fields[winBackOffers]", + value: parameters.fields[.winBackOffers]?.map { "\($0)" }.joined(separator: ",")), URLQueryItem(name: "include", value: parameters.include?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "limit[images]", + value: parameters.limit[.images].map { "\($0)" }), URLQueryItem(name: "limit[introductoryOffers]", value: parameters.limit[.introductoryOffers].map { "\($0)" }), URLQueryItem(name: "limit[offerCodes]", @@ -59,7 +63,9 @@ extension V1.Subscriptions.ById { URLQueryItem(name: "limit[promotionalOffers]", value: parameters.limit[.promotionalOffers].map { "\($0)" }), URLQueryItem(name: "limit[subscriptionLocalizations]", - value: parameters.limit[.subscriptionLocalizations].map { "\($0)" }) + value: parameters.limit[.subscriptionLocalizations].map { "\($0)" }), + URLQueryItem(name: "limit[winBackOffers]", + value: parameters.limit[.winBackOffers].map { "\($0)" }) ].filter { $0.value != nil } if components?.queryItems?.isEmpty ?? false { components?.queryItems = nil @@ -72,8 +78,10 @@ extension V1.Subscriptions.ById { /// - Returns: **200**, Single Subscription as `SubscriptionResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -87,12 +95,18 @@ extension V1.Subscriptions.ById { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 404: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -117,409 +131,499 @@ extension V1.Subscriptions.ById.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum PromotedPurchases: Hashable, Codable, RawRepresentable { - case app - case enabled - case inAppPurchaseV2 - case promotionImages - case state - case subscription - case visibleForAllUsers - case unknown(String) - - public var rawValue: String { - switch self { - case .app: return "app" - case .enabled: return "enabled" - case .inAppPurchaseV2: return "inAppPurchaseV2" - case .promotionImages: return "promotionImages" - case .state: return "state" - case .subscription: return "subscription" - case .visibleForAllUsers: return "visibleForAllUsers" - case .unknown(let rawValue): return rawValue - } + public struct PromotedPurchases: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var enabled: Self { + .init(rawValue: "enabled") + } + + public static var inAppPurchaseV2: Self { + .init(rawValue: "inAppPurchaseV2") + } + + public static var state: Self { + .init(rawValue: "state") } + public static var subscription: Self { + .init(rawValue: "subscription") + } + + public static var visibleForAllUsers: Self { + .init(rawValue: "visibleForAllUsers") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "app": self = .app - case "enabled": self = .enabled - case "inAppPurchaseV2": self = .inAppPurchaseV2 - case "promotionImages": self = .promotionImages - case "state": self = .state - case "subscription": self = .subscription - case "visibleForAllUsers": self = .visibleForAllUsers - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum SubscriptionAppStoreReviewScreenshots: Hashable, Codable, RawRepresentable { - case assetDeliveryState - case assetToken - case assetType - case fileName - case fileSize - case imageAsset - case sourceFileChecksum - case subscription - case uploadOperations - case uploaded - case unknown(String) - - public var rawValue: String { - switch self { - case .assetDeliveryState: return "assetDeliveryState" - case .assetToken: return "assetToken" - case .assetType: return "assetType" - case .fileName: return "fileName" - case .fileSize: return "fileSize" - case .imageAsset: return "imageAsset" - case .sourceFileChecksum: return "sourceFileChecksum" - case .subscription: return "subscription" - case .uploadOperations: return "uploadOperations" - case .uploaded: return "uploaded" - case .unknown(let rawValue): return rawValue - } + public struct SubscriptionAppStoreReviewScreenshots: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var assetDeliveryState: Self { + .init(rawValue: "assetDeliveryState") + } + + public static var assetToken: Self { + .init(rawValue: "assetToken") + } + + public static var assetType: Self { + .init(rawValue: "assetType") + } + + public static var fileName: Self { + .init(rawValue: "fileName") + } + + public static var fileSize: Self { + .init(rawValue: "fileSize") + } + + public static var imageAsset: Self { + .init(rawValue: "imageAsset") + } + + public static var sourceFileChecksum: Self { + .init(rawValue: "sourceFileChecksum") + } + + public static var subscription: Self { + .init(rawValue: "subscription") + } + + public static var uploadOperations: Self { + .init(rawValue: "uploadOperations") + } + + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "assetDeliveryState": self = .assetDeliveryState - case "assetToken": self = .assetToken - case "assetType": self = .assetType - case "fileName": self = .fileName - case "fileSize": self = .fileSize - case "imageAsset": self = .imageAsset - case "sourceFileChecksum": self = .sourceFileChecksum - case "subscription": self = .subscription - case "uploadOperations": self = .uploadOperations - case "uploaded": self = .uploaded - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum SubscriptionAvailabilities: Hashable, Codable, RawRepresentable { - case availableInNewTerritories - case availableTerritories - case subscription - case unknown(String) + public struct SubscriptionAvailabilities: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var availableInNewTerritories: Self { + .init(rawValue: "availableInNewTerritories") + } + + public static var availableTerritories: Self { + .init(rawValue: "availableTerritories") + } - public var rawValue: String { - switch self { - case .availableInNewTerritories: return "availableInNewTerritories" - case .availableTerritories: return "availableTerritories" - case .subscription: return "subscription" - case .unknown(let rawValue): return rawValue - } + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "availableInNewTerritories": self = .availableInNewTerritories - case "availableTerritories": self = .availableTerritories - case "subscription": self = .subscription - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum SubscriptionIntroductoryOffers: Hashable, Codable, RawRepresentable { - case duration - case endDate - case numberOfPeriods - case offerMode - case startDate - case subscription - case subscriptionPricePoint - case territory - case unknown(String) - - public var rawValue: String { - switch self { - case .duration: return "duration" - case .endDate: return "endDate" - case .numberOfPeriods: return "numberOfPeriods" - case .offerMode: return "offerMode" - case .startDate: return "startDate" - case .subscription: return "subscription" - case .subscriptionPricePoint: return "subscriptionPricePoint" - case .territory: return "territory" - case .unknown(let rawValue): return rawValue - } + public struct SubscriptionImages: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var assetToken: Self { + .init(rawValue: "assetToken") + } + + public static var fileName: Self { + .init(rawValue: "fileName") + } + + public static var fileSize: Self { + .init(rawValue: "fileSize") + } + + public static var imageAsset: Self { + .init(rawValue: "imageAsset") + } + + public static var sourceFileChecksum: Self { + .init(rawValue: "sourceFileChecksum") + } + + public static var state: Self { + .init(rawValue: "state") + } + + public static var subscription: Self { + .init(rawValue: "subscription") + } + + public static var uploadOperations: Self { + .init(rawValue: "uploadOperations") } + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "duration": self = .duration - case "endDate": self = .endDate - case "numberOfPeriods": self = .numberOfPeriods - case "offerMode": self = .offerMode - case "startDate": self = .startDate - case "subscription": self = .subscription - case "subscriptionPricePoint": self = .subscriptionPricePoint - case "territory": self = .territory - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum SubscriptionLocalizations: Hashable, Codable, RawRepresentable { - case description - case locale - case name - case state - case subscription - case unknown(String) - - public var rawValue: String { - switch self { - case .description: return "description" - case .locale: return "locale" - case .name: return "name" - case .state: return "state" - case .subscription: return "subscription" - case .unknown(let rawValue): return rawValue - } + public struct SubscriptionIntroductoryOffers: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var duration: Self { + .init(rawValue: "duration") + } + + public static var endDate: Self { + .init(rawValue: "endDate") } + public static var numberOfPeriods: Self { + .init(rawValue: "numberOfPeriods") + } + + public static var offerMode: Self { + .init(rawValue: "offerMode") + } + + public static var startDate: Self { + .init(rawValue: "startDate") + } + + public static var subscription: Self { + .init(rawValue: "subscription") + } + + public static var subscriptionPricePoint: Self { + .init(rawValue: "subscriptionPricePoint") + } + + public static var territory: Self { + .init(rawValue: "territory") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "description": self = .description - case "locale": self = .locale - case "name": self = .name - case "state": self = .state - case "subscription": self = .subscription - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum SubscriptionOfferCodes: Hashable, Codable, RawRepresentable { - case active - case customCodes - case customerEligibilities - case duration - case name - case numberOfPeriods - case offerEligibility - case offerMode - case oneTimeUseCodes - case prices - case subscription - case totalNumberOfCodes - case unknown(String) - - public var rawValue: String { - switch self { - case .active: return "active" - case .customCodes: return "customCodes" - case .customerEligibilities: return "customerEligibilities" - case .duration: return "duration" - case .name: return "name" - case .numberOfPeriods: return "numberOfPeriods" - case .offerEligibility: return "offerEligibility" - case .offerMode: return "offerMode" - case .oneTimeUseCodes: return "oneTimeUseCodes" - case .prices: return "prices" - case .subscription: return "subscription" - case .totalNumberOfCodes: return "totalNumberOfCodes" - case .unknown(let rawValue): return rawValue - } + public struct SubscriptionLocalizations: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var description: Self { + .init(rawValue: "description") + } + + public static var locale: Self { + .init(rawValue: "locale") + } + + public static var name: Self { + .init(rawValue: "name") + } + + public static var state: Self { + .init(rawValue: "state") + } + + public static var subscription: Self { + .init(rawValue: "subscription") + } + + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "active": self = .active - case "customCodes": self = .customCodes - case "customerEligibilities": self = .customerEligibilities - case "duration": self = .duration - case "name": self = .name - case "numberOfPeriods": self = .numberOfPeriods - case "offerEligibility": self = .offerEligibility - case "offerMode": self = .offerMode - case "oneTimeUseCodes": self = .oneTimeUseCodes - case "prices": self = .prices - case "subscription": self = .subscription - case "totalNumberOfCodes": self = .totalNumberOfCodes - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum SubscriptionPricePoints: Hashable, Codable, RawRepresentable { - case customerPrice - case equalizations - case proceeds - case proceedsYear2 - case subscription - case territory - case unknown(String) - - public var rawValue: String { - switch self { - case .customerPrice: return "customerPrice" - case .equalizations: return "equalizations" - case .proceeds: return "proceeds" - case .proceedsYear2: return "proceedsYear2" - case .subscription: return "subscription" - case .territory: return "territory" - case .unknown(let rawValue): return rawValue - } + public struct SubscriptionOfferCodes: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var active: Self { + .init(rawValue: "active") } + public static var customCodes: Self { + .init(rawValue: "customCodes") + } + + public static var customerEligibilities: Self { + .init(rawValue: "customerEligibilities") + } + + public static var duration: Self { + .init(rawValue: "duration") + } + + public static var name: Self { + .init(rawValue: "name") + } + + public static var numberOfPeriods: Self { + .init(rawValue: "numberOfPeriods") + } + + public static var offerEligibility: Self { + .init(rawValue: "offerEligibility") + } + + public static var offerMode: Self { + .init(rawValue: "offerMode") + } + + public static var oneTimeUseCodes: Self { + .init(rawValue: "oneTimeUseCodes") + } + + public static var prices: Self { + .init(rawValue: "prices") + } + + public static var subscription: Self { + .init(rawValue: "subscription") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "customerPrice": self = .customerPrice - case "equalizations": self = .equalizations - case "proceeds": self = .proceeds - case "proceedsYear2": self = .proceedsYear2 - case "subscription": self = .subscription - case "territory": self = .territory - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum SubscriptionPrices: Hashable, Codable, RawRepresentable { - case preserveCurrentPrice - case preserved - case startDate - case subscription - case subscriptionPricePoint - case territory - case unknown(String) - - public var rawValue: String { - switch self { - case .preserveCurrentPrice: return "preserveCurrentPrice" - case .preserved: return "preserved" - case .startDate: return "startDate" - case .subscription: return "subscription" - case .subscriptionPricePoint: return "subscriptionPricePoint" - case .territory: return "territory" - case .unknown(let rawValue): return rawValue - } + public struct SubscriptionPrices: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var preserved: Self { + .init(rawValue: "preserved") + } + + public static var startDate: Self { + .init(rawValue: "startDate") + } + + public static var subscriptionPricePoint: Self { + .init(rawValue: "subscriptionPricePoint") + } + + public static var territory: Self { + .init(rawValue: "territory") } + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "preserveCurrentPrice": self = .preserveCurrentPrice - case "preserved": self = .preserved - case "startDate": self = .startDate - case "subscription": self = .subscription - case "subscriptionPricePoint": self = .subscriptionPricePoint - case "territory": self = .territory - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum SubscriptionPromotionalOffers: Hashable, Codable, RawRepresentable { - case duration - case name - case numberOfPeriods - case offerCode - case offerMode - case prices - case subscription - case unknown(String) - - public var rawValue: String { - switch self { - case .duration: return "duration" - case .name: return "name" - case .numberOfPeriods: return "numberOfPeriods" - case .offerCode: return "offerCode" - case .offerMode: return "offerMode" - case .prices: return "prices" - case .subscription: return "subscription" - case .unknown(let rawValue): return rawValue - } + public struct SubscriptionPromotionalOffers: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var duration: Self { + .init(rawValue: "duration") + } + + public static var name: Self { + .init(rawValue: "name") + } + + public static var numberOfPeriods: Self { + .init(rawValue: "numberOfPeriods") } + public static var offerCode: Self { + .init(rawValue: "offerCode") + } + + public static var offerMode: Self { + .init(rawValue: "offerMode") + } + + public static var prices: Self { + .init(rawValue: "prices") + } + + public static var subscription: Self { + .init(rawValue: "subscription") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "duration": self = .duration - case "name": self = .name - case "numberOfPeriods": self = .numberOfPeriods - case "offerCode": self = .offerCode - case "offerMode": self = .offerMode - case "prices": self = .prices - case "subscription": self = .subscription - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum Subscriptions: Hashable, Codable, RawRepresentable { - case appStoreReviewScreenshot - case availableInAllTerritories - case familySharable - case group - case groupLevel - case introductoryOffers - case name - case offerCodes - case pricePoints - case prices - case productId - case promotedPurchase - case promotionalOffers - case reviewNote - case state - case subscriptionAvailability - case subscriptionLocalizations - case subscriptionPeriod - case unknown(String) - - public var rawValue: String { - switch self { - case .appStoreReviewScreenshot: return "appStoreReviewScreenshot" - case .availableInAllTerritories: return "availableInAllTerritories" - case .familySharable: return "familySharable" - case .group: return "group" - case .groupLevel: return "groupLevel" - case .introductoryOffers: return "introductoryOffers" - case .name: return "name" - case .offerCodes: return "offerCodes" - case .pricePoints: return "pricePoints" - case .prices: return "prices" - case .productId: return "productId" - case .promotedPurchase: return "promotedPurchase" - case .promotionalOffers: return "promotionalOffers" - case .reviewNote: return "reviewNote" - case .state: return "state" - case .subscriptionAvailability: return "subscriptionAvailability" - case .subscriptionLocalizations: return "subscriptionLocalizations" - case .subscriptionPeriod: return "subscriptionPeriod" - case .unknown(let rawValue): return rawValue - } + public struct Subscriptions: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var appStoreReviewScreenshot: Self { + .init(rawValue: "appStoreReviewScreenshot") + } + + public static var familySharable: Self { + .init(rawValue: "familySharable") + } + + public static var group: Self { + .init(rawValue: "group") + } + + public static var groupLevel: Self { + .init(rawValue: "groupLevel") + } + + public static var images: Self { + .init(rawValue: "images") + } + + public static var introductoryOffers: Self { + .init(rawValue: "introductoryOffers") + } + + public static var name: Self { + .init(rawValue: "name") + } + + public static var offerCodes: Self { + .init(rawValue: "offerCodes") + } + + public static var pricePoints: Self { + .init(rawValue: "pricePoints") + } + + public static var prices: Self { + .init(rawValue: "prices") + } + + public static var productId: Self { + .init(rawValue: "productId") + } + + public static var promotedPurchase: Self { + .init(rawValue: "promotedPurchase") + } + + public static var promotionalOffers: Self { + .init(rawValue: "promotionalOffers") + } + + public static var reviewNote: Self { + .init(rawValue: "reviewNote") + } + + public static var state: Self { + .init(rawValue: "state") + } + + public static var subscriptionAvailability: Self { + .init(rawValue: "subscriptionAvailability") + } + + public static var subscriptionLocalizations: Self { + .init(rawValue: "subscriptionLocalizations") + } + + public static var subscriptionPeriod: Self { + .init(rawValue: "subscriptionPeriod") + } + + public static var winBackOffers: Self { + .init(rawValue: "winBackOffers") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct WinBackOffers: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var customerEligibilityPaidSubscriptionDurationInMonths: Self { + .init(rawValue: "customerEligibilityPaidSubscriptionDurationInMonths") + } + + public static var customerEligibilityTimeSinceLastSubscribedInMonths: Self { + .init(rawValue: "customerEligibilityTimeSinceLastSubscribedInMonths") + } + + public static var customerEligibilityWaitBetweenOffersInMonths: Self { + .init(rawValue: "customerEligibilityWaitBetweenOffersInMonths") + } + + public static var duration: Self { + .init(rawValue: "duration") + } + + public static var endDate: Self { + .init(rawValue: "endDate") + } + + public static var offerId: Self { + .init(rawValue: "offerId") + } + + public static var offerMode: Self { + .init(rawValue: "offerMode") + } + + public static var periodCount: Self { + .init(rawValue: "periodCount") + } + + public static var prices: Self { + .init(rawValue: "prices") + } + + public static var priority: Self { + .init(rawValue: "priority") } + public static var promotionIntent: Self { + .init(rawValue: "promotionIntent") + } + + public static var referenceName: Self { + .init(rawValue: "referenceName") + } + + public static var startDate: Self { + .init(rawValue: "startDate") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "appStoreReviewScreenshot": self = .appStoreReviewScreenshot - case "availableInAllTerritories": self = .availableInAllTerritories - case "familySharable": self = .familySharable - case "group": self = .group - case "groupLevel": self = .groupLevel - case "introductoryOffers": self = .introductoryOffers - case "name": self = .name - case "offerCodes": self = .offerCodes - case "pricePoints": self = .pricePoints - case "prices": self = .prices - case "productId": self = .productId - case "promotedPurchase": self = .promotedPurchase - case "promotionalOffers": self = .promotionalOffers - case "reviewNote": self = .reviewNote - case "state": self = .state - case "subscriptionAvailability": self = .subscriptionAvailability - case "subscriptionLocalizations": self = .subscriptionLocalizations - case "subscriptionPeriod": self = .subscriptionPeriod - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } @@ -539,6 +643,11 @@ extension V1.Subscriptions.ById.GET { .init(key: "fields[subscriptionAvailabilities]") } + /// the fields to include for returned resources of type subscriptionImages + public static var subscriptionImages: Relation<[SubscriptionImages]?> { + .init(key: "fields[subscriptionImages]") + } + /// the fields to include for returned resources of type subscriptionIntroductoryOffers public static var subscriptionIntroductoryOffers: Relation<[SubscriptionIntroductoryOffers]?> { .init(key: "fields[subscriptionIntroductoryOffers]") @@ -554,11 +663,6 @@ extension V1.Subscriptions.ById.GET { .init(key: "fields[subscriptionOfferCodes]") } - /// the fields to include for returned resources of type subscriptionPricePoints - public static var subscriptionPricePoints: Relation<[SubscriptionPricePoints]?> { - .init(key: "fields[subscriptionPricePoints]") - } - /// the fields to include for returned resources of type subscriptionPrices public static var subscriptionPrices: Relation<[SubscriptionPrices]?> { .init(key: "fields[subscriptionPrices]") @@ -574,6 +678,11 @@ extension V1.Subscriptions.ById.GET { .init(key: "fields[subscriptions]") } + /// the fields to include for returned resources of type winBackOffers + public static var winBackOffers: Relation<[WinBackOffers]?> { + .init(key: "fields[winBackOffers]") + } + internal let key: String public func hash(into hasher: inout Hasher) { @@ -582,46 +691,59 @@ extension V1.Subscriptions.ById.GET { } } - public enum Include: Hashable, Codable, RawRepresentable { - case appStoreReviewScreenshot - case group - case introductoryOffers - case offerCodes - case prices - case promotedPurchase - case promotionalOffers - case subscriptionAvailability - case subscriptionLocalizations - case unknown(String) - - public var rawValue: String { - switch self { - case .appStoreReviewScreenshot: return "appStoreReviewScreenshot" - case .group: return "group" - case .introductoryOffers: return "introductoryOffers" - case .offerCodes: return "offerCodes" - case .prices: return "prices" - case .promotedPurchase: return "promotedPurchase" - case .promotionalOffers: return "promotionalOffers" - case .subscriptionAvailability: return "subscriptionAvailability" - case .subscriptionLocalizations: return "subscriptionLocalizations" - case .unknown(let rawValue): return rawValue - } + public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var appStoreReviewScreenshot: Self { + .init(rawValue: "appStoreReviewScreenshot") + } + + public static var group: Self { + .init(rawValue: "group") + } + + public static var images: Self { + .init(rawValue: "images") + } + + public static var introductoryOffers: Self { + .init(rawValue: "introductoryOffers") + } + + public static var offerCodes: Self { + .init(rawValue: "offerCodes") + } + + public static var prices: Self { + .init(rawValue: "prices") + } + + public static var promotedPurchase: Self { + .init(rawValue: "promotedPurchase") + } + + public static var promotionalOffers: Self { + .init(rawValue: "promotionalOffers") } + public static var subscriptionAvailability: Self { + .init(rawValue: "subscriptionAvailability") + } + + public static var subscriptionLocalizations: Self { + .init(rawValue: "subscriptionLocalizations") + } + + public static var winBackOffers: Self { + .init(rawValue: "winBackOffers") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "appStoreReviewScreenshot": self = .appStoreReviewScreenshot - case "group": self = .group - case "introductoryOffers": self = .introductoryOffers - case "offerCodes": self = .offerCodes - case "prices": self = .prices - case "promotedPurchase": self = .promotedPurchase - case "promotionalOffers": self = .promotionalOffers - case "subscriptionAvailability": self = .subscriptionAvailability - case "subscriptionLocalizations": self = .subscriptionLocalizations - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } @@ -634,6 +756,11 @@ extension V1.Subscriptions.ById.GET { private var values: [AnyHashable: AnyHashable] = [:] public struct Relation: Hashable { + /// maximum number of related images returned (when they are included) + public static var images: Relation { + .init(key: "limit[images]") + } + /// maximum number of related introductoryOffers returned (when they are included) public static var introductoryOffers: Relation { .init(key: "limit[introductoryOffers]") @@ -659,6 +786,11 @@ extension V1.Subscriptions.ById.GET { .init(key: "limit[subscriptionLocalizations]") } + /// maximum number of related winBackOffers returned (when they are included) + public static var winBackOffers: Relation { + .init(key: "limit[winBackOffers]") + } + internal let key: String public func hash(into hasher: inout Hasher) { diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Subscriptions/ById/SubscriptionsById.PATCH.fc34fc5.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Subscriptions/ById/SubscriptionsById.PATCH.fc34fc5.generated.swift index a9a26abd..24dcd73f 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Subscriptions/ById/SubscriptionsById.PATCH.fc34fc5.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Subscriptions/ById/SubscriptionsById.PATCH.fc34fc5.generated.swift @@ -48,9 +48,12 @@ extension V1.Subscriptions.ById { /// - Returns: **200**, Single Subscription as `SubscriptionResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **422**, Unprocessable request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -64,6 +67,9 @@ extension V1.Subscriptions.ById { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) @@ -73,6 +79,12 @@ extension V1.Subscriptions.ById { case 409: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 422: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Subscriptions/ById/WinBackOffers/SubscriptionsByIdWinBackOffers.GET.befc1c2.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Subscriptions/ById/WinBackOffers/SubscriptionsByIdWinBackOffers.GET.befc1c2.generated.swift new file mode 100644 index 00000000..441e2e9c --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Subscriptions/ById/WinBackOffers/SubscriptionsByIdWinBackOffers.GET.befc1c2.generated.swift @@ -0,0 +1,255 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.Subscriptions.ById.WinBackOffers { + public struct GET: Endpoint { + public typealias Response = WinBackOffersResponse + + public var path: String { + "/v1/subscriptions/\(id)/winBackOffers" + } + + /// the id of the requested resource + public var id: String + + public var parameters: Parameters = Parameters() + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + components?.queryItems = [ + URLQueryItem(name: "fields[winBackOfferPrices]", + value: parameters.fields[.winBackOfferPrices]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "fields[winBackOffers]", + value: parameters.fields[.winBackOffers]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "include", + value: parameters.include?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "limit[prices]", + value: parameters.limit[.prices].map { "\($0)" }), + URLQueryItem(name: "limit", + value: parameters.limit[].map { "\($0)" }) + ].filter { $0.value != nil } + if components?.queryItems?.isEmpty ?? false { + components?.queryItems = nil + } + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "GET" + return urlRequest + } + + /// - Returns: **200**, List of WinBackOffers as `WinBackOffersResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(WinBackOffersResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +extension V1.Subscriptions.ById.WinBackOffers.GET { + public struct Parameters: Hashable { + public var fields: Fields = Fields() + + /// comma-separated list of relationships to include + public var include: [Include]? + + /// maximum resources per page + public var limit: Limit = Limit() + + public struct Fields: Hashable { + public subscript (_ relation: Relation) -> T { + get { values[relation]?.base as! T } + set { values[relation] = AnyHashable(newValue) } + } + + private var values: [AnyHashable: AnyHashable] = [:] + + public struct WinBackOfferPrices: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var subscriptionPricePoint: Self { + .init(rawValue: "subscriptionPricePoint") + } + + public static var territory: Self { + .init(rawValue: "territory") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct WinBackOffers: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var customerEligibilityPaidSubscriptionDurationInMonths: Self { + .init(rawValue: "customerEligibilityPaidSubscriptionDurationInMonths") + } + + public static var customerEligibilityTimeSinceLastSubscribedInMonths: Self { + .init(rawValue: "customerEligibilityTimeSinceLastSubscribedInMonths") + } + + public static var customerEligibilityWaitBetweenOffersInMonths: Self { + .init(rawValue: "customerEligibilityWaitBetweenOffersInMonths") + } + + public static var duration: Self { + .init(rawValue: "duration") + } + + public static var endDate: Self { + .init(rawValue: "endDate") + } + + public static var offerId: Self { + .init(rawValue: "offerId") + } + + public static var offerMode: Self { + .init(rawValue: "offerMode") + } + + public static var periodCount: Self { + .init(rawValue: "periodCount") + } + + public static var prices: Self { + .init(rawValue: "prices") + } + + public static var priority: Self { + .init(rawValue: "priority") + } + + public static var promotionIntent: Self { + .init(rawValue: "promotionIntent") + } + + public static var referenceName: Self { + .init(rawValue: "referenceName") + } + + public static var startDate: Self { + .init(rawValue: "startDate") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct Relation: Hashable { + /// the fields to include for returned resources of type winBackOfferPrices + public static var winBackOfferPrices: Relation<[WinBackOfferPrices]?> { + .init(key: "fields[winBackOfferPrices]") + } + + /// the fields to include for returned resources of type winBackOffers + public static var winBackOffers: Relation<[WinBackOffers]?> { + .init(key: "fields[winBackOffers]") + } + + internal let key: String + + public func hash(into hasher: inout Hasher) { + hasher.combine(key) + } + } + } + + public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var prices: Self { + .init(rawValue: "prices") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct Limit: Hashable { + public subscript () -> Int? { + get { self[Relation(key: "limit")] } + set { self[Relation(key: "limit")] = newValue } + } + + public subscript (_ relation: Relation) -> T { + get { values[relation]?.base as! T } + set { values[relation] = AnyHashable(newValue) } + } + + private var values: [AnyHashable: AnyHashable] = [:] + + public struct Relation: Hashable { + /// maximum number of related prices returned (when they are included) + public static var prices: Relation { + .init(key: "limit[prices]") + } + + internal let key: String + + public func hash(into hasher: inout Hasher) { + hasher.combine(key) + } + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Subscriptions/Subscriptions.POST.ce7f6ec.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Subscriptions/Subscriptions.POST.ce7f6ec.generated.swift index 7cb9e9b3..59375248 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Subscriptions/Subscriptions.POST.ce7f6ec.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Subscriptions/Subscriptions.POST.ce7f6ec.generated.swift @@ -41,8 +41,11 @@ extension V1.Subscriptions { /// - Returns: **201**, Single Subscription as `SubscriptionResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **422**, Unprocessable request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -56,12 +59,21 @@ extension V1.Subscriptions { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 409: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 422: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Territories/Territories.GET.d379ce3.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Territories/Territories.GET.d379ce3.generated.swift index 119f928d..b28baae4 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Territories/Territories.GET.d379ce3.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Territories/Territories.GET.d379ce3.generated.swift @@ -41,7 +41,9 @@ extension V1.Territories { /// - Returns: **200**, List of Territories as `TerritoriesResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -55,9 +57,15 @@ extension V1.Territories { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -80,22 +88,19 @@ extension V1.Territories.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum Territories: Hashable, Codable, RawRepresentable { - case currency - case unknown(String) + public struct Territories: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var currency: Self { + .init(rawValue: "currency") + } - public var rawValue: String { - switch self { - case .currency: return "currency" - case .unknown(let rawValue): return rawValue - } + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "currency": self = .currency - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/TerritoryAvailabilities/ById/TerritoryAvailabilitiesById.PATCH.8ed0900.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/TerritoryAvailabilities/ById/TerritoryAvailabilitiesById.PATCH.8ed0900.generated.swift index 85b5883c..4c4919a6 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/TerritoryAvailabilities/ById/TerritoryAvailabilitiesById.PATCH.8ed0900.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/TerritoryAvailabilities/ById/TerritoryAvailabilitiesById.PATCH.8ed0900.generated.swift @@ -48,9 +48,12 @@ extension V1.TerritoryAvailabilities.ById { /// - Returns: **200**, Single TerritoryAvailability as `TerritoryAvailabilityResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **422**, Unprocessable request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -64,6 +67,9 @@ extension V1.TerritoryAvailabilities.ById { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) @@ -73,6 +79,12 @@ extension V1.TerritoryAvailabilities.ById { case 409: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 422: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/UserInvitations/ById/Relationships/VisibleApps/UserInvitationsByIdRelationshipsVisibleApps.GET.5b1770a.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/UserInvitations/ById/Relationships/VisibleApps/UserInvitationsByIdRelationshipsVisibleApps.GET.5b1770a.generated.swift new file mode 100644 index 00000000..bdb39e32 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/UserInvitations/ById/Relationships/VisibleApps/UserInvitationsByIdRelationshipsVisibleApps.GET.5b1770a.generated.swift @@ -0,0 +1,88 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.UserInvitations.ById.Relationships.VisibleApps { + public struct GET: Endpoint { + public typealias Response = UserInvitationVisibleAppsLinkagesResponse + + public var path: String { + "/v1/userInvitations/\(id)/relationships/visibleApps" + } + + /// the id of the requested resource + public var id: String + + public var parameters: Parameters = Parameters() + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + components?.queryItems = [ + URLQueryItem(name: "limit", + value: parameters.limit.map { "\($0)" }) + ].filter { $0.value != nil } + if components?.queryItems?.isEmpty ?? false { + components?.queryItems = nil + } + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "GET" + return urlRequest + } + + /// - Returns: **200**, List of related linkages as `UserInvitationVisibleAppsLinkagesResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(UserInvitationVisibleAppsLinkagesResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +extension V1.UserInvitations.ById.Relationships.VisibleApps.GET { + public struct Parameters: Hashable { + /// maximum resources per page + public var limit: Int? + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/UserInvitations/ById/UserInvitationsById.DELETE.4728350.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/UserInvitations/ById/UserInvitationsById.DELETE.4728350.generated.swift index e9adf0f9..6dd0a49e 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/UserInvitations/ById/UserInvitationsById.DELETE.4728350.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/UserInvitations/ById/UserInvitationsById.DELETE.4728350.generated.swift @@ -31,11 +31,12 @@ extension V1.UserInvitations.ById { return urlRequest } - /// - Returns: **204**, Success (no content) /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -43,12 +44,12 @@ extension V1.UserInvitations.ById { } switch urlResponse.statusCode { - case 204: - return - case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) @@ -58,6 +59,9 @@ extension V1.UserInvitations.ById { case 409: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/UserInvitations/ById/UserInvitationsById.GET.4728350.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/UserInvitations/ById/UserInvitationsById.GET.4728350.generated.swift index 42d57db5..75456c30 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/UserInvitations/ById/UserInvitationsById.GET.4728350.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/UserInvitations/ById/UserInvitationsById.GET.4728350.generated.swift @@ -48,8 +48,10 @@ extension V1.UserInvitations.ById { /// - Returns: **200**, Single UserInvitation as `UserInvitationResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -63,12 +65,18 @@ extension V1.UserInvitations.ById { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 404: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -93,191 +101,259 @@ extension V1.UserInvitations.ById.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum Apps: Hashable, Codable, RawRepresentable { - case appAvailability - case appClips - case appCustomProductPages - case appEncryptionDeclarations - case appEvents - case appInfos - case appPricePoints - case appPriceSchedule - case appStoreVersionExperimentsV2 - case appStoreVersions - case availableInNewTerritories - case availableTerritories - case betaAppLocalizations - case betaAppReviewDetail - case betaGroups - case betaLicenseAgreement - case betaTesters - case builds - case bundleId - case ciProduct - case contentRightsDeclaration - case customerReviews - case endUserLicenseAgreement - case gameCenterDetail - case gameCenterEnabledVersions - case inAppPurchases - case inAppPurchasesV2 - case isOrEverWasMadeForKids - case name - case perfPowerMetrics - case preOrder - case preReleaseVersions - case pricePoints - case prices - case primaryLocale - case promotedPurchases - case reviewSubmissions - case sku - case subscriptionGracePeriod - case subscriptionGroups - case subscriptionStatusUrl - case subscriptionStatusUrlForSandbox - case subscriptionStatusUrlVersion - case subscriptionStatusUrlVersionForSandbox - case unknown(String) - - public var rawValue: String { - switch self { - case .appAvailability: return "appAvailability" - case .appClips: return "appClips" - case .appCustomProductPages: return "appCustomProductPages" - case .appEncryptionDeclarations: return "appEncryptionDeclarations" - case .appEvents: return "appEvents" - case .appInfos: return "appInfos" - case .appPricePoints: return "appPricePoints" - case .appPriceSchedule: return "appPriceSchedule" - case .appStoreVersionExperimentsV2: return "appStoreVersionExperimentsV2" - case .appStoreVersions: return "appStoreVersions" - case .availableInNewTerritories: return "availableInNewTerritories" - case .availableTerritories: return "availableTerritories" - case .betaAppLocalizations: return "betaAppLocalizations" - case .betaAppReviewDetail: return "betaAppReviewDetail" - case .betaGroups: return "betaGroups" - case .betaLicenseAgreement: return "betaLicenseAgreement" - case .betaTesters: return "betaTesters" - case .builds: return "builds" - case .bundleId: return "bundleId" - case .ciProduct: return "ciProduct" - case .contentRightsDeclaration: return "contentRightsDeclaration" - case .customerReviews: return "customerReviews" - case .endUserLicenseAgreement: return "endUserLicenseAgreement" - case .gameCenterDetail: return "gameCenterDetail" - case .gameCenterEnabledVersions: return "gameCenterEnabledVersions" - case .inAppPurchases: return "inAppPurchases" - case .inAppPurchasesV2: return "inAppPurchasesV2" - case .isOrEverWasMadeForKids: return "isOrEverWasMadeForKids" - case .name: return "name" - case .perfPowerMetrics: return "perfPowerMetrics" - case .preOrder: return "preOrder" - case .preReleaseVersions: return "preReleaseVersions" - case .pricePoints: return "pricePoints" - case .prices: return "prices" - case .primaryLocale: return "primaryLocale" - case .promotedPurchases: return "promotedPurchases" - case .reviewSubmissions: return "reviewSubmissions" - case .sku: return "sku" - case .subscriptionGracePeriod: return "subscriptionGracePeriod" - case .subscriptionGroups: return "subscriptionGroups" - case .subscriptionStatusUrl: return "subscriptionStatusUrl" - case .subscriptionStatusUrlForSandbox: return "subscriptionStatusUrlForSandbox" - case .subscriptionStatusUrlVersion: return "subscriptionStatusUrlVersion" - case .subscriptionStatusUrlVersionForSandbox: return "subscriptionStatusUrlVersionForSandbox" - case .unknown(let rawValue): return rawValue - } + public struct Apps: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var accessibilityDeclarations: Self { + .init(rawValue: "accessibilityDeclarations") + } + + public static var accessibilityUrl: Self { + .init(rawValue: "accessibilityUrl") + } + + public static var alternativeDistributionKey: Self { + .init(rawValue: "alternativeDistributionKey") + } + + public static var analyticsReportRequests: Self { + .init(rawValue: "analyticsReportRequests") + } + + public static var appAvailabilityV2: Self { + .init(rawValue: "appAvailabilityV2") + } + + public static var appClips: Self { + .init(rawValue: "appClips") + } + + public static var appCustomProductPages: Self { + .init(rawValue: "appCustomProductPages") + } + + public static var appEncryptionDeclarations: Self { + .init(rawValue: "appEncryptionDeclarations") + } + + public static var appEvents: Self { + .init(rawValue: "appEvents") + } + + public static var appInfos: Self { + .init(rawValue: "appInfos") + } + + public static var appPricePoints: Self { + .init(rawValue: "appPricePoints") + } + + public static var appPriceSchedule: Self { + .init(rawValue: "appPriceSchedule") + } + + public static var appStoreVersionExperimentsV2: Self { + .init(rawValue: "appStoreVersionExperimentsV2") + } + + public static var appStoreVersions: Self { + .init(rawValue: "appStoreVersions") + } + + public static var backgroundAssets: Self { + .init(rawValue: "backgroundAssets") + } + + public static var betaAppLocalizations: Self { + .init(rawValue: "betaAppLocalizations") + } + + public static var betaAppReviewDetail: Self { + .init(rawValue: "betaAppReviewDetail") + } + + public static var betaFeedbackCrashSubmissions: Self { + .init(rawValue: "betaFeedbackCrashSubmissions") + } + + public static var betaFeedbackScreenshotSubmissions: Self { + .init(rawValue: "betaFeedbackScreenshotSubmissions") + } + + public static var betaGroups: Self { + .init(rawValue: "betaGroups") + } + + public static var betaLicenseAgreement: Self { + .init(rawValue: "betaLicenseAgreement") + } + + public static var betaTesters: Self { + .init(rawValue: "betaTesters") + } + + public static var builds: Self { + .init(rawValue: "builds") + } + + public static var bundleId: Self { + .init(rawValue: "bundleId") + } + + public static var ciProduct: Self { + .init(rawValue: "ciProduct") + } + + public static var contentRightsDeclaration: Self { + .init(rawValue: "contentRightsDeclaration") + } + + public static var customerReviewSummarizations: Self { + .init(rawValue: "customerReviewSummarizations") + } + + public static var customerReviews: Self { + .init(rawValue: "customerReviews") + } + + public static var endUserLicenseAgreement: Self { + .init(rawValue: "endUserLicenseAgreement") + } + + public static var gameCenterDetail: Self { + .init(rawValue: "gameCenterDetail") + } + + public static var gameCenterEnabledVersions: Self { + .init(rawValue: "gameCenterEnabledVersions") + } + + public static var inAppPurchases: Self { + .init(rawValue: "inAppPurchases") + } + + public static var inAppPurchasesV2: Self { + .init(rawValue: "inAppPurchasesV2") + } + + public static var isOrEverWasMadeForKids: Self { + .init(rawValue: "isOrEverWasMadeForKids") + } + + public static var marketplaceSearchDetail: Self { + .init(rawValue: "marketplaceSearchDetail") + } + + public static var name: Self { + .init(rawValue: "name") + } + + public static var perfPowerMetrics: Self { + .init(rawValue: "perfPowerMetrics") + } + + public static var preReleaseVersions: Self { + .init(rawValue: "preReleaseVersions") + } + + public static var primaryLocale: Self { + .init(rawValue: "primaryLocale") + } + + public static var promotedPurchases: Self { + .init(rawValue: "promotedPurchases") + } + + public static var reviewSubmissions: Self { + .init(rawValue: "reviewSubmissions") + } + + public static var sku: Self { + .init(rawValue: "sku") + } + + public static var streamlinedPurchasingEnabled: Self { + .init(rawValue: "streamlinedPurchasingEnabled") + } + + public static var subscriptionGracePeriod: Self { + .init(rawValue: "subscriptionGracePeriod") + } + + public static var subscriptionGroups: Self { + .init(rawValue: "subscriptionGroups") + } + + public static var subscriptionStatusUrl: Self { + .init(rawValue: "subscriptionStatusUrl") } + public static var subscriptionStatusUrlForSandbox: Self { + .init(rawValue: "subscriptionStatusUrlForSandbox") + } + + public static var subscriptionStatusUrlVersion: Self { + .init(rawValue: "subscriptionStatusUrlVersion") + } + + public static var subscriptionStatusUrlVersionForSandbox: Self { + .init(rawValue: "subscriptionStatusUrlVersionForSandbox") + } + + public static var webhooks: Self { + .init(rawValue: "webhooks") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "appAvailability": self = .appAvailability - case "appClips": self = .appClips - case "appCustomProductPages": self = .appCustomProductPages - case "appEncryptionDeclarations": self = .appEncryptionDeclarations - case "appEvents": self = .appEvents - case "appInfos": self = .appInfos - case "appPricePoints": self = .appPricePoints - case "appPriceSchedule": self = .appPriceSchedule - case "appStoreVersionExperimentsV2": self = .appStoreVersionExperimentsV2 - case "appStoreVersions": self = .appStoreVersions - case "availableInNewTerritories": self = .availableInNewTerritories - case "availableTerritories": self = .availableTerritories - case "betaAppLocalizations": self = .betaAppLocalizations - case "betaAppReviewDetail": self = .betaAppReviewDetail - case "betaGroups": self = .betaGroups - case "betaLicenseAgreement": self = .betaLicenseAgreement - case "betaTesters": self = .betaTesters - case "builds": self = .builds - case "bundleId": self = .bundleId - case "ciProduct": self = .ciProduct - case "contentRightsDeclaration": self = .contentRightsDeclaration - case "customerReviews": self = .customerReviews - case "endUserLicenseAgreement": self = .endUserLicenseAgreement - case "gameCenterDetail": self = .gameCenterDetail - case "gameCenterEnabledVersions": self = .gameCenterEnabledVersions - case "inAppPurchases": self = .inAppPurchases - case "inAppPurchasesV2": self = .inAppPurchasesV2 - case "isOrEverWasMadeForKids": self = .isOrEverWasMadeForKids - case "name": self = .name - case "perfPowerMetrics": self = .perfPowerMetrics - case "preOrder": self = .preOrder - case "preReleaseVersions": self = .preReleaseVersions - case "pricePoints": self = .pricePoints - case "prices": self = .prices - case "primaryLocale": self = .primaryLocale - case "promotedPurchases": self = .promotedPurchases - case "reviewSubmissions": self = .reviewSubmissions - case "sku": self = .sku - case "subscriptionGracePeriod": self = .subscriptionGracePeriod - case "subscriptionGroups": self = .subscriptionGroups - case "subscriptionStatusUrl": self = .subscriptionStatusUrl - case "subscriptionStatusUrlForSandbox": self = .subscriptionStatusUrlForSandbox - case "subscriptionStatusUrlVersion": self = .subscriptionStatusUrlVersion - case "subscriptionStatusUrlVersionForSandbox": self = .subscriptionStatusUrlVersionForSandbox - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum UserInvitations: Hashable, Codable, RawRepresentable { - case allAppsVisible - case email - case expirationDate - case firstName - case lastName - case provisioningAllowed - case roles - case visibleApps - case unknown(String) - - public var rawValue: String { - switch self { - case .allAppsVisible: return "allAppsVisible" - case .email: return "email" - case .expirationDate: return "expirationDate" - case .firstName: return "firstName" - case .lastName: return "lastName" - case .provisioningAllowed: return "provisioningAllowed" - case .roles: return "roles" - case .visibleApps: return "visibleApps" - case .unknown(let rawValue): return rawValue - } + public struct UserInvitations: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var allAppsVisible: Self { + .init(rawValue: "allAppsVisible") + } + + public static var email: Self { + .init(rawValue: "email") + } + + public static var expirationDate: Self { + .init(rawValue: "expirationDate") + } + + public static var firstName: Self { + .init(rawValue: "firstName") } + public static var lastName: Self { + .init(rawValue: "lastName") + } + + public static var provisioningAllowed: Self { + .init(rawValue: "provisioningAllowed") + } + + public static var roles: Self { + .init(rawValue: "roles") + } + + public static var visibleApps: Self { + .init(rawValue: "visibleApps") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "allAppsVisible": self = .allAppsVisible - case "email": self = .email - case "expirationDate": self = .expirationDate - case "firstName": self = .firstName - case "lastName": self = .lastName - case "provisioningAllowed": self = .provisioningAllowed - case "roles": self = .roles - case "visibleApps": self = .visibleApps - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } @@ -300,22 +376,19 @@ extension V1.UserInvitations.ById.GET { } } - public enum Include: Hashable, Codable, RawRepresentable { - case visibleApps - case unknown(String) + public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var visibleApps: Self { + .init(rawValue: "visibleApps") + } - public var rawValue: String { - switch self { - case .visibleApps: return "visibleApps" - case .unknown(let rawValue): return rawValue - } + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "visibleApps": self = .visibleApps - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/UserInvitations/ById/VisibleApps/UserInvitationsByIdVisibleApps.GET.037be59.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/UserInvitations/ById/VisibleApps/UserInvitationsByIdVisibleApps.GET.037be59.generated.swift index 23e55d69..45b14c6a 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/UserInvitations/ById/VisibleApps/UserInvitationsByIdVisibleApps.GET.037be59.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/UserInvitations/ById/VisibleApps/UserInvitationsByIdVisibleApps.GET.037be59.generated.swift @@ -44,8 +44,10 @@ extension V1.UserInvitations.ById.VisibleApps { /// - Returns: **200**, List of Apps with get as `AppsWithoutIncludesResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -59,12 +61,18 @@ extension V1.UserInvitations.ById.VisibleApps { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 404: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -87,151 +95,215 @@ extension V1.UserInvitations.ById.VisibleApps.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum Apps: Hashable, Codable, RawRepresentable { - case appAvailability - case appClips - case appCustomProductPages - case appEncryptionDeclarations - case appEvents - case appInfos - case appPricePoints - case appPriceSchedule - case appStoreVersionExperimentsV2 - case appStoreVersions - case availableInNewTerritories - case availableTerritories - case betaAppLocalizations - case betaAppReviewDetail - case betaGroups - case betaLicenseAgreement - case betaTesters - case builds - case bundleId - case ciProduct - case contentRightsDeclaration - case customerReviews - case endUserLicenseAgreement - case gameCenterDetail - case gameCenterEnabledVersions - case inAppPurchases - case inAppPurchasesV2 - case isOrEverWasMadeForKids - case name - case perfPowerMetrics - case preOrder - case preReleaseVersions - case pricePoints - case prices - case primaryLocale - case promotedPurchases - case reviewSubmissions - case sku - case subscriptionGracePeriod - case subscriptionGroups - case subscriptionStatusUrl - case subscriptionStatusUrlForSandbox - case subscriptionStatusUrlVersion - case subscriptionStatusUrlVersionForSandbox - case unknown(String) - - public var rawValue: String { - switch self { - case .appAvailability: return "appAvailability" - case .appClips: return "appClips" - case .appCustomProductPages: return "appCustomProductPages" - case .appEncryptionDeclarations: return "appEncryptionDeclarations" - case .appEvents: return "appEvents" - case .appInfos: return "appInfos" - case .appPricePoints: return "appPricePoints" - case .appPriceSchedule: return "appPriceSchedule" - case .appStoreVersionExperimentsV2: return "appStoreVersionExperimentsV2" - case .appStoreVersions: return "appStoreVersions" - case .availableInNewTerritories: return "availableInNewTerritories" - case .availableTerritories: return "availableTerritories" - case .betaAppLocalizations: return "betaAppLocalizations" - case .betaAppReviewDetail: return "betaAppReviewDetail" - case .betaGroups: return "betaGroups" - case .betaLicenseAgreement: return "betaLicenseAgreement" - case .betaTesters: return "betaTesters" - case .builds: return "builds" - case .bundleId: return "bundleId" - case .ciProduct: return "ciProduct" - case .contentRightsDeclaration: return "contentRightsDeclaration" - case .customerReviews: return "customerReviews" - case .endUserLicenseAgreement: return "endUserLicenseAgreement" - case .gameCenterDetail: return "gameCenterDetail" - case .gameCenterEnabledVersions: return "gameCenterEnabledVersions" - case .inAppPurchases: return "inAppPurchases" - case .inAppPurchasesV2: return "inAppPurchasesV2" - case .isOrEverWasMadeForKids: return "isOrEverWasMadeForKids" - case .name: return "name" - case .perfPowerMetrics: return "perfPowerMetrics" - case .preOrder: return "preOrder" - case .preReleaseVersions: return "preReleaseVersions" - case .pricePoints: return "pricePoints" - case .prices: return "prices" - case .primaryLocale: return "primaryLocale" - case .promotedPurchases: return "promotedPurchases" - case .reviewSubmissions: return "reviewSubmissions" - case .sku: return "sku" - case .subscriptionGracePeriod: return "subscriptionGracePeriod" - case .subscriptionGroups: return "subscriptionGroups" - case .subscriptionStatusUrl: return "subscriptionStatusUrl" - case .subscriptionStatusUrlForSandbox: return "subscriptionStatusUrlForSandbox" - case .subscriptionStatusUrlVersion: return "subscriptionStatusUrlVersion" - case .subscriptionStatusUrlVersionForSandbox: return "subscriptionStatusUrlVersionForSandbox" - case .unknown(let rawValue): return rawValue - } + public struct Apps: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var accessibilityDeclarations: Self { + .init(rawValue: "accessibilityDeclarations") + } + + public static var accessibilityUrl: Self { + .init(rawValue: "accessibilityUrl") + } + + public static var alternativeDistributionKey: Self { + .init(rawValue: "alternativeDistributionKey") + } + + public static var analyticsReportRequests: Self { + .init(rawValue: "analyticsReportRequests") + } + + public static var appAvailabilityV2: Self { + .init(rawValue: "appAvailabilityV2") + } + + public static var appClips: Self { + .init(rawValue: "appClips") } + public static var appCustomProductPages: Self { + .init(rawValue: "appCustomProductPages") + } + + public static var appEncryptionDeclarations: Self { + .init(rawValue: "appEncryptionDeclarations") + } + + public static var appEvents: Self { + .init(rawValue: "appEvents") + } + + public static var appInfos: Self { + .init(rawValue: "appInfos") + } + + public static var appPricePoints: Self { + .init(rawValue: "appPricePoints") + } + + public static var appPriceSchedule: Self { + .init(rawValue: "appPriceSchedule") + } + + public static var appStoreVersionExperimentsV2: Self { + .init(rawValue: "appStoreVersionExperimentsV2") + } + + public static var appStoreVersions: Self { + .init(rawValue: "appStoreVersions") + } + + public static var backgroundAssets: Self { + .init(rawValue: "backgroundAssets") + } + + public static var betaAppLocalizations: Self { + .init(rawValue: "betaAppLocalizations") + } + + public static var betaAppReviewDetail: Self { + .init(rawValue: "betaAppReviewDetail") + } + + public static var betaFeedbackCrashSubmissions: Self { + .init(rawValue: "betaFeedbackCrashSubmissions") + } + + public static var betaFeedbackScreenshotSubmissions: Self { + .init(rawValue: "betaFeedbackScreenshotSubmissions") + } + + public static var betaGroups: Self { + .init(rawValue: "betaGroups") + } + + public static var betaLicenseAgreement: Self { + .init(rawValue: "betaLicenseAgreement") + } + + public static var betaTesters: Self { + .init(rawValue: "betaTesters") + } + + public static var builds: Self { + .init(rawValue: "builds") + } + + public static var bundleId: Self { + .init(rawValue: "bundleId") + } + + public static var ciProduct: Self { + .init(rawValue: "ciProduct") + } + + public static var contentRightsDeclaration: Self { + .init(rawValue: "contentRightsDeclaration") + } + + public static var customerReviewSummarizations: Self { + .init(rawValue: "customerReviewSummarizations") + } + + public static var customerReviews: Self { + .init(rawValue: "customerReviews") + } + + public static var endUserLicenseAgreement: Self { + .init(rawValue: "endUserLicenseAgreement") + } + + public static var gameCenterDetail: Self { + .init(rawValue: "gameCenterDetail") + } + + public static var gameCenterEnabledVersions: Self { + .init(rawValue: "gameCenterEnabledVersions") + } + + public static var inAppPurchases: Self { + .init(rawValue: "inAppPurchases") + } + + public static var inAppPurchasesV2: Self { + .init(rawValue: "inAppPurchasesV2") + } + + public static var isOrEverWasMadeForKids: Self { + .init(rawValue: "isOrEverWasMadeForKids") + } + + public static var marketplaceSearchDetail: Self { + .init(rawValue: "marketplaceSearchDetail") + } + + public static var name: Self { + .init(rawValue: "name") + } + + public static var perfPowerMetrics: Self { + .init(rawValue: "perfPowerMetrics") + } + + public static var preReleaseVersions: Self { + .init(rawValue: "preReleaseVersions") + } + + public static var primaryLocale: Self { + .init(rawValue: "primaryLocale") + } + + public static var promotedPurchases: Self { + .init(rawValue: "promotedPurchases") + } + + public static var reviewSubmissions: Self { + .init(rawValue: "reviewSubmissions") + } + + public static var sku: Self { + .init(rawValue: "sku") + } + + public static var streamlinedPurchasingEnabled: Self { + .init(rawValue: "streamlinedPurchasingEnabled") + } + + public static var subscriptionGracePeriod: Self { + .init(rawValue: "subscriptionGracePeriod") + } + + public static var subscriptionGroups: Self { + .init(rawValue: "subscriptionGroups") + } + + public static var subscriptionStatusUrl: Self { + .init(rawValue: "subscriptionStatusUrl") + } + + public static var subscriptionStatusUrlForSandbox: Self { + .init(rawValue: "subscriptionStatusUrlForSandbox") + } + + public static var subscriptionStatusUrlVersion: Self { + .init(rawValue: "subscriptionStatusUrlVersion") + } + + public static var subscriptionStatusUrlVersionForSandbox: Self { + .init(rawValue: "subscriptionStatusUrlVersionForSandbox") + } + + public static var webhooks: Self { + .init(rawValue: "webhooks") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "appAvailability": self = .appAvailability - case "appClips": self = .appClips - case "appCustomProductPages": self = .appCustomProductPages - case "appEncryptionDeclarations": self = .appEncryptionDeclarations - case "appEvents": self = .appEvents - case "appInfos": self = .appInfos - case "appPricePoints": self = .appPricePoints - case "appPriceSchedule": self = .appPriceSchedule - case "appStoreVersionExperimentsV2": self = .appStoreVersionExperimentsV2 - case "appStoreVersions": self = .appStoreVersions - case "availableInNewTerritories": self = .availableInNewTerritories - case "availableTerritories": self = .availableTerritories - case "betaAppLocalizations": self = .betaAppLocalizations - case "betaAppReviewDetail": self = .betaAppReviewDetail - case "betaGroups": self = .betaGroups - case "betaLicenseAgreement": self = .betaLicenseAgreement - case "betaTesters": self = .betaTesters - case "builds": self = .builds - case "bundleId": self = .bundleId - case "ciProduct": self = .ciProduct - case "contentRightsDeclaration": self = .contentRightsDeclaration - case "customerReviews": self = .customerReviews - case "endUserLicenseAgreement": self = .endUserLicenseAgreement - case "gameCenterDetail": self = .gameCenterDetail - case "gameCenterEnabledVersions": self = .gameCenterEnabledVersions - case "inAppPurchases": self = .inAppPurchases - case "inAppPurchasesV2": self = .inAppPurchasesV2 - case "isOrEverWasMadeForKids": self = .isOrEverWasMadeForKids - case "name": self = .name - case "perfPowerMetrics": self = .perfPowerMetrics - case "preOrder": self = .preOrder - case "preReleaseVersions": self = .preReleaseVersions - case "pricePoints": self = .pricePoints - case "prices": self = .prices - case "primaryLocale": self = .primaryLocale - case "promotedPurchases": self = .promotedPurchases - case "reviewSubmissions": self = .reviewSubmissions - case "sku": self = .sku - case "subscriptionGracePeriod": self = .subscriptionGracePeriod - case "subscriptionGroups": self = .subscriptionGroups - case "subscriptionStatusUrl": self = .subscriptionStatusUrl - case "subscriptionStatusUrlForSandbox": self = .subscriptionStatusUrlForSandbox - case "subscriptionStatusUrlVersion": self = .subscriptionStatusUrlVersion - case "subscriptionStatusUrlVersionForSandbox": self = .subscriptionStatusUrlVersionForSandbox - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/UserInvitations/UserInvitations.GET.dab0615.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/UserInvitations/UserInvitations.GET.dab0615.generated.swift index 9857c505..15717648 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/UserInvitations/UserInvitations.GET.dab0615.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/UserInvitations/UserInvitations.GET.dab0615.generated.swift @@ -55,7 +55,9 @@ extension V1.UserInvitations { /// - Returns: **200**, List of UserInvitations as `UserInvitationsResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -69,9 +71,15 @@ extension V1.UserInvitations { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -102,191 +110,259 @@ extension V1.UserInvitations.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum Apps: Hashable, Codable, RawRepresentable { - case appAvailability - case appClips - case appCustomProductPages - case appEncryptionDeclarations - case appEvents - case appInfos - case appPricePoints - case appPriceSchedule - case appStoreVersionExperimentsV2 - case appStoreVersions - case availableInNewTerritories - case availableTerritories - case betaAppLocalizations - case betaAppReviewDetail - case betaGroups - case betaLicenseAgreement - case betaTesters - case builds - case bundleId - case ciProduct - case contentRightsDeclaration - case customerReviews - case endUserLicenseAgreement - case gameCenterDetail - case gameCenterEnabledVersions - case inAppPurchases - case inAppPurchasesV2 - case isOrEverWasMadeForKids - case name - case perfPowerMetrics - case preOrder - case preReleaseVersions - case pricePoints - case prices - case primaryLocale - case promotedPurchases - case reviewSubmissions - case sku - case subscriptionGracePeriod - case subscriptionGroups - case subscriptionStatusUrl - case subscriptionStatusUrlForSandbox - case subscriptionStatusUrlVersion - case subscriptionStatusUrlVersionForSandbox - case unknown(String) - - public var rawValue: String { - switch self { - case .appAvailability: return "appAvailability" - case .appClips: return "appClips" - case .appCustomProductPages: return "appCustomProductPages" - case .appEncryptionDeclarations: return "appEncryptionDeclarations" - case .appEvents: return "appEvents" - case .appInfos: return "appInfos" - case .appPricePoints: return "appPricePoints" - case .appPriceSchedule: return "appPriceSchedule" - case .appStoreVersionExperimentsV2: return "appStoreVersionExperimentsV2" - case .appStoreVersions: return "appStoreVersions" - case .availableInNewTerritories: return "availableInNewTerritories" - case .availableTerritories: return "availableTerritories" - case .betaAppLocalizations: return "betaAppLocalizations" - case .betaAppReviewDetail: return "betaAppReviewDetail" - case .betaGroups: return "betaGroups" - case .betaLicenseAgreement: return "betaLicenseAgreement" - case .betaTesters: return "betaTesters" - case .builds: return "builds" - case .bundleId: return "bundleId" - case .ciProduct: return "ciProduct" - case .contentRightsDeclaration: return "contentRightsDeclaration" - case .customerReviews: return "customerReviews" - case .endUserLicenseAgreement: return "endUserLicenseAgreement" - case .gameCenterDetail: return "gameCenterDetail" - case .gameCenterEnabledVersions: return "gameCenterEnabledVersions" - case .inAppPurchases: return "inAppPurchases" - case .inAppPurchasesV2: return "inAppPurchasesV2" - case .isOrEverWasMadeForKids: return "isOrEverWasMadeForKids" - case .name: return "name" - case .perfPowerMetrics: return "perfPowerMetrics" - case .preOrder: return "preOrder" - case .preReleaseVersions: return "preReleaseVersions" - case .pricePoints: return "pricePoints" - case .prices: return "prices" - case .primaryLocale: return "primaryLocale" - case .promotedPurchases: return "promotedPurchases" - case .reviewSubmissions: return "reviewSubmissions" - case .sku: return "sku" - case .subscriptionGracePeriod: return "subscriptionGracePeriod" - case .subscriptionGroups: return "subscriptionGroups" - case .subscriptionStatusUrl: return "subscriptionStatusUrl" - case .subscriptionStatusUrlForSandbox: return "subscriptionStatusUrlForSandbox" - case .subscriptionStatusUrlVersion: return "subscriptionStatusUrlVersion" - case .subscriptionStatusUrlVersionForSandbox: return "subscriptionStatusUrlVersionForSandbox" - case .unknown(let rawValue): return rawValue - } + public struct Apps: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var accessibilityDeclarations: Self { + .init(rawValue: "accessibilityDeclarations") + } + + public static var accessibilityUrl: Self { + .init(rawValue: "accessibilityUrl") + } + + public static var alternativeDistributionKey: Self { + .init(rawValue: "alternativeDistributionKey") + } + + public static var analyticsReportRequests: Self { + .init(rawValue: "analyticsReportRequests") + } + + public static var appAvailabilityV2: Self { + .init(rawValue: "appAvailabilityV2") + } + + public static var appClips: Self { + .init(rawValue: "appClips") + } + + public static var appCustomProductPages: Self { + .init(rawValue: "appCustomProductPages") + } + + public static var appEncryptionDeclarations: Self { + .init(rawValue: "appEncryptionDeclarations") + } + + public static var appEvents: Self { + .init(rawValue: "appEvents") + } + + public static var appInfos: Self { + .init(rawValue: "appInfos") + } + + public static var appPricePoints: Self { + .init(rawValue: "appPricePoints") + } + + public static var appPriceSchedule: Self { + .init(rawValue: "appPriceSchedule") + } + + public static var appStoreVersionExperimentsV2: Self { + .init(rawValue: "appStoreVersionExperimentsV2") + } + + public static var appStoreVersions: Self { + .init(rawValue: "appStoreVersions") + } + + public static var backgroundAssets: Self { + .init(rawValue: "backgroundAssets") + } + + public static var betaAppLocalizations: Self { + .init(rawValue: "betaAppLocalizations") + } + + public static var betaAppReviewDetail: Self { + .init(rawValue: "betaAppReviewDetail") + } + + public static var betaFeedbackCrashSubmissions: Self { + .init(rawValue: "betaFeedbackCrashSubmissions") + } + + public static var betaFeedbackScreenshotSubmissions: Self { + .init(rawValue: "betaFeedbackScreenshotSubmissions") + } + + public static var betaGroups: Self { + .init(rawValue: "betaGroups") + } + + public static var betaLicenseAgreement: Self { + .init(rawValue: "betaLicenseAgreement") + } + + public static var betaTesters: Self { + .init(rawValue: "betaTesters") + } + + public static var builds: Self { + .init(rawValue: "builds") + } + + public static var bundleId: Self { + .init(rawValue: "bundleId") + } + + public static var ciProduct: Self { + .init(rawValue: "ciProduct") + } + + public static var contentRightsDeclaration: Self { + .init(rawValue: "contentRightsDeclaration") + } + + public static var customerReviewSummarizations: Self { + .init(rawValue: "customerReviewSummarizations") + } + + public static var customerReviews: Self { + .init(rawValue: "customerReviews") + } + + public static var endUserLicenseAgreement: Self { + .init(rawValue: "endUserLicenseAgreement") + } + + public static var gameCenterDetail: Self { + .init(rawValue: "gameCenterDetail") + } + + public static var gameCenterEnabledVersions: Self { + .init(rawValue: "gameCenterEnabledVersions") + } + + public static var inAppPurchases: Self { + .init(rawValue: "inAppPurchases") + } + + public static var inAppPurchasesV2: Self { + .init(rawValue: "inAppPurchasesV2") + } + + public static var isOrEverWasMadeForKids: Self { + .init(rawValue: "isOrEverWasMadeForKids") + } + + public static var marketplaceSearchDetail: Self { + .init(rawValue: "marketplaceSearchDetail") + } + + public static var name: Self { + .init(rawValue: "name") + } + + public static var perfPowerMetrics: Self { + .init(rawValue: "perfPowerMetrics") + } + + public static var preReleaseVersions: Self { + .init(rawValue: "preReleaseVersions") + } + + public static var primaryLocale: Self { + .init(rawValue: "primaryLocale") + } + + public static var promotedPurchases: Self { + .init(rawValue: "promotedPurchases") } + public static var reviewSubmissions: Self { + .init(rawValue: "reviewSubmissions") + } + + public static var sku: Self { + .init(rawValue: "sku") + } + + public static var streamlinedPurchasingEnabled: Self { + .init(rawValue: "streamlinedPurchasingEnabled") + } + + public static var subscriptionGracePeriod: Self { + .init(rawValue: "subscriptionGracePeriod") + } + + public static var subscriptionGroups: Self { + .init(rawValue: "subscriptionGroups") + } + + public static var subscriptionStatusUrl: Self { + .init(rawValue: "subscriptionStatusUrl") + } + + public static var subscriptionStatusUrlForSandbox: Self { + .init(rawValue: "subscriptionStatusUrlForSandbox") + } + + public static var subscriptionStatusUrlVersion: Self { + .init(rawValue: "subscriptionStatusUrlVersion") + } + + public static var subscriptionStatusUrlVersionForSandbox: Self { + .init(rawValue: "subscriptionStatusUrlVersionForSandbox") + } + + public static var webhooks: Self { + .init(rawValue: "webhooks") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "appAvailability": self = .appAvailability - case "appClips": self = .appClips - case "appCustomProductPages": self = .appCustomProductPages - case "appEncryptionDeclarations": self = .appEncryptionDeclarations - case "appEvents": self = .appEvents - case "appInfos": self = .appInfos - case "appPricePoints": self = .appPricePoints - case "appPriceSchedule": self = .appPriceSchedule - case "appStoreVersionExperimentsV2": self = .appStoreVersionExperimentsV2 - case "appStoreVersions": self = .appStoreVersions - case "availableInNewTerritories": self = .availableInNewTerritories - case "availableTerritories": self = .availableTerritories - case "betaAppLocalizations": self = .betaAppLocalizations - case "betaAppReviewDetail": self = .betaAppReviewDetail - case "betaGroups": self = .betaGroups - case "betaLicenseAgreement": self = .betaLicenseAgreement - case "betaTesters": self = .betaTesters - case "builds": self = .builds - case "bundleId": self = .bundleId - case "ciProduct": self = .ciProduct - case "contentRightsDeclaration": self = .contentRightsDeclaration - case "customerReviews": self = .customerReviews - case "endUserLicenseAgreement": self = .endUserLicenseAgreement - case "gameCenterDetail": self = .gameCenterDetail - case "gameCenterEnabledVersions": self = .gameCenterEnabledVersions - case "inAppPurchases": self = .inAppPurchases - case "inAppPurchasesV2": self = .inAppPurchasesV2 - case "isOrEverWasMadeForKids": self = .isOrEverWasMadeForKids - case "name": self = .name - case "perfPowerMetrics": self = .perfPowerMetrics - case "preOrder": self = .preOrder - case "preReleaseVersions": self = .preReleaseVersions - case "pricePoints": self = .pricePoints - case "prices": self = .prices - case "primaryLocale": self = .primaryLocale - case "promotedPurchases": self = .promotedPurchases - case "reviewSubmissions": self = .reviewSubmissions - case "sku": self = .sku - case "subscriptionGracePeriod": self = .subscriptionGracePeriod - case "subscriptionGroups": self = .subscriptionGroups - case "subscriptionStatusUrl": self = .subscriptionStatusUrl - case "subscriptionStatusUrlForSandbox": self = .subscriptionStatusUrlForSandbox - case "subscriptionStatusUrlVersion": self = .subscriptionStatusUrlVersion - case "subscriptionStatusUrlVersionForSandbox": self = .subscriptionStatusUrlVersionForSandbox - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum UserInvitations: Hashable, Codable, RawRepresentable { - case allAppsVisible - case email - case expirationDate - case firstName - case lastName - case provisioningAllowed - case roles - case visibleApps - case unknown(String) - - public var rawValue: String { - switch self { - case .allAppsVisible: return "allAppsVisible" - case .email: return "email" - case .expirationDate: return "expirationDate" - case .firstName: return "firstName" - case .lastName: return "lastName" - case .provisioningAllowed: return "provisioningAllowed" - case .roles: return "roles" - case .visibleApps: return "visibleApps" - case .unknown(let rawValue): return rawValue - } + public struct UserInvitations: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var allAppsVisible: Self { + .init(rawValue: "allAppsVisible") + } + + public static var email: Self { + .init(rawValue: "email") + } + + public static var expirationDate: Self { + .init(rawValue: "expirationDate") + } + + public static var firstName: Self { + .init(rawValue: "firstName") + } + + public static var lastName: Self { + .init(rawValue: "lastName") } + public static var provisioningAllowed: Self { + .init(rawValue: "provisioningAllowed") + } + + public static var roles: Self { + .init(rawValue: "roles") + } + + public static var visibleApps: Self { + .init(rawValue: "visibleApps") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "allAppsVisible": self = .allAppsVisible - case "email": self = .email - case "expirationDate": self = .expirationDate - case "firstName": self = .firstName - case "lastName": self = .lastName - case "provisioningAllowed": self = .provisioningAllowed - case "roles": self = .roles - case "visibleApps": self = .visibleApps - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } @@ -317,58 +393,67 @@ extension V1.UserInvitations.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum Roles: Hashable, Codable, RawRepresentable { - case accessToReports - case accountHolder - case admin - case appManager - case cloudManagedAppDistribution - case cloudManagedDeveloperId - case createApps - case customerSupport - case developer - case finance - case imageManager - case marketing - case sales - case unknown(String) - - public var rawValue: String { - switch self { - case .accessToReports: return "ACCESS_TO_REPORTS" - case .accountHolder: return "ACCOUNT_HOLDER" - case .admin: return "ADMIN" - case .appManager: return "APP_MANAGER" - case .cloudManagedAppDistribution: return "CLOUD_MANAGED_APP_DISTRIBUTION" - case .cloudManagedDeveloperId: return "CLOUD_MANAGED_DEVELOPER_ID" - case .createApps: return "CREATE_APPS" - case .customerSupport: return "CUSTOMER_SUPPORT" - case .developer: return "DEVELOPER" - case .finance: return "FINANCE" - case .imageManager: return "IMAGE_MANAGER" - case .marketing: return "MARKETING" - case .sales: return "SALES" - case .unknown(let rawValue): return rawValue - } + public struct Roles: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var accessToReports: Self { + .init(rawValue: "ACCESS_TO_REPORTS") + } + + public static var accountHolder: Self { + .init(rawValue: "ACCOUNT_HOLDER") + } + + public static var admin: Self { + .init(rawValue: "ADMIN") + } + + public static var appManager: Self { + .init(rawValue: "APP_MANAGER") + } + + public static var cloudManagedAppDistribution: Self { + .init(rawValue: "CLOUD_MANAGED_APP_DISTRIBUTION") + } + + public static var cloudManagedDeveloperId: Self { + .init(rawValue: "CLOUD_MANAGED_DEVELOPER_ID") + } + + public static var createApps: Self { + .init(rawValue: "CREATE_APPS") + } + + public static var customerSupport: Self { + .init(rawValue: "CUSTOMER_SUPPORT") + } + + public static var developer: Self { + .init(rawValue: "DEVELOPER") + } + + public static var finance: Self { + .init(rawValue: "FINANCE") + } + + public static var generateIndividualKeys: Self { + .init(rawValue: "GENERATE_INDIVIDUAL_KEYS") + } + + public static var marketing: Self { + .init(rawValue: "MARKETING") } + public static var sales: Self { + .init(rawValue: "SALES") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "ACCESS_TO_REPORTS": self = .accessToReports - case "ACCOUNT_HOLDER": self = .accountHolder - case "ADMIN": self = .admin - case "APP_MANAGER": self = .appManager - case "CLOUD_MANAGED_APP_DISTRIBUTION": self = .cloudManagedAppDistribution - case "CLOUD_MANAGED_DEVELOPER_ID": self = .cloudManagedDeveloperId - case "CREATE_APPS": self = .createApps - case "CUSTOMER_SUPPORT": self = .customerSupport - case "DEVELOPER": self = .developer - case "FINANCE": self = .finance - case "IMAGE_MANAGER": self = .imageManager - case "MARKETING": self = .marketing - case "SALES": self = .sales - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } @@ -396,22 +481,19 @@ extension V1.UserInvitations.GET { } } - public enum Include: Hashable, Codable, RawRepresentable { - case visibleApps - case unknown(String) + public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var visibleApps: Self { + .init(rawValue: "visibleApps") + } - public var rawValue: String { - switch self { - case .visibleApps: return "visibleApps" - case .unknown(let rawValue): return rawValue - } + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "visibleApps": self = .visibleApps - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } @@ -442,31 +524,31 @@ extension V1.UserInvitations.GET { } } - public enum Sort: Hashable, Codable, RawRepresentable { - case email - case emailDesc - case lastName - case lastNameDesc - case unknown(String) - - public var rawValue: String { - switch self { - case .email: return "email" - case .emailDesc: return "-email" - case .lastName: return "lastName" - case .lastNameDesc: return "-lastName" - case .unknown(let rawValue): return rawValue - } + public struct Sort: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var email: Self { + .init(rawValue: "email") } + public static var emailDesc: Self { + .init(rawValue: "-email") + } + + public static var lastName: Self { + .init(rawValue: "lastName") + } + + public static var lastNameDesc: Self { + .init(rawValue: "-lastName") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "email": self = .email - case "-email": self = .emailDesc - case "lastName": self = .lastName - case "-lastName": self = .lastNameDesc - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/UserInvitations/UserInvitations.POST.dab0615.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/UserInvitations/UserInvitations.POST.dab0615.generated.swift index 24f139b6..c1ab8534 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/UserInvitations/UserInvitations.POST.dab0615.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/UserInvitations/UserInvitations.POST.dab0615.generated.swift @@ -41,8 +41,11 @@ extension V1.UserInvitations { /// - Returns: **201**, Single UserInvitation as `UserInvitationResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **422**, Unprocessable request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -56,12 +59,21 @@ extension V1.UserInvitations { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 409: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 422: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Users/ById/Relationships/VisibleApps/UsersByIdRelationshipsVisibleApps.DELETE.4ae29aa.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Users/ById/Relationships/VisibleApps/UsersByIdRelationshipsVisibleApps.DELETE.4ae29aa.generated.swift index dba160f8..d09a4c18 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Users/ById/Relationships/VisibleApps/UsersByIdRelationshipsVisibleApps.DELETE.4ae29aa.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Users/ById/Relationships/VisibleApps/UsersByIdRelationshipsVisibleApps.DELETE.4ae29aa.generated.swift @@ -31,10 +31,12 @@ extension V1.Users.ById.Relationships.VisibleApps { return urlRequest } - /// - Returns: **204**, Success (no content) + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **422**, Unprocessable request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -42,8 +44,8 @@ extension V1.Users.ById.Relationships.VisibleApps { } switch urlResponse.statusCode { - case 204: - return + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) @@ -54,6 +56,12 @@ extension V1.Users.ById.Relationships.VisibleApps { case 409: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 422: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Users/ById/Relationships/VisibleApps/UsersByIdRelationshipsVisibleApps.GET.4ae29aa.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Users/ById/Relationships/VisibleApps/UsersByIdRelationshipsVisibleApps.GET.4ae29aa.generated.swift index 4b6a1fe6..5358fd65 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Users/ById/Relationships/VisibleApps/UsersByIdRelationshipsVisibleApps.GET.4ae29aa.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Users/ById/Relationships/VisibleApps/UsersByIdRelationshipsVisibleApps.GET.4ae29aa.generated.swift @@ -42,8 +42,10 @@ extension V1.Users.ById.Relationships.VisibleApps { /// - Returns: **200**, List of related linkages as `UserVisibleAppsLinkagesResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -57,12 +59,18 @@ extension V1.Users.ById.Relationships.VisibleApps { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 404: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Users/ById/Relationships/VisibleApps/UsersByIdRelationshipsVisibleApps.PATCH.4ae29aa.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Users/ById/Relationships/VisibleApps/UsersByIdRelationshipsVisibleApps.PATCH.4ae29aa.generated.swift index a781cadb..980863ae 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Users/ById/Relationships/VisibleApps/UsersByIdRelationshipsVisibleApps.PATCH.4ae29aa.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Users/ById/Relationships/VisibleApps/UsersByIdRelationshipsVisibleApps.PATCH.4ae29aa.generated.swift @@ -46,10 +46,12 @@ extension V1.Users.ById.Relationships.VisibleApps { return urlRequest } - /// - Returns: **204**, Success (no content) + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **422**, Unprocessable request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -57,8 +59,8 @@ extension V1.Users.ById.Relationships.VisibleApps { } switch urlResponse.statusCode { - case 204: - return + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) @@ -69,6 +71,12 @@ extension V1.Users.ById.Relationships.VisibleApps { case 409: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 422: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Users/ById/Relationships/VisibleApps/UsersByIdRelationshipsVisibleApps.POST.4ae29aa.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Users/ById/Relationships/VisibleApps/UsersByIdRelationshipsVisibleApps.POST.4ae29aa.generated.swift index 11be29f6..315ccfcd 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Users/ById/Relationships/VisibleApps/UsersByIdRelationshipsVisibleApps.POST.4ae29aa.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Users/ById/Relationships/VisibleApps/UsersByIdRelationshipsVisibleApps.POST.4ae29aa.generated.swift @@ -46,10 +46,12 @@ extension V1.Users.ById.Relationships.VisibleApps { return urlRequest } - /// - Returns: **204**, Success (no content) + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **422**, Unprocessable request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -57,8 +59,8 @@ extension V1.Users.ById.Relationships.VisibleApps { } switch urlResponse.statusCode { - case 204: - return + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) @@ -69,6 +71,12 @@ extension V1.Users.ById.Relationships.VisibleApps { case 409: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 422: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Users/ById/UsersById.DELETE.0681a45.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Users/ById/UsersById.DELETE.0681a45.generated.swift index 82bfb870..1db42d29 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Users/ById/UsersById.DELETE.0681a45.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Users/ById/UsersById.DELETE.0681a45.generated.swift @@ -31,11 +31,12 @@ extension V1.Users.ById { return urlRequest } - /// - Returns: **204**, Success (no content) /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -43,12 +44,12 @@ extension V1.Users.ById { } switch urlResponse.statusCode { - case 204: - return - case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) @@ -58,6 +59,9 @@ extension V1.Users.ById { case 409: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Users/ById/UsersById.GET.0681a45.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Users/ById/UsersById.GET.0681a45.generated.swift index 9954c162..a95bc001 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Users/ById/UsersById.GET.0681a45.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Users/ById/UsersById.GET.0681a45.generated.swift @@ -48,8 +48,10 @@ extension V1.Users.ById { /// - Returns: **200**, Single User as `UserResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -63,12 +65,18 @@ extension V1.Users.ById { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 404: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -93,188 +101,255 @@ extension V1.Users.ById.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum Apps: Hashable, Codable, RawRepresentable { - case appAvailability - case appClips - case appCustomProductPages - case appEncryptionDeclarations - case appEvents - case appInfos - case appPricePoints - case appPriceSchedule - case appStoreVersionExperimentsV2 - case appStoreVersions - case availableInNewTerritories - case availableTerritories - case betaAppLocalizations - case betaAppReviewDetail - case betaGroups - case betaLicenseAgreement - case betaTesters - case builds - case bundleId - case ciProduct - case contentRightsDeclaration - case customerReviews - case endUserLicenseAgreement - case gameCenterDetail - case gameCenterEnabledVersions - case inAppPurchases - case inAppPurchasesV2 - case isOrEverWasMadeForKids - case name - case perfPowerMetrics - case preOrder - case preReleaseVersions - case pricePoints - case prices - case primaryLocale - case promotedPurchases - case reviewSubmissions - case sku - case subscriptionGracePeriod - case subscriptionGroups - case subscriptionStatusUrl - case subscriptionStatusUrlForSandbox - case subscriptionStatusUrlVersion - case subscriptionStatusUrlVersionForSandbox - case unknown(String) - - public var rawValue: String { - switch self { - case .appAvailability: return "appAvailability" - case .appClips: return "appClips" - case .appCustomProductPages: return "appCustomProductPages" - case .appEncryptionDeclarations: return "appEncryptionDeclarations" - case .appEvents: return "appEvents" - case .appInfos: return "appInfos" - case .appPricePoints: return "appPricePoints" - case .appPriceSchedule: return "appPriceSchedule" - case .appStoreVersionExperimentsV2: return "appStoreVersionExperimentsV2" - case .appStoreVersions: return "appStoreVersions" - case .availableInNewTerritories: return "availableInNewTerritories" - case .availableTerritories: return "availableTerritories" - case .betaAppLocalizations: return "betaAppLocalizations" - case .betaAppReviewDetail: return "betaAppReviewDetail" - case .betaGroups: return "betaGroups" - case .betaLicenseAgreement: return "betaLicenseAgreement" - case .betaTesters: return "betaTesters" - case .builds: return "builds" - case .bundleId: return "bundleId" - case .ciProduct: return "ciProduct" - case .contentRightsDeclaration: return "contentRightsDeclaration" - case .customerReviews: return "customerReviews" - case .endUserLicenseAgreement: return "endUserLicenseAgreement" - case .gameCenterDetail: return "gameCenterDetail" - case .gameCenterEnabledVersions: return "gameCenterEnabledVersions" - case .inAppPurchases: return "inAppPurchases" - case .inAppPurchasesV2: return "inAppPurchasesV2" - case .isOrEverWasMadeForKids: return "isOrEverWasMadeForKids" - case .name: return "name" - case .perfPowerMetrics: return "perfPowerMetrics" - case .preOrder: return "preOrder" - case .preReleaseVersions: return "preReleaseVersions" - case .pricePoints: return "pricePoints" - case .prices: return "prices" - case .primaryLocale: return "primaryLocale" - case .promotedPurchases: return "promotedPurchases" - case .reviewSubmissions: return "reviewSubmissions" - case .sku: return "sku" - case .subscriptionGracePeriod: return "subscriptionGracePeriod" - case .subscriptionGroups: return "subscriptionGroups" - case .subscriptionStatusUrl: return "subscriptionStatusUrl" - case .subscriptionStatusUrlForSandbox: return "subscriptionStatusUrlForSandbox" - case .subscriptionStatusUrlVersion: return "subscriptionStatusUrlVersion" - case .subscriptionStatusUrlVersionForSandbox: return "subscriptionStatusUrlVersionForSandbox" - case .unknown(let rawValue): return rawValue - } + public struct Apps: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var accessibilityDeclarations: Self { + .init(rawValue: "accessibilityDeclarations") + } + + public static var accessibilityUrl: Self { + .init(rawValue: "accessibilityUrl") + } + + public static var alternativeDistributionKey: Self { + .init(rawValue: "alternativeDistributionKey") + } + + public static var analyticsReportRequests: Self { + .init(rawValue: "analyticsReportRequests") + } + + public static var appAvailabilityV2: Self { + .init(rawValue: "appAvailabilityV2") + } + + public static var appClips: Self { + .init(rawValue: "appClips") + } + + public static var appCustomProductPages: Self { + .init(rawValue: "appCustomProductPages") + } + + public static var appEncryptionDeclarations: Self { + .init(rawValue: "appEncryptionDeclarations") + } + + public static var appEvents: Self { + .init(rawValue: "appEvents") + } + + public static var appInfos: Self { + .init(rawValue: "appInfos") + } + + public static var appPricePoints: Self { + .init(rawValue: "appPricePoints") + } + + public static var appPriceSchedule: Self { + .init(rawValue: "appPriceSchedule") + } + + public static var appStoreVersionExperimentsV2: Self { + .init(rawValue: "appStoreVersionExperimentsV2") + } + + public static var appStoreVersions: Self { + .init(rawValue: "appStoreVersions") + } + + public static var backgroundAssets: Self { + .init(rawValue: "backgroundAssets") + } + + public static var betaAppLocalizations: Self { + .init(rawValue: "betaAppLocalizations") + } + + public static var betaAppReviewDetail: Self { + .init(rawValue: "betaAppReviewDetail") + } + + public static var betaFeedbackCrashSubmissions: Self { + .init(rawValue: "betaFeedbackCrashSubmissions") + } + + public static var betaFeedbackScreenshotSubmissions: Self { + .init(rawValue: "betaFeedbackScreenshotSubmissions") + } + + public static var betaGroups: Self { + .init(rawValue: "betaGroups") + } + + public static var betaLicenseAgreement: Self { + .init(rawValue: "betaLicenseAgreement") + } + + public static var betaTesters: Self { + .init(rawValue: "betaTesters") + } + + public static var builds: Self { + .init(rawValue: "builds") + } + + public static var bundleId: Self { + .init(rawValue: "bundleId") + } + + public static var ciProduct: Self { + .init(rawValue: "ciProduct") + } + + public static var contentRightsDeclaration: Self { + .init(rawValue: "contentRightsDeclaration") + } + + public static var customerReviewSummarizations: Self { + .init(rawValue: "customerReviewSummarizations") + } + + public static var customerReviews: Self { + .init(rawValue: "customerReviews") + } + + public static var endUserLicenseAgreement: Self { + .init(rawValue: "endUserLicenseAgreement") + } + + public static var gameCenterDetail: Self { + .init(rawValue: "gameCenterDetail") } + public static var gameCenterEnabledVersions: Self { + .init(rawValue: "gameCenterEnabledVersions") + } + + public static var inAppPurchases: Self { + .init(rawValue: "inAppPurchases") + } + + public static var inAppPurchasesV2: Self { + .init(rawValue: "inAppPurchasesV2") + } + + public static var isOrEverWasMadeForKids: Self { + .init(rawValue: "isOrEverWasMadeForKids") + } + + public static var marketplaceSearchDetail: Self { + .init(rawValue: "marketplaceSearchDetail") + } + + public static var name: Self { + .init(rawValue: "name") + } + + public static var perfPowerMetrics: Self { + .init(rawValue: "perfPowerMetrics") + } + + public static var preReleaseVersions: Self { + .init(rawValue: "preReleaseVersions") + } + + public static var primaryLocale: Self { + .init(rawValue: "primaryLocale") + } + + public static var promotedPurchases: Self { + .init(rawValue: "promotedPurchases") + } + + public static var reviewSubmissions: Self { + .init(rawValue: "reviewSubmissions") + } + + public static var sku: Self { + .init(rawValue: "sku") + } + + public static var streamlinedPurchasingEnabled: Self { + .init(rawValue: "streamlinedPurchasingEnabled") + } + + public static var subscriptionGracePeriod: Self { + .init(rawValue: "subscriptionGracePeriod") + } + + public static var subscriptionGroups: Self { + .init(rawValue: "subscriptionGroups") + } + + public static var subscriptionStatusUrl: Self { + .init(rawValue: "subscriptionStatusUrl") + } + + public static var subscriptionStatusUrlForSandbox: Self { + .init(rawValue: "subscriptionStatusUrlForSandbox") + } + + public static var subscriptionStatusUrlVersion: Self { + .init(rawValue: "subscriptionStatusUrlVersion") + } + + public static var subscriptionStatusUrlVersionForSandbox: Self { + .init(rawValue: "subscriptionStatusUrlVersionForSandbox") + } + + public static var webhooks: Self { + .init(rawValue: "webhooks") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "appAvailability": self = .appAvailability - case "appClips": self = .appClips - case "appCustomProductPages": self = .appCustomProductPages - case "appEncryptionDeclarations": self = .appEncryptionDeclarations - case "appEvents": self = .appEvents - case "appInfos": self = .appInfos - case "appPricePoints": self = .appPricePoints - case "appPriceSchedule": self = .appPriceSchedule - case "appStoreVersionExperimentsV2": self = .appStoreVersionExperimentsV2 - case "appStoreVersions": self = .appStoreVersions - case "availableInNewTerritories": self = .availableInNewTerritories - case "availableTerritories": self = .availableTerritories - case "betaAppLocalizations": self = .betaAppLocalizations - case "betaAppReviewDetail": self = .betaAppReviewDetail - case "betaGroups": self = .betaGroups - case "betaLicenseAgreement": self = .betaLicenseAgreement - case "betaTesters": self = .betaTesters - case "builds": self = .builds - case "bundleId": self = .bundleId - case "ciProduct": self = .ciProduct - case "contentRightsDeclaration": self = .contentRightsDeclaration - case "customerReviews": self = .customerReviews - case "endUserLicenseAgreement": self = .endUserLicenseAgreement - case "gameCenterDetail": self = .gameCenterDetail - case "gameCenterEnabledVersions": self = .gameCenterEnabledVersions - case "inAppPurchases": self = .inAppPurchases - case "inAppPurchasesV2": self = .inAppPurchasesV2 - case "isOrEverWasMadeForKids": self = .isOrEverWasMadeForKids - case "name": self = .name - case "perfPowerMetrics": self = .perfPowerMetrics - case "preOrder": self = .preOrder - case "preReleaseVersions": self = .preReleaseVersions - case "pricePoints": self = .pricePoints - case "prices": self = .prices - case "primaryLocale": self = .primaryLocale - case "promotedPurchases": self = .promotedPurchases - case "reviewSubmissions": self = .reviewSubmissions - case "sku": self = .sku - case "subscriptionGracePeriod": self = .subscriptionGracePeriod - case "subscriptionGroups": self = .subscriptionGroups - case "subscriptionStatusUrl": self = .subscriptionStatusUrl - case "subscriptionStatusUrlForSandbox": self = .subscriptionStatusUrlForSandbox - case "subscriptionStatusUrlVersion": self = .subscriptionStatusUrlVersion - case "subscriptionStatusUrlVersionForSandbox": self = .subscriptionStatusUrlVersionForSandbox - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum Users: Hashable, Codable, RawRepresentable { - case allAppsVisible - case firstName - case lastName - case provisioningAllowed - case roles - case username - case visibleApps - case unknown(String) - - public var rawValue: String { - switch self { - case .allAppsVisible: return "allAppsVisible" - case .firstName: return "firstName" - case .lastName: return "lastName" - case .provisioningAllowed: return "provisioningAllowed" - case .roles: return "roles" - case .username: return "username" - case .visibleApps: return "visibleApps" - case .unknown(let rawValue): return rawValue - } + public struct Users: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var allAppsVisible: Self { + .init(rawValue: "allAppsVisible") + } + + public static var firstName: Self { + .init(rawValue: "firstName") + } + + public static var lastName: Self { + .init(rawValue: "lastName") } + public static var provisioningAllowed: Self { + .init(rawValue: "provisioningAllowed") + } + + public static var roles: Self { + .init(rawValue: "roles") + } + + public static var username: Self { + .init(rawValue: "username") + } + + public static var visibleApps: Self { + .init(rawValue: "visibleApps") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "allAppsVisible": self = .allAppsVisible - case "firstName": self = .firstName - case "lastName": self = .lastName - case "provisioningAllowed": self = .provisioningAllowed - case "roles": self = .roles - case "username": self = .username - case "visibleApps": self = .visibleApps - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } @@ -297,22 +372,19 @@ extension V1.Users.ById.GET { } } - public enum Include: Hashable, Codable, RawRepresentable { - case visibleApps - case unknown(String) + public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var visibleApps: Self { + .init(rawValue: "visibleApps") + } - public var rawValue: String { - switch self { - case .visibleApps: return "visibleApps" - case .unknown(let rawValue): return rawValue - } + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "visibleApps": self = .visibleApps - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Users/ById/UsersById.PATCH.0681a45.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Users/ById/UsersById.PATCH.0681a45.generated.swift index 037161bc..3e0b80f9 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Users/ById/UsersById.PATCH.0681a45.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Users/ById/UsersById.PATCH.0681a45.generated.swift @@ -48,9 +48,12 @@ extension V1.Users.ById { /// - Returns: **200**, Single User as `UserResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **422**, Unprocessable request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -64,6 +67,9 @@ extension V1.Users.ById { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) @@ -73,6 +79,12 @@ extension V1.Users.ById { case 409: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 422: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Users/ById/VisibleApps/UsersByIdVisibleApps.GET.26969de.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Users/ById/VisibleApps/UsersByIdVisibleApps.GET.26969de.generated.swift index 93dc8a7d..b0c08d0c 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Users/ById/VisibleApps/UsersByIdVisibleApps.GET.26969de.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Users/ById/VisibleApps/UsersByIdVisibleApps.GET.26969de.generated.swift @@ -44,8 +44,10 @@ extension V1.Users.ById.VisibleApps { /// - Returns: **200**, List of Apps with get as `AppsWithoutIncludesResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -59,12 +61,18 @@ extension V1.Users.ById.VisibleApps { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 404: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -87,151 +95,215 @@ extension V1.Users.ById.VisibleApps.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum Apps: Hashable, Codable, RawRepresentable { - case appAvailability - case appClips - case appCustomProductPages - case appEncryptionDeclarations - case appEvents - case appInfos - case appPricePoints - case appPriceSchedule - case appStoreVersionExperimentsV2 - case appStoreVersions - case availableInNewTerritories - case availableTerritories - case betaAppLocalizations - case betaAppReviewDetail - case betaGroups - case betaLicenseAgreement - case betaTesters - case builds - case bundleId - case ciProduct - case contentRightsDeclaration - case customerReviews - case endUserLicenseAgreement - case gameCenterDetail - case gameCenterEnabledVersions - case inAppPurchases - case inAppPurchasesV2 - case isOrEverWasMadeForKids - case name - case perfPowerMetrics - case preOrder - case preReleaseVersions - case pricePoints - case prices - case primaryLocale - case promotedPurchases - case reviewSubmissions - case sku - case subscriptionGracePeriod - case subscriptionGroups - case subscriptionStatusUrl - case subscriptionStatusUrlForSandbox - case subscriptionStatusUrlVersion - case subscriptionStatusUrlVersionForSandbox - case unknown(String) - - public var rawValue: String { - switch self { - case .appAvailability: return "appAvailability" - case .appClips: return "appClips" - case .appCustomProductPages: return "appCustomProductPages" - case .appEncryptionDeclarations: return "appEncryptionDeclarations" - case .appEvents: return "appEvents" - case .appInfos: return "appInfos" - case .appPricePoints: return "appPricePoints" - case .appPriceSchedule: return "appPriceSchedule" - case .appStoreVersionExperimentsV2: return "appStoreVersionExperimentsV2" - case .appStoreVersions: return "appStoreVersions" - case .availableInNewTerritories: return "availableInNewTerritories" - case .availableTerritories: return "availableTerritories" - case .betaAppLocalizations: return "betaAppLocalizations" - case .betaAppReviewDetail: return "betaAppReviewDetail" - case .betaGroups: return "betaGroups" - case .betaLicenseAgreement: return "betaLicenseAgreement" - case .betaTesters: return "betaTesters" - case .builds: return "builds" - case .bundleId: return "bundleId" - case .ciProduct: return "ciProduct" - case .contentRightsDeclaration: return "contentRightsDeclaration" - case .customerReviews: return "customerReviews" - case .endUserLicenseAgreement: return "endUserLicenseAgreement" - case .gameCenterDetail: return "gameCenterDetail" - case .gameCenterEnabledVersions: return "gameCenterEnabledVersions" - case .inAppPurchases: return "inAppPurchases" - case .inAppPurchasesV2: return "inAppPurchasesV2" - case .isOrEverWasMadeForKids: return "isOrEverWasMadeForKids" - case .name: return "name" - case .perfPowerMetrics: return "perfPowerMetrics" - case .preOrder: return "preOrder" - case .preReleaseVersions: return "preReleaseVersions" - case .pricePoints: return "pricePoints" - case .prices: return "prices" - case .primaryLocale: return "primaryLocale" - case .promotedPurchases: return "promotedPurchases" - case .reviewSubmissions: return "reviewSubmissions" - case .sku: return "sku" - case .subscriptionGracePeriod: return "subscriptionGracePeriod" - case .subscriptionGroups: return "subscriptionGroups" - case .subscriptionStatusUrl: return "subscriptionStatusUrl" - case .subscriptionStatusUrlForSandbox: return "subscriptionStatusUrlForSandbox" - case .subscriptionStatusUrlVersion: return "subscriptionStatusUrlVersion" - case .subscriptionStatusUrlVersionForSandbox: return "subscriptionStatusUrlVersionForSandbox" - case .unknown(let rawValue): return rawValue - } + public struct Apps: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var accessibilityDeclarations: Self { + .init(rawValue: "accessibilityDeclarations") + } + + public static var accessibilityUrl: Self { + .init(rawValue: "accessibilityUrl") + } + + public static var alternativeDistributionKey: Self { + .init(rawValue: "alternativeDistributionKey") + } + + public static var analyticsReportRequests: Self { + .init(rawValue: "analyticsReportRequests") + } + + public static var appAvailabilityV2: Self { + .init(rawValue: "appAvailabilityV2") + } + + public static var appClips: Self { + .init(rawValue: "appClips") } + public static var appCustomProductPages: Self { + .init(rawValue: "appCustomProductPages") + } + + public static var appEncryptionDeclarations: Self { + .init(rawValue: "appEncryptionDeclarations") + } + + public static var appEvents: Self { + .init(rawValue: "appEvents") + } + + public static var appInfos: Self { + .init(rawValue: "appInfos") + } + + public static var appPricePoints: Self { + .init(rawValue: "appPricePoints") + } + + public static var appPriceSchedule: Self { + .init(rawValue: "appPriceSchedule") + } + + public static var appStoreVersionExperimentsV2: Self { + .init(rawValue: "appStoreVersionExperimentsV2") + } + + public static var appStoreVersions: Self { + .init(rawValue: "appStoreVersions") + } + + public static var backgroundAssets: Self { + .init(rawValue: "backgroundAssets") + } + + public static var betaAppLocalizations: Self { + .init(rawValue: "betaAppLocalizations") + } + + public static var betaAppReviewDetail: Self { + .init(rawValue: "betaAppReviewDetail") + } + + public static var betaFeedbackCrashSubmissions: Self { + .init(rawValue: "betaFeedbackCrashSubmissions") + } + + public static var betaFeedbackScreenshotSubmissions: Self { + .init(rawValue: "betaFeedbackScreenshotSubmissions") + } + + public static var betaGroups: Self { + .init(rawValue: "betaGroups") + } + + public static var betaLicenseAgreement: Self { + .init(rawValue: "betaLicenseAgreement") + } + + public static var betaTesters: Self { + .init(rawValue: "betaTesters") + } + + public static var builds: Self { + .init(rawValue: "builds") + } + + public static var bundleId: Self { + .init(rawValue: "bundleId") + } + + public static var ciProduct: Self { + .init(rawValue: "ciProduct") + } + + public static var contentRightsDeclaration: Self { + .init(rawValue: "contentRightsDeclaration") + } + + public static var customerReviewSummarizations: Self { + .init(rawValue: "customerReviewSummarizations") + } + + public static var customerReviews: Self { + .init(rawValue: "customerReviews") + } + + public static var endUserLicenseAgreement: Self { + .init(rawValue: "endUserLicenseAgreement") + } + + public static var gameCenterDetail: Self { + .init(rawValue: "gameCenterDetail") + } + + public static var gameCenterEnabledVersions: Self { + .init(rawValue: "gameCenterEnabledVersions") + } + + public static var inAppPurchases: Self { + .init(rawValue: "inAppPurchases") + } + + public static var inAppPurchasesV2: Self { + .init(rawValue: "inAppPurchasesV2") + } + + public static var isOrEverWasMadeForKids: Self { + .init(rawValue: "isOrEverWasMadeForKids") + } + + public static var marketplaceSearchDetail: Self { + .init(rawValue: "marketplaceSearchDetail") + } + + public static var name: Self { + .init(rawValue: "name") + } + + public static var perfPowerMetrics: Self { + .init(rawValue: "perfPowerMetrics") + } + + public static var preReleaseVersions: Self { + .init(rawValue: "preReleaseVersions") + } + + public static var primaryLocale: Self { + .init(rawValue: "primaryLocale") + } + + public static var promotedPurchases: Self { + .init(rawValue: "promotedPurchases") + } + + public static var reviewSubmissions: Self { + .init(rawValue: "reviewSubmissions") + } + + public static var sku: Self { + .init(rawValue: "sku") + } + + public static var streamlinedPurchasingEnabled: Self { + .init(rawValue: "streamlinedPurchasingEnabled") + } + + public static var subscriptionGracePeriod: Self { + .init(rawValue: "subscriptionGracePeriod") + } + + public static var subscriptionGroups: Self { + .init(rawValue: "subscriptionGroups") + } + + public static var subscriptionStatusUrl: Self { + .init(rawValue: "subscriptionStatusUrl") + } + + public static var subscriptionStatusUrlForSandbox: Self { + .init(rawValue: "subscriptionStatusUrlForSandbox") + } + + public static var subscriptionStatusUrlVersion: Self { + .init(rawValue: "subscriptionStatusUrlVersion") + } + + public static var subscriptionStatusUrlVersionForSandbox: Self { + .init(rawValue: "subscriptionStatusUrlVersionForSandbox") + } + + public static var webhooks: Self { + .init(rawValue: "webhooks") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "appAvailability": self = .appAvailability - case "appClips": self = .appClips - case "appCustomProductPages": self = .appCustomProductPages - case "appEncryptionDeclarations": self = .appEncryptionDeclarations - case "appEvents": self = .appEvents - case "appInfos": self = .appInfos - case "appPricePoints": self = .appPricePoints - case "appPriceSchedule": self = .appPriceSchedule - case "appStoreVersionExperimentsV2": self = .appStoreVersionExperimentsV2 - case "appStoreVersions": self = .appStoreVersions - case "availableInNewTerritories": self = .availableInNewTerritories - case "availableTerritories": self = .availableTerritories - case "betaAppLocalizations": self = .betaAppLocalizations - case "betaAppReviewDetail": self = .betaAppReviewDetail - case "betaGroups": self = .betaGroups - case "betaLicenseAgreement": self = .betaLicenseAgreement - case "betaTesters": self = .betaTesters - case "builds": self = .builds - case "bundleId": self = .bundleId - case "ciProduct": self = .ciProduct - case "contentRightsDeclaration": self = .contentRightsDeclaration - case "customerReviews": self = .customerReviews - case "endUserLicenseAgreement": self = .endUserLicenseAgreement - case "gameCenterDetail": self = .gameCenterDetail - case "gameCenterEnabledVersions": self = .gameCenterEnabledVersions - case "inAppPurchases": self = .inAppPurchases - case "inAppPurchasesV2": self = .inAppPurchasesV2 - case "isOrEverWasMadeForKids": self = .isOrEverWasMadeForKids - case "name": self = .name - case "perfPowerMetrics": self = .perfPowerMetrics - case "preOrder": self = .preOrder - case "preReleaseVersions": self = .preReleaseVersions - case "pricePoints": self = .pricePoints - case "prices": self = .prices - case "primaryLocale": self = .primaryLocale - case "promotedPurchases": self = .promotedPurchases - case "reviewSubmissions": self = .reviewSubmissions - case "sku": self = .sku - case "subscriptionGracePeriod": self = .subscriptionGracePeriod - case "subscriptionGroups": self = .subscriptionGroups - case "subscriptionStatusUrl": self = .subscriptionStatusUrl - case "subscriptionStatusUrlForSandbox": self = .subscriptionStatusUrlForSandbox - case "subscriptionStatusUrlVersion": self = .subscriptionStatusUrlVersion - case "subscriptionStatusUrlVersionForSandbox": self = .subscriptionStatusUrlVersionForSandbox - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Users/Users.GET.eab0d41.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Users/Users.GET.eab0d41.generated.swift index f12d3c38..0e7f3d1d 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Users/Users.GET.eab0d41.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Users/Users.GET.eab0d41.generated.swift @@ -55,7 +55,9 @@ extension V1.Users { /// - Returns: **200**, List of Users as `UsersResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -69,9 +71,15 @@ extension V1.Users { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -102,188 +110,255 @@ extension V1.Users.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum Apps: Hashable, Codable, RawRepresentable { - case appAvailability - case appClips - case appCustomProductPages - case appEncryptionDeclarations - case appEvents - case appInfos - case appPricePoints - case appPriceSchedule - case appStoreVersionExperimentsV2 - case appStoreVersions - case availableInNewTerritories - case availableTerritories - case betaAppLocalizations - case betaAppReviewDetail - case betaGroups - case betaLicenseAgreement - case betaTesters - case builds - case bundleId - case ciProduct - case contentRightsDeclaration - case customerReviews - case endUserLicenseAgreement - case gameCenterDetail - case gameCenterEnabledVersions - case inAppPurchases - case inAppPurchasesV2 - case isOrEverWasMadeForKids - case name - case perfPowerMetrics - case preOrder - case preReleaseVersions - case pricePoints - case prices - case primaryLocale - case promotedPurchases - case reviewSubmissions - case sku - case subscriptionGracePeriod - case subscriptionGroups - case subscriptionStatusUrl - case subscriptionStatusUrlForSandbox - case subscriptionStatusUrlVersion - case subscriptionStatusUrlVersionForSandbox - case unknown(String) - - public var rawValue: String { - switch self { - case .appAvailability: return "appAvailability" - case .appClips: return "appClips" - case .appCustomProductPages: return "appCustomProductPages" - case .appEncryptionDeclarations: return "appEncryptionDeclarations" - case .appEvents: return "appEvents" - case .appInfos: return "appInfos" - case .appPricePoints: return "appPricePoints" - case .appPriceSchedule: return "appPriceSchedule" - case .appStoreVersionExperimentsV2: return "appStoreVersionExperimentsV2" - case .appStoreVersions: return "appStoreVersions" - case .availableInNewTerritories: return "availableInNewTerritories" - case .availableTerritories: return "availableTerritories" - case .betaAppLocalizations: return "betaAppLocalizations" - case .betaAppReviewDetail: return "betaAppReviewDetail" - case .betaGroups: return "betaGroups" - case .betaLicenseAgreement: return "betaLicenseAgreement" - case .betaTesters: return "betaTesters" - case .builds: return "builds" - case .bundleId: return "bundleId" - case .ciProduct: return "ciProduct" - case .contentRightsDeclaration: return "contentRightsDeclaration" - case .customerReviews: return "customerReviews" - case .endUserLicenseAgreement: return "endUserLicenseAgreement" - case .gameCenterDetail: return "gameCenterDetail" - case .gameCenterEnabledVersions: return "gameCenterEnabledVersions" - case .inAppPurchases: return "inAppPurchases" - case .inAppPurchasesV2: return "inAppPurchasesV2" - case .isOrEverWasMadeForKids: return "isOrEverWasMadeForKids" - case .name: return "name" - case .perfPowerMetrics: return "perfPowerMetrics" - case .preOrder: return "preOrder" - case .preReleaseVersions: return "preReleaseVersions" - case .pricePoints: return "pricePoints" - case .prices: return "prices" - case .primaryLocale: return "primaryLocale" - case .promotedPurchases: return "promotedPurchases" - case .reviewSubmissions: return "reviewSubmissions" - case .sku: return "sku" - case .subscriptionGracePeriod: return "subscriptionGracePeriod" - case .subscriptionGroups: return "subscriptionGroups" - case .subscriptionStatusUrl: return "subscriptionStatusUrl" - case .subscriptionStatusUrlForSandbox: return "subscriptionStatusUrlForSandbox" - case .subscriptionStatusUrlVersion: return "subscriptionStatusUrlVersion" - case .subscriptionStatusUrlVersionForSandbox: return "subscriptionStatusUrlVersionForSandbox" - case .unknown(let rawValue): return rawValue - } + public struct Apps: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var accessibilityDeclarations: Self { + .init(rawValue: "accessibilityDeclarations") + } + + public static var accessibilityUrl: Self { + .init(rawValue: "accessibilityUrl") + } + + public static var alternativeDistributionKey: Self { + .init(rawValue: "alternativeDistributionKey") + } + + public static var analyticsReportRequests: Self { + .init(rawValue: "analyticsReportRequests") + } + + public static var appAvailabilityV2: Self { + .init(rawValue: "appAvailabilityV2") + } + + public static var appClips: Self { + .init(rawValue: "appClips") + } + + public static var appCustomProductPages: Self { + .init(rawValue: "appCustomProductPages") + } + + public static var appEncryptionDeclarations: Self { + .init(rawValue: "appEncryptionDeclarations") + } + + public static var appEvents: Self { + .init(rawValue: "appEvents") + } + + public static var appInfos: Self { + .init(rawValue: "appInfos") + } + + public static var appPricePoints: Self { + .init(rawValue: "appPricePoints") + } + + public static var appPriceSchedule: Self { + .init(rawValue: "appPriceSchedule") + } + + public static var appStoreVersionExperimentsV2: Self { + .init(rawValue: "appStoreVersionExperimentsV2") + } + + public static var appStoreVersions: Self { + .init(rawValue: "appStoreVersions") + } + + public static var backgroundAssets: Self { + .init(rawValue: "backgroundAssets") + } + + public static var betaAppLocalizations: Self { + .init(rawValue: "betaAppLocalizations") + } + + public static var betaAppReviewDetail: Self { + .init(rawValue: "betaAppReviewDetail") + } + + public static var betaFeedbackCrashSubmissions: Self { + .init(rawValue: "betaFeedbackCrashSubmissions") + } + + public static var betaFeedbackScreenshotSubmissions: Self { + .init(rawValue: "betaFeedbackScreenshotSubmissions") + } + + public static var betaGroups: Self { + .init(rawValue: "betaGroups") + } + + public static var betaLicenseAgreement: Self { + .init(rawValue: "betaLicenseAgreement") + } + + public static var betaTesters: Self { + .init(rawValue: "betaTesters") + } + + public static var builds: Self { + .init(rawValue: "builds") + } + + public static var bundleId: Self { + .init(rawValue: "bundleId") + } + + public static var ciProduct: Self { + .init(rawValue: "ciProduct") + } + + public static var contentRightsDeclaration: Self { + .init(rawValue: "contentRightsDeclaration") + } + + public static var customerReviewSummarizations: Self { + .init(rawValue: "customerReviewSummarizations") + } + + public static var customerReviews: Self { + .init(rawValue: "customerReviews") + } + + public static var endUserLicenseAgreement: Self { + .init(rawValue: "endUserLicenseAgreement") + } + + public static var gameCenterDetail: Self { + .init(rawValue: "gameCenterDetail") + } + + public static var gameCenterEnabledVersions: Self { + .init(rawValue: "gameCenterEnabledVersions") + } + + public static var inAppPurchases: Self { + .init(rawValue: "inAppPurchases") + } + + public static var inAppPurchasesV2: Self { + .init(rawValue: "inAppPurchasesV2") + } + + public static var isOrEverWasMadeForKids: Self { + .init(rawValue: "isOrEverWasMadeForKids") + } + + public static var marketplaceSearchDetail: Self { + .init(rawValue: "marketplaceSearchDetail") + } + + public static var name: Self { + .init(rawValue: "name") + } + + public static var perfPowerMetrics: Self { + .init(rawValue: "perfPowerMetrics") + } + + public static var preReleaseVersions: Self { + .init(rawValue: "preReleaseVersions") + } + + public static var primaryLocale: Self { + .init(rawValue: "primaryLocale") + } + + public static var promotedPurchases: Self { + .init(rawValue: "promotedPurchases") + } + + public static var reviewSubmissions: Self { + .init(rawValue: "reviewSubmissions") + } + + public static var sku: Self { + .init(rawValue: "sku") + } + + public static var streamlinedPurchasingEnabled: Self { + .init(rawValue: "streamlinedPurchasingEnabled") + } + + public static var subscriptionGracePeriod: Self { + .init(rawValue: "subscriptionGracePeriod") + } + + public static var subscriptionGroups: Self { + .init(rawValue: "subscriptionGroups") + } + + public static var subscriptionStatusUrl: Self { + .init(rawValue: "subscriptionStatusUrl") + } + + public static var subscriptionStatusUrlForSandbox: Self { + .init(rawValue: "subscriptionStatusUrlForSandbox") + } + + public static var subscriptionStatusUrlVersion: Self { + .init(rawValue: "subscriptionStatusUrlVersion") + } + + public static var subscriptionStatusUrlVersionForSandbox: Self { + .init(rawValue: "subscriptionStatusUrlVersionForSandbox") + } + + public static var webhooks: Self { + .init(rawValue: "webhooks") } + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "appAvailability": self = .appAvailability - case "appClips": self = .appClips - case "appCustomProductPages": self = .appCustomProductPages - case "appEncryptionDeclarations": self = .appEncryptionDeclarations - case "appEvents": self = .appEvents - case "appInfos": self = .appInfos - case "appPricePoints": self = .appPricePoints - case "appPriceSchedule": self = .appPriceSchedule - case "appStoreVersionExperimentsV2": self = .appStoreVersionExperimentsV2 - case "appStoreVersions": self = .appStoreVersions - case "availableInNewTerritories": self = .availableInNewTerritories - case "availableTerritories": self = .availableTerritories - case "betaAppLocalizations": self = .betaAppLocalizations - case "betaAppReviewDetail": self = .betaAppReviewDetail - case "betaGroups": self = .betaGroups - case "betaLicenseAgreement": self = .betaLicenseAgreement - case "betaTesters": self = .betaTesters - case "builds": self = .builds - case "bundleId": self = .bundleId - case "ciProduct": self = .ciProduct - case "contentRightsDeclaration": self = .contentRightsDeclaration - case "customerReviews": self = .customerReviews - case "endUserLicenseAgreement": self = .endUserLicenseAgreement - case "gameCenterDetail": self = .gameCenterDetail - case "gameCenterEnabledVersions": self = .gameCenterEnabledVersions - case "inAppPurchases": self = .inAppPurchases - case "inAppPurchasesV2": self = .inAppPurchasesV2 - case "isOrEverWasMadeForKids": self = .isOrEverWasMadeForKids - case "name": self = .name - case "perfPowerMetrics": self = .perfPowerMetrics - case "preOrder": self = .preOrder - case "preReleaseVersions": self = .preReleaseVersions - case "pricePoints": self = .pricePoints - case "prices": self = .prices - case "primaryLocale": self = .primaryLocale - case "promotedPurchases": self = .promotedPurchases - case "reviewSubmissions": self = .reviewSubmissions - case "sku": self = .sku - case "subscriptionGracePeriod": self = .subscriptionGracePeriod - case "subscriptionGroups": self = .subscriptionGroups - case "subscriptionStatusUrl": self = .subscriptionStatusUrl - case "subscriptionStatusUrlForSandbox": self = .subscriptionStatusUrlForSandbox - case "subscriptionStatusUrlVersion": self = .subscriptionStatusUrlVersion - case "subscriptionStatusUrlVersionForSandbox": self = .subscriptionStatusUrlVersionForSandbox - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum Users: Hashable, Codable, RawRepresentable { - case allAppsVisible - case firstName - case lastName - case provisioningAllowed - case roles - case username - case visibleApps - case unknown(String) - - public var rawValue: String { - switch self { - case .allAppsVisible: return "allAppsVisible" - case .firstName: return "firstName" - case .lastName: return "lastName" - case .provisioningAllowed: return "provisioningAllowed" - case .roles: return "roles" - case .username: return "username" - case .visibleApps: return "visibleApps" - case .unknown(let rawValue): return rawValue - } + public struct Users: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var allAppsVisible: Self { + .init(rawValue: "allAppsVisible") + } + + public static var firstName: Self { + .init(rawValue: "firstName") + } + + public static var lastName: Self { + .init(rawValue: "lastName") + } + + public static var provisioningAllowed: Self { + .init(rawValue: "provisioningAllowed") + } + + public static var roles: Self { + .init(rawValue: "roles") + } + + public static var username: Self { + .init(rawValue: "username") + } + + public static var visibleApps: Self { + .init(rawValue: "visibleApps") } + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "allAppsVisible": self = .allAppsVisible - case "firstName": self = .firstName - case "lastName": self = .lastName - case "provisioningAllowed": self = .provisioningAllowed - case "roles": self = .roles - case "username": self = .username - case "visibleApps": self = .visibleApps - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } @@ -314,58 +389,67 @@ extension V1.Users.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum Roles: Hashable, Codable, RawRepresentable { - case accessToReports - case accountHolder - case admin - case appManager - case cloudManagedAppDistribution - case cloudManagedDeveloperId - case createApps - case customerSupport - case developer - case finance - case imageManager - case marketing - case sales - case unknown(String) - - public var rawValue: String { - switch self { - case .accessToReports: return "ACCESS_TO_REPORTS" - case .accountHolder: return "ACCOUNT_HOLDER" - case .admin: return "ADMIN" - case .appManager: return "APP_MANAGER" - case .cloudManagedAppDistribution: return "CLOUD_MANAGED_APP_DISTRIBUTION" - case .cloudManagedDeveloperId: return "CLOUD_MANAGED_DEVELOPER_ID" - case .createApps: return "CREATE_APPS" - case .customerSupport: return "CUSTOMER_SUPPORT" - case .developer: return "DEVELOPER" - case .finance: return "FINANCE" - case .imageManager: return "IMAGE_MANAGER" - case .marketing: return "MARKETING" - case .sales: return "SALES" - case .unknown(let rawValue): return rawValue - } + public struct Roles: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var accessToReports: Self { + .init(rawValue: "ACCESS_TO_REPORTS") + } + + public static var accountHolder: Self { + .init(rawValue: "ACCOUNT_HOLDER") } + public static var admin: Self { + .init(rawValue: "ADMIN") + } + + public static var appManager: Self { + .init(rawValue: "APP_MANAGER") + } + + public static var cloudManagedAppDistribution: Self { + .init(rawValue: "CLOUD_MANAGED_APP_DISTRIBUTION") + } + + public static var cloudManagedDeveloperId: Self { + .init(rawValue: "CLOUD_MANAGED_DEVELOPER_ID") + } + + public static var createApps: Self { + .init(rawValue: "CREATE_APPS") + } + + public static var customerSupport: Self { + .init(rawValue: "CUSTOMER_SUPPORT") + } + + public static var developer: Self { + .init(rawValue: "DEVELOPER") + } + + public static var finance: Self { + .init(rawValue: "FINANCE") + } + + public static var generateIndividualKeys: Self { + .init(rawValue: "GENERATE_INDIVIDUAL_KEYS") + } + + public static var marketing: Self { + .init(rawValue: "MARKETING") + } + + public static var sales: Self { + .init(rawValue: "SALES") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "ACCESS_TO_REPORTS": self = .accessToReports - case "ACCOUNT_HOLDER": self = .accountHolder - case "ADMIN": self = .admin - case "APP_MANAGER": self = .appManager - case "CLOUD_MANAGED_APP_DISTRIBUTION": self = .cloudManagedAppDistribution - case "CLOUD_MANAGED_DEVELOPER_ID": self = .cloudManagedDeveloperId - case "CREATE_APPS": self = .createApps - case "CUSTOMER_SUPPORT": self = .customerSupport - case "DEVELOPER": self = .developer - case "FINANCE": self = .finance - case "IMAGE_MANAGER": self = .imageManager - case "MARKETING": self = .marketing - case "SALES": self = .sales - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } @@ -393,22 +477,19 @@ extension V1.Users.GET { } } - public enum Include: Hashable, Codable, RawRepresentable { - case visibleApps - case unknown(String) + public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var visibleApps: Self { + .init(rawValue: "visibleApps") + } - public var rawValue: String { - switch self { - case .visibleApps: return "visibleApps" - case .unknown(let rawValue): return rawValue - } + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "visibleApps": self = .visibleApps - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } @@ -439,31 +520,31 @@ extension V1.Users.GET { } } - public enum Sort: Hashable, Codable, RawRepresentable { - case lastName - case lastNameDesc - case username - case usernameDesc - case unknown(String) - - public var rawValue: String { - switch self { - case .lastName: return "lastName" - case .lastNameDesc: return "-lastName" - case .username: return "username" - case .usernameDesc: return "-username" - case .unknown(let rawValue): return rawValue - } + public struct Sort: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var lastName: Self { + .init(rawValue: "lastName") } + public static var lastNameDesc: Self { + .init(rawValue: "-lastName") + } + + public static var username: Self { + .init(rawValue: "username") + } + + public static var usernameDesc: Self { + .init(rawValue: "-username") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "lastName": self = .lastName - case "-lastName": self = .lastNameDesc - case "username": self = .username - case "-username": self = .usernameDesc - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/WebhookDeliveries/WebhookDeliveries.POST.8a857a1.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/WebhookDeliveries/WebhookDeliveries.POST.8a857a1.generated.swift new file mode 100644 index 00000000..e19cc584 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/WebhookDeliveries/WebhookDeliveries.POST.8a857a1.generated.swift @@ -0,0 +1,84 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.WebhookDeliveries { + public struct POST: Endpoint { + public typealias Parameters = WebhookDeliveryCreateRequest + public typealias Response = WebhookDeliveryResponse + + public var path: String { + "/v1/webhookDeliveries" + } + + /// WebhookDelivery representation + public var parameters: Parameters + + public init(parameters: Parameters) { + self.parameters = parameters + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "POST" + + var jsonEncoder: JSONEncoder { + let encoder = JSONEncoder() + return encoder + } + + urlRequest?.httpBody = try jsonEncoder.encode(parameters) + urlRequest?.setValue("application/json", forHTTPHeaderField: "Content-Type") + return urlRequest + } + + /// - Returns: **201**, Single WebhookDelivery as `WebhookDeliveryResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **422**, Unprocessable request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 201: + return try jsonDecoder.decode(WebhookDeliveryResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 409: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 422: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppPreOrders/AppPreOrders.POST.51ede6d.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/WebhookPings/WebhookPings.POST.c3049aa.generated.swift similarity index 69% rename from Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppPreOrders/AppPreOrders.POST.51ede6d.generated.swift rename to Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/WebhookPings/WebhookPings.POST.c3049aa.generated.swift index 7feeff90..fb4192b8 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppPreOrders/AppPreOrders.POST.51ede6d.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/WebhookPings/WebhookPings.POST.c3049aa.generated.swift @@ -6,17 +6,16 @@ import Foundation import FoundationNetworking #endif -extension V1.AppPreOrders { - @available(*, deprecated) +extension V1.WebhookPings { public struct POST: Endpoint { - public typealias Parameters = AppPreOrderCreateRequest - public typealias Response = AppPreOrderResponse + public typealias Parameters = WebhookPingCreateRequest + public typealias Response = WebhookPingResponse public var path: String { - "/v1/appPreOrders" + "/v1/webhookPings" } - /// AppPreOrder representation + /// WebhookPing representation public var parameters: Parameters public init(parameters: Parameters) { @@ -40,10 +39,13 @@ extension V1.AppPreOrders { return urlRequest } - /// - Returns: **201**, Single AppPreOrder as `AppPreOrderResponse` + /// - Returns: **201**, Single WebhookPing as `WebhookPingResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **422**, Unprocessable request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -52,17 +54,26 @@ extension V1.AppPreOrders { switch urlResponse.statusCode { case 201: - return try jsonDecoder.decode(AppPreOrderResponse.self, from: data) + return try jsonDecoder.decode(WebhookPingResponse.self, from: data) case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 409: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 422: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Webhooks/ById/Deliveries/WebhooksByIdDeliveries.GET.f8fe4d7.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Webhooks/ById/Deliveries/WebhooksByIdDeliveries.GET.f8fe4d7.generated.swift new file mode 100644 index 00000000..607c1905 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Webhooks/ById/Deliveries/WebhooksByIdDeliveries.GET.f8fe4d7.generated.swift @@ -0,0 +1,278 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.Webhooks.ById.Deliveries { + public struct GET: Endpoint { + public typealias Response = WebhookDeliveriesResponse + + public var path: String { + "/v1/webhooks/\(id)/deliveries" + } + + /// the id of the requested resource + public var id: String + + public var parameters: Parameters = Parameters() + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + components?.queryItems = [ + URLQueryItem(name: "fields[webhookDeliveries]", + value: parameters.fields[.webhookDeliveries]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "fields[webhookEvents]", + value: parameters.fields[.webhookEvents]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "filter[createdDateGreaterThanOrEqualTo]", + value: parameters.filter[.createdDateGreaterThanOrEqualTo]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "filter[createdDateLessThan]", + value: parameters.filter[.createdDateLessThan]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "filter[deliveryState]", + value: parameters.filter[.deliveryState]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "include", + value: parameters.include?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "limit", + value: parameters.limit.map { "\($0)" }) + ].filter { $0.value != nil } + if components?.queryItems?.isEmpty ?? false { + components?.queryItems = nil + } + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "GET" + return urlRequest + } + + /// - Returns: **200**, List of WebhookDeliveries as `WebhookDeliveriesResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(WebhookDeliveriesResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +extension V1.Webhooks.ById.Deliveries.GET { + public struct Parameters: Hashable { + public var fields: Fields = Fields() + + public var filter: Filter = Filter() + + /// comma-separated list of relationships to include + public var include: [Include]? + + /// maximum resources per page + public var limit: Int? + + public struct Fields: Hashable { + public subscript (_ relation: Relation) -> T { + get { values[relation]?.base as! T } + set { values[relation] = AnyHashable(newValue) } + } + + private var values: [AnyHashable: AnyHashable] = [:] + + public struct WebhookDeliveries: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var createdDate: Self { + .init(rawValue: "createdDate") + } + + public static var deliveryState: Self { + .init(rawValue: "deliveryState") + } + + public static var errorMessage: Self { + .init(rawValue: "errorMessage") + } + + public static var event: Self { + .init(rawValue: "event") + } + + public static var redelivery: Self { + .init(rawValue: "redelivery") + } + + public static var request: Self { + .init(rawValue: "request") + } + + public static var response: Self { + .init(rawValue: "response") + } + + public static var sentDate: Self { + .init(rawValue: "sentDate") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct WebhookEvents: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var createdDate: Self { + .init(rawValue: "createdDate") + } + + public static var eventType: Self { + .init(rawValue: "eventType") + } + + public static var payload: Self { + .init(rawValue: "payload") + } + + public static var ping: Self { + .init(rawValue: "ping") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct Relation: Hashable { + /// the fields to include for returned resources of type webhookDeliveries + public static var webhookDeliveries: Relation<[WebhookDeliveries]?> { + .init(key: "fields[webhookDeliveries]") + } + + /// the fields to include for returned resources of type webhookEvents + public static var webhookEvents: Relation<[WebhookEvents]?> { + .init(key: "fields[webhookEvents]") + } + + internal let key: String + + public func hash(into hasher: inout Hasher) { + hasher.combine(key) + } + } + } + + public struct Filter: Hashable { + public subscript (_ relation: Relation) -> T { + get { values[relation]?.base as! T } + set { values[relation] = AnyHashable(newValue) } + } + + private var values: [AnyHashable: AnyHashable] = [:] + + public struct DeliveryState: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var failed: Self { + .init(rawValue: "FAILED") + } + + public static var pending: Self { + .init(rawValue: "PENDING") + } + + public static var succeeded: Self { + .init(rawValue: "SUCCEEDED") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct Relation: Hashable { + /// filter by createdDateGreaterThanOrEqualTo + public static var createdDateGreaterThanOrEqualTo: Relation<[String]?> { + .init(key: "filter[createdDateGreaterThanOrEqualTo]") + } + + /// filter by createdDateLessThan + public static var createdDateLessThan: Relation<[String]?> { + .init(key: "filter[createdDateLessThan]") + } + + /// filter by attribute 'deliveryState' + public static var deliveryState: Relation<[DeliveryState]?> { + .init(key: "filter[deliveryState]") + } + + internal let key: String + + public func hash(into hasher: inout Hasher) { + hasher.combine(key) + } + } + } + + public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var event: Self { + .init(rawValue: "event") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Webhooks/ById/Relationships/Deliveries/WebhooksByIdRelationshipsDeliveries.GET.2baf075.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Webhooks/ById/Relationships/Deliveries/WebhooksByIdRelationshipsDeliveries.GET.2baf075.generated.swift new file mode 100644 index 00000000..cecb656d --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Webhooks/ById/Relationships/Deliveries/WebhooksByIdRelationshipsDeliveries.GET.2baf075.generated.swift @@ -0,0 +1,88 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.Webhooks.ById.Relationships.Deliveries { + public struct GET: Endpoint { + public typealias Response = WebhookDeliveriesLinkagesResponse + + public var path: String { + "/v1/webhooks/\(id)/relationships/deliveries" + } + + /// the id of the requested resource + public var id: String + + public var parameters: Parameters = Parameters() + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + components?.queryItems = [ + URLQueryItem(name: "limit", + value: parameters.limit.map { "\($0)" }) + ].filter { $0.value != nil } + if components?.queryItems?.isEmpty ?? false { + components?.queryItems = nil + } + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "GET" + return urlRequest + } + + /// - Returns: **200**, List of related linkages as `WebhookDeliveriesLinkagesResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(WebhookDeliveriesLinkagesResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +extension V1.Webhooks.ById.Relationships.Deliveries.GET { + public struct Parameters: Hashable { + /// maximum resources per page + public var limit: Int? + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/PromotedPurchaseImages/ById/PromotedPurchaseImagesById.DELETE.307096c.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Webhooks/ById/WebhooksById.DELETE.30521c1.generated.swift similarity index 82% rename from Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/PromotedPurchaseImages/ById/PromotedPurchaseImagesById.DELETE.307096c.generated.swift rename to Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Webhooks/ById/WebhooksById.DELETE.30521c1.generated.swift index 0d5c85cf..a9604b9d 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/PromotedPurchaseImages/ById/PromotedPurchaseImagesById.DELETE.307096c.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Webhooks/ById/WebhooksById.DELETE.30521c1.generated.swift @@ -6,13 +6,13 @@ import Foundation import FoundationNetworking #endif -extension V1.PromotedPurchaseImages.ById { +extension V1.Webhooks.ById { public struct DELETE: Endpoint { public typealias Parameters = Never public typealias Response = Void public var path: String { - "/v1/promotedPurchaseImages/\(id)" + "/v1/webhooks/\(id)" } /// the id of the requested resource @@ -31,11 +31,12 @@ extension V1.PromotedPurchaseImages.ById { return urlRequest } - /// - Returns: **204**, Success (no content) /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -43,12 +44,12 @@ extension V1.PromotedPurchaseImages.ById { } switch urlResponse.statusCode { - case 204: - return - case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) @@ -58,6 +59,9 @@ extension V1.PromotedPurchaseImages.ById { case 409: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Webhooks/ById/WebhooksById.GET.30521c1.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Webhooks/ById/WebhooksById.GET.30521c1.generated.swift new file mode 100644 index 00000000..0e04d7c3 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Webhooks/ById/WebhooksById.GET.30521c1.generated.swift @@ -0,0 +1,166 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.Webhooks.ById { + public struct GET: Endpoint { + public typealias Response = WebhookResponse + + public var path: String { + "/v1/webhooks/\(id)" + } + + /// the id of the requested resource + public var id: String + + public var parameters: Parameters = Parameters() + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + components?.queryItems = [ + URLQueryItem(name: "fields[webhooks]", + value: parameters.fields[.webhooks]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "include", + value: parameters.include?.map { "\($0)" }.joined(separator: ",")) + ].filter { $0.value != nil } + if components?.queryItems?.isEmpty ?? false { + components?.queryItems = nil + } + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "GET" + return urlRequest + } + + /// - Returns: **200**, Single Webhook as `WebhookResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(WebhookResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +extension V1.Webhooks.ById.GET { + public struct Parameters: Hashable { + public var fields: Fields = Fields() + + /// comma-separated list of relationships to include + public var include: [Include]? + + public struct Fields: Hashable { + public subscript (_ relation: Relation) -> T { + get { values[relation]?.base as! T } + set { values[relation] = AnyHashable(newValue) } + } + + private var values: [AnyHashable: AnyHashable] = [:] + + public struct Webhooks: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var app: Self { + .init(rawValue: "app") + } + + public static var deliveries: Self { + .init(rawValue: "deliveries") + } + + public static var enabled: Self { + .init(rawValue: "enabled") + } + + public static var eventTypes: Self { + .init(rawValue: "eventTypes") + } + + public static var name: Self { + .init(rawValue: "name") + } + + public static var url: Self { + .init(rawValue: "url") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct Relation: Hashable { + /// the fields to include for returned resources of type webhooks + public static var webhooks: Relation<[Webhooks]?> { + .init(key: "fields[webhooks]") + } + + internal let key: String + + public func hash(into hasher: inout Hasher) { + hasher.combine(key) + } + } + } + + public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var app: Self { + .init(rawValue: "app") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Webhooks/ById/WebhooksById.PATCH.30521c1.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Webhooks/ById/WebhooksById.PATCH.30521c1.generated.swift new file mode 100644 index 00000000..3f9ac68d --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Webhooks/ById/WebhooksById.PATCH.30521c1.generated.swift @@ -0,0 +1,95 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.Webhooks.ById { + public struct PATCH: Endpoint { + public typealias Parameters = WebhookUpdateRequest + public typealias Response = WebhookResponse + + public var path: String { + "/v1/webhooks/\(id)" + } + + /// the id of the requested resource + public var id: String + + /// Webhook representation + public var parameters: Parameters + + public init( + id: String, + parameters: Parameters + ) { + self.id = id + self.parameters = parameters + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "PATCH" + + var jsonEncoder: JSONEncoder { + let encoder = JSONEncoder() + return encoder + } + + urlRequest?.httpBody = try jsonEncoder.encode(parameters) + urlRequest?.setValue("application/json", forHTTPHeaderField: "Content-Type") + return urlRequest + } + + /// - Returns: **200**, Single Webhook as `WebhookResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **422**, Unprocessable request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(WebhookResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 409: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 422: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppAvailabilities/AppAvailabilities.POST.30d44e3.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Webhooks/Webhooks.POST.026e467.generated.swift similarity index 69% rename from Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppAvailabilities/AppAvailabilities.POST.30d44e3.generated.swift rename to Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Webhooks/Webhooks.POST.026e467.generated.swift index 68ef8d23..86940a08 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppAvailabilities/AppAvailabilities.POST.30d44e3.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/Webhooks/Webhooks.POST.026e467.generated.swift @@ -6,17 +6,16 @@ import Foundation import FoundationNetworking #endif -extension V1.AppAvailabilities { - @available(*, deprecated) +extension V1.Webhooks { public struct POST: Endpoint { - public typealias Parameters = AppAvailabilityCreateRequest - public typealias Response = AppAvailabilityResponse + public typealias Parameters = WebhookCreateRequest + public typealias Response = WebhookResponse public var path: String { - "/v1/appAvailabilities" + "/v1/webhooks" } - /// AppAvailability representation + /// Webhook representation public var parameters: Parameters public init(parameters: Parameters) { @@ -40,10 +39,13 @@ extension V1.AppAvailabilities { return urlRequest } - /// - Returns: **201**, Single AppAvailability as `AppAvailabilityResponse` + /// - Returns: **201**, Single Webhook as `WebhookResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **422**, Unprocessable request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -52,17 +54,26 @@ extension V1.AppAvailabilities { switch urlResponse.statusCode { case 201: - return try jsonDecoder.decode(AppAvailabilityResponse.self, from: data) + return try jsonDecoder.decode(WebhookResponse.self, from: data) case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 409: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 422: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppPriceTiers/ById/PricePoints/AppPriceTiersByIdPricePoints.GET.cc8a323.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/WinBackOffers/ById/Prices/WinBackOffersByIdPrices.GET.3de578d.generated.swift similarity index 56% rename from Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppPriceTiers/ById/PricePoints/AppPriceTiersByIdPricePoints.GET.cc8a323.generated.swift rename to Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/WinBackOffers/ById/Prices/WinBackOffersByIdPrices.GET.3de578d.generated.swift index c2dc2210..6443f1a0 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/AppPriceTiers/ById/PricePoints/AppPriceTiersByIdPricePoints.GET.cc8a323.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/WinBackOffers/ById/Prices/WinBackOffersByIdPrices.GET.3de578d.generated.swift @@ -6,13 +6,12 @@ import Foundation import FoundationNetworking #endif -extension V1.AppPriceTiers.ById.PricePoints { - @available(*, deprecated) +extension V1.WinBackOffers.ById.Prices { public struct GET: Endpoint { - public typealias Response = AppPricePointsResponse + public typealias Response = WinBackOfferPricesResponse public var path: String { - "/v1/appPriceTiers/\(id)/pricePoints" + "/v1/winBackOffers/\(id)/prices" } /// the id of the requested resource @@ -29,12 +28,12 @@ extension V1.AppPriceTiers.ById.PricePoints { components?.path = path components?.queryItems = [ - URLQueryItem(name: "fields[appPricePoints]", - value: parameters.fields[.appPricePoints]?.map { "\($0)" }.joined(separator: ",")), - URLQueryItem(name: "fields[appPriceTiers]", - value: parameters.fields[.appPriceTiers]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "fields[subscriptionPricePoints]", + value: parameters.fields[.subscriptionPricePoints]?.map { "\($0)" }.joined(separator: ",")), URLQueryItem(name: "fields[territories]", value: parameters.fields[.territories]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "fields[winBackOfferPrices]", + value: parameters.fields[.winBackOfferPrices]?.map { "\($0)" }.joined(separator: ",")), URLQueryItem(name: "filter[territory]", value: parameters.filter[.territory]?.map { "\($0)" }.joined(separator: ",")), URLQueryItem(name: "include", @@ -51,10 +50,12 @@ extension V1.AppPriceTiers.ById.PricePoints { return urlRequest } - /// - Returns: **200**, List of AppPricePoints as `AppPricePointsResponse` + /// - Returns: **200**, List of WinBackOfferPrices as `WinBackOfferPricesResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -63,17 +64,23 @@ extension V1.AppPriceTiers.ById.PricePoints { switch urlResponse.statusCode { case 200: - return try jsonDecoder.decode(AppPricePointsResponse.self, from: data) + return try jsonDecoder.decode(WinBackOfferPricesResponse.self, from: data) case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 404: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -81,7 +88,7 @@ extension V1.AppPriceTiers.ById.PricePoints { } } -extension V1.AppPriceTiers.ById.PricePoints.GET { +extension V1.WinBackOffers.ById.Prices.GET { public struct Parameters: Hashable { public var fields: Fields = Fields() @@ -101,81 +108,78 @@ extension V1.AppPriceTiers.ById.PricePoints.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum AppPricePoints: Hashable, Codable, RawRepresentable { - case customerPrice - case priceTier - case proceeds - case territory - case unknown(String) + public struct SubscriptionPricePoints: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var customerPrice: Self { + .init(rawValue: "customerPrice") + } + + public static var equalizations: Self { + .init(rawValue: "equalizations") + } - public var rawValue: String { - switch self { - case .customerPrice: return "customerPrice" - case .priceTier: return "priceTier" - case .proceeds: return "proceeds" - case .territory: return "territory" - case .unknown(let rawValue): return rawValue - } + public static var proceeds: Self { + .init(rawValue: "proceeds") } + public static var proceedsYear2: Self { + .init(rawValue: "proceedsYear2") + } + + public static var territory: Self { + .init(rawValue: "territory") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "customerPrice": self = .customerPrice - case "priceTier": self = .priceTier - case "proceeds": self = .proceeds - case "territory": self = .territory - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum AppPriceTiers: Hashable, Codable, RawRepresentable { - case pricePoints - case unknown(String) + public struct Territories: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var currency: Self { + .init(rawValue: "currency") + } - public var rawValue: String { - switch self { - case .pricePoints: return "pricePoints" - case .unknown(let rawValue): return rawValue - } + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "pricePoints": self = .pricePoints - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum Territories: Hashable, Codable, RawRepresentable { - case currency - case unknown(String) + public struct WinBackOfferPrices: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var subscriptionPricePoint: Self { + .init(rawValue: "subscriptionPricePoint") + } + + public static var territory: Self { + .init(rawValue: "territory") + } - public var rawValue: String { - switch self { - case .currency: return "currency" - case .unknown(let rawValue): return rawValue - } + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "currency": self = .currency - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } public struct Relation: Hashable { - /// the fields to include for returned resources of type appPricePoints - public static var appPricePoints: Relation<[AppPricePoints]?> { - .init(key: "fields[appPricePoints]") - } - - /// the fields to include for returned resources of type appPriceTiers - public static var appPriceTiers: Relation<[AppPriceTiers]?> { - .init(key: "fields[appPriceTiers]") + /// the fields to include for returned resources of type subscriptionPricePoints + public static var subscriptionPricePoints: Relation<[SubscriptionPricePoints]?> { + .init(key: "fields[subscriptionPricePoints]") } /// the fields to include for returned resources of type territories @@ -183,6 +187,11 @@ extension V1.AppPriceTiers.ById.PricePoints.GET { .init(key: "fields[territories]") } + /// the fields to include for returned resources of type winBackOfferPrices + public static var winBackOfferPrices: Relation<[WinBackOfferPrices]?> { + .init(key: "fields[winBackOfferPrices]") + } + internal let key: String public func hash(into hasher: inout Hasher) { @@ -213,25 +222,23 @@ extension V1.AppPriceTiers.ById.PricePoints.GET { } } - public enum Include: Hashable, Codable, RawRepresentable { - case priceTier - case territory - case unknown(String) + public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var subscriptionPricePoint: Self { + .init(rawValue: "subscriptionPricePoint") + } - public var rawValue: String { - switch self { - case .priceTier: return "priceTier" - case .territory: return "territory" - case .unknown(let rawValue): return rawValue - } + public static var territory: Self { + .init(rawValue: "territory") } + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "priceTier": self = .priceTier - case "territory": self = .territory - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/WinBackOffers/ById/Relationships/Prices/WinBackOffersByIdRelationshipsPrices.GET.e2cb13a.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/WinBackOffers/ById/Relationships/Prices/WinBackOffersByIdRelationshipsPrices.GET.e2cb13a.generated.swift new file mode 100644 index 00000000..692c3204 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/WinBackOffers/ById/Relationships/Prices/WinBackOffersByIdRelationshipsPrices.GET.e2cb13a.generated.swift @@ -0,0 +1,88 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.WinBackOffers.ById.Relationships.Prices { + public struct GET: Endpoint { + public typealias Response = WinBackOfferPricesLinkagesResponse + + public var path: String { + "/v1/winBackOffers/\(id)/relationships/prices" + } + + /// the id of the requested resource + public var id: String + + public var parameters: Parameters = Parameters() + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + components?.queryItems = [ + URLQueryItem(name: "limit", + value: parameters.limit.map { "\($0)" }) + ].filter { $0.value != nil } + if components?.queryItems?.isEmpty ?? false { + components?.queryItems = nil + } + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "GET" + return urlRequest + } + + /// - Returns: **200**, List of related linkages as `WinBackOfferPricesLinkagesResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(WinBackOfferPricesLinkagesResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +extension V1.WinBackOffers.ById.Relationships.Prices.GET { + public struct Parameters: Hashable { + /// maximum resources per page + public var limit: Int? + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/WinBackOffers/ById/WinBackOffersById.DELETE.0e8f1fd.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/WinBackOffers/ById/WinBackOffersById.DELETE.0e8f1fd.generated.swift new file mode 100644 index 00000000..b4c5b2ed --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/WinBackOffers/ById/WinBackOffersById.DELETE.0e8f1fd.generated.swift @@ -0,0 +1,72 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.WinBackOffers.ById { + public struct DELETE: Endpoint { + public typealias Parameters = Never + public typealias Response = Void + + public var path: String { + "/v1/winBackOffers/\(id)" + } + + /// the id of the requested resource + public var id: String + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "DELETE" + return urlRequest + } + + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 409: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/WinBackOffers/ById/WinBackOffersById.GET.0e8f1fd.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/WinBackOffers/ById/WinBackOffersById.GET.0e8f1fd.generated.swift new file mode 100644 index 00000000..48cb8283 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/WinBackOffers/ById/WinBackOffersById.GET.0e8f1fd.generated.swift @@ -0,0 +1,247 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.WinBackOffers.ById { + public struct GET: Endpoint { + public typealias Response = WinBackOfferResponse + + public var path: String { + "/v1/winBackOffers/\(id)" + } + + /// the id of the requested resource + public var id: String + + public var parameters: Parameters = Parameters() + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + components?.queryItems = [ + URLQueryItem(name: "fields[winBackOfferPrices]", + value: parameters.fields[.winBackOfferPrices]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "fields[winBackOffers]", + value: parameters.fields[.winBackOffers]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "include", + value: parameters.include?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "limit[prices]", + value: parameters.limit[.prices].map { "\($0)" }) + ].filter { $0.value != nil } + if components?.queryItems?.isEmpty ?? false { + components?.queryItems = nil + } + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "GET" + return urlRequest + } + + /// - Returns: **200**, Single WinBackOffer as `WinBackOfferResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(WinBackOfferResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +extension V1.WinBackOffers.ById.GET { + public struct Parameters: Hashable { + public var fields: Fields = Fields() + + /// comma-separated list of relationships to include + public var include: [Include]? + + public var limit: Limit = Limit() + + public struct Fields: Hashable { + public subscript (_ relation: Relation) -> T { + get { values[relation]?.base as! T } + set { values[relation] = AnyHashable(newValue) } + } + + private var values: [AnyHashable: AnyHashable] = [:] + + public struct WinBackOfferPrices: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var subscriptionPricePoint: Self { + .init(rawValue: "subscriptionPricePoint") + } + + public static var territory: Self { + .init(rawValue: "territory") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct WinBackOffers: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var customerEligibilityPaidSubscriptionDurationInMonths: Self { + .init(rawValue: "customerEligibilityPaidSubscriptionDurationInMonths") + } + + public static var customerEligibilityTimeSinceLastSubscribedInMonths: Self { + .init(rawValue: "customerEligibilityTimeSinceLastSubscribedInMonths") + } + + public static var customerEligibilityWaitBetweenOffersInMonths: Self { + .init(rawValue: "customerEligibilityWaitBetweenOffersInMonths") + } + + public static var duration: Self { + .init(rawValue: "duration") + } + + public static var endDate: Self { + .init(rawValue: "endDate") + } + + public static var offerId: Self { + .init(rawValue: "offerId") + } + + public static var offerMode: Self { + .init(rawValue: "offerMode") + } + + public static var periodCount: Self { + .init(rawValue: "periodCount") + } + + public static var prices: Self { + .init(rawValue: "prices") + } + + public static var priority: Self { + .init(rawValue: "priority") + } + + public static var promotionIntent: Self { + .init(rawValue: "promotionIntent") + } + + public static var referenceName: Self { + .init(rawValue: "referenceName") + } + + public static var startDate: Self { + .init(rawValue: "startDate") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct Relation: Hashable { + /// the fields to include for returned resources of type winBackOfferPrices + public static var winBackOfferPrices: Relation<[WinBackOfferPrices]?> { + .init(key: "fields[winBackOfferPrices]") + } + + /// the fields to include for returned resources of type winBackOffers + public static var winBackOffers: Relation<[WinBackOffers]?> { + .init(key: "fields[winBackOffers]") + } + + internal let key: String + + public func hash(into hasher: inout Hasher) { + hasher.combine(key) + } + } + } + + public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var prices: Self { + .init(rawValue: "prices") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct Limit: Hashable { + public subscript (_ relation: Relation) -> T { + get { values[relation]?.base as! T } + set { values[relation] = AnyHashable(newValue) } + } + + private var values: [AnyHashable: AnyHashable] = [:] + + public struct Relation: Hashable { + /// maximum number of related prices returned (when they are included) + public static var prices: Relation { + .init(key: "limit[prices]") + } + + internal let key: String + + public func hash(into hasher: inout Hasher) { + hasher.combine(key) + } + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/WinBackOffers/ById/WinBackOffersById.PATCH.0e8f1fd.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/WinBackOffers/ById/WinBackOffersById.PATCH.0e8f1fd.generated.swift new file mode 100644 index 00000000..207e30d6 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/WinBackOffers/ById/WinBackOffersById.PATCH.0e8f1fd.generated.swift @@ -0,0 +1,95 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.WinBackOffers.ById { + public struct PATCH: Endpoint { + public typealias Parameters = WinBackOfferUpdateRequest + public typealias Response = WinBackOfferResponse + + public var path: String { + "/v1/winBackOffers/\(id)" + } + + /// the id of the requested resource + public var id: String + + /// WinBackOffer representation + public var parameters: Parameters + + public init( + id: String, + parameters: Parameters + ) { + self.id = id + self.parameters = parameters + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "PATCH" + + var jsonEncoder: JSONEncoder { + let encoder = JSONEncoder() + return encoder + } + + urlRequest?.httpBody = try jsonEncoder.encode(parameters) + urlRequest?.setValue("application/json", forHTTPHeaderField: "Content-Type") + return urlRequest + } + + /// - Returns: **200**, Single WinBackOffer as `WinBackOfferResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **422**, Unprocessable request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(WinBackOfferResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 409: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 422: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/WinBackOffers/WinBackOffers.POST.10ac4bb.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/WinBackOffers/WinBackOffers.POST.10ac4bb.generated.swift new file mode 100644 index 00000000..3bdb86cf --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V1/WinBackOffers/WinBackOffers.POST.10ac4bb.generated.swift @@ -0,0 +1,84 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V1.WinBackOffers { + public struct POST: Endpoint { + public typealias Parameters = WinBackOfferCreateRequest + public typealias Response = WinBackOfferResponse + + public var path: String { + "/v1/winBackOffers" + } + + /// WinBackOffer representation + public var parameters: Parameters + + public init(parameters: Parameters) { + self.parameters = parameters + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "POST" + + var jsonEncoder: JSONEncoder { + let encoder = JSONEncoder() + return encoder + } + + urlRequest?.httpBody = try jsonEncoder.encode(parameters) + urlRequest?.setValue("application/json", forHTTPHeaderField: "Content-Type") + return urlRequest + } + + /// - Returns: **201**, Single WinBackOffer as `WinBackOfferResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **422**, Unprocessable request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 201: + return try jsonDecoder.decode(WinBackOfferResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 409: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 422: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/AppAvailabilities/AppAvailabilities.POST.aa1f3b3.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/AppAvailabilities/AppAvailabilities.POST.aa1f3b3.generated.swift index f07d6695..56dfddcc 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/AppAvailabilities/AppAvailabilities.POST.aa1f3b3.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/AppAvailabilities/AppAvailabilities.POST.aa1f3b3.generated.swift @@ -41,8 +41,11 @@ extension V2.AppAvailabilities { /// - Returns: **201**, Single AppAvailability as `AppAvailabilityV2Response` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **422**, Unprocessable request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -56,12 +59,21 @@ extension V2.AppAvailabilities { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 409: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 422: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/AppAvailabilities/ById/AppAvailabilitiesById.GET.be43f8b.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/AppAvailabilities/ById/AppAvailabilitiesById.GET.be43f8b.generated.swift index 9b1d62da..8023ef39 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/AppAvailabilities/ById/AppAvailabilitiesById.GET.be43f8b.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/AppAvailabilities/ById/AppAvailabilitiesById.GET.be43f8b.generated.swift @@ -48,8 +48,10 @@ extension V2.AppAvailabilities.ById { /// - Returns: **200**, Single AppAvailability as `AppAvailabilityV2Response` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -63,12 +65,18 @@ extension V2.AppAvailabilities.ById { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 404: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -93,62 +101,59 @@ extension V2.AppAvailabilities.ById.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum AppAvailabilities: Hashable, Codable, RawRepresentable { - case app - case availableInNewTerritories - case territoryAvailabilities - case unknown(String) + public struct AppAvailabilities: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var availableInNewTerritories: Self { + .init(rawValue: "availableInNewTerritories") + } + + public static var territoryAvailabilities: Self { + .init(rawValue: "territoryAvailabilities") + } - public var rawValue: String { - switch self { - case .app: return "app" - case .availableInNewTerritories: return "availableInNewTerritories" - case .territoryAvailabilities: return "territoryAvailabilities" - case .unknown(let rawValue): return rawValue - } + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "app": self = .app - case "availableInNewTerritories": self = .availableInNewTerritories - case "territoryAvailabilities": self = .territoryAvailabilities - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum TerritoryAvailabilities: Hashable, Codable, RawRepresentable { - case available - case contentStatuses - case preOrderEnabled - case preOrderPublishDate - case releaseDate - case territory - case unknown(String) - - public var rawValue: String { - switch self { - case .available: return "available" - case .contentStatuses: return "contentStatuses" - case .preOrderEnabled: return "preOrderEnabled" - case .preOrderPublishDate: return "preOrderPublishDate" - case .releaseDate: return "releaseDate" - case .territory: return "territory" - case .unknown(let rawValue): return rawValue - } + public struct TerritoryAvailabilities: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var available: Self { + .init(rawValue: "available") + } + + public static var contentStatuses: Self { + .init(rawValue: "contentStatuses") } + public static var preOrderEnabled: Self { + .init(rawValue: "preOrderEnabled") + } + + public static var preOrderPublishDate: Self { + .init(rawValue: "preOrderPublishDate") + } + + public static var releaseDate: Self { + .init(rawValue: "releaseDate") + } + + public static var territory: Self { + .init(rawValue: "territory") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "available": self = .available - case "contentStatuses": self = .contentStatuses - case "preOrderEnabled": self = .preOrderEnabled - case "preOrderPublishDate": self = .preOrderPublishDate - case "releaseDate": self = .releaseDate - case "territory": self = .territory - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } @@ -171,22 +176,19 @@ extension V2.AppAvailabilities.ById.GET { } } - public enum Include: Hashable, Codable, RawRepresentable { - case territoryAvailabilities - case unknown(String) + public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var territoryAvailabilities: Self { + .init(rawValue: "territoryAvailabilities") + } - public var rawValue: String { - switch self { - case .territoryAvailabilities: return "territoryAvailabilities" - case .unknown(let rawValue): return rawValue - } + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "territoryAvailabilities": self = .territoryAvailabilities - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/AppAvailabilities/ById/Relationships/TerritoryAvailabilities/AppAvailabilitiesByIdRelationshipsTerritoryAvailabilities.GET.30ab2ab.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/AppAvailabilities/ById/Relationships/TerritoryAvailabilities/AppAvailabilitiesByIdRelationshipsTerritoryAvailabilities.GET.30ab2ab.generated.swift new file mode 100644 index 00000000..4804d91a --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/AppAvailabilities/ById/Relationships/TerritoryAvailabilities/AppAvailabilitiesByIdRelationshipsTerritoryAvailabilities.GET.30ab2ab.generated.swift @@ -0,0 +1,88 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V2.AppAvailabilities.ById.Relationships.TerritoryAvailabilities { + public struct GET: Endpoint { + public typealias Response = AppAvailabilityV2TerritoryAvailabilitiesLinkagesResponse + + public var path: String { + "/v2/appAvailabilities/\(id)/relationships/territoryAvailabilities" + } + + /// the id of the requested resource + public var id: String + + public var parameters: Parameters = Parameters() + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + components?.queryItems = [ + URLQueryItem(name: "limit", + value: parameters.limit.map { "\($0)" }) + ].filter { $0.value != nil } + if components?.queryItems?.isEmpty ?? false { + components?.queryItems = nil + } + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "GET" + return urlRequest + } + + /// - Returns: **200**, List of related linkages as `AppAvailabilityV2TerritoryAvailabilitiesLinkagesResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(AppAvailabilityV2TerritoryAvailabilitiesLinkagesResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +extension V2.AppAvailabilities.ById.Relationships.TerritoryAvailabilities.GET { + public struct Parameters: Hashable { + /// maximum resources per page + public var limit: Int? + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/AppAvailabilities/ById/TerritoryAvailabilities/AppAvailabilitiesByIdTerritoryAvailabilities.GET.0578b27.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/AppAvailabilities/ById/TerritoryAvailabilities/AppAvailabilitiesByIdTerritoryAvailabilities.GET.0578b27.generated.swift index 3c264cbc..3bbb73fa 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/AppAvailabilities/ById/TerritoryAvailabilities/AppAvailabilitiesByIdTerritoryAvailabilities.GET.0578b27.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/AppAvailabilities/ById/TerritoryAvailabilities/AppAvailabilitiesByIdTerritoryAvailabilities.GET.0578b27.generated.swift @@ -48,8 +48,10 @@ extension V2.AppAvailabilities.ById.TerritoryAvailabilities { /// - Returns: **200**, List of TerritoryAvailabilities as `TerritoryAvailabilitiesResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -63,12 +65,18 @@ extension V2.AppAvailabilities.ById.TerritoryAvailabilities { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 404: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -94,56 +102,55 @@ extension V2.AppAvailabilities.ById.TerritoryAvailabilities.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum Territories: Hashable, Codable, RawRepresentable { - case currency - case unknown(String) + public struct Territories: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var currency: Self { + .init(rawValue: "currency") + } - public var rawValue: String { - switch self { - case .currency: return "currency" - case .unknown(let rawValue): return rawValue - } + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "currency": self = .currency - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum TerritoryAvailabilities: Hashable, Codable, RawRepresentable { - case available - case contentStatuses - case preOrderEnabled - case preOrderPublishDate - case releaseDate - case territory - case unknown(String) - - public var rawValue: String { - switch self { - case .available: return "available" - case .contentStatuses: return "contentStatuses" - case .preOrderEnabled: return "preOrderEnabled" - case .preOrderPublishDate: return "preOrderPublishDate" - case .releaseDate: return "releaseDate" - case .territory: return "territory" - case .unknown(let rawValue): return rawValue - } + public struct TerritoryAvailabilities: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var available: Self { + .init(rawValue: "available") + } + + public static var contentStatuses: Self { + .init(rawValue: "contentStatuses") + } + + public static var preOrderEnabled: Self { + .init(rawValue: "preOrderEnabled") + } + + public static var preOrderPublishDate: Self { + .init(rawValue: "preOrderPublishDate") } + public static var releaseDate: Self { + .init(rawValue: "releaseDate") + } + + public static var territory: Self { + .init(rawValue: "territory") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "available": self = .available - case "contentStatuses": self = .contentStatuses - case "preOrderEnabled": self = .preOrderEnabled - case "preOrderPublishDate": self = .preOrderPublishDate - case "releaseDate": self = .releaseDate - case "territory": self = .territory - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } @@ -166,22 +173,19 @@ extension V2.AppAvailabilities.ById.TerritoryAvailabilities.GET { } } - public enum Include: Hashable, Codable, RawRepresentable { - case territory - case unknown(String) + public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var territory: Self { + .init(rawValue: "territory") + } - public var rawValue: String { - switch self { - case .territory: return "territory" - case .unknown(let rawValue): return rawValue - } + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "territory": self = .territory - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/AppStoreVersionExperiments/AppStoreVersionExperiments.POST.6fa7f10.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/AppStoreVersionExperiments/AppStoreVersionExperiments.POST.6fa7f10.generated.swift index 1d4655b5..177eae7a 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/AppStoreVersionExperiments/AppStoreVersionExperiments.POST.6fa7f10.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/AppStoreVersionExperiments/AppStoreVersionExperiments.POST.6fa7f10.generated.swift @@ -41,8 +41,11 @@ extension V2.AppStoreVersionExperiments { /// - Returns: **201**, Single AppStoreVersionExperiment as `AppStoreVersionExperimentV2Response` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **422**, Unprocessable request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -56,12 +59,21 @@ extension V2.AppStoreVersionExperiments { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 409: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 422: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/AppStoreVersionExperiments/ById/AppStoreVersionExperimentTreatments/AppStoreVersionExperimentsByIdAppStoreVersionExperimentTreatments.GET.d40f958.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/AppStoreVersionExperiments/ById/AppStoreVersionExperimentTreatments/AppStoreVersionExperimentsByIdAppStoreVersionExperimentTreatments.GET.d40f958.generated.swift index dffa297c..db73e212 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/AppStoreVersionExperiments/ById/AppStoreVersionExperimentTreatments/AppStoreVersionExperimentsByIdAppStoreVersionExperimentTreatments.GET.d40f958.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/AppStoreVersionExperiments/ById/AppStoreVersionExperimentTreatments/AppStoreVersionExperimentsByIdAppStoreVersionExperimentTreatments.GET.d40f958.generated.swift @@ -52,8 +52,10 @@ extension V2.AppStoreVersionExperiments.ById.AppStoreVersionExperimentTreatments /// - Returns: **200**, List of AppStoreVersionExperimentTreatments as `AppStoreVersionExperimentTreatmentsResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -67,12 +69,18 @@ extension V2.AppStoreVersionExperiments.ById.AppStoreVersionExperimentTreatments case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 404: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -98,123 +106,131 @@ extension V2.AppStoreVersionExperiments.ById.AppStoreVersionExperimentTreatments private var values: [AnyHashable: AnyHashable] = [:] - public enum AppStoreVersionExperimentTreatmentLocalizations: Hashable, Codable, RawRepresentable { - case appPreviewSets - case appScreenshotSets - case appStoreVersionExperimentTreatment - case locale - case unknown(String) + public struct AppStoreVersionExperimentTreatmentLocalizations: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var appPreviewSets: Self { + .init(rawValue: "appPreviewSets") + } + + public static var appScreenshotSets: Self { + .init(rawValue: "appScreenshotSets") + } - public var rawValue: String { - switch self { - case .appPreviewSets: return "appPreviewSets" - case .appScreenshotSets: return "appScreenshotSets" - case .appStoreVersionExperimentTreatment: return "appStoreVersionExperimentTreatment" - case .locale: return "locale" - case .unknown(let rawValue): return rawValue - } + public static var appStoreVersionExperimentTreatment: Self { + .init(rawValue: "appStoreVersionExperimentTreatment") } + public static var locale: Self { + .init(rawValue: "locale") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "appPreviewSets": self = .appPreviewSets - case "appScreenshotSets": self = .appScreenshotSets - case "appStoreVersionExperimentTreatment": self = .appStoreVersionExperimentTreatment - case "locale": self = .locale - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum AppStoreVersionExperimentTreatments: Hashable, Codable, RawRepresentable { - case appIcon - case appIconName - case appStoreVersionExperiment - case appStoreVersionExperimentTreatmentLocalizations - case appStoreVersionExperimentV2 - case name - case promotedDate - case unknown(String) - - public var rawValue: String { - switch self { - case .appIcon: return "appIcon" - case .appIconName: return "appIconName" - case .appStoreVersionExperiment: return "appStoreVersionExperiment" - case .appStoreVersionExperimentTreatmentLocalizations: return "appStoreVersionExperimentTreatmentLocalizations" - case .appStoreVersionExperimentV2: return "appStoreVersionExperimentV2" - case .name: return "name" - case .promotedDate: return "promotedDate" - case .unknown(let rawValue): return rawValue - } + public struct AppStoreVersionExperimentTreatments: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var appIcon: Self { + .init(rawValue: "appIcon") + } + + public static var appIconName: Self { + .init(rawValue: "appIconName") + } + + public static var appStoreVersionExperiment: Self { + .init(rawValue: "appStoreVersionExperiment") + } + + public static var appStoreVersionExperimentTreatmentLocalizations: Self { + .init(rawValue: "appStoreVersionExperimentTreatmentLocalizations") + } + + public static var appStoreVersionExperimentV2: Self { + .init(rawValue: "appStoreVersionExperimentV2") + } + + public static var name: Self { + .init(rawValue: "name") } + public static var promotedDate: Self { + .init(rawValue: "promotedDate") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "appIcon": self = .appIcon - case "appIconName": self = .appIconName - case "appStoreVersionExperiment": self = .appStoreVersionExperiment - case "appStoreVersionExperimentTreatmentLocalizations": self = .appStoreVersionExperimentTreatmentLocalizations - case "appStoreVersionExperimentV2": self = .appStoreVersionExperimentV2 - case "name": self = .name - case "promotedDate": self = .promotedDate - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum AppStoreVersionExperiments: Hashable, Codable, RawRepresentable { - case app - case appStoreVersion - case appStoreVersionExperimentTreatments - case controlVersions - case endDate - case latestControlVersion - case name - case platform - case reviewRequired - case startDate - case started - case state - case trafficProportion - case unknown(String) - - public var rawValue: String { - switch self { - case .app: return "app" - case .appStoreVersion: return "appStoreVersion" - case .appStoreVersionExperimentTreatments: return "appStoreVersionExperimentTreatments" - case .controlVersions: return "controlVersions" - case .endDate: return "endDate" - case .latestControlVersion: return "latestControlVersion" - case .name: return "name" - case .platform: return "platform" - case .reviewRequired: return "reviewRequired" - case .startDate: return "startDate" - case .started: return "started" - case .state: return "state" - case .trafficProportion: return "trafficProportion" - case .unknown(let rawValue): return rawValue - } + public struct AppStoreVersionExperiments: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var app: Self { + .init(rawValue: "app") + } + + public static var appStoreVersion: Self { + .init(rawValue: "appStoreVersion") + } + + public static var appStoreVersionExperimentTreatments: Self { + .init(rawValue: "appStoreVersionExperimentTreatments") + } + + public static var controlVersions: Self { + .init(rawValue: "controlVersions") + } + + public static var endDate: Self { + .init(rawValue: "endDate") + } + + public static var latestControlVersion: Self { + .init(rawValue: "latestControlVersion") + } + + public static var name: Self { + .init(rawValue: "name") + } + + public static var platform: Self { + .init(rawValue: "platform") + } + + public static var reviewRequired: Self { + .init(rawValue: "reviewRequired") + } + + public static var startDate: Self { + .init(rawValue: "startDate") } + public static var state: Self { + .init(rawValue: "state") + } + + public static var trafficProportion: Self { + .init(rawValue: "trafficProportion") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "app": self = .app - case "appStoreVersion": self = .appStoreVersion - case "appStoreVersionExperimentTreatments": self = .appStoreVersionExperimentTreatments - case "controlVersions": self = .controlVersions - case "endDate": self = .endDate - case "latestControlVersion": self = .latestControlVersion - case "name": self = .name - case "platform": self = .platform - case "reviewRequired": self = .reviewRequired - case "startDate": self = .startDate - case "started": self = .started - case "state": self = .state - case "trafficProportion": self = .trafficProportion - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } @@ -242,28 +258,27 @@ extension V2.AppStoreVersionExperiments.ById.AppStoreVersionExperimentTreatments } } - public enum Include: Hashable, Codable, RawRepresentable { - case appStoreVersionExperiment - case appStoreVersionExperimentTreatmentLocalizations - case appStoreVersionExperimentV2 - case unknown(String) + public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var appStoreVersionExperiment: Self { + .init(rawValue: "appStoreVersionExperiment") + } - public var rawValue: String { - switch self { - case .appStoreVersionExperiment: return "appStoreVersionExperiment" - case .appStoreVersionExperimentTreatmentLocalizations: return "appStoreVersionExperimentTreatmentLocalizations" - case .appStoreVersionExperimentV2: return "appStoreVersionExperimentV2" - case .unknown(let rawValue): return rawValue - } + public static var appStoreVersionExperimentTreatmentLocalizations: Self { + .init(rawValue: "appStoreVersionExperimentTreatmentLocalizations") + } + + public static var appStoreVersionExperimentV2: Self { + .init(rawValue: "appStoreVersionExperimentV2") } + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "appStoreVersionExperiment": self = .appStoreVersionExperiment - case "appStoreVersionExperimentTreatmentLocalizations": self = .appStoreVersionExperimentTreatmentLocalizations - case "appStoreVersionExperimentV2": self = .appStoreVersionExperimentV2 - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/AppStoreVersionExperiments/ById/AppStoreVersionExperimentsById.DELETE.7d297f5.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/AppStoreVersionExperiments/ById/AppStoreVersionExperimentsById.DELETE.7d297f5.generated.swift index eddd87e0..5cf23250 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/AppStoreVersionExperiments/ById/AppStoreVersionExperimentsById.DELETE.7d297f5.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/AppStoreVersionExperiments/ById/AppStoreVersionExperimentsById.DELETE.7d297f5.generated.swift @@ -31,11 +31,12 @@ extension V2.AppStoreVersionExperiments.ById { return urlRequest } - /// - Returns: **204**, Success (no content) /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -43,12 +44,12 @@ extension V2.AppStoreVersionExperiments.ById { } switch urlResponse.statusCode { - case 204: - return - case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) @@ -58,6 +59,9 @@ extension V2.AppStoreVersionExperiments.ById { case 409: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/AppStoreVersionExperiments/ById/AppStoreVersionExperimentsById.GET.7d297f5.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/AppStoreVersionExperiments/ById/AppStoreVersionExperimentsById.GET.7d297f5.generated.swift index 791be975..d3993f9b 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/AppStoreVersionExperiments/ById/AppStoreVersionExperimentsById.GET.7d297f5.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/AppStoreVersionExperiments/ById/AppStoreVersionExperimentsById.GET.7d297f5.generated.swift @@ -50,8 +50,10 @@ extension V2.AppStoreVersionExperiments.ById { /// - Returns: **200**, Single AppStoreVersionExperiment as `AppStoreVersionExperimentV2Response` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -65,12 +67,18 @@ extension V2.AppStoreVersionExperiments.ById { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 404: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -95,92 +103,99 @@ extension V2.AppStoreVersionExperiments.ById.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum AppStoreVersionExperimentTreatments: Hashable, Codable, RawRepresentable { - case appIcon - case appIconName - case appStoreVersionExperiment - case appStoreVersionExperimentTreatmentLocalizations - case appStoreVersionExperimentV2 - case name - case promotedDate - case unknown(String) - - public var rawValue: String { - switch self { - case .appIcon: return "appIcon" - case .appIconName: return "appIconName" - case .appStoreVersionExperiment: return "appStoreVersionExperiment" - case .appStoreVersionExperimentTreatmentLocalizations: return "appStoreVersionExperimentTreatmentLocalizations" - case .appStoreVersionExperimentV2: return "appStoreVersionExperimentV2" - case .name: return "name" - case .promotedDate: return "promotedDate" - case .unknown(let rawValue): return rawValue - } + public struct AppStoreVersionExperimentTreatments: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var appIcon: Self { + .init(rawValue: "appIcon") + } + + public static var appIconName: Self { + .init(rawValue: "appIconName") + } + + public static var appStoreVersionExperiment: Self { + .init(rawValue: "appStoreVersionExperiment") + } + + public static var appStoreVersionExperimentTreatmentLocalizations: Self { + .init(rawValue: "appStoreVersionExperimentTreatmentLocalizations") + } + + public static var appStoreVersionExperimentV2: Self { + .init(rawValue: "appStoreVersionExperimentV2") + } + + public static var name: Self { + .init(rawValue: "name") } + public static var promotedDate: Self { + .init(rawValue: "promotedDate") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "appIcon": self = .appIcon - case "appIconName": self = .appIconName - case "appStoreVersionExperiment": self = .appStoreVersionExperiment - case "appStoreVersionExperimentTreatmentLocalizations": self = .appStoreVersionExperimentTreatmentLocalizations - case "appStoreVersionExperimentV2": self = .appStoreVersionExperimentV2 - case "name": self = .name - case "promotedDate": self = .promotedDate - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum AppStoreVersionExperiments: Hashable, Codable, RawRepresentable { - case app - case appStoreVersionExperimentTreatments - case controlVersions - case endDate - case latestControlVersion - case name - case platform - case reviewRequired - case startDate - case started - case state - case trafficProportion - case unknown(String) - - public var rawValue: String { - switch self { - case .app: return "app" - case .appStoreVersionExperimentTreatments: return "appStoreVersionExperimentTreatments" - case .controlVersions: return "controlVersions" - case .endDate: return "endDate" - case .latestControlVersion: return "latestControlVersion" - case .name: return "name" - case .platform: return "platform" - case .reviewRequired: return "reviewRequired" - case .startDate: return "startDate" - case .started: return "started" - case .state: return "state" - case .trafficProportion: return "trafficProportion" - case .unknown(let rawValue): return rawValue - } + public struct AppStoreVersionExperiments: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var app: Self { + .init(rawValue: "app") + } + + public static var appStoreVersionExperimentTreatments: Self { + .init(rawValue: "appStoreVersionExperimentTreatments") + } + + public static var controlVersions: Self { + .init(rawValue: "controlVersions") + } + + public static var endDate: Self { + .init(rawValue: "endDate") + } + + public static var latestControlVersion: Self { + .init(rawValue: "latestControlVersion") } + public static var name: Self { + .init(rawValue: "name") + } + + public static var platform: Self { + .init(rawValue: "platform") + } + + public static var reviewRequired: Self { + .init(rawValue: "reviewRequired") + } + + public static var startDate: Self { + .init(rawValue: "startDate") + } + + public static var state: Self { + .init(rawValue: "state") + } + + public static var trafficProportion: Self { + .init(rawValue: "trafficProportion") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "app": self = .app - case "appStoreVersionExperimentTreatments": self = .appStoreVersionExperimentTreatments - case "controlVersions": self = .controlVersions - case "endDate": self = .endDate - case "latestControlVersion": self = .latestControlVersion - case "name": self = .name - case "platform": self = .platform - case "reviewRequired": self = .reviewRequired - case "startDate": self = .startDate - case "started": self = .started - case "state": self = .state - case "trafficProportion": self = .trafficProportion - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } @@ -203,31 +218,31 @@ extension V2.AppStoreVersionExperiments.ById.GET { } } - public enum Include: Hashable, Codable, RawRepresentable { - case app - case appStoreVersionExperimentTreatments - case controlVersions - case latestControlVersion - case unknown(String) - - public var rawValue: String { - switch self { - case .app: return "app" - case .appStoreVersionExperimentTreatments: return "appStoreVersionExperimentTreatments" - case .controlVersions: return "controlVersions" - case .latestControlVersion: return "latestControlVersion" - case .unknown(let rawValue): return rawValue - } + public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var app: Self { + .init(rawValue: "app") + } + + public static var appStoreVersionExperimentTreatments: Self { + .init(rawValue: "appStoreVersionExperimentTreatments") + } + + public static var controlVersions: Self { + .init(rawValue: "controlVersions") } + public static var latestControlVersion: Self { + .init(rawValue: "latestControlVersion") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "app": self = .app - case "appStoreVersionExperimentTreatments": self = .appStoreVersionExperimentTreatments - case "controlVersions": self = .controlVersions - case "latestControlVersion": self = .latestControlVersion - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/AppStoreVersionExperiments/ById/AppStoreVersionExperimentsById.PATCH.7d297f5.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/AppStoreVersionExperiments/ById/AppStoreVersionExperimentsById.PATCH.7d297f5.generated.swift index 94244988..de5996df 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/AppStoreVersionExperiments/ById/AppStoreVersionExperimentsById.PATCH.7d297f5.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/AppStoreVersionExperiments/ById/AppStoreVersionExperimentsById.PATCH.7d297f5.generated.swift @@ -48,9 +48,12 @@ extension V2.AppStoreVersionExperiments.ById { /// - Returns: **200**, Single AppStoreVersionExperiment as `AppStoreVersionExperimentV2Response` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **422**, Unprocessable request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -64,6 +67,9 @@ extension V2.AppStoreVersionExperiments.ById { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) @@ -73,6 +79,12 @@ extension V2.AppStoreVersionExperiments.ById { case 409: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 422: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/AppStoreVersionExperiments/ById/Relationships/AppStoreVersionExperimentTreatments/AppStoreVersionExperimentsByIdRelationshipsAppStoreVersionExperimentTreatments.GET.cf72947.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/AppStoreVersionExperiments/ById/Relationships/AppStoreVersionExperimentTreatments/AppStoreVersionExperimentsByIdRelationshipsAppStoreVersionExperimentTreatments.GET.cf72947.generated.swift new file mode 100644 index 00000000..5db26590 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/AppStoreVersionExperiments/ById/Relationships/AppStoreVersionExperimentTreatments/AppStoreVersionExperimentsByIdRelationshipsAppStoreVersionExperimentTreatments.GET.cf72947.generated.swift @@ -0,0 +1,88 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V2.AppStoreVersionExperiments.ById.Relationships.AppStoreVersionExperimentTreatments { + public struct GET: Endpoint { + public typealias Response = AppStoreVersionExperimentV2AppStoreVersionExperimentTreatmentsLinkagesResponse + + public var path: String { + "/v2/appStoreVersionExperiments/\(id)/relationships/appStoreVersionExperimentTreatments" + } + + /// the id of the requested resource + public var id: String + + public var parameters: Parameters = Parameters() + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + components?.queryItems = [ + URLQueryItem(name: "limit", + value: parameters.limit.map { "\($0)" }) + ].filter { $0.value != nil } + if components?.queryItems?.isEmpty ?? false { + components?.queryItems = nil + } + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "GET" + return urlRequest + } + + /// - Returns: **200**, List of related linkages as `AppStoreVersionExperimentV2AppStoreVersionExperimentTreatmentsLinkagesResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(AppStoreVersionExperimentV2AppStoreVersionExperimentTreatmentsLinkagesResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +extension V2.AppStoreVersionExperiments.ById.Relationships.AppStoreVersionExperimentTreatments.GET { + public struct Parameters: Hashable { + /// maximum resources per page + public var limit: Int? + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/InAppPurchases/ById/AppStoreReviewScreenshot/InAppPurchasesByIdAppStoreReviewScreenshot.GET.6300db3.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/InAppPurchases/ById/AppStoreReviewScreenshot/InAppPurchasesByIdAppStoreReviewScreenshot.GET.6300db3.generated.swift index 674a03f7..78e560e0 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/InAppPurchases/ById/AppStoreReviewScreenshot/InAppPurchasesByIdAppStoreReviewScreenshot.GET.6300db3.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/InAppPurchases/ById/AppStoreReviewScreenshot/InAppPurchasesByIdAppStoreReviewScreenshot.GET.6300db3.generated.swift @@ -46,8 +46,10 @@ extension V2.InAppPurchases.ById.AppStoreReviewScreenshot { /// - Returns: **200**, Single InAppPurchaseAppStoreReviewScreenshot as `InAppPurchaseAppStoreReviewScreenshotResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -61,12 +63,18 @@ extension V2.InAppPurchases.ById.AppStoreReviewScreenshot { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 404: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -89,113 +97,123 @@ extension V2.InAppPurchases.ById.AppStoreReviewScreenshot.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum InAppPurchaseAppStoreReviewScreenshots: Hashable, Codable, RawRepresentable { - case assetDeliveryState - case assetToken - case assetType - case fileName - case fileSize - case imageAsset - case inAppPurchaseV2 - case sourceFileChecksum - case uploadOperations - case uploaded - case unknown(String) - - public var rawValue: String { - switch self { - case .assetDeliveryState: return "assetDeliveryState" - case .assetToken: return "assetToken" - case .assetType: return "assetType" - case .fileName: return "fileName" - case .fileSize: return "fileSize" - case .imageAsset: return "imageAsset" - case .inAppPurchaseV2: return "inAppPurchaseV2" - case .sourceFileChecksum: return "sourceFileChecksum" - case .uploadOperations: return "uploadOperations" - case .uploaded: return "uploaded" - case .unknown(let rawValue): return rawValue - } + public struct InAppPurchaseAppStoreReviewScreenshots: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var assetDeliveryState: Self { + .init(rawValue: "assetDeliveryState") + } + + public static var assetToken: Self { + .init(rawValue: "assetToken") + } + + public static var assetType: Self { + .init(rawValue: "assetType") } + public static var fileName: Self { + .init(rawValue: "fileName") + } + + public static var fileSize: Self { + .init(rawValue: "fileSize") + } + + public static var imageAsset: Self { + .init(rawValue: "imageAsset") + } + + public static var inAppPurchaseV2: Self { + .init(rawValue: "inAppPurchaseV2") + } + + public static var sourceFileChecksum: Self { + .init(rawValue: "sourceFileChecksum") + } + + public static var uploadOperations: Self { + .init(rawValue: "uploadOperations") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "assetDeliveryState": self = .assetDeliveryState - case "assetToken": self = .assetToken - case "assetType": self = .assetType - case "fileName": self = .fileName - case "fileSize": self = .fileSize - case "imageAsset": self = .imageAsset - case "inAppPurchaseV2": self = .inAppPurchaseV2 - case "sourceFileChecksum": self = .sourceFileChecksum - case "uploadOperations": self = .uploadOperations - case "uploaded": self = .uploaded - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum InAppPurchases: Hashable, Codable, RawRepresentable { - case app - case appStoreReviewScreenshot - case availableInAllTerritories - case content - case contentHosting - case familySharable - case iapPriceSchedule - case inAppPurchaseAvailability - case inAppPurchaseLocalizations - case inAppPurchaseType - case name - case pricePoints - case productId - case promotedPurchase - case reviewNote - case state - case unknown(String) - - public var rawValue: String { - switch self { - case .app: return "app" - case .appStoreReviewScreenshot: return "appStoreReviewScreenshot" - case .availableInAllTerritories: return "availableInAllTerritories" - case .content: return "content" - case .contentHosting: return "contentHosting" - case .familySharable: return "familySharable" - case .iapPriceSchedule: return "iapPriceSchedule" - case .inAppPurchaseAvailability: return "inAppPurchaseAvailability" - case .inAppPurchaseLocalizations: return "inAppPurchaseLocalizations" - case .inAppPurchaseType: return "inAppPurchaseType" - case .name: return "name" - case .pricePoints: return "pricePoints" - case .productId: return "productId" - case .promotedPurchase: return "promotedPurchase" - case .reviewNote: return "reviewNote" - case .state: return "state" - case .unknown(let rawValue): return rawValue - } + public struct InAppPurchases: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var appStoreReviewScreenshot: Self { + .init(rawValue: "appStoreReviewScreenshot") + } + + public static var content: Self { + .init(rawValue: "content") + } + + public static var contentHosting: Self { + .init(rawValue: "contentHosting") + } + + public static var familySharable: Self { + .init(rawValue: "familySharable") } + public static var iapPriceSchedule: Self { + .init(rawValue: "iapPriceSchedule") + } + + public static var images: Self { + .init(rawValue: "images") + } + + public static var inAppPurchaseAvailability: Self { + .init(rawValue: "inAppPurchaseAvailability") + } + + public static var inAppPurchaseLocalizations: Self { + .init(rawValue: "inAppPurchaseLocalizations") + } + + public static var inAppPurchaseType: Self { + .init(rawValue: "inAppPurchaseType") + } + + public static var name: Self { + .init(rawValue: "name") + } + + public static var pricePoints: Self { + .init(rawValue: "pricePoints") + } + + public static var productId: Self { + .init(rawValue: "productId") + } + + public static var promotedPurchase: Self { + .init(rawValue: "promotedPurchase") + } + + public static var reviewNote: Self { + .init(rawValue: "reviewNote") + } + + public static var state: Self { + .init(rawValue: "state") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "app": self = .app - case "appStoreReviewScreenshot": self = .appStoreReviewScreenshot - case "availableInAllTerritories": self = .availableInAllTerritories - case "content": self = .content - case "contentHosting": self = .contentHosting - case "familySharable": self = .familySharable - case "iapPriceSchedule": self = .iapPriceSchedule - case "inAppPurchaseAvailability": self = .inAppPurchaseAvailability - case "inAppPurchaseLocalizations": self = .inAppPurchaseLocalizations - case "inAppPurchaseType": self = .inAppPurchaseType - case "name": self = .name - case "pricePoints": self = .pricePoints - case "productId": self = .productId - case "promotedPurchase": self = .promotedPurchase - case "reviewNote": self = .reviewNote - case "state": self = .state - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } @@ -218,22 +236,19 @@ extension V2.InAppPurchases.ById.AppStoreReviewScreenshot.GET { } } - public enum Include: Hashable, Codable, RawRepresentable { - case inAppPurchaseV2 - case unknown(String) + public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var inAppPurchaseV2: Self { + .init(rawValue: "inAppPurchaseV2") + } - public var rawValue: String { - switch self { - case .inAppPurchaseV2: return "inAppPurchaseV2" - case .unknown(let rawValue): return rawValue - } + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "inAppPurchaseV2": self = .inAppPurchaseV2 - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/InAppPurchases/ById/Content/InAppPurchasesByIdContent.GET.6af7bd8.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/InAppPurchases/ById/Content/InAppPurchasesByIdContent.GET.6af7bd8.generated.swift index ec000d85..d1c8e700 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/InAppPurchases/ById/Content/InAppPurchasesByIdContent.GET.6af7bd8.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/InAppPurchases/ById/Content/InAppPurchasesByIdContent.GET.6af7bd8.generated.swift @@ -46,8 +46,10 @@ extension V2.InAppPurchases.ById.Content { /// - Returns: **200**, Single InAppPurchaseContent as `InAppPurchaseContentResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -61,12 +63,18 @@ extension V2.InAppPurchases.ById.Content { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 404: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -89,98 +97,107 @@ extension V2.InAppPurchases.ById.Content.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum InAppPurchaseContents: Hashable, Codable, RawRepresentable { - case fileName - case fileSize - case inAppPurchaseV2 - case lastModifiedDate - case url - case unknown(String) - - public var rawValue: String { - switch self { - case .fileName: return "fileName" - case .fileSize: return "fileSize" - case .inAppPurchaseV2: return "inAppPurchaseV2" - case .lastModifiedDate: return "lastModifiedDate" - case .url: return "url" - case .unknown(let rawValue): return rawValue - } + public struct InAppPurchaseContents: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var fileName: Self { + .init(rawValue: "fileName") } + public static var fileSize: Self { + .init(rawValue: "fileSize") + } + + public static var inAppPurchaseV2: Self { + .init(rawValue: "inAppPurchaseV2") + } + + public static var lastModifiedDate: Self { + .init(rawValue: "lastModifiedDate") + } + + public static var url: Self { + .init(rawValue: "url") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "fileName": self = .fileName - case "fileSize": self = .fileSize - case "inAppPurchaseV2": self = .inAppPurchaseV2 - case "lastModifiedDate": self = .lastModifiedDate - case "url": self = .url - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum InAppPurchases: Hashable, Codable, RawRepresentable { - case app - case appStoreReviewScreenshot - case availableInAllTerritories - case content - case contentHosting - case familySharable - case iapPriceSchedule - case inAppPurchaseAvailability - case inAppPurchaseLocalizations - case inAppPurchaseType - case name - case pricePoints - case productId - case promotedPurchase - case reviewNote - case state - case unknown(String) - - public var rawValue: String { - switch self { - case .app: return "app" - case .appStoreReviewScreenshot: return "appStoreReviewScreenshot" - case .availableInAllTerritories: return "availableInAllTerritories" - case .content: return "content" - case .contentHosting: return "contentHosting" - case .familySharable: return "familySharable" - case .iapPriceSchedule: return "iapPriceSchedule" - case .inAppPurchaseAvailability: return "inAppPurchaseAvailability" - case .inAppPurchaseLocalizations: return "inAppPurchaseLocalizations" - case .inAppPurchaseType: return "inAppPurchaseType" - case .name: return "name" - case .pricePoints: return "pricePoints" - case .productId: return "productId" - case .promotedPurchase: return "promotedPurchase" - case .reviewNote: return "reviewNote" - case .state: return "state" - case .unknown(let rawValue): return rawValue - } + public struct InAppPurchases: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var appStoreReviewScreenshot: Self { + .init(rawValue: "appStoreReviewScreenshot") + } + + public static var content: Self { + .init(rawValue: "content") + } + + public static var contentHosting: Self { + .init(rawValue: "contentHosting") + } + + public static var familySharable: Self { + .init(rawValue: "familySharable") + } + + public static var iapPriceSchedule: Self { + .init(rawValue: "iapPriceSchedule") + } + + public static var images: Self { + .init(rawValue: "images") } + public static var inAppPurchaseAvailability: Self { + .init(rawValue: "inAppPurchaseAvailability") + } + + public static var inAppPurchaseLocalizations: Self { + .init(rawValue: "inAppPurchaseLocalizations") + } + + public static var inAppPurchaseType: Self { + .init(rawValue: "inAppPurchaseType") + } + + public static var name: Self { + .init(rawValue: "name") + } + + public static var pricePoints: Self { + .init(rawValue: "pricePoints") + } + + public static var productId: Self { + .init(rawValue: "productId") + } + + public static var promotedPurchase: Self { + .init(rawValue: "promotedPurchase") + } + + public static var reviewNote: Self { + .init(rawValue: "reviewNote") + } + + public static var state: Self { + .init(rawValue: "state") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "app": self = .app - case "appStoreReviewScreenshot": self = .appStoreReviewScreenshot - case "availableInAllTerritories": self = .availableInAllTerritories - case "content": self = .content - case "contentHosting": self = .contentHosting - case "familySharable": self = .familySharable - case "iapPriceSchedule": self = .iapPriceSchedule - case "inAppPurchaseAvailability": self = .inAppPurchaseAvailability - case "inAppPurchaseLocalizations": self = .inAppPurchaseLocalizations - case "inAppPurchaseType": self = .inAppPurchaseType - case "name": self = .name - case "pricePoints": self = .pricePoints - case "productId": self = .productId - case "promotedPurchase": self = .promotedPurchase - case "reviewNote": self = .reviewNote - case "state": self = .state - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } @@ -203,22 +220,19 @@ extension V2.InAppPurchases.ById.Content.GET { } } - public enum Include: Hashable, Codable, RawRepresentable { - case inAppPurchaseV2 - case unknown(String) + public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var inAppPurchaseV2: Self { + .init(rawValue: "inAppPurchaseV2") + } - public var rawValue: String { - switch self { - case .inAppPurchaseV2: return "inAppPurchaseV2" - case .unknown(let rawValue): return rawValue - } + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "inAppPurchaseV2": self = .inAppPurchaseV2 - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/InAppPurchases/ById/IapPriceSchedule/InAppPurchasesByIdIapPriceSchedule.GET.d11cad2.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/InAppPurchases/ById/IapPriceSchedule/InAppPurchasesByIdIapPriceSchedule.GET.d11cad2.generated.swift index 73b3e206..78cd26b5 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/InAppPurchases/ById/IapPriceSchedule/InAppPurchasesByIdIapPriceSchedule.GET.d11cad2.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/InAppPurchases/ById/IapPriceSchedule/InAppPurchasesByIdIapPriceSchedule.GET.d11cad2.generated.swift @@ -32,8 +32,6 @@ extension V2.InAppPurchases.ById.IapPriceSchedule { value: parameters.fields[.inAppPurchasePriceSchedules]?.map { "\($0)" }.joined(separator: ",")), URLQueryItem(name: "fields[inAppPurchasePrices]", value: parameters.fields[.inAppPurchasePrices]?.map { "\($0)" }.joined(separator: ",")), - URLQueryItem(name: "fields[inAppPurchases]", - value: parameters.fields[.inAppPurchases]?.map { "\($0)" }.joined(separator: ",")), URLQueryItem(name: "fields[territories]", value: parameters.fields[.territories]?.map { "\($0)" }.joined(separator: ",")), URLQueryItem(name: "include", @@ -54,8 +52,10 @@ extension V2.InAppPurchases.ById.IapPriceSchedule { /// - Returns: **200**, Single InAppPurchasePriceSchedule as `InAppPurchasePriceScheduleResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -69,12 +69,18 @@ extension V2.InAppPurchases.ById.IapPriceSchedule { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 404: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -99,148 +105,75 @@ extension V2.InAppPurchases.ById.IapPriceSchedule.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum InAppPurchasePriceSchedules: Hashable, Codable, RawRepresentable { - case automaticPrices - case baseTerritory - case inAppPurchase - case manualPrices - case unknown(String) - - public var rawValue: String { - switch self { - case .automaticPrices: return "automaticPrices" - case .baseTerritory: return "baseTerritory" - case .inAppPurchase: return "inAppPurchase" - case .manualPrices: return "manualPrices" - case .unknown(let rawValue): return rawValue - } + public struct InAppPurchasePriceSchedules: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var automaticPrices: Self { + .init(rawValue: "automaticPrices") } - public init(rawValue: String) { - switch rawValue { - case "automaticPrices": self = .automaticPrices - case "baseTerritory": self = .baseTerritory - case "inAppPurchase": self = .inAppPurchase - case "manualPrices": self = .manualPrices - default: self = .unknown(rawValue) - } + public static var baseTerritory: Self { + .init(rawValue: "baseTerritory") + } + + public static var manualPrices: Self { + .init(rawValue: "manualPrices") } - } - public enum InAppPurchasePrices: Hashable, Codable, RawRepresentable { - case endDate - case inAppPurchasePricePoint - case inAppPurchaseV2 - case manual - case startDate - case territory - case unknown(String) - - public var rawValue: String { - switch self { - case .endDate: return "endDate" - case .inAppPurchasePricePoint: return "inAppPurchasePricePoint" - case .inAppPurchaseV2: return "inAppPurchaseV2" - case .manual: return "manual" - case .startDate: return "startDate" - case .territory: return "territory" - case .unknown(let rawValue): return rawValue - } + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "endDate": self = .endDate - case "inAppPurchasePricePoint": self = .inAppPurchasePricePoint - case "inAppPurchaseV2": self = .inAppPurchaseV2 - case "manual": self = .manual - case "startDate": self = .startDate - case "territory": self = .territory - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum InAppPurchases: Hashable, Codable, RawRepresentable { - case app - case appStoreReviewScreenshot - case availableInAllTerritories - case content - case contentHosting - case familySharable - case iapPriceSchedule - case inAppPurchaseAvailability - case inAppPurchaseLocalizations - case inAppPurchaseType - case name - case pricePoints - case productId - case promotedPurchase - case reviewNote - case state - case unknown(String) - - public var rawValue: String { - switch self { - case .app: return "app" - case .appStoreReviewScreenshot: return "appStoreReviewScreenshot" - case .availableInAllTerritories: return "availableInAllTerritories" - case .content: return "content" - case .contentHosting: return "contentHosting" - case .familySharable: return "familySharable" - case .iapPriceSchedule: return "iapPriceSchedule" - case .inAppPurchaseAvailability: return "inAppPurchaseAvailability" - case .inAppPurchaseLocalizations: return "inAppPurchaseLocalizations" - case .inAppPurchaseType: return "inAppPurchaseType" - case .name: return "name" - case .pricePoints: return "pricePoints" - case .productId: return "productId" - case .promotedPurchase: return "promotedPurchase" - case .reviewNote: return "reviewNote" - case .state: return "state" - case .unknown(let rawValue): return rawValue - } + public struct InAppPurchasePrices: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var endDate: Self { + .init(rawValue: "endDate") + } + + public static var inAppPurchasePricePoint: Self { + .init(rawValue: "inAppPurchasePricePoint") + } + + public static var manual: Self { + .init(rawValue: "manual") + } + + public static var startDate: Self { + .init(rawValue: "startDate") + } + + public static var territory: Self { + .init(rawValue: "territory") } + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "app": self = .app - case "appStoreReviewScreenshot": self = .appStoreReviewScreenshot - case "availableInAllTerritories": self = .availableInAllTerritories - case "content": self = .content - case "contentHosting": self = .contentHosting - case "familySharable": self = .familySharable - case "iapPriceSchedule": self = .iapPriceSchedule - case "inAppPurchaseAvailability": self = .inAppPurchaseAvailability - case "inAppPurchaseLocalizations": self = .inAppPurchaseLocalizations - case "inAppPurchaseType": self = .inAppPurchaseType - case "name": self = .name - case "pricePoints": self = .pricePoints - case "productId": self = .productId - case "promotedPurchase": self = .promotedPurchase - case "reviewNote": self = .reviewNote - case "state": self = .state - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum Territories: Hashable, Codable, RawRepresentable { - case currency - case unknown(String) + public struct Territories: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var currency: Self { + .init(rawValue: "currency") + } - public var rawValue: String { - switch self { - case .currency: return "currency" - case .unknown(let rawValue): return rawValue - } + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "currency": self = .currency - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } @@ -255,11 +188,6 @@ extension V2.InAppPurchases.ById.IapPriceSchedule.GET { .init(key: "fields[inAppPurchasePrices]") } - /// the fields to include for returned resources of type inAppPurchases - public static var inAppPurchases: Relation<[InAppPurchases]?> { - .init(key: "fields[inAppPurchases]") - } - /// the fields to include for returned resources of type territories public static var territories: Relation<[Territories]?> { .init(key: "fields[territories]") @@ -273,31 +201,27 @@ extension V2.InAppPurchases.ById.IapPriceSchedule.GET { } } - public enum Include: Hashable, Codable, RawRepresentable { - case automaticPrices - case baseTerritory - case inAppPurchase - case manualPrices - case unknown(String) - - public var rawValue: String { - switch self { - case .automaticPrices: return "automaticPrices" - case .baseTerritory: return "baseTerritory" - case .inAppPurchase: return "inAppPurchase" - case .manualPrices: return "manualPrices" - case .unknown(let rawValue): return rawValue - } + public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var automaticPrices: Self { + .init(rawValue: "automaticPrices") } + public static var baseTerritory: Self { + .init(rawValue: "baseTerritory") + } + + public static var manualPrices: Self { + .init(rawValue: "manualPrices") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "automaticPrices": self = .automaticPrices - case "baseTerritory": self = .baseTerritory - case "inAppPurchase": self = .inAppPurchase - case "manualPrices": self = .manualPrices - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/InAppPurchases/ById/Images/InAppPurchasesByIdImages.GET.95733aa.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/InAppPurchases/ById/Images/InAppPurchasesByIdImages.GET.95733aa.generated.swift new file mode 100644 index 00000000..d0344c76 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/InAppPurchases/ById/Images/InAppPurchasesByIdImages.GET.95733aa.generated.swift @@ -0,0 +1,258 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V2.InAppPurchases.ById.Images { + public struct GET: Endpoint { + public typealias Response = InAppPurchaseImagesResponse + + public var path: String { + "/v2/inAppPurchases/\(id)/images" + } + + /// the id of the requested resource + public var id: String + + public var parameters: Parameters = Parameters() + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + components?.queryItems = [ + URLQueryItem(name: "fields[inAppPurchaseImages]", + value: parameters.fields[.inAppPurchaseImages]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "fields[inAppPurchases]", + value: parameters.fields[.inAppPurchases]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "include", + value: parameters.include?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "limit", + value: parameters.limit.map { "\($0)" }) + ].filter { $0.value != nil } + if components?.queryItems?.isEmpty ?? false { + components?.queryItems = nil + } + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "GET" + return urlRequest + } + + /// - Returns: **200**, List of InAppPurchaseImages as `InAppPurchaseImagesResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(InAppPurchaseImagesResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +extension V2.InAppPurchases.ById.Images.GET { + public struct Parameters: Hashable { + public var fields: Fields = Fields() + + /// comma-separated list of relationships to include + public var include: [Include]? + + /// maximum resources per page + public var limit: Int? + + public struct Fields: Hashable { + public subscript (_ relation: Relation) -> T { + get { values[relation]?.base as! T } + set { values[relation] = AnyHashable(newValue) } + } + + private var values: [AnyHashable: AnyHashable] = [:] + + public struct InAppPurchaseImages: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var assetToken: Self { + .init(rawValue: "assetToken") + } + + public static var fileName: Self { + .init(rawValue: "fileName") + } + + public static var fileSize: Self { + .init(rawValue: "fileSize") + } + + public static var imageAsset: Self { + .init(rawValue: "imageAsset") + } + + public static var inAppPurchase: Self { + .init(rawValue: "inAppPurchase") + } + + public static var sourceFileChecksum: Self { + .init(rawValue: "sourceFileChecksum") + } + + public static var state: Self { + .init(rawValue: "state") + } + + public static var uploadOperations: Self { + .init(rawValue: "uploadOperations") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct InAppPurchases: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var appStoreReviewScreenshot: Self { + .init(rawValue: "appStoreReviewScreenshot") + } + + public static var content: Self { + .init(rawValue: "content") + } + + public static var contentHosting: Self { + .init(rawValue: "contentHosting") + } + + public static var familySharable: Self { + .init(rawValue: "familySharable") + } + + public static var iapPriceSchedule: Self { + .init(rawValue: "iapPriceSchedule") + } + + public static var images: Self { + .init(rawValue: "images") + } + + public static var inAppPurchaseAvailability: Self { + .init(rawValue: "inAppPurchaseAvailability") + } + + public static var inAppPurchaseLocalizations: Self { + .init(rawValue: "inAppPurchaseLocalizations") + } + + public static var inAppPurchaseType: Self { + .init(rawValue: "inAppPurchaseType") + } + + public static var name: Self { + .init(rawValue: "name") + } + + public static var pricePoints: Self { + .init(rawValue: "pricePoints") + } + + public static var productId: Self { + .init(rawValue: "productId") + } + + public static var promotedPurchase: Self { + .init(rawValue: "promotedPurchase") + } + + public static var reviewNote: Self { + .init(rawValue: "reviewNote") + } + + public static var state: Self { + .init(rawValue: "state") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct Relation: Hashable { + /// the fields to include for returned resources of type inAppPurchaseImages + public static var inAppPurchaseImages: Relation<[InAppPurchaseImages]?> { + .init(key: "fields[inAppPurchaseImages]") + } + + /// the fields to include for returned resources of type inAppPurchases + public static var inAppPurchases: Relation<[InAppPurchases]?> { + .init(key: "fields[inAppPurchases]") + } + + internal let key: String + + public func hash(into hasher: inout Hasher) { + hasher.combine(key) + } + } + } + + public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var inAppPurchase: Self { + .init(rawValue: "inAppPurchase") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/InAppPurchases/ById/InAppPurchaseAvailability/InAppPurchasesByIdInAppPurchaseAvailability.GET.75a89f3.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/InAppPurchases/ById/InAppPurchaseAvailability/InAppPurchasesByIdInAppPurchaseAvailability.GET.75a89f3.generated.swift index fc563eb3..626c476c 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/InAppPurchases/ById/InAppPurchaseAvailability/InAppPurchasesByIdInAppPurchaseAvailability.GET.75a89f3.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/InAppPurchases/ById/InAppPurchaseAvailability/InAppPurchasesByIdInAppPurchaseAvailability.GET.75a89f3.generated.swift @@ -48,8 +48,10 @@ extension V2.InAppPurchases.ById.InAppPurchaseAvailability { /// - Returns: **200**, Single InAppPurchaseAvailability as `InAppPurchaseAvailabilityResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -63,12 +65,18 @@ extension V2.InAppPurchases.ById.InAppPurchaseAvailability { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 404: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -93,47 +101,39 @@ extension V2.InAppPurchases.ById.InAppPurchaseAvailability.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum InAppPurchaseAvailabilities: Hashable, Codable, RawRepresentable { - case availableInNewTerritories - case availableTerritories - case inAppPurchase - case unknown(String) - - public var rawValue: String { - switch self { - case .availableInNewTerritories: return "availableInNewTerritories" - case .availableTerritories: return "availableTerritories" - case .inAppPurchase: return "inAppPurchase" - case .unknown(let rawValue): return rawValue - } + public struct InAppPurchaseAvailabilities: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var availableInNewTerritories: Self { + .init(rawValue: "availableInNewTerritories") + } + + public static var availableTerritories: Self { + .init(rawValue: "availableTerritories") + } + + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "availableInNewTerritories": self = .availableInNewTerritories - case "availableTerritories": self = .availableTerritories - case "inAppPurchase": self = .inAppPurchase - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum Territories: Hashable, Codable, RawRepresentable { - case currency - case unknown(String) + public struct Territories: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var currency: Self { + .init(rawValue: "currency") + } - public var rawValue: String { - switch self { - case .currency: return "currency" - case .unknown(let rawValue): return rawValue - } + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "currency": self = .currency - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } @@ -156,22 +156,19 @@ extension V2.InAppPurchases.ById.InAppPurchaseAvailability.GET { } } - public enum Include: Hashable, Codable, RawRepresentable { - case availableTerritories - case unknown(String) + public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var availableTerritories: Self { + .init(rawValue: "availableTerritories") + } - public var rawValue: String { - switch self { - case .availableTerritories: return "availableTerritories" - case .unknown(let rawValue): return rawValue - } + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "availableTerritories": self = .availableTerritories - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/InAppPurchases/ById/InAppPurchaseLocalizations/InAppPurchasesByIdInAppPurchaseLocalizations.GET.f825840.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/InAppPurchases/ById/InAppPurchaseLocalizations/InAppPurchasesByIdInAppPurchaseLocalizations.GET.f825840.generated.swift index 2c1f59e1..bed10ce0 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/InAppPurchases/ById/InAppPurchaseLocalizations/InAppPurchasesByIdInAppPurchaseLocalizations.GET.f825840.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/InAppPurchases/ById/InAppPurchaseLocalizations/InAppPurchasesByIdInAppPurchaseLocalizations.GET.f825840.generated.swift @@ -48,8 +48,10 @@ extension V2.InAppPurchases.ById.InAppPurchaseLocalizations { /// - Returns: **200**, List of InAppPurchaseLocalizations as `InAppPurchaseLocalizationsResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -63,12 +65,18 @@ extension V2.InAppPurchases.ById.InAppPurchaseLocalizations { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 404: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -94,98 +102,107 @@ extension V2.InAppPurchases.ById.InAppPurchaseLocalizations.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum InAppPurchaseLocalizations: Hashable, Codable, RawRepresentable { - case description - case inAppPurchaseV2 - case locale - case name - case state - case unknown(String) - - public var rawValue: String { - switch self { - case .description: return "description" - case .inAppPurchaseV2: return "inAppPurchaseV2" - case .locale: return "locale" - case .name: return "name" - case .state: return "state" - case .unknown(let rawValue): return rawValue - } + public struct InAppPurchaseLocalizations: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var description: Self { + .init(rawValue: "description") } + public static var inAppPurchaseV2: Self { + .init(rawValue: "inAppPurchaseV2") + } + + public static var locale: Self { + .init(rawValue: "locale") + } + + public static var name: Self { + .init(rawValue: "name") + } + + public static var state: Self { + .init(rawValue: "state") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "description": self = .description - case "inAppPurchaseV2": self = .inAppPurchaseV2 - case "locale": self = .locale - case "name": self = .name - case "state": self = .state - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum InAppPurchases: Hashable, Codable, RawRepresentable { - case app - case appStoreReviewScreenshot - case availableInAllTerritories - case content - case contentHosting - case familySharable - case iapPriceSchedule - case inAppPurchaseAvailability - case inAppPurchaseLocalizations - case inAppPurchaseType - case name - case pricePoints - case productId - case promotedPurchase - case reviewNote - case state - case unknown(String) - - public var rawValue: String { - switch self { - case .app: return "app" - case .appStoreReviewScreenshot: return "appStoreReviewScreenshot" - case .availableInAllTerritories: return "availableInAllTerritories" - case .content: return "content" - case .contentHosting: return "contentHosting" - case .familySharable: return "familySharable" - case .iapPriceSchedule: return "iapPriceSchedule" - case .inAppPurchaseAvailability: return "inAppPurchaseAvailability" - case .inAppPurchaseLocalizations: return "inAppPurchaseLocalizations" - case .inAppPurchaseType: return "inAppPurchaseType" - case .name: return "name" - case .pricePoints: return "pricePoints" - case .productId: return "productId" - case .promotedPurchase: return "promotedPurchase" - case .reviewNote: return "reviewNote" - case .state: return "state" - case .unknown(let rawValue): return rawValue - } + public struct InAppPurchases: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var appStoreReviewScreenshot: Self { + .init(rawValue: "appStoreReviewScreenshot") + } + + public static var content: Self { + .init(rawValue: "content") + } + + public static var contentHosting: Self { + .init(rawValue: "contentHosting") + } + + public static var familySharable: Self { + .init(rawValue: "familySharable") + } + + public static var iapPriceSchedule: Self { + .init(rawValue: "iapPriceSchedule") + } + + public static var images: Self { + .init(rawValue: "images") } + public static var inAppPurchaseAvailability: Self { + .init(rawValue: "inAppPurchaseAvailability") + } + + public static var inAppPurchaseLocalizations: Self { + .init(rawValue: "inAppPurchaseLocalizations") + } + + public static var inAppPurchaseType: Self { + .init(rawValue: "inAppPurchaseType") + } + + public static var name: Self { + .init(rawValue: "name") + } + + public static var pricePoints: Self { + .init(rawValue: "pricePoints") + } + + public static var productId: Self { + .init(rawValue: "productId") + } + + public static var promotedPurchase: Self { + .init(rawValue: "promotedPurchase") + } + + public static var reviewNote: Self { + .init(rawValue: "reviewNote") + } + + public static var state: Self { + .init(rawValue: "state") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "app": self = .app - case "appStoreReviewScreenshot": self = .appStoreReviewScreenshot - case "availableInAllTerritories": self = .availableInAllTerritories - case "content": self = .content - case "contentHosting": self = .contentHosting - case "familySharable": self = .familySharable - case "iapPriceSchedule": self = .iapPriceSchedule - case "inAppPurchaseAvailability": self = .inAppPurchaseAvailability - case "inAppPurchaseLocalizations": self = .inAppPurchaseLocalizations - case "inAppPurchaseType": self = .inAppPurchaseType - case "name": self = .name - case "pricePoints": self = .pricePoints - case "productId": self = .productId - case "promotedPurchase": self = .promotedPurchase - case "reviewNote": self = .reviewNote - case "state": self = .state - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } @@ -208,22 +225,19 @@ extension V2.InAppPurchases.ById.InAppPurchaseLocalizations.GET { } } - public enum Include: Hashable, Codable, RawRepresentable { - case inAppPurchaseV2 - case unknown(String) + public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var inAppPurchaseV2: Self { + .init(rawValue: "inAppPurchaseV2") + } - public var rawValue: String { - switch self { - case .inAppPurchaseV2: return "inAppPurchaseV2" - case .unknown(let rawValue): return rawValue - } + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "inAppPurchaseV2": self = .inAppPurchaseV2 - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/InAppPurchases/ById/InAppPurchasesById.DELETE.2fb25cf.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/InAppPurchases/ById/InAppPurchasesById.DELETE.2fb25cf.generated.swift index 768ba9de..0103cf1b 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/InAppPurchases/ById/InAppPurchasesById.DELETE.2fb25cf.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/InAppPurchases/ById/InAppPurchasesById.DELETE.2fb25cf.generated.swift @@ -31,11 +31,12 @@ extension V2.InAppPurchases.ById { return urlRequest } - /// - Returns: **204**, Success (no content) /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -43,12 +44,12 @@ extension V2.InAppPurchases.ById { } switch urlResponse.statusCode { - case 204: - return - case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) @@ -58,6 +59,9 @@ extension V2.InAppPurchases.ById { case 409: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/InAppPurchases/ById/InAppPurchasesById.GET.2fb25cf.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/InAppPurchases/ById/InAppPurchasesById.GET.2fb25cf.generated.swift index 5579403a..eddfee7c 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/InAppPurchases/ById/InAppPurchasesById.GET.2fb25cf.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/InAppPurchases/ById/InAppPurchasesById.GET.2fb25cf.generated.swift @@ -34,6 +34,8 @@ extension V2.InAppPurchases.ById { value: parameters.fields[.inAppPurchaseAvailabilities]?.map { "\($0)" }.joined(separator: ",")), URLQueryItem(name: "fields[inAppPurchaseContents]", value: parameters.fields[.inAppPurchaseContents]?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "fields[inAppPurchaseImages]", + value: parameters.fields[.inAppPurchaseImages]?.map { "\($0)" }.joined(separator: ",")), URLQueryItem(name: "fields[inAppPurchaseLocalizations]", value: parameters.fields[.inAppPurchaseLocalizations]?.map { "\($0)" }.joined(separator: ",")), URLQueryItem(name: "fields[inAppPurchasePricePoints]", @@ -46,6 +48,8 @@ extension V2.InAppPurchases.ById { value: parameters.fields[.promotedPurchases]?.map { "\($0)" }.joined(separator: ",")), URLQueryItem(name: "include", value: parameters.include?.map { "\($0)" }.joined(separator: ",")), + URLQueryItem(name: "limit[images]", + value: parameters.limit[.images].map { "\($0)" }), URLQueryItem(name: "limit[inAppPurchaseLocalizations]", value: parameters.limit[.inAppPurchaseLocalizations].map { "\($0)" }), URLQueryItem(name: "limit[pricePoints]", @@ -62,8 +66,10 @@ extension V2.InAppPurchases.ById { /// - Returns: **200**, Single InAppPurchase as `InAppPurchaseV2Response` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -77,12 +83,18 @@ extension V2.InAppPurchases.ById { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 404: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -107,296 +119,335 @@ extension V2.InAppPurchases.ById.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum InAppPurchaseAppStoreReviewScreenshots: Hashable, Codable, RawRepresentable { - case assetDeliveryState - case assetToken - case assetType - case fileName - case fileSize - case imageAsset - case inAppPurchaseV2 - case sourceFileChecksum - case uploadOperations - case uploaded - case unknown(String) - - public var rawValue: String { - switch self { - case .assetDeliveryState: return "assetDeliveryState" - case .assetToken: return "assetToken" - case .assetType: return "assetType" - case .fileName: return "fileName" - case .fileSize: return "fileSize" - case .imageAsset: return "imageAsset" - case .inAppPurchaseV2: return "inAppPurchaseV2" - case .sourceFileChecksum: return "sourceFileChecksum" - case .uploadOperations: return "uploadOperations" - case .uploaded: return "uploaded" - case .unknown(let rawValue): return rawValue - } + public struct InAppPurchaseAppStoreReviewScreenshots: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var assetDeliveryState: Self { + .init(rawValue: "assetDeliveryState") + } + + public static var assetToken: Self { + .init(rawValue: "assetToken") + } + + public static var assetType: Self { + .init(rawValue: "assetType") + } + + public static var fileName: Self { + .init(rawValue: "fileName") + } + + public static var fileSize: Self { + .init(rawValue: "fileSize") + } + + public static var imageAsset: Self { + .init(rawValue: "imageAsset") + } + + public static var inAppPurchaseV2: Self { + .init(rawValue: "inAppPurchaseV2") + } + + public static var sourceFileChecksum: Self { + .init(rawValue: "sourceFileChecksum") + } + + public static var uploadOperations: Self { + .init(rawValue: "uploadOperations") + } + + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "assetDeliveryState": self = .assetDeliveryState - case "assetToken": self = .assetToken - case "assetType": self = .assetType - case "fileName": self = .fileName - case "fileSize": self = .fileSize - case "imageAsset": self = .imageAsset - case "inAppPurchaseV2": self = .inAppPurchaseV2 - case "sourceFileChecksum": self = .sourceFileChecksum - case "uploadOperations": self = .uploadOperations - case "uploaded": self = .uploaded - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum InAppPurchaseAvailabilities: Hashable, Codable, RawRepresentable { - case availableInNewTerritories - case availableTerritories - case inAppPurchase - case unknown(String) + public struct InAppPurchaseAvailabilities: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var availableInNewTerritories: Self { + .init(rawValue: "availableInNewTerritories") + } + + public static var availableTerritories: Self { + .init(rawValue: "availableTerritories") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct InAppPurchaseContents: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var fileName: Self { + .init(rawValue: "fileName") + } + + public static var fileSize: Self { + .init(rawValue: "fileSize") + } + + public static var inAppPurchaseV2: Self { + .init(rawValue: "inAppPurchaseV2") + } + + public static var lastModifiedDate: Self { + .init(rawValue: "lastModifiedDate") + } + + public static var url: Self { + .init(rawValue: "url") + } - public var rawValue: String { - switch self { - case .availableInNewTerritories: return "availableInNewTerritories" - case .availableTerritories: return "availableTerritories" - case .inAppPurchase: return "inAppPurchase" - case .unknown(let rawValue): return rawValue - } + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "availableInNewTerritories": self = .availableInNewTerritories - case "availableTerritories": self = .availableTerritories - case "inAppPurchase": self = .inAppPurchase - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum InAppPurchaseContents: Hashable, Codable, RawRepresentable { - case fileName - case fileSize - case inAppPurchaseV2 - case lastModifiedDate - case url - case unknown(String) - - public var rawValue: String { - switch self { - case .fileName: return "fileName" - case .fileSize: return "fileSize" - case .inAppPurchaseV2: return "inAppPurchaseV2" - case .lastModifiedDate: return "lastModifiedDate" - case .url: return "url" - case .unknown(let rawValue): return rawValue - } + public struct InAppPurchaseImages: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var assetToken: Self { + .init(rawValue: "assetToken") + } + + public static var fileName: Self { + .init(rawValue: "fileName") + } + + public static var fileSize: Self { + .init(rawValue: "fileSize") + } + + public static var imageAsset: Self { + .init(rawValue: "imageAsset") + } + + public static var inAppPurchase: Self { + .init(rawValue: "inAppPurchase") + } + + public static var sourceFileChecksum: Self { + .init(rawValue: "sourceFileChecksum") + } + + public static var state: Self { + .init(rawValue: "state") + } + + public static var uploadOperations: Self { + .init(rawValue: "uploadOperations") + } + + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "fileName": self = .fileName - case "fileSize": self = .fileSize - case "inAppPurchaseV2": self = .inAppPurchaseV2 - case "lastModifiedDate": self = .lastModifiedDate - case "url": self = .url - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum InAppPurchaseLocalizations: Hashable, Codable, RawRepresentable { - case description - case inAppPurchaseV2 - case locale - case name - case state - case unknown(String) - - public var rawValue: String { - switch self { - case .description: return "description" - case .inAppPurchaseV2: return "inAppPurchaseV2" - case .locale: return "locale" - case .name: return "name" - case .state: return "state" - case .unknown(let rawValue): return rawValue - } + public struct InAppPurchaseLocalizations: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var description: Self { + .init(rawValue: "description") + } + + public static var inAppPurchaseV2: Self { + .init(rawValue: "inAppPurchaseV2") + } + + public static var locale: Self { + .init(rawValue: "locale") + } + + public static var name: Self { + .init(rawValue: "name") } + public static var state: Self { + .init(rawValue: "state") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "description": self = .description - case "inAppPurchaseV2": self = .inAppPurchaseV2 - case "locale": self = .locale - case "name": self = .name - case "state": self = .state - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum InAppPurchasePricePoints: Hashable, Codable, RawRepresentable { - case customerPrice - case inAppPurchaseV2 - case priceTier - case proceeds - case territory - case unknown(String) - - public var rawValue: String { - switch self { - case .customerPrice: return "customerPrice" - case .inAppPurchaseV2: return "inAppPurchaseV2" - case .priceTier: return "priceTier" - case .proceeds: return "proceeds" - case .territory: return "territory" - case .unknown(let rawValue): return rawValue - } + public struct InAppPurchasePricePoints: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var customerPrice: Self { + .init(rawValue: "customerPrice") + } + + public static var equalizations: Self { + .init(rawValue: "equalizations") + } + + public static var proceeds: Self { + .init(rawValue: "proceeds") } + public static var territory: Self { + .init(rawValue: "territory") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "customerPrice": self = .customerPrice - case "inAppPurchaseV2": self = .inAppPurchaseV2 - case "priceTier": self = .priceTier - case "proceeds": self = .proceeds - case "territory": self = .territory - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum InAppPurchasePriceSchedules: Hashable, Codable, RawRepresentable { - case automaticPrices - case baseTerritory - case inAppPurchase - case manualPrices - case unknown(String) + public struct InAppPurchasePriceSchedules: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var automaticPrices: Self { + .init(rawValue: "automaticPrices") + } + + public static var baseTerritory: Self { + .init(rawValue: "baseTerritory") + } + + public static var manualPrices: Self { + .init(rawValue: "manualPrices") + } - public var rawValue: String { - switch self { - case .automaticPrices: return "automaticPrices" - case .baseTerritory: return "baseTerritory" - case .inAppPurchase: return "inAppPurchase" - case .manualPrices: return "manualPrices" - case .unknown(let rawValue): return rawValue - } + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "automaticPrices": self = .automaticPrices - case "baseTerritory": self = .baseTerritory - case "inAppPurchase": self = .inAppPurchase - case "manualPrices": self = .manualPrices - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum InAppPurchases: Hashable, Codable, RawRepresentable { - case app - case appStoreReviewScreenshot - case availableInAllTerritories - case content - case contentHosting - case familySharable - case iapPriceSchedule - case inAppPurchaseAvailability - case inAppPurchaseLocalizations - case inAppPurchaseType - case name - case pricePoints - case productId - case promotedPurchase - case reviewNote - case state - case unknown(String) - - public var rawValue: String { - switch self { - case .app: return "app" - case .appStoreReviewScreenshot: return "appStoreReviewScreenshot" - case .availableInAllTerritories: return "availableInAllTerritories" - case .content: return "content" - case .contentHosting: return "contentHosting" - case .familySharable: return "familySharable" - case .iapPriceSchedule: return "iapPriceSchedule" - case .inAppPurchaseAvailability: return "inAppPurchaseAvailability" - case .inAppPurchaseLocalizations: return "inAppPurchaseLocalizations" - case .inAppPurchaseType: return "inAppPurchaseType" - case .name: return "name" - case .pricePoints: return "pricePoints" - case .productId: return "productId" - case .promotedPurchase: return "promotedPurchase" - case .reviewNote: return "reviewNote" - case .state: return "state" - case .unknown(let rawValue): return rawValue - } + public struct InAppPurchases: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var appStoreReviewScreenshot: Self { + .init(rawValue: "appStoreReviewScreenshot") + } + + public static var content: Self { + .init(rawValue: "content") + } + + public static var contentHosting: Self { + .init(rawValue: "contentHosting") + } + + public static var familySharable: Self { + .init(rawValue: "familySharable") + } + + public static var iapPriceSchedule: Self { + .init(rawValue: "iapPriceSchedule") + } + + public static var images: Self { + .init(rawValue: "images") + } + + public static var inAppPurchaseAvailability: Self { + .init(rawValue: "inAppPurchaseAvailability") + } + + public static var inAppPurchaseLocalizations: Self { + .init(rawValue: "inAppPurchaseLocalizations") + } + + public static var inAppPurchaseType: Self { + .init(rawValue: "inAppPurchaseType") + } + + public static var name: Self { + .init(rawValue: "name") + } + + public static var pricePoints: Self { + .init(rawValue: "pricePoints") + } + + public static var productId: Self { + .init(rawValue: "productId") + } + + public static var promotedPurchase: Self { + .init(rawValue: "promotedPurchase") + } + + public static var reviewNote: Self { + .init(rawValue: "reviewNote") + } + + public static var state: Self { + .init(rawValue: "state") + } + + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "app": self = .app - case "appStoreReviewScreenshot": self = .appStoreReviewScreenshot - case "availableInAllTerritories": self = .availableInAllTerritories - case "content": self = .content - case "contentHosting": self = .contentHosting - case "familySharable": self = .familySharable - case "iapPriceSchedule": self = .iapPriceSchedule - case "inAppPurchaseAvailability": self = .inAppPurchaseAvailability - case "inAppPurchaseLocalizations": self = .inAppPurchaseLocalizations - case "inAppPurchaseType": self = .inAppPurchaseType - case "name": self = .name - case "pricePoints": self = .pricePoints - case "productId": self = .productId - case "promotedPurchase": self = .promotedPurchase - case "reviewNote": self = .reviewNote - case "state": self = .state - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum PromotedPurchases: Hashable, Codable, RawRepresentable { - case app - case enabled - case inAppPurchaseV2 - case promotionImages - case state - case subscription - case visibleForAllUsers - case unknown(String) - - public var rawValue: String { - switch self { - case .app: return "app" - case .enabled: return "enabled" - case .inAppPurchaseV2: return "inAppPurchaseV2" - case .promotionImages: return "promotionImages" - case .state: return "state" - case .subscription: return "subscription" - case .visibleForAllUsers: return "visibleForAllUsers" - case .unknown(let rawValue): return rawValue - } + public struct PromotedPurchases: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var enabled: Self { + .init(rawValue: "enabled") + } + + public static var inAppPurchaseV2: Self { + .init(rawValue: "inAppPurchaseV2") + } + + public static var state: Self { + .init(rawValue: "state") + } + + public static var subscription: Self { + .init(rawValue: "subscription") } + public static var visibleForAllUsers: Self { + .init(rawValue: "visibleForAllUsers") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "app": self = .app - case "enabled": self = .enabled - case "inAppPurchaseV2": self = .inAppPurchaseV2 - case "promotionImages": self = .promotionImages - case "state": self = .state - case "subscription": self = .subscription - case "visibleForAllUsers": self = .visibleForAllUsers - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } @@ -416,6 +467,11 @@ extension V2.InAppPurchases.ById.GET { .init(key: "fields[inAppPurchaseContents]") } + /// the fields to include for returned resources of type inAppPurchaseImages + public static var inAppPurchaseImages: Relation<[InAppPurchaseImages]?> { + .init(key: "fields[inAppPurchaseImages]") + } + /// the fields to include for returned resources of type inAppPurchaseLocalizations public static var inAppPurchaseLocalizations: Relation<[InAppPurchaseLocalizations]?> { .init(key: "fields[inAppPurchaseLocalizations]") @@ -449,40 +505,47 @@ extension V2.InAppPurchases.ById.GET { } } - public enum Include: Hashable, Codable, RawRepresentable { - case appStoreReviewScreenshot - case content - case iapPriceSchedule - case inAppPurchaseAvailability - case inAppPurchaseLocalizations - case pricePoints - case promotedPurchase - case unknown(String) - - public var rawValue: String { - switch self { - case .appStoreReviewScreenshot: return "appStoreReviewScreenshot" - case .content: return "content" - case .iapPriceSchedule: return "iapPriceSchedule" - case .inAppPurchaseAvailability: return "inAppPurchaseAvailability" - case .inAppPurchaseLocalizations: return "inAppPurchaseLocalizations" - case .pricePoints: return "pricePoints" - case .promotedPurchase: return "promotedPurchase" - case .unknown(let rawValue): return rawValue - } + public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var appStoreReviewScreenshot: Self { + .init(rawValue: "appStoreReviewScreenshot") + } + + public static var content: Self { + .init(rawValue: "content") + } + + public static var iapPriceSchedule: Self { + .init(rawValue: "iapPriceSchedule") + } + + public static var images: Self { + .init(rawValue: "images") } + public static var inAppPurchaseAvailability: Self { + .init(rawValue: "inAppPurchaseAvailability") + } + + public static var inAppPurchaseLocalizations: Self { + .init(rawValue: "inAppPurchaseLocalizations") + } + + public static var pricePoints: Self { + .init(rawValue: "pricePoints") + } + + public static var promotedPurchase: Self { + .init(rawValue: "promotedPurchase") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "appStoreReviewScreenshot": self = .appStoreReviewScreenshot - case "content": self = .content - case "iapPriceSchedule": self = .iapPriceSchedule - case "inAppPurchaseAvailability": self = .inAppPurchaseAvailability - case "inAppPurchaseLocalizations": self = .inAppPurchaseLocalizations - case "pricePoints": self = .pricePoints - case "promotedPurchase": self = .promotedPurchase - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } @@ -495,6 +558,11 @@ extension V2.InAppPurchases.ById.GET { private var values: [AnyHashable: AnyHashable] = [:] public struct Relation: Hashable { + /// maximum number of related images returned (when they are included) + public static var images: Relation { + .init(key: "limit[images]") + } + /// maximum number of related inAppPurchaseLocalizations returned (when they are included) public static var inAppPurchaseLocalizations: Relation { .init(key: "limit[inAppPurchaseLocalizations]") diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/InAppPurchases/ById/InAppPurchasesById.PATCH.2fb25cf.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/InAppPurchases/ById/InAppPurchasesById.PATCH.2fb25cf.generated.swift index b246f86c..626a95a0 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/InAppPurchases/ById/InAppPurchasesById.PATCH.2fb25cf.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/InAppPurchases/ById/InAppPurchasesById.PATCH.2fb25cf.generated.swift @@ -48,9 +48,12 @@ extension V2.InAppPurchases.ById { /// - Returns: **200**, Single InAppPurchase as `InAppPurchaseV2Response` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **422**, Unprocessable request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -64,6 +67,9 @@ extension V2.InAppPurchases.ById { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) @@ -73,6 +79,12 @@ extension V2.InAppPurchases.ById { case 409: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 422: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/InAppPurchases/ById/PricePoints/InAppPurchasesByIdPricePoints.GET.27c764e.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/InAppPurchases/ById/PricePoints/InAppPurchasesByIdPricePoints.GET.27c764e.generated.swift index f9fd62bd..1005d3ed 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/InAppPurchases/ById/PricePoints/InAppPurchasesByIdPricePoints.GET.27c764e.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/InAppPurchases/ById/PricePoints/InAppPurchasesByIdPricePoints.GET.27c764e.generated.swift @@ -32,8 +32,6 @@ extension V2.InAppPurchases.ById.PricePoints { value: parameters.fields[.inAppPurchasePricePoints]?.map { "\($0)" }.joined(separator: ",")), URLQueryItem(name: "fields[territories]", value: parameters.fields[.territories]?.map { "\($0)" }.joined(separator: ",")), - URLQueryItem(name: "filter[priceTier]", - value: parameters.filter[.priceTier]?.map { "\($0)" }.joined(separator: ",")), URLQueryItem(name: "filter[territory]", value: parameters.filter[.territory]?.map { "\($0)" }.joined(separator: ",")), URLQueryItem(name: "include", @@ -52,8 +50,10 @@ extension V2.InAppPurchases.ById.PricePoints { /// - Returns: **200**, List of InAppPurchasePricePoints as `InAppPurchasePricePointsResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -67,12 +67,18 @@ extension V2.InAppPurchases.ById.PricePoints { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 404: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -100,53 +106,47 @@ extension V2.InAppPurchases.ById.PricePoints.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum InAppPurchasePricePoints: Hashable, Codable, RawRepresentable { - case customerPrice - case inAppPurchaseV2 - case priceTier - case proceeds - case territory - case unknown(String) - - public var rawValue: String { - switch self { - case .customerPrice: return "customerPrice" - case .inAppPurchaseV2: return "inAppPurchaseV2" - case .priceTier: return "priceTier" - case .proceeds: return "proceeds" - case .territory: return "territory" - case .unknown(let rawValue): return rawValue - } + public struct InAppPurchasePricePoints: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var customerPrice: Self { + .init(rawValue: "customerPrice") + } + + public static var equalizations: Self { + .init(rawValue: "equalizations") } + public static var proceeds: Self { + .init(rawValue: "proceeds") + } + + public static var territory: Self { + .init(rawValue: "territory") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "customerPrice": self = .customerPrice - case "inAppPurchaseV2": self = .inAppPurchaseV2 - case "priceTier": self = .priceTier - case "proceeds": self = .proceeds - case "territory": self = .territory - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum Territories: Hashable, Codable, RawRepresentable { - case currency - case unknown(String) + public struct Territories: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var currency: Self { + .init(rawValue: "currency") + } - public var rawValue: String { - switch self { - case .currency: return "currency" - case .unknown(let rawValue): return rawValue - } + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "currency": self = .currency - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } @@ -178,11 +178,6 @@ extension V2.InAppPurchases.ById.PricePoints.GET { private var values: [AnyHashable: AnyHashable] = [:] public struct Relation: Hashable { - /// filter by attribute 'priceTier' - public static var priceTier: Relation<[String]?> { - .init(key: "filter[priceTier]") - } - /// filter by id(s) of related 'territory' public static var territory: Relation<[String]?> { .init(key: "filter[territory]") @@ -196,22 +191,19 @@ extension V2.InAppPurchases.ById.PricePoints.GET { } } - public enum Include: Hashable, Codable, RawRepresentable { - case territory - case unknown(String) + public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var territory: Self { + .init(rawValue: "territory") + } - public var rawValue: String { - switch self { - case .territory: return "territory" - case .unknown(let rawValue): return rawValue - } + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "territory": self = .territory - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/InAppPurchases/ById/PromotedPurchase/InAppPurchasesByIdPromotedPurchase.GET.12375e3.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/InAppPurchases/ById/PromotedPurchase/InAppPurchasesByIdPromotedPurchase.GET.12375e3.generated.swift index f0b3ea29..3bdbeda8 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/InAppPurchases/ById/PromotedPurchase/InAppPurchasesByIdPromotedPurchase.GET.12375e3.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/InAppPurchases/ById/PromotedPurchase/InAppPurchasesByIdPromotedPurchase.GET.12375e3.generated.swift @@ -30,16 +30,12 @@ extension V2.InAppPurchases.ById.PromotedPurchase { components?.queryItems = [ URLQueryItem(name: "fields[inAppPurchases]", value: parameters.fields[.inAppPurchases]?.map { "\($0)" }.joined(separator: ",")), - URLQueryItem(name: "fields[promotedPurchaseImages]", - value: parameters.fields[.promotedPurchaseImages]?.map { "\($0)" }.joined(separator: ",")), URLQueryItem(name: "fields[promotedPurchases]", value: parameters.fields[.promotedPurchases]?.map { "\($0)" }.joined(separator: ",")), URLQueryItem(name: "fields[subscriptions]", value: parameters.fields[.subscriptions]?.map { "\($0)" }.joined(separator: ",")), URLQueryItem(name: "include", - value: parameters.include?.map { "\($0)" }.joined(separator: ",")), - URLQueryItem(name: "limit[promotionImages]", - value: parameters.limit[.promotionImages].map { "\($0)" }) + value: parameters.include?.map { "\($0)" }.joined(separator: ",")) ].filter { $0.value != nil } if components?.queryItems?.isEmpty ?? false { components?.queryItems = nil @@ -52,8 +48,10 @@ extension V2.InAppPurchases.ById.PromotedPurchase { /// - Returns: **200**, Single PromotedPurchase as `PromotedPurchaseResponse` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -67,12 +65,18 @@ extension V2.InAppPurchases.ById.PromotedPurchase { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 404: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -87,8 +91,6 @@ extension V2.InAppPurchases.ById.PromotedPurchase.GET { /// comma-separated list of relationships to include public var include: [Include]? - public var limit: Limit = Limit() - public struct Fields: Hashable { public subscript (_ relation: Relation) -> T { get { values[relation]?.base as! T } @@ -97,220 +99,195 @@ extension V2.InAppPurchases.ById.PromotedPurchase.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum InAppPurchases: Hashable, Codable, RawRepresentable { - case app - case appStoreReviewScreenshot - case availableInAllTerritories - case content - case contentHosting - case familySharable - case iapPriceSchedule - case inAppPurchaseAvailability - case inAppPurchaseLocalizations - case inAppPurchaseType - case name - case pricePoints - case productId - case promotedPurchase - case reviewNote - case state - case unknown(String) - - public var rawValue: String { - switch self { - case .app: return "app" - case .appStoreReviewScreenshot: return "appStoreReviewScreenshot" - case .availableInAllTerritories: return "availableInAllTerritories" - case .content: return "content" - case .contentHosting: return "contentHosting" - case .familySharable: return "familySharable" - case .iapPriceSchedule: return "iapPriceSchedule" - case .inAppPurchaseAvailability: return "inAppPurchaseAvailability" - case .inAppPurchaseLocalizations: return "inAppPurchaseLocalizations" - case .inAppPurchaseType: return "inAppPurchaseType" - case .name: return "name" - case .pricePoints: return "pricePoints" - case .productId: return "productId" - case .promotedPurchase: return "promotedPurchase" - case .reviewNote: return "reviewNote" - case .state: return "state" - case .unknown(let rawValue): return rawValue - } + public struct InAppPurchases: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var appStoreReviewScreenshot: Self { + .init(rawValue: "appStoreReviewScreenshot") } - public init(rawValue: String) { - switch rawValue { - case "app": self = .app - case "appStoreReviewScreenshot": self = .appStoreReviewScreenshot - case "availableInAllTerritories": self = .availableInAllTerritories - case "content": self = .content - case "contentHosting": self = .contentHosting - case "familySharable": self = .familySharable - case "iapPriceSchedule": self = .iapPriceSchedule - case "inAppPurchaseAvailability": self = .inAppPurchaseAvailability - case "inAppPurchaseLocalizations": self = .inAppPurchaseLocalizations - case "inAppPurchaseType": self = .inAppPurchaseType - case "name": self = .name - case "pricePoints": self = .pricePoints - case "productId": self = .productId - case "promotedPurchase": self = .promotedPurchase - case "reviewNote": self = .reviewNote - case "state": self = .state - default: self = .unknown(rawValue) - } + public static var content: Self { + .init(rawValue: "content") + } + + public static var contentHosting: Self { + .init(rawValue: "contentHosting") + } + + public static var familySharable: Self { + .init(rawValue: "familySharable") + } + + public static var iapPriceSchedule: Self { + .init(rawValue: "iapPriceSchedule") + } + + public static var images: Self { + .init(rawValue: "images") + } + + public static var inAppPurchaseAvailability: Self { + .init(rawValue: "inAppPurchaseAvailability") + } + + public static var inAppPurchaseLocalizations: Self { + .init(rawValue: "inAppPurchaseLocalizations") + } + + public static var inAppPurchaseType: Self { + .init(rawValue: "inAppPurchaseType") + } + + public static var name: Self { + .init(rawValue: "name") + } + + public static var pricePoints: Self { + .init(rawValue: "pricePoints") + } + + public static var productId: Self { + .init(rawValue: "productId") + } + + public static var promotedPurchase: Self { + .init(rawValue: "promotedPurchase") + } + + public static var reviewNote: Self { + .init(rawValue: "reviewNote") + } + + public static var state: Self { + .init(rawValue: "state") } - } - public enum PromotedPurchaseImages: Hashable, Codable, RawRepresentable { - case assetToken - case assetType - case fileName - case fileSize - case imageAsset - case promotedPurchase - case sourceFileChecksum - case state - case uploadOperations - case uploaded - case unknown(String) - - public var rawValue: String { - switch self { - case .assetToken: return "assetToken" - case .assetType: return "assetType" - case .fileName: return "fileName" - case .fileSize: return "fileSize" - case .imageAsset: return "imageAsset" - case .promotedPurchase: return "promotedPurchase" - case .sourceFileChecksum: return "sourceFileChecksum" - case .state: return "state" - case .uploadOperations: return "uploadOperations" - case .uploaded: return "uploaded" - case .unknown(let rawValue): return rawValue - } + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "assetToken": self = .assetToken - case "assetType": self = .assetType - case "fileName": self = .fileName - case "fileSize": self = .fileSize - case "imageAsset": self = .imageAsset - case "promotedPurchase": self = .promotedPurchase - case "sourceFileChecksum": self = .sourceFileChecksum - case "state": self = .state - case "uploadOperations": self = .uploadOperations - case "uploaded": self = .uploaded - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum PromotedPurchases: Hashable, Codable, RawRepresentable { - case app - case enabled - case inAppPurchaseV2 - case promotionImages - case state - case subscription - case visibleForAllUsers - case unknown(String) - - public var rawValue: String { - switch self { - case .app: return "app" - case .enabled: return "enabled" - case .inAppPurchaseV2: return "inAppPurchaseV2" - case .promotionImages: return "promotionImages" - case .state: return "state" - case .subscription: return "subscription" - case .visibleForAllUsers: return "visibleForAllUsers" - case .unknown(let rawValue): return rawValue - } + public struct PromotedPurchases: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var enabled: Self { + .init(rawValue: "enabled") + } + + public static var inAppPurchaseV2: Self { + .init(rawValue: "inAppPurchaseV2") + } + + public static var state: Self { + .init(rawValue: "state") + } + + public static var subscription: Self { + .init(rawValue: "subscription") + } + + public static var visibleForAllUsers: Self { + .init(rawValue: "visibleForAllUsers") } + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "app": self = .app - case "enabled": self = .enabled - case "inAppPurchaseV2": self = .inAppPurchaseV2 - case "promotionImages": self = .promotionImages - case "state": self = .state - case "subscription": self = .subscription - case "visibleForAllUsers": self = .visibleForAllUsers - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum Subscriptions: Hashable, Codable, RawRepresentable { - case appStoreReviewScreenshot - case availableInAllTerritories - case familySharable - case group - case groupLevel - case introductoryOffers - case name - case offerCodes - case pricePoints - case prices - case productId - case promotedPurchase - case promotionalOffers - case reviewNote - case state - case subscriptionAvailability - case subscriptionLocalizations - case subscriptionPeriod - case unknown(String) - - public var rawValue: String { - switch self { - case .appStoreReviewScreenshot: return "appStoreReviewScreenshot" - case .availableInAllTerritories: return "availableInAllTerritories" - case .familySharable: return "familySharable" - case .group: return "group" - case .groupLevel: return "groupLevel" - case .introductoryOffers: return "introductoryOffers" - case .name: return "name" - case .offerCodes: return "offerCodes" - case .pricePoints: return "pricePoints" - case .prices: return "prices" - case .productId: return "productId" - case .promotedPurchase: return "promotedPurchase" - case .promotionalOffers: return "promotionalOffers" - case .reviewNote: return "reviewNote" - case .state: return "state" - case .subscriptionAvailability: return "subscriptionAvailability" - case .subscriptionLocalizations: return "subscriptionLocalizations" - case .subscriptionPeriod: return "subscriptionPeriod" - case .unknown(let rawValue): return rawValue - } + public struct Subscriptions: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var appStoreReviewScreenshot: Self { + .init(rawValue: "appStoreReviewScreenshot") + } + + public static var familySharable: Self { + .init(rawValue: "familySharable") + } + + public static var group: Self { + .init(rawValue: "group") + } + + public static var groupLevel: Self { + .init(rawValue: "groupLevel") + } + + public static var images: Self { + .init(rawValue: "images") + } + + public static var introductoryOffers: Self { + .init(rawValue: "introductoryOffers") + } + + public static var name: Self { + .init(rawValue: "name") + } + + public static var offerCodes: Self { + .init(rawValue: "offerCodes") + } + + public static var pricePoints: Self { + .init(rawValue: "pricePoints") + } + + public static var prices: Self { + .init(rawValue: "prices") + } + + public static var productId: Self { + .init(rawValue: "productId") + } + + public static var promotedPurchase: Self { + .init(rawValue: "promotedPurchase") + } + + public static var promotionalOffers: Self { + .init(rawValue: "promotionalOffers") + } + + public static var reviewNote: Self { + .init(rawValue: "reviewNote") + } + + public static var state: Self { + .init(rawValue: "state") + } + + public static var subscriptionAvailability: Self { + .init(rawValue: "subscriptionAvailability") + } + + public static var subscriptionLocalizations: Self { + .init(rawValue: "subscriptionLocalizations") + } + + public static var subscriptionPeriod: Self { + .init(rawValue: "subscriptionPeriod") + } + + public static var winBackOffers: Self { + .init(rawValue: "winBackOffers") } + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "appStoreReviewScreenshot": self = .appStoreReviewScreenshot - case "availableInAllTerritories": self = .availableInAllTerritories - case "familySharable": self = .familySharable - case "group": self = .group - case "groupLevel": self = .groupLevel - case "introductoryOffers": self = .introductoryOffers - case "name": self = .name - case "offerCodes": self = .offerCodes - case "pricePoints": self = .pricePoints - case "prices": self = .prices - case "productId": self = .productId - case "promotedPurchase": self = .promotedPurchase - case "promotionalOffers": self = .promotionalOffers - case "reviewNote": self = .reviewNote - case "state": self = .state - case "subscriptionAvailability": self = .subscriptionAvailability - case "subscriptionLocalizations": self = .subscriptionLocalizations - case "subscriptionPeriod": self = .subscriptionPeriod - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } @@ -320,11 +297,6 @@ extension V2.InAppPurchases.ById.PromotedPurchase.GET { .init(key: "fields[inAppPurchases]") } - /// the fields to include for returned resources of type promotedPurchaseImages - public static var promotedPurchaseImages: Relation<[PromotedPurchaseImages]?> { - .init(key: "fields[promotedPurchaseImages]") - } - /// the fields to include for returned resources of type promotedPurchases public static var promotedPurchases: Relation<[PromotedPurchases]?> { .init(key: "fields[promotedPurchases]") @@ -343,50 +315,23 @@ extension V2.InAppPurchases.ById.PromotedPurchase.GET { } } - public enum Include: Hashable, Codable, RawRepresentable { - case inAppPurchaseV2 - case promotionImages - case subscription - case unknown(String) - - public var rawValue: String { - switch self { - case .inAppPurchaseV2: return "inAppPurchaseV2" - case .promotionImages: return "promotionImages" - case .subscription: return "subscription" - case .unknown(let rawValue): return rawValue - } + public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var inAppPurchaseV2: Self { + .init(rawValue: "inAppPurchaseV2") } - public init(rawValue: String) { - switch rawValue { - case "inAppPurchaseV2": self = .inAppPurchaseV2 - case "promotionImages": self = .promotionImages - case "subscription": self = .subscription - default: self = .unknown(rawValue) - } + public static var subscription: Self { + .init(rawValue: "subscription") } - } - public struct Limit: Hashable { - public subscript (_ relation: Relation) -> T { - get { values[relation]?.base as! T } - set { values[relation] = AnyHashable(newValue) } + public var description: String { + rawValue } - private var values: [AnyHashable: AnyHashable] = [:] - - public struct Relation: Hashable { - /// maximum number of related promotionImages returned (when they are included) - public static var promotionImages: Relation { - .init(key: "limit[promotionImages]") - } + public var rawValue: String - internal let key: String - - public func hash(into hasher: inout Hasher) { - hasher.combine(key) - } + public init(rawValue: String) { + self.rawValue = rawValue } } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/InAppPurchases/ById/Relationships/AppStoreReviewScreenshot/InAppPurchasesByIdRelationshipsAppStoreReviewScreenshot.GET.b420411.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/InAppPurchases/ById/Relationships/AppStoreReviewScreenshot/InAppPurchasesByIdRelationshipsAppStoreReviewScreenshot.GET.b420411.generated.swift new file mode 100644 index 00000000..e68c76ea --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/InAppPurchases/ById/Relationships/AppStoreReviewScreenshot/InAppPurchasesByIdRelationshipsAppStoreReviewScreenshot.GET.b420411.generated.swift @@ -0,0 +1,86 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V2.InAppPurchases.ById.Relationships.AppStoreReviewScreenshot { + public struct GET: Endpoint { + public typealias Response = InAppPurchaseV2AppStoreReviewScreenshotLinkageResponse + + public var path: String { + "/v2/inAppPurchases/\(id)/relationships/appStoreReviewScreenshot" + } + + /// the id of the requested resource + public var id: String + + public var parameters: Parameters = Parameters() + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + components?.queryItems = [ + + ].filter { $0.value != nil } + if components?.queryItems?.isEmpty ?? false { + components?.queryItems = nil + } + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "GET" + return urlRequest + } + + /// - Returns: **200**, Related linkage as `InAppPurchaseV2AppStoreReviewScreenshotLinkageResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(InAppPurchaseV2AppStoreReviewScreenshotLinkageResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +extension V2.InAppPurchases.ById.Relationships.AppStoreReviewScreenshot.GET { + public struct Parameters: Hashable { + + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/InAppPurchases/ById/Relationships/Content/InAppPurchasesByIdRelationshipsContent.GET.c3ea467.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/InAppPurchases/ById/Relationships/Content/InAppPurchasesByIdRelationshipsContent.GET.c3ea467.generated.swift new file mode 100644 index 00000000..7027a96a --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/InAppPurchases/ById/Relationships/Content/InAppPurchasesByIdRelationshipsContent.GET.c3ea467.generated.swift @@ -0,0 +1,86 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V2.InAppPurchases.ById.Relationships.Content { + public struct GET: Endpoint { + public typealias Response = InAppPurchaseV2ContentLinkageResponse + + public var path: String { + "/v2/inAppPurchases/\(id)/relationships/content" + } + + /// the id of the requested resource + public var id: String + + public var parameters: Parameters = Parameters() + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + components?.queryItems = [ + + ].filter { $0.value != nil } + if components?.queryItems?.isEmpty ?? false { + components?.queryItems = nil + } + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "GET" + return urlRequest + } + + /// - Returns: **200**, Related linkage as `InAppPurchaseV2ContentLinkageResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(InAppPurchaseV2ContentLinkageResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +extension V2.InAppPurchases.ById.Relationships.Content.GET { + public struct Parameters: Hashable { + + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/InAppPurchases/ById/Relationships/IapPriceSchedule/InAppPurchasesByIdRelationshipsIapPriceSchedule.GET.4ba4f50.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/InAppPurchases/ById/Relationships/IapPriceSchedule/InAppPurchasesByIdRelationshipsIapPriceSchedule.GET.4ba4f50.generated.swift new file mode 100644 index 00000000..5e63fb36 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/InAppPurchases/ById/Relationships/IapPriceSchedule/InAppPurchasesByIdRelationshipsIapPriceSchedule.GET.4ba4f50.generated.swift @@ -0,0 +1,86 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V2.InAppPurchases.ById.Relationships.IapPriceSchedule { + public struct GET: Endpoint { + public typealias Response = InAppPurchaseV2IapPriceScheduleLinkageResponse + + public var path: String { + "/v2/inAppPurchases/\(id)/relationships/iapPriceSchedule" + } + + /// the id of the requested resource + public var id: String + + public var parameters: Parameters = Parameters() + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + components?.queryItems = [ + + ].filter { $0.value != nil } + if components?.queryItems?.isEmpty ?? false { + components?.queryItems = nil + } + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "GET" + return urlRequest + } + + /// - Returns: **200**, Related linkage as `InAppPurchaseV2IapPriceScheduleLinkageResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(InAppPurchaseV2IapPriceScheduleLinkageResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +extension V2.InAppPurchases.ById.Relationships.IapPriceSchedule.GET { + public struct Parameters: Hashable { + + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/InAppPurchases/ById/Relationships/Images/InAppPurchasesByIdRelationshipsImages.GET.eadbcad.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/InAppPurchases/ById/Relationships/Images/InAppPurchasesByIdRelationshipsImages.GET.eadbcad.generated.swift new file mode 100644 index 00000000..7267e3d5 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/InAppPurchases/ById/Relationships/Images/InAppPurchasesByIdRelationshipsImages.GET.eadbcad.generated.swift @@ -0,0 +1,88 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V2.InAppPurchases.ById.Relationships.Images { + public struct GET: Endpoint { + public typealias Response = InAppPurchaseV2ImagesLinkagesResponse + + public var path: String { + "/v2/inAppPurchases/\(id)/relationships/images" + } + + /// the id of the requested resource + public var id: String + + public var parameters: Parameters = Parameters() + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + components?.queryItems = [ + URLQueryItem(name: "limit", + value: parameters.limit.map { "\($0)" }) + ].filter { $0.value != nil } + if components?.queryItems?.isEmpty ?? false { + components?.queryItems = nil + } + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "GET" + return urlRequest + } + + /// - Returns: **200**, List of related linkages as `InAppPurchaseV2ImagesLinkagesResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(InAppPurchaseV2ImagesLinkagesResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +extension V2.InAppPurchases.ById.Relationships.Images.GET { + public struct Parameters: Hashable { + /// maximum resources per page + public var limit: Int? + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/InAppPurchases/ById/Relationships/InAppPurchaseAvailability/InAppPurchasesByIdRelationshipsInAppPurchaseAvailability.GET.2cecb2a.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/InAppPurchases/ById/Relationships/InAppPurchaseAvailability/InAppPurchasesByIdRelationshipsInAppPurchaseAvailability.GET.2cecb2a.generated.swift new file mode 100644 index 00000000..508bb758 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/InAppPurchases/ById/Relationships/InAppPurchaseAvailability/InAppPurchasesByIdRelationshipsInAppPurchaseAvailability.GET.2cecb2a.generated.swift @@ -0,0 +1,86 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V2.InAppPurchases.ById.Relationships.InAppPurchaseAvailability { + public struct GET: Endpoint { + public typealias Response = InAppPurchaseV2InAppPurchaseAvailabilityLinkageResponse + + public var path: String { + "/v2/inAppPurchases/\(id)/relationships/inAppPurchaseAvailability" + } + + /// the id of the requested resource + public var id: String + + public var parameters: Parameters = Parameters() + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + components?.queryItems = [ + + ].filter { $0.value != nil } + if components?.queryItems?.isEmpty ?? false { + components?.queryItems = nil + } + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "GET" + return urlRequest + } + + /// - Returns: **200**, Related linkage as `InAppPurchaseV2InAppPurchaseAvailabilityLinkageResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(InAppPurchaseV2InAppPurchaseAvailabilityLinkageResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +extension V2.InAppPurchases.ById.Relationships.InAppPurchaseAvailability.GET { + public struct Parameters: Hashable { + + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/InAppPurchases/ById/Relationships/InAppPurchaseLocalizations/InAppPurchasesByIdRelationshipsInAppPurchaseLocalizations.GET.9ce9cf6.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/InAppPurchases/ById/Relationships/InAppPurchaseLocalizations/InAppPurchasesByIdRelationshipsInAppPurchaseLocalizations.GET.9ce9cf6.generated.swift new file mode 100644 index 00000000..b849cafe --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/InAppPurchases/ById/Relationships/InAppPurchaseLocalizations/InAppPurchasesByIdRelationshipsInAppPurchaseLocalizations.GET.9ce9cf6.generated.swift @@ -0,0 +1,88 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V2.InAppPurchases.ById.Relationships.InAppPurchaseLocalizations { + public struct GET: Endpoint { + public typealias Response = InAppPurchaseV2InAppPurchaseLocalizationsLinkagesResponse + + public var path: String { + "/v2/inAppPurchases/\(id)/relationships/inAppPurchaseLocalizations" + } + + /// the id of the requested resource + public var id: String + + public var parameters: Parameters = Parameters() + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + components?.queryItems = [ + URLQueryItem(name: "limit", + value: parameters.limit.map { "\($0)" }) + ].filter { $0.value != nil } + if components?.queryItems?.isEmpty ?? false { + components?.queryItems = nil + } + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "GET" + return urlRequest + } + + /// - Returns: **200**, List of related linkages as `InAppPurchaseV2InAppPurchaseLocalizationsLinkagesResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(InAppPurchaseV2InAppPurchaseLocalizationsLinkagesResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +extension V2.InAppPurchases.ById.Relationships.InAppPurchaseLocalizations.GET { + public struct Parameters: Hashable { + /// maximum resources per page + public var limit: Int? + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/InAppPurchases/ById/Relationships/PricePoints/InAppPurchasesByIdRelationshipsPricePoints.GET.67db2d7.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/InAppPurchases/ById/Relationships/PricePoints/InAppPurchasesByIdRelationshipsPricePoints.GET.67db2d7.generated.swift new file mode 100644 index 00000000..231ecb03 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/InAppPurchases/ById/Relationships/PricePoints/InAppPurchasesByIdRelationshipsPricePoints.GET.67db2d7.generated.swift @@ -0,0 +1,88 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V2.InAppPurchases.ById.Relationships.PricePoints { + public struct GET: Endpoint { + public typealias Response = InAppPurchaseV2PricePointsLinkagesResponse + + public var path: String { + "/v2/inAppPurchases/\(id)/relationships/pricePoints" + } + + /// the id of the requested resource + public var id: String + + public var parameters: Parameters = Parameters() + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + components?.queryItems = [ + URLQueryItem(name: "limit", + value: parameters.limit.map { "\($0)" }) + ].filter { $0.value != nil } + if components?.queryItems?.isEmpty ?? false { + components?.queryItems = nil + } + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "GET" + return urlRequest + } + + /// - Returns: **200**, List of related linkages as `InAppPurchaseV2PricePointsLinkagesResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(InAppPurchaseV2PricePointsLinkagesResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +extension V2.InAppPurchases.ById.Relationships.PricePoints.GET { + public struct Parameters: Hashable { + /// maximum resources per page + public var limit: Int? + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/InAppPurchases/ById/Relationships/PromotedPurchase/InAppPurchasesByIdRelationshipsPromotedPurchase.GET.672cf06.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/InAppPurchases/ById/Relationships/PromotedPurchase/InAppPurchasesByIdRelationshipsPromotedPurchase.GET.672cf06.generated.swift new file mode 100644 index 00000000..48b6b7f0 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/InAppPurchases/ById/Relationships/PromotedPurchase/InAppPurchasesByIdRelationshipsPromotedPurchase.GET.672cf06.generated.swift @@ -0,0 +1,86 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V2.InAppPurchases.ById.Relationships.PromotedPurchase { + public struct GET: Endpoint { + public typealias Response = InAppPurchaseV2PromotedPurchaseLinkageResponse + + public var path: String { + "/v2/inAppPurchases/\(id)/relationships/promotedPurchase" + } + + /// the id of the requested resource + public var id: String + + public var parameters: Parameters = Parameters() + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + components?.queryItems = [ + + ].filter { $0.value != nil } + if components?.queryItems?.isEmpty ?? false { + components?.queryItems = nil + } + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "GET" + return urlRequest + } + + /// - Returns: **200**, Related linkage as `InAppPurchaseV2PromotedPurchaseLinkageResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(InAppPurchaseV2PromotedPurchaseLinkageResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +extension V2.InAppPurchases.ById.Relationships.PromotedPurchase.GET { + public struct Parameters: Hashable { + + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/InAppPurchases/InAppPurchases.POST.eb03461.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/InAppPurchases/InAppPurchases.POST.eb03461.generated.swift index f6df04ca..dc0c2456 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/InAppPurchases/InAppPurchases.POST.eb03461.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/InAppPurchases/InAppPurchases.POST.eb03461.generated.swift @@ -41,8 +41,11 @@ extension V2.InAppPurchases { /// - Returns: **201**, Single InAppPurchase as `InAppPurchaseV2Response` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **422**, Unprocessable request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -56,12 +59,21 @@ extension V2.InAppPurchases { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 409: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 422: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/SandboxTesters/ById/SandboxTestersById.PATCH.483d724.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/SandboxTesters/ById/SandboxTestersById.PATCH.483d724.generated.swift index bcda6d4a..fda2d8e1 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/SandboxTesters/ById/SandboxTestersById.PATCH.483d724.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/SandboxTesters/ById/SandboxTestersById.PATCH.483d724.generated.swift @@ -48,9 +48,12 @@ extension V2.SandboxTesters.ById { /// - Returns: **200**, Single SandboxTester as `SandboxTesterV2Response` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **422**, Unprocessable request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -64,6 +67,9 @@ extension V2.SandboxTesters.ById { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) @@ -73,6 +79,12 @@ extension V2.SandboxTesters.ById { case 409: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 422: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/SandboxTesters/SandboxTesters.GET.daf1d70.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/SandboxTesters/SandboxTesters.GET.daf1d70.generated.swift index 24e8dc2e..87062311 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/SandboxTesters/SandboxTesters.GET.daf1d70.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/SandboxTesters/SandboxTesters.GET.daf1d70.generated.swift @@ -41,7 +41,9 @@ extension V2.SandboxTesters { /// - Returns: **200**, List of SandboxTesters as `SandboxTestersV2Response` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -55,9 +57,15 @@ extension V2.SandboxTesters { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -80,40 +88,43 @@ extension V2.SandboxTesters.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum SandboxTesters: Hashable, Codable, RawRepresentable { - case acAccountName - case applePayCompatible - case firstName - case interruptPurchases - case lastName - case subscriptionRenewalRate - case territory - case unknown(String) - - public var rawValue: String { - switch self { - case .acAccountName: return "acAccountName" - case .applePayCompatible: return "applePayCompatible" - case .firstName: return "firstName" - case .interruptPurchases: return "interruptPurchases" - case .lastName: return "lastName" - case .subscriptionRenewalRate: return "subscriptionRenewalRate" - case .territory: return "territory" - case .unknown(let rawValue): return rawValue - } + public struct SandboxTesters: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var acAccountName: Self { + .init(rawValue: "acAccountName") + } + + public static var applePayCompatible: Self { + .init(rawValue: "applePayCompatible") + } + + public static var firstName: Self { + .init(rawValue: "firstName") + } + + public static var interruptPurchases: Self { + .init(rawValue: "interruptPurchases") } + public static var lastName: Self { + .init(rawValue: "lastName") + } + + public static var subscriptionRenewalRate: Self { + .init(rawValue: "subscriptionRenewalRate") + } + + public static var territory: Self { + .init(rawValue: "territory") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "acAccountName": self = .acAccountName - case "applePayCompatible": self = .applePayCompatible - case "firstName": self = .firstName - case "interruptPurchases": self = .interruptPurchases - case "lastName": self = .lastName - case "subscriptionRenewalRate": self = .subscriptionRenewalRate - case "territory": self = .territory - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/SandboxTestersClearPurchaseHistoryRequest/SandboxTestersClearPurchaseHistoryRequest.POST.d4c1f1b.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/SandboxTestersClearPurchaseHistoryRequest/SandboxTestersClearPurchaseHistoryRequest.POST.d4c1f1b.generated.swift index 6be89f60..1a5a3356 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/SandboxTestersClearPurchaseHistoryRequest/SandboxTestersClearPurchaseHistoryRequest.POST.d4c1f1b.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V2/SandboxTestersClearPurchaseHistoryRequest/SandboxTestersClearPurchaseHistoryRequest.POST.d4c1f1b.generated.swift @@ -41,8 +41,11 @@ extension V2.SandboxTestersClearPurchaseHistoryRequest { /// - Returns: **201**, Single SandboxTestersClearPurchaseHistoryRequest as `SandboxTestersClearPurchaseHistoryRequestV2Response` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **409**, Request entity error(s) as `ErrorResponse` + /// - Throws: **422**, Unprocessable request entity error(s) as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -56,12 +59,21 @@ extension V2.SandboxTestersClearPurchaseHistoryRequest { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 409: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 422: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V3/AppPricePoints/ById/AppPricePointsById.GET.ad74125.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V3/AppPricePoints/ById/AppPricePointsById.GET.ad74125.generated.swift index 22ea2758..440eb13e 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V3/AppPricePoints/ById/AppPricePointsById.GET.ad74125.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V3/AppPricePoints/ById/AppPricePointsById.GET.ad74125.generated.swift @@ -44,8 +44,10 @@ extension V3.AppPricePoints.ById { /// - Returns: **200**, Single AppPricePoint as `AppPricePointV3Response` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -59,12 +61,18 @@ extension V3.AppPricePoints.ById { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 404: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -87,34 +95,35 @@ extension V3.AppPricePoints.ById.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum AppPricePoints: Hashable, Codable, RawRepresentable { - case app - case customerPrice - case equalizations - case proceeds - case territory - case unknown(String) - - public var rawValue: String { - switch self { - case .app: return "app" - case .customerPrice: return "customerPrice" - case .equalizations: return "equalizations" - case .proceeds: return "proceeds" - case .territory: return "territory" - case .unknown(let rawValue): return rawValue - } + public struct AppPricePoints: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var app: Self { + .init(rawValue: "app") + } + + public static var customerPrice: Self { + .init(rawValue: "customerPrice") } + public static var equalizations: Self { + .init(rawValue: "equalizations") + } + + public static var proceeds: Self { + .init(rawValue: "proceeds") + } + + public static var territory: Self { + .init(rawValue: "territory") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "app": self = .app - case "customerPrice": self = .customerPrice - case "equalizations": self = .equalizations - case "proceeds": self = .proceeds - case "territory": self = .territory - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } @@ -132,25 +141,23 @@ extension V3.AppPricePoints.ById.GET { } } - public enum Include: Hashable, Codable, RawRepresentable { - case app - case territory - case unknown(String) + public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var app: Self { + .init(rawValue: "app") + } + + public static var territory: Self { + .init(rawValue: "territory") + } - public var rawValue: String { - switch self { - case .app: return "app" - case .territory: return "territory" - case .unknown(let rawValue): return rawValue - } + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "app": self = .app - case "territory": self = .territory - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V3/AppPricePoints/ById/Equalizations/AppPricePointsByIdEqualizations.GET.bbad334.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V3/AppPricePoints/ById/Equalizations/AppPricePointsByIdEqualizations.GET.bbad334.generated.swift index 219d6d61..c361d2cb 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V3/AppPricePoints/ById/Equalizations/AppPricePointsByIdEqualizations.GET.bbad334.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V3/AppPricePoints/ById/Equalizations/AppPricePointsByIdEqualizations.GET.bbad334.generated.swift @@ -52,8 +52,10 @@ extension V3.AppPricePoints.ById.Equalizations { /// - Returns: **200**, List of AppPricePoints as `AppPricePointsV3Response` /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` /// - Throws: **403**, Forbidden error as `ErrorResponse` /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { var jsonDecoder: JSONDecoder { let decoder = JSONDecoder() @@ -67,12 +69,18 @@ extension V3.AppPricePoints.ById.Equalizations { case 400: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 403: throw try jsonDecoder.decode(ErrorResponse.self, from: data) case 404: throw try jsonDecoder.decode(ErrorResponse.self, from: data) + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + default: throw try jsonDecoder.decode(ErrorResponse.self, from: data) } @@ -100,201 +108,263 @@ extension V3.AppPricePoints.ById.Equalizations.GET { private var values: [AnyHashable: AnyHashable] = [:] - public enum AppPricePoints: Hashable, Codable, RawRepresentable { - case app - case customerPrice - case equalizations - case proceeds - case territory - case unknown(String) - - public var rawValue: String { - switch self { - case .app: return "app" - case .customerPrice: return "customerPrice" - case .equalizations: return "equalizations" - case .proceeds: return "proceeds" - case .territory: return "territory" - case .unknown(let rawValue): return rawValue - } + public struct AppPricePoints: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var app: Self { + .init(rawValue: "app") + } + + public static var customerPrice: Self { + .init(rawValue: "customerPrice") + } + + public static var equalizations: Self { + .init(rawValue: "equalizations") } + public static var proceeds: Self { + .init(rawValue: "proceeds") + } + + public static var territory: Self { + .init(rawValue: "territory") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "app": self = .app - case "customerPrice": self = .customerPrice - case "equalizations": self = .equalizations - case "proceeds": self = .proceeds - case "territory": self = .territory - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum Apps: Hashable, Codable, RawRepresentable { - case appAvailability - case appClips - case appCustomProductPages - case appEncryptionDeclarations - case appEvents - case appInfos - case appPricePoints - case appPriceSchedule - case appStoreVersionExperimentsV2 - case appStoreVersions - case availableInNewTerritories - case availableTerritories - case betaAppLocalizations - case betaAppReviewDetail - case betaGroups - case betaLicenseAgreement - case betaTesters - case builds - case bundleId - case ciProduct - case contentRightsDeclaration - case customerReviews - case endUserLicenseAgreement - case gameCenterDetail - case gameCenterEnabledVersions - case inAppPurchases - case inAppPurchasesV2 - case isOrEverWasMadeForKids - case name - case perfPowerMetrics - case preOrder - case preReleaseVersions - case pricePoints - case prices - case primaryLocale - case promotedPurchases - case reviewSubmissions - case sku - case subscriptionGracePeriod - case subscriptionGroups - case subscriptionStatusUrl - case subscriptionStatusUrlForSandbox - case subscriptionStatusUrlVersion - case subscriptionStatusUrlVersionForSandbox - case unknown(String) - - public var rawValue: String { - switch self { - case .appAvailability: return "appAvailability" - case .appClips: return "appClips" - case .appCustomProductPages: return "appCustomProductPages" - case .appEncryptionDeclarations: return "appEncryptionDeclarations" - case .appEvents: return "appEvents" - case .appInfos: return "appInfos" - case .appPricePoints: return "appPricePoints" - case .appPriceSchedule: return "appPriceSchedule" - case .appStoreVersionExperimentsV2: return "appStoreVersionExperimentsV2" - case .appStoreVersions: return "appStoreVersions" - case .availableInNewTerritories: return "availableInNewTerritories" - case .availableTerritories: return "availableTerritories" - case .betaAppLocalizations: return "betaAppLocalizations" - case .betaAppReviewDetail: return "betaAppReviewDetail" - case .betaGroups: return "betaGroups" - case .betaLicenseAgreement: return "betaLicenseAgreement" - case .betaTesters: return "betaTesters" - case .builds: return "builds" - case .bundleId: return "bundleId" - case .ciProduct: return "ciProduct" - case .contentRightsDeclaration: return "contentRightsDeclaration" - case .customerReviews: return "customerReviews" - case .endUserLicenseAgreement: return "endUserLicenseAgreement" - case .gameCenterDetail: return "gameCenterDetail" - case .gameCenterEnabledVersions: return "gameCenterEnabledVersions" - case .inAppPurchases: return "inAppPurchases" - case .inAppPurchasesV2: return "inAppPurchasesV2" - case .isOrEverWasMadeForKids: return "isOrEverWasMadeForKids" - case .name: return "name" - case .perfPowerMetrics: return "perfPowerMetrics" - case .preOrder: return "preOrder" - case .preReleaseVersions: return "preReleaseVersions" - case .pricePoints: return "pricePoints" - case .prices: return "prices" - case .primaryLocale: return "primaryLocale" - case .promotedPurchases: return "promotedPurchases" - case .reviewSubmissions: return "reviewSubmissions" - case .sku: return "sku" - case .subscriptionGracePeriod: return "subscriptionGracePeriod" - case .subscriptionGroups: return "subscriptionGroups" - case .subscriptionStatusUrl: return "subscriptionStatusUrl" - case .subscriptionStatusUrlForSandbox: return "subscriptionStatusUrlForSandbox" - case .subscriptionStatusUrlVersion: return "subscriptionStatusUrlVersion" - case .subscriptionStatusUrlVersionForSandbox: return "subscriptionStatusUrlVersionForSandbox" - case .unknown(let rawValue): return rawValue - } + public struct Apps: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var accessibilityDeclarations: Self { + .init(rawValue: "accessibilityDeclarations") + } + + public static var accessibilityUrl: Self { + .init(rawValue: "accessibilityUrl") + } + + public static var alternativeDistributionKey: Self { + .init(rawValue: "alternativeDistributionKey") + } + + public static var analyticsReportRequests: Self { + .init(rawValue: "analyticsReportRequests") + } + + public static var appAvailabilityV2: Self { + .init(rawValue: "appAvailabilityV2") + } + + public static var appClips: Self { + .init(rawValue: "appClips") + } + + public static var appCustomProductPages: Self { + .init(rawValue: "appCustomProductPages") + } + + public static var appEncryptionDeclarations: Self { + .init(rawValue: "appEncryptionDeclarations") + } + + public static var appEvents: Self { + .init(rawValue: "appEvents") + } + + public static var appInfos: Self { + .init(rawValue: "appInfos") + } + + public static var appPricePoints: Self { + .init(rawValue: "appPricePoints") + } + + public static var appPriceSchedule: Self { + .init(rawValue: "appPriceSchedule") + } + + public static var appStoreVersionExperimentsV2: Self { + .init(rawValue: "appStoreVersionExperimentsV2") + } + + public static var appStoreVersions: Self { + .init(rawValue: "appStoreVersions") + } + + public static var backgroundAssets: Self { + .init(rawValue: "backgroundAssets") + } + + public static var betaAppLocalizations: Self { + .init(rawValue: "betaAppLocalizations") + } + + public static var betaAppReviewDetail: Self { + .init(rawValue: "betaAppReviewDetail") + } + + public static var betaFeedbackCrashSubmissions: Self { + .init(rawValue: "betaFeedbackCrashSubmissions") + } + + public static var betaFeedbackScreenshotSubmissions: Self { + .init(rawValue: "betaFeedbackScreenshotSubmissions") + } + + public static var betaGroups: Self { + .init(rawValue: "betaGroups") + } + + public static var betaLicenseAgreement: Self { + .init(rawValue: "betaLicenseAgreement") + } + + public static var betaTesters: Self { + .init(rawValue: "betaTesters") + } + + public static var builds: Self { + .init(rawValue: "builds") + } + + public static var bundleId: Self { + .init(rawValue: "bundleId") + } + + public static var ciProduct: Self { + .init(rawValue: "ciProduct") + } + + public static var contentRightsDeclaration: Self { + .init(rawValue: "contentRightsDeclaration") + } + + public static var customerReviewSummarizations: Self { + .init(rawValue: "customerReviewSummarizations") + } + + public static var customerReviews: Self { + .init(rawValue: "customerReviews") + } + + public static var endUserLicenseAgreement: Self { + .init(rawValue: "endUserLicenseAgreement") + } + + public static var gameCenterDetail: Self { + .init(rawValue: "gameCenterDetail") + } + + public static var gameCenterEnabledVersions: Self { + .init(rawValue: "gameCenterEnabledVersions") + } + + public static var inAppPurchases: Self { + .init(rawValue: "inAppPurchases") + } + + public static var inAppPurchasesV2: Self { + .init(rawValue: "inAppPurchasesV2") + } + + public static var isOrEverWasMadeForKids: Self { + .init(rawValue: "isOrEverWasMadeForKids") + } + + public static var marketplaceSearchDetail: Self { + .init(rawValue: "marketplaceSearchDetail") + } + + public static var name: Self { + .init(rawValue: "name") + } + + public static var perfPowerMetrics: Self { + .init(rawValue: "perfPowerMetrics") + } + + public static var preReleaseVersions: Self { + .init(rawValue: "preReleaseVersions") + } + + public static var primaryLocale: Self { + .init(rawValue: "primaryLocale") + } + + public static var promotedPurchases: Self { + .init(rawValue: "promotedPurchases") } + public static var reviewSubmissions: Self { + .init(rawValue: "reviewSubmissions") + } + + public static var sku: Self { + .init(rawValue: "sku") + } + + public static var streamlinedPurchasingEnabled: Self { + .init(rawValue: "streamlinedPurchasingEnabled") + } + + public static var subscriptionGracePeriod: Self { + .init(rawValue: "subscriptionGracePeriod") + } + + public static var subscriptionGroups: Self { + .init(rawValue: "subscriptionGroups") + } + + public static var subscriptionStatusUrl: Self { + .init(rawValue: "subscriptionStatusUrl") + } + + public static var subscriptionStatusUrlForSandbox: Self { + .init(rawValue: "subscriptionStatusUrlForSandbox") + } + + public static var subscriptionStatusUrlVersion: Self { + .init(rawValue: "subscriptionStatusUrlVersion") + } + + public static var subscriptionStatusUrlVersionForSandbox: Self { + .init(rawValue: "subscriptionStatusUrlVersionForSandbox") + } + + public static var webhooks: Self { + .init(rawValue: "webhooks") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "appAvailability": self = .appAvailability - case "appClips": self = .appClips - case "appCustomProductPages": self = .appCustomProductPages - case "appEncryptionDeclarations": self = .appEncryptionDeclarations - case "appEvents": self = .appEvents - case "appInfos": self = .appInfos - case "appPricePoints": self = .appPricePoints - case "appPriceSchedule": self = .appPriceSchedule - case "appStoreVersionExperimentsV2": self = .appStoreVersionExperimentsV2 - case "appStoreVersions": self = .appStoreVersions - case "availableInNewTerritories": self = .availableInNewTerritories - case "availableTerritories": self = .availableTerritories - case "betaAppLocalizations": self = .betaAppLocalizations - case "betaAppReviewDetail": self = .betaAppReviewDetail - case "betaGroups": self = .betaGroups - case "betaLicenseAgreement": self = .betaLicenseAgreement - case "betaTesters": self = .betaTesters - case "builds": self = .builds - case "bundleId": self = .bundleId - case "ciProduct": self = .ciProduct - case "contentRightsDeclaration": self = .contentRightsDeclaration - case "customerReviews": self = .customerReviews - case "endUserLicenseAgreement": self = .endUserLicenseAgreement - case "gameCenterDetail": self = .gameCenterDetail - case "gameCenterEnabledVersions": self = .gameCenterEnabledVersions - case "inAppPurchases": self = .inAppPurchases - case "inAppPurchasesV2": self = .inAppPurchasesV2 - case "isOrEverWasMadeForKids": self = .isOrEverWasMadeForKids - case "name": self = .name - case "perfPowerMetrics": self = .perfPowerMetrics - case "preOrder": self = .preOrder - case "preReleaseVersions": self = .preReleaseVersions - case "pricePoints": self = .pricePoints - case "prices": self = .prices - case "primaryLocale": self = .primaryLocale - case "promotedPurchases": self = .promotedPurchases - case "reviewSubmissions": self = .reviewSubmissions - case "sku": self = .sku - case "subscriptionGracePeriod": self = .subscriptionGracePeriod - case "subscriptionGroups": self = .subscriptionGroups - case "subscriptionStatusUrl": self = .subscriptionStatusUrl - case "subscriptionStatusUrlForSandbox": self = .subscriptionStatusUrlForSandbox - case "subscriptionStatusUrlVersion": self = .subscriptionStatusUrlVersion - case "subscriptionStatusUrlVersionForSandbox": self = .subscriptionStatusUrlVersionForSandbox - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum Territories: Hashable, Codable, RawRepresentable { - case currency - case unknown(String) + public struct Territories: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var currency: Self { + .init(rawValue: "currency") + } - public var rawValue: String { - switch self { - case .currency: return "currency" - case .unknown(let rawValue): return rawValue - } + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "currency": self = .currency - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } @@ -344,25 +414,23 @@ extension V3.AppPricePoints.ById.Equalizations.GET { } } - public enum Include: Hashable, Codable, RawRepresentable { - case app - case territory - case unknown(String) + public struct Include: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var app: Self { + .init(rawValue: "app") + } - public var rawValue: String { - switch self { - case .app: return "app" - case .territory: return "territory" - case .unknown(let rawValue): return rawValue - } + public static var territory: Self { + .init(rawValue: "territory") } + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "app": self = .app - case "territory": self = .territory - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Endpoints/V3/AppPricePoints/ById/Relationships/Equalizations/AppPricePointsByIdRelationshipsEqualizations.GET.fd5b2b1.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V3/AppPricePoints/ById/Relationships/Equalizations/AppPricePointsByIdRelationshipsEqualizations.GET.fd5b2b1.generated.swift new file mode 100644 index 00000000..d29ba3e4 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Endpoints/V3/AppPricePoints/ById/Relationships/Equalizations/AppPricePointsByIdRelationshipsEqualizations.GET.fd5b2b1.generated.swift @@ -0,0 +1,88 @@ +// autogenerated + +// swiftlint:disable all +import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif + +extension V3.AppPricePoints.ById.Relationships.Equalizations { + public struct GET: Endpoint { + public typealias Response = AppPricePointV3EqualizationsLinkagesResponse + + public var path: String { + "/v3/appPricePoints/\(id)/relationships/equalizations" + } + + /// the id of the requested resource + public var id: String + + public var parameters: Parameters = Parameters() + + public init(id: String) { + self.id = id + } + + public func request(with baseURL: URL) throws -> URLRequest? { + var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) + components?.path = path + + components?.queryItems = [ + URLQueryItem(name: "limit", + value: parameters.limit.map { "\($0)" }) + ].filter { $0.value != nil } + if components?.queryItems?.isEmpty ?? false { + components?.queryItems = nil + } + + var urlRequest = components?.url.map { URLRequest(url: $0) } + urlRequest?.httpMethod = "GET" + return urlRequest + } + + /// - Returns: **200**, List of related linkages as `AppPricePointV3EqualizationsLinkagesResponse` + /// - Throws: **400**, Parameter error(s) as `ErrorResponse` + /// - Throws: **401**, Unauthorized error(s) as `ErrorResponse` + /// - Throws: **403**, Forbidden error as `ErrorResponse` + /// - Throws: **404**, Not found error as `ErrorResponse` + /// - Throws: **429**, Rate limit exceeded error as `ErrorResponse` + public static func response(from data: Data, urlResponse: HTTPURLResponse) throws -> Response { + var jsonDecoder: JSONDecoder { + let decoder = JSONDecoder() + return decoder + } + + switch urlResponse.statusCode { + case 200: + return try jsonDecoder.decode(AppPricePointV3EqualizationsLinkagesResponse.self, from: data) + + case 400: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 401: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 403: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 404: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + case 429: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + + default: + throw try jsonDecoder.decode(ErrorResponse.self, from: data) + } + } + } +} + +extension V3.AppPricePoints.ById.Relationships.Equalizations.GET { + public struct Parameters: Hashable { + /// maximum resources per page + public var limit: Int? + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/AccessibilityDeclaration.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/AccessibilityDeclaration.generated.swift new file mode 100644 index 00000000..6daa3728 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/AccessibilityDeclaration.generated.swift @@ -0,0 +1,127 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct AccessibilityDeclaration: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public var attributes: Attributes? + + public var links: ResourceLinks? + + public init( + id: String, + type: `Type`, + attributes: Attributes? = nil, + links: ResourceLinks? = nil + ) { + self.id = id + self.type = type + self.attributes = attributes + self.links = links + } + + private enum CodingKeys: String, CodingKey { + case id + case type + case attributes + case links + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case accessibilityDeclarations + } + + public struct Attributes: Hashable, Codable, Sendable { + public var deviceFamily: DeviceFamily? + + public var state: State? + + public var supportsAudioDescriptions: Bool? + + public var supportsCaptions: Bool? + + public var supportsDarkInterface: Bool? + + public var supportsDifferentiateWithoutColorAlone: Bool? + + public var supportsLargerText: Bool? + + public var supportsReducedMotion: Bool? + + public var supportsSufficientContrast: Bool? + + public var supportsVoiceControl: Bool? + + public var supportsVoiceover: Bool? + + public init( + deviceFamily: DeviceFamily? = nil, + state: State? = nil, + supportsAudioDescriptions: Bool? = nil, + supportsCaptions: Bool? = nil, + supportsDarkInterface: Bool? = nil, + supportsDifferentiateWithoutColorAlone: Bool? = nil, + supportsLargerText: Bool? = nil, + supportsReducedMotion: Bool? = nil, + supportsSufficientContrast: Bool? = nil, + supportsVoiceControl: Bool? = nil, + supportsVoiceover: Bool? = nil + ) { + self.deviceFamily = deviceFamily + self.state = state + self.supportsAudioDescriptions = supportsAudioDescriptions + self.supportsCaptions = supportsCaptions + self.supportsDarkInterface = supportsDarkInterface + self.supportsDifferentiateWithoutColorAlone = supportsDifferentiateWithoutColorAlone + self.supportsLargerText = supportsLargerText + self.supportsReducedMotion = supportsReducedMotion + self.supportsSufficientContrast = supportsSufficientContrast + self.supportsVoiceControl = supportsVoiceControl + self.supportsVoiceover = supportsVoiceover + } + + private enum CodingKeys: String, CodingKey { + case deviceFamily + case state + case supportsAudioDescriptions + case supportsCaptions + case supportsDarkInterface + case supportsDifferentiateWithoutColorAlone + case supportsLargerText + case supportsReducedMotion + case supportsSufficientContrast + case supportsVoiceControl + case supportsVoiceover + } + + public struct State: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var draft: Self { + .init(rawValue: "DRAFT") + } + + public static var published: Self { + .init(rawValue: "PUBLISHED") + } + + public static var replaced: Self { + .init(rawValue: "REPLACED") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Actor.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Actor.generated.swift index d7326542..febd88af 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Actor.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Actor.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct Actor: Hashable, Codable { +public struct Actor: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -31,11 +31,11 @@ public struct Actor: Hashable, Codable { case links } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case actors } - public struct Attributes: Hashable, Codable { + public struct Attributes: Hashable, Codable, Sendable { public var actorType: ActorType? public var apiKeyId: String? @@ -68,31 +68,31 @@ public struct Actor: Hashable, Codable { case userLastName } - public enum ActorType: Hashable, Codable, RawRepresentable { - case apiKey - case apple - case user - case xcodeCloud - case unknown(String) - - public var rawValue: String { - switch self { - case .apiKey: return "API_KEY" - case .apple: return "APPLE" - case .user: return "USER" - case .xcodeCloud: return "XCODE_CLOUD" - case .unknown(let rawValue): return rawValue - } + public struct ActorType: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var apiKey: Self { + .init(rawValue: "API_KEY") } + public static var apple: Self { + .init(rawValue: "APPLE") + } + + public static var user: Self { + .init(rawValue: "USER") + } + + public static var xcodeCloud: Self { + .init(rawValue: "XCODE_CLOUD") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "API_KEY": self = .apiKey - case "APPLE": self = .apple - case "USER": self = .user - case "XCODE_CLOUD": self = .xcodeCloud - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/AgeRatingDeclaration.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/AgeRatingDeclaration.generated.swift index 5bb9dff0..7dc9255b 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/AgeRatingDeclaration.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/AgeRatingDeclaration.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct AgeRatingDeclaration: Hashable, Codable { +public struct AgeRatingDeclaration: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -31,34 +31,33 @@ public struct AgeRatingDeclaration: Hashable, Codable { case links } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case ageRatingDeclarations } - public struct Attributes: Hashable, Codable { + public struct Attributes: Hashable, Codable, Sendable { public var alcoholTobaccoOrDrugUseOrReferences: AlcoholTobaccoOrDrugUseOrReferences? public var contests: Contests? public var gambling: Bool? - @available(*, deprecated) - public var gamblingAndContests: Bool? - public var gamblingSimulated: GamblingSimulated? public var horrorOrFearThemes: HorrorOrFearThemes? public var kidsAgeBand: KidsAgeBand? + public var koreaAgeRatingOverride: KoreaAgeRatingOverride? + + public var lootBox: Bool? + public var matureOrSuggestiveThemes: MatureOrSuggestiveThemes? public var medicalOrTreatmentInformation: MedicalOrTreatmentInformation? public var profanityOrCrudeHumor: ProfanityOrCrudeHumor? - public var seventeenPlus: Bool? - public var sexualContentGraphicAndNudity: SexualContentGraphicAndNudity? public var sexualContentOrNudity: SexualContentOrNudity? @@ -75,14 +74,14 @@ public struct AgeRatingDeclaration: Hashable, Codable { alcoholTobaccoOrDrugUseOrReferences: AlcoholTobaccoOrDrugUseOrReferences? = nil, contests: Contests? = nil, gambling: Bool? = nil, - gamblingAndContests: Bool? = nil, gamblingSimulated: GamblingSimulated? = nil, horrorOrFearThemes: HorrorOrFearThemes? = nil, kidsAgeBand: KidsAgeBand? = nil, + koreaAgeRatingOverride: KoreaAgeRatingOverride? = nil, + lootBox: Bool? = nil, matureOrSuggestiveThemes: MatureOrSuggestiveThemes? = nil, medicalOrTreatmentInformation: MedicalOrTreatmentInformation? = nil, profanityOrCrudeHumor: ProfanityOrCrudeHumor? = nil, - seventeenPlus: Bool? = nil, sexualContentGraphicAndNudity: SexualContentGraphicAndNudity? = nil, sexualContentOrNudity: SexualContentOrNudity? = nil, unrestrictedWebAccess: Bool? = nil, @@ -93,14 +92,14 @@ public struct AgeRatingDeclaration: Hashable, Codable { self.alcoholTobaccoOrDrugUseOrReferences = alcoholTobaccoOrDrugUseOrReferences self.contests = contests self.gambling = gambling - self.gamblingAndContests = gamblingAndContests self.gamblingSimulated = gamblingSimulated self.horrorOrFearThemes = horrorOrFearThemes self.kidsAgeBand = kidsAgeBand + self.koreaAgeRatingOverride = koreaAgeRatingOverride + self.lootBox = lootBox self.matureOrSuggestiveThemes = matureOrSuggestiveThemes self.medicalOrTreatmentInformation = medicalOrTreatmentInformation self.profanityOrCrudeHumor = profanityOrCrudeHumor - self.seventeenPlus = seventeenPlus self.sexualContentGraphicAndNudity = sexualContentGraphicAndNudity self.sexualContentOrNudity = sexualContentOrNudity self.unrestrictedWebAccess = unrestrictedWebAccess @@ -113,14 +112,14 @@ public struct AgeRatingDeclaration: Hashable, Codable { case alcoholTobaccoOrDrugUseOrReferences case contests case gambling - case gamblingAndContests case gamblingSimulated case horrorOrFearThemes case kidsAgeBand + case koreaAgeRatingOverride + case lootBox case matureOrSuggestiveThemes case medicalOrTreatmentInformation case profanityOrCrudeHumor - case seventeenPlus case sexualContentGraphicAndNudity case sexualContentOrNudity case unrestrictedWebAccess @@ -129,303 +128,219 @@ public struct AgeRatingDeclaration: Hashable, Codable { case violenceRealisticProlongedGraphicOrSadistic } - public enum AlcoholTobaccoOrDrugUseOrReferences: Hashable, Codable, RawRepresentable { - case frequentOrIntense - case infrequentOrMild - case none - case unknown(String) + public struct AlcoholTobaccoOrDrugUseOrReferences: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var none: Self { + .init(rawValue: "NONE") + } - public var rawValue: String { - switch self { - case .frequentOrIntense: return "FREQUENT_OR_INTENSE" - case .infrequentOrMild: return "INFREQUENT_OR_MILD" - case .none: return "NONE" - case .unknown(let rawValue): return rawValue - } + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "FREQUENT_OR_INTENSE": self = .frequentOrIntense - case "INFREQUENT_OR_MILD": self = .infrequentOrMild - case "NONE": self = .none - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum Contests: Hashable, Codable, RawRepresentable { - case frequentOrIntense - case infrequentOrMild - case none - case unknown(String) + public struct Contests: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var none: Self { + .init(rawValue: "NONE") + } - public var rawValue: String { - switch self { - case .frequentOrIntense: return "FREQUENT_OR_INTENSE" - case .infrequentOrMild: return "INFREQUENT_OR_MILD" - case .none: return "NONE" - case .unknown(let rawValue): return rawValue - } + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "FREQUENT_OR_INTENSE": self = .frequentOrIntense - case "INFREQUENT_OR_MILD": self = .infrequentOrMild - case "NONE": self = .none - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum GamblingSimulated: Hashable, Codable, RawRepresentable { - case frequentOrIntense - case infrequentOrMild - case none - case unknown(String) + public struct GamblingSimulated: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var none: Self { + .init(rawValue: "NONE") + } - public var rawValue: String { - switch self { - case .frequentOrIntense: return "FREQUENT_OR_INTENSE" - case .infrequentOrMild: return "INFREQUENT_OR_MILD" - case .none: return "NONE" - case .unknown(let rawValue): return rawValue - } + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "FREQUENT_OR_INTENSE": self = .frequentOrIntense - case "INFREQUENT_OR_MILD": self = .infrequentOrMild - case "NONE": self = .none - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum HorrorOrFearThemes: Hashable, Codable, RawRepresentable { - case frequentOrIntense - case infrequentOrMild - case none - case unknown(String) + public struct HorrorOrFearThemes: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var none: Self { + .init(rawValue: "NONE") + } - public var rawValue: String { - switch self { - case .frequentOrIntense: return "FREQUENT_OR_INTENSE" - case .infrequentOrMild: return "INFREQUENT_OR_MILD" - case .none: return "NONE" - case .unknown(let rawValue): return rawValue - } + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "FREQUENT_OR_INTENSE": self = .frequentOrIntense - case "INFREQUENT_OR_MILD": self = .infrequentOrMild - case "NONE": self = .none - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum MatureOrSuggestiveThemes: Hashable, Codable, RawRepresentable { - case frequentOrIntense - case infrequentOrMild - case none - case unknown(String) + public struct KoreaAgeRatingOverride: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var fifteenPlus: Self { + .init(rawValue: "FIFTEEN_PLUS") + } + + public static var nineteenPlus: Self { + .init(rawValue: "NINETEEN_PLUS") + } + + public static var none: Self { + .init(rawValue: "NONE") + } - public var rawValue: String { - switch self { - case .frequentOrIntense: return "FREQUENT_OR_INTENSE" - case .infrequentOrMild: return "INFREQUENT_OR_MILD" - case .none: return "NONE" - case .unknown(let rawValue): return rawValue - } + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "FREQUENT_OR_INTENSE": self = .frequentOrIntense - case "INFREQUENT_OR_MILD": self = .infrequentOrMild - case "NONE": self = .none - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum MedicalOrTreatmentInformation: Hashable, Codable, RawRepresentable { - case frequentOrIntense - case infrequentOrMild - case none - case unknown(String) + public struct MatureOrSuggestiveThemes: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var none: Self { + .init(rawValue: "NONE") + } - public var rawValue: String { - switch self { - case .frequentOrIntense: return "FREQUENT_OR_INTENSE" - case .infrequentOrMild: return "INFREQUENT_OR_MILD" - case .none: return "NONE" - case .unknown(let rawValue): return rawValue - } + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "FREQUENT_OR_INTENSE": self = .frequentOrIntense - case "INFREQUENT_OR_MILD": self = .infrequentOrMild - case "NONE": self = .none - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum ProfanityOrCrudeHumor: Hashable, Codable, RawRepresentable { - case frequentOrIntense - case infrequentOrMild - case none - case unknown(String) + public struct MedicalOrTreatmentInformation: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var none: Self { + .init(rawValue: "NONE") + } - public var rawValue: String { - switch self { - case .frequentOrIntense: return "FREQUENT_OR_INTENSE" - case .infrequentOrMild: return "INFREQUENT_OR_MILD" - case .none: return "NONE" - case .unknown(let rawValue): return rawValue - } + public var description: String { + rawValue } + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct ProfanityOrCrudeHumor: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var none: Self { + .init(rawValue: "NONE") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "FREQUENT_OR_INTENSE": self = .frequentOrIntense - case "INFREQUENT_OR_MILD": self = .infrequentOrMild - case "NONE": self = .none - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum SexualContentGraphicAndNudity: Hashable, Codable, RawRepresentable { - case frequentOrIntense - case infrequentOrMild - case none - case unknown(String) + public struct SexualContentGraphicAndNudity: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var none: Self { + .init(rawValue: "NONE") + } - public var rawValue: String { - switch self { - case .frequentOrIntense: return "FREQUENT_OR_INTENSE" - case .infrequentOrMild: return "INFREQUENT_OR_MILD" - case .none: return "NONE" - case .unknown(let rawValue): return rawValue - } + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "FREQUENT_OR_INTENSE": self = .frequentOrIntense - case "INFREQUENT_OR_MILD": self = .infrequentOrMild - case "NONE": self = .none - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum SexualContentOrNudity: Hashable, Codable, RawRepresentable { - case frequentOrIntense - case infrequentOrMild - case none - case unknown(String) + public struct SexualContentOrNudity: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var none: Self { + .init(rawValue: "NONE") + } - public var rawValue: String { - switch self { - case .frequentOrIntense: return "FREQUENT_OR_INTENSE" - case .infrequentOrMild: return "INFREQUENT_OR_MILD" - case .none: return "NONE" - case .unknown(let rawValue): return rawValue - } + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "FREQUENT_OR_INTENSE": self = .frequentOrIntense - case "INFREQUENT_OR_MILD": self = .infrequentOrMild - case "NONE": self = .none - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum ViolenceCartoonOrFantasy: Hashable, Codable, RawRepresentable { - case frequentOrIntense - case infrequentOrMild - case none - case unknown(String) + public struct ViolenceCartoonOrFantasy: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var none: Self { + .init(rawValue: "NONE") + } - public var rawValue: String { - switch self { - case .frequentOrIntense: return "FREQUENT_OR_INTENSE" - case .infrequentOrMild: return "INFREQUENT_OR_MILD" - case .none: return "NONE" - case .unknown(let rawValue): return rawValue - } + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "FREQUENT_OR_INTENSE": self = .frequentOrIntense - case "INFREQUENT_OR_MILD": self = .infrequentOrMild - case "NONE": self = .none - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum ViolenceRealistic: Hashable, Codable, RawRepresentable { - case frequentOrIntense - case infrequentOrMild - case none - case unknown(String) + public struct ViolenceRealistic: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var none: Self { + .init(rawValue: "NONE") + } - public var rawValue: String { - switch self { - case .frequentOrIntense: return "FREQUENT_OR_INTENSE" - case .infrequentOrMild: return "INFREQUENT_OR_MILD" - case .none: return "NONE" - case .unknown(let rawValue): return rawValue - } + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "FREQUENT_OR_INTENSE": self = .frequentOrIntense - case "INFREQUENT_OR_MILD": self = .infrequentOrMild - case "NONE": self = .none - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum ViolenceRealisticProlongedGraphicOrSadistic: Hashable, Codable, RawRepresentable { - case frequentOrIntense - case infrequentOrMild - case none - case unknown(String) + public struct ViolenceRealisticProlongedGraphicOrSadistic: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var none: Self { + .init(rawValue: "NONE") + } - public var rawValue: String { - switch self { - case .frequentOrIntense: return "FREQUENT_OR_INTENSE" - case .infrequentOrMild: return "INFREQUENT_OR_MILD" - case .none: return "NONE" - case .unknown(let rawValue): return rawValue - } + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "FREQUENT_OR_INTENSE": self = .frequentOrIntense - case "INFREQUENT_OR_MILD": self = .infrequentOrMild - case "NONE": self = .none - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/AlternativeDistributionDomain.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/AlternativeDistributionDomain.generated.swift new file mode 100644 index 00000000..6645cacb --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/AlternativeDistributionDomain.generated.swift @@ -0,0 +1,63 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct AlternativeDistributionDomain: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public var attributes: Attributes? + + public var links: ResourceLinks? + + public init( + id: String, + type: `Type`, + attributes: Attributes? = nil, + links: ResourceLinks? = nil + ) { + self.id = id + self.type = type + self.attributes = attributes + self.links = links + } + + private enum CodingKeys: String, CodingKey { + case id + case type + case attributes + case links + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case alternativeDistributionDomains + } + + public struct Attributes: Hashable, Codable, Sendable { + public var createdDate: String? + + public var domain: String? + + public var referenceName: String? + + public init( + createdDate: String? = nil, + domain: String? = nil, + referenceName: String? = nil + ) { + self.createdDate = createdDate + self.domain = domain + self.referenceName = referenceName + } + + private enum CodingKeys: String, CodingKey { + case createdDate + case domain + case referenceName + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/AlternativeDistributionKey.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/AlternativeDistributionKey.generated.swift new file mode 100644 index 00000000..66ae0d70 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/AlternativeDistributionKey.generated.swift @@ -0,0 +1,51 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct AlternativeDistributionKey: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public var attributes: Attributes? + + public var links: ResourceLinks? + + public init( + id: String, + type: `Type`, + attributes: Attributes? = nil, + links: ResourceLinks? = nil + ) { + self.id = id + self.type = type + self.attributes = attributes + self.links = links + } + + private enum CodingKeys: String, CodingKey { + case id + case type + case attributes + case links + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case alternativeDistributionKeys + } + + public struct Attributes: Hashable, Codable, Sendable { + public var publicKey: String? + + public init(publicKey: String? = nil) { + self.publicKey = publicKey + } + + private enum CodingKeys: String, CodingKey { + case publicKey + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/AppPriceTier.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/AlternativeDistributionPackage.generated.swift similarity index 57% rename from Sources/AppStoreConnectKit/autogenerated/Schemas/AppPriceTier.generated.swift rename to Sources/AppStoreConnectKit/autogenerated/Schemas/AlternativeDistributionPackage.generated.swift index 9e6a755b..659be663 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/AppPriceTier.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/AlternativeDistributionPackage.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct AppPriceTier: Hashable, Codable { +public struct AlternativeDistributionPackage: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -31,32 +31,31 @@ public struct AppPriceTier: Hashable, Codable { case links } - public enum `Type`: String, Hashable, Codable { - case appPriceTiers + public enum `Type`: String, Hashable, Codable, Sendable { + case alternativeDistributionPackages } - public struct Relationships: Hashable, Codable { - @available(*, deprecated) - public var pricePoints: PricePoints? + public struct Relationships: Hashable, Codable, Sendable { + public var versions: Versions? - public init(pricePoints: PricePoints? = nil) { - self.pricePoints = pricePoints + public init(versions: Versions? = nil) { + self.versions = versions } private enum CodingKeys: String, CodingKey { - case pricePoints + case versions } - public struct PricePoints: Hashable, Codable { + public struct Versions: Hashable, Codable, Sendable { public var data: [Data]? - public var links: Links? + public var links: RelationshipLinks? public var meta: PagingInformation? public init( data: [Data]? = nil, - links: Links? = nil, + links: RelationshipLinks? = nil, meta: PagingInformation? = nil ) { self.data = data @@ -70,7 +69,7 @@ public struct AppPriceTier: Hashable, Codable { case meta } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -88,27 +87,8 @@ public struct AppPriceTier: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { - case appPricePoints - } - } - - public struct Links: Hashable, Codable { - public var related: URL? - - public var `self`: URL? - - public init( - related: URL? = nil, - self _self: URL? = nil - ) { - self.related = related - self.`self` = _self - } - - private enum CodingKeys: String, CodingKey { - case related - case `self` = "self" + public enum `Type`: String, Hashable, Codable, Sendable { + case alternativeDistributionPackageVersions } } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/AlternativeDistributionPackageDelta.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/AlternativeDistributionPackageDelta.generated.swift new file mode 100644 index 00000000..d8a36789 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/AlternativeDistributionPackageDelta.generated.swift @@ -0,0 +1,68 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct AlternativeDistributionPackageDelta: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public var attributes: Attributes? + + public var links: ResourceLinks? + + public init( + id: String, + type: `Type`, + attributes: Attributes? = nil, + links: ResourceLinks? = nil + ) { + self.id = id + self.type = type + self.attributes = attributes + self.links = links + } + + private enum CodingKeys: String, CodingKey { + case id + case type + case attributes + case links + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case alternativeDistributionPackageDeltas + } + + public struct Attributes: Hashable, Codable, Sendable { + public var alternativeDistributionKeyBlob: String? + + public var fileChecksum: String? + + public var url: URL? + + public var urlExpirationDate: String? + + public init( + alternativeDistributionKeyBlob: String? = nil, + fileChecksum: String? = nil, + url: URL? = nil, + urlExpirationDate: String? = nil + ) { + self.alternativeDistributionKeyBlob = alternativeDistributionKeyBlob + self.fileChecksum = fileChecksum + self.url = url + self.urlExpirationDate = urlExpirationDate + } + + private enum CodingKeys: String, CodingKey { + case alternativeDistributionKeyBlob + case fileChecksum + case url + case urlExpirationDate + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/AlternativeDistributionPackageVariant.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/AlternativeDistributionPackageVariant.generated.swift new file mode 100644 index 00000000..a641d97b --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/AlternativeDistributionPackageVariant.generated.swift @@ -0,0 +1,68 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct AlternativeDistributionPackageVariant: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public var attributes: Attributes? + + public var links: ResourceLinks? + + public init( + id: String, + type: `Type`, + attributes: Attributes? = nil, + links: ResourceLinks? = nil + ) { + self.id = id + self.type = type + self.attributes = attributes + self.links = links + } + + private enum CodingKeys: String, CodingKey { + case id + case type + case attributes + case links + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case alternativeDistributionPackageVariants + } + + public struct Attributes: Hashable, Codable, Sendable { + public var alternativeDistributionKeyBlob: String? + + public var fileChecksum: String? + + public var url: URL? + + public var urlExpirationDate: String? + + public init( + alternativeDistributionKeyBlob: String? = nil, + fileChecksum: String? = nil, + url: URL? = nil, + urlExpirationDate: String? = nil + ) { + self.alternativeDistributionKeyBlob = alternativeDistributionKeyBlob + self.fileChecksum = fileChecksum + self.url = url + self.urlExpirationDate = urlExpirationDate + } + + private enum CodingKeys: String, CodingKey { + case alternativeDistributionKeyBlob + case fileChecksum + case url + case urlExpirationDate + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/AlternativeDistributionPackageVersion.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/AlternativeDistributionPackageVersion.generated.swift new file mode 100644 index 00000000..f90ac6f4 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/AlternativeDistributionPackageVersion.generated.swift @@ -0,0 +1,251 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct AlternativeDistributionPackageVersion: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public var attributes: Attributes? + + public var relationships: Relationships? + + public var links: ResourceLinks? + + public init( + id: String, + type: `Type`, + attributes: Attributes? = nil, + relationships: Relationships? = nil, + links: ResourceLinks? = nil + ) { + self.id = id + self.type = type + self.attributes = attributes + self.relationships = relationships + self.links = links + } + + private enum CodingKeys: String, CodingKey { + case id + case type + case attributes + case relationships + case links + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case alternativeDistributionPackageVersions + } + + public struct Attributes: Hashable, Codable, Sendable { + public var fileChecksum: String? + + public var state: State? + + public var url: URL? + + public var urlExpirationDate: String? + + public var version: String? + + public init( + fileChecksum: String? = nil, + state: State? = nil, + url: URL? = nil, + urlExpirationDate: String? = nil, + version: String? = nil + ) { + self.fileChecksum = fileChecksum + self.state = state + self.url = url + self.urlExpirationDate = urlExpirationDate + self.version = version + } + + private enum CodingKeys: String, CodingKey { + case fileChecksum + case state + case url + case urlExpirationDate + case version + } + + public struct State: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var completed: Self { + .init(rawValue: "COMPLETED") + } + + public static var replaced: Self { + .init(rawValue: "REPLACED") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + } + + public struct Relationships: Hashable, Codable, Sendable { + public var alternativeDistributionPackage: AlternativeDistributionPackage? + + public var deltas: Deltas? + + public var variants: Variants? + + public init( + alternativeDistributionPackage: AlternativeDistributionPackage? = nil, + deltas: Deltas? = nil, + variants: Variants? = nil + ) { + self.alternativeDistributionPackage = alternativeDistributionPackage + self.deltas = deltas + self.variants = variants + } + + private enum CodingKeys: String, CodingKey { + case alternativeDistributionPackage + case deltas + case variants + } + + public struct AlternativeDistributionPackage: Hashable, Codable, Sendable { + public var data: Data? + + public init(data: Data? = nil) { + self.data = data + } + + private enum CodingKeys: String, CodingKey { + case data + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case alternativeDistributionPackages + } + } + } + + public struct Deltas: Hashable, Codable, Sendable { + public var data: [Data]? + + public var links: RelationshipLinks? + + public var meta: PagingInformation? + + public init( + data: [Data]? = nil, + links: RelationshipLinks? = nil, + meta: PagingInformation? = nil + ) { + self.data = data + self.links = links + self.meta = meta + } + + private enum CodingKeys: String, CodingKey { + case data + case links + case meta + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case alternativeDistributionPackageDeltas + } + } + } + + public struct Variants: Hashable, Codable, Sendable { + public var data: [Data]? + + public var links: RelationshipLinks? + + public var meta: PagingInformation? + + public init( + data: [Data]? = nil, + links: RelationshipLinks? = nil, + meta: PagingInformation? = nil + ) { + self.data = data + self.links = links + self.meta = meta + } + + private enum CodingKeys: String, CodingKey { + case data + case links + case meta + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case alternativeDistributionPackageVariants + } + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/AnalyticsReport.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/AnalyticsReport.generated.swift new file mode 100644 index 00000000..f02478b1 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/AnalyticsReport.generated.swift @@ -0,0 +1,119 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct AnalyticsReport: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public var attributes: Attributes? + + public var relationships: Relationships? + + public var links: ResourceLinks? + + public init( + id: String, + type: `Type`, + attributes: Attributes? = nil, + relationships: Relationships? = nil, + links: ResourceLinks? = nil + ) { + self.id = id + self.type = type + self.attributes = attributes + self.relationships = relationships + self.links = links + } + + private enum CodingKeys: String, CodingKey { + case id + case type + case attributes + case relationships + case links + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case analyticsReports + } + + public struct Attributes: Hashable, Codable, Sendable { + public var category: Category? + + public var name: String? + + public init( + category: Category? = nil, + name: String? = nil + ) { + self.category = category + self.name = name + } + + private enum CodingKeys: String, CodingKey { + case category + case name + } + + public struct Category: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var appStoreEngagement: Self { + .init(rawValue: "APP_STORE_ENGAGEMENT") + } + + public static var appUsage: Self { + .init(rawValue: "APP_USAGE") + } + + public static var commerce: Self { + .init(rawValue: "COMMERCE") + } + + public static var frameworkUsage: Self { + .init(rawValue: "FRAMEWORK_USAGE") + } + + public static var performance: Self { + .init(rawValue: "PERFORMANCE") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + } + + public struct Relationships: Hashable, Codable, Sendable { + public var instances: Instances? + + public init(instances: Instances? = nil) { + self.instances = instances + } + + private enum CodingKeys: String, CodingKey { + case instances + } + + public struct Instances: Hashable, Codable, Sendable { + public var links: RelationshipLinks? + + public init(links: RelationshipLinks? = nil) { + self.links = links + } + + private enum CodingKeys: String, CodingKey { + case links + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/AnalyticsReportInstance.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/AnalyticsReportInstance.generated.swift new file mode 100644 index 00000000..9c21c0ae --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/AnalyticsReportInstance.generated.swift @@ -0,0 +1,111 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct AnalyticsReportInstance: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public var attributes: Attributes? + + public var relationships: Relationships? + + public var links: ResourceLinks? + + public init( + id: String, + type: `Type`, + attributes: Attributes? = nil, + relationships: Relationships? = nil, + links: ResourceLinks? = nil + ) { + self.id = id + self.type = type + self.attributes = attributes + self.relationships = relationships + self.links = links + } + + private enum CodingKeys: String, CodingKey { + case id + case type + case attributes + case relationships + case links + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case analyticsReportInstances + } + + public struct Attributes: Hashable, Codable, Sendable { + public var granularity: Granularity? + + public var processingDate: String? + + public init( + granularity: Granularity? = nil, + processingDate: String? = nil + ) { + self.granularity = granularity + self.processingDate = processingDate + } + + private enum CodingKeys: String, CodingKey { + case granularity + case processingDate + } + + public struct Granularity: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var daily: Self { + .init(rawValue: "DAILY") + } + + public static var monthly: Self { + .init(rawValue: "MONTHLY") + } + + public static var weekly: Self { + .init(rawValue: "WEEKLY") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + } + + public struct Relationships: Hashable, Codable, Sendable { + public var segments: Segments? + + public init(segments: Segments? = nil) { + self.segments = segments + } + + private enum CodingKeys: String, CodingKey { + case segments + } + + public struct Segments: Hashable, Codable, Sendable { + public var links: RelationshipLinks? + + public init(links: RelationshipLinks? = nil) { + self.links = links + } + + private enum CodingKeys: String, CodingKey { + case links + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/AnalyticsReportSegment.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/AnalyticsReportSegment.generated.swift new file mode 100644 index 00000000..49de8092 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/AnalyticsReportSegment.generated.swift @@ -0,0 +1,63 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct AnalyticsReportSegment: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public var attributes: Attributes? + + public var links: ResourceLinks? + + public init( + id: String, + type: `Type`, + attributes: Attributes? = nil, + links: ResourceLinks? = nil + ) { + self.id = id + self.type = type + self.attributes = attributes + self.links = links + } + + private enum CodingKeys: String, CodingKey { + case id + case type + case attributes + case links + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case analyticsReportSegments + } + + public struct Attributes: Hashable, Codable, Sendable { + public var checksum: String? + + public var sizeInBytes: Int? + + public var url: URL? + + public init( + checksum: String? = nil, + sizeInBytes: Int? = nil, + url: URL? = nil + ) { + self.checksum = checksum + self.sizeInBytes = sizeInBytes + self.url = url + } + + private enum CodingKeys: String, CodingKey { + case checksum + case sizeInBytes + case url + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/App.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/App.generated.swift index 20070a9a..56e79b46 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/App.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/App.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct App: Hashable, Codable { +public struct App: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -36,13 +36,12 @@ public struct App: Hashable, Codable { case links } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case apps } - public struct Attributes: Hashable, Codable { - @available(*, deprecated) - public var availableInNewTerritories: Bool? + public struct Attributes: Hashable, Codable, Sendable { + public var accessibilityUrl: URL? public var bundleId: String? @@ -56,6 +55,8 @@ public struct App: Hashable, Codable { public var sku: String? + public var streamlinedPurchasingEnabled: Bool? + public var subscriptionStatusUrl: URL? public var subscriptionStatusUrlForSandbox: URL? @@ -65,25 +66,27 @@ public struct App: Hashable, Codable { public var subscriptionStatusUrlVersionForSandbox: SubscriptionStatusUrlVersion? public init( - availableInNewTerritories: Bool? = nil, + accessibilityUrl: URL? = nil, bundleId: String? = nil, contentRightsDeclaration: ContentRightsDeclaration? = nil, isOrEverWasMadeForKids: Bool? = nil, name: String? = nil, primaryLocale: String? = nil, sku: String? = nil, + streamlinedPurchasingEnabled: Bool? = nil, subscriptionStatusUrl: URL? = nil, subscriptionStatusUrlForSandbox: URL? = nil, subscriptionStatusUrlVersion: SubscriptionStatusUrlVersion? = nil, subscriptionStatusUrlVersionForSandbox: SubscriptionStatusUrlVersion? = nil ) { - self.availableInNewTerritories = availableInNewTerritories + self.accessibilityUrl = accessibilityUrl self.bundleId = bundleId self.contentRightsDeclaration = contentRightsDeclaration self.isOrEverWasMadeForKids = isOrEverWasMadeForKids self.name = name self.primaryLocale = primaryLocale self.sku = sku + self.streamlinedPurchasingEnabled = streamlinedPurchasingEnabled self.subscriptionStatusUrl = subscriptionStatusUrl self.subscriptionStatusUrlForSandbox = subscriptionStatusUrlForSandbox self.subscriptionStatusUrlVersion = subscriptionStatusUrlVersion @@ -91,43 +94,50 @@ public struct App: Hashable, Codable { } private enum CodingKeys: String, CodingKey { - case availableInNewTerritories + case accessibilityUrl case bundleId case contentRightsDeclaration case isOrEverWasMadeForKids case name case primaryLocale case sku + case streamlinedPurchasingEnabled case subscriptionStatusUrl case subscriptionStatusUrlForSandbox case subscriptionStatusUrlVersion case subscriptionStatusUrlVersionForSandbox } - public enum ContentRightsDeclaration: Hashable, Codable, RawRepresentable { - case doesNotUseThirdPartyContent - case usesThirdPartyContent - case unknown(String) + public struct ContentRightsDeclaration: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var doesNotUseThirdPartyContent: Self { + .init(rawValue: "DOES_NOT_USE_THIRD_PARTY_CONTENT") + } - public var rawValue: String { - switch self { - case .doesNotUseThirdPartyContent: return "DOES_NOT_USE_THIRD_PARTY_CONTENT" - case .usesThirdPartyContent: return "USES_THIRD_PARTY_CONTENT" - case .unknown(let rawValue): return rawValue - } + public static var usesThirdPartyContent: Self { + .init(rawValue: "USES_THIRD_PARTY_CONTENT") } + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "DOES_NOT_USE_THIRD_PARTY_CONTENT": self = .doesNotUseThirdPartyContent - case "USES_THIRD_PARTY_CONTENT": self = .usesThirdPartyContent - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } } - public struct Relationships: Hashable, Codable { + public struct Relationships: Hashable, Codable, Sendable { + public var accessibilityDeclarations: AccessibilityDeclarations? + + public var alternativeDistributionKey: AlternativeDistributionKey? + + public var analyticsReportRequests: AnalyticsReportRequests? + + public var appAvailabilityV2: AppAvailabilityV2? + public var appClips: AppClips? public var appCustomProductPages: AppCustomProductPages? @@ -138,25 +148,38 @@ public struct App: Hashable, Codable { public var appInfos: AppInfos? + public var appPricePoints: AppPricePoints? + + public var appPriceSchedule: AppPriceSchedule? + public var appStoreVersionExperimentsV2: AppStoreVersionExperimentsV2? public var appStoreVersions: AppStoreVersions? - @available(*, deprecated) - public var availableTerritories: AvailableTerritories? + public var backgroundAssets: BackgroundAssets? public var betaAppLocalizations: BetaAppLocalizations? public var betaAppReviewDetail: BetaAppReviewDetail? + public var betaFeedbackCrashSubmissions: BetaFeedbackCrashSubmissions? + + public var betaFeedbackScreenshotSubmissions: BetaFeedbackScreenshotSubmissions? + public var betaGroups: BetaGroups? public var betaLicenseAgreement: BetaLicenseAgreement? + public var betaTesters: BetaTesters? + public var builds: Builds? public var ciProduct: CiProduct? + public var customerReviewSummarizations: CustomerReviewSummarizations? + + public var customerReviews: CustomerReviews? + public var endUserLicenseAgreement: EndUserLicenseAgreement? public var gameCenterDetail: GameCenterDetail? @@ -168,12 +191,11 @@ public struct App: Hashable, Codable { public var inAppPurchasesV2: InAppPurchasesV2? - public var preOrder: PreOrder? + public var marketplaceSearchDetail: MarketplaceSearchDetail? - public var preReleaseVersions: PreReleaseVersions? + public var perfPowerMetrics: PerfPowerMetrics? - @available(*, deprecated) - public var prices: Prices? + public var preReleaseVersions: PreReleaseVersions? public var promotedPurchases: PromotedPurchases? @@ -183,167 +205,187 @@ public struct App: Hashable, Codable { public var subscriptionGroups: SubscriptionGroups? + public var webhooks: Webhooks? + public init( + accessibilityDeclarations: AccessibilityDeclarations? = nil, + alternativeDistributionKey: AlternativeDistributionKey? = nil, + analyticsReportRequests: AnalyticsReportRequests? = nil, + appAvailabilityV2: AppAvailabilityV2? = nil, appClips: AppClips? = nil, appCustomProductPages: AppCustomProductPages? = nil, appEncryptionDeclarations: AppEncryptionDeclarations? = nil, appEvents: AppEvents? = nil, appInfos: AppInfos? = nil, + appPricePoints: AppPricePoints? = nil, + appPriceSchedule: AppPriceSchedule? = nil, appStoreVersionExperimentsV2: AppStoreVersionExperimentsV2? = nil, appStoreVersions: AppStoreVersions? = nil, - availableTerritories: AvailableTerritories? = nil, + backgroundAssets: BackgroundAssets? = nil, betaAppLocalizations: BetaAppLocalizations? = nil, betaAppReviewDetail: BetaAppReviewDetail? = nil, + betaFeedbackCrashSubmissions: BetaFeedbackCrashSubmissions? = nil, + betaFeedbackScreenshotSubmissions: BetaFeedbackScreenshotSubmissions? = nil, betaGroups: BetaGroups? = nil, betaLicenseAgreement: BetaLicenseAgreement? = nil, + betaTesters: BetaTesters? = nil, builds: Builds? = nil, ciProduct: CiProduct? = nil, + customerReviewSummarizations: CustomerReviewSummarizations? = nil, + customerReviews: CustomerReviews? = nil, endUserLicenseAgreement: EndUserLicenseAgreement? = nil, gameCenterDetail: GameCenterDetail? = nil, gameCenterEnabledVersions: GameCenterEnabledVersions? = nil, inAppPurchases: InAppPurchases? = nil, inAppPurchasesV2: InAppPurchasesV2? = nil, - preOrder: PreOrder? = nil, + marketplaceSearchDetail: MarketplaceSearchDetail? = nil, + perfPowerMetrics: PerfPowerMetrics? = nil, preReleaseVersions: PreReleaseVersions? = nil, - prices: Prices? = nil, promotedPurchases: PromotedPurchases? = nil, reviewSubmissions: ReviewSubmissions? = nil, subscriptionGracePeriod: SubscriptionGracePeriod? = nil, - subscriptionGroups: SubscriptionGroups? = nil + subscriptionGroups: SubscriptionGroups? = nil, + webhooks: Webhooks? = nil ) { + self.accessibilityDeclarations = accessibilityDeclarations + self.alternativeDistributionKey = alternativeDistributionKey + self.analyticsReportRequests = analyticsReportRequests + self.appAvailabilityV2 = appAvailabilityV2 self.appClips = appClips self.appCustomProductPages = appCustomProductPages self.appEncryptionDeclarations = appEncryptionDeclarations self.appEvents = appEvents self.appInfos = appInfos + self.appPricePoints = appPricePoints + self.appPriceSchedule = appPriceSchedule self.appStoreVersionExperimentsV2 = appStoreVersionExperimentsV2 self.appStoreVersions = appStoreVersions - self.availableTerritories = availableTerritories + self.backgroundAssets = backgroundAssets self.betaAppLocalizations = betaAppLocalizations self.betaAppReviewDetail = betaAppReviewDetail + self.betaFeedbackCrashSubmissions = betaFeedbackCrashSubmissions + self.betaFeedbackScreenshotSubmissions = betaFeedbackScreenshotSubmissions self.betaGroups = betaGroups self.betaLicenseAgreement = betaLicenseAgreement + self.betaTesters = betaTesters self.builds = builds self.ciProduct = ciProduct + self.customerReviewSummarizations = customerReviewSummarizations + self.customerReviews = customerReviews self.endUserLicenseAgreement = endUserLicenseAgreement self.gameCenterDetail = gameCenterDetail self.gameCenterEnabledVersions = gameCenterEnabledVersions self.inAppPurchases = inAppPurchases self.inAppPurchasesV2 = inAppPurchasesV2 - self.preOrder = preOrder + self.marketplaceSearchDetail = marketplaceSearchDetail + self.perfPowerMetrics = perfPowerMetrics self.preReleaseVersions = preReleaseVersions - self.prices = prices self.promotedPurchases = promotedPurchases self.reviewSubmissions = reviewSubmissions self.subscriptionGracePeriod = subscriptionGracePeriod self.subscriptionGroups = subscriptionGroups + self.webhooks = webhooks } private enum CodingKeys: String, CodingKey { + case accessibilityDeclarations + case alternativeDistributionKey + case analyticsReportRequests + case appAvailabilityV2 case appClips case appCustomProductPages case appEncryptionDeclarations case appEvents case appInfos + case appPricePoints + case appPriceSchedule case appStoreVersionExperimentsV2 case appStoreVersions - case availableTerritories + case backgroundAssets case betaAppLocalizations case betaAppReviewDetail + case betaFeedbackCrashSubmissions + case betaFeedbackScreenshotSubmissions case betaGroups case betaLicenseAgreement + case betaTesters case builds case ciProduct + case customerReviewSummarizations + case customerReviews case endUserLicenseAgreement case gameCenterDetail case gameCenterEnabledVersions case inAppPurchases case inAppPurchasesV2 - case preOrder + case marketplaceSearchDetail + case perfPowerMetrics case preReleaseVersions - case prices case promotedPurchases case reviewSubmissions case subscriptionGracePeriod case subscriptionGroups + case webhooks } - public struct AppClips: Hashable, Codable { - public var data: [Data]? - - public var links: Links? + public struct AccessibilityDeclarations: Hashable, Codable, Sendable { + public var links: RelationshipLinks? - public var meta: PagingInformation? - - public init( - data: [Data]? = nil, - links: Links? = nil, - meta: PagingInformation? = nil - ) { - self.data = data + public init(links: RelationshipLinks? = nil) { self.links = links - self.meta = meta } private enum CodingKeys: String, CodingKey { - case data case links - case meta } + } - public struct Data: Hashable, Codable { - public var id: String + public struct AlternativeDistributionKey: Hashable, Codable, Sendable { + public var links: RelationshipLinks? - public var type: `Type` + public init(links: RelationshipLinks? = nil) { + self.links = links + } - public init( - id: String, - type: `Type` - ) { - self.id = id - self.type = type - } + private enum CodingKeys: String, CodingKey { + case links + } + } - private enum CodingKeys: String, CodingKey { - case id - case type - } + public struct AnalyticsReportRequests: Hashable, Codable, Sendable { + public var links: RelationshipLinks? - public enum `Type`: String, Hashable, Codable { - case appClips - } + public init(links: RelationshipLinks? = nil) { + self.links = links } - public struct Links: Hashable, Codable { - public var related: URL? + private enum CodingKeys: String, CodingKey { + case links + } + } - public var `self`: URL? + public struct AppAvailabilityV2: Hashable, Codable, Sendable { + public var links: RelationshipLinks? - public init( - related: URL? = nil, - self _self: URL? = nil - ) { - self.related = related - self.`self` = _self - } + public init(links: RelationshipLinks? = nil) { + self.links = links + } - private enum CodingKeys: String, CodingKey { - case related - case `self` = "self" - } + private enum CodingKeys: String, CodingKey { + case links } } - public struct AppCustomProductPages: Hashable, Codable { + public struct AppClips: Hashable, Codable, Sendable { public var data: [Data]? - public var links: Links? + public var links: RelationshipLinks? public var meta: PagingInformation? public init( data: [Data]? = nil, - links: Links? = nil, + links: RelationshipLinks? = nil, meta: PagingInformation? = nil ) { self.data = data @@ -357,7 +399,7 @@ public struct App: Hashable, Codable { case meta } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -375,41 +417,22 @@ public struct App: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { - case appCustomProductPages - } - } - - public struct Links: Hashable, Codable { - public var related: URL? - - public var `self`: URL? - - public init( - related: URL? = nil, - self _self: URL? = nil - ) { - self.related = related - self.`self` = _self - } - - private enum CodingKeys: String, CodingKey { - case related - case `self` = "self" + public enum `Type`: String, Hashable, Codable, Sendable { + case appClips } } } - public struct AppEncryptionDeclarations: Hashable, Codable { + public struct AppCustomProductPages: Hashable, Codable, Sendable { public var data: [Data]? - public var links: Links? + public var links: RelationshipLinks? public var meta: PagingInformation? public init( data: [Data]? = nil, - links: Links? = nil, + links: RelationshipLinks? = nil, meta: PagingInformation? = nil ) { self.data = data @@ -423,7 +446,7 @@ public struct App: Hashable, Codable { case meta } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -441,41 +464,22 @@ public struct App: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { - case appEncryptionDeclarations - } - } - - public struct Links: Hashable, Codable { - public var related: URL? - - public var `self`: URL? - - public init( - related: URL? = nil, - self _self: URL? = nil - ) { - self.related = related - self.`self` = _self - } - - private enum CodingKeys: String, CodingKey { - case related - case `self` = "self" + public enum `Type`: String, Hashable, Codable, Sendable { + case appCustomProductPages } } } - public struct AppEvents: Hashable, Codable { + public struct AppEncryptionDeclarations: Hashable, Codable, Sendable { public var data: [Data]? - public var links: Links? + public var links: RelationshipLinks? public var meta: PagingInformation? public init( data: [Data]? = nil, - links: Links? = nil, + links: RelationshipLinks? = nil, meta: PagingInformation? = nil ) { self.data = data @@ -489,7 +493,7 @@ public struct App: Hashable, Codable { case meta } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -507,41 +511,22 @@ public struct App: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { - case appEvents - } - } - - public struct Links: Hashable, Codable { - public var related: URL? - - public var `self`: URL? - - public init( - related: URL? = nil, - self _self: URL? = nil - ) { - self.related = related - self.`self` = _self - } - - private enum CodingKeys: String, CodingKey { - case related - case `self` = "self" + public enum `Type`: String, Hashable, Codable, Sendable { + case appEncryptionDeclarations } } } - public struct AppInfos: Hashable, Codable { + public struct AppEvents: Hashable, Codable, Sendable { public var data: [Data]? - public var links: Links? + public var links: RelationshipLinks? public var meta: PagingInformation? public init( data: [Data]? = nil, - links: Links? = nil, + links: RelationshipLinks? = nil, meta: PagingInformation? = nil ) { self.data = data @@ -555,7 +540,7 @@ public struct App: Hashable, Codable { case meta } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -573,41 +558,22 @@ public struct App: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { - case appInfos - } - } - - public struct Links: Hashable, Codable { - public var related: URL? - - public var `self`: URL? - - public init( - related: URL? = nil, - self _self: URL? = nil - ) { - self.related = related - self.`self` = _self - } - - private enum CodingKeys: String, CodingKey { - case related - case `self` = "self" + public enum `Type`: String, Hashable, Codable, Sendable { + case appEvents } } } - public struct AppStoreVersionExperimentsV2: Hashable, Codable { + public struct AppInfos: Hashable, Codable, Sendable { public var data: [Data]? - public var links: Links? + public var links: RelationshipLinks? public var meta: PagingInformation? public init( data: [Data]? = nil, - links: Links? = nil, + links: RelationshipLinks? = nil, meta: PagingInformation? = nil ) { self.data = data @@ -621,7 +587,7 @@ public struct App: Hashable, Codable { case meta } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -639,41 +605,46 @@ public struct App: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { - case appStoreVersionExperiments + public enum `Type`: String, Hashable, Codable, Sendable { + case appInfos } } + } - public struct Links: Hashable, Codable { - public var related: URL? + public struct AppPricePoints: Hashable, Codable, Sendable { + public var links: RelationshipLinks? - public var `self`: URL? + public init(links: RelationshipLinks? = nil) { + self.links = links + } - public init( - related: URL? = nil, - self _self: URL? = nil - ) { - self.related = related - self.`self` = _self - } + private enum CodingKeys: String, CodingKey { + case links + } + } - private enum CodingKeys: String, CodingKey { - case related - case `self` = "self" - } + public struct AppPriceSchedule: Hashable, Codable, Sendable { + public var links: RelationshipLinks? + + public init(links: RelationshipLinks? = nil) { + self.links = links + } + + private enum CodingKeys: String, CodingKey { + case links } } - public struct AppStoreVersions: Hashable, Codable { + public struct AppStoreVersionExperimentsV2: Hashable, Codable, Sendable { public var data: [Data]? - public var links: Links? + public var links: RelationshipLinks? public var meta: PagingInformation? public init( data: [Data]? = nil, - links: Links? = nil, + links: RelationshipLinks? = nil, meta: PagingInformation? = nil ) { self.data = data @@ -687,7 +658,7 @@ public struct App: Hashable, Codable { case meta } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -705,41 +676,22 @@ public struct App: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { - case appStoreVersions - } - } - - public struct Links: Hashable, Codable { - public var related: URL? - - public var `self`: URL? - - public init( - related: URL? = nil, - self _self: URL? = nil - ) { - self.related = related - self.`self` = _self - } - - private enum CodingKeys: String, CodingKey { - case related - case `self` = "self" + public enum `Type`: String, Hashable, Codable, Sendable { + case appStoreVersionExperiments } } } - public struct AvailableTerritories: Hashable, Codable { + public struct AppStoreVersions: Hashable, Codable, Sendable { public var data: [Data]? - public var links: Links? + public var links: RelationshipLinks? public var meta: PagingInformation? public init( data: [Data]? = nil, - links: Links? = nil, + links: RelationshipLinks? = nil, meta: PagingInformation? = nil ) { self.data = data @@ -753,7 +705,7 @@ public struct App: Hashable, Codable { case meta } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -771,41 +723,34 @@ public struct App: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { - case territories + public enum `Type`: String, Hashable, Codable, Sendable { + case appStoreVersions } } + } - public struct Links: Hashable, Codable { - public var related: URL? - - public var `self`: URL? + public struct BackgroundAssets: Hashable, Codable, Sendable { + public var links: RelationshipLinks? - public init( - related: URL? = nil, - self _self: URL? = nil - ) { - self.related = related - self.`self` = _self - } + public init(links: RelationshipLinks? = nil) { + self.links = links + } - private enum CodingKeys: String, CodingKey { - case related - case `self` = "self" - } + private enum CodingKeys: String, CodingKey { + case links } } - public struct BetaAppLocalizations: Hashable, Codable { + public struct BetaAppLocalizations: Hashable, Codable, Sendable { public var data: [Data]? - public var links: Links? + public var links: RelationshipLinks? public var meta: PagingInformation? public init( data: [Data]? = nil, - links: Links? = nil, + links: RelationshipLinks? = nil, meta: PagingInformation? = nil ) { self.data = data @@ -819,7 +764,7 @@ public struct App: Hashable, Codable { case meta } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -837,39 +782,20 @@ public struct App: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case betaAppLocalizations } } - - public struct Links: Hashable, Codable { - public var related: URL? - - public var `self`: URL? - - public init( - related: URL? = nil, - self _self: URL? = nil - ) { - self.related = related - self.`self` = _self - } - - private enum CodingKeys: String, CodingKey { - case related - case `self` = "self" - } - } } - public struct BetaAppReviewDetail: Hashable, Codable { + public struct BetaAppReviewDetail: Hashable, Codable, Sendable { public var data: Data? - public var links: Links? + public var links: RelationshipLinks? public init( data: Data? = nil, - links: Links? = nil + links: RelationshipLinks? = nil ) { self.data = data self.links = links @@ -880,7 +806,7 @@ public struct App: Hashable, Codable { case links } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -898,41 +824,46 @@ public struct App: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case betaAppReviewDetails } } + } - public struct Links: Hashable, Codable { - public var related: URL? + public struct BetaFeedbackCrashSubmissions: Hashable, Codable, Sendable { + public var links: RelationshipLinks? - public var `self`: URL? + public init(links: RelationshipLinks? = nil) { + self.links = links + } - public init( - related: URL? = nil, - self _self: URL? = nil - ) { - self.related = related - self.`self` = _self - } + private enum CodingKeys: String, CodingKey { + case links + } + } - private enum CodingKeys: String, CodingKey { - case related - case `self` = "self" - } + public struct BetaFeedbackScreenshotSubmissions: Hashable, Codable, Sendable { + public var links: RelationshipLinks? + + public init(links: RelationshipLinks? = nil) { + self.links = links + } + + private enum CodingKeys: String, CodingKey { + case links } } - public struct BetaGroups: Hashable, Codable { + public struct BetaGroups: Hashable, Codable, Sendable { public var data: [Data]? - public var links: Links? + public var links: RelationshipLinks? public var meta: PagingInformation? public init( data: [Data]? = nil, - links: Links? = nil, + links: RelationshipLinks? = nil, meta: PagingInformation? = nil ) { self.data = data @@ -946,7 +877,7 @@ public struct App: Hashable, Codable { case meta } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -964,39 +895,20 @@ public struct App: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case betaGroups } } - - public struct Links: Hashable, Codable { - public var related: URL? - - public var `self`: URL? - - public init( - related: URL? = nil, - self _self: URL? = nil - ) { - self.related = related - self.`self` = _self - } - - private enum CodingKeys: String, CodingKey { - case related - case `self` = "self" - } - } } - public struct BetaLicenseAgreement: Hashable, Codable { + public struct BetaLicenseAgreement: Hashable, Codable, Sendable { public var data: Data? - public var links: Links? + public var links: RelationshipLinks? public init( data: Data? = nil, - links: Links? = nil + links: RelationshipLinks? = nil ) { self.data = data self.links = links @@ -1007,7 +919,7 @@ public struct App: Hashable, Codable { case links } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -1025,41 +937,34 @@ public struct App: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case betaLicenseAgreements } } + } - public struct Links: Hashable, Codable { - public var related: URL? - - public var `self`: URL? + public struct BetaTesters: Hashable, Codable, Sendable { + public var links: RelationshipLinks? - public init( - related: URL? = nil, - self _self: URL? = nil - ) { - self.related = related - self.`self` = _self - } + public init(links: RelationshipLinks? = nil) { + self.links = links + } - private enum CodingKeys: String, CodingKey { - case related - case `self` = "self" - } + private enum CodingKeys: String, CodingKey { + case links } } - public struct Builds: Hashable, Codable { + public struct Builds: Hashable, Codable, Sendable { public var data: [Data]? - public var links: Links? + public var links: RelationshipLinks? public var meta: PagingInformation? public init( data: [Data]? = nil, - links: Links? = nil, + links: RelationshipLinks? = nil, meta: PagingInformation? = nil ) { self.data = data @@ -1073,7 +978,7 @@ public struct App: Hashable, Codable { case meta } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -1091,39 +996,20 @@ public struct App: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case builds } } - - public struct Links: Hashable, Codable { - public var related: URL? - - public var `self`: URL? - - public init( - related: URL? = nil, - self _self: URL? = nil - ) { - self.related = related - self.`self` = _self - } - - private enum CodingKeys: String, CodingKey { - case related - case `self` = "self" - } - } } - public struct CiProduct: Hashable, Codable { + public struct CiProduct: Hashable, Codable, Sendable { public var data: Data? - public var links: Links? + public var links: RelationshipLinks? public init( data: Data? = nil, - links: Links? = nil + links: RelationshipLinks? = nil ) { self.data = data self.links = links @@ -1134,7 +1020,7 @@ public struct App: Hashable, Codable { case links } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -1152,39 +1038,44 @@ public struct App: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case ciProducts } } + } - public struct Links: Hashable, Codable { - public var related: URL? + public struct CustomerReviewSummarizations: Hashable, Codable, Sendable { + public var links: RelationshipLinks? - public var `self`: URL? + public init(links: RelationshipLinks? = nil) { + self.links = links + } - public init( - related: URL? = nil, - self _self: URL? = nil - ) { - self.related = related - self.`self` = _self - } + private enum CodingKeys: String, CodingKey { + case links + } + } - private enum CodingKeys: String, CodingKey { - case related - case `self` = "self" - } + public struct CustomerReviews: Hashable, Codable, Sendable { + public var links: RelationshipLinks? + + public init(links: RelationshipLinks? = nil) { + self.links = links + } + + private enum CodingKeys: String, CodingKey { + case links } } - public struct EndUserLicenseAgreement: Hashable, Codable { + public struct EndUserLicenseAgreement: Hashable, Codable, Sendable { public var data: Data? - public var links: Links? + public var links: RelationshipLinks? public init( data: Data? = nil, - links: Links? = nil + links: RelationshipLinks? = nil ) { self.data = data self.links = links @@ -1195,7 +1086,7 @@ public struct App: Hashable, Codable { case links } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -1213,39 +1104,20 @@ public struct App: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case endUserLicenseAgreements } } - - public struct Links: Hashable, Codable { - public var related: URL? - - public var `self`: URL? - - public init( - related: URL? = nil, - self _self: URL? = nil - ) { - self.related = related - self.`self` = _self - } - - private enum CodingKeys: String, CodingKey { - case related - case `self` = "self" - } - } } - public struct GameCenterDetail: Hashable, Codable { + public struct GameCenterDetail: Hashable, Codable, Sendable { public var data: Data? - public var links: Links? + public var links: RelationshipLinks? public init( data: Data? = nil, - links: Links? = nil + links: RelationshipLinks? = nil ) { self.data = data self.links = links @@ -1256,7 +1128,7 @@ public struct App: Hashable, Codable { case links } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -1274,41 +1146,22 @@ public struct App: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case gameCenterDetails } } - - public struct Links: Hashable, Codable { - public var related: URL? - - public var `self`: URL? - - public init( - related: URL? = nil, - self _self: URL? = nil - ) { - self.related = related - self.`self` = _self - } - - private enum CodingKeys: String, CodingKey { - case related - case `self` = "self" - } - } } - public struct GameCenterEnabledVersions: Hashable, Codable { + public struct GameCenterEnabledVersions: Hashable, Codable, Sendable { public var data: [Data]? - public var links: Links? + public var links: RelationshipLinks? public var meta: PagingInformation? public init( data: [Data]? = nil, - links: Links? = nil, + links: RelationshipLinks? = nil, meta: PagingInformation? = nil ) { self.data = data @@ -1322,7 +1175,7 @@ public struct App: Hashable, Codable { case meta } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -1340,41 +1193,22 @@ public struct App: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case gameCenterEnabledVersions } } - - public struct Links: Hashable, Codable { - public var related: URL? - - public var `self`: URL? - - public init( - related: URL? = nil, - self _self: URL? = nil - ) { - self.related = related - self.`self` = _self - } - - private enum CodingKeys: String, CodingKey { - case related - case `self` = "self" - } - } } - public struct InAppPurchases: Hashable, Codable { + public struct InAppPurchases: Hashable, Codable, Sendable { public var data: [Data]? - public var links: Links? + public var links: RelationshipLinks? public var meta: PagingInformation? public init( data: [Data]? = nil, - links: Links? = nil, + links: RelationshipLinks? = nil, meta: PagingInformation? = nil ) { self.data = data @@ -1388,7 +1222,7 @@ public struct App: Hashable, Codable { case meta } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -1406,41 +1240,22 @@ public struct App: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case inAppPurchases } } - - public struct Links: Hashable, Codable { - public var related: URL? - - public var `self`: URL? - - public init( - related: URL? = nil, - self _self: URL? = nil - ) { - self.related = related - self.`self` = _self - } - - private enum CodingKeys: String, CodingKey { - case related - case `self` = "self" - } - } } - public struct InAppPurchasesV2: Hashable, Codable { + public struct InAppPurchasesV2: Hashable, Codable, Sendable { public var data: [Data]? - public var links: Links? + public var links: RelationshipLinks? public var meta: PagingInformation? public init( data: [Data]? = nil, - links: Links? = nil, + links: RelationshipLinks? = nil, meta: PagingInformation? = nil ) { self.data = data @@ -1454,7 +1269,7 @@ public struct App: Hashable, Codable { case meta } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -1472,168 +1287,46 @@ public struct App: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case inAppPurchases } } - - public struct Links: Hashable, Codable { - public var related: URL? - - public var `self`: URL? - - public init( - related: URL? = nil, - self _self: URL? = nil - ) { - self.related = related - self.`self` = _self - } - - private enum CodingKeys: String, CodingKey { - case related - case `self` = "self" - } - } } - public struct PreOrder: Hashable, Codable { - public var data: Data? + public struct MarketplaceSearchDetail: Hashable, Codable, Sendable { + public var links: RelationshipLinks? - public var links: Links? - - public init( - data: Data? = nil, - links: Links? = nil - ) { - self.data = data + public init(links: RelationshipLinks? = nil) { self.links = links } private enum CodingKeys: String, CodingKey { - case data case links } - - public struct Data: Hashable, Codable { - public var id: String - - public var type: `Type` - - public init( - id: String, - type: `Type` - ) { - self.id = id - self.type = type - } - - private enum CodingKeys: String, CodingKey { - case id - case type - } - - public enum `Type`: String, Hashable, Codable { - case appPreOrders - } - } - - public struct Links: Hashable, Codable { - public var related: URL? - - public var `self`: URL? - - public init( - related: URL? = nil, - self _self: URL? = nil - ) { - self.related = related - self.`self` = _self - } - - private enum CodingKeys: String, CodingKey { - case related - case `self` = "self" - } - } } - public struct PreReleaseVersions: Hashable, Codable { - public var data: [Data]? - - public var links: Links? - - public var meta: PagingInformation? + public struct PerfPowerMetrics: Hashable, Codable, Sendable { + public var links: RelationshipLinks? - public init( - data: [Data]? = nil, - links: Links? = nil, - meta: PagingInformation? = nil - ) { - self.data = data + public init(links: RelationshipLinks? = nil) { self.links = links - self.meta = meta } private enum CodingKeys: String, CodingKey { - case data case links - case meta - } - - public struct Data: Hashable, Codable { - public var id: String - - public var type: `Type` - - public init( - id: String, - type: `Type` - ) { - self.id = id - self.type = type - } - - private enum CodingKeys: String, CodingKey { - case id - case type - } - - public enum `Type`: String, Hashable, Codable { - case preReleaseVersions - } - } - - public struct Links: Hashable, Codable { - public var related: URL? - - public var `self`: URL? - - public init( - related: URL? = nil, - self _self: URL? = nil - ) { - self.related = related - self.`self` = _self - } - - private enum CodingKeys: String, CodingKey { - case related - case `self` = "self" - } } } - public struct Prices: Hashable, Codable { + public struct PreReleaseVersions: Hashable, Codable, Sendable { public var data: [Data]? - public var links: Links? + public var links: RelationshipLinks? public var meta: PagingInformation? public init( data: [Data]? = nil, - links: Links? = nil, + links: RelationshipLinks? = nil, meta: PagingInformation? = nil ) { self.data = data @@ -1647,7 +1340,7 @@ public struct App: Hashable, Codable { case meta } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -1665,41 +1358,22 @@ public struct App: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { - case appPrices - } - } - - public struct Links: Hashable, Codable { - public var related: URL? - - public var `self`: URL? - - public init( - related: URL? = nil, - self _self: URL? = nil - ) { - self.related = related - self.`self` = _self - } - - private enum CodingKeys: String, CodingKey { - case related - case `self` = "self" + public enum `Type`: String, Hashable, Codable, Sendable { + case preReleaseVersions } } } - public struct PromotedPurchases: Hashable, Codable { + public struct PromotedPurchases: Hashable, Codable, Sendable { public var data: [Data]? - public var links: Links? + public var links: RelationshipLinks? public var meta: PagingInformation? public init( data: [Data]? = nil, - links: Links? = nil, + links: RelationshipLinks? = nil, meta: PagingInformation? = nil ) { self.data = data @@ -1713,7 +1387,7 @@ public struct App: Hashable, Codable { case meta } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -1731,41 +1405,22 @@ public struct App: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case promotedPurchases } } - - public struct Links: Hashable, Codable { - public var related: URL? - - public var `self`: URL? - - public init( - related: URL? = nil, - self _self: URL? = nil - ) { - self.related = related - self.`self` = _self - } - - private enum CodingKeys: String, CodingKey { - case related - case `self` = "self" - } - } } - public struct ReviewSubmissions: Hashable, Codable { + public struct ReviewSubmissions: Hashable, Codable, Sendable { public var data: [Data]? - public var links: Links? + public var links: RelationshipLinks? public var meta: PagingInformation? public init( data: [Data]? = nil, - links: Links? = nil, + links: RelationshipLinks? = nil, meta: PagingInformation? = nil ) { self.data = data @@ -1779,7 +1434,7 @@ public struct App: Hashable, Codable { case meta } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -1797,39 +1452,20 @@ public struct App: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case reviewSubmissions } } - - public struct Links: Hashable, Codable { - public var related: URL? - - public var `self`: URL? - - public init( - related: URL? = nil, - self _self: URL? = nil - ) { - self.related = related - self.`self` = _self - } - - private enum CodingKeys: String, CodingKey { - case related - case `self` = "self" - } - } } - public struct SubscriptionGracePeriod: Hashable, Codable { + public struct SubscriptionGracePeriod: Hashable, Codable, Sendable { public var data: Data? - public var links: Links? + public var links: RelationshipLinks? public init( data: Data? = nil, - links: Links? = nil + links: RelationshipLinks? = nil ) { self.data = data self.links = links @@ -1840,7 +1476,7 @@ public struct App: Hashable, Codable { case links } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -1858,41 +1494,22 @@ public struct App: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case subscriptionGracePeriods } } - - public struct Links: Hashable, Codable { - public var related: URL? - - public var `self`: URL? - - public init( - related: URL? = nil, - self _self: URL? = nil - ) { - self.related = related - self.`self` = _self - } - - private enum CodingKeys: String, CodingKey { - case related - case `self` = "self" - } - } } - public struct SubscriptionGroups: Hashable, Codable { + public struct SubscriptionGroups: Hashable, Codable, Sendable { public var data: [Data]? - public var links: Links? + public var links: RelationshipLinks? public var meta: PagingInformation? public init( data: [Data]? = nil, - links: Links? = nil, + links: RelationshipLinks? = nil, meta: PagingInformation? = nil ) { self.data = data @@ -1906,7 +1523,7 @@ public struct App: Hashable, Codable { case meta } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -1924,28 +1541,21 @@ public struct App: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case subscriptionGroups } } + } - public struct Links: Hashable, Codable { - public var related: URL? - - public var `self`: URL? + public struct Webhooks: Hashable, Codable, Sendable { + public var links: RelationshipLinks? - public init( - related: URL? = nil, - self _self: URL? = nil - ) { - self.related = related - self.`self` = _self - } + public init(links: RelationshipLinks? = nil) { + self.links = links + } - private enum CodingKeys: String, CodingKey { - case related - case `self` = "self" - } + private enum CodingKeys: String, CodingKey { + case links } } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/AppAvailability.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/AppAvailability.generated.swift deleted file mode 100644 index 60c2a0aa..00000000 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/AppAvailability.generated.swift +++ /dev/null @@ -1,202 +0,0 @@ -// autogenerated - -// swiftlint:disable all -import Foundation - -public struct AppAvailability: Hashable, Codable { - public var id: String - - public var type: `Type` - - public var attributes: Attributes? - - public var relationships: Relationships? - - public var links: ResourceLinks? - - public init( - id: String, - type: `Type`, - attributes: Attributes? = nil, - relationships: Relationships? = nil, - links: ResourceLinks? = nil - ) { - self.id = id - self.type = type - self.attributes = attributes - self.relationships = relationships - self.links = links - } - - private enum CodingKeys: String, CodingKey { - case id - case type - case attributes - case relationships - case links - } - - public enum `Type`: String, Hashable, Codable { - case appAvailabilities - } - - public struct Attributes: Hashable, Codable { - public var availableInNewTerritories: Bool? - - public init(availableInNewTerritories: Bool? = nil) { - self.availableInNewTerritories = availableInNewTerritories - } - - private enum CodingKeys: String, CodingKey { - case availableInNewTerritories - } - } - - public struct Relationships: Hashable, Codable { - public var app: App? - - public var availableTerritories: AvailableTerritories? - - public init( - app: App? = nil, - availableTerritories: AvailableTerritories? = nil - ) { - self.app = app - self.availableTerritories = availableTerritories - } - - private enum CodingKeys: String, CodingKey { - case app - case availableTerritories - } - - public struct App: Hashable, Codable { - public var data: Data? - - public var links: Links? - - public init( - data: Data? = nil, - links: Links? = nil - ) { - self.data = data - self.links = links - } - - private enum CodingKeys: String, CodingKey { - case data - case links - } - - public struct Data: Hashable, Codable { - public var id: String - - public var type: `Type` - - public init( - id: String, - type: `Type` - ) { - self.id = id - self.type = type - } - - private enum CodingKeys: String, CodingKey { - case id - case type - } - - public enum `Type`: String, Hashable, Codable { - case apps - } - } - - public struct Links: Hashable, Codable { - public var related: URL? - - public var `self`: URL? - - public init( - related: URL? = nil, - self _self: URL? = nil - ) { - self.related = related - self.`self` = _self - } - - private enum CodingKeys: String, CodingKey { - case related - case `self` = "self" - } - } - } - - public struct AvailableTerritories: Hashable, Codable { - public var data: [Data]? - - public var links: Links? - - public var meta: PagingInformation? - - public init( - data: [Data]? = nil, - links: Links? = nil, - meta: PagingInformation? = nil - ) { - self.data = data - self.links = links - self.meta = meta - } - - private enum CodingKeys: String, CodingKey { - case data - case links - case meta - } - - public struct Data: Hashable, Codable { - public var id: String - - public var type: `Type` - - public init( - id: String, - type: `Type` - ) { - self.id = id - self.type = type - } - - private enum CodingKeys: String, CodingKey { - case id - case type - } - - public enum `Type`: String, Hashable, Codable { - case territories - } - } - - public struct Links: Hashable, Codable { - public var related: URL? - - public var `self`: URL? - - public init( - related: URL? = nil, - self _self: URL? = nil - ) { - self.related = related - self.`self` = _self - } - - private enum CodingKeys: String, CodingKey { - case related - case `self` = "self" - } - } - } - } -} - -// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/AppAvailabilityV2.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/AppAvailabilityV2.generated.swift index 2aed08f6..86edf3e4 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/AppAvailabilityV2.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/AppAvailabilityV2.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct AppAvailabilityV2: Hashable, Codable { +public struct AppAvailabilityV2: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -36,11 +36,11 @@ public struct AppAvailabilityV2: Hashable, Codable { case links } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case appAvailabilities } - public struct Attributes: Hashable, Codable { + public struct Attributes: Hashable, Codable, Sendable { public var availableInNewTerritories: Bool? public init(availableInNewTerritories: Bool? = nil) { @@ -52,7 +52,7 @@ public struct AppAvailabilityV2: Hashable, Codable { } } - public struct Relationships: Hashable, Codable { + public struct Relationships: Hashable, Codable, Sendable { public var territoryAvailabilities: TerritoryAvailabilities? public init(territoryAvailabilities: TerritoryAvailabilities? = nil) { @@ -63,16 +63,16 @@ public struct AppAvailabilityV2: Hashable, Codable { case territoryAvailabilities } - public struct TerritoryAvailabilities: Hashable, Codable { + public struct TerritoryAvailabilities: Hashable, Codable, Sendable { public var data: [Data]? - public var links: Links? + public var links: RelationshipLinks? public var meta: PagingInformation? public init( data: [Data]? = nil, - links: Links? = nil, + links: RelationshipLinks? = nil, meta: PagingInformation? = nil ) { self.data = data @@ -86,7 +86,7 @@ public struct AppAvailabilityV2: Hashable, Codable { case meta } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -104,29 +104,10 @@ public struct AppAvailabilityV2: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case territoryAvailabilities } } - - public struct Links: Hashable, Codable { - public var related: URL? - - public var `self`: URL? - - public init( - related: URL? = nil, - self _self: URL? = nil - ) { - self.related = related - self.`self` = _self - } - - private enum CodingKeys: String, CodingKey { - case related - case `self` = "self" - } - } } } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/AppCategory.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/AppCategory.generated.swift index 9e749ccf..c3f560a4 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/AppCategory.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/AppCategory.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct AppCategory: Hashable, Codable { +public struct AppCategory: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -36,11 +36,11 @@ public struct AppCategory: Hashable, Codable { case links } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case appCategories } - public struct Attributes: Hashable, Codable { + public struct Attributes: Hashable, Codable, Sendable { public var platforms: [Platform]? public init(platforms: [Platform]? = nil) { @@ -52,7 +52,7 @@ public struct AppCategory: Hashable, Codable { } } - public struct Relationships: Hashable, Codable { + public struct Relationships: Hashable, Codable, Sendable { public var parent: Parent? public var subcategories: Subcategories? @@ -70,14 +70,14 @@ public struct AppCategory: Hashable, Codable { case subcategories } - public struct Parent: Hashable, Codable { + public struct Parent: Hashable, Codable, Sendable { public var data: Data? - public var links: Links? + public var links: RelationshipLinks? public init( data: Data? = nil, - links: Links? = nil + links: RelationshipLinks? = nil ) { self.data = data self.links = links @@ -88,7 +88,7 @@ public struct AppCategory: Hashable, Codable { case links } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -106,41 +106,22 @@ public struct AppCategory: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case appCategories } } - - public struct Links: Hashable, Codable { - public var related: URL? - - public var `self`: URL? - - public init( - related: URL? = nil, - self _self: URL? = nil - ) { - self.related = related - self.`self` = _self - } - - private enum CodingKeys: String, CodingKey { - case related - case `self` = "self" - } - } } - public struct Subcategories: Hashable, Codable { + public struct Subcategories: Hashable, Codable, Sendable { public var data: [Data]? - public var links: Links? + public var links: RelationshipLinks? public var meta: PagingInformation? public init( data: [Data]? = nil, - links: Links? = nil, + links: RelationshipLinks? = nil, meta: PagingInformation? = nil ) { self.data = data @@ -154,7 +135,7 @@ public struct AppCategory: Hashable, Codable { case meta } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -172,29 +153,10 @@ public struct AppCategory: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case appCategories } } - - public struct Links: Hashable, Codable { - public var related: URL? - - public var `self`: URL? - - public init( - related: URL? = nil, - self _self: URL? = nil - ) { - self.related = related - self.`self` = _self - } - - private enum CodingKeys: String, CodingKey { - case related - case `self` = "self" - } - } } } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/AppClip.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/AppClip.generated.swift index 0eb4bf86..3f3fd0d4 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/AppClip.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/AppClip.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct AppClip: Hashable, Codable { +public struct AppClip: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -36,11 +36,11 @@ public struct AppClip: Hashable, Codable { case links } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case appClips } - public struct Attributes: Hashable, Codable { + public struct Attributes: Hashable, Codable, Sendable { public var bundleId: String? public init(bundleId: String? = nil) { @@ -52,43 +52,41 @@ public struct AppClip: Hashable, Codable { } } - public struct Relationships: Hashable, Codable { + public struct Relationships: Hashable, Codable, Sendable { public var app: App? + public var appClipAdvancedExperiences: AppClipAdvancedExperiences? + public var appClipDefaultExperiences: AppClipDefaultExperiences? public init( app: App? = nil, + appClipAdvancedExperiences: AppClipAdvancedExperiences? = nil, appClipDefaultExperiences: AppClipDefaultExperiences? = nil ) { self.app = app + self.appClipAdvancedExperiences = appClipAdvancedExperiences self.appClipDefaultExperiences = appClipDefaultExperiences } private enum CodingKeys: String, CodingKey { case app + case appClipAdvancedExperiences case appClipDefaultExperiences } - public struct App: Hashable, Codable { + public struct App: Hashable, Codable, Sendable { public var data: Data? - public var links: Links? - - public init( - data: Data? = nil, - links: Links? = nil - ) { + public init(data: Data? = nil) { self.data = data - self.links = links } private enum CodingKeys: String, CodingKey { case data - case links } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -106,41 +104,34 @@ public struct AppClip: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case apps } } + } - public struct Links: Hashable, Codable { - public var related: URL? - - public var `self`: URL? + public struct AppClipAdvancedExperiences: Hashable, Codable, Sendable { + public var links: RelationshipLinks? - public init( - related: URL? = nil, - self _self: URL? = nil - ) { - self.related = related - self.`self` = _self - } + public init(links: RelationshipLinks? = nil) { + self.links = links + } - private enum CodingKeys: String, CodingKey { - case related - case `self` = "self" - } + private enum CodingKeys: String, CodingKey { + case links } } - public struct AppClipDefaultExperiences: Hashable, Codable { + public struct AppClipDefaultExperiences: Hashable, Codable, Sendable { public var data: [Data]? - public var links: Links? + public var links: RelationshipLinks? public var meta: PagingInformation? public init( data: [Data]? = nil, - links: Links? = nil, + links: RelationshipLinks? = nil, meta: PagingInformation? = nil ) { self.data = data @@ -154,7 +145,7 @@ public struct AppClip: Hashable, Codable { case meta } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -172,29 +163,10 @@ public struct AppClip: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case appClipDefaultExperiences } } - - public struct Links: Hashable, Codable { - public var related: URL? - - public var `self`: URL? - - public init( - related: URL? = nil, - self _self: URL? = nil - ) { - self.related = related - self.`self` = _self - } - - private enum CodingKeys: String, CodingKey { - case related - case `self` = "self" - } - } } } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/AppClipAction.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/AppClipAction.generated.swift index 00034189..00c046ad 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/AppClipAction.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/AppClipAction.generated.swift @@ -3,28 +3,27 @@ // swiftlint:disable all import Foundation -public enum AppClipAction: Hashable, Codable, RawRepresentable { - case open - case play - case view - case unknown(String) - - public var rawValue: String { - switch self { - case .open: return "OPEN" - case .play: return "PLAY" - case .view: return "VIEW" - case .unknown(let rawValue): return rawValue - } +public struct AppClipAction: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var open: Self { + .init(rawValue: "OPEN") } + public static var play: Self { + .init(rawValue: "PLAY") + } + + public static var view: Self { + .init(rawValue: "VIEW") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "OPEN": self = .open - case "PLAY": self = .play - case "VIEW": self = .view - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/AppClipAdvancedExperience.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/AppClipAdvancedExperience.generated.swift index b0fa69a4..7e7ee5d7 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/AppClipAdvancedExperience.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/AppClipAdvancedExperience.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct AppClipAdvancedExperience: Hashable, Codable { +public struct AppClipAdvancedExperience: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -36,11 +36,11 @@ public struct AppClipAdvancedExperience: Hashable, Codable { case links } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case appClipAdvancedExperiences } - public struct Attributes: Hashable, Codable { + public struct Attributes: Hashable, Codable, Sendable { public var action: AppClipAction? public var businessCategory: BusinessCategory? @@ -93,104 +93,127 @@ public struct AppClipAdvancedExperience: Hashable, Codable { case version } - public enum BusinessCategory: Hashable, Codable, RawRepresentable { - case automotive - case beauty - case bikes - case books - case casino - case education - case educationJapan - case entertainment - case evCharger - case financialCny - case financialEur - case financialGbp - case financialJpy - case financialUsd - case fitness - case foodAndDrink - case gas - case grocery - case healthAndMedical - case hotelAndTravel - case music - case parking - case petServices - case professionalServices - case shopping - case ticketing - case transit - case unknown(String) - - public var rawValue: String { - switch self { - case .automotive: return "AUTOMOTIVE" - case .beauty: return "BEAUTY" - case .bikes: return "BIKES" - case .books: return "BOOKS" - case .casino: return "CASINO" - case .education: return "EDUCATION" - case .educationJapan: return "EDUCATION_JAPAN" - case .entertainment: return "ENTERTAINMENT" - case .evCharger: return "EV_CHARGER" - case .financialCny: return "FINANCIAL_CNY" - case .financialEur: return "FINANCIAL_EUR" - case .financialGbp: return "FINANCIAL_GBP" - case .financialJpy: return "FINANCIAL_JPY" - case .financialUsd: return "FINANCIAL_USD" - case .fitness: return "FITNESS" - case .foodAndDrink: return "FOOD_AND_DRINK" - case .gas: return "GAS" - case .grocery: return "GROCERY" - case .healthAndMedical: return "HEALTH_AND_MEDICAL" - case .hotelAndTravel: return "HOTEL_AND_TRAVEL" - case .music: return "MUSIC" - case .parking: return "PARKING" - case .petServices: return "PET_SERVICES" - case .professionalServices: return "PROFESSIONAL_SERVICES" - case .shopping: return "SHOPPING" - case .ticketing: return "TICKETING" - case .transit: return "TRANSIT" - case .unknown(let rawValue): return rawValue - } + public struct BusinessCategory: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var automotive: Self { + .init(rawValue: "AUTOMOTIVE") + } + + public static var beauty: Self { + .init(rawValue: "BEAUTY") + } + + public static var bikes: Self { + .init(rawValue: "BIKES") + } + + public static var books: Self { + .init(rawValue: "BOOKS") + } + + public static var casino: Self { + .init(rawValue: "CASINO") + } + + public static var education: Self { + .init(rawValue: "EDUCATION") + } + + public static var educationJapan: Self { + .init(rawValue: "EDUCATION_JAPAN") + } + + public static var entertainment: Self { + .init(rawValue: "ENTERTAINMENT") + } + + public static var evCharger: Self { + .init(rawValue: "EV_CHARGER") + } + + public static var financialCny: Self { + .init(rawValue: "FINANCIAL_CNY") + } + + public static var financialEur: Self { + .init(rawValue: "FINANCIAL_EUR") + } + + public static var financialGbp: Self { + .init(rawValue: "FINANCIAL_GBP") + } + + public static var financialJpy: Self { + .init(rawValue: "FINANCIAL_JPY") + } + + public static var financialUsd: Self { + .init(rawValue: "FINANCIAL_USD") } + public static var fitness: Self { + .init(rawValue: "FITNESS") + } + + public static var foodAndDrink: Self { + .init(rawValue: "FOOD_AND_DRINK") + } + + public static var gas: Self { + .init(rawValue: "GAS") + } + + public static var grocery: Self { + .init(rawValue: "GROCERY") + } + + public static var healthAndMedical: Self { + .init(rawValue: "HEALTH_AND_MEDICAL") + } + + public static var hotelAndTravel: Self { + .init(rawValue: "HOTEL_AND_TRAVEL") + } + + public static var music: Self { + .init(rawValue: "MUSIC") + } + + public static var parking: Self { + .init(rawValue: "PARKING") + } + + public static var petServices: Self { + .init(rawValue: "PET_SERVICES") + } + + public static var professionalServices: Self { + .init(rawValue: "PROFESSIONAL_SERVICES") + } + + public static var shopping: Self { + .init(rawValue: "SHOPPING") + } + + public static var ticketing: Self { + .init(rawValue: "TICKETING") + } + + public static var transit: Self { + .init(rawValue: "TRANSIT") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "AUTOMOTIVE": self = .automotive - case "BEAUTY": self = .beauty - case "BIKES": self = .bikes - case "BOOKS": self = .books - case "CASINO": self = .casino - case "EDUCATION": self = .education - case "EDUCATION_JAPAN": self = .educationJapan - case "ENTERTAINMENT": self = .entertainment - case "EV_CHARGER": self = .evCharger - case "FINANCIAL_CNY": self = .financialCny - case "FINANCIAL_EUR": self = .financialEur - case "FINANCIAL_GBP": self = .financialGbp - case "FINANCIAL_JPY": self = .financialJpy - case "FINANCIAL_USD": self = .financialUsd - case "FITNESS": self = .fitness - case "FOOD_AND_DRINK": self = .foodAndDrink - case "GAS": self = .gas - case "GROCERY": self = .grocery - case "HEALTH_AND_MEDICAL": self = .healthAndMedical - case "HOTEL_AND_TRAVEL": self = .hotelAndTravel - case "MUSIC": self = .music - case "PARKING": self = .parking - case "PET_SERVICES": self = .petServices - case "PROFESSIONAL_SERVICES": self = .professionalServices - case "SHOPPING": self = .shopping - case "TICKETING": self = .ticketing - case "TRANSIT": self = .transit - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public struct Place: Hashable, Codable { + public struct Place: Hashable, Codable, Sendable { public var categories: [String]? public var displayPoint: DisplayPoint? @@ -243,7 +266,7 @@ public struct AppClipAdvancedExperience: Hashable, Codable { case relationship } - public struct DisplayPoint: Hashable, Codable { + public struct DisplayPoint: Hashable, Codable, Sendable { public var coordinates: Coordinates? public var source: Source? @@ -261,7 +284,7 @@ public struct AppClipAdvancedExperience: Hashable, Codable { case source } - public struct Coordinates: Hashable, Codable { + public struct Coordinates: Hashable, Codable, Sendable { public var latitude: Float? public var longitude: Float? @@ -280,30 +303,28 @@ public struct AppClipAdvancedExperience: Hashable, Codable { } } - public enum Source: Hashable, Codable, RawRepresentable { - case calculated - case manuallyPlaced - case unknown(String) + public struct Source: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var calculated: Self { + .init(rawValue: "CALCULATED") + } - public var rawValue: String { - switch self { - case .calculated: return "CALCULATED" - case .manuallyPlaced: return "MANUALLY_PLACED" - case .unknown(let rawValue): return rawValue - } + public static var manuallyPlaced: Self { + .init(rawValue: "MANUALLY_PLACED") } + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "CALCULATED": self = .calculated - case "MANUALLY_PLACED": self = .manuallyPlaced - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } } - public struct MainAddress: Hashable, Codable { + public struct MainAddress: Hashable, Codable, Sendable { public var fullAddress: String? public var structuredAddress: StructuredAddress? @@ -321,7 +342,7 @@ public struct AppClipAdvancedExperience: Hashable, Codable { case structuredAddress } - public struct StructuredAddress: Hashable, Codable { + public struct StructuredAddress: Hashable, Codable, Sendable { public var countryCode: String? public var floor: String? @@ -366,62 +387,179 @@ public struct AppClipAdvancedExperience: Hashable, Codable { } } - public enum MapAction: Hashable, Codable, RawRepresentable { - case buyTickets - case hotelBookRoom - case parkingReserveParking - case restaurantJoinWaitlist - case restaurantOrderDelivery - case restaurantOrderFood - case restaurantOrderTakeout - case restaurantReservation - case restaurantViewMenu - case scheduleAppointment - case theaterNowPlaying - case viewAvailability - case viewPricing - case unknown(String) - - public var rawValue: String { - switch self { - case .buyTickets: return "BUY_TICKETS" - case .hotelBookRoom: return "HOTEL_BOOK_ROOM" - case .parkingReserveParking: return "PARKING_RESERVE_PARKING" - case .restaurantJoinWaitlist: return "RESTAURANT_JOIN_WAITLIST" - case .restaurantOrderDelivery: return "RESTAURANT_ORDER_DELIVERY" - case .restaurantOrderFood: return "RESTAURANT_ORDER_FOOD" - case .restaurantOrderTakeout: return "RESTAURANT_ORDER_TAKEOUT" - case .restaurantReservation: return "RESTAURANT_RESERVATION" - case .restaurantViewMenu: return "RESTAURANT_VIEW_MENU" - case .scheduleAppointment: return "SCHEDULE_APPOINTMENT" - case .theaterNowPlaying: return "THEATER_NOW_PLAYING" - case .viewAvailability: return "VIEW_AVAILABILITY" - case .viewPricing: return "VIEW_PRICING" - case .unknown(let rawValue): return rawValue - } + public struct MapAction: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var airlineBookTravel: Self { + .init(rawValue: "AIRLINE_BOOK_TRAVEL") + } + + public static var airlineCheckIn: Self { + .init(rawValue: "AIRLINE_CHECK_IN") + } + + public static var airlineFlightStatus: Self { + .init(rawValue: "AIRLINE_FLIGHT_STATUS") + } + + public static var apply: Self { + .init(rawValue: "APPLY") + } + + public static var book: Self { + .init(rawValue: "BOOK") + } + + public static var bookActivities: Self { + .init(rawValue: "BOOK_ACTIVITIES") + } + + public static var bookRides: Self { + .init(rawValue: "BOOK_RIDES") + } + + public static var bookTeetimes: Self { + .init(rawValue: "BOOK_TEETIMES") + } + + public static var bookTours: Self { + .init(rawValue: "BOOK_TOURS") + } + + public static var buyTickets: Self { + .init(rawValue: "BUY_TICKETS") + } + + public static var careers: Self { + .init(rawValue: "CAREERS") + } + + public static var chargeEv: Self { + .init(rawValue: "CHARGE_EV") + } + + public static var coupons: Self { + .init(rawValue: "COUPONS") + } + + public static var donate: Self { + .init(rawValue: "DONATE") + } + + public static var events: Self { + .init(rawValue: "EVENTS") + } + + public static var eventsShows: Self { + .init(rawValue: "EVENTS_SHOWS") + } + + public static var eventsSports: Self { + .init(rawValue: "EVENTS_SPORTS") + } + + public static var giftCard: Self { + .init(rawValue: "GIFT_CARD") + } + + public static var hotelAmenities: Self { + .init(rawValue: "HOTEL_AMENITIES") + } + + public static var hotelBookRoom: Self { + .init(rawValue: "HOTEL_BOOK_ROOM") + } + + public static var join: Self { + .init(rawValue: "JOIN") + } + + public static var parkingAvailable: Self { + .init(rawValue: "PARKING_AVAILABLE") + } + + public static var parkingReserveParking: Self { + .init(rawValue: "PARKING_RESERVE_PARKING") + } + + public static var restaurantJoinWaitlist: Self { + .init(rawValue: "RESTAURANT_JOIN_WAITLIST") + } + + public static var restaurantOrderDelivery: Self { + .init(rawValue: "RESTAURANT_ORDER_DELIVERY") + } + + public static var restaurantOrderFood: Self { + .init(rawValue: "RESTAURANT_ORDER_FOOD") + } + + public static var restaurantOrderTakeout: Self { + .init(rawValue: "RESTAURANT_ORDER_TAKEOUT") + } + + public static var restaurantPickup: Self { + .init(rawValue: "RESTAURANT_PICKUP") + } + + public static var restaurantReservation: Self { + .init(rawValue: "RESTAURANT_RESERVATION") + } + + public static var restaurantViewMenu: Self { + .init(rawValue: "RESTAURANT_VIEW_MENU") + } + + public static var retailServiceQuote: Self { + .init(rawValue: "RETAIL_SERVICE_QUOTE") + } + + public static var retailStoreDelivery: Self { + .init(rawValue: "RETAIL_STORE_DELIVERY") + } + + public static var retailStorePickup: Self { + .init(rawValue: "RETAIL_STORE_PICKUP") + } + + public static var retailStoreShop: Self { + .init(rawValue: "RETAIL_STORE_SHOP") + } + + public static var scheduleAppointment: Self { + .init(rawValue: "SCHEDULE_APPOINTMENT") + } + + public static var services: Self { + .init(rawValue: "SERVICES") + } + + public static var support: Self { + .init(rawValue: "SUPPORT") } + public static var theaterNowPlaying: Self { + .init(rawValue: "THEATER_NOW_PLAYING") + } + + public static var viewAvailability: Self { + .init(rawValue: "VIEW_AVAILABILITY") + } + + public static var viewPricing: Self { + .init(rawValue: "VIEW_PRICING") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "BUY_TICKETS": self = .buyTickets - case "HOTEL_BOOK_ROOM": self = .hotelBookRoom - case "PARKING_RESERVE_PARKING": self = .parkingReserveParking - case "RESTAURANT_JOIN_WAITLIST": self = .restaurantJoinWaitlist - case "RESTAURANT_ORDER_DELIVERY": self = .restaurantOrderDelivery - case "RESTAURANT_ORDER_FOOD": self = .restaurantOrderFood - case "RESTAURANT_ORDER_TAKEOUT": self = .restaurantOrderTakeout - case "RESTAURANT_RESERVATION": self = .restaurantReservation - case "RESTAURANT_VIEW_MENU": self = .restaurantViewMenu - case "SCHEDULE_APPOINTMENT": self = .scheduleAppointment - case "THEATER_NOW_PLAYING": self = .theaterNowPlaying - case "VIEW_AVAILABILITY": self = .viewAvailability - case "VIEW_PRICING": self = .viewPricing - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public struct PhoneNumber: Hashable, Codable { + public struct PhoneNumber: Hashable, Codable, Sendable { public var type: `Type`? public var intent: String? @@ -444,113 +582,110 @@ public struct AppClipAdvancedExperience: Hashable, Codable { case number } - public enum `Type`: Hashable, Codable, RawRepresentable { - case fax - case landline - case mobile - case tollfree - case unknown(String) - - public var rawValue: String { - switch self { - case .fax: return "FAX" - case .landline: return "LANDLINE" - case .mobile: return "MOBILE" - case .tollfree: return "TOLLFREE" - case .unknown(let rawValue): return rawValue - } + public struct `Type`: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var fax: Self { + .init(rawValue: "FAX") + } + + public static var landline: Self { + .init(rawValue: "LANDLINE") + } + + public static var mobile: Self { + .init(rawValue: "MOBILE") } + public static var tollfree: Self { + .init(rawValue: "TOLLFREE") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "FAX": self = .fax - case "LANDLINE": self = .landline - case "MOBILE": self = .mobile - case "TOLLFREE": self = .tollfree - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } } - public enum Relationship: Hashable, Codable, RawRepresentable { - case authorized - case other - case owner - case unknown(String) + public struct Relationship: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var authorized: Self { + .init(rawValue: "AUTHORIZED") + } - public var rawValue: String { - switch self { - case .authorized: return "AUTHORIZED" - case .other: return "OTHER" - case .owner: return "OWNER" - case .unknown(let rawValue): return rawValue - } + public static var other: Self { + .init(rawValue: "OTHER") } + public static var owner: Self { + .init(rawValue: "OWNER") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "AUTHORIZED": self = .authorized - case "OTHER": self = .other - case "OWNER": self = .owner - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } } - public enum PlaceStatus: Hashable, Codable, RawRepresentable { - case matched - case noMatch - case pending - case unknown(String) + public struct PlaceStatus: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var matched: Self { + .init(rawValue: "MATCHED") + } - public var rawValue: String { - switch self { - case .matched: return "MATCHED" - case .noMatch: return "NO_MATCH" - case .pending: return "PENDING" - case .unknown(let rawValue): return rawValue - } + public static var noMatch: Self { + .init(rawValue: "NO_MATCH") + } + + public static var pending: Self { + .init(rawValue: "PENDING") } + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "MATCHED": self = .matched - case "NO_MATCH": self = .noMatch - case "PENDING": self = .pending - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum Status: Hashable, Codable, RawRepresentable { - case appTransferInProgress - case deactivated - case received - case unknown(String) + public struct Status: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var appTransferInProgress: Self { + .init(rawValue: "APP_TRANSFER_IN_PROGRESS") + } - public var rawValue: String { - switch self { - case .appTransferInProgress: return "APP_TRANSFER_IN_PROGRESS" - case .deactivated: return "DEACTIVATED" - case .received: return "RECEIVED" - case .unknown(let rawValue): return rawValue - } + public static var deactivated: Self { + .init(rawValue: "DEACTIVATED") + } + + public static var received: Self { + .init(rawValue: "RECEIVED") + } + + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "APP_TRANSFER_IN_PROGRESS": self = .appTransferInProgress - case "DEACTIVATED": self = .deactivated - case "RECEIVED": self = .received - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } } - public struct Relationships: Hashable, Codable { + public struct Relationships: Hashable, Codable, Sendable { public var appClip: AppClip? public var headerImage: HeaderImage? @@ -573,25 +708,18 @@ public struct AppClipAdvancedExperience: Hashable, Codable { case localizations } - public struct AppClip: Hashable, Codable { + public struct AppClip: Hashable, Codable, Sendable { public var data: Data? - public var links: Links? - - public init( - data: Data? = nil, - links: Links? = nil - ) { + public init(data: Data? = nil) { self.data = data - self.links = links } private enum CodingKeys: String, CodingKey { case data - case links } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -609,50 +737,24 @@ public struct AppClipAdvancedExperience: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case appClips } } - - public struct Links: Hashable, Codable { - public var related: URL? - - public var `self`: URL? - - public init( - related: URL? = nil, - self _self: URL? = nil - ) { - self.related = related - self.`self` = _self - } - - private enum CodingKeys: String, CodingKey { - case related - case `self` = "self" - } - } } - public struct HeaderImage: Hashable, Codable { + public struct HeaderImage: Hashable, Codable, Sendable { public var data: Data? - public var links: Links? - - public init( - data: Data? = nil, - links: Links? = nil - ) { + public init(data: Data? = nil) { self.data = data - self.links = links } private enum CodingKeys: String, CodingKey { case data - case links } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -670,55 +772,31 @@ public struct AppClipAdvancedExperience: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case appClipAdvancedExperienceImages } } - - public struct Links: Hashable, Codable { - public var related: URL? - - public var `self`: URL? - - public init( - related: URL? = nil, - self _self: URL? = nil - ) { - self.related = related - self.`self` = _self - } - - private enum CodingKeys: String, CodingKey { - case related - case `self` = "self" - } - } } - public struct Localizations: Hashable, Codable { + public struct Localizations: Hashable, Codable, Sendable { public var data: [Data]? - public var links: Links? - public var meta: PagingInformation? public init( data: [Data]? = nil, - links: Links? = nil, meta: PagingInformation? = nil ) { self.data = data - self.links = links self.meta = meta } private enum CodingKeys: String, CodingKey { case data - case links case meta } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -736,29 +814,10 @@ public struct AppClipAdvancedExperience: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case appClipAdvancedExperienceLocalizations } } - - public struct Links: Hashable, Codable { - public var related: URL? - - public var `self`: URL? - - public init( - related: URL? = nil, - self _self: URL? = nil - ) { - self.related = related - self.`self` = _self - } - - private enum CodingKeys: String, CodingKey { - case related - case `self` = "self" - } - } } } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/AppClipAdvancedExperienceImage.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/AppClipAdvancedExperienceImage.generated.swift index bcf8995c..5444dd13 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/AppClipAdvancedExperienceImage.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/AppClipAdvancedExperienceImage.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct AppClipAdvancedExperienceImage: Hashable, Codable { +public struct AppClipAdvancedExperienceImage: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -31,11 +31,11 @@ public struct AppClipAdvancedExperienceImage: Hashable, Codable { case links } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case appClipAdvancedExperienceImages } - public struct Attributes: Hashable, Codable { + public struct Attributes: Hashable, Codable, Sendable { public var assetDeliveryState: AppMediaAssetState? public var fileName: String? diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/AppClipAdvancedExperienceLanguage.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/AppClipAdvancedExperienceLanguage.generated.swift index 55bb0531..b56f7226 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/AppClipAdvancedExperienceLanguage.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/AppClipAdvancedExperienceLanguage.generated.swift @@ -3,115 +3,143 @@ // swiftlint:disable all import Foundation -public enum AppClipAdvancedExperienceLanguage: Hashable, Codable, RawRepresentable { - case ar - case ca - case cs - case da - case de - case el - case en - case es - case fi - case fr - case he - case hi - case hr - case hu - case id - case it - case ja - case ko - case ms - case nl - case no - case pl - case pt - case ro - case ru - case sk - case sv - case th - case tr - case uk - case vi - case zh - case unknown(String) - - public var rawValue: String { - switch self { - case .ar: return "AR" - case .ca: return "CA" - case .cs: return "CS" - case .da: return "DA" - case .de: return "DE" - case .el: return "EL" - case .en: return "EN" - case .es: return "ES" - case .fi: return "FI" - case .fr: return "FR" - case .he: return "HE" - case .hi: return "HI" - case .hr: return "HR" - case .hu: return "HU" - case .id: return "ID" - case .it: return "IT" - case .ja: return "JA" - case .ko: return "KO" - case .ms: return "MS" - case .nl: return "NL" - case .no: return "NO" - case .pl: return "PL" - case .pt: return "PT" - case .ro: return "RO" - case .ru: return "RU" - case .sk: return "SK" - case .sv: return "SV" - case .th: return "TH" - case .tr: return "TR" - case .uk: return "UK" - case .vi: return "VI" - case .zh: return "ZH" - case .unknown(let rawValue): return rawValue - } +public struct AppClipAdvancedExperienceLanguage: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var ar: Self { + .init(rawValue: "AR") } + public static var ca: Self { + .init(rawValue: "CA") + } + + public static var cs: Self { + .init(rawValue: "CS") + } + + public static var da: Self { + .init(rawValue: "DA") + } + + public static var de: Self { + .init(rawValue: "DE") + } + + public static var el: Self { + .init(rawValue: "EL") + } + + public static var en: Self { + .init(rawValue: "EN") + } + + public static var es: Self { + .init(rawValue: "ES") + } + + public static var fi: Self { + .init(rawValue: "FI") + } + + public static var fr: Self { + .init(rawValue: "FR") + } + + public static var he: Self { + .init(rawValue: "HE") + } + + public static var hi: Self { + .init(rawValue: "HI") + } + + public static var hr: Self { + .init(rawValue: "HR") + } + + public static var hu: Self { + .init(rawValue: "HU") + } + + public static var id: Self { + .init(rawValue: "ID") + } + + public static var it: Self { + .init(rawValue: "IT") + } + + public static var ja: Self { + .init(rawValue: "JA") + } + + public static var ko: Self { + .init(rawValue: "KO") + } + + public static var ms: Self { + .init(rawValue: "MS") + } + + public static var nl: Self { + .init(rawValue: "NL") + } + + public static var no: Self { + .init(rawValue: "NO") + } + + public static var pl: Self { + .init(rawValue: "PL") + } + + public static var pt: Self { + .init(rawValue: "PT") + } + + public static var ro: Self { + .init(rawValue: "RO") + } + + public static var ru: Self { + .init(rawValue: "RU") + } + + public static var sk: Self { + .init(rawValue: "SK") + } + + public static var sv: Self { + .init(rawValue: "SV") + } + + public static var th: Self { + .init(rawValue: "TH") + } + + public static var tr: Self { + .init(rawValue: "TR") + } + + public static var uk: Self { + .init(rawValue: "UK") + } + + public static var vi: Self { + .init(rawValue: "VI") + } + + public static var zh: Self { + .init(rawValue: "ZH") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "AR": self = .ar - case "CA": self = .ca - case "CS": self = .cs - case "DA": self = .da - case "DE": self = .de - case "EL": self = .el - case "EN": self = .en - case "ES": self = .es - case "FI": self = .fi - case "FR": self = .fr - case "HE": self = .he - case "HI": self = .hi - case "HR": self = .hr - case "HU": self = .hu - case "ID": self = .id - case "IT": self = .it - case "JA": self = .ja - case "KO": self = .ko - case "MS": self = .ms - case "NL": self = .nl - case "NO": self = .no - case "PL": self = .pl - case "PT": self = .pt - case "RO": self = .ro - case "RU": self = .ru - case "SK": self = .sk - case "SV": self = .sv - case "TH": self = .th - case "TR": self = .tr - case "UK": self = .uk - case "VI": self = .vi - case "ZH": self = .zh - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/AppClipAdvancedExperienceLocalization.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/AppClipAdvancedExperienceLocalization.generated.swift index ff783a8f..71b35021 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/AppClipAdvancedExperienceLocalization.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/AppClipAdvancedExperienceLocalization.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct AppClipAdvancedExperienceLocalization: Hashable, Codable { +public struct AppClipAdvancedExperienceLocalization: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -31,11 +31,11 @@ public struct AppClipAdvancedExperienceLocalization: Hashable, Codable { case links } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case appClipAdvancedExperienceLocalizations } - public struct Attributes: Hashable, Codable { + public struct Attributes: Hashable, Codable, Sendable { public var language: AppClipAdvancedExperienceLanguage? public var subtitle: String? diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/AppClipAdvancedExperienceLocalizationInlineCreate.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/AppClipAdvancedExperienceLocalizationInlineCreate.generated.swift index 22acd888..87f46385 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/AppClipAdvancedExperienceLocalizationInlineCreate.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/AppClipAdvancedExperienceLocalizationInlineCreate.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct AppClipAdvancedExperienceLocalizationInlineCreate: Hashable, Codable { +public struct AppClipAdvancedExperienceLocalizationInlineCreate: Hashable, Codable, Sendable { public var id: String? public var type: `Type` @@ -26,11 +26,11 @@ public struct AppClipAdvancedExperienceLocalizationInlineCreate: Hashable, Codab case attributes } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case appClipAdvancedExperienceLocalizations } - public struct Attributes: Hashable, Codable { + public struct Attributes: Hashable, Codable, Sendable { public var language: AppClipAdvancedExperienceLanguage? public var subtitle: String? diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/AppClipAppStoreReviewDetail.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/AppClipAppStoreReviewDetail.generated.swift index 6307ac55..47e50342 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/AppClipAppStoreReviewDetail.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/AppClipAppStoreReviewDetail.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct AppClipAppStoreReviewDetail: Hashable, Codable { +public struct AppClipAppStoreReviewDetail: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -36,11 +36,11 @@ public struct AppClipAppStoreReviewDetail: Hashable, Codable { case links } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case appClipAppStoreReviewDetails } - public struct Attributes: Hashable, Codable { + public struct Attributes: Hashable, Codable, Sendable { public var invocationUrls: [URL]? public init(invocationUrls: [URL]? = nil) { @@ -52,7 +52,7 @@ public struct AppClipAppStoreReviewDetail: Hashable, Codable { } } - public struct Relationships: Hashable, Codable { + public struct Relationships: Hashable, Codable, Sendable { public var appClipDefaultExperience: AppClipDefaultExperience? public init(appClipDefaultExperience: AppClipDefaultExperience? = nil) { @@ -63,25 +63,18 @@ public struct AppClipAppStoreReviewDetail: Hashable, Codable { case appClipDefaultExperience } - public struct AppClipDefaultExperience: Hashable, Codable { + public struct AppClipDefaultExperience: Hashable, Codable, Sendable { public var data: Data? - public var links: Links? - - public init( - data: Data? = nil, - links: Links? = nil - ) { + public init(data: Data? = nil) { self.data = data - self.links = links } private enum CodingKeys: String, CodingKey { case data - case links } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -99,29 +92,10 @@ public struct AppClipAppStoreReviewDetail: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case appClipDefaultExperiences } } - - public struct Links: Hashable, Codable { - public var related: URL? - - public var `self`: URL? - - public init( - related: URL? = nil, - self _self: URL? = nil - ) { - self.related = related - self.`self` = _self - } - - private enum CodingKeys: String, CodingKey { - case related - case `self` = "self" - } - } } } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/AppClipDefaultExperience.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/AppClipDefaultExperience.generated.swift index 97c80383..4eb3cd2f 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/AppClipDefaultExperience.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/AppClipDefaultExperience.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct AppClipDefaultExperience: Hashable, Codable { +public struct AppClipDefaultExperience: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -36,11 +36,11 @@ public struct AppClipDefaultExperience: Hashable, Codable { case links } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case appClipDefaultExperiences } - public struct Attributes: Hashable, Codable { + public struct Attributes: Hashable, Codable, Sendable { public var action: AppClipAction? public init(action: AppClipAction? = nil) { @@ -52,7 +52,7 @@ public struct AppClipDefaultExperience: Hashable, Codable { } } - public struct Relationships: Hashable, Codable { + public struct Relationships: Hashable, Codable, Sendable { public var appClip: AppClip? public var appClipAppStoreReviewDetail: AppClipAppStoreReviewDetail? @@ -80,25 +80,18 @@ public struct AppClipDefaultExperience: Hashable, Codable { case releaseWithAppStoreVersion } - public struct AppClip: Hashable, Codable { + public struct AppClip: Hashable, Codable, Sendable { public var data: Data? - public var links: Links? - - public init( - data: Data? = nil, - links: Links? = nil - ) { + public init(data: Data? = nil) { self.data = data - self.links = links } private enum CodingKeys: String, CodingKey { case data - case links } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -116,39 +109,20 @@ public struct AppClipDefaultExperience: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case appClips } } - - public struct Links: Hashable, Codable { - public var related: URL? - - public var `self`: URL? - - public init( - related: URL? = nil, - self _self: URL? = nil - ) { - self.related = related - self.`self` = _self - } - - private enum CodingKeys: String, CodingKey { - case related - case `self` = "self" - } - } } - public struct AppClipAppStoreReviewDetail: Hashable, Codable { + public struct AppClipAppStoreReviewDetail: Hashable, Codable, Sendable { public var data: Data? - public var links: Links? + public var links: RelationshipLinks? public init( data: Data? = nil, - links: Links? = nil + links: RelationshipLinks? = nil ) { self.data = data self.links = links @@ -159,7 +133,7 @@ public struct AppClipDefaultExperience: Hashable, Codable { case links } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -177,41 +151,22 @@ public struct AppClipDefaultExperience: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case appClipAppStoreReviewDetails } } - - public struct Links: Hashable, Codable { - public var related: URL? - - public var `self`: URL? - - public init( - related: URL? = nil, - self _self: URL? = nil - ) { - self.related = related - self.`self` = _self - } - - private enum CodingKeys: String, CodingKey { - case related - case `self` = "self" - } - } } - public struct AppClipDefaultExperienceLocalizations: Hashable, Codable { + public struct AppClipDefaultExperienceLocalizations: Hashable, Codable, Sendable { public var data: [Data]? - public var links: Links? + public var links: RelationshipLinks? public var meta: PagingInformation? public init( data: [Data]? = nil, - links: Links? = nil, + links: RelationshipLinks? = nil, meta: PagingInformation? = nil ) { self.data = data @@ -225,7 +180,7 @@ public struct AppClipDefaultExperience: Hashable, Codable { case meta } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -243,39 +198,20 @@ public struct AppClipDefaultExperience: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case appClipDefaultExperienceLocalizations } } - - public struct Links: Hashable, Codable { - public var related: URL? - - public var `self`: URL? - - public init( - related: URL? = nil, - self _self: URL? = nil - ) { - self.related = related - self.`self` = _self - } - - private enum CodingKeys: String, CodingKey { - case related - case `self` = "self" - } - } } - public struct ReleaseWithAppStoreVersion: Hashable, Codable { + public struct ReleaseWithAppStoreVersion: Hashable, Codable, Sendable { public var data: Data? - public var links: Links? + public var links: RelationshipLinks? public init( data: Data? = nil, - links: Links? = nil + links: RelationshipLinks? = nil ) { self.data = data self.links = links @@ -286,7 +222,7 @@ public struct AppClipDefaultExperience: Hashable, Codable { case links } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -304,29 +240,10 @@ public struct AppClipDefaultExperience: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case appStoreVersions } } - - public struct Links: Hashable, Codable { - public var related: URL? - - public var `self`: URL? - - public init( - related: URL? = nil, - self _self: URL? = nil - ) { - self.related = related - self.`self` = _self - } - - private enum CodingKeys: String, CodingKey { - case related - case `self` = "self" - } - } } } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/AppClipDefaultExperienceLocalization.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/AppClipDefaultExperienceLocalization.generated.swift index 17126384..c851e282 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/AppClipDefaultExperienceLocalization.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/AppClipDefaultExperienceLocalization.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct AppClipDefaultExperienceLocalization: Hashable, Codable { +public struct AppClipDefaultExperienceLocalization: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -36,11 +36,11 @@ public struct AppClipDefaultExperienceLocalization: Hashable, Codable { case links } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case appClipDefaultExperienceLocalizations } - public struct Attributes: Hashable, Codable { + public struct Attributes: Hashable, Codable, Sendable { public var locale: String? public var subtitle: String? @@ -59,7 +59,7 @@ public struct AppClipDefaultExperienceLocalization: Hashable, Codable { } } - public struct Relationships: Hashable, Codable { + public struct Relationships: Hashable, Codable, Sendable { public var appClipDefaultExperience: AppClipDefaultExperience? public var appClipHeaderImage: AppClipHeaderImage? @@ -77,25 +77,18 @@ public struct AppClipDefaultExperienceLocalization: Hashable, Codable { case appClipHeaderImage } - public struct AppClipDefaultExperience: Hashable, Codable { + public struct AppClipDefaultExperience: Hashable, Codable, Sendable { public var data: Data? - public var links: Links? - - public init( - data: Data? = nil, - links: Links? = nil - ) { + public init(data: Data? = nil) { self.data = data - self.links = links } private enum CodingKeys: String, CodingKey { case data - case links } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -113,39 +106,20 @@ public struct AppClipDefaultExperienceLocalization: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case appClipDefaultExperiences } } - - public struct Links: Hashable, Codable { - public var related: URL? - - public var `self`: URL? - - public init( - related: URL? = nil, - self _self: URL? = nil - ) { - self.related = related - self.`self` = _self - } - - private enum CodingKeys: String, CodingKey { - case related - case `self` = "self" - } - } } - public struct AppClipHeaderImage: Hashable, Codable { + public struct AppClipHeaderImage: Hashable, Codable, Sendable { public var data: Data? - public var links: Links? + public var links: RelationshipLinks? public init( data: Data? = nil, - links: Links? = nil + links: RelationshipLinks? = nil ) { self.data = data self.links = links @@ -156,7 +130,7 @@ public struct AppClipDefaultExperienceLocalization: Hashable, Codable { case links } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -174,29 +148,10 @@ public struct AppClipDefaultExperienceLocalization: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case appClipHeaderImages } } - - public struct Links: Hashable, Codable { - public var related: URL? - - public var `self`: URL? - - public init( - related: URL? = nil, - self _self: URL? = nil - ) { - self.related = related - self.`self` = _self - } - - private enum CodingKeys: String, CodingKey { - case related - case `self` = "self" - } - } } } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/AppClipDomainStatus.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/AppClipDomainStatus.generated.swift index 50fb0d51..d5938ff1 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/AppClipDomainStatus.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/AppClipDomainStatus.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct AppClipDomainStatus: Hashable, Codable { +public struct AppClipDomainStatus: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -31,11 +31,11 @@ public struct AppClipDomainStatus: Hashable, Codable { case links } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case appClipDomainStatuses } - public struct Attributes: Hashable, Codable { + public struct Attributes: Hashable, Codable, Sendable { public var domains: [Domains]? public var lastUpdatedDate: String? @@ -53,7 +53,7 @@ public struct AppClipDomainStatus: Hashable, Codable { case lastUpdatedDate } - public struct Domains: Hashable, Codable { + public struct Domains: Hashable, Codable, Sendable { public var domain: String? public var errorCode: ErrorCode? @@ -81,67 +81,87 @@ public struct AppClipDomainStatus: Hashable, Codable { case lastUpdatedDate } - public enum ErrorCode: Hashable, Codable, RawRepresentable { - case badHttpResponse - case badJsonContent - case badPkcs7Signature - case cannotReachAasaFile - case dnsError - case insecureRedirectsForbidden - case invalidEntitlementMissingSection - case invalidEntitlementSyntaxError - case invalidEntitlementUnhandledSection - case invalidEntitlementUnknownId - case networkError - case networkErrorTemporary - case otherError - case timeout - case tlsError - case unexpectedError - case unknown(String) - - public var rawValue: String { - switch self { - case .badHttpResponse: return "BAD_HTTP_RESPONSE" - case .badJsonContent: return "BAD_JSON_CONTENT" - case .badPkcs7Signature: return "BAD_PKCS7_SIGNATURE" - case .cannotReachAasaFile: return "CANNOT_REACH_AASA_FILE" - case .dnsError: return "DNS_ERROR" - case .insecureRedirectsForbidden: return "INSECURE_REDIRECTS_FORBIDDEN" - case .invalidEntitlementMissingSection: return "INVALID_ENTITLEMENT_MISSING_SECTION" - case .invalidEntitlementSyntaxError: return "INVALID_ENTITLEMENT_SYNTAX_ERROR" - case .invalidEntitlementUnhandledSection: return "INVALID_ENTITLEMENT_UNHANDLED_SECTION" - case .invalidEntitlementUnknownId: return "INVALID_ENTITLEMENT_UNKNOWN_ID" - case .networkError: return "NETWORK_ERROR" - case .networkErrorTemporary: return "NETWORK_ERROR_TEMPORARY" - case .otherError: return "OTHER_ERROR" - case .timeout: return "TIMEOUT" - case .tlsError: return "TLS_ERROR" - case .unexpectedError: return "UNEXPECTED_ERROR" - case .unknown(let rawValue): return rawValue - } + public struct ErrorCode: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var badHttpResponse: Self { + .init(rawValue: "BAD_HTTP_RESPONSE") } + public static var badJsonContent: Self { + .init(rawValue: "BAD_JSON_CONTENT") + } + + public static var badPkcs7Signature: Self { + .init(rawValue: "BAD_PKCS7_SIGNATURE") + } + + public static var cannotReachAasaFile: Self { + .init(rawValue: "CANNOT_REACH_AASA_FILE") + } + + public static var crossSiteRedirectsForbidden: Self { + .init(rawValue: "CROSS_SITE_REDIRECTS_FORBIDDEN") + } + + public static var dnsError: Self { + .init(rawValue: "DNS_ERROR") + } + + public static var insecureRedirectsForbidden: Self { + .init(rawValue: "INSECURE_REDIRECTS_FORBIDDEN") + } + + public static var invalidEntitlementMissingSection: Self { + .init(rawValue: "INVALID_ENTITLEMENT_MISSING_SECTION") + } + + public static var invalidEntitlementSyntaxError: Self { + .init(rawValue: "INVALID_ENTITLEMENT_SYNTAX_ERROR") + } + + public static var invalidEntitlementUnhandledSection: Self { + .init(rawValue: "INVALID_ENTITLEMENT_UNHANDLED_SECTION") + } + + public static var invalidEntitlementUnknownId: Self { + .init(rawValue: "INVALID_ENTITLEMENT_UNKNOWN_ID") + } + + public static var networkError: Self { + .init(rawValue: "NETWORK_ERROR") + } + + public static var networkErrorTemporary: Self { + .init(rawValue: "NETWORK_ERROR_TEMPORARY") + } + + public static var otherError: Self { + .init(rawValue: "OTHER_ERROR") + } + + public static var timeout: Self { + .init(rawValue: "TIMEOUT") + } + + public static var tlsError: Self { + .init(rawValue: "TLS_ERROR") + } + + public static var tooManyRedirects: Self { + .init(rawValue: "TOO_MANY_REDIRECTS") + } + + public static var unexpectedError: Self { + .init(rawValue: "UNEXPECTED_ERROR") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "BAD_HTTP_RESPONSE": self = .badHttpResponse - case "BAD_JSON_CONTENT": self = .badJsonContent - case "BAD_PKCS7_SIGNATURE": self = .badPkcs7Signature - case "CANNOT_REACH_AASA_FILE": self = .cannotReachAasaFile - case "DNS_ERROR": self = .dnsError - case "INSECURE_REDIRECTS_FORBIDDEN": self = .insecureRedirectsForbidden - case "INVALID_ENTITLEMENT_MISSING_SECTION": self = .invalidEntitlementMissingSection - case "INVALID_ENTITLEMENT_SYNTAX_ERROR": self = .invalidEntitlementSyntaxError - case "INVALID_ENTITLEMENT_UNHANDLED_SECTION": self = .invalidEntitlementUnhandledSection - case "INVALID_ENTITLEMENT_UNKNOWN_ID": self = .invalidEntitlementUnknownId - case "NETWORK_ERROR": self = .networkError - case "NETWORK_ERROR_TEMPORARY": self = .networkErrorTemporary - case "OTHER_ERROR": self = .otherError - case "TIMEOUT": self = .timeout - case "TLS_ERROR": self = .tlsError - case "UNEXPECTED_ERROR": self = .unexpectedError - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/AppClipHeaderImage.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/AppClipHeaderImage.generated.swift index ecb8b1ff..f931c184 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/AppClipHeaderImage.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/AppClipHeaderImage.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct AppClipHeaderImage: Hashable, Codable { +public struct AppClipHeaderImage: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -36,11 +36,11 @@ public struct AppClipHeaderImage: Hashable, Codable { case links } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case appClipHeaderImages } - public struct Attributes: Hashable, Codable { + public struct Attributes: Hashable, Codable, Sendable { public var assetDeliveryState: AppMediaAssetState? public var fileName: String? @@ -79,7 +79,7 @@ public struct AppClipHeaderImage: Hashable, Codable { } } - public struct Relationships: Hashable, Codable { + public struct Relationships: Hashable, Codable, Sendable { public var appClipDefaultExperienceLocalization: AppClipDefaultExperienceLocalization? public init(appClipDefaultExperienceLocalization: AppClipDefaultExperienceLocalization? = nil) { @@ -90,25 +90,18 @@ public struct AppClipHeaderImage: Hashable, Codable { case appClipDefaultExperienceLocalization } - public struct AppClipDefaultExperienceLocalization: Hashable, Codable { + public struct AppClipDefaultExperienceLocalization: Hashable, Codable, Sendable { public var data: Data? - public var links: Links? - - public init( - data: Data? = nil, - links: Links? = nil - ) { + public init(data: Data? = nil) { self.data = data - self.links = links } private enum CodingKeys: String, CodingKey { case data - case links } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -126,29 +119,10 @@ public struct AppClipHeaderImage: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case appClipDefaultExperienceLocalizations } } - - public struct Links: Hashable, Codable { - public var related: URL? - - public var `self`: URL? - - public init( - related: URL? = nil, - self _self: URL? = nil - ) { - self.related = related - self.`self` = _self - } - - private enum CodingKeys: String, CodingKey { - case related - case `self` = "self" - } - } } } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/AppCustomProductPage.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/AppCustomProductPage.generated.swift index aa3da70f..337a606d 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/AppCustomProductPage.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/AppCustomProductPage.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct AppCustomProductPage: Hashable, Codable { +public struct AppCustomProductPage: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -36,11 +36,11 @@ public struct AppCustomProductPage: Hashable, Codable { case links } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case appCustomProductPages } - public struct Attributes: Hashable, Codable { + public struct Attributes: Hashable, Codable, Sendable { public var name: String? public var url: URL? @@ -64,7 +64,7 @@ public struct AppCustomProductPage: Hashable, Codable { } } - public struct Relationships: Hashable, Codable { + public struct Relationships: Hashable, Codable, Sendable { public var app: App? public var appCustomProductPageVersions: AppCustomProductPageVersions? @@ -82,25 +82,18 @@ public struct AppCustomProductPage: Hashable, Codable { case appCustomProductPageVersions } - public struct App: Hashable, Codable { + public struct App: Hashable, Codable, Sendable { public var data: Data? - public var links: Links? - - public init( - data: Data? = nil, - links: Links? = nil - ) { + public init(data: Data? = nil) { self.data = data - self.links = links } private enum CodingKeys: String, CodingKey { case data - case links } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -118,41 +111,22 @@ public struct AppCustomProductPage: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case apps } } - - public struct Links: Hashable, Codable { - public var related: URL? - - public var `self`: URL? - - public init( - related: URL? = nil, - self _self: URL? = nil - ) { - self.related = related - self.`self` = _self - } - - private enum CodingKeys: String, CodingKey { - case related - case `self` = "self" - } - } } - public struct AppCustomProductPageVersions: Hashable, Codable { + public struct AppCustomProductPageVersions: Hashable, Codable, Sendable { public var data: [Data]? - public var links: Links? + public var links: RelationshipLinks? public var meta: PagingInformation? public init( data: [Data]? = nil, - links: Links? = nil, + links: RelationshipLinks? = nil, meta: PagingInformation? = nil ) { self.data = data @@ -166,7 +140,7 @@ public struct AppCustomProductPage: Hashable, Codable { case meta } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -184,29 +158,10 @@ public struct AppCustomProductPage: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case appCustomProductPageVersions } } - - public struct Links: Hashable, Codable { - public var related: URL? - - public var `self`: URL? - - public init( - related: URL? = nil, - self _self: URL? = nil - ) { - self.related = related - self.`self` = _self - } - - private enum CodingKeys: String, CodingKey { - case related - case `self` = "self" - } - } } } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/AppCustomProductPageLocalization.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/AppCustomProductPageLocalization.generated.swift index 3363d586..1c35b2fb 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/AppCustomProductPageLocalization.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/AppCustomProductPageLocalization.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct AppCustomProductPageLocalization: Hashable, Codable { +public struct AppCustomProductPageLocalization: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -36,11 +36,11 @@ public struct AppCustomProductPageLocalization: Hashable, Codable { case links } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case appCustomProductPageLocalizations } - public struct Attributes: Hashable, Codable { + public struct Attributes: Hashable, Codable, Sendable { public var locale: String? public var promotionalText: String? @@ -59,7 +59,7 @@ public struct AppCustomProductPageLocalization: Hashable, Codable { } } - public struct Relationships: Hashable, Codable { + public struct Relationships: Hashable, Codable, Sendable { public var appCustomProductPageVersion: AppCustomProductPageVersion? public var appPreviewSets: AppPreviewSets? @@ -82,25 +82,18 @@ public struct AppCustomProductPageLocalization: Hashable, Codable { case appScreenshotSets } - public struct AppCustomProductPageVersion: Hashable, Codable { + public struct AppCustomProductPageVersion: Hashable, Codable, Sendable { public var data: Data? - public var links: Links? - - public init( - data: Data? = nil, - links: Links? = nil - ) { + public init(data: Data? = nil) { self.data = data - self.links = links } private enum CodingKeys: String, CodingKey { case data - case links } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -118,41 +111,22 @@ public struct AppCustomProductPageLocalization: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case appCustomProductPageVersions } } - - public struct Links: Hashable, Codable { - public var related: URL? - - public var `self`: URL? - - public init( - related: URL? = nil, - self _self: URL? = nil - ) { - self.related = related - self.`self` = _self - } - - private enum CodingKeys: String, CodingKey { - case related - case `self` = "self" - } - } } - public struct AppPreviewSets: Hashable, Codable { + public struct AppPreviewSets: Hashable, Codable, Sendable { public var data: [Data]? - public var links: Links? + public var links: RelationshipLinks? public var meta: PagingInformation? public init( data: [Data]? = nil, - links: Links? = nil, + links: RelationshipLinks? = nil, meta: PagingInformation? = nil ) { self.data = data @@ -166,7 +140,7 @@ public struct AppCustomProductPageLocalization: Hashable, Codable { case meta } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -184,41 +158,22 @@ public struct AppCustomProductPageLocalization: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case appPreviewSets } } - - public struct Links: Hashable, Codable { - public var related: URL? - - public var `self`: URL? - - public init( - related: URL? = nil, - self _self: URL? = nil - ) { - self.related = related - self.`self` = _self - } - - private enum CodingKeys: String, CodingKey { - case related - case `self` = "self" - } - } } - public struct AppScreenshotSets: Hashable, Codable { + public struct AppScreenshotSets: Hashable, Codable, Sendable { public var data: [Data]? - public var links: Links? + public var links: RelationshipLinks? public var meta: PagingInformation? public init( data: [Data]? = nil, - links: Links? = nil, + links: RelationshipLinks? = nil, meta: PagingInformation? = nil ) { self.data = data @@ -232,7 +187,7 @@ public struct AppCustomProductPageLocalization: Hashable, Codable { case meta } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -250,29 +205,10 @@ public struct AppCustomProductPageLocalization: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case appScreenshotSets } } - - public struct Links: Hashable, Codable { - public var related: URL? - - public var `self`: URL? - - public init( - related: URL? = nil, - self _self: URL? = nil - ) { - self.related = related - self.`self` = _self - } - - private enum CodingKeys: String, CodingKey { - case related - case `self` = "self" - } - } } } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/AppCustomProductPageLocalizationInlineCreate.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/AppCustomProductPageLocalizationInlineCreate.generated.swift index b42a0785..2e2c61db 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/AppCustomProductPageLocalizationInlineCreate.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/AppCustomProductPageLocalizationInlineCreate.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct AppCustomProductPageLocalizationInlineCreate: Hashable, Codable { +public struct AppCustomProductPageLocalizationInlineCreate: Hashable, Codable, Sendable { public var id: String? public var type: `Type` @@ -31,11 +31,11 @@ public struct AppCustomProductPageLocalizationInlineCreate: Hashable, Codable { case relationships } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case appCustomProductPageLocalizations } - public struct Attributes: Hashable, Codable { + public struct Attributes: Hashable, Codable, Sendable { public var locale: String public var promotionalText: String? @@ -54,7 +54,7 @@ public struct AppCustomProductPageLocalizationInlineCreate: Hashable, Codable { } } - public struct Relationships: Hashable, Codable { + public struct Relationships: Hashable, Codable, Sendable { public var appCustomProductPageVersion: AppCustomProductPageVersion? public init(appCustomProductPageVersion: AppCustomProductPageVersion? = nil) { @@ -65,7 +65,7 @@ public struct AppCustomProductPageLocalizationInlineCreate: Hashable, Codable { case appCustomProductPageVersion } - public struct AppCustomProductPageVersion: Hashable, Codable { + public struct AppCustomProductPageVersion: Hashable, Codable, Sendable { public var data: Data? public init(data: Data? = nil) { @@ -76,7 +76,7 @@ public struct AppCustomProductPageLocalizationInlineCreate: Hashable, Codable { case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -94,7 +94,7 @@ public struct AppCustomProductPageLocalizationInlineCreate: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case appCustomProductPageVersions } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/AppCustomProductPageVersion.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/AppCustomProductPageVersion.generated.swift index 146c4156..01937b19 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/AppCustomProductPageVersion.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/AppCustomProductPageVersion.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct AppCustomProductPageVersion: Hashable, Codable { +public struct AppCustomProductPageVersion: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -36,70 +36,79 @@ public struct AppCustomProductPageVersion: Hashable, Codable { case links } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case appCustomProductPageVersions } - public struct Attributes: Hashable, Codable { + public struct Attributes: Hashable, Codable, Sendable { + public var deepLink: URL? + public var state: State? public var version: String? public init( + deepLink: URL? = nil, state: State? = nil, version: String? = nil ) { + self.deepLink = deepLink self.state = state self.version = version } private enum CodingKeys: String, CodingKey { + case deepLink case state case version } - public enum State: Hashable, Codable, RawRepresentable { - case accepted - case approved - case inReview - case prepareForSubmission - case readyForReview - case rejected - case replacedWithNewVersion - case waitingForReview - case unknown(String) - - public var rawValue: String { - switch self { - case .accepted: return "ACCEPTED" - case .approved: return "APPROVED" - case .inReview: return "IN_REVIEW" - case .prepareForSubmission: return "PREPARE_FOR_SUBMISSION" - case .readyForReview: return "READY_FOR_REVIEW" - case .rejected: return "REJECTED" - case .replacedWithNewVersion: return "REPLACED_WITH_NEW_VERSION" - case .waitingForReview: return "WAITING_FOR_REVIEW" - case .unknown(let rawValue): return rawValue - } + public struct State: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var accepted: Self { + .init(rawValue: "ACCEPTED") + } + + public static var approved: Self { + .init(rawValue: "APPROVED") + } + + public static var inReview: Self { + .init(rawValue: "IN_REVIEW") + } + + public static var prepareForSubmission: Self { + .init(rawValue: "PREPARE_FOR_SUBMISSION") + } + + public static var readyForReview: Self { + .init(rawValue: "READY_FOR_REVIEW") + } + + public static var rejected: Self { + .init(rawValue: "REJECTED") } + public static var replacedWithNewVersion: Self { + .init(rawValue: "REPLACED_WITH_NEW_VERSION") + } + + public static var waitingForReview: Self { + .init(rawValue: "WAITING_FOR_REVIEW") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "ACCEPTED": self = .accepted - case "APPROVED": self = .approved - case "IN_REVIEW": self = .inReview - case "PREPARE_FOR_SUBMISSION": self = .prepareForSubmission - case "READY_FOR_REVIEW": self = .readyForReview - case "REJECTED": self = .rejected - case "REPLACED_WITH_NEW_VERSION": self = .replacedWithNewVersion - case "WAITING_FOR_REVIEW": self = .waitingForReview - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } } - public struct Relationships: Hashable, Codable { + public struct Relationships: Hashable, Codable, Sendable { public var appCustomProductPage: AppCustomProductPage? public var appCustomProductPageLocalizations: AppCustomProductPageLocalizations? @@ -117,25 +126,18 @@ public struct AppCustomProductPageVersion: Hashable, Codable { case appCustomProductPageLocalizations } - public struct AppCustomProductPage: Hashable, Codable { + public struct AppCustomProductPage: Hashable, Codable, Sendable { public var data: Data? - public var links: Links? - - public init( - data: Data? = nil, - links: Links? = nil - ) { + public init(data: Data? = nil) { self.data = data - self.links = links } private enum CodingKeys: String, CodingKey { case data - case links } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -153,41 +155,22 @@ public struct AppCustomProductPageVersion: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case appCustomProductPages } } - - public struct Links: Hashable, Codable { - public var related: URL? - - public var `self`: URL? - - public init( - related: URL? = nil, - self _self: URL? = nil - ) { - self.related = related - self.`self` = _self - } - - private enum CodingKeys: String, CodingKey { - case related - case `self` = "self" - } - } } - public struct AppCustomProductPageLocalizations: Hashable, Codable { + public struct AppCustomProductPageLocalizations: Hashable, Codable, Sendable { public var data: [Data]? - public var links: Links? + public var links: RelationshipLinks? public var meta: PagingInformation? public init( data: [Data]? = nil, - links: Links? = nil, + links: RelationshipLinks? = nil, meta: PagingInformation? = nil ) { self.data = data @@ -201,7 +184,7 @@ public struct AppCustomProductPageVersion: Hashable, Codable { case meta } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -219,29 +202,10 @@ public struct AppCustomProductPageVersion: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case appCustomProductPageLocalizations } } - - public struct Links: Hashable, Codable { - public var related: URL? - - public var `self`: URL? - - public init( - related: URL? = nil, - self _self: URL? = nil - ) { - self.related = related - self.`self` = _self - } - - private enum CodingKeys: String, CodingKey { - case related - case `self` = "self" - } - } } } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/AppCustomProductPageVersionInlineCreate.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/AppCustomProductPageVersionInlineCreate.generated.swift index 91b2868c..1f056069 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/AppCustomProductPageVersionInlineCreate.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/AppCustomProductPageVersionInlineCreate.generated.swift @@ -3,34 +3,51 @@ // swiftlint:disable all import Foundation -public struct AppCustomProductPageVersionInlineCreate: Hashable, Codable { +public struct AppCustomProductPageVersionInlineCreate: Hashable, Codable, Sendable { public var id: String? public var type: `Type` + public var attributes: Attributes? + public var relationships: Relationships? public init( id: String? = nil, type: `Type`, + attributes: Attributes? = nil, relationships: Relationships? = nil ) { self.id = id self.type = type + self.attributes = attributes self.relationships = relationships } private enum CodingKeys: String, CodingKey { case id case type + case attributes case relationships } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case appCustomProductPageVersions } - public struct Relationships: Hashable, Codable { + public struct Attributes: Hashable, Codable, Sendable { + public var deepLink: URL? + + public init(deepLink: URL? = nil) { + self.deepLink = deepLink + } + + private enum CodingKeys: String, CodingKey { + case deepLink + } + } + + public struct Relationships: Hashable, Codable, Sendable { public var appCustomProductPage: AppCustomProductPage? public var appCustomProductPageLocalizations: AppCustomProductPageLocalizations? @@ -48,7 +65,7 @@ public struct AppCustomProductPageVersionInlineCreate: Hashable, Codable { case appCustomProductPageLocalizations } - public struct AppCustomProductPage: Hashable, Codable { + public struct AppCustomProductPage: Hashable, Codable, Sendable { public var data: Data? public init(data: Data? = nil) { @@ -59,7 +76,7 @@ public struct AppCustomProductPageVersionInlineCreate: Hashable, Codable { case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -77,13 +94,13 @@ public struct AppCustomProductPageVersionInlineCreate: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case appCustomProductPages } } } - public struct AppCustomProductPageLocalizations: Hashable, Codable { + public struct AppCustomProductPageLocalizations: Hashable, Codable, Sendable { public var data: [Data]? public init(data: [Data]? = nil) { @@ -94,7 +111,7 @@ public struct AppCustomProductPageVersionInlineCreate: Hashable, Codable { case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -112,7 +129,7 @@ public struct AppCustomProductPageVersionInlineCreate: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case appCustomProductPageLocalizations } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/AppEncryptionDeclaration.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/AppEncryptionDeclaration.generated.swift index 922d3532..b4a6c669 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/AppEncryptionDeclaration.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/AppEncryptionDeclaration.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct AppEncryptionDeclaration: Hashable, Codable { +public struct AppEncryptionDeclaration: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -36,11 +36,11 @@ public struct AppEncryptionDeclaration: Hashable, Codable { case links } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case appEncryptionDeclarations } - public struct Attributes: Hashable, Codable { + public struct Attributes: Hashable, Codable, Sendable { public var appDescription: String? public var appEncryptionDeclarationState: AppEncryptionDeclarationState? @@ -66,7 +66,6 @@ public struct AppEncryptionDeclaration: Hashable, Codable { public var exempt: Bool? - @available(*, deprecated) public var platform: Platform? @available(*, deprecated) @@ -125,7 +124,8 @@ public struct AppEncryptionDeclaration: Hashable, Codable { } } - public struct Relationships: Hashable, Codable { + public struct Relationships: Hashable, Codable, Sendable { + @available(*, deprecated) public var app: App? public var appEncryptionDeclarationDocument: AppEncryptionDeclarationDocument? @@ -149,14 +149,14 @@ public struct AppEncryptionDeclaration: Hashable, Codable { case builds } - public struct App: Hashable, Codable { + public struct App: Hashable, Codable, Sendable { public var data: Data? - public var links: Links? + public var links: RelationshipLinks? public init( data: Data? = nil, - links: Links? = nil + links: RelationshipLinks? = nil ) { self.data = data self.links = links @@ -167,7 +167,7 @@ public struct AppEncryptionDeclaration: Hashable, Codable { case links } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -185,39 +185,20 @@ public struct AppEncryptionDeclaration: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case apps } } - - public struct Links: Hashable, Codable { - public var related: URL? - - public var `self`: URL? - - public init( - related: URL? = nil, - self _self: URL? = nil - ) { - self.related = related - self.`self` = _self - } - - private enum CodingKeys: String, CodingKey { - case related - case `self` = "self" - } - } } - public struct AppEncryptionDeclarationDocument: Hashable, Codable { + public struct AppEncryptionDeclarationDocument: Hashable, Codable, Sendable { public var data: Data? - public var links: Links? + public var links: RelationshipLinks? public init( data: Data? = nil, - links: Links? = nil + links: RelationshipLinks? = nil ) { self.data = data self.links = links @@ -228,7 +209,7 @@ public struct AppEncryptionDeclaration: Hashable, Codable { case links } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -246,41 +227,22 @@ public struct AppEncryptionDeclaration: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case appEncryptionDeclarationDocuments } } - - public struct Links: Hashable, Codable { - public var related: URL? - - public var `self`: URL? - - public init( - related: URL? = nil, - self _self: URL? = nil - ) { - self.related = related - self.`self` = _self - } - - private enum CodingKeys: String, CodingKey { - case related - case `self` = "self" - } - } } - public struct Builds: Hashable, Codable { + public struct Builds: Hashable, Codable, Sendable { public var data: [Data]? - public var links: Links? + public var links: RelationshipLinks? public var meta: PagingInformation? public init( data: [Data]? = nil, - links: Links? = nil, + links: RelationshipLinks? = nil, meta: PagingInformation? = nil ) { self.data = data @@ -294,7 +256,7 @@ public struct AppEncryptionDeclaration: Hashable, Codable { case meta } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -312,29 +274,10 @@ public struct AppEncryptionDeclaration: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case builds } } - - public struct Links: Hashable, Codable { - public var related: URL? - - public var `self`: URL? - - public init( - related: URL? = nil, - self _self: URL? = nil - ) { - self.related = related - self.`self` = _self - } - - private enum CodingKeys: String, CodingKey { - case related - case `self` = "self" - } - } } } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/AppEncryptionDeclarationDocument.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/AppEncryptionDeclarationDocument.generated.swift index 7c1c284a..e8c0c395 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/AppEncryptionDeclarationDocument.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/AppEncryptionDeclarationDocument.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct AppEncryptionDeclarationDocument: Hashable, Codable { +public struct AppEncryptionDeclarationDocument: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -31,11 +31,11 @@ public struct AppEncryptionDeclarationDocument: Hashable, Codable { case links } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case appEncryptionDeclarationDocuments } - public struct Attributes: Hashable, Codable { + public struct Attributes: Hashable, Codable, Sendable { public var assetDeliveryState: AppMediaAssetState? public var assetToken: String? diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/AppEncryptionDeclarationState.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/AppEncryptionDeclarationState.generated.swift index 4cb54021..12620f00 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/AppEncryptionDeclarationState.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/AppEncryptionDeclarationState.generated.swift @@ -3,37 +3,39 @@ // swiftlint:disable all import Foundation -public enum AppEncryptionDeclarationState: Hashable, Codable, RawRepresentable { - case approved - case created - case expired - case inReview - case invalid - case rejected - case unknown(String) - - public var rawValue: String { - switch self { - case .approved: return "APPROVED" - case .created: return "CREATED" - case .expired: return "EXPIRED" - case .inReview: return "IN_REVIEW" - case .invalid: return "INVALID" - case .rejected: return "REJECTED" - case .unknown(let rawValue): return rawValue - } +public struct AppEncryptionDeclarationState: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var approved: Self { + .init(rawValue: "APPROVED") } + public static var created: Self { + .init(rawValue: "CREATED") + } + + public static var expired: Self { + .init(rawValue: "EXPIRED") + } + + public static var inReview: Self { + .init(rawValue: "IN_REVIEW") + } + + public static var invalid: Self { + .init(rawValue: "INVALID") + } + + public static var rejected: Self { + .init(rawValue: "REJECTED") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "APPROVED": self = .approved - case "CREATED": self = .created - case "EXPIRED": self = .expired - case "IN_REVIEW": self = .inReview - case "INVALID": self = .invalid - case "REJECTED": self = .rejected - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/AppEvent.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/AppEvent.generated.swift index f23779c7..e94ef4b7 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/AppEvent.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/AppEvent.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct AppEvent: Hashable, Codable { +public struct AppEvent: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -36,11 +36,11 @@ public struct AppEvent: Hashable, Codable { case links } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case appEvents } - public struct Attributes: Hashable, Codable { + public struct Attributes: Hashable, Codable, Sendable { public var archivedTerritorySchedules: [ArchivedTerritorySchedules]? public var badge: Badge? @@ -53,7 +53,7 @@ public struct AppEvent: Hashable, Codable { public var priority: Priority? - public var purchaseRequirement: PurchaseRequirement? + public var purchaseRequirement: String? public var purpose: Purpose? @@ -68,7 +68,7 @@ public struct AppEvent: Hashable, Codable { eventState: EventState? = nil, primaryLocale: String? = nil, priority: Priority? = nil, - purchaseRequirement: PurchaseRequirement? = nil, + purchaseRequirement: String? = nil, purpose: Purpose? = nil, referenceName: String? = nil, territorySchedules: [TerritorySchedules]? = nil @@ -98,7 +98,7 @@ public struct AppEvent: Hashable, Codable { case territorySchedules } - public struct ArchivedTerritorySchedules: Hashable, Codable { + public struct ArchivedTerritorySchedules: Hashable, Codable, Sendable { public var eventEnd: String? public var eventStart: String? @@ -127,171 +127,147 @@ public struct AppEvent: Hashable, Codable { } } - public enum Badge: Hashable, Codable, RawRepresentable { - case challenge - case competition - case liveEvent - case majorUpdate - case newSeason - case premiere - case specialEvent - case unknown(String) - - public var rawValue: String { - switch self { - case .challenge: return "CHALLENGE" - case .competition: return "COMPETITION" - case .liveEvent: return "LIVE_EVENT" - case .majorUpdate: return "MAJOR_UPDATE" - case .newSeason: return "NEW_SEASON" - case .premiere: return "PREMIERE" - case .specialEvent: return "SPECIAL_EVENT" - case .unknown(let rawValue): return rawValue - } + public struct Badge: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var challenge: Self { + .init(rawValue: "CHALLENGE") } - public init(rawValue: String) { - switch rawValue { - case "CHALLENGE": self = .challenge - case "COMPETITION": self = .competition - case "LIVE_EVENT": self = .liveEvent - case "MAJOR_UPDATE": self = .majorUpdate - case "NEW_SEASON": self = .newSeason - case "PREMIERE": self = .premiere - case "SPECIAL_EVENT": self = .specialEvent - default: self = .unknown(rawValue) - } + public static var competition: Self { + .init(rawValue: "COMPETITION") } - } - public enum EventState: Hashable, Codable, RawRepresentable { - case accepted - case approved - case archived - case draft - case inReview - case past - case published - case readyForReview - case rejected - case waitingForReview - case unknown(String) - - public var rawValue: String { - switch self { - case .accepted: return "ACCEPTED" - case .approved: return "APPROVED" - case .archived: return "ARCHIVED" - case .draft: return "DRAFT" - case .inReview: return "IN_REVIEW" - case .past: return "PAST" - case .published: return "PUBLISHED" - case .readyForReview: return "READY_FOR_REVIEW" - case .rejected: return "REJECTED" - case .waitingForReview: return "WAITING_FOR_REVIEW" - case .unknown(let rawValue): return rawValue - } + public static var liveEvent: Self { + .init(rawValue: "LIVE_EVENT") + } + + public static var majorUpdate: Self { + .init(rawValue: "MAJOR_UPDATE") + } + + public static var newSeason: Self { + .init(rawValue: "NEW_SEASON") } + public static var premiere: Self { + .init(rawValue: "PREMIERE") + } + + public static var specialEvent: Self { + .init(rawValue: "SPECIAL_EVENT") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "ACCEPTED": self = .accepted - case "APPROVED": self = .approved - case "ARCHIVED": self = .archived - case "DRAFT": self = .draft - case "IN_REVIEW": self = .inReview - case "PAST": self = .past - case "PUBLISHED": self = .published - case "READY_FOR_REVIEW": self = .readyForReview - case "REJECTED": self = .rejected - case "WAITING_FOR_REVIEW": self = .waitingForReview - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum Priority: Hashable, Codable, RawRepresentable { - case high - case normal - case unknown(String) + public struct EventState: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var accepted: Self { + .init(rawValue: "ACCEPTED") + } - public var rawValue: String { - switch self { - case .high: return "HIGH" - case .normal: return "NORMAL" - case .unknown(let rawValue): return rawValue - } + public static var approved: Self { + .init(rawValue: "APPROVED") } + public static var archived: Self { + .init(rawValue: "ARCHIVED") + } + + public static var draft: Self { + .init(rawValue: "DRAFT") + } + + public static var inReview: Self { + .init(rawValue: "IN_REVIEW") + } + + public static var past: Self { + .init(rawValue: "PAST") + } + + public static var published: Self { + .init(rawValue: "PUBLISHED") + } + + public static var readyForReview: Self { + .init(rawValue: "READY_FOR_REVIEW") + } + + public static var rejected: Self { + .init(rawValue: "REJECTED") + } + + public static var waitingForReview: Self { + .init(rawValue: "WAITING_FOR_REVIEW") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "HIGH": self = .high - case "NORMAL": self = .normal - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum PurchaseRequirement: Hashable, Codable, RawRepresentable { - case inAppPurchase - case inAppPurchaseAndSubscription - case inAppPurchaseOrSubscription - case noCostAssociated - case subscription - case unknown(String) - - public var rawValue: String { - switch self { - case .inAppPurchase: return "IN_APP_PURCHASE" - case .inAppPurchaseAndSubscription: return "IN_APP_PURCHASE_AND_SUBSCRIPTION" - case .inAppPurchaseOrSubscription: return "IN_APP_PURCHASE_OR_SUBSCRIPTION" - case .noCostAssociated: return "NO_COST_ASSOCIATED" - case .subscription: return "SUBSCRIPTION" - case .unknown(let rawValue): return rawValue - } + public struct Priority: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var high: Self { + .init(rawValue: "HIGH") + } + + public static var normal: Self { + .init(rawValue: "NORMAL") } + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "IN_APP_PURCHASE": self = .inAppPurchase - case "IN_APP_PURCHASE_AND_SUBSCRIPTION": self = .inAppPurchaseAndSubscription - case "IN_APP_PURCHASE_OR_SUBSCRIPTION": self = .inAppPurchaseOrSubscription - case "NO_COST_ASSOCIATED": self = .noCostAssociated - case "SUBSCRIPTION": self = .subscription - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum Purpose: Hashable, Codable, RawRepresentable { - case appropriateForAllUsers - case attractNewUsers - case bringBackLapsedUsers - case keepActiveUsersInformed - case unknown(String) - - public var rawValue: String { - switch self { - case .appropriateForAllUsers: return "APPROPRIATE_FOR_ALL_USERS" - case .attractNewUsers: return "ATTRACT_NEW_USERS" - case .bringBackLapsedUsers: return "BRING_BACK_LAPSED_USERS" - case .keepActiveUsersInformed: return "KEEP_ACTIVE_USERS_INFORMED" - case .unknown(let rawValue): return rawValue - } + public struct Purpose: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var appropriateForAllUsers: Self { + .init(rawValue: "APPROPRIATE_FOR_ALL_USERS") + } + + public static var attractNewUsers: Self { + .init(rawValue: "ATTRACT_NEW_USERS") + } + + public static var bringBackLapsedUsers: Self { + .init(rawValue: "BRING_BACK_LAPSED_USERS") } + public static var keepActiveUsersInformed: Self { + .init(rawValue: "KEEP_ACTIVE_USERS_INFORMED") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "APPROPRIATE_FOR_ALL_USERS": self = .appropriateForAllUsers - case "ATTRACT_NEW_USERS": self = .attractNewUsers - case "BRING_BACK_LAPSED_USERS": self = .bringBackLapsedUsers - case "KEEP_ACTIVE_USERS_INFORMED": self = .keepActiveUsersInformed - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public struct TerritorySchedules: Hashable, Codable { + public struct TerritorySchedules: Hashable, Codable, Sendable { public var eventEnd: String? public var eventStart: String? @@ -321,7 +297,7 @@ public struct AppEvent: Hashable, Codable { } } - public struct Relationships: Hashable, Codable { + public struct Relationships: Hashable, Codable, Sendable { public var localizations: Localizations? public init(localizations: Localizations? = nil) { @@ -332,16 +308,16 @@ public struct AppEvent: Hashable, Codable { case localizations } - public struct Localizations: Hashable, Codable { + public struct Localizations: Hashable, Codable, Sendable { public var data: [Data]? - public var links: Links? + public var links: RelationshipLinks? public var meta: PagingInformation? public init( data: [Data]? = nil, - links: Links? = nil, + links: RelationshipLinks? = nil, meta: PagingInformation? = nil ) { self.data = data @@ -355,7 +331,7 @@ public struct AppEvent: Hashable, Codable { case meta } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -373,29 +349,10 @@ public struct AppEvent: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case appEventLocalizations } } - - public struct Links: Hashable, Codable { - public var related: URL? - - public var `self`: URL? - - public init( - related: URL? = nil, - self _self: URL? = nil - ) { - self.related = related - self.`self` = _self - } - - private enum CodingKeys: String, CodingKey { - case related - case `self` = "self" - } - } } } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/AppEventAssetType.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/AppEventAssetType.generated.swift index a88431b8..95979462 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/AppEventAssetType.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/AppEventAssetType.generated.swift @@ -3,25 +3,23 @@ // swiftlint:disable all import Foundation -public enum AppEventAssetType: Hashable, Codable, RawRepresentable { - case eventCard - case eventDetailsPage - case unknown(String) +public struct AppEventAssetType: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var eventCard: Self { + .init(rawValue: "EVENT_CARD") + } + + public static var eventDetailsPage: Self { + .init(rawValue: "EVENT_DETAILS_PAGE") + } - public var rawValue: String { - switch self { - case .eventCard: return "EVENT_CARD" - case .eventDetailsPage: return "EVENT_DETAILS_PAGE" - case .unknown(let rawValue): return rawValue - } + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "EVENT_CARD": self = .eventCard - case "EVENT_DETAILS_PAGE": self = .eventDetailsPage - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/AppEventLocalization.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/AppEventLocalization.generated.swift index 4da30978..2d6955a4 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/AppEventLocalization.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/AppEventLocalization.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct AppEventLocalization: Hashable, Codable { +public struct AppEventLocalization: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -36,11 +36,11 @@ public struct AppEventLocalization: Hashable, Codable { case links } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case appEventLocalizations } - public struct Attributes: Hashable, Codable { + public struct Attributes: Hashable, Codable, Sendable { public var locale: String? public var longDescription: String? @@ -69,7 +69,7 @@ public struct AppEventLocalization: Hashable, Codable { } } - public struct Relationships: Hashable, Codable { + public struct Relationships: Hashable, Codable, Sendable { public var appEvent: AppEvent? public var appEventScreenshots: AppEventScreenshots? @@ -92,25 +92,18 @@ public struct AppEventLocalization: Hashable, Codable { case appEventVideoClips } - public struct AppEvent: Hashable, Codable { + public struct AppEvent: Hashable, Codable, Sendable { public var data: Data? - public var links: Links? - - public init( - data: Data? = nil, - links: Links? = nil - ) { + public init(data: Data? = nil) { self.data = data - self.links = links } private enum CodingKeys: String, CodingKey { case data - case links } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -128,41 +121,22 @@ public struct AppEventLocalization: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case appEvents } } - - public struct Links: Hashable, Codable { - public var related: URL? - - public var `self`: URL? - - public init( - related: URL? = nil, - self _self: URL? = nil - ) { - self.related = related - self.`self` = _self - } - - private enum CodingKeys: String, CodingKey { - case related - case `self` = "self" - } - } } - public struct AppEventScreenshots: Hashable, Codable { + public struct AppEventScreenshots: Hashable, Codable, Sendable { public var data: [Data]? - public var links: Links? + public var links: RelationshipLinks? public var meta: PagingInformation? public init( data: [Data]? = nil, - links: Links? = nil, + links: RelationshipLinks? = nil, meta: PagingInformation? = nil ) { self.data = data @@ -176,7 +150,7 @@ public struct AppEventLocalization: Hashable, Codable { case meta } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -194,41 +168,22 @@ public struct AppEventLocalization: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case appEventScreenshots } } - - public struct Links: Hashable, Codable { - public var related: URL? - - public var `self`: URL? - - public init( - related: URL? = nil, - self _self: URL? = nil - ) { - self.related = related - self.`self` = _self - } - - private enum CodingKeys: String, CodingKey { - case related - case `self` = "self" - } - } } - public struct AppEventVideoClips: Hashable, Codable { + public struct AppEventVideoClips: Hashable, Codable, Sendable { public var data: [Data]? - public var links: Links? + public var links: RelationshipLinks? public var meta: PagingInformation? public init( data: [Data]? = nil, - links: Links? = nil, + links: RelationshipLinks? = nil, meta: PagingInformation? = nil ) { self.data = data @@ -242,7 +197,7 @@ public struct AppEventLocalization: Hashable, Codable { case meta } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -260,29 +215,10 @@ public struct AppEventLocalization: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case appEventVideoClips } } - - public struct Links: Hashable, Codable { - public var related: URL? - - public var `self`: URL? - - public init( - related: URL? = nil, - self _self: URL? = nil - ) { - self.related = related - self.`self` = _self - } - - private enum CodingKeys: String, CodingKey { - case related - case `self` = "self" - } - } } } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/AppEventScreenshot.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/AppEventScreenshot.generated.swift index faedd933..6d48ad57 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/AppEventScreenshot.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/AppEventScreenshot.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct AppEventScreenshot: Hashable, Codable { +public struct AppEventScreenshot: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -36,11 +36,11 @@ public struct AppEventScreenshot: Hashable, Codable { case links } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case appEventScreenshots } - public struct Attributes: Hashable, Codable { + public struct Attributes: Hashable, Codable, Sendable { public var appEventAssetType: AppEventAssetType? public var assetDeliveryState: AppMediaAssetState? @@ -84,7 +84,7 @@ public struct AppEventScreenshot: Hashable, Codable { } } - public struct Relationships: Hashable, Codable { + public struct Relationships: Hashable, Codable, Sendable { public var appEventLocalization: AppEventLocalization? public init(appEventLocalization: AppEventLocalization? = nil) { @@ -95,25 +95,18 @@ public struct AppEventScreenshot: Hashable, Codable { case appEventLocalization } - public struct AppEventLocalization: Hashable, Codable { + public struct AppEventLocalization: Hashable, Codable, Sendable { public var data: Data? - public var links: Links? - - public init( - data: Data? = nil, - links: Links? = nil - ) { + public init(data: Data? = nil) { self.data = data - self.links = links } private enum CodingKeys: String, CodingKey { case data - case links } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -131,29 +124,10 @@ public struct AppEventScreenshot: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case appEventLocalizations } } - - public struct Links: Hashable, Codable { - public var related: URL? - - public var `self`: URL? - - public init( - related: URL? = nil, - self _self: URL? = nil - ) { - self.related = related - self.`self` = _self - } - - private enum CodingKeys: String, CodingKey { - case related - case `self` = "self" - } - } } } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/AppEventVideoClip.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/AppEventVideoClip.generated.swift index b58de4f5..b55993c7 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/AppEventVideoClip.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/AppEventVideoClip.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct AppEventVideoClip: Hashable, Codable { +public struct AppEventVideoClip: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -36,11 +36,11 @@ public struct AppEventVideoClip: Hashable, Codable { case links } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case appEventVideoClips } - public struct Attributes: Hashable, Codable { + public struct Attributes: Hashable, Codable, Sendable { public var appEventAssetType: AppEventAssetType? public var assetDeliveryState: AppMediaAssetState? @@ -49,12 +49,16 @@ public struct AppEventVideoClip: Hashable, Codable { public var fileSize: Int? + public var previewFrameImage: PreviewFrameImage? + public var previewFrameTimeCode: String? public var previewImage: ImageAsset? public var uploadOperations: [UploadOperation]? + public var videoDeliveryState: AppMediaVideoState? + public var videoUrl: String? public init( @@ -62,18 +66,22 @@ public struct AppEventVideoClip: Hashable, Codable { assetDeliveryState: AppMediaAssetState? = nil, fileName: String? = nil, fileSize: Int? = nil, + previewFrameImage: PreviewFrameImage? = nil, previewFrameTimeCode: String? = nil, previewImage: ImageAsset? = nil, uploadOperations: [UploadOperation]? = nil, + videoDeliveryState: AppMediaVideoState? = nil, videoUrl: String? = nil ) { self.appEventAssetType = appEventAssetType self.assetDeliveryState = assetDeliveryState self.fileName = fileName self.fileSize = fileSize + self.previewFrameImage = previewFrameImage self.previewFrameTimeCode = previewFrameTimeCode self.previewImage = previewImage self.uploadOperations = uploadOperations + self.videoDeliveryState = videoDeliveryState self.videoUrl = videoUrl } @@ -82,14 +90,16 @@ public struct AppEventVideoClip: Hashable, Codable { case assetDeliveryState case fileName case fileSize + case previewFrameImage case previewFrameTimeCode case previewImage case uploadOperations + case videoDeliveryState case videoUrl } } - public struct Relationships: Hashable, Codable { + public struct Relationships: Hashable, Codable, Sendable { public var appEventLocalization: AppEventLocalization? public init(appEventLocalization: AppEventLocalization? = nil) { @@ -100,25 +110,18 @@ public struct AppEventVideoClip: Hashable, Codable { case appEventLocalization } - public struct AppEventLocalization: Hashable, Codable { + public struct AppEventLocalization: Hashable, Codable, Sendable { public var data: Data? - public var links: Links? - - public init( - data: Data? = nil, - links: Links? = nil - ) { + public init(data: Data? = nil) { self.data = data - self.links = links } private enum CodingKeys: String, CodingKey { case data - case links } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -136,29 +139,10 @@ public struct AppEventVideoClip: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case appEventLocalizations } } - - public struct Links: Hashable, Codable { - public var related: URL? - - public var `self`: URL? - - public init( - related: URL? = nil, - self _self: URL? = nil - ) { - self.related = related - self.`self` = _self - } - - private enum CodingKeys: String, CodingKey { - case related - case `self` = "self" - } - } } } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/AppInfo.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/AppInfo.generated.swift index 423c45b6..eece4cf3 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/AppInfo.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/AppInfo.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct AppInfo: Hashable, Codable { +public struct AppInfo: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -36,98 +36,249 @@ public struct AppInfo: Hashable, Codable { case links } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case appInfos } - public struct Attributes: Hashable, Codable { + public struct Attributes: Hashable, Codable, Sendable { public var appStoreAgeRating: AppStoreAgeRating? public var appStoreState: AppStoreVersionState? @available(*, deprecated) + public var australiaAgeRating: AustraliaAgeRating? + public var brazilAgeRating: BrazilAgeRating? + @available(*, deprecated) public var brazilAgeRatingV2: BrazilAgeRatingV2? + @available(*, deprecated) + public var franceAgeRating: FranceAgeRating? + public var kidsAgeBand: KidsAgeBand? + @available(*, deprecated) + public var koreaAgeRating: KoreaAgeRating? + + public var state: State? + public init( appStoreAgeRating: AppStoreAgeRating? = nil, appStoreState: AppStoreVersionState? = nil, + australiaAgeRating: AustraliaAgeRating? = nil, brazilAgeRating: BrazilAgeRating? = nil, brazilAgeRatingV2: BrazilAgeRatingV2? = nil, - kidsAgeBand: KidsAgeBand? = nil + franceAgeRating: FranceAgeRating? = nil, + kidsAgeBand: KidsAgeBand? = nil, + koreaAgeRating: KoreaAgeRating? = nil, + state: State? = nil ) { self.appStoreAgeRating = appStoreAgeRating self.appStoreState = appStoreState + self.australiaAgeRating = australiaAgeRating self.brazilAgeRating = brazilAgeRating self.brazilAgeRatingV2 = brazilAgeRatingV2 + self.franceAgeRating = franceAgeRating self.kidsAgeBand = kidsAgeBand + self.koreaAgeRating = koreaAgeRating + self.state = state } private enum CodingKeys: String, CodingKey { case appStoreAgeRating case appStoreState + case australiaAgeRating case brazilAgeRating case brazilAgeRatingV2 + case franceAgeRating case kidsAgeBand + case koreaAgeRating + case state } - public enum BrazilAgeRatingV2: Hashable, Codable, RawRepresentable { - case officialEighteen - case officialFourteen - case officialL - case officialSixteen - case officialTen - case officialTwelve - case selfRatedEighteen - case selfRatedFourteen - case selfRatedL - case selfRatedSixteen - case selfRatedTen - case selfRatedTwelve - case unknown(String) - - public var rawValue: String { - switch self { - case .officialEighteen: return "OFFICIAL_EIGHTEEN" - case .officialFourteen: return "OFFICIAL_FOURTEEN" - case .officialL: return "OFFICIAL_L" - case .officialSixteen: return "OFFICIAL_SIXTEEN" - case .officialTen: return "OFFICIAL_TEN" - case .officialTwelve: return "OFFICIAL_TWELVE" - case .selfRatedEighteen: return "SELF_RATED_EIGHTEEN" - case .selfRatedFourteen: return "SELF_RATED_FOURTEEN" - case .selfRatedL: return "SELF_RATED_L" - case .selfRatedSixteen: return "SELF_RATED_SIXTEEN" - case .selfRatedTen: return "SELF_RATED_TEN" - case .selfRatedTwelve: return "SELF_RATED_TWELVE" - case .unknown(let rawValue): return rawValue - } + public struct AustraliaAgeRating: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var eighteen: Self { + .init(rawValue: "EIGHTEEN") + } + + public static var fifteen: Self { + .init(rawValue: "FIFTEEN") } + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "OFFICIAL_EIGHTEEN": self = .officialEighteen - case "OFFICIAL_FOURTEEN": self = .officialFourteen - case "OFFICIAL_L": self = .officialL - case "OFFICIAL_SIXTEEN": self = .officialSixteen - case "OFFICIAL_TEN": self = .officialTen - case "OFFICIAL_TWELVE": self = .officialTwelve - case "SELF_RATED_EIGHTEEN": self = .selfRatedEighteen - case "SELF_RATED_FOURTEEN": self = .selfRatedFourteen - case "SELF_RATED_L": self = .selfRatedL - case "SELF_RATED_SIXTEEN": self = .selfRatedSixteen - case "SELF_RATED_TEN": self = .selfRatedTen - case "SELF_RATED_TWELVE": self = .selfRatedTwelve - default: self = .unknown(rawValue) - } + self.rawValue = rawValue + } + } + + public struct BrazilAgeRatingV2: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var officialEighteen: Self { + .init(rawValue: "OFFICIAL_EIGHTEEN") + } + + public static var officialFourteen: Self { + .init(rawValue: "OFFICIAL_FOURTEEN") + } + + public static var officialL: Self { + .init(rawValue: "OFFICIAL_L") + } + + public static var officialSixteen: Self { + .init(rawValue: "OFFICIAL_SIXTEEN") + } + + public static var officialTen: Self { + .init(rawValue: "OFFICIAL_TEN") + } + + public static var officialTwelve: Self { + .init(rawValue: "OFFICIAL_TWELVE") + } + + public static var selfRatedEighteen: Self { + .init(rawValue: "SELF_RATED_EIGHTEEN") + } + + public static var selfRatedFourteen: Self { + .init(rawValue: "SELF_RATED_FOURTEEN") + } + + public static var selfRatedL: Self { + .init(rawValue: "SELF_RATED_L") + } + + public static var selfRatedSixteen: Self { + .init(rawValue: "SELF_RATED_SIXTEEN") + } + + public static var selfRatedTen: Self { + .init(rawValue: "SELF_RATED_TEN") + } + + public static var selfRatedTwelve: Self { + .init(rawValue: "SELF_RATED_TWELVE") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct FranceAgeRating: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var eighteen: Self { + .init(rawValue: "EIGHTEEN") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct KoreaAgeRating: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var all: Self { + .init(rawValue: "ALL") + } + + public static var fifteen: Self { + .init(rawValue: "FIFTEEN") + } + + public static var nineteen: Self { + .init(rawValue: "NINETEEN") + } + + public static var notApplicable: Self { + .init(rawValue: "NOT_APPLICABLE") + } + + public static var twelve: Self { + .init(rawValue: "TWELVE") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct State: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var accepted: Self { + .init(rawValue: "ACCEPTED") + } + + public static var developerRejected: Self { + .init(rawValue: "DEVELOPER_REJECTED") + } + + public static var inReview: Self { + .init(rawValue: "IN_REVIEW") + } + + public static var pendingRelease: Self { + .init(rawValue: "PENDING_RELEASE") + } + + public static var prepareForSubmission: Self { + .init(rawValue: "PREPARE_FOR_SUBMISSION") + } + + public static var readyForDistribution: Self { + .init(rawValue: "READY_FOR_DISTRIBUTION") + } + + public static var readyForReview: Self { + .init(rawValue: "READY_FOR_REVIEW") + } + + public static var rejected: Self { + .init(rawValue: "REJECTED") + } + + public static var replacedWithNewInfo: Self { + .init(rawValue: "REPLACED_WITH_NEW_INFO") + } + + public static var waitingForReview: Self { + .init(rawValue: "WAITING_FOR_REVIEW") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue } } } - public struct Relationships: Hashable, Codable { + public struct Relationships: Hashable, Codable, Sendable { public var ageRatingDeclaration: AgeRatingDeclaration? public var app: App? @@ -180,14 +331,14 @@ public struct AppInfo: Hashable, Codable { case secondarySubcategoryTwo } - public struct AgeRatingDeclaration: Hashable, Codable { + public struct AgeRatingDeclaration: Hashable, Codable, Sendable { public var data: Data? - public var links: Links? + public var links: RelationshipLinks? public init( data: Data? = nil, - links: Links? = nil + links: RelationshipLinks? = nil ) { self.data = data self.links = links @@ -198,7 +349,7 @@ public struct AppInfo: Hashable, Codable { case links } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -216,50 +367,24 @@ public struct AppInfo: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case ageRatingDeclarations } } - - public struct Links: Hashable, Codable { - public var related: URL? - - public var `self`: URL? - - public init( - related: URL? = nil, - self _self: URL? = nil - ) { - self.related = related - self.`self` = _self - } - - private enum CodingKeys: String, CodingKey { - case related - case `self` = "self" - } - } } - public struct App: Hashable, Codable { + public struct App: Hashable, Codable, Sendable { public var data: Data? - public var links: Links? - - public init( - data: Data? = nil, - links: Links? = nil - ) { + public init(data: Data? = nil) { self.data = data - self.links = links } private enum CodingKeys: String, CodingKey { case data - case links } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -277,41 +402,22 @@ public struct AppInfo: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case apps } } - - public struct Links: Hashable, Codable { - public var related: URL? - - public var `self`: URL? - - public init( - related: URL? = nil, - self _self: URL? = nil - ) { - self.related = related - self.`self` = _self - } - - private enum CodingKeys: String, CodingKey { - case related - case `self` = "self" - } - } } - public struct AppInfoLocalizations: Hashable, Codable { + public struct AppInfoLocalizations: Hashable, Codable, Sendable { public var data: [Data]? - public var links: Links? + public var links: RelationshipLinks? public var meta: PagingInformation? public init( data: [Data]? = nil, - links: Links? = nil, + links: RelationshipLinks? = nil, meta: PagingInformation? = nil ) { self.data = data @@ -325,7 +431,7 @@ public struct AppInfo: Hashable, Codable { case meta } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -343,39 +449,20 @@ public struct AppInfo: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case appInfoLocalizations } } - - public struct Links: Hashable, Codable { - public var related: URL? - - public var `self`: URL? - - public init( - related: URL? = nil, - self _self: URL? = nil - ) { - self.related = related - self.`self` = _self - } - - private enum CodingKeys: String, CodingKey { - case related - case `self` = "self" - } - } } - public struct PrimaryCategory: Hashable, Codable { + public struct PrimaryCategory: Hashable, Codable, Sendable { public var data: Data? - public var links: Links? + public var links: RelationshipLinks? public init( data: Data? = nil, - links: Links? = nil + links: RelationshipLinks? = nil ) { self.data = data self.links = links @@ -386,7 +473,7 @@ public struct AppInfo: Hashable, Codable { case links } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -404,39 +491,20 @@ public struct AppInfo: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case appCategories } } - - public struct Links: Hashable, Codable { - public var related: URL? - - public var `self`: URL? - - public init( - related: URL? = nil, - self _self: URL? = nil - ) { - self.related = related - self.`self` = _self - } - - private enum CodingKeys: String, CodingKey { - case related - case `self` = "self" - } - } } - public struct PrimarySubcategoryOne: Hashable, Codable { + public struct PrimarySubcategoryOne: Hashable, Codable, Sendable { public var data: Data? - public var links: Links? + public var links: RelationshipLinks? public init( data: Data? = nil, - links: Links? = nil + links: RelationshipLinks? = nil ) { self.data = data self.links = links @@ -447,7 +515,7 @@ public struct AppInfo: Hashable, Codable { case links } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -465,39 +533,20 @@ public struct AppInfo: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case appCategories } } - - public struct Links: Hashable, Codable { - public var related: URL? - - public var `self`: URL? - - public init( - related: URL? = nil, - self _self: URL? = nil - ) { - self.related = related - self.`self` = _self - } - - private enum CodingKeys: String, CodingKey { - case related - case `self` = "self" - } - } } - public struct PrimarySubcategoryTwo: Hashable, Codable { + public struct PrimarySubcategoryTwo: Hashable, Codable, Sendable { public var data: Data? - public var links: Links? + public var links: RelationshipLinks? public init( data: Data? = nil, - links: Links? = nil + links: RelationshipLinks? = nil ) { self.data = data self.links = links @@ -508,7 +557,7 @@ public struct AppInfo: Hashable, Codable { case links } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -526,39 +575,20 @@ public struct AppInfo: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case appCategories } } - - public struct Links: Hashable, Codable { - public var related: URL? - - public var `self`: URL? - - public init( - related: URL? = nil, - self _self: URL? = nil - ) { - self.related = related - self.`self` = _self - } - - private enum CodingKeys: String, CodingKey { - case related - case `self` = "self" - } - } } - public struct SecondaryCategory: Hashable, Codable { + public struct SecondaryCategory: Hashable, Codable, Sendable { public var data: Data? - public var links: Links? + public var links: RelationshipLinks? public init( data: Data? = nil, - links: Links? = nil + links: RelationshipLinks? = nil ) { self.data = data self.links = links @@ -569,7 +599,7 @@ public struct AppInfo: Hashable, Codable { case links } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -587,39 +617,20 @@ public struct AppInfo: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case appCategories } } - - public struct Links: Hashable, Codable { - public var related: URL? - - public var `self`: URL? - - public init( - related: URL? = nil, - self _self: URL? = nil - ) { - self.related = related - self.`self` = _self - } - - private enum CodingKeys: String, CodingKey { - case related - case `self` = "self" - } - } } - public struct SecondarySubcategoryOne: Hashable, Codable { + public struct SecondarySubcategoryOne: Hashable, Codable, Sendable { public var data: Data? - public var links: Links? + public var links: RelationshipLinks? public init( data: Data? = nil, - links: Links? = nil + links: RelationshipLinks? = nil ) { self.data = data self.links = links @@ -630,7 +641,7 @@ public struct AppInfo: Hashable, Codable { case links } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -648,39 +659,20 @@ public struct AppInfo: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case appCategories } } - - public struct Links: Hashable, Codable { - public var related: URL? - - public var `self`: URL? - - public init( - related: URL? = nil, - self _self: URL? = nil - ) { - self.related = related - self.`self` = _self - } - - private enum CodingKeys: String, CodingKey { - case related - case `self` = "self" - } - } } - public struct SecondarySubcategoryTwo: Hashable, Codable { + public struct SecondarySubcategoryTwo: Hashable, Codable, Sendable { public var data: Data? - public var links: Links? + public var links: RelationshipLinks? public init( data: Data? = nil, - links: Links? = nil + links: RelationshipLinks? = nil ) { self.data = data self.links = links @@ -691,7 +683,7 @@ public struct AppInfo: Hashable, Codable { case links } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -709,29 +701,10 @@ public struct AppInfo: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case appCategories } } - - public struct Links: Hashable, Codable { - public var related: URL? - - public var `self`: URL? - - public init( - related: URL? = nil, - self _self: URL? = nil - ) { - self.related = related - self.`self` = _self - } - - private enum CodingKeys: String, CodingKey { - case related - case `self` = "self" - } - } } } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/AppInfoLocalization.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/AppInfoLocalization.generated.swift index bc4b5875..539738de 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/AppInfoLocalization.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/AppInfoLocalization.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct AppInfoLocalization: Hashable, Codable { +public struct AppInfoLocalization: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -36,11 +36,11 @@ public struct AppInfoLocalization: Hashable, Codable { case links } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case appInfoLocalizations } - public struct Attributes: Hashable, Codable { + public struct Attributes: Hashable, Codable, Sendable { public var locale: String? public var name: String? @@ -79,7 +79,7 @@ public struct AppInfoLocalization: Hashable, Codable { } } - public struct Relationships: Hashable, Codable { + public struct Relationships: Hashable, Codable, Sendable { public var appInfo: AppInfo? public init(appInfo: AppInfo? = nil) { @@ -90,25 +90,18 @@ public struct AppInfoLocalization: Hashable, Codable { case appInfo } - public struct AppInfo: Hashable, Codable { + public struct AppInfo: Hashable, Codable, Sendable { public var data: Data? - public var links: Links? - - public init( - data: Data? = nil, - links: Links? = nil - ) { + public init(data: Data? = nil) { self.data = data - self.links = links } private enum CodingKeys: String, CodingKey { case data - case links } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -126,29 +119,10 @@ public struct AppInfoLocalization: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case appInfos } } - - public struct Links: Hashable, Codable { - public var related: URL? - - public var `self`: URL? - - public init( - related: URL? = nil, - self _self: URL? = nil - ) { - self.related = related - self.`self` = _self - } - - private enum CodingKeys: String, CodingKey { - case related - case `self` = "self" - } - } } } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/AppMediaAssetState.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/AppMediaAssetState.generated.swift index 25593a65..0ca9c127 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/AppMediaAssetState.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/AppMediaAssetState.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct AppMediaAssetState: Hashable, Codable { +public struct AppMediaAssetState: Hashable, Codable, Sendable { public var errors: [AppMediaStateError]? public var state: State? @@ -26,31 +26,31 @@ public struct AppMediaAssetState: Hashable, Codable { case warnings } - public enum State: Hashable, Codable, RawRepresentable { - case awaitingUpload - case complete - case failed - case uploadComplete - case unknown(String) - - public var rawValue: String { - switch self { - case .awaitingUpload: return "AWAITING_UPLOAD" - case .complete: return "COMPLETE" - case .failed: return "FAILED" - case .uploadComplete: return "UPLOAD_COMPLETE" - case .unknown(let rawValue): return rawValue - } + public struct State: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var awaitingUpload: Self { + .init(rawValue: "AWAITING_UPLOAD") } + public static var complete: Self { + .init(rawValue: "COMPLETE") + } + + public static var failed: Self { + .init(rawValue: "FAILED") + } + + public static var uploadComplete: Self { + .init(rawValue: "UPLOAD_COMPLETE") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "AWAITING_UPLOAD": self = .awaitingUpload - case "COMPLETE": self = .complete - case "FAILED": self = .failed - case "UPLOAD_COMPLETE": self = .uploadComplete - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/AppMediaPreviewFrameImageState.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/AppMediaPreviewFrameImageState.generated.swift new file mode 100644 index 00000000..a63fab97 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/AppMediaPreviewFrameImageState.generated.swift @@ -0,0 +1,54 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct AppMediaPreviewFrameImageState: Hashable, Codable, Sendable { + public var errors: [AppMediaStateError]? + + public var state: State? + + public var warnings: [AppMediaStateError]? + + public init( + errors: [AppMediaStateError]? = nil, + state: State? = nil, + warnings: [AppMediaStateError]? = nil + ) { + self.errors = errors + self.state = state + self.warnings = warnings + } + + private enum CodingKeys: String, CodingKey { + case errors + case state + case warnings + } + + public struct State: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var complete: Self { + .init(rawValue: "COMPLETE") + } + + public static var failed: Self { + .init(rawValue: "FAILED") + } + + public static var processing: Self { + .init(rawValue: "PROCESSING") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/AppMediaStateError.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/AppMediaStateError.generated.swift index 41a20f8b..bd75ee9b 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/AppMediaStateError.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/AppMediaStateError.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct AppMediaStateError: Hashable, Codable { +public struct AppMediaStateError: Hashable, Codable, Sendable { public var code: String? public var description: String? diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/AppMediaVideoState.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/AppMediaVideoState.generated.swift new file mode 100644 index 00000000..918f21f6 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/AppMediaVideoState.generated.swift @@ -0,0 +1,62 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct AppMediaVideoState: Hashable, Codable, Sendable { + public var errors: [AppMediaStateError]? + + public var state: State? + + public var warnings: [AppMediaStateError]? + + public init( + errors: [AppMediaStateError]? = nil, + state: State? = nil, + warnings: [AppMediaStateError]? = nil + ) { + self.errors = errors + self.state = state + self.warnings = warnings + } + + private enum CodingKeys: String, CodingKey { + case errors + case state + case warnings + } + + public struct State: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var awaitingUpload: Self { + .init(rawValue: "AWAITING_UPLOAD") + } + + public static var complete: Self { + .init(rawValue: "COMPLETE") + } + + public static var failed: Self { + .init(rawValue: "FAILED") + } + + public static var processing: Self { + .init(rawValue: "PROCESSING") + } + + public static var uploadComplete: Self { + .init(rawValue: "UPLOAD_COMPLETE") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/AppPreview.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/AppPreview.generated.swift index 1e914257..a8dbdd43 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/AppPreview.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/AppPreview.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct AppPreview: Hashable, Codable { +public struct AppPreview: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -36,11 +36,11 @@ public struct AppPreview: Hashable, Codable { case links } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case appPreviews } - public struct Attributes: Hashable, Codable { + public struct Attributes: Hashable, Codable, Sendable { public var assetDeliveryState: AppMediaAssetState? public var fileName: String? @@ -49,6 +49,8 @@ public struct AppPreview: Hashable, Codable { public var mimeType: String? + public var previewFrameImage: PreviewFrameImage? + public var previewFrameTimeCode: String? public var previewImage: ImageAsset? @@ -57,6 +59,8 @@ public struct AppPreview: Hashable, Codable { public var uploadOperations: [UploadOperation]? + public var videoDeliveryState: AppMediaVideoState? + public var videoUrl: String? public init( @@ -64,20 +68,24 @@ public struct AppPreview: Hashable, Codable { fileName: String? = nil, fileSize: Int? = nil, mimeType: String? = nil, + previewFrameImage: PreviewFrameImage? = nil, previewFrameTimeCode: String? = nil, previewImage: ImageAsset? = nil, sourceFileChecksum: String? = nil, uploadOperations: [UploadOperation]? = nil, + videoDeliveryState: AppMediaVideoState? = nil, videoUrl: String? = nil ) { self.assetDeliveryState = assetDeliveryState self.fileName = fileName self.fileSize = fileSize self.mimeType = mimeType + self.previewFrameImage = previewFrameImage self.previewFrameTimeCode = previewFrameTimeCode self.previewImage = previewImage self.sourceFileChecksum = sourceFileChecksum self.uploadOperations = uploadOperations + self.videoDeliveryState = videoDeliveryState self.videoUrl = videoUrl } @@ -86,15 +94,17 @@ public struct AppPreview: Hashable, Codable { case fileName case fileSize case mimeType + case previewFrameImage case previewFrameTimeCode case previewImage case sourceFileChecksum case uploadOperations + case videoDeliveryState case videoUrl } } - public struct Relationships: Hashable, Codable { + public struct Relationships: Hashable, Codable, Sendable { public var appPreviewSet: AppPreviewSet? public init(appPreviewSet: AppPreviewSet? = nil) { @@ -105,25 +115,18 @@ public struct AppPreview: Hashable, Codable { case appPreviewSet } - public struct AppPreviewSet: Hashable, Codable { + public struct AppPreviewSet: Hashable, Codable, Sendable { public var data: Data? - public var links: Links? - - public init( - data: Data? = nil, - links: Links? = nil - ) { + public init(data: Data? = nil) { self.data = data - self.links = links } private enum CodingKeys: String, CodingKey { case data - case links } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -141,29 +144,10 @@ public struct AppPreview: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case appPreviewSets } } - - public struct Links: Hashable, Codable { - public var related: URL? - - public var `self`: URL? - - public init( - related: URL? = nil, - self _self: URL? = nil - ) { - self.related = related - self.`self` = _self - } - - private enum CodingKeys: String, CodingKey { - case related - case `self` = "self" - } - } } } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/AppPreviewSet.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/AppPreviewSet.generated.swift index dc02c068..51097980 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/AppPreviewSet.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/AppPreviewSet.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct AppPreviewSet: Hashable, Codable { +public struct AppPreviewSet: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -36,11 +36,11 @@ public struct AppPreviewSet: Hashable, Codable { case links } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case appPreviewSets } - public struct Attributes: Hashable, Codable { + public struct Attributes: Hashable, Codable, Sendable { public var previewType: PreviewType? public init(previewType: PreviewType? = nil) { @@ -52,7 +52,7 @@ public struct AppPreviewSet: Hashable, Codable { } } - public struct Relationships: Hashable, Codable { + public struct Relationships: Hashable, Codable, Sendable { public var appCustomProductPageLocalization: AppCustomProductPageLocalization? public var appPreviews: AppPreviews? @@ -80,25 +80,18 @@ public struct AppPreviewSet: Hashable, Codable { case appStoreVersionLocalization } - public struct AppCustomProductPageLocalization: Hashable, Codable { + public struct AppCustomProductPageLocalization: Hashable, Codable, Sendable { public var data: Data? - public var links: Links? - - public init( - data: Data? = nil, - links: Links? = nil - ) { + public init(data: Data? = nil) { self.data = data - self.links = links } private enum CodingKeys: String, CodingKey { case data - case links } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -116,41 +109,22 @@ public struct AppPreviewSet: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case appCustomProductPageLocalizations } } - - public struct Links: Hashable, Codable { - public var related: URL? - - public var `self`: URL? - - public init( - related: URL? = nil, - self _self: URL? = nil - ) { - self.related = related - self.`self` = _self - } - - private enum CodingKeys: String, CodingKey { - case related - case `self` = "self" - } - } } - public struct AppPreviews: Hashable, Codable { + public struct AppPreviews: Hashable, Codable, Sendable { public var data: [Data]? - public var links: Links? + public var links: RelationshipLinks? public var meta: PagingInformation? public init( data: [Data]? = nil, - links: Links? = nil, + links: RelationshipLinks? = nil, meta: PagingInformation? = nil ) { self.data = data @@ -164,7 +138,7 @@ public struct AppPreviewSet: Hashable, Codable { case meta } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -182,50 +156,24 @@ public struct AppPreviewSet: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case appPreviews } } - - public struct Links: Hashable, Codable { - public var related: URL? - - public var `self`: URL? - - public init( - related: URL? = nil, - self _self: URL? = nil - ) { - self.related = related - self.`self` = _self - } - - private enum CodingKeys: String, CodingKey { - case related - case `self` = "self" - } - } } - public struct AppStoreVersionExperimentTreatmentLocalization: Hashable, Codable { + public struct AppStoreVersionExperimentTreatmentLocalization: Hashable, Codable, Sendable { public var data: Data? - public var links: Links? - - public init( - data: Data? = nil, - links: Links? = nil - ) { + public init(data: Data? = nil) { self.data = data - self.links = links } private enum CodingKeys: String, CodingKey { case data - case links } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -243,50 +191,24 @@ public struct AppPreviewSet: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case appStoreVersionExperimentTreatmentLocalizations } } - - public struct Links: Hashable, Codable { - public var related: URL? - - public var `self`: URL? - - public init( - related: URL? = nil, - self _self: URL? = nil - ) { - self.related = related - self.`self` = _self - } - - private enum CodingKeys: String, CodingKey { - case related - case `self` = "self" - } - } } - public struct AppStoreVersionLocalization: Hashable, Codable { + public struct AppStoreVersionLocalization: Hashable, Codable, Sendable { public var data: Data? - public var links: Links? - - public init( - data: Data? = nil, - links: Links? = nil - ) { + public init(data: Data? = nil) { self.data = data - self.links = links } private enum CodingKeys: String, CodingKey { case data - case links } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -304,29 +226,10 @@ public struct AppPreviewSet: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case appStoreVersionLocalizations } } - - public struct Links: Hashable, Codable { - public var related: URL? - - public var `self`: URL? - - public init( - related: URL? = nil, - self _self: URL? = nil - ) { - self.related = related - self.`self` = _self - } - - private enum CodingKeys: String, CodingKey { - case related - case `self` = "self" - } - } } } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/AppPricePoint.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/AppPricePoint.generated.swift deleted file mode 100644 index e4d9de0f..00000000 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/AppPricePoint.generated.swift +++ /dev/null @@ -1,204 +0,0 @@ -// autogenerated - -// swiftlint:disable all -import Foundation - -public struct AppPricePoint: Hashable, Codable { - public var id: String - - public var type: `Type` - - public var attributes: Attributes? - - public var relationships: Relationships? - - public var links: ResourceLinks? - - public init( - id: String, - type: `Type`, - attributes: Attributes? = nil, - relationships: Relationships? = nil, - links: ResourceLinks? = nil - ) { - self.id = id - self.type = type - self.attributes = attributes - self.relationships = relationships - self.links = links - } - - private enum CodingKeys: String, CodingKey { - case id - case type - case attributes - case relationships - case links - } - - public enum `Type`: String, Hashable, Codable { - case appPricePoints - } - - public struct Attributes: Hashable, Codable { - public var customerPrice: String? - - public var proceeds: String? - - public init( - customerPrice: String? = nil, - proceeds: String? = nil - ) { - self.customerPrice = customerPrice - self.proceeds = proceeds - } - - private enum CodingKeys: String, CodingKey { - case customerPrice - case proceeds - } - } - - public struct Relationships: Hashable, Codable { - public var priceTier: PriceTier? - - public var territory: Territory? - - public init( - priceTier: PriceTier? = nil, - territory: Territory? = nil - ) { - self.priceTier = priceTier - self.territory = territory - } - - private enum CodingKeys: String, CodingKey { - case priceTier - case territory - } - - public struct PriceTier: Hashable, Codable { - public var data: Data? - - public var links: Links? - - public init( - data: Data? = nil, - links: Links? = nil - ) { - self.data = data - self.links = links - } - - private enum CodingKeys: String, CodingKey { - case data - case links - } - - public struct Data: Hashable, Codable { - public var id: String - - public var type: `Type` - - public init( - id: String, - type: `Type` - ) { - self.id = id - self.type = type - } - - private enum CodingKeys: String, CodingKey { - case id - case type - } - - public enum `Type`: String, Hashable, Codable { - case appPriceTiers - } - } - - public struct Links: Hashable, Codable { - public var related: URL? - - public var `self`: URL? - - public init( - related: URL? = nil, - self _self: URL? = nil - ) { - self.related = related - self.`self` = _self - } - - private enum CodingKeys: String, CodingKey { - case related - case `self` = "self" - } - } - } - - public struct Territory: Hashable, Codable { - public var data: Data? - - public var links: Links? - - public init( - data: Data? = nil, - links: Links? = nil - ) { - self.data = data - self.links = links - } - - private enum CodingKeys: String, CodingKey { - case data - case links - } - - public struct Data: Hashable, Codable { - public var id: String - - public var type: `Type` - - public init( - id: String, - type: `Type` - ) { - self.id = id - self.type = type - } - - private enum CodingKeys: String, CodingKey { - case id - case type - } - - public enum `Type`: String, Hashable, Codable { - case territories - } - } - - public struct Links: Hashable, Codable { - public var related: URL? - - public var `self`: URL? - - public init( - related: URL? = nil, - self _self: URL? = nil - ) { - self.related = related - self.`self` = _self - } - - private enum CodingKeys: String, CodingKey { - case related - case `self` = "self" - } - } - } - } -} - -// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/AppPricePointV3.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/AppPricePointV3.generated.swift index 6d924c59..6d45e19f 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/AppPricePointV3.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/AppPricePointV3.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct AppPricePointV3: Hashable, Codable { +public struct AppPricePointV3: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -36,11 +36,11 @@ public struct AppPricePointV3: Hashable, Codable { case links } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case appPricePoints } - public struct Attributes: Hashable, Codable { + public struct Attributes: Hashable, Codable, Sendable { public var customerPrice: String? public var proceeds: String? @@ -59,43 +59,41 @@ public struct AppPricePointV3: Hashable, Codable { } } - public struct Relationships: Hashable, Codable { + public struct Relationships: Hashable, Codable, Sendable { public var app: App? + public var equalizations: Equalizations? + public var territory: Territory? public init( app: App? = nil, + equalizations: Equalizations? = nil, territory: Territory? = nil ) { self.app = app + self.equalizations = equalizations self.territory = territory } private enum CodingKeys: String, CodingKey { case app + case equalizations case territory } - public struct App: Hashable, Codable { + public struct App: Hashable, Codable, Sendable { public var data: Data? - public var links: Links? - - public init( - data: Data? = nil, - links: Links? = nil - ) { + public init(data: Data? = nil) { self.data = data - self.links = links } private enum CodingKeys: String, CodingKey { case data - case links } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -113,50 +111,36 @@ public struct AppPricePointV3: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case apps } } + } - public struct Links: Hashable, Codable { - public var related: URL? - - public var `self`: URL? + public struct Equalizations: Hashable, Codable, Sendable { + public var links: RelationshipLinks? - public init( - related: URL? = nil, - self _self: URL? = nil - ) { - self.related = related - self.`self` = _self - } + public init(links: RelationshipLinks? = nil) { + self.links = links + } - private enum CodingKeys: String, CodingKey { - case related - case `self` = "self" - } + private enum CodingKeys: String, CodingKey { + case links } } - public struct Territory: Hashable, Codable { + public struct Territory: Hashable, Codable, Sendable { public var data: Data? - public var links: Links? - - public init( - data: Data? = nil, - links: Links? = nil - ) { + public init(data: Data? = nil) { self.data = data - self.links = links } private enum CodingKeys: String, CodingKey { case data - case links } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -174,29 +158,10 @@ public struct AppPricePointV3: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case territories } } - - public struct Links: Hashable, Codable { - public var related: URL? - - public var `self`: URL? - - public init( - related: URL? = nil, - self _self: URL? = nil - ) { - self.related = related - self.`self` = _self - } - - private enum CodingKeys: String, CodingKey { - case related - case `self` = "self" - } - } } } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/AppPriceSchedule.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/AppPriceSchedule.generated.swift index f16df4c2..aefc353b 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/AppPriceSchedule.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/AppPriceSchedule.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct AppPriceSchedule: Hashable, Codable { +public struct AppPriceSchedule: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -31,11 +31,11 @@ public struct AppPriceSchedule: Hashable, Codable { case links } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case appPriceSchedules } - public struct Relationships: Hashable, Codable { + public struct Relationships: Hashable, Codable, Sendable { public var app: App? public var automaticPrices: AutomaticPrices? @@ -63,25 +63,18 @@ public struct AppPriceSchedule: Hashable, Codable { case manualPrices } - public struct App: Hashable, Codable { + public struct App: Hashable, Codable, Sendable { public var data: Data? - public var links: Links? - - public init( - data: Data? = nil, - links: Links? = nil - ) { + public init(data: Data? = nil) { self.data = data - self.links = links } private enum CodingKeys: String, CodingKey { case data - case links } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -99,41 +92,22 @@ public struct AppPriceSchedule: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case apps } } - - public struct Links: Hashable, Codable { - public var related: URL? - - public var `self`: URL? - - public init( - related: URL? = nil, - self _self: URL? = nil - ) { - self.related = related - self.`self` = _self - } - - private enum CodingKeys: String, CodingKey { - case related - case `self` = "self" - } - } } - public struct AutomaticPrices: Hashable, Codable { + public struct AutomaticPrices: Hashable, Codable, Sendable { public var data: [Data]? - public var links: Links? + public var links: RelationshipLinks? public var meta: PagingInformation? public init( data: [Data]? = nil, - links: Links? = nil, + links: RelationshipLinks? = nil, meta: PagingInformation? = nil ) { self.data = data @@ -147,7 +121,7 @@ public struct AppPriceSchedule: Hashable, Codable { case meta } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -165,39 +139,20 @@ public struct AppPriceSchedule: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case appPrices } } - - public struct Links: Hashable, Codable { - public var related: URL? - - public var `self`: URL? - - public init( - related: URL? = nil, - self _self: URL? = nil - ) { - self.related = related - self.`self` = _self - } - - private enum CodingKeys: String, CodingKey { - case related - case `self` = "self" - } - } } - public struct BaseTerritory: Hashable, Codable { + public struct BaseTerritory: Hashable, Codable, Sendable { public var data: Data? - public var links: Links? + public var links: RelationshipLinks? public init( data: Data? = nil, - links: Links? = nil + links: RelationshipLinks? = nil ) { self.data = data self.links = links @@ -208,7 +163,7 @@ public struct AppPriceSchedule: Hashable, Codable { case links } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -226,41 +181,22 @@ public struct AppPriceSchedule: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case territories } } - - public struct Links: Hashable, Codable { - public var related: URL? - - public var `self`: URL? - - public init( - related: URL? = nil, - self _self: URL? = nil - ) { - self.related = related - self.`self` = _self - } - - private enum CodingKeys: String, CodingKey { - case related - case `self` = "self" - } - } } - public struct ManualPrices: Hashable, Codable { + public struct ManualPrices: Hashable, Codable, Sendable { public var data: [Data]? - public var links: Links? + public var links: RelationshipLinks? public var meta: PagingInformation? public init( data: [Data]? = nil, - links: Links? = nil, + links: RelationshipLinks? = nil, meta: PagingInformation? = nil ) { self.data = data @@ -274,7 +210,7 @@ public struct AppPriceSchedule: Hashable, Codable { case meta } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -292,29 +228,10 @@ public struct AppPriceSchedule: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case appPrices } } - - public struct Links: Hashable, Codable { - public var related: URL? - - public var `self`: URL? - - public init( - related: URL? = nil, - self _self: URL? = nil - ) { - self.related = related - self.`self` = _self - } - - private enum CodingKeys: String, CodingKey { - case related - case `self` = "self" - } - } } } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/AppPriceV2.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/AppPriceV2.generated.swift index 4d5d67eb..332dc87f 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/AppPriceV2.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/AppPriceV2.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct AppPriceV2: Hashable, Codable { +public struct AppPriceV2: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -36,11 +36,11 @@ public struct AppPriceV2: Hashable, Codable { case links } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case appPrices } - public struct Attributes: Hashable, Codable { + public struct Attributes: Hashable, Codable, Sendable { public var endDate: String? public var manual: Bool? @@ -64,7 +64,7 @@ public struct AppPriceV2: Hashable, Codable { } } - public struct Relationships: Hashable, Codable { + public struct Relationships: Hashable, Codable, Sendable { public var appPricePoint: AppPricePoint? public var territory: Territory? @@ -82,25 +82,18 @@ public struct AppPriceV2: Hashable, Codable { case territory } - public struct AppPricePoint: Hashable, Codable { + public struct AppPricePoint: Hashable, Codable, Sendable { public var data: Data? - public var links: Links? - - public init( - data: Data? = nil, - links: Links? = nil - ) { + public init(data: Data? = nil) { self.data = data - self.links = links } private enum CodingKeys: String, CodingKey { case data - case links } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -118,50 +111,24 @@ public struct AppPriceV2: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case appPricePoints } } - - public struct Links: Hashable, Codable { - public var related: URL? - - public var `self`: URL? - - public init( - related: URL? = nil, - self _self: URL? = nil - ) { - self.related = related - self.`self` = _self - } - - private enum CodingKeys: String, CodingKey { - case related - case `self` = "self" - } - } } - public struct Territory: Hashable, Codable { + public struct Territory: Hashable, Codable, Sendable { public var data: Data? - public var links: Links? - - public init( - data: Data? = nil, - links: Links? = nil - ) { + public init(data: Data? = nil) { self.data = data - self.links = links } private enum CodingKeys: String, CodingKey { case data - case links } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -179,29 +146,10 @@ public struct AppPriceV2: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case territories } } - - public struct Links: Hashable, Codable { - public var related: URL? - - public var `self`: URL? - - public init( - related: URL? = nil, - self _self: URL? = nil - ) { - self.related = related - self.`self` = _self - } - - private enum CodingKeys: String, CodingKey { - case related - case `self` = "self" - } - } } } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/AppPriceV2InlineCreate.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/AppPriceV2InlineCreate.generated.swift index c8dc8d7c..7a9253a9 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/AppPriceV2InlineCreate.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/AppPriceV2InlineCreate.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct AppPriceV2InlineCreate: Hashable, Codable { +public struct AppPriceV2InlineCreate: Hashable, Codable, Sendable { public var id: String? public var type: `Type` @@ -21,7 +21,7 @@ public struct AppPriceV2InlineCreate: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case appPrices } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/AppScreenshot.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/AppScreenshot.generated.swift index 11f99eb3..68e261e7 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/AppScreenshot.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/AppScreenshot.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct AppScreenshot: Hashable, Codable { +public struct AppScreenshot: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -36,11 +36,11 @@ public struct AppScreenshot: Hashable, Codable { case links } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case appScreenshots } - public struct Attributes: Hashable, Codable { + public struct Attributes: Hashable, Codable, Sendable { public var assetDeliveryState: AppMediaAssetState? public var assetToken: String? @@ -89,7 +89,7 @@ public struct AppScreenshot: Hashable, Codable { } } - public struct Relationships: Hashable, Codable { + public struct Relationships: Hashable, Codable, Sendable { public var appScreenshotSet: AppScreenshotSet? public init(appScreenshotSet: AppScreenshotSet? = nil) { @@ -100,25 +100,18 @@ public struct AppScreenshot: Hashable, Codable { case appScreenshotSet } - public struct AppScreenshotSet: Hashable, Codable { + public struct AppScreenshotSet: Hashable, Codable, Sendable { public var data: Data? - public var links: Links? - - public init( - data: Data? = nil, - links: Links? = nil - ) { + public init(data: Data? = nil) { self.data = data - self.links = links } private enum CodingKeys: String, CodingKey { case data - case links } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -136,29 +129,10 @@ public struct AppScreenshot: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case appScreenshotSets } } - - public struct Links: Hashable, Codable { - public var related: URL? - - public var `self`: URL? - - public init( - related: URL? = nil, - self _self: URL? = nil - ) { - self.related = related - self.`self` = _self - } - - private enum CodingKeys: String, CodingKey { - case related - case `self` = "self" - } - } } } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/AppScreenshotSet.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/AppScreenshotSet.generated.swift index 87839e63..e9b2911d 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/AppScreenshotSet.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/AppScreenshotSet.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct AppScreenshotSet: Hashable, Codable { +public struct AppScreenshotSet: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -36,11 +36,11 @@ public struct AppScreenshotSet: Hashable, Codable { case links } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case appScreenshotSets } - public struct Attributes: Hashable, Codable { + public struct Attributes: Hashable, Codable, Sendable { public var screenshotDisplayType: ScreenshotDisplayType? public init(screenshotDisplayType: ScreenshotDisplayType? = nil) { @@ -52,7 +52,7 @@ public struct AppScreenshotSet: Hashable, Codable { } } - public struct Relationships: Hashable, Codable { + public struct Relationships: Hashable, Codable, Sendable { public var appCustomProductPageLocalization: AppCustomProductPageLocalization? public var appScreenshots: AppScreenshots? @@ -80,25 +80,18 @@ public struct AppScreenshotSet: Hashable, Codable { case appStoreVersionLocalization } - public struct AppCustomProductPageLocalization: Hashable, Codable { + public struct AppCustomProductPageLocalization: Hashable, Codable, Sendable { public var data: Data? - public var links: Links? - - public init( - data: Data? = nil, - links: Links? = nil - ) { + public init(data: Data? = nil) { self.data = data - self.links = links } private enum CodingKeys: String, CodingKey { case data - case links } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -116,41 +109,22 @@ public struct AppScreenshotSet: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case appCustomProductPageLocalizations } } - - public struct Links: Hashable, Codable { - public var related: URL? - - public var `self`: URL? - - public init( - related: URL? = nil, - self _self: URL? = nil - ) { - self.related = related - self.`self` = _self - } - - private enum CodingKeys: String, CodingKey { - case related - case `self` = "self" - } - } } - public struct AppScreenshots: Hashable, Codable { + public struct AppScreenshots: Hashable, Codable, Sendable { public var data: [Data]? - public var links: Links? + public var links: RelationshipLinks? public var meta: PagingInformation? public init( data: [Data]? = nil, - links: Links? = nil, + links: RelationshipLinks? = nil, meta: PagingInformation? = nil ) { self.data = data @@ -164,7 +138,7 @@ public struct AppScreenshotSet: Hashable, Codable { case meta } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -182,50 +156,24 @@ public struct AppScreenshotSet: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case appScreenshots } } - - public struct Links: Hashable, Codable { - public var related: URL? - - public var `self`: URL? - - public init( - related: URL? = nil, - self _self: URL? = nil - ) { - self.related = related - self.`self` = _self - } - - private enum CodingKeys: String, CodingKey { - case related - case `self` = "self" - } - } } - public struct AppStoreVersionExperimentTreatmentLocalization: Hashable, Codable { + public struct AppStoreVersionExperimentTreatmentLocalization: Hashable, Codable, Sendable { public var data: Data? - public var links: Links? - - public init( - data: Data? = nil, - links: Links? = nil - ) { + public init(data: Data? = nil) { self.data = data - self.links = links } private enum CodingKeys: String, CodingKey { case data - case links } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -243,50 +191,24 @@ public struct AppScreenshotSet: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case appStoreVersionExperimentTreatmentLocalizations } } - - public struct Links: Hashable, Codable { - public var related: URL? - - public var `self`: URL? - - public init( - related: URL? = nil, - self _self: URL? = nil - ) { - self.related = related - self.`self` = _self - } - - private enum CodingKeys: String, CodingKey { - case related - case `self` = "self" - } - } } - public struct AppStoreVersionLocalization: Hashable, Codable { + public struct AppStoreVersionLocalization: Hashable, Codable, Sendable { public var data: Data? - public var links: Links? - - public init( - data: Data? = nil, - links: Links? = nil - ) { + public init(data: Data? = nil) { self.data = data - self.links = links } private enum CodingKeys: String, CodingKey { case data - case links } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -304,29 +226,10 @@ public struct AppScreenshotSet: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case appStoreVersionLocalizations } } - - public struct Links: Hashable, Codable { - public var related: URL? - - public var `self`: URL? - - public init( - related: URL? = nil, - self _self: URL? = nil - ) { - self.related = related - self.`self` = _self - } - - private enum CodingKeys: String, CodingKey { - case related - case `self` = "self" - } - } } } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/AppStoreAgeRating.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/AppStoreAgeRating.generated.swift index ba5897fc..2169425d 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/AppStoreAgeRating.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/AppStoreAgeRating.generated.swift @@ -3,31 +3,35 @@ // swiftlint:disable all import Foundation -public enum AppStoreAgeRating: Hashable, Codable, RawRepresentable { - case fourPlus - case ninePlus - case seventeenPlus - case twelvePlus - case unknown(String) - - public var rawValue: String { - switch self { - case .fourPlus: return "FOUR_PLUS" - case .ninePlus: return "NINE_PLUS" - case .seventeenPlus: return "SEVENTEEN_PLUS" - case .twelvePlus: return "TWELVE_PLUS" - case .unknown(let rawValue): return rawValue - } +public struct AppStoreAgeRating: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var fourPlus: Self { + .init(rawValue: "FOUR_PLUS") } + public static var ninePlus: Self { + .init(rawValue: "NINE_PLUS") + } + + public static var seventeenPlus: Self { + .init(rawValue: "SEVENTEEN_PLUS") + } + + public static var twelvePlus: Self { + .init(rawValue: "TWELVE_PLUS") + } + + public static var unrated: Self { + .init(rawValue: "UNRATED") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "FOUR_PLUS": self = .fourPlus - case "NINE_PLUS": self = .ninePlus - case "SEVENTEEN_PLUS": self = .seventeenPlus - case "TWELVE_PLUS": self = .twelvePlus - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/AppStoreReviewAttachment.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/AppStoreReviewAttachment.generated.swift index 29fb1b03..d2f9223c 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/AppStoreReviewAttachment.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/AppStoreReviewAttachment.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct AppStoreReviewAttachment: Hashable, Codable { +public struct AppStoreReviewAttachment: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -36,11 +36,11 @@ public struct AppStoreReviewAttachment: Hashable, Codable { case links } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case appStoreReviewAttachments } - public struct Attributes: Hashable, Codable { + public struct Attributes: Hashable, Codable, Sendable { public var assetDeliveryState: AppMediaAssetState? public var fileName: String? @@ -74,7 +74,7 @@ public struct AppStoreReviewAttachment: Hashable, Codable { } } - public struct Relationships: Hashable, Codable { + public struct Relationships: Hashable, Codable, Sendable { public var appStoreReviewDetail: AppStoreReviewDetail? public init(appStoreReviewDetail: AppStoreReviewDetail? = nil) { @@ -85,25 +85,18 @@ public struct AppStoreReviewAttachment: Hashable, Codable { case appStoreReviewDetail } - public struct AppStoreReviewDetail: Hashable, Codable { + public struct AppStoreReviewDetail: Hashable, Codable, Sendable { public var data: Data? - public var links: Links? - - public init( - data: Data? = nil, - links: Links? = nil - ) { + public init(data: Data? = nil) { self.data = data - self.links = links } private enum CodingKeys: String, CodingKey { case data - case links } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -121,29 +114,10 @@ public struct AppStoreReviewAttachment: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case appStoreReviewDetails } } - - public struct Links: Hashable, Codable { - public var related: URL? - - public var `self`: URL? - - public init( - related: URL? = nil, - self _self: URL? = nil - ) { - self.related = related - self.`self` = _self - } - - private enum CodingKeys: String, CodingKey { - case related - case `self` = "self" - } - } } } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/AppStoreReviewDetail.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/AppStoreReviewDetail.generated.swift index 9b0645f7..98a0aec7 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/AppStoreReviewDetail.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/AppStoreReviewDetail.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct AppStoreReviewDetail: Hashable, Codable { +public struct AppStoreReviewDetail: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -36,11 +36,11 @@ public struct AppStoreReviewDetail: Hashable, Codable { case links } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case appStoreReviewDetails } - public struct Attributes: Hashable, Codable { + public struct Attributes: Hashable, Codable, Sendable { public var contactEmail: String? public var contactFirstName: String? @@ -89,7 +89,7 @@ public struct AppStoreReviewDetail: Hashable, Codable { } } - public struct Relationships: Hashable, Codable { + public struct Relationships: Hashable, Codable, Sendable { public var appStoreReviewAttachments: AppStoreReviewAttachments? public var appStoreVersion: AppStoreVersion? @@ -107,16 +107,16 @@ public struct AppStoreReviewDetail: Hashable, Codable { case appStoreVersion } - public struct AppStoreReviewAttachments: Hashable, Codable { + public struct AppStoreReviewAttachments: Hashable, Codable, Sendable { public var data: [Data]? - public var links: Links? + public var links: RelationshipLinks? public var meta: PagingInformation? public init( data: [Data]? = nil, - links: Links? = nil, + links: RelationshipLinks? = nil, meta: PagingInformation? = nil ) { self.data = data @@ -130,7 +130,7 @@ public struct AppStoreReviewDetail: Hashable, Codable { case meta } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -148,50 +148,24 @@ public struct AppStoreReviewDetail: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case appStoreReviewAttachments } } - - public struct Links: Hashable, Codable { - public var related: URL? - - public var `self`: URL? - - public init( - related: URL? = nil, - self _self: URL? = nil - ) { - self.related = related - self.`self` = _self - } - - private enum CodingKeys: String, CodingKey { - case related - case `self` = "self" - } - } } - public struct AppStoreVersion: Hashable, Codable { + public struct AppStoreVersion: Hashable, Codable, Sendable { public var data: Data? - public var links: Links? - - public init( - data: Data? = nil, - links: Links? = nil - ) { + public init(data: Data? = nil) { self.data = data - self.links = links } private enum CodingKeys: String, CodingKey { case data - case links } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -209,29 +183,10 @@ public struct AppStoreReviewDetail: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case appStoreVersions } } - - public struct Links: Hashable, Codable { - public var related: URL? - - public var `self`: URL? - - public init( - related: URL? = nil, - self _self: URL? = nil - ) { - self.related = related - self.`self` = _self - } - - private enum CodingKeys: String, CodingKey { - case related - case `self` = "self" - } - } } } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/AppStoreVersion.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/AppStoreVersion.generated.swift index c3327f80..eb91d720 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/AppStoreVersion.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/AppStoreVersion.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct AppStoreVersion: Hashable, Codable { +public struct AppStoreVersion: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -36,13 +36,15 @@ public struct AppStoreVersion: Hashable, Codable { case links } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case appStoreVersions } - public struct Attributes: Hashable, Codable { + public struct Attributes: Hashable, Codable, Sendable { public var appStoreState: AppStoreVersionState? + public var appVersionState: AppVersionState? + public var copyright: String? public var createdDate: String? @@ -55,69 +57,104 @@ public struct AppStoreVersion: Hashable, Codable { public var releaseType: ReleaseType? + public var reviewType: ReviewType? + + @available(*, deprecated) + public var usesIdfa: Bool? + public var versionString: String? public init( appStoreState: AppStoreVersionState? = nil, + appVersionState: AppVersionState? = nil, copyright: String? = nil, createdDate: String? = nil, downloadable: Bool? = nil, earliestReleaseDate: String? = nil, platform: Platform? = nil, releaseType: ReleaseType? = nil, + reviewType: ReviewType? = nil, + usesIdfa: Bool? = nil, versionString: String? = nil ) { self.appStoreState = appStoreState + self.appVersionState = appVersionState self.copyright = copyright self.createdDate = createdDate self.downloadable = downloadable self.earliestReleaseDate = earliestReleaseDate self.platform = platform self.releaseType = releaseType + self.reviewType = reviewType + self.usesIdfa = usesIdfa self.versionString = versionString } private enum CodingKeys: String, CodingKey { case appStoreState + case appVersionState case copyright case createdDate case downloadable case earliestReleaseDate case platform case releaseType + case reviewType + case usesIdfa case versionString } - public enum ReleaseType: Hashable, Codable, RawRepresentable { - case afterApproval - case manual - case scheduled - case unknown(String) + public struct ReleaseType: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var afterApproval: Self { + .init(rawValue: "AFTER_APPROVAL") + } - public var rawValue: String { - switch self { - case .afterApproval: return "AFTER_APPROVAL" - case .manual: return "MANUAL" - case .scheduled: return "SCHEDULED" - case .unknown(let rawValue): return rawValue - } + public static var manual: Self { + .init(rawValue: "MANUAL") } + public static var scheduled: Self { + .init(rawValue: "SCHEDULED") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "AFTER_APPROVAL": self = .afterApproval - case "MANUAL": self = .manual - case "SCHEDULED": self = .scheduled - default: self = .unknown(rawValue) - } + self.rawValue = rawValue + } + } + + public struct ReviewType: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var appStore: Self { + .init(rawValue: "APP_STORE") + } + + public static var notarization: Self { + .init(rawValue: "NOTARIZATION") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue } } } - public struct Relationships: Hashable, Codable { + public struct Relationships: Hashable, Codable, Sendable { @available(*, deprecated) public var ageRatingDeclaration: AgeRatingDeclaration? + public var alternativeDistributionPackage: AlternativeDistributionPackage? + public var app: App? public var appClipDefaultExperience: AppClipDefaultExperience? @@ -136,10 +173,15 @@ public struct AppStoreVersion: Hashable, Codable { public var build: Build? + public var customerReviews: CustomerReviews? + + public var gameCenterAppVersion: GameCenterAppVersion? + public var routingAppCoverage: RoutingAppCoverage? public init( ageRatingDeclaration: AgeRatingDeclaration? = nil, + alternativeDistributionPackage: AlternativeDistributionPackage? = nil, app: App? = nil, appClipDefaultExperience: AppClipDefaultExperience? = nil, appStoreReviewDetail: AppStoreReviewDetail? = nil, @@ -149,9 +191,12 @@ public struct AppStoreVersion: Hashable, Codable { appStoreVersionPhasedRelease: AppStoreVersionPhasedRelease? = nil, appStoreVersionSubmission: AppStoreVersionSubmission? = nil, build: Build? = nil, + customerReviews: CustomerReviews? = nil, + gameCenterAppVersion: GameCenterAppVersion? = nil, routingAppCoverage: RoutingAppCoverage? = nil ) { self.ageRatingDeclaration = ageRatingDeclaration + self.alternativeDistributionPackage = alternativeDistributionPackage self.app = app self.appClipDefaultExperience = appClipDefaultExperience self.appStoreReviewDetail = appStoreReviewDetail @@ -161,11 +206,14 @@ public struct AppStoreVersion: Hashable, Codable { self.appStoreVersionPhasedRelease = appStoreVersionPhasedRelease self.appStoreVersionSubmission = appStoreVersionSubmission self.build = build + self.customerReviews = customerReviews + self.gameCenterAppVersion = gameCenterAppVersion self.routingAppCoverage = routingAppCoverage } private enum CodingKeys: String, CodingKey { case ageRatingDeclaration + case alternativeDistributionPackage case app case appClipDefaultExperience case appStoreReviewDetail @@ -175,17 +223,19 @@ public struct AppStoreVersion: Hashable, Codable { case appStoreVersionPhasedRelease case appStoreVersionSubmission case build + case customerReviews + case gameCenterAppVersion case routingAppCoverage } - public struct AgeRatingDeclaration: Hashable, Codable { + public struct AgeRatingDeclaration: Hashable, Codable, Sendable { public var data: Data? - public var links: Links? + public var links: RelationshipLinks? public init( data: Data? = nil, - links: Links? = nil + links: RelationshipLinks? = nil ) { self.data = data self.links = links @@ -196,7 +246,7 @@ public struct AppStoreVersion: Hashable, Codable { case links } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -214,39 +264,20 @@ public struct AppStoreVersion: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case ageRatingDeclarations } } - - public struct Links: Hashable, Codable { - public var related: URL? - - public var `self`: URL? - - public init( - related: URL? = nil, - self _self: URL? = nil - ) { - self.related = related - self.`self` = _self - } - - private enum CodingKeys: String, CodingKey { - case related - case `self` = "self" - } - } } - public struct App: Hashable, Codable { + public struct AlternativeDistributionPackage: Hashable, Codable, Sendable { public var data: Data? - public var links: Links? + public var links: RelationshipLinks? public init( data: Data? = nil, - links: Links? = nil + links: RelationshipLinks? = nil ) { self.data = data self.links = links @@ -257,7 +288,7 @@ public struct AppStoreVersion: Hashable, Codable { case links } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -275,39 +306,55 @@ public struct AppStoreVersion: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { - case apps + public enum `Type`: String, Hashable, Codable, Sendable { + case alternativeDistributionPackages } } + } + + public struct App: Hashable, Codable, Sendable { + public var data: Data? + + public init(data: Data? = nil) { + self.data = data + } - public struct Links: Hashable, Codable { - public var related: URL? + private enum CodingKeys: String, CodingKey { + case data + } - public var `self`: URL? + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` public init( - related: URL? = nil, - self _self: URL? = nil + id: String, + type: `Type` ) { - self.related = related - self.`self` = _self + self.id = id + self.type = type } private enum CodingKeys: String, CodingKey { - case related - case `self` = "self" + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case apps } } } - public struct AppClipDefaultExperience: Hashable, Codable { + public struct AppClipDefaultExperience: Hashable, Codable, Sendable { public var data: Data? - public var links: Links? + public var links: RelationshipLinks? public init( data: Data? = nil, - links: Links? = nil + links: RelationshipLinks? = nil ) { self.data = data self.links = links @@ -318,7 +365,7 @@ public struct AppStoreVersion: Hashable, Codable { case links } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -336,39 +383,20 @@ public struct AppStoreVersion: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case appClipDefaultExperiences } } - - public struct Links: Hashable, Codable { - public var related: URL? - - public var `self`: URL? - - public init( - related: URL? = nil, - self _self: URL? = nil - ) { - self.related = related - self.`self` = _self - } - - private enum CodingKeys: String, CodingKey { - case related - case `self` = "self" - } - } } - public struct AppStoreReviewDetail: Hashable, Codable { + public struct AppStoreReviewDetail: Hashable, Codable, Sendable { public var data: Data? - public var links: Links? + public var links: RelationshipLinks? public init( data: Data? = nil, - links: Links? = nil + links: RelationshipLinks? = nil ) { self.data = data self.links = links @@ -379,7 +407,7 @@ public struct AppStoreVersion: Hashable, Codable { case links } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -397,41 +425,22 @@ public struct AppStoreVersion: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case appStoreReviewDetails } } - - public struct Links: Hashable, Codable { - public var related: URL? - - public var `self`: URL? - - public init( - related: URL? = nil, - self _self: URL? = nil - ) { - self.related = related - self.`self` = _self - } - - private enum CodingKeys: String, CodingKey { - case related - case `self` = "self" - } - } } - public struct AppStoreVersionExperiments: Hashable, Codable { + public struct AppStoreVersionExperiments: Hashable, Codable, Sendable { public var data: [Data]? - public var links: Links? + public var links: RelationshipLinks? public var meta: PagingInformation? public init( data: [Data]? = nil, - links: Links? = nil, + links: RelationshipLinks? = nil, meta: PagingInformation? = nil ) { self.data = data @@ -445,7 +454,7 @@ public struct AppStoreVersion: Hashable, Codable { case meta } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -463,41 +472,22 @@ public struct AppStoreVersion: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case appStoreVersionExperiments } } - - public struct Links: Hashable, Codable { - public var related: URL? - - public var `self`: URL? - - public init( - related: URL? = nil, - self _self: URL? = nil - ) { - self.related = related - self.`self` = _self - } - - private enum CodingKeys: String, CodingKey { - case related - case `self` = "self" - } - } } - public struct AppStoreVersionExperimentsV2: Hashable, Codable { + public struct AppStoreVersionExperimentsV2: Hashable, Codable, Sendable { public var data: [Data]? - public var links: Links? + public var links: RelationshipLinks? public var meta: PagingInformation? public init( data: [Data]? = nil, - links: Links? = nil, + links: RelationshipLinks? = nil, meta: PagingInformation? = nil ) { self.data = data @@ -511,7 +501,7 @@ public struct AppStoreVersion: Hashable, Codable { case meta } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -529,41 +519,22 @@ public struct AppStoreVersion: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case appStoreVersionExperiments } } - - public struct Links: Hashable, Codable { - public var related: URL? - - public var `self`: URL? - - public init( - related: URL? = nil, - self _self: URL? = nil - ) { - self.related = related - self.`self` = _self - } - - private enum CodingKeys: String, CodingKey { - case related - case `self` = "self" - } - } } - public struct AppStoreVersionLocalizations: Hashable, Codable { + public struct AppStoreVersionLocalizations: Hashable, Codable, Sendable { public var data: [Data]? - public var links: Links? + public var links: RelationshipLinks? public var meta: PagingInformation? public init( data: [Data]? = nil, - links: Links? = nil, + links: RelationshipLinks? = nil, meta: PagingInformation? = nil ) { self.data = data @@ -577,7 +548,7 @@ public struct AppStoreVersion: Hashable, Codable { case meta } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -595,39 +566,20 @@ public struct AppStoreVersion: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case appStoreVersionLocalizations } } - - public struct Links: Hashable, Codable { - public var related: URL? - - public var `self`: URL? - - public init( - related: URL? = nil, - self _self: URL? = nil - ) { - self.related = related - self.`self` = _self - } - - private enum CodingKeys: String, CodingKey { - case related - case `self` = "self" - } - } } - public struct AppStoreVersionPhasedRelease: Hashable, Codable { + public struct AppStoreVersionPhasedRelease: Hashable, Codable, Sendable { public var data: Data? - public var links: Links? + public var links: RelationshipLinks? public init( data: Data? = nil, - links: Links? = nil + links: RelationshipLinks? = nil ) { self.data = data self.links = links @@ -638,7 +590,7 @@ public struct AppStoreVersion: Hashable, Codable { case links } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -656,39 +608,20 @@ public struct AppStoreVersion: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case appStoreVersionPhasedReleases } } - - public struct Links: Hashable, Codable { - public var related: URL? - - public var `self`: URL? - - public init( - related: URL? = nil, - self _self: URL? = nil - ) { - self.related = related - self.`self` = _self - } - - private enum CodingKeys: String, CodingKey { - case related - case `self` = "self" - } - } } - public struct AppStoreVersionSubmission: Hashable, Codable { + public struct AppStoreVersionSubmission: Hashable, Codable, Sendable { public var data: Data? - public var links: Links? + public var links: RelationshipLinks? public init( data: Data? = nil, - links: Links? = nil + links: RelationshipLinks? = nil ) { self.data = data self.links = links @@ -699,7 +632,7 @@ public struct AppStoreVersion: Hashable, Codable { case links } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -717,39 +650,20 @@ public struct AppStoreVersion: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case appStoreVersionSubmissions } } - - public struct Links: Hashable, Codable { - public var related: URL? - - public var `self`: URL? - - public init( - related: URL? = nil, - self _self: URL? = nil - ) { - self.related = related - self.`self` = _self - } - - private enum CodingKeys: String, CodingKey { - case related - case `self` = "self" - } - } } - public struct Build: Hashable, Codable { + public struct Build: Hashable, Codable, Sendable { public var data: Data? - public var links: Links? + public var links: RelationshipLinks? public init( data: Data? = nil, - links: Links? = nil + links: RelationshipLinks? = nil ) { self.data = data self.links = links @@ -760,7 +674,7 @@ public struct AppStoreVersion: Hashable, Codable { case links } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -778,39 +692,32 @@ public struct AppStoreVersion: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case builds } } + } - public struct Links: Hashable, Codable { - public var related: URL? - - public var `self`: URL? + public struct CustomerReviews: Hashable, Codable, Sendable { + public var links: RelationshipLinks? - public init( - related: URL? = nil, - self _self: URL? = nil - ) { - self.related = related - self.`self` = _self - } + public init(links: RelationshipLinks? = nil) { + self.links = links + } - private enum CodingKeys: String, CodingKey { - case related - case `self` = "self" - } + private enum CodingKeys: String, CodingKey { + case links } } - public struct RoutingAppCoverage: Hashable, Codable { + public struct GameCenterAppVersion: Hashable, Codable, Sendable { public var data: Data? - public var links: Links? + public var links: RelationshipLinks? public init( data: Data? = nil, - links: Links? = nil + links: RelationshipLinks? = nil ) { self.data = data self.links = links @@ -821,7 +728,7 @@ public struct AppStoreVersion: Hashable, Codable { case links } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -839,27 +746,50 @@ public struct AppStoreVersion: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { - case routingAppCoverages + public enum `Type`: String, Hashable, Codable, Sendable { + case gameCenterAppVersions } } + } - public struct Links: Hashable, Codable { - public var related: URL? + public struct RoutingAppCoverage: Hashable, Codable, Sendable { + public var data: Data? - public var `self`: URL? + public var links: RelationshipLinks? + + public init( + data: Data? = nil, + links: RelationshipLinks? = nil + ) { + self.data = data + self.links = links + } + + private enum CodingKeys: String, CodingKey { + case data + case links + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` public init( - related: URL? = nil, - self _self: URL? = nil + id: String, + type: `Type` ) { - self.related = related - self.`self` = _self + self.id = id + self.type = type } private enum CodingKeys: String, CodingKey { - case related - case `self` = "self" + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case routingAppCoverages } } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/AppStoreVersionExperiment.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/AppStoreVersionExperiment.generated.swift index db921be9..3f976d00 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/AppStoreVersionExperiment.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/AppStoreVersionExperiment.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct AppStoreVersionExperiment: Hashable, Codable { +public struct AppStoreVersionExperiment: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -36,11 +36,11 @@ public struct AppStoreVersionExperiment: Hashable, Codable { case links } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case appStoreVersionExperiments } - public struct Attributes: Hashable, Codable { + public struct Attributes: Hashable, Codable, Sendable { public var endDate: String? public var name: String? @@ -78,51 +78,56 @@ public struct AppStoreVersionExperiment: Hashable, Codable { case trafficProportion } - public enum State: Hashable, Codable, RawRepresentable { - case accepted - case approved - case completed - case inReview - case prepareForSubmission - case readyForReview - case rejected - case stopped - case waitingForReview - case unknown(String) - - public var rawValue: String { - switch self { - case .accepted: return "ACCEPTED" - case .approved: return "APPROVED" - case .completed: return "COMPLETED" - case .inReview: return "IN_REVIEW" - case .prepareForSubmission: return "PREPARE_FOR_SUBMISSION" - case .readyForReview: return "READY_FOR_REVIEW" - case .rejected: return "REJECTED" - case .stopped: return "STOPPED" - case .waitingForReview: return "WAITING_FOR_REVIEW" - case .unknown(let rawValue): return rawValue - } + public struct State: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var accepted: Self { + .init(rawValue: "ACCEPTED") + } + + public static var approved: Self { + .init(rawValue: "APPROVED") + } + + public static var completed: Self { + .init(rawValue: "COMPLETED") + } + + public static var inReview: Self { + .init(rawValue: "IN_REVIEW") + } + + public static var prepareForSubmission: Self { + .init(rawValue: "PREPARE_FOR_SUBMISSION") } + public static var readyForReview: Self { + .init(rawValue: "READY_FOR_REVIEW") + } + + public static var rejected: Self { + .init(rawValue: "REJECTED") + } + + public static var stopped: Self { + .init(rawValue: "STOPPED") + } + + public static var waitingForReview: Self { + .init(rawValue: "WAITING_FOR_REVIEW") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "ACCEPTED": self = .accepted - case "APPROVED": self = .approved - case "COMPLETED": self = .completed - case "IN_REVIEW": self = .inReview - case "PREPARE_FOR_SUBMISSION": self = .prepareForSubmission - case "READY_FOR_REVIEW": self = .readyForReview - case "REJECTED": self = .rejected - case "STOPPED": self = .stopped - case "WAITING_FOR_REVIEW": self = .waitingForReview - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } } - public struct Relationships: Hashable, Codable { + public struct Relationships: Hashable, Codable, Sendable { public var appStoreVersion: AppStoreVersion? public var appStoreVersionExperimentTreatments: AppStoreVersionExperimentTreatments? @@ -140,25 +145,18 @@ public struct AppStoreVersionExperiment: Hashable, Codable { case appStoreVersionExperimentTreatments } - public struct AppStoreVersion: Hashable, Codable { + public struct AppStoreVersion: Hashable, Codable, Sendable { public var data: Data? - public var links: Links? - - public init( - data: Data? = nil, - links: Links? = nil - ) { + public init(data: Data? = nil) { self.data = data - self.links = links } private enum CodingKeys: String, CodingKey { case data - case links } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -176,41 +174,22 @@ public struct AppStoreVersionExperiment: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case appStoreVersions } } - - public struct Links: Hashable, Codable { - public var related: URL? - - public var `self`: URL? - - public init( - related: URL? = nil, - self _self: URL? = nil - ) { - self.related = related - self.`self` = _self - } - - private enum CodingKeys: String, CodingKey { - case related - case `self` = "self" - } - } } - public struct AppStoreVersionExperimentTreatments: Hashable, Codable { + public struct AppStoreVersionExperimentTreatments: Hashable, Codable, Sendable { public var data: [Data]? - public var links: Links? + public var links: RelationshipLinks? public var meta: PagingInformation? public init( data: [Data]? = nil, - links: Links? = nil, + links: RelationshipLinks? = nil, meta: PagingInformation? = nil ) { self.data = data @@ -224,7 +203,7 @@ public struct AppStoreVersionExperiment: Hashable, Codable { case meta } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -242,29 +221,10 @@ public struct AppStoreVersionExperiment: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case appStoreVersionExperimentTreatments } } - - public struct Links: Hashable, Codable { - public var related: URL? - - public var `self`: URL? - - public init( - related: URL? = nil, - self _self: URL? = nil - ) { - self.related = related - self.`self` = _self - } - - private enum CodingKeys: String, CodingKey { - case related - case `self` = "self" - } - } } } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/AppStoreVersionExperimentTreatment.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/AppStoreVersionExperimentTreatment.generated.swift index 1a0731a6..0b0becad 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/AppStoreVersionExperimentTreatment.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/AppStoreVersionExperimentTreatment.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct AppStoreVersionExperimentTreatment: Hashable, Codable { +public struct AppStoreVersionExperimentTreatment: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -36,11 +36,11 @@ public struct AppStoreVersionExperimentTreatment: Hashable, Codable { case links } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case appStoreVersionExperimentTreatments } - public struct Attributes: Hashable, Codable { + public struct Attributes: Hashable, Codable, Sendable { public var appIcon: ImageAsset? public var appIconName: String? @@ -69,7 +69,7 @@ public struct AppStoreVersionExperimentTreatment: Hashable, Codable { } } - public struct Relationships: Hashable, Codable { + public struct Relationships: Hashable, Codable, Sendable { public var appStoreVersionExperiment: AppStoreVersionExperiment? public var appStoreVersionExperimentTreatmentLocalizations: AppStoreVersionExperimentTreatmentLocalizations? @@ -92,25 +92,18 @@ public struct AppStoreVersionExperimentTreatment: Hashable, Codable { case appStoreVersionExperimentV2 } - public struct AppStoreVersionExperiment: Hashable, Codable { + public struct AppStoreVersionExperiment: Hashable, Codable, Sendable { public var data: Data? - public var links: Links? - - public init( - data: Data? = nil, - links: Links? = nil - ) { + public init(data: Data? = nil) { self.data = data - self.links = links } private enum CodingKeys: String, CodingKey { case data - case links } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -128,41 +121,22 @@ public struct AppStoreVersionExperimentTreatment: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case appStoreVersionExperiments } } - - public struct Links: Hashable, Codable { - public var related: URL? - - public var `self`: URL? - - public init( - related: URL? = nil, - self _self: URL? = nil - ) { - self.related = related - self.`self` = _self - } - - private enum CodingKeys: String, CodingKey { - case related - case `self` = "self" - } - } } - public struct AppStoreVersionExperimentTreatmentLocalizations: Hashable, Codable { + public struct AppStoreVersionExperimentTreatmentLocalizations: Hashable, Codable, Sendable { public var data: [Data]? - public var links: Links? + public var links: RelationshipLinks? public var meta: PagingInformation? public init( data: [Data]? = nil, - links: Links? = nil, + links: RelationshipLinks? = nil, meta: PagingInformation? = nil ) { self.data = data @@ -176,7 +150,7 @@ public struct AppStoreVersionExperimentTreatment: Hashable, Codable { case meta } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -194,50 +168,24 @@ public struct AppStoreVersionExperimentTreatment: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case appStoreVersionExperimentTreatmentLocalizations } } - - public struct Links: Hashable, Codable { - public var related: URL? - - public var `self`: URL? - - public init( - related: URL? = nil, - self _self: URL? = nil - ) { - self.related = related - self.`self` = _self - } - - private enum CodingKeys: String, CodingKey { - case related - case `self` = "self" - } - } } - public struct AppStoreVersionExperimentV2: Hashable, Codable { + public struct AppStoreVersionExperimentV2: Hashable, Codable, Sendable { public var data: Data? - public var links: Links? - - public init( - data: Data? = nil, - links: Links? = nil - ) { + public init(data: Data? = nil) { self.data = data - self.links = links } private enum CodingKeys: String, CodingKey { case data - case links } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -255,29 +203,10 @@ public struct AppStoreVersionExperimentTreatment: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case appStoreVersionExperiments } } - - public struct Links: Hashable, Codable { - public var related: URL? - - public var `self`: URL? - - public init( - related: URL? = nil, - self _self: URL? = nil - ) { - self.related = related - self.`self` = _self - } - - private enum CodingKeys: String, CodingKey { - case related - case `self` = "self" - } - } } } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/AppStoreVersionExperimentTreatmentLocalization.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/AppStoreVersionExperimentTreatmentLocalization.generated.swift index 5c86c81c..9c414755 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/AppStoreVersionExperimentTreatmentLocalization.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/AppStoreVersionExperimentTreatmentLocalization.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct AppStoreVersionExperimentTreatmentLocalization: Hashable, Codable { +public struct AppStoreVersionExperimentTreatmentLocalization: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -36,11 +36,11 @@ public struct AppStoreVersionExperimentTreatmentLocalization: Hashable, Codable case links } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case appStoreVersionExperimentTreatmentLocalizations } - public struct Attributes: Hashable, Codable { + public struct Attributes: Hashable, Codable, Sendable { public var locale: String? public init(locale: String? = nil) { @@ -52,7 +52,7 @@ public struct AppStoreVersionExperimentTreatmentLocalization: Hashable, Codable } } - public struct Relationships: Hashable, Codable { + public struct Relationships: Hashable, Codable, Sendable { public var appPreviewSets: AppPreviewSets? public var appScreenshotSets: AppScreenshotSets? @@ -75,16 +75,16 @@ public struct AppStoreVersionExperimentTreatmentLocalization: Hashable, Codable case appStoreVersionExperimentTreatment } - public struct AppPreviewSets: Hashable, Codable { + public struct AppPreviewSets: Hashable, Codable, Sendable { public var data: [Data]? - public var links: Links? + public var links: RelationshipLinks? public var meta: PagingInformation? public init( data: [Data]? = nil, - links: Links? = nil, + links: RelationshipLinks? = nil, meta: PagingInformation? = nil ) { self.data = data @@ -98,7 +98,7 @@ public struct AppStoreVersionExperimentTreatmentLocalization: Hashable, Codable case meta } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -116,41 +116,22 @@ public struct AppStoreVersionExperimentTreatmentLocalization: Hashable, Codable case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case appPreviewSets } } - - public struct Links: Hashable, Codable { - public var related: URL? - - public var `self`: URL? - - public init( - related: URL? = nil, - self _self: URL? = nil - ) { - self.related = related - self.`self` = _self - } - - private enum CodingKeys: String, CodingKey { - case related - case `self` = "self" - } - } } - public struct AppScreenshotSets: Hashable, Codable { + public struct AppScreenshotSets: Hashable, Codable, Sendable { public var data: [Data]? - public var links: Links? + public var links: RelationshipLinks? public var meta: PagingInformation? public init( data: [Data]? = nil, - links: Links? = nil, + links: RelationshipLinks? = nil, meta: PagingInformation? = nil ) { self.data = data @@ -164,7 +145,7 @@ public struct AppStoreVersionExperimentTreatmentLocalization: Hashable, Codable case meta } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -182,50 +163,24 @@ public struct AppStoreVersionExperimentTreatmentLocalization: Hashable, Codable case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case appScreenshotSets } } - - public struct Links: Hashable, Codable { - public var related: URL? - - public var `self`: URL? - - public init( - related: URL? = nil, - self _self: URL? = nil - ) { - self.related = related - self.`self` = _self - } - - private enum CodingKeys: String, CodingKey { - case related - case `self` = "self" - } - } } - public struct AppStoreVersionExperimentTreatment: Hashable, Codable { + public struct AppStoreVersionExperimentTreatment: Hashable, Codable, Sendable { public var data: Data? - public var links: Links? - - public init( - data: Data? = nil, - links: Links? = nil - ) { + public init(data: Data? = nil) { self.data = data - self.links = links } private enum CodingKeys: String, CodingKey { case data - case links } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -243,29 +198,10 @@ public struct AppStoreVersionExperimentTreatmentLocalization: Hashable, Codable case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case appStoreVersionExperimentTreatments } } - - public struct Links: Hashable, Codable { - public var related: URL? - - public var `self`: URL? - - public init( - related: URL? = nil, - self _self: URL? = nil - ) { - self.related = related - self.`self` = _self - } - - private enum CodingKeys: String, CodingKey { - case related - case `self` = "self" - } - } } } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/AppStoreVersionExperimentV2.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/AppStoreVersionExperimentV2.generated.swift index 6a91a4ae..ffc1bea2 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/AppStoreVersionExperimentV2.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/AppStoreVersionExperimentV2.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct AppStoreVersionExperimentV2: Hashable, Codable { +public struct AppStoreVersionExperimentV2: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -36,11 +36,11 @@ public struct AppStoreVersionExperimentV2: Hashable, Codable { case links } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case appStoreVersionExperiments } - public struct Attributes: Hashable, Codable { + public struct Attributes: Hashable, Codable, Sendable { public var endDate: String? public var name: String? @@ -83,51 +83,56 @@ public struct AppStoreVersionExperimentV2: Hashable, Codable { case trafficProportion } - public enum State: Hashable, Codable, RawRepresentable { - case accepted - case approved - case completed - case inReview - case prepareForSubmission - case readyForReview - case rejected - case stopped - case waitingForReview - case unknown(String) - - public var rawValue: String { - switch self { - case .accepted: return "ACCEPTED" - case .approved: return "APPROVED" - case .completed: return "COMPLETED" - case .inReview: return "IN_REVIEW" - case .prepareForSubmission: return "PREPARE_FOR_SUBMISSION" - case .readyForReview: return "READY_FOR_REVIEW" - case .rejected: return "REJECTED" - case .stopped: return "STOPPED" - case .waitingForReview: return "WAITING_FOR_REVIEW" - case .unknown(let rawValue): return rawValue - } + public struct State: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var accepted: Self { + .init(rawValue: "ACCEPTED") + } + + public static var approved: Self { + .init(rawValue: "APPROVED") + } + + public static var completed: Self { + .init(rawValue: "COMPLETED") + } + + public static var inReview: Self { + .init(rawValue: "IN_REVIEW") + } + + public static var prepareForSubmission: Self { + .init(rawValue: "PREPARE_FOR_SUBMISSION") + } + + public static var readyForReview: Self { + .init(rawValue: "READY_FOR_REVIEW") + } + + public static var rejected: Self { + .init(rawValue: "REJECTED") + } + + public static var stopped: Self { + .init(rawValue: "STOPPED") + } + + public static var waitingForReview: Self { + .init(rawValue: "WAITING_FOR_REVIEW") + } + + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "ACCEPTED": self = .accepted - case "APPROVED": self = .approved - case "COMPLETED": self = .completed - case "IN_REVIEW": self = .inReview - case "PREPARE_FOR_SUBMISSION": self = .prepareForSubmission - case "READY_FOR_REVIEW": self = .readyForReview - case "REJECTED": self = .rejected - case "STOPPED": self = .stopped - case "WAITING_FOR_REVIEW": self = .waitingForReview - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } } - public struct Relationships: Hashable, Codable { + public struct Relationships: Hashable, Codable, Sendable { public var app: App? public var appStoreVersionExperimentTreatments: AppStoreVersionExperimentTreatments? @@ -155,25 +160,18 @@ public struct AppStoreVersionExperimentV2: Hashable, Codable { case latestControlVersion } - public struct App: Hashable, Codable { + public struct App: Hashable, Codable, Sendable { public var data: Data? - public var links: Links? - - public init( - data: Data? = nil, - links: Links? = nil - ) { + public init(data: Data? = nil) { self.data = data - self.links = links } private enum CodingKeys: String, CodingKey { case data - case links } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -191,41 +189,22 @@ public struct AppStoreVersionExperimentV2: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case apps } } - - public struct Links: Hashable, Codable { - public var related: URL? - - public var `self`: URL? - - public init( - related: URL? = nil, - self _self: URL? = nil - ) { - self.related = related - self.`self` = _self - } - - private enum CodingKeys: String, CodingKey { - case related - case `self` = "self" - } - } } - public struct AppStoreVersionExperimentTreatments: Hashable, Codable { + public struct AppStoreVersionExperimentTreatments: Hashable, Codable, Sendable { public var data: [Data]? - public var links: Links? + public var links: RelationshipLinks? public var meta: PagingInformation? public init( data: [Data]? = nil, - links: Links? = nil, + links: RelationshipLinks? = nil, meta: PagingInformation? = nil ) { self.data = data @@ -239,7 +218,7 @@ public struct AppStoreVersionExperimentV2: Hashable, Codable { case meta } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -257,55 +236,31 @@ public struct AppStoreVersionExperimentV2: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case appStoreVersionExperimentTreatments } } - - public struct Links: Hashable, Codable { - public var related: URL? - - public var `self`: URL? - - public init( - related: URL? = nil, - self _self: URL? = nil - ) { - self.related = related - self.`self` = _self - } - - private enum CodingKeys: String, CodingKey { - case related - case `self` = "self" - } - } } - public struct ControlVersions: Hashable, Codable { + public struct ControlVersions: Hashable, Codable, Sendable { public var data: [Data]? - public var links: Links? - public var meta: PagingInformation? public init( data: [Data]? = nil, - links: Links? = nil, meta: PagingInformation? = nil ) { self.data = data - self.links = links self.meta = meta } private enum CodingKeys: String, CodingKey { case data - case links case meta } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -323,50 +278,24 @@ public struct AppStoreVersionExperimentV2: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case appStoreVersions } } - - public struct Links: Hashable, Codable { - public var related: URL? - - public var `self`: URL? - - public init( - related: URL? = nil, - self _self: URL? = nil - ) { - self.related = related - self.`self` = _self - } - - private enum CodingKeys: String, CodingKey { - case related - case `self` = "self" - } - } } - public struct LatestControlVersion: Hashable, Codable { + public struct LatestControlVersion: Hashable, Codable, Sendable { public var data: Data? - public var links: Links? - - public init( - data: Data? = nil, - links: Links? = nil - ) { + public init(data: Data? = nil) { self.data = data - self.links = links } private enum CodingKeys: String, CodingKey { case data - case links } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -384,29 +313,10 @@ public struct AppStoreVersionExperimentV2: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case appStoreVersions } } - - public struct Links: Hashable, Codable { - public var related: URL? - - public var `self`: URL? - - public init( - related: URL? = nil, - self _self: URL? = nil - ) { - self.related = related - self.`self` = _self - } - - private enum CodingKeys: String, CodingKey { - case related - case `self` = "self" - } - } } } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/AppStoreVersionLocalization.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/AppStoreVersionLocalization.generated.swift index b6927b90..0fc6d1ab 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/AppStoreVersionLocalization.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/AppStoreVersionLocalization.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct AppStoreVersionLocalization: Hashable, Codable { +public struct AppStoreVersionLocalization: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -36,11 +36,11 @@ public struct AppStoreVersionLocalization: Hashable, Codable { case links } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case appStoreVersionLocalizations } - public struct Attributes: Hashable, Codable { + public struct Attributes: Hashable, Codable, Sendable { public var description: String? public var keywords: String? @@ -84,7 +84,7 @@ public struct AppStoreVersionLocalization: Hashable, Codable { } } - public struct Relationships: Hashable, Codable { + public struct Relationships: Hashable, Codable, Sendable { public var appPreviewSets: AppPreviewSets? public var appScreenshotSets: AppScreenshotSets? @@ -107,16 +107,16 @@ public struct AppStoreVersionLocalization: Hashable, Codable { case appStoreVersion } - public struct AppPreviewSets: Hashable, Codable { + public struct AppPreviewSets: Hashable, Codable, Sendable { public var data: [Data]? - public var links: Links? + public var links: RelationshipLinks? public var meta: PagingInformation? public init( data: [Data]? = nil, - links: Links? = nil, + links: RelationshipLinks? = nil, meta: PagingInformation? = nil ) { self.data = data @@ -130,7 +130,7 @@ public struct AppStoreVersionLocalization: Hashable, Codable { case meta } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -148,41 +148,22 @@ public struct AppStoreVersionLocalization: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case appPreviewSets } } - - public struct Links: Hashable, Codable { - public var related: URL? - - public var `self`: URL? - - public init( - related: URL? = nil, - self _self: URL? = nil - ) { - self.related = related - self.`self` = _self - } - - private enum CodingKeys: String, CodingKey { - case related - case `self` = "self" - } - } } - public struct AppScreenshotSets: Hashable, Codable { + public struct AppScreenshotSets: Hashable, Codable, Sendable { public var data: [Data]? - public var links: Links? + public var links: RelationshipLinks? public var meta: PagingInformation? public init( data: [Data]? = nil, - links: Links? = nil, + links: RelationshipLinks? = nil, meta: PagingInformation? = nil ) { self.data = data @@ -196,7 +177,7 @@ public struct AppStoreVersionLocalization: Hashable, Codable { case meta } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -214,50 +195,24 @@ public struct AppStoreVersionLocalization: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case appScreenshotSets } } - - public struct Links: Hashable, Codable { - public var related: URL? - - public var `self`: URL? - - public init( - related: URL? = nil, - self _self: URL? = nil - ) { - self.related = related - self.`self` = _self - } - - private enum CodingKeys: String, CodingKey { - case related - case `self` = "self" - } - } } - public struct AppStoreVersion: Hashable, Codable { + public struct AppStoreVersion: Hashable, Codable, Sendable { public var data: Data? - public var links: Links? - - public init( - data: Data? = nil, - links: Links? = nil - ) { + public init(data: Data? = nil) { self.data = data - self.links = links } private enum CodingKeys: String, CodingKey { case data - case links } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -275,29 +230,10 @@ public struct AppStoreVersionLocalization: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case appStoreVersions } } - - public struct Links: Hashable, Codable { - public var related: URL? - - public var `self`: URL? - - public init( - related: URL? = nil, - self _self: URL? = nil - ) { - self.related = related - self.`self` = _self - } - - private enum CodingKeys: String, CodingKey { - case related - case `self` = "self" - } - } } } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/AppStoreVersionPhasedRelease.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/AppStoreVersionPhasedRelease.generated.swift index 23ba32f1..0500aa32 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/AppStoreVersionPhasedRelease.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/AppStoreVersionPhasedRelease.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct AppStoreVersionPhasedRelease: Hashable, Codable { +public struct AppStoreVersionPhasedRelease: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -31,11 +31,11 @@ public struct AppStoreVersionPhasedRelease: Hashable, Codable { case links } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case appStoreVersionPhasedReleases } - public struct Attributes: Hashable, Codable { + public struct Attributes: Hashable, Codable, Sendable { public var currentDayNumber: Int? public var phasedReleaseState: PhasedReleaseState? diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/AppStoreVersionPromotion.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/AppStoreVersionPromotion.generated.swift index eab68efb..8122c2c4 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/AppStoreVersionPromotion.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/AppStoreVersionPromotion.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct AppStoreVersionPromotion: Hashable, Codable { +public struct AppStoreVersionPromotion: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -26,7 +26,7 @@ public struct AppStoreVersionPromotion: Hashable, Codable { case links } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case appStoreVersionPromotions } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/AppStoreVersionState.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/AppStoreVersionState.generated.swift index 36d2d532..251f9983 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/AppStoreVersionState.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/AppStoreVersionState.generated.swift @@ -3,76 +3,95 @@ // swiftlint:disable all import Foundation -public enum AppStoreVersionState: Hashable, Codable, RawRepresentable { - case accepted - case developerRejected - case developerRemovedFromSale - case inReview - case invalidBinary - case metadataRejected - case pendingAppleRelease - case pendingContract - case pendingDeveloperRelease - case preorderReadyForSale - case prepareForSubmission - case processingForAppStore - case readyForReview - case readyForSale - case rejected - case removedFromSale - case replacedWithNewVersion - case waitingForExportCompliance - case waitingForReview - case unknown(String) - - public var rawValue: String { - switch self { - case .accepted: return "ACCEPTED" - case .developerRejected: return "DEVELOPER_REJECTED" - case .developerRemovedFromSale: return "DEVELOPER_REMOVED_FROM_SALE" - case .inReview: return "IN_REVIEW" - case .invalidBinary: return "INVALID_BINARY" - case .metadataRejected: return "METADATA_REJECTED" - case .pendingAppleRelease: return "PENDING_APPLE_RELEASE" - case .pendingContract: return "PENDING_CONTRACT" - case .pendingDeveloperRelease: return "PENDING_DEVELOPER_RELEASE" - case .preorderReadyForSale: return "PREORDER_READY_FOR_SALE" - case .prepareForSubmission: return "PREPARE_FOR_SUBMISSION" - case .processingForAppStore: return "PROCESSING_FOR_APP_STORE" - case .readyForReview: return "READY_FOR_REVIEW" - case .readyForSale: return "READY_FOR_SALE" - case .rejected: return "REJECTED" - case .removedFromSale: return "REMOVED_FROM_SALE" - case .replacedWithNewVersion: return "REPLACED_WITH_NEW_VERSION" - case .waitingForExportCompliance: return "WAITING_FOR_EXPORT_COMPLIANCE" - case .waitingForReview: return "WAITING_FOR_REVIEW" - case .unknown(let rawValue): return rawValue - } +public struct AppStoreVersionState: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var accepted: Self { + .init(rawValue: "ACCEPTED") } + public static var developerRejected: Self { + .init(rawValue: "DEVELOPER_REJECTED") + } + + public static var developerRemovedFromSale: Self { + .init(rawValue: "DEVELOPER_REMOVED_FROM_SALE") + } + + public static var inReview: Self { + .init(rawValue: "IN_REVIEW") + } + + public static var invalidBinary: Self { + .init(rawValue: "INVALID_BINARY") + } + + public static var metadataRejected: Self { + .init(rawValue: "METADATA_REJECTED") + } + + public static var notApplicable: Self { + .init(rawValue: "NOT_APPLICABLE") + } + + public static var pendingAppleRelease: Self { + .init(rawValue: "PENDING_APPLE_RELEASE") + } + + public static var pendingContract: Self { + .init(rawValue: "PENDING_CONTRACT") + } + + public static var pendingDeveloperRelease: Self { + .init(rawValue: "PENDING_DEVELOPER_RELEASE") + } + + public static var preorderReadyForSale: Self { + .init(rawValue: "PREORDER_READY_FOR_SALE") + } + + public static var prepareForSubmission: Self { + .init(rawValue: "PREPARE_FOR_SUBMISSION") + } + + public static var processingForAppStore: Self { + .init(rawValue: "PROCESSING_FOR_APP_STORE") + } + + public static var readyForReview: Self { + .init(rawValue: "READY_FOR_REVIEW") + } + + public static var readyForSale: Self { + .init(rawValue: "READY_FOR_SALE") + } + + public static var rejected: Self { + .init(rawValue: "REJECTED") + } + + public static var removedFromSale: Self { + .init(rawValue: "REMOVED_FROM_SALE") + } + + public static var replacedWithNewVersion: Self { + .init(rawValue: "REPLACED_WITH_NEW_VERSION") + } + + public static var waitingForExportCompliance: Self { + .init(rawValue: "WAITING_FOR_EXPORT_COMPLIANCE") + } + + public static var waitingForReview: Self { + .init(rawValue: "WAITING_FOR_REVIEW") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "ACCEPTED": self = .accepted - case "DEVELOPER_REJECTED": self = .developerRejected - case "DEVELOPER_REMOVED_FROM_SALE": self = .developerRemovedFromSale - case "IN_REVIEW": self = .inReview - case "INVALID_BINARY": self = .invalidBinary - case "METADATA_REJECTED": self = .metadataRejected - case "PENDING_APPLE_RELEASE": self = .pendingAppleRelease - case "PENDING_CONTRACT": self = .pendingContract - case "PENDING_DEVELOPER_RELEASE": self = .pendingDeveloperRelease - case "PREORDER_READY_FOR_SALE": self = .preorderReadyForSale - case "PREPARE_FOR_SUBMISSION": self = .prepareForSubmission - case "PROCESSING_FOR_APP_STORE": self = .processingForAppStore - case "READY_FOR_REVIEW": self = .readyForReview - case "READY_FOR_SALE": self = .readyForSale - case "REJECTED": self = .rejected - case "REMOVED_FROM_SALE": self = .removedFromSale - case "REPLACED_WITH_NEW_VERSION": self = .replacedWithNewVersion - case "WAITING_FOR_EXPORT_COMPLIANCE": self = .waitingForExportCompliance - case "WAITING_FOR_REVIEW": self = .waitingForReview - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/AppStoreVersionSubmission.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/AppStoreVersionSubmission.generated.swift index e81d0767..b5c93a47 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/AppStoreVersionSubmission.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/AppStoreVersionSubmission.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct AppStoreVersionSubmission: Hashable, Codable { +public struct AppStoreVersionSubmission: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -31,11 +31,11 @@ public struct AppStoreVersionSubmission: Hashable, Codable { case links } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case appStoreVersionSubmissions } - public struct Relationships: Hashable, Codable { + public struct Relationships: Hashable, Codable, Sendable { public var appStoreVersion: AppStoreVersion? public init(appStoreVersion: AppStoreVersion? = nil) { @@ -46,25 +46,18 @@ public struct AppStoreVersionSubmission: Hashable, Codable { case appStoreVersion } - public struct AppStoreVersion: Hashable, Codable { + public struct AppStoreVersion: Hashable, Codable, Sendable { public var data: Data? - public var links: Links? - - public init( - data: Data? = nil, - links: Links? = nil - ) { + public init(data: Data? = nil) { self.data = data - self.links = links } private enum CodingKeys: String, CodingKey { case data - case links } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -82,29 +75,10 @@ public struct AppStoreVersionSubmission: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case appStoreVersions } } - - public struct Links: Hashable, Codable { - public var related: URL? - - public var `self`: URL? - - public init( - related: URL? = nil, - self _self: URL? = nil - ) { - self.related = related - self.`self` = _self - } - - private enum CodingKeys: String, CodingKey { - case related - case `self` = "self" - } - } } } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/AppVersionState.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/AppVersionState.generated.swift new file mode 100644 index 00000000..3b5b41df --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/AppVersionState.generated.swift @@ -0,0 +1,78 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct AppVersionState: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var accepted: Self { + .init(rawValue: "ACCEPTED") + } + + public static var developerRejected: Self { + .init(rawValue: "DEVELOPER_REJECTED") + } + + public static var inReview: Self { + .init(rawValue: "IN_REVIEW") + } + + public static var invalidBinary: Self { + .init(rawValue: "INVALID_BINARY") + } + + public static var metadataRejected: Self { + .init(rawValue: "METADATA_REJECTED") + } + + public static var pendingAppleRelease: Self { + .init(rawValue: "PENDING_APPLE_RELEASE") + } + + public static var pendingDeveloperRelease: Self { + .init(rawValue: "PENDING_DEVELOPER_RELEASE") + } + + public static var prepareForSubmission: Self { + .init(rawValue: "PREPARE_FOR_SUBMISSION") + } + + public static var processingForDistribution: Self { + .init(rawValue: "PROCESSING_FOR_DISTRIBUTION") + } + + public static var readyForDistribution: Self { + .init(rawValue: "READY_FOR_DISTRIBUTION") + } + + public static var readyForReview: Self { + .init(rawValue: "READY_FOR_REVIEW") + } + + public static var rejected: Self { + .init(rawValue: "REJECTED") + } + + public static var replacedWithNewVersion: Self { + .init(rawValue: "REPLACED_WITH_NEW_VERSION") + } + + public static var waitingForExportCompliance: Self { + .init(rawValue: "WAITING_FOR_EXPORT_COMPLIANCE") + } + + public static var waitingForReview: Self { + .init(rawValue: "WAITING_FOR_REVIEW") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/BackgroundAsset.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/BackgroundAsset.generated.swift new file mode 100644 index 00000000..53f618bc --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/BackgroundAsset.generated.swift @@ -0,0 +1,129 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct BackgroundAsset: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public var attributes: Attributes? + + public var relationships: Relationships? + + public var links: ResourceLinks? + + public init( + id: String, + type: `Type`, + attributes: Attributes? = nil, + relationships: Relationships? = nil, + links: ResourceLinks? = nil + ) { + self.id = id + self.type = type + self.attributes = attributes + self.relationships = relationships + self.links = links + } + + private enum CodingKeys: String, CodingKey { + case id + case type + case attributes + case relationships + case links + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case backgroundAssets + } + + public struct Attributes: Hashable, Codable, Sendable { + public var assetPackIdentifier: String? + + public var createdDate: String? + + public init( + assetPackIdentifier: String? = nil, + createdDate: String? = nil + ) { + self.assetPackIdentifier = assetPackIdentifier + self.createdDate = createdDate + } + + private enum CodingKeys: String, CodingKey { + case assetPackIdentifier + case createdDate + } + } + + public struct Relationships: Hashable, Codable, Sendable { + public var internalBetaVersion: InternalBetaVersion? + + public var versions: Versions? + + public init( + internalBetaVersion: InternalBetaVersion? = nil, + versions: Versions? = nil + ) { + self.internalBetaVersion = internalBetaVersion + self.versions = versions + } + + private enum CodingKeys: String, CodingKey { + case internalBetaVersion + case versions + } + + public struct InternalBetaVersion: Hashable, Codable, Sendable { + public var data: Data? + + public init(data: Data? = nil) { + self.data = data + } + + private enum CodingKeys: String, CodingKey { + case data + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case backgroundAssetVersions + } + } + } + + public struct Versions: Hashable, Codable, Sendable { + public var links: RelationshipLinks? + + public init(links: RelationshipLinks? = nil) { + self.links = links + } + + private enum CodingKeys: String, CodingKey { + case links + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/BackgroundAssetUploadFile.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/BackgroundAssetUploadFile.generated.swift new file mode 100644 index 00000000..4d497468 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/BackgroundAssetUploadFile.generated.swift @@ -0,0 +1,103 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct BackgroundAssetUploadFile: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public var attributes: Attributes? + + public var links: ResourceLinks? + + public init( + id: String, + type: `Type`, + attributes: Attributes? = nil, + links: ResourceLinks? = nil + ) { + self.id = id + self.type = type + self.attributes = attributes + self.links = links + } + + private enum CodingKeys: String, CodingKey { + case id + case type + case attributes + case links + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case backgroundAssetUploadFiles + } + + public struct Attributes: Hashable, Codable, Sendable { + public var assetDeliveryState: AppMediaAssetState? + + public var assetToken: String? + + public var assetType: AssetType? + + public var fileName: String? + + public var fileSize: Int? + + public var sourceFileChecksum: String? + + public var uploadOperations: [DeliveryFileUploadOperation]? + + public init( + assetDeliveryState: AppMediaAssetState? = nil, + assetToken: String? = nil, + assetType: AssetType? = nil, + fileName: String? = nil, + fileSize: Int? = nil, + sourceFileChecksum: String? = nil, + uploadOperations: [DeliveryFileUploadOperation]? = nil + ) { + self.assetDeliveryState = assetDeliveryState + self.assetToken = assetToken + self.assetType = assetType + self.fileName = fileName + self.fileSize = fileSize + self.sourceFileChecksum = sourceFileChecksum + self.uploadOperations = uploadOperations + } + + private enum CodingKeys: String, CodingKey { + case assetDeliveryState + case assetToken + case assetType + case fileName + case fileSize + case sourceFileChecksum + case uploadOperations + } + + public struct AssetType: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var asset: Self { + .init(rawValue: "ASSET") + } + + public static var manifest: Self { + .init(rawValue: "MANIFEST") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/BackgroundAssetVersion.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/BackgroundAssetVersion.generated.swift new file mode 100644 index 00000000..7d63eee0 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/BackgroundAssetVersion.generated.swift @@ -0,0 +1,219 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct BackgroundAssetVersion: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public var attributes: Attributes? + + public var relationships: Relationships? + + public var links: ResourceLinks? + + public init( + id: String, + type: `Type`, + attributes: Attributes? = nil, + relationships: Relationships? = nil, + links: ResourceLinks? = nil + ) { + self.id = id + self.type = type + self.attributes = attributes + self.relationships = relationships + self.links = links + } + + private enum CodingKeys: String, CodingKey { + case id + case type + case attributes + case relationships + case links + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case backgroundAssetVersions + } + + public struct Attributes: Hashable, Codable, Sendable { + public var createdDate: String? + + public var platforms: [Platform]? + + public var state: BackgroundAssetVersionState? + + public var version: String? + + public init( + createdDate: String? = nil, + platforms: [Platform]? = nil, + state: BackgroundAssetVersionState? = nil, + version: String? = nil + ) { + self.createdDate = createdDate + self.platforms = platforms + self.state = state + self.version = version + } + + private enum CodingKeys: String, CodingKey { + case createdDate + case platforms + case state + case version + } + } + + public struct Relationships: Hashable, Codable, Sendable { + public var assetFile: AssetFile? + + public var backgroundAssetUploadFiles: BackgroundAssetUploadFiles? + + public var internalBetaRelease: InternalBetaRelease? + + public var manifestFile: ManifestFile? + + public init( + assetFile: AssetFile? = nil, + backgroundAssetUploadFiles: BackgroundAssetUploadFiles? = nil, + internalBetaRelease: InternalBetaRelease? = nil, + manifestFile: ManifestFile? = nil + ) { + self.assetFile = assetFile + self.backgroundAssetUploadFiles = backgroundAssetUploadFiles + self.internalBetaRelease = internalBetaRelease + self.manifestFile = manifestFile + } + + private enum CodingKeys: String, CodingKey { + case assetFile + case backgroundAssetUploadFiles + case internalBetaRelease + case manifestFile + } + + public struct AssetFile: Hashable, Codable, Sendable { + public var data: Data? + + public init(data: Data? = nil) { + self.data = data + } + + private enum CodingKeys: String, CodingKey { + case data + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case backgroundAssetUploadFiles + } + } + } + + public struct BackgroundAssetUploadFiles: Hashable, Codable, Sendable { + public var links: RelationshipLinks? + + public init(links: RelationshipLinks? = nil) { + self.links = links + } + + private enum CodingKeys: String, CodingKey { + case links + } + } + + public struct InternalBetaRelease: Hashable, Codable, Sendable { + public var data: Data? + + public init(data: Data? = nil) { + self.data = data + } + + private enum CodingKeys: String, CodingKey { + case data + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case backgroundAssetVersionInternalBetaReleases + } + } + } + + public struct ManifestFile: Hashable, Codable, Sendable { + public var data: Data? + + public init(data: Data? = nil) { + self.data = data + } + + private enum CodingKeys: String, CodingKey { + case data + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case backgroundAssetUploadFiles + } + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/BackgroundAssetVersionInternalBetaRelease.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/BackgroundAssetVersionInternalBetaRelease.generated.swift new file mode 100644 index 00000000..d765ddac --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/BackgroundAssetVersionInternalBetaRelease.generated.swift @@ -0,0 +1,123 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct BackgroundAssetVersionInternalBetaRelease: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public var attributes: Attributes? + + public var relationships: Relationships? + + public var links: ResourceLinks? + + public init( + id: String, + type: `Type`, + attributes: Attributes? = nil, + relationships: Relationships? = nil, + links: ResourceLinks? = nil + ) { + self.id = id + self.type = type + self.attributes = attributes + self.relationships = relationships + self.links = links + } + + private enum CodingKeys: String, CodingKey { + case id + case type + case attributes + case relationships + case links + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case backgroundAssetVersionInternalBetaReleases + } + + public struct Attributes: Hashable, Codable, Sendable { + public var state: State? + + public init(state: State? = nil) { + self.state = state + } + + private enum CodingKeys: String, CodingKey { + case state + } + + public struct State: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var readyForTesting: Self { + .init(rawValue: "READY_FOR_TESTING") + } + + public static var superseded: Self { + .init(rawValue: "SUPERSEDED") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + } + + public struct Relationships: Hashable, Codable, Sendable { + public var backgroundAssetVersion: BackgroundAssetVersion? + + public init(backgroundAssetVersion: BackgroundAssetVersion? = nil) { + self.backgroundAssetVersion = backgroundAssetVersion + } + + private enum CodingKeys: String, CodingKey { + case backgroundAssetVersion + } + + public struct BackgroundAssetVersion: Hashable, Codable, Sendable { + public var data: Data? + + public init(data: Data? = nil) { + self.data = data + } + + private enum CodingKeys: String, CodingKey { + case data + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case backgroundAssetVersions + } + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/BackgroundAssetVersionState.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/BackgroundAssetVersionState.generated.swift new file mode 100644 index 00000000..9115b124 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/BackgroundAssetVersionState.generated.swift @@ -0,0 +1,34 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct BackgroundAssetVersionState: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var awaitingUpload: Self { + .init(rawValue: "AWAITING_UPLOAD") + } + + public static var complete: Self { + .init(rawValue: "COMPLETE") + } + + public static var failed: Self { + .init(rawValue: "FAILED") + } + + public static var processing: Self { + .init(rawValue: "PROCESSING") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/BetaAppClipInvocation.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/BetaAppClipInvocation.generated.swift index 4da810fc..fd080689 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/BetaAppClipInvocation.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/BetaAppClipInvocation.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct BetaAppClipInvocation: Hashable, Codable { +public struct BetaAppClipInvocation: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -36,11 +36,11 @@ public struct BetaAppClipInvocation: Hashable, Codable { case links } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case betaAppClipInvocations } - public struct Attributes: Hashable, Codable { + public struct Attributes: Hashable, Codable, Sendable { public var url: URL? public init(url: URL? = nil) { @@ -52,7 +52,7 @@ public struct BetaAppClipInvocation: Hashable, Codable { } } - public struct Relationships: Hashable, Codable { + public struct Relationships: Hashable, Codable, Sendable { public var betaAppClipInvocationLocalizations: BetaAppClipInvocationLocalizations? public init(betaAppClipInvocationLocalizations: BetaAppClipInvocationLocalizations? = nil) { @@ -63,30 +63,25 @@ public struct BetaAppClipInvocation: Hashable, Codable { case betaAppClipInvocationLocalizations } - public struct BetaAppClipInvocationLocalizations: Hashable, Codable { + public struct BetaAppClipInvocationLocalizations: Hashable, Codable, Sendable { public var data: [Data]? - public var links: Links? - public var meta: PagingInformation? public init( data: [Data]? = nil, - links: Links? = nil, meta: PagingInformation? = nil ) { self.data = data - self.links = links self.meta = meta } private enum CodingKeys: String, CodingKey { case data - case links case meta } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -104,29 +99,10 @@ public struct BetaAppClipInvocation: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case betaAppClipInvocationLocalizations } } - - public struct Links: Hashable, Codable { - public var related: URL? - - public var `self`: URL? - - public init( - related: URL? = nil, - self _self: URL? = nil - ) { - self.related = related - self.`self` = _self - } - - private enum CodingKeys: String, CodingKey { - case related - case `self` = "self" - } - } } } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/BetaAppClipInvocationLocalization.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/BetaAppClipInvocationLocalization.generated.swift index 8ee50e67..590bf510 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/BetaAppClipInvocationLocalization.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/BetaAppClipInvocationLocalization.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct BetaAppClipInvocationLocalization: Hashable, Codable { +public struct BetaAppClipInvocationLocalization: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -31,11 +31,11 @@ public struct BetaAppClipInvocationLocalization: Hashable, Codable { case links } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case betaAppClipInvocationLocalizations } - public struct Attributes: Hashable, Codable { + public struct Attributes: Hashable, Codable, Sendable { public var locale: String? public var title: String? diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/BetaAppClipInvocationLocalizationInlineCreate.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/BetaAppClipInvocationLocalizationInlineCreate.generated.swift index 0716a39f..ac8afbf7 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/BetaAppClipInvocationLocalizationInlineCreate.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/BetaAppClipInvocationLocalizationInlineCreate.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct BetaAppClipInvocationLocalizationInlineCreate: Hashable, Codable { +public struct BetaAppClipInvocationLocalizationInlineCreate: Hashable, Codable, Sendable { public var id: String? public var type: `Type` @@ -31,11 +31,11 @@ public struct BetaAppClipInvocationLocalizationInlineCreate: Hashable, Codable { case relationships } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case betaAppClipInvocationLocalizations } - public struct Attributes: Hashable, Codable { + public struct Attributes: Hashable, Codable, Sendable { public var locale: String public var title: String @@ -54,7 +54,7 @@ public struct BetaAppClipInvocationLocalizationInlineCreate: Hashable, Codable { } } - public struct Relationships: Hashable, Codable { + public struct Relationships: Hashable, Codable, Sendable { public var betaAppClipInvocation: BetaAppClipInvocation? public init(betaAppClipInvocation: BetaAppClipInvocation? = nil) { @@ -65,7 +65,7 @@ public struct BetaAppClipInvocationLocalizationInlineCreate: Hashable, Codable { case betaAppClipInvocation } - public struct BetaAppClipInvocation: Hashable, Codable { + public struct BetaAppClipInvocation: Hashable, Codable, Sendable { public var data: Data? public init(data: Data? = nil) { @@ -76,7 +76,7 @@ public struct BetaAppClipInvocationLocalizationInlineCreate: Hashable, Codable { case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -94,7 +94,7 @@ public struct BetaAppClipInvocationLocalizationInlineCreate: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case betaAppClipInvocations } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/BetaAppLocalization.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/BetaAppLocalization.generated.swift index 5265e35b..2f2df483 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/BetaAppLocalization.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/BetaAppLocalization.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct BetaAppLocalization: Hashable, Codable { +public struct BetaAppLocalization: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -36,11 +36,11 @@ public struct BetaAppLocalization: Hashable, Codable { case links } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case betaAppLocalizations } - public struct Attributes: Hashable, Codable { + public struct Attributes: Hashable, Codable, Sendable { public var description: String? public var feedbackEmail: String? @@ -79,7 +79,7 @@ public struct BetaAppLocalization: Hashable, Codable { } } - public struct Relationships: Hashable, Codable { + public struct Relationships: Hashable, Codable, Sendable { public var app: App? public init(app: App? = nil) { @@ -90,14 +90,14 @@ public struct BetaAppLocalization: Hashable, Codable { case app } - public struct App: Hashable, Codable { + public struct App: Hashable, Codable, Sendable { public var data: Data? - public var links: Links? + public var links: RelationshipLinks? public init( data: Data? = nil, - links: Links? = nil + links: RelationshipLinks? = nil ) { self.data = data self.links = links @@ -108,7 +108,7 @@ public struct BetaAppLocalization: Hashable, Codable { case links } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -126,29 +126,10 @@ public struct BetaAppLocalization: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case apps } } - - public struct Links: Hashable, Codable { - public var related: URL? - - public var `self`: URL? - - public init( - related: URL? = nil, - self _self: URL? = nil - ) { - self.related = related - self.`self` = _self - } - - private enum CodingKeys: String, CodingKey { - case related - case `self` = "self" - } - } } } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/BetaAppReviewDetail.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/BetaAppReviewDetail.generated.swift index afd6598d..59c74b03 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/BetaAppReviewDetail.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/BetaAppReviewDetail.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct BetaAppReviewDetail: Hashable, Codable { +public struct BetaAppReviewDetail: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -36,11 +36,11 @@ public struct BetaAppReviewDetail: Hashable, Codable { case links } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case betaAppReviewDetails } - public struct Attributes: Hashable, Codable { + public struct Attributes: Hashable, Codable, Sendable { public var contactEmail: String? public var contactFirstName: String? @@ -89,7 +89,7 @@ public struct BetaAppReviewDetail: Hashable, Codable { } } - public struct Relationships: Hashable, Codable { + public struct Relationships: Hashable, Codable, Sendable { public var app: App? public init(app: App? = nil) { @@ -100,14 +100,14 @@ public struct BetaAppReviewDetail: Hashable, Codable { case app } - public struct App: Hashable, Codable { + public struct App: Hashable, Codable, Sendable { public var data: Data? - public var links: Links? + public var links: RelationshipLinks? public init( data: Data? = nil, - links: Links? = nil + links: RelationshipLinks? = nil ) { self.data = data self.links = links @@ -118,7 +118,7 @@ public struct BetaAppReviewDetail: Hashable, Codable { case links } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -136,29 +136,10 @@ public struct BetaAppReviewDetail: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case apps } } - - public struct Links: Hashable, Codable { - public var related: URL? - - public var `self`: URL? - - public init( - related: URL? = nil, - self _self: URL? = nil - ) { - self.related = related - self.`self` = _self - } - - private enum CodingKeys: String, CodingKey { - case related - case `self` = "self" - } - } } } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/BetaAppReviewSubmission.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/BetaAppReviewSubmission.generated.swift index c82865d1..59f36e77 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/BetaAppReviewSubmission.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/BetaAppReviewSubmission.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct BetaAppReviewSubmission: Hashable, Codable { +public struct BetaAppReviewSubmission: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -36,11 +36,11 @@ public struct BetaAppReviewSubmission: Hashable, Codable { case links } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case betaAppReviewSubmissions } - public struct Attributes: Hashable, Codable { + public struct Attributes: Hashable, Codable, Sendable { public var betaReviewState: BetaReviewState? public var submittedDate: String? @@ -59,7 +59,7 @@ public struct BetaAppReviewSubmission: Hashable, Codable { } } - public struct Relationships: Hashable, Codable { + public struct Relationships: Hashable, Codable, Sendable { public var build: Build? public init(build: Build? = nil) { @@ -70,14 +70,14 @@ public struct BetaAppReviewSubmission: Hashable, Codable { case build } - public struct Build: Hashable, Codable { + public struct Build: Hashable, Codable, Sendable { public var data: Data? - public var links: Links? + public var links: RelationshipLinks? public init( data: Data? = nil, - links: Links? = nil + links: RelationshipLinks? = nil ) { self.data = data self.links = links @@ -88,7 +88,7 @@ public struct BetaAppReviewSubmission: Hashable, Codable { case links } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -106,29 +106,10 @@ public struct BetaAppReviewSubmission: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case builds } } - - public struct Links: Hashable, Codable { - public var related: URL? - - public var `self`: URL? - - public init( - related: URL? = nil, - self _self: URL? = nil - ) { - self.related = related - self.`self` = _self - } - - private enum CodingKeys: String, CodingKey { - case related - case `self` = "self" - } - } } } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/BetaBuildLocalization.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/BetaBuildLocalization.generated.swift index 0876c9cf..50af2779 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/BetaBuildLocalization.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/BetaBuildLocalization.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct BetaBuildLocalization: Hashable, Codable { +public struct BetaBuildLocalization: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -36,11 +36,11 @@ public struct BetaBuildLocalization: Hashable, Codable { case links } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case betaBuildLocalizations } - public struct Attributes: Hashable, Codable { + public struct Attributes: Hashable, Codable, Sendable { public var locale: String? public var whatsNew: String? @@ -59,7 +59,7 @@ public struct BetaBuildLocalization: Hashable, Codable { } } - public struct Relationships: Hashable, Codable { + public struct Relationships: Hashable, Codable, Sendable { public var build: Build? public init(build: Build? = nil) { @@ -70,14 +70,14 @@ public struct BetaBuildLocalization: Hashable, Codable { case build } - public struct Build: Hashable, Codable { + public struct Build: Hashable, Codable, Sendable { public var data: Data? - public var links: Links? + public var links: RelationshipLinks? public init( data: Data? = nil, - links: Links? = nil + links: RelationshipLinks? = nil ) { self.data = data self.links = links @@ -88,7 +88,7 @@ public struct BetaBuildLocalization: Hashable, Codable { case links } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -106,29 +106,10 @@ public struct BetaBuildLocalization: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case builds } } - - public struct Links: Hashable, Codable { - public var related: URL? - - public var `self`: URL? - - public init( - related: URL? = nil, - self _self: URL? = nil - ) { - self.related = related - self.`self` = _self - } - - private enum CodingKeys: String, CodingKey { - case related - case `self` = "self" - } - } } } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/BetaCrashLog.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/BetaCrashLog.generated.swift new file mode 100644 index 00000000..bf3e6735 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/BetaCrashLog.generated.swift @@ -0,0 +1,51 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct BetaCrashLog: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public var attributes: Attributes? + + public var links: ResourceLinks? + + public init( + id: String, + type: `Type`, + attributes: Attributes? = nil, + links: ResourceLinks? = nil + ) { + self.id = id + self.type = type + self.attributes = attributes + self.links = links + } + + private enum CodingKeys: String, CodingKey { + case id + case type + case attributes + case links + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case betaCrashLogs + } + + public struct Attributes: Hashable, Codable, Sendable { + public var logText: String? + + public init(logText: String? = nil) { + self.logText = logText + } + + private enum CodingKeys: String, CodingKey { + case logText + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/BetaFeedbackCrashSubmission.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/BetaFeedbackCrashSubmission.generated.swift new file mode 100644 index 00000000..3bcc7a67 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/BetaFeedbackCrashSubmission.generated.swift @@ -0,0 +1,259 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct BetaFeedbackCrashSubmission: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public var attributes: Attributes? + + public var relationships: Relationships? + + public var links: ResourceLinks? + + public init( + id: String, + type: `Type`, + attributes: Attributes? = nil, + relationships: Relationships? = nil, + links: ResourceLinks? = nil + ) { + self.id = id + self.type = type + self.attributes = attributes + self.relationships = relationships + self.links = links + } + + private enum CodingKeys: String, CodingKey { + case id + case type + case attributes + case relationships + case links + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case betaFeedbackCrashSubmissions + } + + public struct Attributes: Hashable, Codable, Sendable { + public var appPlatform: Platform? + + public var appUptimeInMilliseconds: Int? + + public var architecture: String? + + public var batteryPercentage: Int? + + public var buildBundleId: String? + + public var comment: String? + + public var connectionType: DeviceConnectionType? + + public var createdDate: String? + + public var deviceFamily: DeviceFamily? + + public var deviceModel: String? + + public var devicePlatform: Platform? + + public var diskBytesAvailable: Int? + + public var diskBytesTotal: Int? + + public var email: String? + + public var locale: String? + + public var osVersion: String? + + public var pairedAppleWatch: String? + + public var screenHeightInPoints: Int? + + public var screenWidthInPoints: Int? + + public var timeZone: String? + + public init( + appPlatform: Platform? = nil, + appUptimeInMilliseconds: Int? = nil, + architecture: String? = nil, + batteryPercentage: Int? = nil, + buildBundleId: String? = nil, + comment: String? = nil, + connectionType: DeviceConnectionType? = nil, + createdDate: String? = nil, + deviceFamily: DeviceFamily? = nil, + deviceModel: String? = nil, + devicePlatform: Platform? = nil, + diskBytesAvailable: Int? = nil, + diskBytesTotal: Int? = nil, + email: String? = nil, + locale: String? = nil, + osVersion: String? = nil, + pairedAppleWatch: String? = nil, + screenHeightInPoints: Int? = nil, + screenWidthInPoints: Int? = nil, + timeZone: String? = nil + ) { + self.appPlatform = appPlatform + self.appUptimeInMilliseconds = appUptimeInMilliseconds + self.architecture = architecture + self.batteryPercentage = batteryPercentage + self.buildBundleId = buildBundleId + self.comment = comment + self.connectionType = connectionType + self.createdDate = createdDate + self.deviceFamily = deviceFamily + self.deviceModel = deviceModel + self.devicePlatform = devicePlatform + self.diskBytesAvailable = diskBytesAvailable + self.diskBytesTotal = diskBytesTotal + self.email = email + self.locale = locale + self.osVersion = osVersion + self.pairedAppleWatch = pairedAppleWatch + self.screenHeightInPoints = screenHeightInPoints + self.screenWidthInPoints = screenWidthInPoints + self.timeZone = timeZone + } + + private enum CodingKeys: String, CodingKey { + case appPlatform + case appUptimeInMilliseconds + case architecture + case batteryPercentage + case buildBundleId + case comment + case connectionType + case createdDate + case deviceFamily + case deviceModel + case devicePlatform + case diskBytesAvailable + case diskBytesTotal + case email + case locale + case osVersion + case pairedAppleWatch + case screenHeightInPoints + case screenWidthInPoints + case timeZone + } + } + + public struct Relationships: Hashable, Codable, Sendable { + public var build: Build? + + public var crashLog: CrashLog? + + public var tester: Tester? + + public init( + build: Build? = nil, + crashLog: CrashLog? = nil, + tester: Tester? = nil + ) { + self.build = build + self.crashLog = crashLog + self.tester = tester + } + + private enum CodingKeys: String, CodingKey { + case build + case crashLog + case tester + } + + public struct Build: Hashable, Codable, Sendable { + public var data: Data? + + public init(data: Data? = nil) { + self.data = data + } + + private enum CodingKeys: String, CodingKey { + case data + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case builds + } + } + } + + public struct CrashLog: Hashable, Codable, Sendable { + public var links: RelationshipLinks? + + public init(links: RelationshipLinks? = nil) { + self.links = links + } + + private enum CodingKeys: String, CodingKey { + case links + } + } + + public struct Tester: Hashable, Codable, Sendable { + public var data: Data? + + public init(data: Data? = nil) { + self.data = data + } + + private enum CodingKeys: String, CodingKey { + case data + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case betaTesters + } + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/BetaFeedbackScreenshotImage.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/BetaFeedbackScreenshotImage.generated.swift new file mode 100644 index 00000000..6cd8278a --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/BetaFeedbackScreenshotImage.generated.swift @@ -0,0 +1,35 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct BetaFeedbackScreenshotImage: Hashable, Codable, Sendable { + public var width: Int? + + public var height: Int? + + public var expirationDate: String? + + public var url: String? + + public init( + width: Int? = nil, + height: Int? = nil, + expirationDate: String? = nil, + url: String? = nil + ) { + self.width = width + self.height = height + self.expirationDate = expirationDate + self.url = url + } + + private enum CodingKeys: String, CodingKey { + case width + case height + case expirationDate + case url + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/BetaFeedbackScreenshotSubmission.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/BetaFeedbackScreenshotSubmission.generated.swift new file mode 100644 index 00000000..b307badb --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/BetaFeedbackScreenshotSubmission.generated.swift @@ -0,0 +1,247 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct BetaFeedbackScreenshotSubmission: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public var attributes: Attributes? + + public var relationships: Relationships? + + public var links: ResourceLinks? + + public init( + id: String, + type: `Type`, + attributes: Attributes? = nil, + relationships: Relationships? = nil, + links: ResourceLinks? = nil + ) { + self.id = id + self.type = type + self.attributes = attributes + self.relationships = relationships + self.links = links + } + + private enum CodingKeys: String, CodingKey { + case id + case type + case attributes + case relationships + case links + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case betaFeedbackScreenshotSubmissions + } + + public struct Attributes: Hashable, Codable, Sendable { + public var appPlatform: Platform? + + public var appUptimeInMilliseconds: Int? + + public var architecture: String? + + public var batteryPercentage: Int? + + public var buildBundleId: String? + + public var comment: String? + + public var connectionType: DeviceConnectionType? + + public var createdDate: String? + + public var deviceFamily: DeviceFamily? + + public var deviceModel: String? + + public var devicePlatform: Platform? + + public var diskBytesAvailable: Int? + + public var diskBytesTotal: Int? + + public var email: String? + + public var locale: String? + + public var osVersion: String? + + public var pairedAppleWatch: String? + + public var screenHeightInPoints: Int? + + public var screenWidthInPoints: Int? + + public var screenshots: [BetaFeedbackScreenshotImage]? + + public var timeZone: String? + + public init( + appPlatform: Platform? = nil, + appUptimeInMilliseconds: Int? = nil, + architecture: String? = nil, + batteryPercentage: Int? = nil, + buildBundleId: String? = nil, + comment: String? = nil, + connectionType: DeviceConnectionType? = nil, + createdDate: String? = nil, + deviceFamily: DeviceFamily? = nil, + deviceModel: String? = nil, + devicePlatform: Platform? = nil, + diskBytesAvailable: Int? = nil, + diskBytesTotal: Int? = nil, + email: String? = nil, + locale: String? = nil, + osVersion: String? = nil, + pairedAppleWatch: String? = nil, + screenHeightInPoints: Int? = nil, + screenWidthInPoints: Int? = nil, + screenshots: [BetaFeedbackScreenshotImage]? = nil, + timeZone: String? = nil + ) { + self.appPlatform = appPlatform + self.appUptimeInMilliseconds = appUptimeInMilliseconds + self.architecture = architecture + self.batteryPercentage = batteryPercentage + self.buildBundleId = buildBundleId + self.comment = comment + self.connectionType = connectionType + self.createdDate = createdDate + self.deviceFamily = deviceFamily + self.deviceModel = deviceModel + self.devicePlatform = devicePlatform + self.diskBytesAvailable = diskBytesAvailable + self.diskBytesTotal = diskBytesTotal + self.email = email + self.locale = locale + self.osVersion = osVersion + self.pairedAppleWatch = pairedAppleWatch + self.screenHeightInPoints = screenHeightInPoints + self.screenWidthInPoints = screenWidthInPoints + self.screenshots = screenshots + self.timeZone = timeZone + } + + private enum CodingKeys: String, CodingKey { + case appPlatform + case appUptimeInMilliseconds + case architecture + case batteryPercentage + case buildBundleId + case comment + case connectionType + case createdDate + case deviceFamily + case deviceModel + case devicePlatform + case diskBytesAvailable + case diskBytesTotal + case email + case locale + case osVersion + case pairedAppleWatch + case screenHeightInPoints + case screenWidthInPoints + case screenshots + case timeZone + } + } + + public struct Relationships: Hashable, Codable, Sendable { + public var build: Build? + + public var tester: Tester? + + public init( + build: Build? = nil, + tester: Tester? = nil + ) { + self.build = build + self.tester = tester + } + + private enum CodingKeys: String, CodingKey { + case build + case tester + } + + public struct Build: Hashable, Codable, Sendable { + public var data: Data? + + public init(data: Data? = nil) { + self.data = data + } + + private enum CodingKeys: String, CodingKey { + case data + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case builds + } + } + } + + public struct Tester: Hashable, Codable, Sendable { + public var data: Data? + + public init(data: Data? = nil) { + self.data = data + } + + private enum CodingKeys: String, CodingKey { + case data + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case betaTesters + } + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/BetaGroup.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/BetaGroup.generated.swift index 06282a75..5de5e708 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/BetaGroup.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/BetaGroup.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct BetaGroup: Hashable, Codable { +public struct BetaGroup: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -36,11 +36,11 @@ public struct BetaGroup: Hashable, Codable { case links } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case betaGroups } - public struct Attributes: Hashable, Codable { + public struct Attributes: Hashable, Codable, Sendable { public var createdDate: String? public var feedbackEnabled: Bool? @@ -49,6 +49,8 @@ public struct BetaGroup: Hashable, Codable { public var iosBuildsAvailableForAppleSiliconMac: Bool? + public var iosBuildsAvailableForAppleVision: Bool? + public var isInternalGroup: Bool? public var name: String? @@ -68,6 +70,7 @@ public struct BetaGroup: Hashable, Codable { feedbackEnabled: Bool? = nil, hasAccessToAllBuilds: Bool? = nil, iosBuildsAvailableForAppleSiliconMac: Bool? = nil, + iosBuildsAvailableForAppleVision: Bool? = nil, isInternalGroup: Bool? = nil, name: String? = nil, publicLink: String? = nil, @@ -80,6 +83,7 @@ public struct BetaGroup: Hashable, Codable { self.feedbackEnabled = feedbackEnabled self.hasAccessToAllBuilds = hasAccessToAllBuilds self.iosBuildsAvailableForAppleSiliconMac = iosBuildsAvailableForAppleSiliconMac + self.iosBuildsAvailableForAppleVision = iosBuildsAvailableForAppleVision self.isInternalGroup = isInternalGroup self.name = name self.publicLink = publicLink @@ -94,6 +98,7 @@ public struct BetaGroup: Hashable, Codable { case feedbackEnabled case hasAccessToAllBuilds case iosBuildsAvailableForAppleSiliconMac + case iosBuildsAvailableForAppleVision case isInternalGroup case name case publicLink @@ -104,37 +109,47 @@ public struct BetaGroup: Hashable, Codable { } } - public struct Relationships: Hashable, Codable { + public struct Relationships: Hashable, Codable, Sendable { public var app: App? + public var betaRecruitmentCriteria: BetaRecruitmentCriteria? + + public var betaRecruitmentCriterionCompatibleBuildCheck: BetaRecruitmentCriterionCompatibleBuildCheck? + public var betaTesters: BetaTesters? public var builds: Builds? public init( app: App? = nil, + betaRecruitmentCriteria: BetaRecruitmentCriteria? = nil, + betaRecruitmentCriterionCompatibleBuildCheck: BetaRecruitmentCriterionCompatibleBuildCheck? = nil, betaTesters: BetaTesters? = nil, builds: Builds? = nil ) { self.app = app + self.betaRecruitmentCriteria = betaRecruitmentCriteria + self.betaRecruitmentCriterionCompatibleBuildCheck = betaRecruitmentCriterionCompatibleBuildCheck self.betaTesters = betaTesters self.builds = builds } private enum CodingKeys: String, CodingKey { case app + case betaRecruitmentCriteria + case betaRecruitmentCriterionCompatibleBuildCheck case betaTesters case builds } - public struct App: Hashable, Codable { + public struct App: Hashable, Codable, Sendable { public var data: Data? - public var links: Links? + public var links: RelationshipLinks? public init( data: Data? = nil, - links: Links? = nil + links: RelationshipLinks? = nil ) { self.data = data self.links = links @@ -145,7 +160,7 @@ public struct BetaGroup: Hashable, Codable { case links } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -163,41 +178,76 @@ public struct BetaGroup: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case apps } } + } - public struct Links: Hashable, Codable { - public var related: URL? + public struct BetaRecruitmentCriteria: Hashable, Codable, Sendable { + public var data: Data? - public var `self`: URL? + public var links: RelationshipLinks? + + public init( + data: Data? = nil, + links: RelationshipLinks? = nil + ) { + self.data = data + self.links = links + } + + private enum CodingKeys: String, CodingKey { + case data + case links + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` public init( - related: URL? = nil, - self _self: URL? = nil + id: String, + type: `Type` ) { - self.related = related - self.`self` = _self + self.id = id + self.type = type } private enum CodingKeys: String, CodingKey { - case related - case `self` = "self" + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case betaRecruitmentCriteria } } } - public struct BetaTesters: Hashable, Codable { + public struct BetaRecruitmentCriterionCompatibleBuildCheck: Hashable, Codable, Sendable { + public var links: RelationshipLinks? + + public init(links: RelationshipLinks? = nil) { + self.links = links + } + + private enum CodingKeys: String, CodingKey { + case links + } + } + + public struct BetaTesters: Hashable, Codable, Sendable { public var data: [Data]? - public var links: Links? + public var links: RelationshipLinks? public var meta: PagingInformation? public init( data: [Data]? = nil, - links: Links? = nil, + links: RelationshipLinks? = nil, meta: PagingInformation? = nil ) { self.data = data @@ -211,7 +261,7 @@ public struct BetaGroup: Hashable, Codable { case meta } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -229,41 +279,22 @@ public struct BetaGroup: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case betaTesters } } - - public struct Links: Hashable, Codable { - public var related: URL? - - public var `self`: URL? - - public init( - related: URL? = nil, - self _self: URL? = nil - ) { - self.related = related - self.`self` = _self - } - - private enum CodingKeys: String, CodingKey { - case related - case `self` = "self" - } - } } - public struct Builds: Hashable, Codable { + public struct Builds: Hashable, Codable, Sendable { public var data: [Data]? - public var links: Links? + public var links: RelationshipLinks? public var meta: PagingInformation? public init( data: [Data]? = nil, - links: Links? = nil, + links: RelationshipLinks? = nil, meta: PagingInformation? = nil ) { self.data = data @@ -277,7 +308,7 @@ public struct BetaGroup: Hashable, Codable { case meta } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -295,29 +326,10 @@ public struct BetaGroup: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case builds } } - - public struct Links: Hashable, Codable { - public var related: URL? - - public var `self`: URL? - - public init( - related: URL? = nil, - self _self: URL? = nil - ) { - self.related = related - self.`self` = _self - } - - private enum CodingKeys: String, CodingKey { - case related - case `self` = "self" - } - } } } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/BetaInviteType.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/BetaInviteType.generated.swift index c1e64f11..bf7709e0 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/BetaInviteType.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/BetaInviteType.generated.swift @@ -3,25 +3,23 @@ // swiftlint:disable all import Foundation -public enum BetaInviteType: Hashable, Codable, RawRepresentable { - case email - case publicLink - case unknown(String) +public struct BetaInviteType: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var email: Self { + .init(rawValue: "EMAIL") + } + + public static var publicLink: Self { + .init(rawValue: "PUBLIC_LINK") + } - public var rawValue: String { - switch self { - case .email: return "EMAIL" - case .publicLink: return "PUBLIC_LINK" - case .unknown(let rawValue): return rawValue - } + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "EMAIL": self = .email - case "PUBLIC_LINK": self = .publicLink - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/BetaLicenseAgreement.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/BetaLicenseAgreement.generated.swift index dee1dc36..0723b0cc 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/BetaLicenseAgreement.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/BetaLicenseAgreement.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct BetaLicenseAgreement: Hashable, Codable { +public struct BetaLicenseAgreement: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -36,11 +36,11 @@ public struct BetaLicenseAgreement: Hashable, Codable { case links } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case betaLicenseAgreements } - public struct Attributes: Hashable, Codable { + public struct Attributes: Hashable, Codable, Sendable { public var agreementText: String? public init(agreementText: String? = nil) { @@ -52,7 +52,7 @@ public struct BetaLicenseAgreement: Hashable, Codable { } } - public struct Relationships: Hashable, Codable { + public struct Relationships: Hashable, Codable, Sendable { public var app: App? public init(app: App? = nil) { @@ -63,14 +63,14 @@ public struct BetaLicenseAgreement: Hashable, Codable { case app } - public struct App: Hashable, Codable { + public struct App: Hashable, Codable, Sendable { public var data: Data? - public var links: Links? + public var links: RelationshipLinks? public init( data: Data? = nil, - links: Links? = nil + links: RelationshipLinks? = nil ) { self.data = data self.links = links @@ -81,7 +81,7 @@ public struct BetaLicenseAgreement: Hashable, Codable { case links } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -99,29 +99,10 @@ public struct BetaLicenseAgreement: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case apps } } - - public struct Links: Hashable, Codable { - public var related: URL? - - public var `self`: URL? - - public init( - related: URL? = nil, - self _self: URL? = nil - ) { - self.related = related - self.`self` = _self - } - - private enum CodingKeys: String, CodingKey { - case related - case `self` = "self" - } - } } } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/BetaRecruitmentCriterion.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/BetaRecruitmentCriterion.generated.swift new file mode 100644 index 00000000..fc20bdef --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/BetaRecruitmentCriterion.generated.swift @@ -0,0 +1,58 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct BetaRecruitmentCriterion: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public var attributes: Attributes? + + public var links: ResourceLinks? + + public init( + id: String, + type: `Type`, + attributes: Attributes? = nil, + links: ResourceLinks? = nil + ) { + self.id = id + self.type = type + self.attributes = attributes + self.links = links + } + + private enum CodingKeys: String, CodingKey { + case id + case type + case attributes + case links + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case betaRecruitmentCriteria + } + + public struct Attributes: Hashable, Codable, Sendable { + public var deviceFamilyOsVersionFilters: [DeviceFamilyOsVersionFilter]? + + public var lastModifiedDate: String? + + public init( + deviceFamilyOsVersionFilters: [DeviceFamilyOsVersionFilter]? = nil, + lastModifiedDate: String? = nil + ) { + self.deviceFamilyOsVersionFilters = deviceFamilyOsVersionFilters + self.lastModifiedDate = lastModifiedDate + } + + private enum CodingKeys: String, CodingKey { + case deviceFamilyOsVersionFilters + case lastModifiedDate + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/BetaRecruitmentCriterionCompatibleBuildCheck.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/BetaRecruitmentCriterionCompatibleBuildCheck.generated.swift new file mode 100644 index 00000000..5db3977f --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/BetaRecruitmentCriterionCompatibleBuildCheck.generated.swift @@ -0,0 +1,51 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct BetaRecruitmentCriterionCompatibleBuildCheck: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public var attributes: Attributes? + + public var links: ResourceLinks? + + public init( + id: String, + type: `Type`, + attributes: Attributes? = nil, + links: ResourceLinks? = nil + ) { + self.id = id + self.type = type + self.attributes = attributes + self.links = links + } + + private enum CodingKeys: String, CodingKey { + case id + case type + case attributes + case links + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case betaRecruitmentCriterionCompatibleBuildChecks + } + + public struct Attributes: Hashable, Codable, Sendable { + public var hasCompatibleBuild: Bool? + + public init(hasCompatibleBuild: Bool? = nil) { + self.hasCompatibleBuild = hasCompatibleBuild + } + + private enum CodingKeys: String, CodingKey { + case hasCompatibleBuild + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/BetaRecruitmentCriterionOption.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/BetaRecruitmentCriterionOption.generated.swift new file mode 100644 index 00000000..00a22164 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/BetaRecruitmentCriterionOption.generated.swift @@ -0,0 +1,70 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct BetaRecruitmentCriterionOption: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public var attributes: Attributes? + + public var links: ResourceLinks? + + public init( + id: String, + type: `Type`, + attributes: Attributes? = nil, + links: ResourceLinks? = nil + ) { + self.id = id + self.type = type + self.attributes = attributes + self.links = links + } + + private enum CodingKeys: String, CodingKey { + case id + case type + case attributes + case links + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case betaRecruitmentCriterionOptions + } + + public struct Attributes: Hashable, Codable, Sendable { + public var deviceFamilyOsVersions: [DeviceFamilyOsVersions]? + + public init(deviceFamilyOsVersions: [DeviceFamilyOsVersions]? = nil) { + self.deviceFamilyOsVersions = deviceFamilyOsVersions + } + + private enum CodingKeys: String, CodingKey { + case deviceFamilyOsVersions + } + + public struct DeviceFamilyOsVersions: Hashable, Codable, Sendable { + public var deviceFamily: DeviceFamily? + + public var osVersions: [String]? + + public init( + deviceFamily: DeviceFamily? = nil, + osVersions: [String]? = nil + ) { + self.deviceFamily = deviceFamily + self.osVersions = osVersions + } + + private enum CodingKeys: String, CodingKey { + case deviceFamily + case osVersions + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/BetaReviewState.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/BetaReviewState.generated.swift index 8be1cc7d..43ae6a18 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/BetaReviewState.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/BetaReviewState.generated.swift @@ -3,31 +3,31 @@ // swiftlint:disable all import Foundation -public enum BetaReviewState: Hashable, Codable, RawRepresentable { - case approved - case inReview - case rejected - case waitingForReview - case unknown(String) - - public var rawValue: String { - switch self { - case .approved: return "APPROVED" - case .inReview: return "IN_REVIEW" - case .rejected: return "REJECTED" - case .waitingForReview: return "WAITING_FOR_REVIEW" - case .unknown(let rawValue): return rawValue - } +public struct BetaReviewState: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var approved: Self { + .init(rawValue: "APPROVED") } + public static var inReview: Self { + .init(rawValue: "IN_REVIEW") + } + + public static var rejected: Self { + .init(rawValue: "REJECTED") + } + + public static var waitingForReview: Self { + .init(rawValue: "WAITING_FOR_REVIEW") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "APPROVED": self = .approved - case "IN_REVIEW": self = .inReview - case "REJECTED": self = .rejected - case "WAITING_FOR_REVIEW": self = .waitingForReview - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/BetaTester.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/BetaTester.generated.swift index d0c2bc72..38c7f9cf 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/BetaTester.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/BetaTester.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct BetaTester: Hashable, Codable { +public struct BetaTester: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -36,11 +36,11 @@ public struct BetaTester: Hashable, Codable { case links } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case betaTesters } - public struct Attributes: Hashable, Codable { + public struct Attributes: Hashable, Codable, Sendable { public var email: String? public var firstName: String? @@ -49,16 +49,20 @@ public struct BetaTester: Hashable, Codable { public var lastName: String? + public var state: BetaTesterState? + public init( email: String? = nil, firstName: String? = nil, inviteType: BetaInviteType? = nil, - lastName: String? = nil + lastName: String? = nil, + state: BetaTesterState? = nil ) { self.email = email self.firstName = firstName self.inviteType = inviteType self.lastName = lastName + self.state = state } private enum CodingKeys: String, CodingKey { @@ -66,10 +70,11 @@ public struct BetaTester: Hashable, Codable { case firstName case inviteType case lastName + case state } } - public struct Relationships: Hashable, Codable { + public struct Relationships: Hashable, Codable, Sendable { public var apps: Apps? public var betaGroups: BetaGroups? @@ -92,16 +97,16 @@ public struct BetaTester: Hashable, Codable { case builds } - public struct Apps: Hashable, Codable { + public struct Apps: Hashable, Codable, Sendable { public var data: [Data]? - public var links: Links? + public var links: RelationshipLinks? public var meta: PagingInformation? public init( data: [Data]? = nil, - links: Links? = nil, + links: RelationshipLinks? = nil, meta: PagingInformation? = nil ) { self.data = data @@ -115,7 +120,7 @@ public struct BetaTester: Hashable, Codable { case meta } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -133,41 +138,22 @@ public struct BetaTester: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case apps } } - - public struct Links: Hashable, Codable { - public var related: URL? - - public var `self`: URL? - - public init( - related: URL? = nil, - self _self: URL? = nil - ) { - self.related = related - self.`self` = _self - } - - private enum CodingKeys: String, CodingKey { - case related - case `self` = "self" - } - } } - public struct BetaGroups: Hashable, Codable { + public struct BetaGroups: Hashable, Codable, Sendable { public var data: [Data]? - public var links: Links? + public var links: RelationshipLinks? public var meta: PagingInformation? public init( data: [Data]? = nil, - links: Links? = nil, + links: RelationshipLinks? = nil, meta: PagingInformation? = nil ) { self.data = data @@ -181,7 +167,7 @@ public struct BetaTester: Hashable, Codable { case meta } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -199,41 +185,22 @@ public struct BetaTester: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case betaGroups } } - - public struct Links: Hashable, Codable { - public var related: URL? - - public var `self`: URL? - - public init( - related: URL? = nil, - self _self: URL? = nil - ) { - self.related = related - self.`self` = _self - } - - private enum CodingKeys: String, CodingKey { - case related - case `self` = "self" - } - } } - public struct Builds: Hashable, Codable { + public struct Builds: Hashable, Codable, Sendable { public var data: [Data]? - public var links: Links? + public var links: RelationshipLinks? public var meta: PagingInformation? public init( data: [Data]? = nil, - links: Links? = nil, + links: RelationshipLinks? = nil, meta: PagingInformation? = nil ) { self.data = data @@ -247,7 +214,7 @@ public struct BetaTester: Hashable, Codable { case meta } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -265,29 +232,10 @@ public struct BetaTester: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case builds } } - - public struct Links: Hashable, Codable { - public var related: URL? - - public var `self`: URL? - - public init( - related: URL? = nil, - self _self: URL? = nil - ) { - self.related = related - self.`self` = _self - } - - private enum CodingKeys: String, CodingKey { - case related - case `self` = "self" - } - } } } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/BetaTesterInvitation.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/BetaTesterInvitation.generated.swift index 7a83bdff..a0e61717 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/BetaTesterInvitation.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/BetaTesterInvitation.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct BetaTesterInvitation: Hashable, Codable { +public struct BetaTesterInvitation: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -26,7 +26,7 @@ public struct BetaTesterInvitation: Hashable, Codable { case links } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case betaTesterInvitations } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/BetaTesterState.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/BetaTesterState.generated.swift new file mode 100644 index 00000000..ca7cc208 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/BetaTesterState.generated.swift @@ -0,0 +1,38 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct BetaTesterState: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var accepted: Self { + .init(rawValue: "ACCEPTED") + } + + public static var installed: Self { + .init(rawValue: "INSTALLED") + } + + public static var invited: Self { + .init(rawValue: "INVITED") + } + + public static var notInvited: Self { + .init(rawValue: "NOT_INVITED") + } + + public static var revoked: Self { + .init(rawValue: "REVOKED") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/BrazilAgeRating.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/BrazilAgeRating.generated.swift index 9a7364e0..9c1bafec 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/BrazilAgeRating.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/BrazilAgeRating.generated.swift @@ -3,37 +3,39 @@ // swiftlint:disable all import Foundation -public enum BrazilAgeRating: Hashable, Codable, RawRepresentable { - case eighteen - case fourteen - case l - case sixteen - case ten - case twelve - case unknown(String) - - public var rawValue: String { - switch self { - case .eighteen: return "EIGHTEEN" - case .fourteen: return "FOURTEEN" - case .l: return "L" - case .sixteen: return "SIXTEEN" - case .ten: return "TEN" - case .twelve: return "TWELVE" - case .unknown(let rawValue): return rawValue - } +public struct BrazilAgeRating: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var eighteen: Self { + .init(rawValue: "EIGHTEEN") } + public static var fourteen: Self { + .init(rawValue: "FOURTEEN") + } + + public static var l: Self { + .init(rawValue: "L") + } + + public static var sixteen: Self { + .init(rawValue: "SIXTEEN") + } + + public static var ten: Self { + .init(rawValue: "TEN") + } + + public static var twelve: Self { + .init(rawValue: "TWELVE") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "EIGHTEEN": self = .eighteen - case "FOURTEEN": self = .fourteen - case "L": self = .l - case "SIXTEEN": self = .sixteen - case "TEN": self = .ten - case "TWELVE": self = .twelve - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Build.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Build.generated.swift index d69f5ffc..701cacb4 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Build.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Build.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct Build: Hashable, Codable { +public struct Build: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -36,15 +36,17 @@ public struct Build: Hashable, Codable { case links } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case builds } - public struct Attributes: Hashable, Codable { + public struct Attributes: Hashable, Codable, Sendable { public var buildAudienceType: BuildAudienceType? public var computedMinMacOsVersion: String? + public var computedMinVisionOsVersion: String? + public var expirationDate: String? public var expired: Bool? @@ -66,6 +68,7 @@ public struct Build: Hashable, Codable { public init( buildAudienceType: BuildAudienceType? = nil, computedMinMacOsVersion: String? = nil, + computedMinVisionOsVersion: String? = nil, expirationDate: String? = nil, expired: Bool? = nil, iconAssetToken: ImageAsset? = nil, @@ -78,6 +81,7 @@ public struct Build: Hashable, Codable { ) { self.buildAudienceType = buildAudienceType self.computedMinMacOsVersion = computedMinMacOsVersion + self.computedMinVisionOsVersion = computedMinVisionOsVersion self.expirationDate = expirationDate self.expired = expired self.iconAssetToken = iconAssetToken @@ -92,6 +96,7 @@ public struct Build: Hashable, Codable { private enum CodingKeys: String, CodingKey { case buildAudienceType case computedMinMacOsVersion + case computedMinVisionOsVersion case expirationDate case expired case iconAssetToken @@ -103,36 +108,36 @@ public struct Build: Hashable, Codable { case version } - public enum ProcessingState: Hashable, Codable, RawRepresentable { - case failed - case invalid - case processing - case valid - case unknown(String) + public struct ProcessingState: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var failed: Self { + .init(rawValue: "FAILED") + } - public var rawValue: String { - switch self { - case .failed: return "FAILED" - case .invalid: return "INVALID" - case .processing: return "PROCESSING" - case .valid: return "VALID" - case .unknown(let rawValue): return rawValue - } + public static var invalid: Self { + .init(rawValue: "INVALID") + } + + public static var processing: Self { + .init(rawValue: "PROCESSING") + } + + public static var valid: Self { + .init(rawValue: "VALID") + } + + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "FAILED": self = .failed - case "INVALID": self = .invalid - case "PROCESSING": self = .processing - case "VALID": self = .valid - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } } - public struct Relationships: Hashable, Codable { + public struct Relationships: Hashable, Codable, Sendable { public var app: App? public var appEncryptionDeclaration: AppEncryptionDeclaration? @@ -149,10 +154,14 @@ public struct Build: Hashable, Codable { public var buildBundles: BuildBundles? + public var diagnosticSignatures: DiagnosticSignatures? + public var icons: Icons? public var individualTesters: IndividualTesters? + public var perfPowerMetrics: PerfPowerMetrics? + public var preReleaseVersion: PreReleaseVersion? public init( @@ -164,8 +173,10 @@ public struct Build: Hashable, Codable { betaGroups: BetaGroups? = nil, buildBetaDetail: BuildBetaDetail? = nil, buildBundles: BuildBundles? = nil, + diagnosticSignatures: DiagnosticSignatures? = nil, icons: Icons? = nil, individualTesters: IndividualTesters? = nil, + perfPowerMetrics: PerfPowerMetrics? = nil, preReleaseVersion: PreReleaseVersion? = nil ) { self.app = app @@ -176,8 +187,10 @@ public struct Build: Hashable, Codable { self.betaGroups = betaGroups self.buildBetaDetail = buildBetaDetail self.buildBundles = buildBundles + self.diagnosticSignatures = diagnosticSignatures self.icons = icons self.individualTesters = individualTesters + self.perfPowerMetrics = perfPowerMetrics self.preReleaseVersion = preReleaseVersion } @@ -190,19 +203,21 @@ public struct Build: Hashable, Codable { case betaGroups case buildBetaDetail case buildBundles + case diagnosticSignatures case icons case individualTesters + case perfPowerMetrics case preReleaseVersion } - public struct App: Hashable, Codable { + public struct App: Hashable, Codable, Sendable { public var data: Data? - public var links: Links? + public var links: RelationshipLinks? public init( data: Data? = nil, - links: Links? = nil + links: RelationshipLinks? = nil ) { self.data = data self.links = links @@ -213,7 +228,7 @@ public struct Build: Hashable, Codable { case links } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -231,39 +246,20 @@ public struct Build: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case apps } } - - public struct Links: Hashable, Codable { - public var related: URL? - - public var `self`: URL? - - public init( - related: URL? = nil, - self _self: URL? = nil - ) { - self.related = related - self.`self` = _self - } - - private enum CodingKeys: String, CodingKey { - case related - case `self` = "self" - } - } } - public struct AppEncryptionDeclaration: Hashable, Codable { + public struct AppEncryptionDeclaration: Hashable, Codable, Sendable { public var data: Data? - public var links: Links? + public var links: RelationshipLinks? public init( data: Data? = nil, - links: Links? = nil + links: RelationshipLinks? = nil ) { self.data = data self.links = links @@ -274,7 +270,7 @@ public struct Build: Hashable, Codable { case links } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -292,39 +288,20 @@ public struct Build: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case appEncryptionDeclarations } } - - public struct Links: Hashable, Codable { - public var related: URL? - - public var `self`: URL? - - public init( - related: URL? = nil, - self _self: URL? = nil - ) { - self.related = related - self.`self` = _self - } - - private enum CodingKeys: String, CodingKey { - case related - case `self` = "self" - } - } } - public struct AppStoreVersion: Hashable, Codable { + public struct AppStoreVersion: Hashable, Codable, Sendable { public var data: Data? - public var links: Links? + public var links: RelationshipLinks? public init( data: Data? = nil, - links: Links? = nil + links: RelationshipLinks? = nil ) { self.data = data self.links = links @@ -335,7 +312,7 @@ public struct Build: Hashable, Codable { case links } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -353,39 +330,20 @@ public struct Build: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case appStoreVersions } } - - public struct Links: Hashable, Codable { - public var related: URL? - - public var `self`: URL? - - public init( - related: URL? = nil, - self _self: URL? = nil - ) { - self.related = related - self.`self` = _self - } - - private enum CodingKeys: String, CodingKey { - case related - case `self` = "self" - } - } } - public struct BetaAppReviewSubmission: Hashable, Codable { + public struct BetaAppReviewSubmission: Hashable, Codable, Sendable { public var data: Data? - public var links: Links? + public var links: RelationshipLinks? public init( data: Data? = nil, - links: Links? = nil + links: RelationshipLinks? = nil ) { self.data = data self.links = links @@ -396,7 +354,7 @@ public struct Build: Hashable, Codable { case links } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -414,41 +372,22 @@ public struct Build: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case betaAppReviewSubmissions } } - - public struct Links: Hashable, Codable { - public var related: URL? - - public var `self`: URL? - - public init( - related: URL? = nil, - self _self: URL? = nil - ) { - self.related = related - self.`self` = _self - } - - private enum CodingKeys: String, CodingKey { - case related - case `self` = "self" - } - } } - public struct BetaBuildLocalizations: Hashable, Codable { + public struct BetaBuildLocalizations: Hashable, Codable, Sendable { public var data: [Data]? - public var links: Links? + public var links: RelationshipLinks? public var meta: PagingInformation? public init( data: [Data]? = nil, - links: Links? = nil, + links: RelationshipLinks? = nil, meta: PagingInformation? = nil ) { self.data = data @@ -462,7 +401,7 @@ public struct Build: Hashable, Codable { case meta } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -480,41 +419,22 @@ public struct Build: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case betaBuildLocalizations } } - - public struct Links: Hashable, Codable { - public var related: URL? - - public var `self`: URL? - - public init( - related: URL? = nil, - self _self: URL? = nil - ) { - self.related = related - self.`self` = _self - } - - private enum CodingKeys: String, CodingKey { - case related - case `self` = "self" - } - } } - public struct BetaGroups: Hashable, Codable { + public struct BetaGroups: Hashable, Codable, Sendable { public var data: [Data]? - public var links: Links? + public var links: RelationshipLinks? public var meta: PagingInformation? public init( data: [Data]? = nil, - links: Links? = nil, + links: RelationshipLinks? = nil, meta: PagingInformation? = nil ) { self.data = data @@ -528,7 +448,7 @@ public struct Build: Hashable, Codable { case meta } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -546,39 +466,20 @@ public struct Build: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case betaGroups } } - - public struct Links: Hashable, Codable { - public var related: URL? - - public var `self`: URL? - - public init( - related: URL? = nil, - self _self: URL? = nil - ) { - self.related = related - self.`self` = _self - } - - private enum CodingKeys: String, CodingKey { - case related - case `self` = "self" - } - } } - public struct BuildBetaDetail: Hashable, Codable { + public struct BuildBetaDetail: Hashable, Codable, Sendable { public var data: Data? - public var links: Links? + public var links: RelationshipLinks? public init( data: Data? = nil, - links: Links? = nil + links: RelationshipLinks? = nil ) { self.data = data self.links = links @@ -589,7 +490,7 @@ public struct Build: Hashable, Codable { case links } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -607,55 +508,31 @@ public struct Build: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case buildBetaDetails } } - - public struct Links: Hashable, Codable { - public var related: URL? - - public var `self`: URL? - - public init( - related: URL? = nil, - self _self: URL? = nil - ) { - self.related = related - self.`self` = _self - } - - private enum CodingKeys: String, CodingKey { - case related - case `self` = "self" - } - } } - public struct BuildBundles: Hashable, Codable { + public struct BuildBundles: Hashable, Codable, Sendable { public var data: [Data]? - public var links: Links? - public var meta: PagingInformation? public init( data: [Data]? = nil, - links: Links? = nil, meta: PagingInformation? = nil ) { self.data = data - self.links = links self.meta = meta } private enum CodingKeys: String, CodingKey { case data - case links case meta } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -673,41 +550,34 @@ public struct Build: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case buildBundles } } + } - public struct Links: Hashable, Codable { - public var related: URL? - - public var `self`: URL? + public struct DiagnosticSignatures: Hashable, Codable, Sendable { + public var links: RelationshipLinks? - public init( - related: URL? = nil, - self _self: URL? = nil - ) { - self.related = related - self.`self` = _self - } + public init(links: RelationshipLinks? = nil) { + self.links = links + } - private enum CodingKeys: String, CodingKey { - case related - case `self` = "self" - } + private enum CodingKeys: String, CodingKey { + case links } } - public struct Icons: Hashable, Codable { + public struct Icons: Hashable, Codable, Sendable { public var data: [Data]? - public var links: Links? + public var links: RelationshipLinks? public var meta: PagingInformation? public init( data: [Data]? = nil, - links: Links? = nil, + links: RelationshipLinks? = nil, meta: PagingInformation? = nil ) { self.data = data @@ -721,7 +591,7 @@ public struct Build: Hashable, Codable { case meta } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -739,41 +609,22 @@ public struct Build: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case buildIcons } } - - public struct Links: Hashable, Codable { - public var related: URL? - - public var `self`: URL? - - public init( - related: URL? = nil, - self _self: URL? = nil - ) { - self.related = related - self.`self` = _self - } - - private enum CodingKeys: String, CodingKey { - case related - case `self` = "self" - } - } } - public struct IndividualTesters: Hashable, Codable { + public struct IndividualTesters: Hashable, Codable, Sendable { public var data: [Data]? - public var links: Links? + public var links: RelationshipLinks? public var meta: PagingInformation? public init( data: [Data]? = nil, - links: Links? = nil, + links: RelationshipLinks? = nil, meta: PagingInformation? = nil ) { self.data = data @@ -787,7 +638,7 @@ public struct Build: Hashable, Codable { case meta } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -805,39 +656,32 @@ public struct Build: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case betaTesters } } + } - public struct Links: Hashable, Codable { - public var related: URL? - - public var `self`: URL? + public struct PerfPowerMetrics: Hashable, Codable, Sendable { + public var links: RelationshipLinks? - public init( - related: URL? = nil, - self _self: URL? = nil - ) { - self.related = related - self.`self` = _self - } + public init(links: RelationshipLinks? = nil) { + self.links = links + } - private enum CodingKeys: String, CodingKey { - case related - case `self` = "self" - } + private enum CodingKeys: String, CodingKey { + case links } } - public struct PreReleaseVersion: Hashable, Codable { + public struct PreReleaseVersion: Hashable, Codable, Sendable { public var data: Data? - public var links: Links? + public var links: RelationshipLinks? public init( data: Data? = nil, - links: Links? = nil + links: RelationshipLinks? = nil ) { self.data = data self.links = links @@ -848,7 +692,7 @@ public struct Build: Hashable, Codable { case links } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -866,29 +710,10 @@ public struct Build: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case preReleaseVersions } } - - public struct Links: Hashable, Codable { - public var related: URL? - - public var `self`: URL? - - public init( - related: URL? = nil, - self _self: URL? = nil - ) { - self.related = related - self.`self` = _self - } - - private enum CodingKeys: String, CodingKey { - case related - case `self` = "self" - } - } } } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/BuildAudienceType.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/BuildAudienceType.generated.swift index c8ea92d9..966d37f6 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/BuildAudienceType.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/BuildAudienceType.generated.swift @@ -3,25 +3,23 @@ // swiftlint:disable all import Foundation -public enum BuildAudienceType: Hashable, Codable, RawRepresentable { - case appStoreEligible - case internalOnly - case unknown(String) +public struct BuildAudienceType: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var appStoreEligible: Self { + .init(rawValue: "APP_STORE_ELIGIBLE") + } + + public static var internalOnly: Self { + .init(rawValue: "INTERNAL_ONLY") + } - public var rawValue: String { - switch self { - case .appStoreEligible: return "APP_STORE_ELIGIBLE" - case .internalOnly: return "INTERNAL_ONLY" - case .unknown(let rawValue): return rawValue - } + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "APP_STORE_ELIGIBLE": self = .appStoreEligible - case "INTERNAL_ONLY": self = .internalOnly - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/BuildBetaDetail.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/BuildBetaDetail.generated.swift index f421bc3a..608b2f87 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/BuildBetaDetail.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/BuildBetaDetail.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct BuildBetaDetail: Hashable, Codable { +public struct BuildBetaDetail: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -36,11 +36,11 @@ public struct BuildBetaDetail: Hashable, Codable { case links } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case buildBetaDetails } - public struct Attributes: Hashable, Codable { + public struct Attributes: Hashable, Codable, Sendable { public var autoNotifyEnabled: Bool? public var externalBuildState: ExternalBetaState? @@ -64,7 +64,7 @@ public struct BuildBetaDetail: Hashable, Codable { } } - public struct Relationships: Hashable, Codable { + public struct Relationships: Hashable, Codable, Sendable { public var build: Build? public init(build: Build? = nil) { @@ -75,14 +75,14 @@ public struct BuildBetaDetail: Hashable, Codable { case build } - public struct Build: Hashable, Codable { + public struct Build: Hashable, Codable, Sendable { public var data: Data? - public var links: Links? + public var links: RelationshipLinks? public init( data: Data? = nil, - links: Links? = nil + links: RelationshipLinks? = nil ) { self.data = data self.links = links @@ -93,7 +93,7 @@ public struct BuildBetaDetail: Hashable, Codable { case links } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -111,29 +111,10 @@ public struct BuildBetaDetail: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case builds } } - - public struct Links: Hashable, Codable { - public var related: URL? - - public var `self`: URL? - - public init( - related: URL? = nil, - self _self: URL? = nil - ) { - self.related = related - self.`self` = _self - } - - private enum CodingKeys: String, CodingKey { - case related - case `self` = "self" - } - } } } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/BuildBetaNotification.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/BuildBetaNotification.generated.swift index cf2c02f3..389d0a5e 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/BuildBetaNotification.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/BuildBetaNotification.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct BuildBetaNotification: Hashable, Codable { +public struct BuildBetaNotification: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -26,7 +26,7 @@ public struct BuildBetaNotification: Hashable, Codable { case links } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case buildBetaNotifications } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/BuildBundle.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/BuildBundle.generated.swift index 73897f3a..7785c598 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/BuildBundle.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/BuildBundle.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct BuildBundle: Hashable, Codable { +public struct BuildBundle: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -36,14 +36,18 @@ public struct BuildBundle: Hashable, Codable { case links } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case buildBundles } - public struct Attributes: Hashable, Codable { + public struct Attributes: Hashable, Codable, Sendable { + public var baDownloadAllowance: Int? + + public var baMaxInstallSize: Int? + public var bundleId: String? - public var bundleType: BundleType? + public var bundleType: BuildBundleType? public var dSYMUrl: URL? @@ -76,8 +80,10 @@ public struct BuildBundle: Hashable, Codable { public var usesLocationServices: Bool? public init( + baDownloadAllowance: Int? = nil, + baMaxInstallSize: Int? = nil, bundleId: String? = nil, - bundleType: BundleType? = nil, + bundleType: BuildBundleType? = nil, dSYMUrl: URL? = nil, deviceProtocols: [String]? = nil, entitlements: [String: [String: String]]? = nil, @@ -94,6 +100,8 @@ public struct BuildBundle: Hashable, Codable { supportedArchitectures: [String]? = nil, usesLocationServices: Bool? = nil ) { + self.baDownloadAllowance = baDownloadAllowance + self.baMaxInstallSize = baMaxInstallSize self.bundleId = bundleId self.bundleType = bundleType self.dSYMUrl = dSYMUrl @@ -114,6 +122,8 @@ public struct BuildBundle: Hashable, Codable { } private enum CodingKeys: String, CodingKey { + case baDownloadAllowance + case baMaxInstallSize case bundleId case bundleType case dSYMUrl @@ -132,31 +142,9 @@ public struct BuildBundle: Hashable, Codable { case supportedArchitectures case usesLocationServices } - - public enum BundleType: Hashable, Codable, RawRepresentable { - case app - case appClip - case unknown(String) - - public var rawValue: String { - switch self { - case .app: return "APP" - case .appClip: return "APP_CLIP" - case .unknown(let rawValue): return rawValue - } - } - - public init(rawValue: String) { - switch rawValue { - case "APP": self = .app - case "APP_CLIP": self = .appClip - default: self = .unknown(rawValue) - } - } - } } - public struct Relationships: Hashable, Codable { + public struct Relationships: Hashable, Codable, Sendable { public var appClipDomainCacheStatus: AppClipDomainCacheStatus? public var appClipDomainDebugStatus: AppClipDomainDebugStatus? @@ -184,14 +172,14 @@ public struct BuildBundle: Hashable, Codable { case buildBundleFileSizes } - public struct AppClipDomainCacheStatus: Hashable, Codable { + public struct AppClipDomainCacheStatus: Hashable, Codable, Sendable { public var data: Data? - public var links: Links? + public var links: RelationshipLinks? public init( data: Data? = nil, - links: Links? = nil + links: RelationshipLinks? = nil ) { self.data = data self.links = links @@ -202,7 +190,7 @@ public struct BuildBundle: Hashable, Codable { case links } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -220,39 +208,20 @@ public struct BuildBundle: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case appClipDomainStatuses } } - - public struct Links: Hashable, Codable { - public var related: URL? - - public var `self`: URL? - - public init( - related: URL? = nil, - self _self: URL? = nil - ) { - self.related = related - self.`self` = _self - } - - private enum CodingKeys: String, CodingKey { - case related - case `self` = "self" - } - } } - public struct AppClipDomainDebugStatus: Hashable, Codable { + public struct AppClipDomainDebugStatus: Hashable, Codable, Sendable { public var data: Data? - public var links: Links? + public var links: RelationshipLinks? public init( data: Data? = nil, - links: Links? = nil + links: RelationshipLinks? = nil ) { self.data = data self.links = links @@ -263,7 +232,7 @@ public struct BuildBundle: Hashable, Codable { case links } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -281,41 +250,22 @@ public struct BuildBundle: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case appClipDomainStatuses } } - - public struct Links: Hashable, Codable { - public var related: URL? - - public var `self`: URL? - - public init( - related: URL? = nil, - self _self: URL? = nil - ) { - self.related = related - self.`self` = _self - } - - private enum CodingKeys: String, CodingKey { - case related - case `self` = "self" - } - } } - public struct BetaAppClipInvocations: Hashable, Codable { + public struct BetaAppClipInvocations: Hashable, Codable, Sendable { public var data: [Data]? - public var links: Links? + public var links: RelationshipLinks? public var meta: PagingInformation? public init( data: [Data]? = nil, - links: Links? = nil, + links: RelationshipLinks? = nil, meta: PagingInformation? = nil ) { self.data = data @@ -329,7 +279,7 @@ public struct BuildBundle: Hashable, Codable { case meta } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -347,41 +297,22 @@ public struct BuildBundle: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case betaAppClipInvocations } } - - public struct Links: Hashable, Codable { - public var related: URL? - - public var `self`: URL? - - public init( - related: URL? = nil, - self _self: URL? = nil - ) { - self.related = related - self.`self` = _self - } - - private enum CodingKeys: String, CodingKey { - case related - case `self` = "self" - } - } } - public struct BuildBundleFileSizes: Hashable, Codable { + public struct BuildBundleFileSizes: Hashable, Codable, Sendable { public var data: [Data]? - public var links: Links? + public var links: RelationshipLinks? public var meta: PagingInformation? public init( data: [Data]? = nil, - links: Links? = nil, + links: RelationshipLinks? = nil, meta: PagingInformation? = nil ) { self.data = data @@ -395,7 +326,7 @@ public struct BuildBundle: Hashable, Codable { case meta } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -413,29 +344,10 @@ public struct BuildBundle: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case buildBundleFileSizes } } - - public struct Links: Hashable, Codable { - public var related: URL? - - public var `self`: URL? - - public init( - related: URL? = nil, - self _self: URL? = nil - ) { - self.related = related - self.`self` = _self - } - - private enum CodingKeys: String, CodingKey { - case related - case `self` = "self" - } - } } } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/BuildBundleFileSize.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/BuildBundleFileSize.generated.swift index 39757312..f821bd38 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/BuildBundleFileSize.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/BuildBundleFileSize.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct BuildBundleFileSize: Hashable, Codable { +public struct BuildBundleFileSize: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -31,11 +31,11 @@ public struct BuildBundleFileSize: Hashable, Codable { case links } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case buildBundleFileSizes } - public struct Attributes: Hashable, Codable { + public struct Attributes: Hashable, Codable, Sendable { public var deviceModel: String? public var downloadBytes: Int? diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/BuildBundleType.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/BuildBundleType.generated.swift new file mode 100644 index 00000000..0650557a --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/BuildBundleType.generated.swift @@ -0,0 +1,26 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct BuildBundleType: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var app: Self { + .init(rawValue: "APP") + } + + public static var appClip: Self { + .init(rawValue: "APP_CLIP") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/BuildIcon.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/BuildIcon.generated.swift index 978aac09..0a047111 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/BuildIcon.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/BuildIcon.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct BuildIcon: Hashable, Codable { +public struct BuildIcon: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -31,11 +31,11 @@ public struct BuildIcon: Hashable, Codable { case links } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case buildIcons } - public struct Attributes: Hashable, Codable { + public struct Attributes: Hashable, Codable, Sendable { public var iconAsset: ImageAsset? public var iconType: IconAssetType? diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/BundleId.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/BundleId.generated.swift index 23817fe5..50c9f929 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/BundleId.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/BundleId.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct BundleId: Hashable, Codable { +public struct BundleId: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -36,11 +36,11 @@ public struct BundleId: Hashable, Codable { case links } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case bundleIds } - public struct Attributes: Hashable, Codable { + public struct Attributes: Hashable, Codable, Sendable { public var identifier: String? public var name: String? @@ -69,7 +69,7 @@ public struct BundleId: Hashable, Codable { } } - public struct Relationships: Hashable, Codable { + public struct Relationships: Hashable, Codable, Sendable { public var app: App? public var bundleIdCapabilities: BundleIdCapabilities? @@ -92,14 +92,14 @@ public struct BundleId: Hashable, Codable { case profiles } - public struct App: Hashable, Codable { + public struct App: Hashable, Codable, Sendable { public var data: Data? - public var links: Links? + public var links: RelationshipLinks? public init( data: Data? = nil, - links: Links? = nil + links: RelationshipLinks? = nil ) { self.data = data self.links = links @@ -110,7 +110,7 @@ public struct BundleId: Hashable, Codable { case links } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -128,41 +128,22 @@ public struct BundleId: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case apps } } - - public struct Links: Hashable, Codable { - public var related: URL? - - public var `self`: URL? - - public init( - related: URL? = nil, - self _self: URL? = nil - ) { - self.related = related - self.`self` = _self - } - - private enum CodingKeys: String, CodingKey { - case related - case `self` = "self" - } - } } - public struct BundleIdCapabilities: Hashable, Codable { + public struct BundleIdCapabilities: Hashable, Codable, Sendable { public var data: [Data]? - public var links: Links? + public var links: RelationshipLinks? public var meta: PagingInformation? public init( data: [Data]? = nil, - links: Links? = nil, + links: RelationshipLinks? = nil, meta: PagingInformation? = nil ) { self.data = data @@ -176,7 +157,7 @@ public struct BundleId: Hashable, Codable { case meta } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -194,41 +175,22 @@ public struct BundleId: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case bundleIdCapabilities } } - - public struct Links: Hashable, Codable { - public var related: URL? - - public var `self`: URL? - - public init( - related: URL? = nil, - self _self: URL? = nil - ) { - self.related = related - self.`self` = _self - } - - private enum CodingKeys: String, CodingKey { - case related - case `self` = "self" - } - } } - public struct Profiles: Hashable, Codable { + public struct Profiles: Hashable, Codable, Sendable { public var data: [Data]? - public var links: Links? + public var links: RelationshipLinks? public var meta: PagingInformation? public init( data: [Data]? = nil, - links: Links? = nil, + links: RelationshipLinks? = nil, meta: PagingInformation? = nil ) { self.data = data @@ -242,7 +204,7 @@ public struct BundleId: Hashable, Codable { case meta } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -260,29 +222,10 @@ public struct BundleId: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case profiles } } - - public struct Links: Hashable, Codable { - public var related: URL? - - public var `self`: URL? - - public init( - related: URL? = nil, - self _self: URL? = nil - ) { - self.related = related - self.`self` = _self - } - - private enum CodingKeys: String, CodingKey { - case related - case `self` = "self" - } - } } } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/BundleIdCapability.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/BundleIdCapability.generated.swift index d7d1d38f..900776ee 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/BundleIdCapability.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/BundleIdCapability.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct BundleIdCapability: Hashable, Codable { +public struct BundleIdCapability: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -31,11 +31,11 @@ public struct BundleIdCapability: Hashable, Codable { case links } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case bundleIdCapabilities } - public struct Attributes: Hashable, Codable { + public struct Attributes: Hashable, Codable, Sendable { public var capabilityType: CapabilityType? public var settings: [CapabilitySetting]? diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/BundleIdPlatform.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/BundleIdPlatform.generated.swift index da9a86a7..55046fbf 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/BundleIdPlatform.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/BundleIdPlatform.generated.swift @@ -3,25 +3,27 @@ // swiftlint:disable all import Foundation -public enum BundleIdPlatform: Hashable, Codable, RawRepresentable { - case iOS - case macOS - case unknown(String) - - public var rawValue: String { - switch self { - case .iOS: return "IOS" - case .macOS: return "MAC_OS" - case .unknown(let rawValue): return rawValue - } +public struct BundleIdPlatform: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var iOS: Self { + .init(rawValue: "IOS") } + public static var macOS: Self { + .init(rawValue: "MAC_OS") + } + + public static var universal: Self { + .init(rawValue: "UNIVERSAL") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "IOS": self = .iOS - case "MAC_OS": self = .macOS - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/CapabilityOption.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/CapabilityOption.generated.swift index 8089de79..789d76ee 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/CapabilityOption.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/CapabilityOption.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct CapabilityOption: Hashable, Codable { +public struct CapabilityOption: Hashable, Codable, Sendable { public var description: String? public var enabled: Bool? @@ -41,37 +41,39 @@ public struct CapabilityOption: Hashable, Codable { case supportsWildcard } - public enum Key: Hashable, Codable, RawRepresentable { - case completeProtection - case primaryAppConsent - case protectedUnlessOpen - case protectedUntilFirstUserAuth - case xcode5 - case xcode6 - case unknown(String) - - public var rawValue: String { - switch self { - case .completeProtection: return "COMPLETE_PROTECTION" - case .primaryAppConsent: return "PRIMARY_APP_CONSENT" - case .protectedUnlessOpen: return "PROTECTED_UNLESS_OPEN" - case .protectedUntilFirstUserAuth: return "PROTECTED_UNTIL_FIRST_USER_AUTH" - case .xcode5: return "XCODE_5" - case .xcode6: return "XCODE_6" - case .unknown(let rawValue): return rawValue - } + public struct Key: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var completeProtection: Self { + .init(rawValue: "COMPLETE_PROTECTION") } + public static var primaryAppConsent: Self { + .init(rawValue: "PRIMARY_APP_CONSENT") + } + + public static var protectedUnlessOpen: Self { + .init(rawValue: "PROTECTED_UNLESS_OPEN") + } + + public static var protectedUntilFirstUserAuth: Self { + .init(rawValue: "PROTECTED_UNTIL_FIRST_USER_AUTH") + } + + public static var xcode5: Self { + .init(rawValue: "XCODE_5") + } + + public static var xcode6: Self { + .init(rawValue: "XCODE_6") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "COMPLETE_PROTECTION": self = .completeProtection - case "PRIMARY_APP_CONSENT": self = .primaryAppConsent - case "PROTECTED_UNLESS_OPEN": self = .protectedUnlessOpen - case "PROTECTED_UNTIL_FIRST_USER_AUTH": self = .protectedUntilFirstUserAuth - case "XCODE_5": self = .xcode5 - case "XCODE_6": self = .xcode6 - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/CapabilitySetting.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/CapabilitySetting.generated.swift index 84ed67ef..2d418bce 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/CapabilitySetting.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/CapabilitySetting.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct CapabilitySetting: Hashable, Codable { +public struct CapabilitySetting: Hashable, Codable, Sendable { public var allowedInstances: AllowedInstances? public var description: String? @@ -51,53 +51,51 @@ public struct CapabilitySetting: Hashable, Codable { case visible } - public enum AllowedInstances: Hashable, Codable, RawRepresentable { - case entry - case multiple - case single - case unknown(String) - - public var rawValue: String { - switch self { - case .entry: return "ENTRY" - case .multiple: return "MULTIPLE" - case .single: return "SINGLE" - case .unknown(let rawValue): return rawValue - } + public struct AllowedInstances: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var entry: Self { + .init(rawValue: "ENTRY") } + public static var multiple: Self { + .init(rawValue: "MULTIPLE") + } + + public static var single: Self { + .init(rawValue: "SINGLE") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "ENTRY": self = .entry - case "MULTIPLE": self = .multiple - case "SINGLE": self = .single - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum Key: Hashable, Codable, RawRepresentable { - case appleIdAuthAppConsent - case dataProtectionPermissionLevel - case icloudVersion - case unknown(String) - - public var rawValue: String { - switch self { - case .appleIdAuthAppConsent: return "APPLE_ID_AUTH_APP_CONSENT" - case .dataProtectionPermissionLevel: return "DATA_PROTECTION_PERMISSION_LEVEL" - case .icloudVersion: return "ICLOUD_VERSION" - case .unknown(let rawValue): return rawValue - } + public struct Key: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var appleIdAuthAppConsent: Self { + .init(rawValue: "APPLE_ID_AUTH_APP_CONSENT") } + public static var dataProtectionPermissionLevel: Self { + .init(rawValue: "DATA_PROTECTION_PERMISSION_LEVEL") + } + + public static var icloudVersion: Self { + .init(rawValue: "ICLOUD_VERSION") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "APPLE_ID_AUTH_APP_CONSENT": self = .appleIdAuthAppConsent - case "DATA_PROTECTION_PERMISSION_LEVEL": self = .dataProtectionPermissionLevel - case "ICLOUD_VERSION": self = .icloudVersion - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/CapabilityType.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/CapabilityType.generated.swift index e4c8f7e0..0ac2673d 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/CapabilityType.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/CapabilityType.generated.swift @@ -3,103 +3,127 @@ // swiftlint:disable all import Foundation -public enum CapabilityType: Hashable, Codable, RawRepresentable { - case accessWifiInformation - case appGroups - case appleIdAuth - case applePay - case associatedDomains - case autofillCredentialProvider - case classkit - case coremediaHlsLowLatency - case dataProtection - case gameCenter - case healthkit - case homekit - case hotSpot - case icloud - case inAppPurchase - case interAppAudio - case maps - case multipath - case networkCustomProtocol - case networkExtensions - case nfcTagReading - case personalVpn - case pushNotifications - case sirikit - case systemExtensionInstall - case userManagement - case wallet - case wirelessAccessoryConfiguration - case unknown(String) - - public var rawValue: String { - switch self { - case .accessWifiInformation: return "ACCESS_WIFI_INFORMATION" - case .appGroups: return "APP_GROUPS" - case .appleIdAuth: return "APPLE_ID_AUTH" - case .applePay: return "APPLE_PAY" - case .associatedDomains: return "ASSOCIATED_DOMAINS" - case .autofillCredentialProvider: return "AUTOFILL_CREDENTIAL_PROVIDER" - case .classkit: return "CLASSKIT" - case .coremediaHlsLowLatency: return "COREMEDIA_HLS_LOW_LATENCY" - case .dataProtection: return "DATA_PROTECTION" - case .gameCenter: return "GAME_CENTER" - case .healthkit: return "HEALTHKIT" - case .homekit: return "HOMEKIT" - case .hotSpot: return "HOT_SPOT" - case .icloud: return "ICLOUD" - case .inAppPurchase: return "IN_APP_PURCHASE" - case .interAppAudio: return "INTER_APP_AUDIO" - case .maps: return "MAPS" - case .multipath: return "MULTIPATH" - case .networkCustomProtocol: return "NETWORK_CUSTOM_PROTOCOL" - case .networkExtensions: return "NETWORK_EXTENSIONS" - case .nfcTagReading: return "NFC_TAG_READING" - case .personalVpn: return "PERSONAL_VPN" - case .pushNotifications: return "PUSH_NOTIFICATIONS" - case .sirikit: return "SIRIKIT" - case .systemExtensionInstall: return "SYSTEM_EXTENSION_INSTALL" - case .userManagement: return "USER_MANAGEMENT" - case .wallet: return "WALLET" - case .wirelessAccessoryConfiguration: return "WIRELESS_ACCESSORY_CONFIGURATION" - case .unknown(let rawValue): return rawValue - } +public struct CapabilityType: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var accessWifiInformation: Self { + .init(rawValue: "ACCESS_WIFI_INFORMATION") } + public static var appGroups: Self { + .init(rawValue: "APP_GROUPS") + } + + public static var appleIdAuth: Self { + .init(rawValue: "APPLE_ID_AUTH") + } + + public static var applePay: Self { + .init(rawValue: "APPLE_PAY") + } + + public static var associatedDomains: Self { + .init(rawValue: "ASSOCIATED_DOMAINS") + } + + public static var autofillCredentialProvider: Self { + .init(rawValue: "AUTOFILL_CREDENTIAL_PROVIDER") + } + + public static var classkit: Self { + .init(rawValue: "CLASSKIT") + } + + public static var coremediaHlsLowLatency: Self { + .init(rawValue: "COREMEDIA_HLS_LOW_LATENCY") + } + + public static var dataProtection: Self { + .init(rawValue: "DATA_PROTECTION") + } + + public static var gameCenter: Self { + .init(rawValue: "GAME_CENTER") + } + + public static var healthkit: Self { + .init(rawValue: "HEALTHKIT") + } + + public static var homekit: Self { + .init(rawValue: "HOMEKIT") + } + + public static var hotSpot: Self { + .init(rawValue: "HOT_SPOT") + } + + public static var icloud: Self { + .init(rawValue: "ICLOUD") + } + + public static var inAppPurchase: Self { + .init(rawValue: "IN_APP_PURCHASE") + } + + public static var interAppAudio: Self { + .init(rawValue: "INTER_APP_AUDIO") + } + + public static var maps: Self { + .init(rawValue: "MAPS") + } + + public static var multipath: Self { + .init(rawValue: "MULTIPATH") + } + + public static var networkCustomProtocol: Self { + .init(rawValue: "NETWORK_CUSTOM_PROTOCOL") + } + + public static var networkExtensions: Self { + .init(rawValue: "NETWORK_EXTENSIONS") + } + + public static var nfcTagReading: Self { + .init(rawValue: "NFC_TAG_READING") + } + + public static var personalVpn: Self { + .init(rawValue: "PERSONAL_VPN") + } + + public static var pushNotifications: Self { + .init(rawValue: "PUSH_NOTIFICATIONS") + } + + public static var sirikit: Self { + .init(rawValue: "SIRIKIT") + } + + public static var systemExtensionInstall: Self { + .init(rawValue: "SYSTEM_EXTENSION_INSTALL") + } + + public static var userManagement: Self { + .init(rawValue: "USER_MANAGEMENT") + } + + public static var wallet: Self { + .init(rawValue: "WALLET") + } + + public static var wirelessAccessoryConfiguration: Self { + .init(rawValue: "WIRELESS_ACCESSORY_CONFIGURATION") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "ACCESS_WIFI_INFORMATION": self = .accessWifiInformation - case "APP_GROUPS": self = .appGroups - case "APPLE_ID_AUTH": self = .appleIdAuth - case "APPLE_PAY": self = .applePay - case "ASSOCIATED_DOMAINS": self = .associatedDomains - case "AUTOFILL_CREDENTIAL_PROVIDER": self = .autofillCredentialProvider - case "CLASSKIT": self = .classkit - case "COREMEDIA_HLS_LOW_LATENCY": self = .coremediaHlsLowLatency - case "DATA_PROTECTION": self = .dataProtection - case "GAME_CENTER": self = .gameCenter - case "HEALTHKIT": self = .healthkit - case "HOMEKIT": self = .homekit - case "HOT_SPOT": self = .hotSpot - case "ICLOUD": self = .icloud - case "IN_APP_PURCHASE": self = .inAppPurchase - case "INTER_APP_AUDIO": self = .interAppAudio - case "MAPS": self = .maps - case "MULTIPATH": self = .multipath - case "NETWORK_CUSTOM_PROTOCOL": self = .networkCustomProtocol - case "NETWORK_EXTENSIONS": self = .networkExtensions - case "NFC_TAG_READING": self = .nfcTagReading - case "PERSONAL_VPN": self = .personalVpn - case "PUSH_NOTIFICATIONS": self = .pushNotifications - case "SIRIKIT": self = .sirikit - case "SYSTEM_EXTENSION_INSTALL": self = .systemExtensionInstall - case "USER_MANAGEMENT": self = .userManagement - case "WALLET": self = .wallet - case "WIRELESS_ACCESSORY_CONFIGURATION": self = .wirelessAccessoryConfiguration - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Certificate.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Certificate.generated.swift index f18783b2..df0e611c 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Certificate.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Certificate.generated.swift @@ -3,24 +3,28 @@ // swiftlint:disable all import Foundation -public struct Certificate: Hashable, Codable { +public struct Certificate: Hashable, Codable, Sendable { public var id: String public var type: `Type` public var attributes: Attributes? + public var relationships: Relationships? + public var links: ResourceLinks? public init( id: String, type: `Type`, attributes: Attributes? = nil, + relationships: Relationships? = nil, links: ResourceLinks? = nil ) { self.id = id self.type = type self.attributes = attributes + self.relationships = relationships self.links = links } @@ -28,14 +32,17 @@ public struct Certificate: Hashable, Codable { case id case type case attributes + case relationships case links } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case certificates } - public struct Attributes: Hashable, Codable { + public struct Attributes: Hashable, Codable, Sendable { + public var activated: Bool? + public var certificateContent: String? public var certificateType: CertificateType? @@ -51,6 +58,7 @@ public struct Certificate: Hashable, Codable { public var serialNumber: String? public init( + activated: Bool? = nil, certificateContent: String? = nil, certificateType: CertificateType? = nil, displayName: String? = nil, @@ -59,6 +67,7 @@ public struct Certificate: Hashable, Codable { platform: BundleIdPlatform? = nil, serialNumber: String? = nil ) { + self.activated = activated self.certificateContent = certificateContent self.certificateType = certificateType self.displayName = displayName @@ -69,6 +78,7 @@ public struct Certificate: Hashable, Codable { } private enum CodingKeys: String, CodingKey { + case activated case certificateContent case certificateType case displayName @@ -78,6 +88,60 @@ public struct Certificate: Hashable, Codable { case serialNumber } } + + public struct Relationships: Hashable, Codable, Sendable { + public var passTypeId: PassTypeId? + + public init(passTypeId: PassTypeId? = nil) { + self.passTypeId = passTypeId + } + + private enum CodingKeys: String, CodingKey { + case passTypeId + } + + public struct PassTypeId: Hashable, Codable, Sendable { + public var data: Data? + + public var links: RelationshipLinks? + + public init( + data: Data? = nil, + links: RelationshipLinks? = nil + ) { + self.data = data + self.links = links + } + + private enum CodingKeys: String, CodingKey { + case data + case links + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case passTypeIds + } + } + } + } } // swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/CertificateType.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/CertificateType.generated.swift index c7222861..706ab9c6 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/CertificateType.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/CertificateType.generated.swift @@ -3,52 +3,87 @@ // swiftlint:disable all import Foundation -public enum CertificateType: Hashable, Codable, RawRepresentable { - case developerIdApplication - case developerIdKext - case development - case distribution - case iOSDevelopment - case iOSDistribution - case macAppDevelopment - case macAppDistribution - case macInstallerDistribution - case passTypeId - case passTypeIdWithNfc - case unknown(String) - - public var rawValue: String { - switch self { - case .developerIdApplication: return "DEVELOPER_ID_APPLICATION" - case .developerIdKext: return "DEVELOPER_ID_KEXT" - case .development: return "DEVELOPMENT" - case .distribution: return "DISTRIBUTION" - case .iOSDevelopment: return "IOS_DEVELOPMENT" - case .iOSDistribution: return "IOS_DISTRIBUTION" - case .macAppDevelopment: return "MAC_APP_DEVELOPMENT" - case .macAppDistribution: return "MAC_APP_DISTRIBUTION" - case .macInstallerDistribution: return "MAC_INSTALLER_DISTRIBUTION" - case .passTypeId: return "PASS_TYPE_ID" - case .passTypeIdWithNfc: return "PASS_TYPE_ID_WITH_NFC" - case .unknown(let rawValue): return rawValue - } +public struct CertificateType: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var applePay: Self { + .init(rawValue: "APPLE_PAY") } + public static var applePayMerchantIdentity: Self { + .init(rawValue: "APPLE_PAY_MERCHANT_IDENTITY") + } + + public static var applePayPspIdentity: Self { + .init(rawValue: "APPLE_PAY_PSP_IDENTITY") + } + + public static var applePayRsa: Self { + .init(rawValue: "APPLE_PAY_RSA") + } + + public static var developerIdApplication: Self { + .init(rawValue: "DEVELOPER_ID_APPLICATION") + } + + public static var developerIdApplicationG2: Self { + .init(rawValue: "DEVELOPER_ID_APPLICATION_G2") + } + + public static var developerIdKext: Self { + .init(rawValue: "DEVELOPER_ID_KEXT") + } + + public static var developerIdKextG2: Self { + .init(rawValue: "DEVELOPER_ID_KEXT_G2") + } + + public static var development: Self { + .init(rawValue: "DEVELOPMENT") + } + + public static var distribution: Self { + .init(rawValue: "DISTRIBUTION") + } + + public static var iOSDevelopment: Self { + .init(rawValue: "IOS_DEVELOPMENT") + } + + public static var iOSDistribution: Self { + .init(rawValue: "IOS_DISTRIBUTION") + } + + public static var identityAccess: Self { + .init(rawValue: "IDENTITY_ACCESS") + } + + public static var macAppDevelopment: Self { + .init(rawValue: "MAC_APP_DEVELOPMENT") + } + + public static var macAppDistribution: Self { + .init(rawValue: "MAC_APP_DISTRIBUTION") + } + + public static var macInstallerDistribution: Self { + .init(rawValue: "MAC_INSTALLER_DISTRIBUTION") + } + + public static var passTypeId: Self { + .init(rawValue: "PASS_TYPE_ID") + } + + public static var passTypeIdWithNfc: Self { + .init(rawValue: "PASS_TYPE_ID_WITH_NFC") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "DEVELOPER_ID_APPLICATION": self = .developerIdApplication - case "DEVELOPER_ID_KEXT": self = .developerIdKext - case "DEVELOPMENT": self = .development - case "DISTRIBUTION": self = .distribution - case "IOS_DEVELOPMENT": self = .iOSDevelopment - case "IOS_DISTRIBUTION": self = .iOSDistribution - case "MAC_APP_DEVELOPMENT": self = .macAppDevelopment - case "MAC_APP_DISTRIBUTION": self = .macAppDistribution - case "MAC_INSTALLER_DISTRIBUTION": self = .macInstallerDistribution - case "PASS_TYPE_ID": self = .passTypeId - case "PASS_TYPE_ID_WITH_NFC": self = .passTypeIdWithNfc - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/CiAction.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/CiAction.generated.swift index 71c472d5..fe47b71c 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/CiAction.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/CiAction.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct CiAction: Hashable, Codable { +public struct CiAction: Hashable, Codable, Sendable { public var actionType: CiActionType? public var buildDistributionAudience: BuildAudienceType? @@ -51,75 +51,91 @@ public struct CiAction: Hashable, Codable { case testConfiguration } - public enum Destination: Hashable, Codable, RawRepresentable { - case anyMac - case anyMacCatalyst - case anyTvOSDevice - case anyTvOSSimulator - case anyWatchOSDevice - case anyWatchOSSimulator - case anyiOSDevice - case anyiOSSimulator - case unknown(String) - - public var rawValue: String { - switch self { - case .anyMac: return "ANY_MAC" - case .anyMacCatalyst: return "ANY_MAC_CATALYST" - case .anyTvOSDevice: return "ANY_TVOS_DEVICE" - case .anyTvOSSimulator: return "ANY_TVOS_SIMULATOR" - case .anyWatchOSDevice: return "ANY_WATCHOS_DEVICE" - case .anyWatchOSSimulator: return "ANY_WATCHOS_SIMULATOR" - case .anyiOSDevice: return "ANY_IOS_DEVICE" - case .anyiOSSimulator: return "ANY_IOS_SIMULATOR" - case .unknown(let rawValue): return rawValue - } + public struct Destination: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var anyMac: Self { + .init(rawValue: "ANY_MAC") + } + + public static var anyMacCatalyst: Self { + .init(rawValue: "ANY_MAC_CATALYST") + } + + public static var anyTvOSDevice: Self { + .init(rawValue: "ANY_TVOS_DEVICE") + } + + public static var anyTvOSSimulator: Self { + .init(rawValue: "ANY_TVOS_SIMULATOR") + } + + public static var anyVisionosDevice: Self { + .init(rawValue: "ANY_VISIONOS_DEVICE") + } + + public static var anyVisionosSimulator: Self { + .init(rawValue: "ANY_VISIONOS_SIMULATOR") + } + + public static var anyWatchOSDevice: Self { + .init(rawValue: "ANY_WATCHOS_DEVICE") + } + + public static var anyWatchOSSimulator: Self { + .init(rawValue: "ANY_WATCHOS_SIMULATOR") + } + + public static var anyiOSDevice: Self { + .init(rawValue: "ANY_IOS_DEVICE") + } + + public static var anyiOSSimulator: Self { + .init(rawValue: "ANY_IOS_SIMULATOR") + } + + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "ANY_MAC": self = .anyMac - case "ANY_MAC_CATALYST": self = .anyMacCatalyst - case "ANY_TVOS_DEVICE": self = .anyTvOSDevice - case "ANY_TVOS_SIMULATOR": self = .anyTvOSSimulator - case "ANY_WATCHOS_DEVICE": self = .anyWatchOSDevice - case "ANY_WATCHOS_SIMULATOR": self = .anyWatchOSSimulator - case "ANY_IOS_DEVICE": self = .anyiOSDevice - case "ANY_IOS_SIMULATOR": self = .anyiOSSimulator - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum Platform: Hashable, Codable, RawRepresentable { - case iOS - case macOS - case tvOS - case watchOS - case unknown(String) - - public var rawValue: String { - switch self { - case .iOS: return "IOS" - case .macOS: return "MACOS" - case .tvOS: return "TVOS" - case .watchOS: return "WATCHOS" - case .unknown(let rawValue): return rawValue - } + public struct Platform: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var iOS: Self { + .init(rawValue: "IOS") + } + + public static var macOS: Self { + .init(rawValue: "MACOS") + } + + public static var tvOS: Self { + .init(rawValue: "TVOS") + } + + public static var visionos: Self { + .init(rawValue: "VISIONOS") } + public static var watchOS: Self { + .init(rawValue: "WATCHOS") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "IOS": self = .iOS - case "MACOS": self = .macOS - case "TVOS": self = .tvOS - case "WATCHOS": self = .watchOS - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public struct TestConfiguration: Hashable, Codable { + public struct TestConfiguration: Hashable, Codable, Sendable { public var kind: Kind? public var testDestinations: [CiTestDestination]? @@ -142,25 +158,23 @@ public struct CiAction: Hashable, Codable { case testPlanName } - public enum Kind: Hashable, Codable, RawRepresentable { - case specificTestPlans - case useSchemeSettings - case unknown(String) + public struct Kind: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var specificTestPlans: Self { + .init(rawValue: "SPECIFIC_TEST_PLANS") + } - public var rawValue: String { - switch self { - case .specificTestPlans: return "SPECIFIC_TEST_PLANS" - case .useSchemeSettings: return "USE_SCHEME_SETTINGS" - case .unknown(let rawValue): return rawValue - } + public static var useSchemeSettings: Self { + .init(rawValue: "USE_SCHEME_SETTINGS") } + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "SPECIFIC_TEST_PLANS": self = .specificTestPlans - case "USE_SCHEME_SETTINGS": self = .useSchemeSettings - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/CiActionType.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/CiActionType.generated.swift index d6ca840f..ca15664b 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/CiActionType.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/CiActionType.generated.swift @@ -3,31 +3,31 @@ // swiftlint:disable all import Foundation -public enum CiActionType: Hashable, Codable, RawRepresentable { - case analyze - case archive - case build - case test - case unknown(String) - - public var rawValue: String { - switch self { - case .analyze: return "ANALYZE" - case .archive: return "ARCHIVE" - case .build: return "BUILD" - case .test: return "TEST" - case .unknown(let rawValue): return rawValue - } +public struct CiActionType: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var analyze: Self { + .init(rawValue: "ANALYZE") } + public static var archive: Self { + .init(rawValue: "ARCHIVE") + } + + public static var build: Self { + .init(rawValue: "BUILD") + } + + public static var test: Self { + .init(rawValue: "TEST") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "ANALYZE": self = .analyze - case "ARCHIVE": self = .archive - case "BUILD": self = .build - case "TEST": self = .test - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/CiArtifact.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/CiArtifact.generated.swift index ad1206a8..ae36fb45 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/CiArtifact.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/CiArtifact.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct CiArtifact: Hashable, Codable { +public struct CiArtifact: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -31,11 +31,11 @@ public struct CiArtifact: Hashable, Codable { case links } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case ciArtifacts } - public struct Attributes: Hashable, Codable { + public struct Attributes: Hashable, Codable, Sendable { public var downloadUrl: URL? public var fileName: String? @@ -63,37 +63,43 @@ public struct CiArtifact: Hashable, Codable { case fileType } - public enum FileType: Hashable, Codable, RawRepresentable { - case archive - case archiveExport - case logBundle - case resultBundle - case testProducts - case xcodebuildProducts - case unknown(String) - - public var rawValue: String { - switch self { - case .archive: return "ARCHIVE" - case .archiveExport: return "ARCHIVE_EXPORT" - case .logBundle: return "LOG_BUNDLE" - case .resultBundle: return "RESULT_BUNDLE" - case .testProducts: return "TEST_PRODUCTS" - case .xcodebuildProducts: return "XCODEBUILD_PRODUCTS" - case .unknown(let rawValue): return rawValue - } + public struct FileType: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var archive: Self { + .init(rawValue: "ARCHIVE") } + public static var archiveExport: Self { + .init(rawValue: "ARCHIVE_EXPORT") + } + + public static var logBundle: Self { + .init(rawValue: "LOG_BUNDLE") + } + + public static var resultBundle: Self { + .init(rawValue: "RESULT_BUNDLE") + } + + public static var stapledNotarizedArchive: Self { + .init(rawValue: "STAPLED_NOTARIZED_ARCHIVE") + } + + public static var testProducts: Self { + .init(rawValue: "TEST_PRODUCTS") + } + + public static var xcodebuildProducts: Self { + .init(rawValue: "XCODEBUILD_PRODUCTS") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "ARCHIVE": self = .archive - case "ARCHIVE_EXPORT": self = .archiveExport - case "LOG_BUNDLE": self = .logBundle - case "RESULT_BUNDLE": self = .resultBundle - case "TEST_PRODUCTS": self = .testProducts - case "XCODEBUILD_PRODUCTS": self = .xcodebuildProducts - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/CiBranchPatterns.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/CiBranchPatterns.generated.swift index a0c4534f..0d1de78d 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/CiBranchPatterns.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/CiBranchPatterns.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct CiBranchPatterns: Hashable, Codable { +public struct CiBranchPatterns: Hashable, Codable, Sendable { public var isAllMatch: Bool? public var patterns: [Patterns]? @@ -21,7 +21,7 @@ public struct CiBranchPatterns: Hashable, Codable { case patterns } - public struct Patterns: Hashable, Codable { + public struct Patterns: Hashable, Codable, Sendable { public var isPrefix: Bool? public var pattern: String? diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/CiBranchStartCondition.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/CiBranchStartCondition.generated.swift index 7796a244..9ea1c8f5 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/CiBranchStartCondition.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/CiBranchStartCondition.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct CiBranchStartCondition: Hashable, Codable { +public struct CiBranchStartCondition: Hashable, Codable, Sendable { public var autoCancel: Bool? public var filesAndFoldersRule: CiFilesAndFoldersRule? diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/CiBuildAction.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/CiBuildAction.generated.swift index bd21db9e..ed6802b0 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/CiBuildAction.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/CiBuildAction.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct CiBuildAction: Hashable, Codable { +public struct CiBuildAction: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -36,11 +36,11 @@ public struct CiBuildAction: Hashable, Codable { case links } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case ciBuildActions } - public struct Attributes: Hashable, Codable { + public struct Attributes: Hashable, Codable, Sendable { public var actionType: CiActionType? public var completionStatus: CiCompletionStatus? @@ -89,25 +89,54 @@ public struct CiBuildAction: Hashable, Codable { } } - public struct Relationships: Hashable, Codable { + public struct Relationships: Hashable, Codable, Sendable { + public var artifacts: Artifacts? + public var buildRun: BuildRun? - public init(buildRun: BuildRun? = nil) { + public var issues: Issues? + + public var testResults: TestResults? + + public init( + artifacts: Artifacts? = nil, + buildRun: BuildRun? = nil, + issues: Issues? = nil, + testResults: TestResults? = nil + ) { + self.artifacts = artifacts self.buildRun = buildRun + self.issues = issues + self.testResults = testResults } private enum CodingKeys: String, CodingKey { + case artifacts case buildRun + case issues + case testResults + } + + public struct Artifacts: Hashable, Codable, Sendable { + public var links: RelationshipLinks? + + public init(links: RelationshipLinks? = nil) { + self.links = links + } + + private enum CodingKeys: String, CodingKey { + case links + } } - public struct BuildRun: Hashable, Codable { + public struct BuildRun: Hashable, Codable, Sendable { public var data: Data? - public var links: Links? + public var links: RelationshipLinks? public init( data: Data? = nil, - links: Links? = nil + links: RelationshipLinks? = nil ) { self.data = data self.links = links @@ -118,7 +147,7 @@ public struct CiBuildAction: Hashable, Codable { case links } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -136,28 +165,33 @@ public struct CiBuildAction: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case ciBuildRuns } } + } + + public struct Issues: Hashable, Codable, Sendable { + public var links: RelationshipLinks? + + public init(links: RelationshipLinks? = nil) { + self.links = links + } - public struct Links: Hashable, Codable { - public var related: URL? + private enum CodingKeys: String, CodingKey { + case links + } + } - public var `self`: URL? + public struct TestResults: Hashable, Codable, Sendable { + public var links: RelationshipLinks? - public init( - related: URL? = nil, - self _self: URL? = nil - ) { - self.related = related - self.`self` = _self - } + public init(links: RelationshipLinks? = nil) { + self.links = links + } - private enum CodingKeys: String, CodingKey { - case related - case `self` = "self" - } + private enum CodingKeys: String, CodingKey { + case links } } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/CiBuildRun.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/CiBuildRun.generated.swift index dbfe3b72..2c825b6e 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/CiBuildRun.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/CiBuildRun.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct CiBuildRun: Hashable, Codable { +public struct CiBuildRun: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -36,11 +36,11 @@ public struct CiBuildRun: Hashable, Codable { case links } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case ciBuildRuns } - public struct Attributes: Hashable, Codable { + public struct Attributes: Hashable, Codable, Sendable { public var cancelReason: CancelReason? public var completionStatus: CiCompletionStatus? @@ -108,29 +108,27 @@ public struct CiBuildRun: Hashable, Codable { case startedDate } - public enum CancelReason: Hashable, Codable, RawRepresentable { - case automaticallyByNewerBuild - case manuallyByUser - case unknown(String) + public struct CancelReason: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var automaticallyByNewerBuild: Self { + .init(rawValue: "AUTOMATICALLY_BY_NEWER_BUILD") + } - public var rawValue: String { - switch self { - case .automaticallyByNewerBuild: return "AUTOMATICALLY_BY_NEWER_BUILD" - case .manuallyByUser: return "MANUALLY_BY_USER" - case .unknown(let rawValue): return rawValue - } + public static var manuallyByUser: Self { + .init(rawValue: "MANUALLY_BY_USER") + } + + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "AUTOMATICALLY_BY_NEWER_BUILD": self = .automaticallyByNewerBuild - case "MANUALLY_BY_USER": self = .manuallyByUser - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public struct DestinationCommit: Hashable, Codable { + public struct DestinationCommit: Hashable, Codable, Sendable { public var author: CiGitUser? public var commitSha: String? @@ -164,7 +162,7 @@ public struct CiBuildRun: Hashable, Codable { } } - public struct SourceCommit: Hashable, Codable { + public struct SourceCommit: Hashable, Codable, Sendable { public var author: CiGitUser? public var commitSha: String? @@ -198,42 +196,46 @@ public struct CiBuildRun: Hashable, Codable { } } - public enum StartReason: Hashable, Codable, RawRepresentable { - case gitRefChange - case manual - case manualRebuild - case pullRequestOpen - case pullRequestUpdate - case schedule - case unknown(String) - - public var rawValue: String { - switch self { - case .gitRefChange: return "GIT_REF_CHANGE" - case .manual: return "MANUAL" - case .manualRebuild: return "MANUAL_REBUILD" - case .pullRequestOpen: return "PULL_REQUEST_OPEN" - case .pullRequestUpdate: return "PULL_REQUEST_UPDATE" - case .schedule: return "SCHEDULE" - case .unknown(let rawValue): return rawValue - } + public struct StartReason: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var gitRefChange: Self { + .init(rawValue: "GIT_REF_CHANGE") + } + + public static var manual: Self { + .init(rawValue: "MANUAL") + } + + public static var manualRebuild: Self { + .init(rawValue: "MANUAL_REBUILD") + } + + public static var pullRequestOpen: Self { + .init(rawValue: "PULL_REQUEST_OPEN") + } + + public static var pullRequestUpdate: Self { + .init(rawValue: "PULL_REQUEST_UPDATE") } + public static var schedule: Self { + .init(rawValue: "SCHEDULE") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "GIT_REF_CHANGE": self = .gitRefChange - case "MANUAL": self = .manual - case "MANUAL_REBUILD": self = .manualRebuild - case "PULL_REQUEST_OPEN": self = .pullRequestOpen - case "PULL_REQUEST_UPDATE": self = .pullRequestUpdate - case "SCHEDULE": self = .schedule - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } } - public struct Relationships: Hashable, Codable { + public struct Relationships: Hashable, Codable, Sendable { + public var actions: Actions? + public var builds: Builds? public var destinationBranch: DestinationBranch? @@ -247,6 +249,7 @@ public struct CiBuildRun: Hashable, Codable { public var workflow: Workflow? public init( + actions: Actions? = nil, builds: Builds? = nil, destinationBranch: DestinationBranch? = nil, product: Product? = nil, @@ -254,6 +257,7 @@ public struct CiBuildRun: Hashable, Codable { sourceBranchOrTag: SourceBranchOrTag? = nil, workflow: Workflow? = nil ) { + self.actions = actions self.builds = builds self.destinationBranch = destinationBranch self.product = product @@ -263,6 +267,7 @@ public struct CiBuildRun: Hashable, Codable { } private enum CodingKeys: String, CodingKey { + case actions case builds case destinationBranch case product @@ -271,16 +276,28 @@ public struct CiBuildRun: Hashable, Codable { case workflow } - public struct Builds: Hashable, Codable { + public struct Actions: Hashable, Codable, Sendable { + public var links: RelationshipLinks? + + public init(links: RelationshipLinks? = nil) { + self.links = links + } + + private enum CodingKeys: String, CodingKey { + case links + } + } + + public struct Builds: Hashable, Codable, Sendable { public var data: [Data]? - public var links: Links? + public var links: RelationshipLinks? public var meta: PagingInformation? public init( data: [Data]? = nil, - links: Links? = nil, + links: RelationshipLinks? = nil, meta: PagingInformation? = nil ) { self.data = data @@ -294,7 +311,7 @@ public struct CiBuildRun: Hashable, Codable { case meta } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -312,50 +329,24 @@ public struct CiBuildRun: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case builds } } - - public struct Links: Hashable, Codable { - public var related: URL? - - public var `self`: URL? - - public init( - related: URL? = nil, - self _self: URL? = nil - ) { - self.related = related - self.`self` = _self - } - - private enum CodingKeys: String, CodingKey { - case related - case `self` = "self" - } - } } - public struct DestinationBranch: Hashable, Codable { + public struct DestinationBranch: Hashable, Codable, Sendable { public var data: Data? - public var links: Links? - - public init( - data: Data? = nil, - links: Links? = nil - ) { + public init(data: Data? = nil) { self.data = data - self.links = links } private enum CodingKeys: String, CodingKey { case data - case links } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -373,50 +364,24 @@ public struct CiBuildRun: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case scmGitReferences } } - - public struct Links: Hashable, Codable { - public var related: URL? - - public var `self`: URL? - - public init( - related: URL? = nil, - self _self: URL? = nil - ) { - self.related = related - self.`self` = _self - } - - private enum CodingKeys: String, CodingKey { - case related - case `self` = "self" - } - } } - public struct Product: Hashable, Codable { + public struct Product: Hashable, Codable, Sendable { public var data: Data? - public var links: Links? - - public init( - data: Data? = nil, - links: Links? = nil - ) { + public init(data: Data? = nil) { self.data = data - self.links = links } private enum CodingKeys: String, CodingKey { case data - case links } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -434,50 +399,24 @@ public struct CiBuildRun: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case ciProducts } } - - public struct Links: Hashable, Codable { - public var related: URL? - - public var `self`: URL? - - public init( - related: URL? = nil, - self _self: URL? = nil - ) { - self.related = related - self.`self` = _self - } - - private enum CodingKeys: String, CodingKey { - case related - case `self` = "self" - } - } } - public struct PullRequest: Hashable, Codable { + public struct PullRequest: Hashable, Codable, Sendable { public var data: Data? - public var links: Links? - - public init( - data: Data? = nil, - links: Links? = nil - ) { + public init(data: Data? = nil) { self.data = data - self.links = links } private enum CodingKeys: String, CodingKey { case data - case links } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -495,50 +434,24 @@ public struct CiBuildRun: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case scmPullRequests } } - - public struct Links: Hashable, Codable { - public var related: URL? - - public var `self`: URL? - - public init( - related: URL? = nil, - self _self: URL? = nil - ) { - self.related = related - self.`self` = _self - } - - private enum CodingKeys: String, CodingKey { - case related - case `self` = "self" - } - } } - public struct SourceBranchOrTag: Hashable, Codable { + public struct SourceBranchOrTag: Hashable, Codable, Sendable { public var data: Data? - public var links: Links? - - public init( - data: Data? = nil, - links: Links? = nil - ) { + public init(data: Data? = nil) { self.data = data - self.links = links } private enum CodingKeys: String, CodingKey { case data - case links } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -556,50 +469,24 @@ public struct CiBuildRun: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case scmGitReferences } } - - public struct Links: Hashable, Codable { - public var related: URL? - - public var `self`: URL? - - public init( - related: URL? = nil, - self _self: URL? = nil - ) { - self.related = related - self.`self` = _self - } - - private enum CodingKeys: String, CodingKey { - case related - case `self` = "self" - } - } } - public struct Workflow: Hashable, Codable { + public struct Workflow: Hashable, Codable, Sendable { public var data: Data? - public var links: Links? - - public init( - data: Data? = nil, - links: Links? = nil - ) { + public init(data: Data? = nil) { self.data = data - self.links = links } private enum CodingKeys: String, CodingKey { case data - case links } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -617,29 +504,10 @@ public struct CiBuildRun: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case ciWorkflows } } - - public struct Links: Hashable, Codable { - public var related: URL? - - public var `self`: URL? - - public init( - related: URL? = nil, - self _self: URL? = nil - ) { - self.related = related - self.`self` = _self - } - - private enum CodingKeys: String, CodingKey { - case related - case `self` = "self" - } - } } } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/CiCompletionStatus.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/CiCompletionStatus.generated.swift index 0e15d9f7..df5b6e99 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/CiCompletionStatus.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/CiCompletionStatus.generated.swift @@ -3,34 +3,35 @@ // swiftlint:disable all import Foundation -public enum CiCompletionStatus: Hashable, Codable, RawRepresentable { - case canceled - case errored - case failed - case skipped - case succeeded - case unknown(String) - - public var rawValue: String { - switch self { - case .canceled: return "CANCELED" - case .errored: return "ERRORED" - case .failed: return "FAILED" - case .skipped: return "SKIPPED" - case .succeeded: return "SUCCEEDED" - case .unknown(let rawValue): return rawValue - } +public struct CiCompletionStatus: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var canceled: Self { + .init(rawValue: "CANCELED") } + public static var errored: Self { + .init(rawValue: "ERRORED") + } + + public static var failed: Self { + .init(rawValue: "FAILED") + } + + public static var skipped: Self { + .init(rawValue: "SKIPPED") + } + + public static var succeeded: Self { + .init(rawValue: "SUCCEEDED") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "CANCELED": self = .canceled - case "ERRORED": self = .errored - case "FAILED": self = .failed - case "SKIPPED": self = .skipped - case "SUCCEEDED": self = .succeeded - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/CiExecutionProgress.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/CiExecutionProgress.generated.swift index 48b7928d..3e79ac0c 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/CiExecutionProgress.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/CiExecutionProgress.generated.swift @@ -3,28 +3,27 @@ // swiftlint:disable all import Foundation -public enum CiExecutionProgress: Hashable, Codable, RawRepresentable { - case complete - case pending - case running - case unknown(String) - - public var rawValue: String { - switch self { - case .complete: return "COMPLETE" - case .pending: return "PENDING" - case .running: return "RUNNING" - case .unknown(let rawValue): return rawValue - } +public struct CiExecutionProgress: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var complete: Self { + .init(rawValue: "COMPLETE") } + public static var pending: Self { + .init(rawValue: "PENDING") + } + + public static var running: Self { + .init(rawValue: "RUNNING") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "COMPLETE": self = .complete - case "PENDING": self = .pending - case "RUNNING": self = .running - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/CiFilesAndFoldersRule.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/CiFilesAndFoldersRule.generated.swift index 6c23fa29..0c4c98f3 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/CiFilesAndFoldersRule.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/CiFilesAndFoldersRule.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct CiFilesAndFoldersRule: Hashable, Codable { +public struct CiFilesAndFoldersRule: Hashable, Codable, Sendable { public var matchers: [CiStartConditionFileMatcher]? public var mode: Mode? @@ -21,25 +21,23 @@ public struct CiFilesAndFoldersRule: Hashable, Codable { case mode } - public enum Mode: Hashable, Codable, RawRepresentable { - case doNotStartIfAllFilesMatch - case startIfAnyFileMatches - case unknown(String) - - public var rawValue: String { - switch self { - case .doNotStartIfAllFilesMatch: return "DO_NOT_START_IF_ALL_FILES_MATCH" - case .startIfAnyFileMatches: return "START_IF_ANY_FILE_MATCHES" - case .unknown(let rawValue): return rawValue - } + public struct Mode: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var doNotStartIfAllFilesMatch: Self { + .init(rawValue: "DO_NOT_START_IF_ALL_FILES_MATCH") } + public static var startIfAnyFileMatches: Self { + .init(rawValue: "START_IF_ANY_FILE_MATCHES") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "DO_NOT_START_IF_ALL_FILES_MATCH": self = .doNotStartIfAllFilesMatch - case "START_IF_ANY_FILE_MATCHES": self = .startIfAnyFileMatches - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/CiGitRefKind.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/CiGitRefKind.generated.swift index da8003d4..8c6d0b74 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/CiGitRefKind.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/CiGitRefKind.generated.swift @@ -3,25 +3,23 @@ // swiftlint:disable all import Foundation -public enum CiGitRefKind: Hashable, Codable, RawRepresentable { - case branch - case tag - case unknown(String) +public struct CiGitRefKind: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var branch: Self { + .init(rawValue: "BRANCH") + } + + public static var tag: Self { + .init(rawValue: "TAG") + } - public var rawValue: String { - switch self { - case .branch: return "BRANCH" - case .tag: return "TAG" - case .unknown(let rawValue): return rawValue - } + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "BRANCH": self = .branch - case "TAG": self = .tag - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/CiGitUser.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/CiGitUser.generated.swift index 171e7f33..14f6befd 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/CiGitUser.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/CiGitUser.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct CiGitUser: Hashable, Codable { +public struct CiGitUser: Hashable, Codable, Sendable { public var avatarUrl: URL? public var displayName: String? diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/CiIssue.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/CiIssue.generated.swift index e6f0c211..1f59c01b 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/CiIssue.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/CiIssue.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct CiIssue: Hashable, Codable { +public struct CiIssue: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -31,11 +31,11 @@ public struct CiIssue: Hashable, Codable { case links } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case ciIssues } - public struct Attributes: Hashable, Codable { + public struct Attributes: Hashable, Codable, Sendable { public var category: String? public var fileSource: FileLocation? @@ -63,31 +63,31 @@ public struct CiIssue: Hashable, Codable { case message } - public enum IssueType: Hashable, Codable, RawRepresentable { - case analyzerWarning - case error - case testFailure - case warning - case unknown(String) - - public var rawValue: String { - switch self { - case .analyzerWarning: return "ANALYZER_WARNING" - case .error: return "ERROR" - case .testFailure: return "TEST_FAILURE" - case .warning: return "WARNING" - case .unknown(let rawValue): return rawValue - } + public struct IssueType: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var analyzerWarning: Self { + .init(rawValue: "ANALYZER_WARNING") } + public static var error: Self { + .init(rawValue: "ERROR") + } + + public static var testFailure: Self { + .init(rawValue: "TEST_FAILURE") + } + + public static var warning: Self { + .init(rawValue: "WARNING") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "ANALYZER_WARNING": self = .analyzerWarning - case "ERROR": self = .error - case "TEST_FAILURE": self = .testFailure - case "WARNING": self = .warning - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/CiIssueCounts.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/CiIssueCounts.generated.swift index 819ae686..833c1dee 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/CiIssueCounts.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/CiIssueCounts.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct CiIssueCounts: Hashable, Codable { +public struct CiIssueCounts: Hashable, Codable, Sendable { public var analyzerWarnings: Int? public var errors: Int? diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/CiMacOsVersion.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/CiMacOsVersion.generated.swift index a0cab0fc..cb5b8e8d 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/CiMacOsVersion.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/CiMacOsVersion.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct CiMacOsVersion: Hashable, Codable { +public struct CiMacOsVersion: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -36,11 +36,11 @@ public struct CiMacOsVersion: Hashable, Codable { case links } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case ciMacOsVersions } - public struct Attributes: Hashable, Codable { + public struct Attributes: Hashable, Codable, Sendable { public var name: String? public var version: String? @@ -59,7 +59,7 @@ public struct CiMacOsVersion: Hashable, Codable { } } - public struct Relationships: Hashable, Codable { + public struct Relationships: Hashable, Codable, Sendable { public var xcodeVersions: XcodeVersions? public init(xcodeVersions: XcodeVersions? = nil) { @@ -70,16 +70,16 @@ public struct CiMacOsVersion: Hashable, Codable { case xcodeVersions } - public struct XcodeVersions: Hashable, Codable { + public struct XcodeVersions: Hashable, Codable, Sendable { public var data: [Data]? - public var links: Links? + public var links: RelationshipLinks? public var meta: PagingInformation? public init( data: [Data]? = nil, - links: Links? = nil, + links: RelationshipLinks? = nil, meta: PagingInformation? = nil ) { self.data = data @@ -93,7 +93,7 @@ public struct CiMacOsVersion: Hashable, Codable { case meta } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -111,29 +111,10 @@ public struct CiMacOsVersion: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case ciXcodeVersions } } - - public struct Links: Hashable, Codable { - public var related: URL? - - public var `self`: URL? - - public init( - related: URL? = nil, - self _self: URL? = nil - ) { - self.related = related - self.`self` = _self - } - - private enum CodingKeys: String, CodingKey { - case related - case `self` = "self" - } - } } } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/CiManualBranchStartCondition.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/CiManualBranchStartCondition.generated.swift new file mode 100644 index 00000000..d6e2fbe4 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/CiManualBranchStartCondition.generated.swift @@ -0,0 +1,18 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct CiManualBranchStartCondition: Hashable, Codable, Sendable { + public var source: CiBranchPatterns? + + public init(source: CiBranchPatterns? = nil) { + self.source = source + } + + private enum CodingKeys: String, CodingKey { + case source + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/CiManualPullRequestStartCondition.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/CiManualPullRequestStartCondition.generated.swift new file mode 100644 index 00000000..a05bd5e2 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/CiManualPullRequestStartCondition.generated.swift @@ -0,0 +1,25 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct CiManualPullRequestStartCondition: Hashable, Codable, Sendable { + public var destination: CiBranchPatterns? + + public var source: CiBranchPatterns? + + public init( + destination: CiBranchPatterns? = nil, + source: CiBranchPatterns? = nil + ) { + self.destination = destination + self.source = source + } + + private enum CodingKeys: String, CodingKey { + case destination + case source + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/CiManualTagStartCondition.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/CiManualTagStartCondition.generated.swift new file mode 100644 index 00000000..4195c4a8 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/CiManualTagStartCondition.generated.swift @@ -0,0 +1,18 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct CiManualTagStartCondition: Hashable, Codable, Sendable { + public var source: CiTagPatterns? + + public init(source: CiTagPatterns? = nil) { + self.source = source + } + + private enum CodingKeys: String, CodingKey { + case source + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/CiProduct.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/CiProduct.generated.swift index 90b882d6..958667a1 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/CiProduct.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/CiProduct.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct CiProduct: Hashable, Codable { +public struct CiProduct: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -36,11 +36,11 @@ public struct CiProduct: Hashable, Codable { case links } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case ciProducts } - public struct Attributes: Hashable, Codable { + public struct Attributes: Hashable, Codable, Sendable { public var createdDate: String? public var name: String? @@ -63,60 +63,85 @@ public struct CiProduct: Hashable, Codable { case productType } - public enum ProductType: Hashable, Codable, RawRepresentable { - case app - case framework - case unknown(String) - - public var rawValue: String { - switch self { - case .app: return "APP" - case .framework: return "FRAMEWORK" - case .unknown(let rawValue): return rawValue - } + public struct ProductType: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var app: Self { + .init(rawValue: "APP") + } + + public static var framework: Self { + .init(rawValue: "FRAMEWORK") } + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "APP": self = .app - case "FRAMEWORK": self = .framework - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } } - public struct Relationships: Hashable, Codable { + public struct Relationships: Hashable, Codable, Sendable { + public var additionalRepositories: AdditionalRepositories? + public var app: App? + public var buildRuns: BuildRuns? + public var bundleId: BundleId? public var primaryRepositories: PrimaryRepositories? + public var workflows: Workflows? + public init( + additionalRepositories: AdditionalRepositories? = nil, app: App? = nil, + buildRuns: BuildRuns? = nil, bundleId: BundleId? = nil, - primaryRepositories: PrimaryRepositories? = nil + primaryRepositories: PrimaryRepositories? = nil, + workflows: Workflows? = nil ) { + self.additionalRepositories = additionalRepositories self.app = app + self.buildRuns = buildRuns self.bundleId = bundleId self.primaryRepositories = primaryRepositories + self.workflows = workflows } private enum CodingKeys: String, CodingKey { + case additionalRepositories case app + case buildRuns case bundleId case primaryRepositories + case workflows } - public struct App: Hashable, Codable { + public struct AdditionalRepositories: Hashable, Codable, Sendable { + public var links: RelationshipLinks? + + public init(links: RelationshipLinks? = nil) { + self.links = links + } + + private enum CodingKeys: String, CodingKey { + case links + } + } + + public struct App: Hashable, Codable, Sendable { public var data: Data? - public var links: Links? + public var links: RelationshipLinks? public init( data: Data? = nil, - links: Links? = nil + links: RelationshipLinks? = nil ) { self.data = data self.links = links @@ -127,7 +152,7 @@ public struct CiProduct: Hashable, Codable { case links } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -145,50 +170,36 @@ public struct CiProduct: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case apps } } + } - public struct Links: Hashable, Codable { - public var related: URL? - - public var `self`: URL? + public struct BuildRuns: Hashable, Codable, Sendable { + public var links: RelationshipLinks? - public init( - related: URL? = nil, - self _self: URL? = nil - ) { - self.related = related - self.`self` = _self - } + public init(links: RelationshipLinks? = nil) { + self.links = links + } - private enum CodingKeys: String, CodingKey { - case related - case `self` = "self" - } + private enum CodingKeys: String, CodingKey { + case links } } - public struct BundleId: Hashable, Codable { + public struct BundleId: Hashable, Codable, Sendable { public var data: Data? - public var links: Links? - - public init( - data: Data? = nil, - links: Links? = nil - ) { + public init(data: Data? = nil) { self.data = data - self.links = links } private enum CodingKeys: String, CodingKey { case data - case links } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -206,41 +217,22 @@ public struct CiProduct: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case bundleIds } } - - public struct Links: Hashable, Codable { - public var related: URL? - - public var `self`: URL? - - public init( - related: URL? = nil, - self _self: URL? = nil - ) { - self.related = related - self.`self` = _self - } - - private enum CodingKeys: String, CodingKey { - case related - case `self` = "self" - } - } } - public struct PrimaryRepositories: Hashable, Codable { + public struct PrimaryRepositories: Hashable, Codable, Sendable { public var data: [Data]? - public var links: Links? + public var links: RelationshipLinks? public var meta: PagingInformation? public init( data: [Data]? = nil, - links: Links? = nil, + links: RelationshipLinks? = nil, meta: PagingInformation? = nil ) { self.data = data @@ -254,7 +246,7 @@ public struct CiProduct: Hashable, Codable { case meta } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -272,28 +264,21 @@ public struct CiProduct: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case scmRepositories } } + } - public struct Links: Hashable, Codable { - public var related: URL? - - public var `self`: URL? + public struct Workflows: Hashable, Codable, Sendable { + public var links: RelationshipLinks? - public init( - related: URL? = nil, - self _self: URL? = nil - ) { - self.related = related - self.`self` = _self - } + public init(links: RelationshipLinks? = nil) { + self.links = links + } - private enum CodingKeys: String, CodingKey { - case related - case `self` = "self" - } + private enum CodingKeys: String, CodingKey { + case links } } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/CiPullRequestStartCondition.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/CiPullRequestStartCondition.generated.swift index b7ac03c9..87dbed54 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/CiPullRequestStartCondition.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/CiPullRequestStartCondition.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct CiPullRequestStartCondition: Hashable, Codable { +public struct CiPullRequestStartCondition: Hashable, Codable, Sendable { public var autoCancel: Bool? public var destination: CiBranchPatterns? diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/CiScheduledStartCondition.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/CiScheduledStartCondition.generated.swift index e4e4e621..3dad54ab 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/CiScheduledStartCondition.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/CiScheduledStartCondition.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct CiScheduledStartCondition: Hashable, Codable { +public struct CiScheduledStartCondition: Hashable, Codable, Sendable { public var schedule: Schedule? public var source: CiBranchPatterns? @@ -21,7 +21,7 @@ public struct CiScheduledStartCondition: Hashable, Codable { case source } - public struct Schedule: Hashable, Codable { + public struct Schedule: Hashable, Codable, Sendable { public var days: [Days]? public var frequency: Frequency? @@ -54,65 +54,67 @@ public struct CiScheduledStartCondition: Hashable, Codable { case timezone } - public enum Days: Hashable, Codable, RawRepresentable { - case friday - case monday - case saturday - case sunday - case thursday - case tuesday - case wednesday - case unknown(String) - - public var rawValue: String { - switch self { - case .friday: return "FRIDAY" - case .monday: return "MONDAY" - case .saturday: return "SATURDAY" - case .sunday: return "SUNDAY" - case .thursday: return "THURSDAY" - case .tuesday: return "TUESDAY" - case .wednesday: return "WEDNESDAY" - case .unknown(let rawValue): return rawValue - } + public struct Days: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var friday: Self { + .init(rawValue: "FRIDAY") } + public static var monday: Self { + .init(rawValue: "MONDAY") + } + + public static var saturday: Self { + .init(rawValue: "SATURDAY") + } + + public static var sunday: Self { + .init(rawValue: "SUNDAY") + } + + public static var thursday: Self { + .init(rawValue: "THURSDAY") + } + + public static var tuesday: Self { + .init(rawValue: "TUESDAY") + } + + public static var wednesday: Self { + .init(rawValue: "WEDNESDAY") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "FRIDAY": self = .friday - case "MONDAY": self = .monday - case "SATURDAY": self = .saturday - case "SUNDAY": self = .sunday - case "THURSDAY": self = .thursday - case "TUESDAY": self = .tuesday - case "WEDNESDAY": self = .wednesday - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum Frequency: Hashable, Codable, RawRepresentable { - case daily - case hourly - case weekly - case unknown(String) - - public var rawValue: String { - switch self { - case .daily: return "DAILY" - case .hourly: return "HOURLY" - case .weekly: return "WEEKLY" - case .unknown(let rawValue): return rawValue - } + public struct Frequency: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var daily: Self { + .init(rawValue: "DAILY") + } + + public static var hourly: Self { + .init(rawValue: "HOURLY") } + public static var weekly: Self { + .init(rawValue: "WEEKLY") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "DAILY": self = .daily - case "HOURLY": self = .hourly - case "WEEKLY": self = .weekly - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/CiStartConditionFileMatcher.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/CiStartConditionFileMatcher.generated.swift index 44363d9c..ebfc7d63 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/CiStartConditionFileMatcher.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/CiStartConditionFileMatcher.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct CiStartConditionFileMatcher: Hashable, Codable { +public struct CiStartConditionFileMatcher: Hashable, Codable, Sendable { public var directory: String? public var fileExtension: String? diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/CiTagPatterns.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/CiTagPatterns.generated.swift index 30254874..0630de14 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/CiTagPatterns.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/CiTagPatterns.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct CiTagPatterns: Hashable, Codable { +public struct CiTagPatterns: Hashable, Codable, Sendable { public var isAllMatch: Bool? public var patterns: [Patterns]? @@ -21,7 +21,7 @@ public struct CiTagPatterns: Hashable, Codable { case patterns } - public struct Patterns: Hashable, Codable { + public struct Patterns: Hashable, Codable, Sendable { public var isPrefix: Bool? public var pattern: String? diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/CiTagStartCondition.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/CiTagStartCondition.generated.swift index e1d976e2..f4690d5d 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/CiTagStartCondition.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/CiTagStartCondition.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct CiTagStartCondition: Hashable, Codable { +public struct CiTagStartCondition: Hashable, Codable, Sendable { public var autoCancel: Bool? public var filesAndFoldersRule: CiFilesAndFoldersRule? diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/CiTestDestination.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/CiTestDestination.generated.swift index 6304da62..16878b21 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/CiTestDestination.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/CiTestDestination.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct CiTestDestination: Hashable, Codable { +public struct CiTestDestination: Hashable, Codable, Sendable { public var deviceTypeIdentifier: String? public var deviceTypeName: String? diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/CiTestDestinationKind.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/CiTestDestinationKind.generated.swift index 39d4ed93..724452da 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/CiTestDestinationKind.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/CiTestDestinationKind.generated.swift @@ -3,25 +3,23 @@ // swiftlint:disable all import Foundation -public enum CiTestDestinationKind: Hashable, Codable, RawRepresentable { - case mac - case simulator - case unknown(String) +public struct CiTestDestinationKind: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var mac: Self { + .init(rawValue: "MAC") + } + + public static var simulator: Self { + .init(rawValue: "SIMULATOR") + } - public var rawValue: String { - switch self { - case .mac: return "MAC" - case .simulator: return "SIMULATOR" - case .unknown(let rawValue): return rawValue - } + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "MAC": self = .mac - case "SIMULATOR": self = .simulator - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/CiTestResult.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/CiTestResult.generated.swift index e26e7559..4db013ce 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/CiTestResult.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/CiTestResult.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct CiTestResult: Hashable, Codable { +public struct CiTestResult: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -31,11 +31,11 @@ public struct CiTestResult: Hashable, Codable { case links } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case ciTestResults } - public struct Attributes: Hashable, Codable { + public struct Attributes: Hashable, Codable, Sendable { public var className: String? public var destinationTestResults: [DestinationTestResults]? @@ -73,7 +73,7 @@ public struct CiTestResult: Hashable, Codable { case status } - public struct DestinationTestResults: Hashable, Codable { + public struct DestinationTestResults: Hashable, Codable, Sendable { public var deviceName: String? public var duration: Float? diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/CiTestStatus.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/CiTestStatus.generated.swift index 3950515e..33ff9312 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/CiTestStatus.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/CiTestStatus.generated.swift @@ -3,34 +3,35 @@ // swiftlint:disable all import Foundation -public enum CiTestStatus: Hashable, Codable, RawRepresentable { - case expectedFailure - case failure - case mixed - case skipped - case success - case unknown(String) - - public var rawValue: String { - switch self { - case .expectedFailure: return "EXPECTED_FAILURE" - case .failure: return "FAILURE" - case .mixed: return "MIXED" - case .skipped: return "SKIPPED" - case .success: return "SUCCESS" - case .unknown(let rawValue): return rawValue - } +public struct CiTestStatus: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var expectedFailure: Self { + .init(rawValue: "EXPECTED_FAILURE") } + public static var failure: Self { + .init(rawValue: "FAILURE") + } + + public static var mixed: Self { + .init(rawValue: "MIXED") + } + + public static var skipped: Self { + .init(rawValue: "SKIPPED") + } + + public static var success: Self { + .init(rawValue: "SUCCESS") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "EXPECTED_FAILURE": self = .expectedFailure - case "FAILURE": self = .failure - case "MIXED": self = .mixed - case "SKIPPED": self = .skipped - case "SUCCESS": self = .success - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/CiWorkflow.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/CiWorkflow.generated.swift index 183f2889..0aa6d35b 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/CiWorkflow.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/CiWorkflow.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct CiWorkflow: Hashable, Codable { +public struct CiWorkflow: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -36,11 +36,11 @@ public struct CiWorkflow: Hashable, Codable { case links } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case ciWorkflows } - public struct Attributes: Hashable, Codable { + public struct Attributes: Hashable, Codable, Sendable { public var actions: [CiAction]? public var branchStartCondition: CiBranchStartCondition? @@ -57,6 +57,12 @@ public struct CiWorkflow: Hashable, Codable { public var lastModifiedDate: String? + public var manualBranchStartCondition: CiManualBranchStartCondition? + + public var manualPullRequestStartCondition: CiManualPullRequestStartCondition? + + public var manualTagStartCondition: CiManualTagStartCondition? + public var name: String? public var pullRequestStartCondition: CiPullRequestStartCondition? @@ -74,6 +80,9 @@ public struct CiWorkflow: Hashable, Codable { isEnabled: Bool? = nil, isLockedForEditing: Bool? = nil, lastModifiedDate: String? = nil, + manualBranchStartCondition: CiManualBranchStartCondition? = nil, + manualPullRequestStartCondition: CiManualPullRequestStartCondition? = nil, + manualTagStartCondition: CiManualTagStartCondition? = nil, name: String? = nil, pullRequestStartCondition: CiPullRequestStartCondition? = nil, scheduledStartCondition: CiScheduledStartCondition? = nil, @@ -87,6 +96,9 @@ public struct CiWorkflow: Hashable, Codable { self.isEnabled = isEnabled self.isLockedForEditing = isLockedForEditing self.lastModifiedDate = lastModifiedDate + self.manualBranchStartCondition = manualBranchStartCondition + self.manualPullRequestStartCondition = manualPullRequestStartCondition + self.manualTagStartCondition = manualTagStartCondition self.name = name self.pullRequestStartCondition = pullRequestStartCondition self.scheduledStartCondition = scheduledStartCondition @@ -102,6 +114,9 @@ public struct CiWorkflow: Hashable, Codable { case isEnabled case isLockedForEditing case lastModifiedDate + case manualBranchStartCondition + case manualPullRequestStartCondition + case manualTagStartCondition case name case pullRequestStartCondition case scheduledStartCondition @@ -109,7 +124,9 @@ public struct CiWorkflow: Hashable, Codable { } } - public struct Relationships: Hashable, Codable { + public struct Relationships: Hashable, Codable, Sendable { + public var buildRuns: BuildRuns? + public var macOsVersion: MacOsVersion? public var product: Product? @@ -119,11 +136,13 @@ public struct CiWorkflow: Hashable, Codable { public var xcodeVersion: XcodeVersion? public init( + buildRuns: BuildRuns? = nil, macOsVersion: MacOsVersion? = nil, product: Product? = nil, repository: Repository? = nil, xcodeVersion: XcodeVersion? = nil ) { + self.buildRuns = buildRuns self.macOsVersion = macOsVersion self.product = product self.repository = repository @@ -131,31 +150,37 @@ public struct CiWorkflow: Hashable, Codable { } private enum CodingKeys: String, CodingKey { + case buildRuns case macOsVersion case product case repository case xcodeVersion } - public struct MacOsVersion: Hashable, Codable { - public var data: Data? + public struct BuildRuns: Hashable, Codable, Sendable { + public var links: RelationshipLinks? - public var links: Links? + public init(links: RelationshipLinks? = nil) { + self.links = links + } - public init( - data: Data? = nil, - links: Links? = nil - ) { + private enum CodingKeys: String, CodingKey { + case links + } + } + + public struct MacOsVersion: Hashable, Codable, Sendable { + public var data: Data? + + public init(data: Data? = nil) { self.data = data - self.links = links } private enum CodingKeys: String, CodingKey { case data - case links } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -173,50 +198,24 @@ public struct CiWorkflow: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case ciMacOsVersions } } - - public struct Links: Hashable, Codable { - public var related: URL? - - public var `self`: URL? - - public init( - related: URL? = nil, - self _self: URL? = nil - ) { - self.related = related - self.`self` = _self - } - - private enum CodingKeys: String, CodingKey { - case related - case `self` = "self" - } - } } - public struct Product: Hashable, Codable { + public struct Product: Hashable, Codable, Sendable { public var data: Data? - public var links: Links? - - public init( - data: Data? = nil, - links: Links? = nil - ) { + public init(data: Data? = nil) { self.data = data - self.links = links } private enum CodingKeys: String, CodingKey { case data - case links } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -234,39 +233,20 @@ public struct CiWorkflow: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case ciProducts } } - - public struct Links: Hashable, Codable { - public var related: URL? - - public var `self`: URL? - - public init( - related: URL? = nil, - self _self: URL? = nil - ) { - self.related = related - self.`self` = _self - } - - private enum CodingKeys: String, CodingKey { - case related - case `self` = "self" - } - } } - public struct Repository: Hashable, Codable { + public struct Repository: Hashable, Codable, Sendable { public var data: Data? - public var links: Links? + public var links: RelationshipLinks? public init( data: Data? = nil, - links: Links? = nil + links: RelationshipLinks? = nil ) { self.data = data self.links = links @@ -277,7 +257,7 @@ public struct CiWorkflow: Hashable, Codable { case links } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -295,50 +275,24 @@ public struct CiWorkflow: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case scmRepositories } } - - public struct Links: Hashable, Codable { - public var related: URL? - - public var `self`: URL? - - public init( - related: URL? = nil, - self _self: URL? = nil - ) { - self.related = related - self.`self` = _self - } - - private enum CodingKeys: String, CodingKey { - case related - case `self` = "self" - } - } } - public struct XcodeVersion: Hashable, Codable { + public struct XcodeVersion: Hashable, Codable, Sendable { public var data: Data? - public var links: Links? - - public init( - data: Data? = nil, - links: Links? = nil - ) { + public init(data: Data? = nil) { self.data = data - self.links = links } private enum CodingKeys: String, CodingKey { case data - case links } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -356,29 +310,10 @@ public struct CiWorkflow: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case ciXcodeVersions } } - - public struct Links: Hashable, Codable { - public var related: URL? - - public var `self`: URL? - - public init( - related: URL? = nil, - self _self: URL? = nil - ) { - self.related = related - self.`self` = _self - } - - private enum CodingKeys: String, CodingKey { - case related - case `self` = "self" - } - } } } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/CiXcodeVersion.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/CiXcodeVersion.generated.swift index 18441f96..27f14fd0 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/CiXcodeVersion.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/CiXcodeVersion.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct CiXcodeVersion: Hashable, Codable { +public struct CiXcodeVersion: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -36,11 +36,11 @@ public struct CiXcodeVersion: Hashable, Codable { case links } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case ciXcodeVersions } - public struct Attributes: Hashable, Codable { + public struct Attributes: Hashable, Codable, Sendable { public var name: String? public var testDestinations: [TestDestinations]? @@ -63,7 +63,7 @@ public struct CiXcodeVersion: Hashable, Codable { case version } - public struct TestDestinations: Hashable, Codable { + public struct TestDestinations: Hashable, Codable, Sendable { public var availableRuntimes: [AvailableRuntimes]? public var deviceTypeIdentifier: String? @@ -91,7 +91,7 @@ public struct CiXcodeVersion: Hashable, Codable { case kind } - public struct AvailableRuntimes: Hashable, Codable { + public struct AvailableRuntimes: Hashable, Codable, Sendable { public var runtimeIdentifier: String? public var runtimeName: String? @@ -112,7 +112,7 @@ public struct CiXcodeVersion: Hashable, Codable { } } - public struct Relationships: Hashable, Codable { + public struct Relationships: Hashable, Codable, Sendable { public var macOsVersions: MacOsVersions? public init(macOsVersions: MacOsVersions? = nil) { @@ -123,16 +123,16 @@ public struct CiXcodeVersion: Hashable, Codable { case macOsVersions } - public struct MacOsVersions: Hashable, Codable { + public struct MacOsVersions: Hashable, Codable, Sendable { public var data: [Data]? - public var links: Links? + public var links: RelationshipLinks? public var meta: PagingInformation? public init( data: [Data]? = nil, - links: Links? = nil, + links: RelationshipLinks? = nil, meta: PagingInformation? = nil ) { self.data = data @@ -146,7 +146,7 @@ public struct CiXcodeVersion: Hashable, Codable { case meta } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -164,29 +164,10 @@ public struct CiXcodeVersion: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case ciMacOsVersions } } - - public struct Links: Hashable, Codable { - public var related: URL? - - public var `self`: URL? - - public init( - related: URL? = nil, - self _self: URL? = nil - ) { - self.related = related - self.`self` = _self - } - - private enum CodingKeys: String, CodingKey { - case related - case `self` = "self" - } - } } } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/CustomerReview.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/CustomerReview.generated.swift index fcbb4cde..6b22dfbd 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/CustomerReview.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/CustomerReview.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct CustomerReview: Hashable, Codable { +public struct CustomerReview: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -36,11 +36,11 @@ public struct CustomerReview: Hashable, Codable { case links } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case customerReviews } - public struct Attributes: Hashable, Codable { + public struct Attributes: Hashable, Codable, Sendable { public var body: String? public var createdDate: String? @@ -79,7 +79,7 @@ public struct CustomerReview: Hashable, Codable { } } - public struct Relationships: Hashable, Codable { + public struct Relationships: Hashable, Codable, Sendable { public var response: Response? public init(response: Response? = nil) { @@ -90,14 +90,14 @@ public struct CustomerReview: Hashable, Codable { case response } - public struct Response: Hashable, Codable { + public struct Response: Hashable, Codable, Sendable { public var data: Data? - public var links: Links? + public var links: RelationshipLinks? public init( data: Data? = nil, - links: Links? = nil + links: RelationshipLinks? = nil ) { self.data = data self.links = links @@ -108,7 +108,7 @@ public struct CustomerReview: Hashable, Codable { case links } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -126,29 +126,10 @@ public struct CustomerReview: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case customerReviewResponses } } - - public struct Links: Hashable, Codable { - public var related: URL? - - public var `self`: URL? - - public init( - related: URL? = nil, - self _self: URL? = nil - ) { - self.related = related - self.`self` = _self - } - - private enum CodingKeys: String, CodingKey { - case related - case `self` = "self" - } - } } } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/CustomerReviewResponseV1.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/CustomerReviewResponseV1.generated.swift index 093ae280..d4a08485 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/CustomerReviewResponseV1.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/CustomerReviewResponseV1.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct CustomerReviewResponseV1: Hashable, Codable { +public struct CustomerReviewResponseV1: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -36,11 +36,11 @@ public struct CustomerReviewResponseV1: Hashable, Codable { case links } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case customerReviewResponses } - public struct Attributes: Hashable, Codable { + public struct Attributes: Hashable, Codable, Sendable { public var lastModifiedDate: String? public var responseBody: String? @@ -63,30 +63,28 @@ public struct CustomerReviewResponseV1: Hashable, Codable { case state } - public enum State: Hashable, Codable, RawRepresentable { - case pendingPublish - case published - case unknown(String) + public struct State: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var pendingPublish: Self { + .init(rawValue: "PENDING_PUBLISH") + } - public var rawValue: String { - switch self { - case .pendingPublish: return "PENDING_PUBLISH" - case .published: return "PUBLISHED" - case .unknown(let rawValue): return rawValue - } + public static var published: Self { + .init(rawValue: "PUBLISHED") } + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "PENDING_PUBLISH": self = .pendingPublish - case "PUBLISHED": self = .published - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } } - public struct Relationships: Hashable, Codable { + public struct Relationships: Hashable, Codable, Sendable { public var review: Review? public init(review: Review? = nil) { @@ -97,25 +95,18 @@ public struct CustomerReviewResponseV1: Hashable, Codable { case review } - public struct Review: Hashable, Codable { + public struct Review: Hashable, Codable, Sendable { public var data: Data? - public var links: Links? - - public init( - data: Data? = nil, - links: Links? = nil - ) { + public init(data: Data? = nil) { self.data = data - self.links = links } private enum CodingKeys: String, CodingKey { case data - case links } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -133,29 +124,10 @@ public struct CustomerReviewResponseV1: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case customerReviews } } - - public struct Links: Hashable, Codable { - public var related: URL? - - public var `self`: URL? - - public init( - related: URL? = nil, - self _self: URL? = nil - ) { - self.related = related - self.`self` = _self - } - - private enum CodingKeys: String, CodingKey { - case related - case `self` = "self" - } - } } } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/CustomerReviewSummarization.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/CustomerReviewSummarization.generated.swift new file mode 100644 index 00000000..b91f7492 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/CustomerReviewSummarization.generated.swift @@ -0,0 +1,120 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct CustomerReviewSummarization: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public var attributes: Attributes? + + public var relationships: Relationships? + + public var links: ResourceLinks? + + public init( + id: String, + type: `Type`, + attributes: Attributes? = nil, + relationships: Relationships? = nil, + links: ResourceLinks? = nil + ) { + self.id = id + self.type = type + self.attributes = attributes + self.relationships = relationships + self.links = links + } + + private enum CodingKeys: String, CodingKey { + case id + case type + case attributes + case relationships + case links + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case customerReviewSummarizations + } + + public struct Attributes: Hashable, Codable, Sendable { + public var createdDate: String? + + public var locale: String? + + public var platform: Platform? + + public var text: String? + + public init( + createdDate: String? = nil, + locale: String? = nil, + platform: Platform? = nil, + text: String? = nil + ) { + self.createdDate = createdDate + self.locale = locale + self.platform = platform + self.text = text + } + + private enum CodingKeys: String, CodingKey { + case createdDate + case locale + case platform + case text + } + } + + public struct Relationships: Hashable, Codable, Sendable { + public var territory: Territory? + + public init(territory: Territory? = nil) { + self.territory = territory + } + + private enum CodingKeys: String, CodingKey { + case territory + } + + public struct Territory: Hashable, Codable, Sendable { + public var data: Data? + + public init(data: Data? = nil) { + self.data = data + } + + private enum CodingKeys: String, CodingKey { + case data + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case territories + } + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/DeliveryFileUploadOperation.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/DeliveryFileUploadOperation.generated.swift new file mode 100644 index 00000000..61e3c9c6 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/DeliveryFileUploadOperation.generated.swift @@ -0,0 +1,55 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct DeliveryFileUploadOperation: Hashable, Codable, Sendable { + public var entityTag: String? + + public var expiration: String? + + public var length: Int? + + public var method: String? + + public var offset: Int? + + public var partNumber: Int? + + public var requestHeaders: [HttpHeader]? + + public var url: String? + + public init( + entityTag: String? = nil, + expiration: String? = nil, + length: Int? = nil, + method: String? = nil, + offset: Int? = nil, + partNumber: Int? = nil, + requestHeaders: [HttpHeader]? = nil, + url: String? = nil + ) { + self.entityTag = entityTag + self.expiration = expiration + self.length = length + self.method = method + self.offset = offset + self.partNumber = partNumber + self.requestHeaders = requestHeaders + self.url = url + } + + private enum CodingKeys: String, CodingKey { + case entityTag + case expiration + case length + case method + case offset + case partNumber + case requestHeaders + case url + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Device.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Device.generated.swift index d916e28e..acd04999 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Device.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Device.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct Device: Hashable, Codable { +public struct Device: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -31,11 +31,11 @@ public struct Device: Hashable, Codable { case links } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case devices } - public struct Attributes: Hashable, Codable { + public struct Attributes: Hashable, Codable, Sendable { public var addedDate: String? public var deviceClass: DeviceClass? @@ -78,59 +78,63 @@ public struct Device: Hashable, Codable { case udid } - public enum DeviceClass: Hashable, Codable, RawRepresentable { - case appleTv - case appleWatch - case ipad - case iphone - case ipod - case mac - case unknown(String) - - public var rawValue: String { - switch self { - case .appleTv: return "APPLE_TV" - case .appleWatch: return "APPLE_WATCH" - case .ipad: return "IPAD" - case .iphone: return "IPHONE" - case .ipod: return "IPOD" - case .mac: return "MAC" - case .unknown(let rawValue): return rawValue - } + public struct DeviceClass: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var appleTv: Self { + .init(rawValue: "APPLE_TV") } + public static var appleVisionPro: Self { + .init(rawValue: "APPLE_VISION_PRO") + } + + public static var appleWatch: Self { + .init(rawValue: "APPLE_WATCH") + } + + public static var ipad: Self { + .init(rawValue: "IPAD") + } + + public static var iphone: Self { + .init(rawValue: "IPHONE") + } + + public static var ipod: Self { + .init(rawValue: "IPOD") + } + + public static var mac: Self { + .init(rawValue: "MAC") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "APPLE_TV": self = .appleTv - case "APPLE_WATCH": self = .appleWatch - case "IPAD": self = .ipad - case "IPHONE": self = .iphone - case "IPOD": self = .ipod - case "MAC": self = .mac - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum Status: Hashable, Codable, RawRepresentable { - case disabled - case enabled - case unknown(String) - - public var rawValue: String { - switch self { - case .disabled: return "DISABLED" - case .enabled: return "ENABLED" - case .unknown(let rawValue): return rawValue - } + public struct Status: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var disabled: Self { + .init(rawValue: "DISABLED") } + public static var enabled: Self { + .init(rawValue: "ENABLED") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "DISABLED": self = .disabled - case "ENABLED": self = .enabled - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/DeviceConnectionType.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/DeviceConnectionType.generated.swift new file mode 100644 index 00000000..926cae56 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/DeviceConnectionType.generated.swift @@ -0,0 +1,38 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct DeviceConnectionType: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var mobileData: Self { + .init(rawValue: "MOBILE_DATA") + } + + public static var none: Self { + .init(rawValue: "NONE") + } + + public static var unknown: Self { + .init(rawValue: "UNKNOWN") + } + + public static var wifi: Self { + .init(rawValue: "WIFI") + } + + public static var wire: Self { + .init(rawValue: "WIRE") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/DeviceFamily.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/DeviceFamily.generated.swift new file mode 100644 index 00000000..7aaec22c --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/DeviceFamily.generated.swift @@ -0,0 +1,42 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct DeviceFamily: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var appleTv: Self { + .init(rawValue: "APPLE_TV") + } + + public static var appleWatch: Self { + .init(rawValue: "APPLE_WATCH") + } + + public static var ipad: Self { + .init(rawValue: "IPAD") + } + + public static var iphone: Self { + .init(rawValue: "IPHONE") + } + + public static var mac: Self { + .init(rawValue: "MAC") + } + + public static var vision: Self { + .init(rawValue: "VISION") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/DeviceFamilyOsVersionFilter.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/DeviceFamilyOsVersionFilter.generated.swift new file mode 100644 index 00000000..1948baa5 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/DeviceFamilyOsVersionFilter.generated.swift @@ -0,0 +1,30 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct DeviceFamilyOsVersionFilter: Hashable, Codable, Sendable { + public var deviceFamily: DeviceFamily? + + public var maximumOsInclusive: String? + + public var minimumOsInclusive: String? + + public init( + deviceFamily: DeviceFamily? = nil, + maximumOsInclusive: String? = nil, + minimumOsInclusive: String? = nil + ) { + self.deviceFamily = deviceFamily + self.maximumOsInclusive = maximumOsInclusive + self.minimumOsInclusive = minimumOsInclusive + } + + private enum CodingKeys: String, CodingKey { + case deviceFamily + case maximumOsInclusive + case minimumOsInclusive + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/DiagnosticInsight.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/DiagnosticInsight.generated.swift new file mode 100644 index 00000000..4b5c62b2 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/DiagnosticInsight.generated.swift @@ -0,0 +1,49 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct DiagnosticInsight: Hashable, Codable, Sendable { + public var direction: DiagnosticInsightDirection? + + public var insightType: DiagnosticInsightType? + + public var referenceVersions: [ReferenceVersions]? + + public init( + direction: DiagnosticInsightDirection? = nil, + insightType: DiagnosticInsightType? = nil, + referenceVersions: [ReferenceVersions]? = nil + ) { + self.direction = direction + self.insightType = insightType + self.referenceVersions = referenceVersions + } + + private enum CodingKeys: String, CodingKey { + case direction + case insightType + case referenceVersions + } + + public struct ReferenceVersions: Hashable, Codable, Sendable { + public var value: Float? + + public var version: String? + + public init( + value: Float? = nil, + version: String? = nil + ) { + self.value = value + self.version = version + } + + private enum CodingKeys: String, CodingKey { + case value + case version + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/DiagnosticInsightDirection.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/DiagnosticInsightDirection.generated.swift new file mode 100644 index 00000000..efa1d9d4 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/DiagnosticInsightDirection.generated.swift @@ -0,0 +1,30 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct DiagnosticInsightDirection: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var down: Self { + .init(rawValue: "DOWN") + } + + public static var undefined: Self { + .init(rawValue: "UNDEFINED") + } + + public static var up: Self { + .init(rawValue: "UP") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/DiagnosticInsightType.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/DiagnosticInsightType.generated.swift new file mode 100644 index 00000000..241ca91a --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/DiagnosticInsightType.generated.swift @@ -0,0 +1,22 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct DiagnosticInsightType: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var trend: Self { + .init(rawValue: "TREND") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/DiagnosticLog.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/DiagnosticLog.generated.swift index e3da2c79..d774f9e7 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/DiagnosticLog.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/DiagnosticLog.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct DiagnosticLog: Hashable, Codable { +public struct DiagnosticLog: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -26,7 +26,7 @@ public struct DiagnosticLog: Hashable, Codable { case links } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case diagnosticLogs } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/DiagnosticLogCallStackNode.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/DiagnosticLogCallStackNode.generated.swift index 86947e9b..21ad4792 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/DiagnosticLogCallStackNode.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/DiagnosticLogCallStackNode.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct DiagnosticLogCallStackNode: Hashable, Codable { +public struct DiagnosticLogCallStackNode: Hashable, Codable, Sendable { public var address: String? public var binaryName: String? diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/DiagnosticSignature.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/DiagnosticSignature.generated.swift index 992cc692..fb7f94e3 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/DiagnosticSignature.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/DiagnosticSignature.generated.swift @@ -3,24 +3,28 @@ // swiftlint:disable all import Foundation -public struct DiagnosticSignature: Hashable, Codable { +public struct DiagnosticSignature: Hashable, Codable, Sendable { public var id: String public var type: `Type` public var attributes: Attributes? + public var relationships: Relationships? + public var links: ResourceLinks? public init( id: String, type: `Type`, attributes: Attributes? = nil, + relationships: Relationships? = nil, links: ResourceLinks? = nil ) { self.id = id self.type = type self.attributes = attributes + self.relationships = relationships self.links = links } @@ -28,55 +32,87 @@ public struct DiagnosticSignature: Hashable, Codable { case id case type case attributes + case relationships case links } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case diagnosticSignatures } - public struct Attributes: Hashable, Codable { + public struct Attributes: Hashable, Codable, Sendable { public var diagnosticType: DiagnosticType? + public var insight: DiagnosticInsight? + public var signature: String? public var weight: Float? public init( diagnosticType: DiagnosticType? = nil, + insight: DiagnosticInsight? = nil, signature: String? = nil, weight: Float? = nil ) { self.diagnosticType = diagnosticType + self.insight = insight self.signature = signature self.weight = weight } private enum CodingKeys: String, CodingKey { case diagnosticType + case insight case signature case weight } - public enum DiagnosticType: Hashable, Codable, RawRepresentable { - case diskWrites - case hangs - case unknown(String) - - public var rawValue: String { - switch self { - case .diskWrites: return "DISK_WRITES" - case .hangs: return "HANGS" - case .unknown(let rawValue): return rawValue - } + public struct DiagnosticType: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var diskWrites: Self { + .init(rawValue: "DISK_WRITES") + } + + public static var hangs: Self { + .init(rawValue: "HANGS") + } + + public static var launches: Self { + .init(rawValue: "LAUNCHES") } + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "DISK_WRITES": self = .diskWrites - case "HANGS": self = .hangs - default: self = .unknown(rawValue) - } + self.rawValue = rawValue + } + } + } + + public struct Relationships: Hashable, Codable, Sendable { + public var logs: Logs? + + public init(logs: Logs? = nil) { + self.logs = logs + } + + private enum CodingKeys: String, CodingKey { + case logs + } + + public struct Logs: Hashable, Codable, Sendable { + public var links: RelationshipLinks? + + public init(links: RelationshipLinks? = nil) { + self.links = links + } + + private enum CodingKeys: String, CodingKey { + case links } } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/DocumentLinks.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/DocumentLinks.generated.swift index 976151db..66c7366e 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/DocumentLinks.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/DocumentLinks.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct DocumentLinks: Hashable, Codable { +public struct DocumentLinks: Hashable, Codable, Sendable { public var `self`: URL public init(self _self: URL) { diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/EndAppAvailabilityPreOrder.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/EndAppAvailabilityPreOrder.generated.swift index 2451a749..55200220 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/EndAppAvailabilityPreOrder.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/EndAppAvailabilityPreOrder.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct EndAppAvailabilityPreOrder: Hashable, Codable { +public struct EndAppAvailabilityPreOrder: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -26,7 +26,7 @@ public struct EndAppAvailabilityPreOrder: Hashable, Codable { case links } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case endAppAvailabilityPreOrders } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/EndUserLicenseAgreement.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/EndUserLicenseAgreement.generated.swift index c3fc72de..467d4c9c 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/EndUserLicenseAgreement.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/EndUserLicenseAgreement.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct EndUserLicenseAgreement: Hashable, Codable { +public struct EndUserLicenseAgreement: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -36,11 +36,11 @@ public struct EndUserLicenseAgreement: Hashable, Codable { case links } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case endUserLicenseAgreements } - public struct Attributes: Hashable, Codable { + public struct Attributes: Hashable, Codable, Sendable { public var agreementText: String? public init(agreementText: String? = nil) { @@ -52,7 +52,7 @@ public struct EndUserLicenseAgreement: Hashable, Codable { } } - public struct Relationships: Hashable, Codable { + public struct Relationships: Hashable, Codable, Sendable { public var app: App? public var territories: Territories? @@ -70,25 +70,18 @@ public struct EndUserLicenseAgreement: Hashable, Codable { case territories } - public struct App: Hashable, Codable { + public struct App: Hashable, Codable, Sendable { public var data: Data? - public var links: Links? - - public init( - data: Data? = nil, - links: Links? = nil - ) { + public init(data: Data? = nil) { self.data = data - self.links = links } private enum CodingKeys: String, CodingKey { case data - case links } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -106,41 +99,22 @@ public struct EndUserLicenseAgreement: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case apps } } - - public struct Links: Hashable, Codable { - public var related: URL? - - public var `self`: URL? - - public init( - related: URL? = nil, - self _self: URL? = nil - ) { - self.related = related - self.`self` = _self - } - - private enum CodingKeys: String, CodingKey { - case related - case `self` = "self" - } - } } - public struct Territories: Hashable, Codable { + public struct Territories: Hashable, Codable, Sendable { public var data: [Data]? - public var links: Links? + public var links: RelationshipLinks? public var meta: PagingInformation? public init( data: [Data]? = nil, - links: Links? = nil, + links: RelationshipLinks? = nil, meta: PagingInformation? = nil ) { self.data = data @@ -154,7 +128,7 @@ public struct EndUserLicenseAgreement: Hashable, Codable { case meta } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -172,29 +146,10 @@ public struct EndUserLicenseAgreement: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case territories } } - - public struct Links: Hashable, Codable { - public var related: URL? - - public var `self`: URL? - - public init( - related: URL? = nil, - self _self: URL? = nil - ) { - self.related = related - self.`self` = _self - } - - private enum CodingKeys: String, CodingKey { - case related - case `self` = "self" - } - } } } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/ErrorLinks.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/ErrorLinks.generated.swift new file mode 100644 index 00000000..528ffd2c --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/ErrorLinks.generated.swift @@ -0,0 +1,88 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct ErrorLinks: Hashable, Codable, Sendable { + public var about: URL? + + public var associated: Associated? + + public init( + about: URL? = nil, + associated: Associated? = nil + ) { + self.about = about + self.associated = associated + } + + private enum CodingKeys: String, CodingKey { + case about + case associated + } + + public enum Associated: Hashable, Codable, Sendable { + case url(URL) + case object(Object) + + public init(from decoder: Decoder) throws { + self = try { + var lastError: Error! + do { + return .url(try URL(from: decoder)) + } catch { + lastError = error + } + do { + return .object(try Object(from: decoder)) + } catch { + lastError = error + } + throw lastError + }() + } + + public func encode(to encoder: Encoder) throws { + switch self { + case .url(let value): + try value.encode(to: encoder) + + case .object(let value): + try value.encode(to: encoder) + } + } + + public struct Object: Hashable, Codable, Sendable { + public var href: URL? + + public var meta: Meta? + + public init( + href: URL? = nil, + meta: Meta? = nil + ) { + self.href = href + self.meta = meta + } + + private enum CodingKeys: String, CodingKey { + case href + case meta + } + + public struct Meta: Hashable, Codable, Sendable { + public var source: String? + + public init(source: String? = nil) { + self.source = source + } + + private enum CodingKeys: String, CodingKey { + case source + } + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/ErrorSourceParameter.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/ErrorSourceParameter.generated.swift index 950e4d3a..b5710d4c 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/ErrorSourceParameter.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/ErrorSourceParameter.generated.swift @@ -4,10 +4,10 @@ import Foundation extension ErrorResponse { - public struct Parameter: Hashable, Codable { - public var parameter: String? + public struct Parameter: Hashable, Codable, Sendable { + public var parameter: String - public init(parameter: String? = nil) { + public init(parameter: String) { self.parameter = parameter } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/ErrorSourcePointer.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/ErrorSourcePointer.generated.swift index aa24990c..64f96517 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/ErrorSourcePointer.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/ErrorSourcePointer.generated.swift @@ -4,10 +4,10 @@ import Foundation extension ErrorResponse { - public struct JsonPointer: Hashable, Codable { - public var pointer: String? + public struct JsonPointer: Hashable, Codable, Sendable { + public var pointer: String - public init(pointer: String? = nil) { + public init(pointer: String) { self.pointer = pointer } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/ExternalBetaState.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/ExternalBetaState.generated.swift index 79dd1367..55c80415 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/ExternalBetaState.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/ExternalBetaState.generated.swift @@ -3,55 +3,67 @@ // swiftlint:disable all import Foundation -public enum ExternalBetaState: Hashable, Codable, RawRepresentable { - case betaApproved - case betaRejected - case expired - case inBetaReview - case inBetaTesting - case inExportComplianceReview - case missingExportCompliance - case processing - case processingException - case readyForBetaSubmission - case readyForBetaTesting - case waitingForBetaReview - case unknown(String) - - public var rawValue: String { - switch self { - case .betaApproved: return "BETA_APPROVED" - case .betaRejected: return "BETA_REJECTED" - case .expired: return "EXPIRED" - case .inBetaReview: return "IN_BETA_REVIEW" - case .inBetaTesting: return "IN_BETA_TESTING" - case .inExportComplianceReview: return "IN_EXPORT_COMPLIANCE_REVIEW" - case .missingExportCompliance: return "MISSING_EXPORT_COMPLIANCE" - case .processing: return "PROCESSING" - case .processingException: return "PROCESSING_EXCEPTION" - case .readyForBetaSubmission: return "READY_FOR_BETA_SUBMISSION" - case .readyForBetaTesting: return "READY_FOR_BETA_TESTING" - case .waitingForBetaReview: return "WAITING_FOR_BETA_REVIEW" - case .unknown(let rawValue): return rawValue - } +public struct ExternalBetaState: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var betaApproved: Self { + .init(rawValue: "BETA_APPROVED") } + public static var betaRejected: Self { + .init(rawValue: "BETA_REJECTED") + } + + public static var expired: Self { + .init(rawValue: "EXPIRED") + } + + public static var inBetaReview: Self { + .init(rawValue: "IN_BETA_REVIEW") + } + + public static var inBetaTesting: Self { + .init(rawValue: "IN_BETA_TESTING") + } + + public static var inExportComplianceReview: Self { + .init(rawValue: "IN_EXPORT_COMPLIANCE_REVIEW") + } + + public static var missingExportCompliance: Self { + .init(rawValue: "MISSING_EXPORT_COMPLIANCE") + } + + public static var notApplicable: Self { + .init(rawValue: "NOT_APPLICABLE") + } + + public static var processing: Self { + .init(rawValue: "PROCESSING") + } + + public static var processingException: Self { + .init(rawValue: "PROCESSING_EXCEPTION") + } + + public static var readyForBetaSubmission: Self { + .init(rawValue: "READY_FOR_BETA_SUBMISSION") + } + + public static var readyForBetaTesting: Self { + .init(rawValue: "READY_FOR_BETA_TESTING") + } + + public static var waitingForBetaReview: Self { + .init(rawValue: "WAITING_FOR_BETA_REVIEW") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "BETA_APPROVED": self = .betaApproved - case "BETA_REJECTED": self = .betaRejected - case "EXPIRED": self = .expired - case "IN_BETA_REVIEW": self = .inBetaReview - case "IN_BETA_TESTING": self = .inBetaTesting - case "IN_EXPORT_COMPLIANCE_REVIEW": self = .inExportComplianceReview - case "MISSING_EXPORT_COMPLIANCE": self = .missingExportCompliance - case "PROCESSING": self = .processing - case "PROCESSING_EXCEPTION": self = .processingException - case "READY_FOR_BETA_SUBMISSION": self = .readyForBetaSubmission - case "READY_FOR_BETA_TESTING": self = .readyForBetaTesting - case "WAITING_FOR_BETA_REVIEW": self = .waitingForBetaReview - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/FileLocation.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/FileLocation.generated.swift index fd4005c3..eab05d1b 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/FileLocation.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/FileLocation.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct FileLocation: Hashable, Codable { +public struct FileLocation: Hashable, Codable, Sendable { public var lineNumber: Int? public var path: String? diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/GameCenterAchievement.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/GameCenterAchievement.generated.swift index 90f8aca6..4962c471 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/GameCenterAchievement.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/GameCenterAchievement.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct GameCenterAchievement: Hashable, Codable { +public struct GameCenterAchievement: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -36,11 +36,13 @@ public struct GameCenterAchievement: Hashable, Codable { case links } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case gameCenterAchievements } - public struct Attributes: Hashable, Codable { + public struct Attributes: Hashable, Codable, Sendable { + public var activityProperties: [String: String]? + public var archived: Bool? public var points: Int? @@ -54,6 +56,7 @@ public struct GameCenterAchievement: Hashable, Codable { public var vendorIdentifier: String? public init( + activityProperties: [String: String]? = nil, archived: Bool? = nil, points: Int? = nil, referenceName: String? = nil, @@ -61,6 +64,7 @@ public struct GameCenterAchievement: Hashable, Codable { showBeforeEarned: Bool? = nil, vendorIdentifier: String? = nil ) { + self.activityProperties = activityProperties self.archived = archived self.points = points self.referenceName = referenceName @@ -70,6 +74,7 @@ public struct GameCenterAchievement: Hashable, Codable { } private enum CodingKeys: String, CodingKey { + case activityProperties case archived case points case referenceName @@ -79,11 +84,14 @@ public struct GameCenterAchievement: Hashable, Codable { } } - public struct Relationships: Hashable, Codable { + public struct Relationships: Hashable, Codable, Sendable { + public var activity: Activity? + public var gameCenterDetail: GameCenterDetail? public var gameCenterGroup: GameCenterGroup? + @available(*, deprecated) public var groupAchievement: GroupAchievement? public var localizations: Localizations? @@ -91,12 +99,14 @@ public struct GameCenterAchievement: Hashable, Codable { public var releases: Releases? public init( + activity: Activity? = nil, gameCenterDetail: GameCenterDetail? = nil, gameCenterGroup: GameCenterGroup? = nil, groupAchievement: GroupAchievement? = nil, localizations: Localizations? = nil, releases: Releases? = nil ) { + self.activity = activity self.gameCenterDetail = gameCenterDetail self.gameCenterGroup = gameCenterGroup self.groupAchievement = groupAchievement @@ -105,6 +115,7 @@ public struct GameCenterAchievement: Hashable, Codable { } private enum CodingKeys: String, CodingKey { + case activity case gameCenterDetail case gameCenterGroup case groupAchievement @@ -112,14 +123,14 @@ public struct GameCenterAchievement: Hashable, Codable { case releases } - public struct GameCenterDetail: Hashable, Codable { + public struct Activity: Hashable, Codable, Sendable { public var data: Data? - public var links: Links? + public var links: RelationshipLinks? public init( data: Data? = nil, - links: Links? = nil + links: RelationshipLinks? = nil ) { self.data = data self.links = links @@ -130,7 +141,7 @@ public struct GameCenterAchievement: Hashable, Codable { case links } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -148,50 +159,59 @@ public struct GameCenterAchievement: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { - case gameCenterDetails + public enum `Type`: String, Hashable, Codable, Sendable { + case gameCenterActivities } } + } + + public struct GameCenterDetail: Hashable, Codable, Sendable { + public var data: Data? + + public init(data: Data? = nil) { + self.data = data + } - public struct Links: Hashable, Codable { - public var related: URL? + private enum CodingKeys: String, CodingKey { + case data + } - public var `self`: URL? + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` public init( - related: URL? = nil, - self _self: URL? = nil + id: String, + type: `Type` ) { - self.related = related - self.`self` = _self + self.id = id + self.type = type } private enum CodingKeys: String, CodingKey { - case related - case `self` = "self" + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case gameCenterDetails } } } - public struct GameCenterGroup: Hashable, Codable { + public struct GameCenterGroup: Hashable, Codable, Sendable { public var data: Data? - public var links: Links? - - public init( - data: Data? = nil, - links: Links? = nil - ) { + public init(data: Data? = nil) { self.data = data - self.links = links } private enum CodingKeys: String, CodingKey { case data - case links } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -209,39 +229,20 @@ public struct GameCenterAchievement: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case gameCenterGroups } } - - public struct Links: Hashable, Codable { - public var related: URL? - - public var `self`: URL? - - public init( - related: URL? = nil, - self _self: URL? = nil - ) { - self.related = related - self.`self` = _self - } - - private enum CodingKeys: String, CodingKey { - case related - case `self` = "self" - } - } } - public struct GroupAchievement: Hashable, Codable { + public struct GroupAchievement: Hashable, Codable, Sendable { public var data: Data? - public var links: Links? + public var links: RelationshipLinks? public init( data: Data? = nil, - links: Links? = nil + links: RelationshipLinks? = nil ) { self.data = data self.links = links @@ -252,7 +253,7 @@ public struct GameCenterAchievement: Hashable, Codable { case links } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -270,41 +271,22 @@ public struct GameCenterAchievement: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case gameCenterAchievements } } - - public struct Links: Hashable, Codable { - public var related: URL? - - public var `self`: URL? - - public init( - related: URL? = nil, - self _self: URL? = nil - ) { - self.related = related - self.`self` = _self - } - - private enum CodingKeys: String, CodingKey { - case related - case `self` = "self" - } - } } - public struct Localizations: Hashable, Codable { + public struct Localizations: Hashable, Codable, Sendable { public var data: [Data]? - public var links: Links? + public var links: RelationshipLinks? public var meta: PagingInformation? public init( data: [Data]? = nil, - links: Links? = nil, + links: RelationshipLinks? = nil, meta: PagingInformation? = nil ) { self.data = data @@ -318,7 +300,7 @@ public struct GameCenterAchievement: Hashable, Codable { case meta } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -336,41 +318,22 @@ public struct GameCenterAchievement: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case gameCenterAchievementLocalizations } } - - public struct Links: Hashable, Codable { - public var related: URL? - - public var `self`: URL? - - public init( - related: URL? = nil, - self _self: URL? = nil - ) { - self.related = related - self.`self` = _self - } - - private enum CodingKeys: String, CodingKey { - case related - case `self` = "self" - } - } } - public struct Releases: Hashable, Codable { + public struct Releases: Hashable, Codable, Sendable { public var data: [Data]? - public var links: Links? + public var links: RelationshipLinks? public var meta: PagingInformation? public init( data: [Data]? = nil, - links: Links? = nil, + links: RelationshipLinks? = nil, meta: PagingInformation? = nil ) { self.data = data @@ -384,7 +347,7 @@ public struct GameCenterAchievement: Hashable, Codable { case meta } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -402,29 +365,10 @@ public struct GameCenterAchievement: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case gameCenterAchievementReleases } } - - public struct Links: Hashable, Codable { - public var related: URL? - - public var `self`: URL? - - public init( - related: URL? = nil, - self _self: URL? = nil - ) { - self.related = related - self.`self` = _self - } - - private enum CodingKeys: String, CodingKey { - case related - case `self` = "self" - } - } } } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/GameCenterAchievementImage.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/GameCenterAchievementImage.generated.swift index 3d7ba0ff..f6b05b7c 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/GameCenterAchievementImage.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/GameCenterAchievementImage.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct GameCenterAchievementImage: Hashable, Codable { +public struct GameCenterAchievementImage: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -36,11 +36,11 @@ public struct GameCenterAchievementImage: Hashable, Codable { case links } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case gameCenterAchievementImages } - public struct Attributes: Hashable, Codable { + public struct Attributes: Hashable, Codable, Sendable { public var assetDeliveryState: AppMediaAssetState? public var fileName: String? @@ -74,7 +74,7 @@ public struct GameCenterAchievementImage: Hashable, Codable { } } - public struct Relationships: Hashable, Codable { + public struct Relationships: Hashable, Codable, Sendable { public var gameCenterAchievementLocalization: GameCenterAchievementLocalization? public init(gameCenterAchievementLocalization: GameCenterAchievementLocalization? = nil) { @@ -85,25 +85,18 @@ public struct GameCenterAchievementImage: Hashable, Codable { case gameCenterAchievementLocalization } - public struct GameCenterAchievementLocalization: Hashable, Codable { + public struct GameCenterAchievementLocalization: Hashable, Codable, Sendable { public var data: Data? - public var links: Links? - - public init( - data: Data? = nil, - links: Links? = nil - ) { + public init(data: Data? = nil) { self.data = data - self.links = links } private enum CodingKeys: String, CodingKey { case data - case links } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -121,29 +114,10 @@ public struct GameCenterAchievementImage: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case gameCenterAchievementLocalizations } } - - public struct Links: Hashable, Codable { - public var related: URL? - - public var `self`: URL? - - public init( - related: URL? = nil, - self _self: URL? = nil - ) { - self.related = related - self.`self` = _self - } - - private enum CodingKeys: String, CodingKey { - case related - case `self` = "self" - } - } } } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/GameCenterAchievementLocalization.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/GameCenterAchievementLocalization.generated.swift index f612e4e2..8d7d1ba2 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/GameCenterAchievementLocalization.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/GameCenterAchievementLocalization.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct GameCenterAchievementLocalization: Hashable, Codable { +public struct GameCenterAchievementLocalization: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -36,11 +36,11 @@ public struct GameCenterAchievementLocalization: Hashable, Codable { case links } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case gameCenterAchievementLocalizations } - public struct Attributes: Hashable, Codable { + public struct Attributes: Hashable, Codable, Sendable { public var afterEarnedDescription: String? public var beforeEarnedDescription: String? @@ -69,7 +69,7 @@ public struct GameCenterAchievementLocalization: Hashable, Codable { } } - public struct Relationships: Hashable, Codable { + public struct Relationships: Hashable, Codable, Sendable { public var gameCenterAchievement: GameCenterAchievement? public var gameCenterAchievementImage: GameCenterAchievementImage? @@ -87,14 +87,14 @@ public struct GameCenterAchievementLocalization: Hashable, Codable { case gameCenterAchievementImage } - public struct GameCenterAchievement: Hashable, Codable { + public struct GameCenterAchievement: Hashable, Codable, Sendable { public var data: Data? - public var links: Links? + public var links: RelationshipLinks? public init( data: Data? = nil, - links: Links? = nil + links: RelationshipLinks? = nil ) { self.data = data self.links = links @@ -105,7 +105,7 @@ public struct GameCenterAchievementLocalization: Hashable, Codable { case links } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -123,39 +123,20 @@ public struct GameCenterAchievementLocalization: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case gameCenterAchievements } } - - public struct Links: Hashable, Codable { - public var related: URL? - - public var `self`: URL? - - public init( - related: URL? = nil, - self _self: URL? = nil - ) { - self.related = related - self.`self` = _self - } - - private enum CodingKeys: String, CodingKey { - case related - case `self` = "self" - } - } } - public struct GameCenterAchievementImage: Hashable, Codable { + public struct GameCenterAchievementImage: Hashable, Codable, Sendable { public var data: Data? - public var links: Links? + public var links: RelationshipLinks? public init( data: Data? = nil, - links: Links? = nil + links: RelationshipLinks? = nil ) { self.data = data self.links = links @@ -166,7 +147,7 @@ public struct GameCenterAchievementLocalization: Hashable, Codable { case links } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -184,29 +165,10 @@ public struct GameCenterAchievementLocalization: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case gameCenterAchievementImages } } - - public struct Links: Hashable, Codable { - public var related: URL? - - public var `self`: URL? - - public init( - related: URL? = nil, - self _self: URL? = nil - ) { - self.related = related - self.`self` = _self - } - - private enum CodingKeys: String, CodingKey { - case related - case `self` = "self" - } - } } } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/GameCenterAchievementRelease.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/GameCenterAchievementRelease.generated.swift index a6d679cb..b5cbddea 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/GameCenterAchievementRelease.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/GameCenterAchievementRelease.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct GameCenterAchievementRelease: Hashable, Codable { +public struct GameCenterAchievementRelease: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -36,11 +36,11 @@ public struct GameCenterAchievementRelease: Hashable, Codable { case links } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case gameCenterAchievementReleases } - public struct Attributes: Hashable, Codable { + public struct Attributes: Hashable, Codable, Sendable { public var live: Bool? public init(live: Bool? = nil) { @@ -52,7 +52,7 @@ public struct GameCenterAchievementRelease: Hashable, Codable { } } - public struct Relationships: Hashable, Codable { + public struct Relationships: Hashable, Codable, Sendable { public var gameCenterAchievement: GameCenterAchievement? public var gameCenterDetail: GameCenterDetail? @@ -70,25 +70,18 @@ public struct GameCenterAchievementRelease: Hashable, Codable { case gameCenterDetail } - public struct GameCenterAchievement: Hashable, Codable { + public struct GameCenterAchievement: Hashable, Codable, Sendable { public var data: Data? - public var links: Links? - - public init( - data: Data? = nil, - links: Links? = nil - ) { + public init(data: Data? = nil) { self.data = data - self.links = links } private enum CodingKeys: String, CodingKey { case data - case links } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -106,50 +99,24 @@ public struct GameCenterAchievementRelease: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case gameCenterAchievements } } - - public struct Links: Hashable, Codable { - public var related: URL? - - public var `self`: URL? - - public init( - related: URL? = nil, - self _self: URL? = nil - ) { - self.related = related - self.`self` = _self - } - - private enum CodingKeys: String, CodingKey { - case related - case `self` = "self" - } - } } - public struct GameCenterDetail: Hashable, Codable { + public struct GameCenterDetail: Hashable, Codable, Sendable { public var data: Data? - public var links: Links? - - public init( - data: Data? = nil, - links: Links? = nil - ) { + public init(data: Data? = nil) { self.data = data - self.links = links } private enum CodingKeys: String, CodingKey { case data - case links } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -167,29 +134,10 @@ public struct GameCenterAchievementRelease: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case gameCenterDetails } } - - public struct Links: Hashable, Codable { - public var related: URL? - - public var `self`: URL? - - public init( - related: URL? = nil, - self _self: URL? = nil - ) { - self.related = related - self.`self` = _self - } - - private enum CodingKeys: String, CodingKey { - case related - case `self` = "self" - } - } } } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/GameCenterActivity.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/GameCenterActivity.generated.swift new file mode 100644 index 00000000..88bed684 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/GameCenterActivity.generated.swift @@ -0,0 +1,358 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct GameCenterActivity: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public var attributes: Attributes? + + public var relationships: Relationships? + + public var links: ResourceLinks? + + public init( + id: String, + type: `Type`, + attributes: Attributes? = nil, + relationships: Relationships? = nil, + links: ResourceLinks? = nil + ) { + self.id = id + self.type = type + self.attributes = attributes + self.relationships = relationships + self.links = links + } + + private enum CodingKeys: String, CodingKey { + case id + case type + case attributes + case relationships + case links + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case gameCenterActivities + } + + public struct Attributes: Hashable, Codable, Sendable { + public var archived: Bool? + + public var maximumPlayersCount: Int? + + public var minimumPlayersCount: Int? + + public var playStyle: PlayStyle? + + public var properties: [String: String]? + + public var referenceName: String? + + public var supportsPartyCode: Bool? + + public var vendorIdentifier: String? + + public init( + archived: Bool? = nil, + maximumPlayersCount: Int? = nil, + minimumPlayersCount: Int? = nil, + playStyle: PlayStyle? = nil, + properties: [String: String]? = nil, + referenceName: String? = nil, + supportsPartyCode: Bool? = nil, + vendorIdentifier: String? = nil + ) { + self.archived = archived + self.maximumPlayersCount = maximumPlayersCount + self.minimumPlayersCount = minimumPlayersCount + self.playStyle = playStyle + self.properties = properties + self.referenceName = referenceName + self.supportsPartyCode = supportsPartyCode + self.vendorIdentifier = vendorIdentifier + } + + private enum CodingKeys: String, CodingKey { + case archived + case maximumPlayersCount + case minimumPlayersCount + case playStyle + case properties + case referenceName + case supportsPartyCode + case vendorIdentifier + } + + public struct PlayStyle: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var asynchronous: Self { + .init(rawValue: "ASYNCHRONOUS") + } + + public static var synchronous: Self { + .init(rawValue: "SYNCHRONOUS") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + } + + public struct Relationships: Hashable, Codable, Sendable { + public var achievements: Achievements? + + public var gameCenterDetail: GameCenterDetail? + + public var gameCenterGroup: GameCenterGroup? + + public var leaderboards: Leaderboards? + + public var versions: Versions? + + public init( + achievements: Achievements? = nil, + gameCenterDetail: GameCenterDetail? = nil, + gameCenterGroup: GameCenterGroup? = nil, + leaderboards: Leaderboards? = nil, + versions: Versions? = nil + ) { + self.achievements = achievements + self.gameCenterDetail = gameCenterDetail + self.gameCenterGroup = gameCenterGroup + self.leaderboards = leaderboards + self.versions = versions + } + + private enum CodingKeys: String, CodingKey { + case achievements + case gameCenterDetail + case gameCenterGroup + case leaderboards + case versions + } + + public struct Achievements: Hashable, Codable, Sendable { + public var data: [Data]? + + public var links: RelationshipLinks? + + public var meta: PagingInformation? + + public init( + data: [Data]? = nil, + links: RelationshipLinks? = nil, + meta: PagingInformation? = nil + ) { + self.data = data + self.links = links + self.meta = meta + } + + private enum CodingKeys: String, CodingKey { + case data + case links + case meta + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case gameCenterAchievements + } + } + } + + public struct GameCenterDetail: Hashable, Codable, Sendable { + public var data: Data? + + public init(data: Data? = nil) { + self.data = data + } + + private enum CodingKeys: String, CodingKey { + case data + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case gameCenterDetails + } + } + } + + public struct GameCenterGroup: Hashable, Codable, Sendable { + public var data: Data? + + public init(data: Data? = nil) { + self.data = data + } + + private enum CodingKeys: String, CodingKey { + case data + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case gameCenterGroups + } + } + } + + public struct Leaderboards: Hashable, Codable, Sendable { + public var data: [Data]? + + public var links: RelationshipLinks? + + public var meta: PagingInformation? + + public init( + data: [Data]? = nil, + links: RelationshipLinks? = nil, + meta: PagingInformation? = nil + ) { + self.data = data + self.links = links + self.meta = meta + } + + private enum CodingKeys: String, CodingKey { + case data + case links + case meta + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case gameCenterLeaderboards + } + } + } + + public struct Versions: Hashable, Codable, Sendable { + public var data: [Data]? + + public var links: RelationshipLinks? + + public var meta: PagingInformation? + + public init( + data: [Data]? = nil, + links: RelationshipLinks? = nil, + meta: PagingInformation? = nil + ) { + self.data = data + self.links = links + self.meta = meta + } + + private enum CodingKeys: String, CodingKey { + case data + case links + case meta + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case gameCenterActivityVersions + } + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/GameCenterActivityImage.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/GameCenterActivityImage.generated.swift new file mode 100644 index 00000000..326c2d35 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/GameCenterActivityImage.generated.swift @@ -0,0 +1,73 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct GameCenterActivityImage: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public var attributes: Attributes? + + public var links: ResourceLinks? + + public init( + id: String, + type: `Type`, + attributes: Attributes? = nil, + links: ResourceLinks? = nil + ) { + self.id = id + self.type = type + self.attributes = attributes + self.links = links + } + + private enum CodingKeys: String, CodingKey { + case id + case type + case attributes + case links + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case gameCenterActivityImages + } + + public struct Attributes: Hashable, Codable, Sendable { + public var assetDeliveryState: AppMediaAssetState? + + public var fileName: String? + + public var fileSize: Int? + + public var imageAsset: ImageAsset? + + public var uploadOperations: [UploadOperation]? + + public init( + assetDeliveryState: AppMediaAssetState? = nil, + fileName: String? = nil, + fileSize: Int? = nil, + imageAsset: ImageAsset? = nil, + uploadOperations: [UploadOperation]? = nil + ) { + self.assetDeliveryState = assetDeliveryState + self.fileName = fileName + self.fileSize = fileSize + self.imageAsset = imageAsset + self.uploadOperations = uploadOperations + } + + private enum CodingKeys: String, CodingKey { + case assetDeliveryState + case fileName + case fileSize + case imageAsset + case uploadOperations + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/AppPrice.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/GameCenterActivityLocalization.generated.swift similarity index 50% rename from Sources/AppStoreConnectKit/autogenerated/Schemas/AppPrice.generated.swift rename to Sources/AppStoreConnectKit/autogenerated/Schemas/GameCenterActivityLocalization.generated.swift index bcbb5497..79dd09e4 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/AppPrice.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/GameCenterActivityLocalization.generated.swift @@ -3,11 +3,13 @@ // swiftlint:disable all import Foundation -public struct AppPrice: Hashable, Codable { +public struct GameCenterActivityLocalization: Hashable, Codable, Sendable { public var id: String public var type: `Type` + public var attributes: Attributes? + public var relationships: Relationships? public var links: ResourceLinks? @@ -15,11 +17,13 @@ public struct AppPrice: Hashable, Codable { public init( id: String, type: `Type`, + attributes: Attributes? = nil, relationships: Relationships? = nil, links: ResourceLinks? = nil ) { self.id = id self.type = type + self.attributes = attributes self.relationships = relationships self.links = links } @@ -27,40 +31,65 @@ public struct AppPrice: Hashable, Codable { private enum CodingKeys: String, CodingKey { case id case type + case attributes case relationships case links } - public enum `Type`: String, Hashable, Codable { - case appPrices + public enum `Type`: String, Hashable, Codable, Sendable { + case gameCenterActivityLocalizations } - public struct Relationships: Hashable, Codable { - public var app: App? + public struct Attributes: Hashable, Codable, Sendable { + public var description: String? + + public var locale: String? - public var priceTier: PriceTier? + public var name: String? public init( - app: App? = nil, - priceTier: PriceTier? = nil + description: String? = nil, + locale: String? = nil, + name: String? = nil ) { - self.app = app - self.priceTier = priceTier + self.description = description + self.locale = locale + self.name = name } private enum CodingKeys: String, CodingKey { - case app - case priceTier + case description + case locale + case name + } + } + + public struct Relationships: Hashable, Codable, Sendable { + public var image: Image? + + public var version: Version? + + public init( + image: Image? = nil, + version: Version? = nil + ) { + self.image = image + self.version = version } - public struct App: Hashable, Codable { + private enum CodingKeys: String, CodingKey { + case image + case version + } + + public struct Image: Hashable, Codable, Sendable { public var data: Data? - public var links: Links? + public var links: RelationshipLinks? public init( data: Data? = nil, - links: Links? = nil + links: RelationshipLinks? = nil ) { self.data = data self.links = links @@ -71,7 +100,7 @@ public struct AppPrice: Hashable, Codable { case links } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -89,50 +118,24 @@ public struct AppPrice: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { - case apps - } - } - - public struct Links: Hashable, Codable { - public var related: URL? - - public var `self`: URL? - - public init( - related: URL? = nil, - self _self: URL? = nil - ) { - self.related = related - self.`self` = _self - } - - private enum CodingKeys: String, CodingKey { - case related - case `self` = "self" + public enum `Type`: String, Hashable, Codable, Sendable { + case gameCenterActivityImages } } } - public struct PriceTier: Hashable, Codable { + public struct Version: Hashable, Codable, Sendable { public var data: Data? - public var links: Links? - - public init( - data: Data? = nil, - links: Links? = nil - ) { + public init(data: Data? = nil) { self.data = data - self.links = links } private enum CodingKeys: String, CodingKey { case data - case links } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -150,27 +153,8 @@ public struct AppPrice: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { - case appPriceTiers - } - } - - public struct Links: Hashable, Codable { - public var related: URL? - - public var `self`: URL? - - public init( - related: URL? = nil, - self _self: URL? = nil - ) { - self.related = related - self.`self` = _self - } - - private enum CodingKeys: String, CodingKey { - case related - case `self` = "self" + public enum `Type`: String, Hashable, Codable, Sendable { + case gameCenterActivityVersions } } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/GameCenterActivityVersion.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/GameCenterActivityVersion.generated.swift new file mode 100644 index 00000000..4558166b --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/GameCenterActivityVersion.generated.swift @@ -0,0 +1,263 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct GameCenterActivityVersion: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public var attributes: Attributes? + + public var relationships: Relationships? + + public var links: ResourceLinks? + + public init( + id: String, + type: `Type`, + attributes: Attributes? = nil, + relationships: Relationships? = nil, + links: ResourceLinks? = nil + ) { + self.id = id + self.type = type + self.attributes = attributes + self.relationships = relationships + self.links = links + } + + private enum CodingKeys: String, CodingKey { + case id + case type + case attributes + case relationships + case links + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case gameCenterActivityVersions + } + + public struct Attributes: Hashable, Codable, Sendable { + public var fallbackUrl: String? + + public var state: GameCenterVersionState? + + public var version: Int? + + public init( + fallbackUrl: String? = nil, + state: GameCenterVersionState? = nil, + version: Int? = nil + ) { + self.fallbackUrl = fallbackUrl + self.state = state + self.version = version + } + + private enum CodingKeys: String, CodingKey { + case fallbackUrl + case state + case version + } + } + + public struct Relationships: Hashable, Codable, Sendable { + public var activity: Activity? + + public var defaultImage: DefaultImage? + + public var localizations: Localizations? + + public var releases: Releases? + + public init( + activity: Activity? = nil, + defaultImage: DefaultImage? = nil, + localizations: Localizations? = nil, + releases: Releases? = nil + ) { + self.activity = activity + self.defaultImage = defaultImage + self.localizations = localizations + self.releases = releases + } + + private enum CodingKeys: String, CodingKey { + case activity + case defaultImage + case localizations + case releases + } + + public struct Activity: Hashable, Codable, Sendable { + public var data: Data? + + public init(data: Data? = nil) { + self.data = data + } + + private enum CodingKeys: String, CodingKey { + case data + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case gameCenterActivities + } + } + } + + public struct DefaultImage: Hashable, Codable, Sendable { + public var data: Data? + + public var links: RelationshipLinks? + + public init( + data: Data? = nil, + links: RelationshipLinks? = nil + ) { + self.data = data + self.links = links + } + + private enum CodingKeys: String, CodingKey { + case data + case links + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case gameCenterActivityImages + } + } + } + + public struct Localizations: Hashable, Codable, Sendable { + public var data: [Data]? + + public var links: RelationshipLinks? + + public var meta: PagingInformation? + + public init( + data: [Data]? = nil, + links: RelationshipLinks? = nil, + meta: PagingInformation? = nil + ) { + self.data = data + self.links = links + self.meta = meta + } + + private enum CodingKeys: String, CodingKey { + case data + case links + case meta + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case gameCenterActivityLocalizations + } + } + } + + public struct Releases: Hashable, Codable, Sendable { + public var data: [Data]? + + public var meta: PagingInformation? + + public init( + data: [Data]? = nil, + meta: PagingInformation? = nil + ) { + self.data = data + self.meta = meta + } + + private enum CodingKeys: String, CodingKey { + case data + case meta + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case gameCenterActivityVersionReleases + } + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/GameCenterActivityVersionRelease.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/GameCenterActivityVersionRelease.generated.swift new file mode 100644 index 00000000..a6a3c3d2 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/GameCenterActivityVersionRelease.generated.swift @@ -0,0 +1,86 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct GameCenterActivityVersionRelease: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public var relationships: Relationships? + + public var links: ResourceLinks? + + public init( + id: String, + type: `Type`, + relationships: Relationships? = nil, + links: ResourceLinks? = nil + ) { + self.id = id + self.type = type + self.relationships = relationships + self.links = links + } + + private enum CodingKeys: String, CodingKey { + case id + case type + case relationships + case links + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case gameCenterActivityVersionReleases + } + + public struct Relationships: Hashable, Codable, Sendable { + public var version: Version? + + public init(version: Version? = nil) { + self.version = version + } + + private enum CodingKeys: String, CodingKey { + case version + } + + public struct Version: Hashable, Codable, Sendable { + public var data: Data? + + public init(data: Data? = nil) { + self.data = data + } + + private enum CodingKeys: String, CodingKey { + case data + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case gameCenterActivityVersions + } + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/GameCenterAppVersion.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/GameCenterAppVersion.generated.swift index c4122c8b..d54a8379 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/GameCenterAppVersion.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/GameCenterAppVersion.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct GameCenterAppVersion: Hashable, Codable { +public struct GameCenterAppVersion: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -36,11 +36,11 @@ public struct GameCenterAppVersion: Hashable, Codable { case links } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case gameCenterAppVersions } - public struct Attributes: Hashable, Codable { + public struct Attributes: Hashable, Codable, Sendable { public var enabled: Bool? public init(enabled: Bool? = nil) { @@ -52,7 +52,7 @@ public struct GameCenterAppVersion: Hashable, Codable { } } - public struct Relationships: Hashable, Codable { + public struct Relationships: Hashable, Codable, Sendable { public var appStoreVersion: AppStoreVersion? public var compatibilityVersions: CompatibilityVersions? @@ -70,14 +70,14 @@ public struct GameCenterAppVersion: Hashable, Codable { case compatibilityVersions } - public struct AppStoreVersion: Hashable, Codable { + public struct AppStoreVersion: Hashable, Codable, Sendable { public var data: Data? - public var links: Links? + public var links: RelationshipLinks? public init( data: Data? = nil, - links: Links? = nil + links: RelationshipLinks? = nil ) { self.data = data self.links = links @@ -88,7 +88,7 @@ public struct GameCenterAppVersion: Hashable, Codable { case links } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -106,41 +106,22 @@ public struct GameCenterAppVersion: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case appStoreVersions } } - - public struct Links: Hashable, Codable { - public var related: URL? - - public var `self`: URL? - - public init( - related: URL? = nil, - self _self: URL? = nil - ) { - self.related = related - self.`self` = _self - } - - private enum CodingKeys: String, CodingKey { - case related - case `self` = "self" - } - } } - public struct CompatibilityVersions: Hashable, Codable { + public struct CompatibilityVersions: Hashable, Codable, Sendable { public var data: [Data]? - public var links: Links? + public var links: RelationshipLinks? public var meta: PagingInformation? public init( data: [Data]? = nil, - links: Links? = nil, + links: RelationshipLinks? = nil, meta: PagingInformation? = nil ) { self.data = data @@ -154,7 +135,7 @@ public struct GameCenterAppVersion: Hashable, Codable { case meta } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -172,29 +153,10 @@ public struct GameCenterAppVersion: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case gameCenterAppVersions } } - - public struct Links: Hashable, Codable { - public var related: URL? - - public var `self`: URL? - - public init( - related: URL? = nil, - self _self: URL? = nil - ) { - self.related = related - self.`self` = _self - } - - private enum CodingKeys: String, CodingKey { - case related - case `self` = "self" - } - } } } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/GameCenterChallenge.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/GameCenterChallenge.generated.swift new file mode 100644 index 00000000..5a8bdace --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/GameCenterChallenge.generated.swift @@ -0,0 +1,311 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct GameCenterChallenge: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public var attributes: Attributes? + + public var relationships: Relationships? + + public var links: ResourceLinks? + + public init( + id: String, + type: `Type`, + attributes: Attributes? = nil, + relationships: Relationships? = nil, + links: ResourceLinks? = nil + ) { + self.id = id + self.type = type + self.attributes = attributes + self.relationships = relationships + self.links = links + } + + private enum CodingKeys: String, CodingKey { + case id + case type + case attributes + case relationships + case links + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case gameCenterChallenges + } + + public struct Attributes: Hashable, Codable, Sendable { + public var allowedDurations: [AllowedDurations]? + + public var archived: Bool? + + public var challengeType: ChallengeType? + + public var referenceName: String? + + public var repeatable: Bool? + + public var vendorIdentifier: String? + + public init( + allowedDurations: [AllowedDurations]? = nil, + archived: Bool? = nil, + challengeType: ChallengeType? = nil, + referenceName: String? = nil, + repeatable: Bool? = nil, + vendorIdentifier: String? = nil + ) { + self.allowedDurations = allowedDurations + self.archived = archived + self.challengeType = challengeType + self.referenceName = referenceName + self.repeatable = repeatable + self.vendorIdentifier = vendorIdentifier + } + + private enum CodingKeys: String, CodingKey { + case allowedDurations + case archived + case challengeType + case referenceName + case repeatable + case vendorIdentifier + } + + public struct AllowedDurations: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var oneDay: Self { + .init(rawValue: "ONE_DAY") + } + + public static var oneWeek: Self { + .init(rawValue: "ONE_WEEK") + } + + public static var threeDays: Self { + .init(rawValue: "THREE_DAYS") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct ChallengeType: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var leaderboard: Self { + .init(rawValue: "LEADERBOARD") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + } + + public struct Relationships: Hashable, Codable, Sendable { + public var gameCenterDetail: GameCenterDetail? + + public var gameCenterGroup: GameCenterGroup? + + public var leaderboard: Leaderboard? + + public var versions: Versions? + + public init( + gameCenterDetail: GameCenterDetail? = nil, + gameCenterGroup: GameCenterGroup? = nil, + leaderboard: Leaderboard? = nil, + versions: Versions? = nil + ) { + self.gameCenterDetail = gameCenterDetail + self.gameCenterGroup = gameCenterGroup + self.leaderboard = leaderboard + self.versions = versions + } + + private enum CodingKeys: String, CodingKey { + case gameCenterDetail + case gameCenterGroup + case leaderboard + case versions + } + + public struct GameCenterDetail: Hashable, Codable, Sendable { + public var data: Data? + + public init(data: Data? = nil) { + self.data = data + } + + private enum CodingKeys: String, CodingKey { + case data + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case gameCenterDetails + } + } + } + + public struct GameCenterGroup: Hashable, Codable, Sendable { + public var data: Data? + + public init(data: Data? = nil) { + self.data = data + } + + private enum CodingKeys: String, CodingKey { + case data + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case gameCenterGroups + } + } + } + + public struct Leaderboard: Hashable, Codable, Sendable { + public var data: Data? + + public var links: RelationshipLinks? + + public init( + data: Data? = nil, + links: RelationshipLinks? = nil + ) { + self.data = data + self.links = links + } + + private enum CodingKeys: String, CodingKey { + case data + case links + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case gameCenterLeaderboards + } + } + } + + public struct Versions: Hashable, Codable, Sendable { + public var data: [Data]? + + public var links: RelationshipLinks? + + public var meta: PagingInformation? + + public init( + data: [Data]? = nil, + links: RelationshipLinks? = nil, + meta: PagingInformation? = nil + ) { + self.data = data + self.links = links + self.meta = meta + } + + private enum CodingKeys: String, CodingKey { + case data + case links + case meta + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case gameCenterChallengeVersions + } + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/GameCenterChallengeImage.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/GameCenterChallengeImage.generated.swift new file mode 100644 index 00000000..09ccbe9a --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/GameCenterChallengeImage.generated.swift @@ -0,0 +1,73 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct GameCenterChallengeImage: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public var attributes: Attributes? + + public var links: ResourceLinks? + + public init( + id: String, + type: `Type`, + attributes: Attributes? = nil, + links: ResourceLinks? = nil + ) { + self.id = id + self.type = type + self.attributes = attributes + self.links = links + } + + private enum CodingKeys: String, CodingKey { + case id + case type + case attributes + case links + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case gameCenterChallengeImages + } + + public struct Attributes: Hashable, Codable, Sendable { + public var assetDeliveryState: AppMediaAssetState? + + public var fileName: String? + + public var fileSize: Int? + + public var imageAsset: ImageAsset? + + public var uploadOperations: [UploadOperation]? + + public init( + assetDeliveryState: AppMediaAssetState? = nil, + fileName: String? = nil, + fileSize: Int? = nil, + imageAsset: ImageAsset? = nil, + uploadOperations: [UploadOperation]? = nil + ) { + self.assetDeliveryState = assetDeliveryState + self.fileName = fileName + self.fileSize = fileSize + self.imageAsset = imageAsset + self.uploadOperations = uploadOperations + } + + private enum CodingKeys: String, CodingKey { + case assetDeliveryState + case fileName + case fileSize + case imageAsset + case uploadOperations + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/GameCenterChallengeLocalization.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/GameCenterChallengeLocalization.generated.swift new file mode 100644 index 00000000..1f08b685 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/GameCenterChallengeLocalization.generated.swift @@ -0,0 +1,164 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct GameCenterChallengeLocalization: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public var attributes: Attributes? + + public var relationships: Relationships? + + public var links: ResourceLinks? + + public init( + id: String, + type: `Type`, + attributes: Attributes? = nil, + relationships: Relationships? = nil, + links: ResourceLinks? = nil + ) { + self.id = id + self.type = type + self.attributes = attributes + self.relationships = relationships + self.links = links + } + + private enum CodingKeys: String, CodingKey { + case id + case type + case attributes + case relationships + case links + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case gameCenterChallengeLocalizations + } + + public struct Attributes: Hashable, Codable, Sendable { + public var description: String? + + public var locale: String? + + public var name: String? + + public init( + description: String? = nil, + locale: String? = nil, + name: String? = nil + ) { + self.description = description + self.locale = locale + self.name = name + } + + private enum CodingKeys: String, CodingKey { + case description + case locale + case name + } + } + + public struct Relationships: Hashable, Codable, Sendable { + public var image: Image? + + public var version: Version? + + public init( + image: Image? = nil, + version: Version? = nil + ) { + self.image = image + self.version = version + } + + private enum CodingKeys: String, CodingKey { + case image + case version + } + + public struct Image: Hashable, Codable, Sendable { + public var data: Data? + + public var links: RelationshipLinks? + + public init( + data: Data? = nil, + links: RelationshipLinks? = nil + ) { + self.data = data + self.links = links + } + + private enum CodingKeys: String, CodingKey { + case data + case links + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case gameCenterChallengeImages + } + } + } + + public struct Version: Hashable, Codable, Sendable { + public var data: Data? + + public init(data: Data? = nil) { + self.data = data + } + + private enum CodingKeys: String, CodingKey { + case data + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case gameCenterChallengeVersions + } + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/AppPricePointV2.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/GameCenterChallengeVersion.generated.swift similarity index 50% rename from Sources/AppStoreConnectKit/autogenerated/Schemas/AppPricePointV2.generated.swift rename to Sources/AppStoreConnectKit/autogenerated/Schemas/GameCenterChallengeVersion.generated.swift index 93f87c58..b32f7742 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/AppPricePointV2.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/GameCenterChallengeVersion.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct AppPricePointV2: Hashable, Codable { +public struct GameCenterChallengeVersion: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -36,71 +36,69 @@ public struct AppPricePointV2: Hashable, Codable { case links } - public enum `Type`: String, Hashable, Codable { - case appPricePoints + public enum `Type`: String, Hashable, Codable, Sendable { + case gameCenterChallengeVersions } - public struct Attributes: Hashable, Codable { - public var customerPrice: String? + public struct Attributes: Hashable, Codable, Sendable { + public var state: GameCenterVersionState? - public var proceeds: String? + public var version: Int? public init( - customerPrice: String? = nil, - proceeds: String? = nil + state: GameCenterVersionState? = nil, + version: Int? = nil ) { - self.customerPrice = customerPrice - self.proceeds = proceeds + self.state = state + self.version = version } private enum CodingKeys: String, CodingKey { - case customerPrice - case proceeds + case state + case version } } - public struct Relationships: Hashable, Codable { - public var app: App? + public struct Relationships: Hashable, Codable, Sendable { + public var challenge: Challenge? - public var priceTier: PriceTier? + public var defaultImage: DefaultImage? - public var territory: Territory? + public var localizations: Localizations? + + public var releases: Releases? public init( - app: App? = nil, - priceTier: PriceTier? = nil, - territory: Territory? = nil + challenge: Challenge? = nil, + defaultImage: DefaultImage? = nil, + localizations: Localizations? = nil, + releases: Releases? = nil ) { - self.app = app - self.priceTier = priceTier - self.territory = territory + self.challenge = challenge + self.defaultImage = defaultImage + self.localizations = localizations + self.releases = releases } private enum CodingKeys: String, CodingKey { - case app - case priceTier - case territory + case challenge + case defaultImage + case localizations + case releases } - public struct App: Hashable, Codable { + public struct Challenge: Hashable, Codable, Sendable { public var data: Data? - public var links: Links? - - public init( - data: Data? = nil, - links: Links? = nil - ) { + public init(data: Data? = nil) { self.data = data - self.links = links } private enum CodingKeys: String, CodingKey { case data - case links } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -118,39 +116,20 @@ public struct AppPricePointV2: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { - case apps - } - } - - public struct Links: Hashable, Codable { - public var related: URL? - - public var `self`: URL? - - public init( - related: URL? = nil, - self _self: URL? = nil - ) { - self.related = related - self.`self` = _self - } - - private enum CodingKeys: String, CodingKey { - case related - case `self` = "self" + public enum `Type`: String, Hashable, Codable, Sendable { + case gameCenterChallenges } } } - public struct PriceTier: Hashable, Codable { + public struct DefaultImage: Hashable, Codable, Sendable { public var data: Data? - public var links: Links? + public var links: RelationshipLinks? public init( data: Data? = nil, - links: Links? = nil + links: RelationshipLinks? = nil ) { self.data = data self.links = links @@ -161,7 +140,7 @@ public struct AppPricePointV2: Hashable, Codable { case links } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -179,50 +158,36 @@ public struct AppPricePointV2: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { - case appPriceTiers - } - } - - public struct Links: Hashable, Codable { - public var related: URL? - - public var `self`: URL? - - public init( - related: URL? = nil, - self _self: URL? = nil - ) { - self.related = related - self.`self` = _self - } - - private enum CodingKeys: String, CodingKey { - case related - case `self` = "self" + public enum `Type`: String, Hashable, Codable, Sendable { + case gameCenterChallengeImages } } } - public struct Territory: Hashable, Codable { - public var data: Data? + public struct Localizations: Hashable, Codable, Sendable { + public var data: [Data]? - public var links: Links? + public var links: RelationshipLinks? + + public var meta: PagingInformation? public init( - data: Data? = nil, - links: Links? = nil + data: [Data]? = nil, + links: RelationshipLinks? = nil, + meta: PagingInformation? = nil ) { self.data = data self.links = links + self.meta = meta } private enum CodingKeys: String, CodingKey { case data case links + case meta } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -240,27 +205,50 @@ public struct AppPricePointV2: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { - case territories + public enum `Type`: String, Hashable, Codable, Sendable { + case gameCenterChallengeLocalizations } } + } + + public struct Releases: Hashable, Codable, Sendable { + public var data: [Data]? + + public var meta: PagingInformation? + + public init( + data: [Data]? = nil, + meta: PagingInformation? = nil + ) { + self.data = data + self.meta = meta + } + + private enum CodingKeys: String, CodingKey { + case data + case meta + } - public struct Links: Hashable, Codable { - public var related: URL? + public struct Data: Hashable, Codable, Sendable { + public var id: String - public var `self`: URL? + public var type: `Type` public init( - related: URL? = nil, - self _self: URL? = nil + id: String, + type: `Type` ) { - self.related = related - self.`self` = _self + self.id = id + self.type = type } private enum CodingKeys: String, CodingKey { - case related - case `self` = "self" + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case gameCenterChallengeVersionReleases } } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/GameCenterChallengeVersionRelease.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/GameCenterChallengeVersionRelease.generated.swift new file mode 100644 index 00000000..3df0d68c --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/GameCenterChallengeVersionRelease.generated.swift @@ -0,0 +1,86 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct GameCenterChallengeVersionRelease: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public var relationships: Relationships? + + public var links: ResourceLinks? + + public init( + id: String, + type: `Type`, + relationships: Relationships? = nil, + links: ResourceLinks? = nil + ) { + self.id = id + self.type = type + self.relationships = relationships + self.links = links + } + + private enum CodingKeys: String, CodingKey { + case id + case type + case relationships + case links + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case gameCenterChallengeVersionReleases + } + + public struct Relationships: Hashable, Codable, Sendable { + public var version: Version? + + public init(version: Version? = nil) { + self.version = version + } + + private enum CodingKeys: String, CodingKey { + case version + } + + public struct Version: Hashable, Codable, Sendable { + public var data: Data? + + public init(data: Data? = nil) { + self.data = data + } + + private enum CodingKeys: String, CodingKey { + case data + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case gameCenterChallengeVersions + } + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/GameCenterDetail.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/GameCenterDetail.generated.swift index 8e1c4ff1..2f6538af 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/GameCenterDetail.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/GameCenterDetail.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct GameCenterDetail: Hashable, Codable { +public struct GameCenterDetail: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -36,13 +36,14 @@ public struct GameCenterDetail: Hashable, Codable { case links } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case gameCenterDetails } - public struct Attributes: Hashable, Codable { + public struct Attributes: Hashable, Codable, Sendable { public var arcadeEnabled: Bool? + @available(*, deprecated) public var challengeEnabled: Bool? public init( @@ -59,19 +60,29 @@ public struct GameCenterDetail: Hashable, Codable { } } - public struct Relationships: Hashable, Codable { + public struct Relationships: Hashable, Codable, Sendable { public var achievementReleases: AchievementReleases? + public var activityReleases: ActivityReleases? + public var app: App? + public var challengeReleases: ChallengeReleases? + + public var challengesMinimumPlatformVersions: ChallengesMinimumPlatformVersions? + public var defaultGroupLeaderboard: DefaultGroupLeaderboard? public var defaultLeaderboard: DefaultLeaderboard? public var gameCenterAchievements: GameCenterAchievements? + public var gameCenterActivities: GameCenterActivities? + public var gameCenterAppVersions: GameCenterAppVersions? + public var gameCenterChallenges: GameCenterChallenges? + public var gameCenterGroup: GameCenterGroup? public var gameCenterLeaderboardSets: GameCenterLeaderboardSets? @@ -84,11 +95,16 @@ public struct GameCenterDetail: Hashable, Codable { public init( achievementReleases: AchievementReleases? = nil, + activityReleases: ActivityReleases? = nil, app: App? = nil, + challengeReleases: ChallengeReleases? = nil, + challengesMinimumPlatformVersions: ChallengesMinimumPlatformVersions? = nil, defaultGroupLeaderboard: DefaultGroupLeaderboard? = nil, defaultLeaderboard: DefaultLeaderboard? = nil, gameCenterAchievements: GameCenterAchievements? = nil, + gameCenterActivities: GameCenterActivities? = nil, gameCenterAppVersions: GameCenterAppVersions? = nil, + gameCenterChallenges: GameCenterChallenges? = nil, gameCenterGroup: GameCenterGroup? = nil, gameCenterLeaderboardSets: GameCenterLeaderboardSets? = nil, gameCenterLeaderboards: GameCenterLeaderboards? = nil, @@ -96,11 +112,16 @@ public struct GameCenterDetail: Hashable, Codable { leaderboardSetReleases: LeaderboardSetReleases? = nil ) { self.achievementReleases = achievementReleases + self.activityReleases = activityReleases self.app = app + self.challengeReleases = challengeReleases + self.challengesMinimumPlatformVersions = challengesMinimumPlatformVersions self.defaultGroupLeaderboard = defaultGroupLeaderboard self.defaultLeaderboard = defaultLeaderboard self.gameCenterAchievements = gameCenterAchievements + self.gameCenterActivities = gameCenterActivities self.gameCenterAppVersions = gameCenterAppVersions + self.gameCenterChallenges = gameCenterChallenges self.gameCenterGroup = gameCenterGroup self.gameCenterLeaderboardSets = gameCenterLeaderboardSets self.gameCenterLeaderboards = gameCenterLeaderboards @@ -110,11 +131,16 @@ public struct GameCenterDetail: Hashable, Codable { private enum CodingKeys: String, CodingKey { case achievementReleases + case activityReleases case app + case challengeReleases + case challengesMinimumPlatformVersions case defaultGroupLeaderboard case defaultLeaderboard case gameCenterAchievements + case gameCenterActivities case gameCenterAppVersions + case gameCenterChallenges case gameCenterGroup case gameCenterLeaderboardSets case gameCenterLeaderboards @@ -122,16 +148,16 @@ public struct GameCenterDetail: Hashable, Codable { case leaderboardSetReleases } - public struct AchievementReleases: Hashable, Codable { + public struct AchievementReleases: Hashable, Codable, Sendable { public var data: [Data]? - public var links: Links? + public var links: RelationshipLinks? public var meta: PagingInformation? public init( data: [Data]? = nil, - links: Links? = nil, + links: RelationshipLinks? = nil, meta: PagingInformation? = nil ) { self.data = data @@ -145,7 +171,7 @@ public struct GameCenterDetail: Hashable, Codable { case meta } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -163,50 +189,36 @@ public struct GameCenterDetail: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case gameCenterAchievementReleases } } - - public struct Links: Hashable, Codable { - public var related: URL? - - public var `self`: URL? - - public init( - related: URL? = nil, - self _self: URL? = nil - ) { - self.related = related - self.`self` = _self - } - - private enum CodingKeys: String, CodingKey { - case related - case `self` = "self" - } - } } - public struct App: Hashable, Codable { - public var data: Data? + public struct ActivityReleases: Hashable, Codable, Sendable { + public var data: [Data]? - public var links: Links? + public var links: RelationshipLinks? + + public var meta: PagingInformation? public init( - data: Data? = nil, - links: Links? = nil + data: [Data]? = nil, + links: RelationshipLinks? = nil, + meta: PagingInformation? = nil ) { self.data = data self.links = links + self.meta = meta } private enum CodingKeys: String, CodingKey { case data case links + case meta } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -224,50 +236,71 @@ public struct GameCenterDetail: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { - case apps + public enum `Type`: String, Hashable, Codable, Sendable { + case gameCenterActivityVersionReleases } } + } - public struct Links: Hashable, Codable { - public var related: URL? + public struct App: Hashable, Codable, Sendable { + public var data: Data? - public var `self`: URL? + public init(data: Data? = nil) { + self.data = data + } + + private enum CodingKeys: String, CodingKey { + case data + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` public init( - related: URL? = nil, - self _self: URL? = nil + id: String, + type: `Type` ) { - self.related = related - self.`self` = _self + self.id = id + self.type = type } private enum CodingKeys: String, CodingKey { - case related - case `self` = "self" + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case apps } } } - public struct DefaultGroupLeaderboard: Hashable, Codable { - public var data: Data? + public struct ChallengeReleases: Hashable, Codable, Sendable { + public var data: [Data]? + + public var links: RelationshipLinks? - public var links: Links? + public var meta: PagingInformation? public init( - data: Data? = nil, - links: Links? = nil + data: [Data]? = nil, + links: RelationshipLinks? = nil, + meta: PagingInformation? = nil ) { self.data = data self.links = links + self.meta = meta } private enum CodingKeys: String, CodingKey { case data case links + case meta } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -285,50 +318,71 @@ public struct GameCenterDetail: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { - case gameCenterLeaderboards + public enum `Type`: String, Hashable, Codable, Sendable { + case gameCenterChallengeVersionReleases } } + } - public struct Links: Hashable, Codable { - public var related: URL? + public struct ChallengesMinimumPlatformVersions: Hashable, Codable, Sendable { + public var data: [Data]? + + public var links: RelationshipLinks? + + public var meta: PagingInformation? + + public init( + data: [Data]? = nil, + links: RelationshipLinks? = nil, + meta: PagingInformation? = nil + ) { + self.data = data + self.links = links + self.meta = meta + } + + private enum CodingKeys: String, CodingKey { + case data + case links + case meta + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String - public var `self`: URL? + public var type: `Type` public init( - related: URL? = nil, - self _self: URL? = nil + id: String, + type: `Type` ) { - self.related = related - self.`self` = _self + self.id = id + self.type = type } private enum CodingKeys: String, CodingKey { - case related - case `self` = "self" + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case appStoreVersions } } } - public struct DefaultLeaderboard: Hashable, Codable { + public struct DefaultGroupLeaderboard: Hashable, Codable, Sendable { public var data: Data? - public var links: Links? - - public init( - data: Data? = nil, - links: Links? = nil - ) { + public init(data: Data? = nil) { self.data = data - self.links = links } private enum CodingKeys: String, CodingKey { case data - case links } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -346,41 +400,57 @@ public struct GameCenterDetail: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case gameCenterLeaderboards } } + } + + public struct DefaultLeaderboard: Hashable, Codable, Sendable { + public var data: Data? + + public init(data: Data? = nil) { + self.data = data + } - public struct Links: Hashable, Codable { - public var related: URL? + private enum CodingKeys: String, CodingKey { + case data + } - public var `self`: URL? + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` public init( - related: URL? = nil, - self _self: URL? = nil + id: String, + type: `Type` ) { - self.related = related - self.`self` = _self + self.id = id + self.type = type } private enum CodingKeys: String, CodingKey { - case related - case `self` = "self" + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case gameCenterLeaderboards } } } - public struct GameCenterAchievements: Hashable, Codable { + public struct GameCenterAchievements: Hashable, Codable, Sendable { public var data: [Data]? - public var links: Links? + public var links: RelationshipLinks? public var meta: PagingInformation? public init( data: [Data]? = nil, - links: Links? = nil, + links: RelationshipLinks? = nil, meta: PagingInformation? = nil ) { self.data = data @@ -394,7 +464,7 @@ public struct GameCenterDetail: Hashable, Codable { case meta } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -412,41 +482,69 @@ public struct GameCenterDetail: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case gameCenterAchievements } } + } + + public struct GameCenterActivities: Hashable, Codable, Sendable { + public var data: [Data]? - public struct Links: Hashable, Codable { - public var related: URL? + public var links: RelationshipLinks? - public var `self`: URL? + public var meta: PagingInformation? + + public init( + data: [Data]? = nil, + links: RelationshipLinks? = nil, + meta: PagingInformation? = nil + ) { + self.data = data + self.links = links + self.meta = meta + } + + private enum CodingKeys: String, CodingKey { + case data + case links + case meta + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` public init( - related: URL? = nil, - self _self: URL? = nil + id: String, + type: `Type` ) { - self.related = related - self.`self` = _self + self.id = id + self.type = type } private enum CodingKeys: String, CodingKey { - case related - case `self` = "self" + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case gameCenterActivities } } } - public struct GameCenterAppVersions: Hashable, Codable { + public struct GameCenterAppVersions: Hashable, Codable, Sendable { public var data: [Data]? - public var links: Links? + public var links: RelationshipLinks? public var meta: PagingInformation? public init( data: [Data]? = nil, - links: Links? = nil, + links: RelationshipLinks? = nil, meta: PagingInformation? = nil ) { self.data = data @@ -460,7 +558,7 @@ public struct GameCenterDetail: Hashable, Codable { case meta } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -478,39 +576,67 @@ public struct GameCenterDetail: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case gameCenterAppVersions } } + } + + public struct GameCenterChallenges: Hashable, Codable, Sendable { + public var data: [Data]? + + public var links: RelationshipLinks? + + public var meta: PagingInformation? + + public init( + data: [Data]? = nil, + links: RelationshipLinks? = nil, + meta: PagingInformation? = nil + ) { + self.data = data + self.links = links + self.meta = meta + } + + private enum CodingKeys: String, CodingKey { + case data + case links + case meta + } - public struct Links: Hashable, Codable { - public var related: URL? + public struct Data: Hashable, Codable, Sendable { + public var id: String - public var `self`: URL? + public var type: `Type` public init( - related: URL? = nil, - self _self: URL? = nil + id: String, + type: `Type` ) { - self.related = related - self.`self` = _self + self.id = id + self.type = type } private enum CodingKeys: String, CodingKey { - case related - case `self` = "self" + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case gameCenterChallenges } } } - public struct GameCenterGroup: Hashable, Codable { + public struct GameCenterGroup: Hashable, Codable, Sendable { public var data: Data? - public var links: Links? + public var links: RelationshipLinks? public init( data: Data? = nil, - links: Links? = nil + links: RelationshipLinks? = nil ) { self.data = data self.links = links @@ -521,7 +647,7 @@ public struct GameCenterDetail: Hashable, Codable { case links } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -539,41 +665,22 @@ public struct GameCenterDetail: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case gameCenterGroups } } - - public struct Links: Hashable, Codable { - public var related: URL? - - public var `self`: URL? - - public init( - related: URL? = nil, - self _self: URL? = nil - ) { - self.related = related - self.`self` = _self - } - - private enum CodingKeys: String, CodingKey { - case related - case `self` = "self" - } - } } - public struct GameCenterLeaderboardSets: Hashable, Codable { + public struct GameCenterLeaderboardSets: Hashable, Codable, Sendable { public var data: [Data]? - public var links: Links? + public var links: RelationshipLinks? public var meta: PagingInformation? public init( data: [Data]? = nil, - links: Links? = nil, + links: RelationshipLinks? = nil, meta: PagingInformation? = nil ) { self.data = data @@ -587,7 +694,7 @@ public struct GameCenterDetail: Hashable, Codable { case meta } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -605,41 +712,22 @@ public struct GameCenterDetail: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case gameCenterLeaderboardSets } } - - public struct Links: Hashable, Codable { - public var related: URL? - - public var `self`: URL? - - public init( - related: URL? = nil, - self _self: URL? = nil - ) { - self.related = related - self.`self` = _self - } - - private enum CodingKeys: String, CodingKey { - case related - case `self` = "self" - } - } } - public struct GameCenterLeaderboards: Hashable, Codable { + public struct GameCenterLeaderboards: Hashable, Codable, Sendable { public var data: [Data]? - public var links: Links? + public var links: RelationshipLinks? public var meta: PagingInformation? public init( data: [Data]? = nil, - links: Links? = nil, + links: RelationshipLinks? = nil, meta: PagingInformation? = nil ) { self.data = data @@ -653,7 +741,7 @@ public struct GameCenterDetail: Hashable, Codable { case meta } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -671,41 +759,22 @@ public struct GameCenterDetail: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case gameCenterLeaderboards } } - - public struct Links: Hashable, Codable { - public var related: URL? - - public var `self`: URL? - - public init( - related: URL? = nil, - self _self: URL? = nil - ) { - self.related = related - self.`self` = _self - } - - private enum CodingKeys: String, CodingKey { - case related - case `self` = "self" - } - } } - public struct LeaderboardReleases: Hashable, Codable { + public struct LeaderboardReleases: Hashable, Codable, Sendable { public var data: [Data]? - public var links: Links? + public var links: RelationshipLinks? public var meta: PagingInformation? public init( data: [Data]? = nil, - links: Links? = nil, + links: RelationshipLinks? = nil, meta: PagingInformation? = nil ) { self.data = data @@ -719,7 +788,7 @@ public struct GameCenterDetail: Hashable, Codable { case meta } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -737,41 +806,22 @@ public struct GameCenterDetail: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case gameCenterLeaderboardReleases } } - - public struct Links: Hashable, Codable { - public var related: URL? - - public var `self`: URL? - - public init( - related: URL? = nil, - self _self: URL? = nil - ) { - self.related = related - self.`self` = _self - } - - private enum CodingKeys: String, CodingKey { - case related - case `self` = "self" - } - } } - public struct LeaderboardSetReleases: Hashable, Codable { + public struct LeaderboardSetReleases: Hashable, Codable, Sendable { public var data: [Data]? - public var links: Links? + public var links: RelationshipLinks? public var meta: PagingInformation? public init( data: [Data]? = nil, - links: Links? = nil, + links: RelationshipLinks? = nil, meta: PagingInformation? = nil ) { self.data = data @@ -785,7 +835,7 @@ public struct GameCenterDetail: Hashable, Codable { case meta } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -803,29 +853,10 @@ public struct GameCenterDetail: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case gameCenterLeaderboardSetReleases } } - - public struct Links: Hashable, Codable { - public var related: URL? - - public var `self`: URL? - - public init( - related: URL? = nil, - self _self: URL? = nil - ) { - self.related = related - self.`self` = _self - } - - private enum CodingKeys: String, CodingKey { - case related - case `self` = "self" - } - } } } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/GameCenterEnabledVersion.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/GameCenterEnabledVersion.generated.swift index 5a2e1b0a..c6392a67 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/GameCenterEnabledVersion.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/GameCenterEnabledVersion.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct GameCenterEnabledVersion: Hashable, Codable { +public struct GameCenterEnabledVersion: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -36,11 +36,11 @@ public struct GameCenterEnabledVersion: Hashable, Codable { case links } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case gameCenterEnabledVersions } - public struct Attributes: Hashable, Codable { + public struct Attributes: Hashable, Codable, Sendable { public var iconAsset: ImageAsset? public var platform: Platform? @@ -64,7 +64,7 @@ public struct GameCenterEnabledVersion: Hashable, Codable { } } - public struct Relationships: Hashable, Codable { + public struct Relationships: Hashable, Codable, Sendable { public var app: App? public var compatibleVersions: CompatibleVersions? @@ -82,25 +82,18 @@ public struct GameCenterEnabledVersion: Hashable, Codable { case compatibleVersions } - public struct App: Hashable, Codable { + public struct App: Hashable, Codable, Sendable { public var data: Data? - public var links: Links? - - public init( - data: Data? = nil, - links: Links? = nil - ) { + public init(data: Data? = nil) { self.data = data - self.links = links } private enum CodingKeys: String, CodingKey { case data - case links } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -118,41 +111,22 @@ public struct GameCenterEnabledVersion: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case apps } } - - public struct Links: Hashable, Codable { - public var related: URL? - - public var `self`: URL? - - public init( - related: URL? = nil, - self _self: URL? = nil - ) { - self.related = related - self.`self` = _self - } - - private enum CodingKeys: String, CodingKey { - case related - case `self` = "self" - } - } } - public struct CompatibleVersions: Hashable, Codable { + public struct CompatibleVersions: Hashable, Codable, Sendable { public var data: [Data]? - public var links: Links? + public var links: RelationshipLinks? public var meta: PagingInformation? public init( data: [Data]? = nil, - links: Links? = nil, + links: RelationshipLinks? = nil, meta: PagingInformation? = nil ) { self.data = data @@ -166,7 +140,7 @@ public struct GameCenterEnabledVersion: Hashable, Codable { case meta } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -184,29 +158,10 @@ public struct GameCenterEnabledVersion: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case gameCenterEnabledVersions } } - - public struct Links: Hashable, Codable { - public var related: URL? - - public var `self`: URL? - - public init( - related: URL? = nil, - self _self: URL? = nil - ) { - self.related = related - self.`self` = _self - } - - private enum CodingKeys: String, CodingKey { - case related - case `self` = "self" - } - } } } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/GameCenterGroup.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/GameCenterGroup.generated.swift index 9e0c8743..66be1599 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/GameCenterGroup.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/GameCenterGroup.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct GameCenterGroup: Hashable, Codable { +public struct GameCenterGroup: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -36,11 +36,11 @@ public struct GameCenterGroup: Hashable, Codable { case links } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case gameCenterGroups } - public struct Attributes: Hashable, Codable { + public struct Attributes: Hashable, Codable, Sendable { public var referenceName: String? public init(referenceName: String? = nil) { @@ -52,9 +52,13 @@ public struct GameCenterGroup: Hashable, Codable { } } - public struct Relationships: Hashable, Codable { + public struct Relationships: Hashable, Codable, Sendable { public var gameCenterAchievements: GameCenterAchievements? + public var gameCenterActivities: GameCenterActivities? + + public var gameCenterChallenges: GameCenterChallenges? + public var gameCenterDetails: GameCenterDetails? public var gameCenterLeaderboardSets: GameCenterLeaderboardSets? @@ -63,11 +67,15 @@ public struct GameCenterGroup: Hashable, Codable { public init( gameCenterAchievements: GameCenterAchievements? = nil, + gameCenterActivities: GameCenterActivities? = nil, + gameCenterChallenges: GameCenterChallenges? = nil, gameCenterDetails: GameCenterDetails? = nil, gameCenterLeaderboardSets: GameCenterLeaderboardSets? = nil, gameCenterLeaderboards: GameCenterLeaderboards? = nil ) { self.gameCenterAchievements = gameCenterAchievements + self.gameCenterActivities = gameCenterActivities + self.gameCenterChallenges = gameCenterChallenges self.gameCenterDetails = gameCenterDetails self.gameCenterLeaderboardSets = gameCenterLeaderboardSets self.gameCenterLeaderboards = gameCenterLeaderboards @@ -75,21 +83,23 @@ public struct GameCenterGroup: Hashable, Codable { private enum CodingKeys: String, CodingKey { case gameCenterAchievements + case gameCenterActivities + case gameCenterChallenges case gameCenterDetails case gameCenterLeaderboardSets case gameCenterLeaderboards } - public struct GameCenterAchievements: Hashable, Codable { + public struct GameCenterAchievements: Hashable, Codable, Sendable { public var data: [Data]? - public var links: Links? + public var links: RelationshipLinks? public var meta: PagingInformation? public init( data: [Data]? = nil, - links: Links? = nil, + links: RelationshipLinks? = nil, meta: PagingInformation? = nil ) { self.data = data @@ -103,7 +113,7 @@ public struct GameCenterGroup: Hashable, Codable { case meta } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -121,41 +131,69 @@ public struct GameCenterGroup: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case gameCenterAchievements } } + } + + public struct GameCenterActivities: Hashable, Codable, Sendable { + public var data: [Data]? + + public var links: RelationshipLinks? - public struct Links: Hashable, Codable { - public var related: URL? + public var meta: PagingInformation? + + public init( + data: [Data]? = nil, + links: RelationshipLinks? = nil, + meta: PagingInformation? = nil + ) { + self.data = data + self.links = links + self.meta = meta + } - public var `self`: URL? + private enum CodingKeys: String, CodingKey { + case data + case links + case meta + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` public init( - related: URL? = nil, - self _self: URL? = nil + id: String, + type: `Type` ) { - self.related = related - self.`self` = _self + self.id = id + self.type = type } private enum CodingKeys: String, CodingKey { - case related - case `self` = "self" + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case gameCenterActivities } } } - public struct GameCenterDetails: Hashable, Codable { + public struct GameCenterChallenges: Hashable, Codable, Sendable { public var data: [Data]? - public var links: Links? + public var links: RelationshipLinks? public var meta: PagingInformation? public init( data: [Data]? = nil, - links: Links? = nil, + links: RelationshipLinks? = nil, meta: PagingInformation? = nil ) { self.data = data @@ -169,7 +207,7 @@ public struct GameCenterGroup: Hashable, Codable { case meta } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -187,41 +225,69 @@ public struct GameCenterGroup: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { - case gameCenterDetails + public enum `Type`: String, Hashable, Codable, Sendable { + case gameCenterChallenges } } + } + + public struct GameCenterDetails: Hashable, Codable, Sendable { + public var data: [Data]? + + public var links: RelationshipLinks? + + public var meta: PagingInformation? + + public init( + data: [Data]? = nil, + links: RelationshipLinks? = nil, + meta: PagingInformation? = nil + ) { + self.data = data + self.links = links + self.meta = meta + } + + private enum CodingKeys: String, CodingKey { + case data + case links + case meta + } - public struct Links: Hashable, Codable { - public var related: URL? + public struct Data: Hashable, Codable, Sendable { + public var id: String - public var `self`: URL? + public var type: `Type` public init( - related: URL? = nil, - self _self: URL? = nil + id: String, + type: `Type` ) { - self.related = related - self.`self` = _self + self.id = id + self.type = type } private enum CodingKeys: String, CodingKey { - case related - case `self` = "self" + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case gameCenterDetails } } } - public struct GameCenterLeaderboardSets: Hashable, Codable { + public struct GameCenterLeaderboardSets: Hashable, Codable, Sendable { public var data: [Data]? - public var links: Links? + public var links: RelationshipLinks? public var meta: PagingInformation? public init( data: [Data]? = nil, - links: Links? = nil, + links: RelationshipLinks? = nil, meta: PagingInformation? = nil ) { self.data = data @@ -235,7 +301,7 @@ public struct GameCenterGroup: Hashable, Codable { case meta } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -253,41 +319,22 @@ public struct GameCenterGroup: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case gameCenterLeaderboardSets } } - - public struct Links: Hashable, Codable { - public var related: URL? - - public var `self`: URL? - - public init( - related: URL? = nil, - self _self: URL? = nil - ) { - self.related = related - self.`self` = _self - } - - private enum CodingKeys: String, CodingKey { - case related - case `self` = "self" - } - } } - public struct GameCenterLeaderboards: Hashable, Codable { + public struct GameCenterLeaderboards: Hashable, Codable, Sendable { public var data: [Data]? - public var links: Links? + public var links: RelationshipLinks? public var meta: PagingInformation? public init( data: [Data]? = nil, - links: Links? = nil, + links: RelationshipLinks? = nil, meta: PagingInformation? = nil ) { self.data = data @@ -301,7 +348,7 @@ public struct GameCenterGroup: Hashable, Codable { case meta } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -319,29 +366,10 @@ public struct GameCenterGroup: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case gameCenterLeaderboards } } - - public struct Links: Hashable, Codable { - public var related: URL? - - public var `self`: URL? - - public init( - related: URL? = nil, - self _self: URL? = nil - ) { - self.related = related - self.`self` = _self - } - - private enum CodingKeys: String, CodingKey { - case related - case `self` = "self" - } - } } } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/GameCenterLeaderboard.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/GameCenterLeaderboard.generated.swift index dc9164ae..4e0a449f 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/GameCenterLeaderboard.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/GameCenterLeaderboard.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct GameCenterLeaderboard: Hashable, Codable { +public struct GameCenterLeaderboard: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -36,11 +36,13 @@ public struct GameCenterLeaderboard: Hashable, Codable { case links } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case gameCenterLeaderboards } - public struct Attributes: Hashable, Codable { + public struct Attributes: Hashable, Codable, Sendable { + public var activityProperties: [String: String]? + public var archived: Bool? public var defaultFormatter: GameCenterLeaderboardFormatter? @@ -63,7 +65,10 @@ public struct GameCenterLeaderboard: Hashable, Codable { public var vendorIdentifier: String? + public var visibility: Visibility? + public init( + activityProperties: [String: String]? = nil, archived: Bool? = nil, defaultFormatter: GameCenterLeaderboardFormatter? = nil, recurrenceDuration: String? = nil, @@ -74,8 +79,10 @@ public struct GameCenterLeaderboard: Hashable, Codable { scoreRangeStart: String? = nil, scoreSortType: ScoreSortType? = nil, submissionType: SubmissionType? = nil, - vendorIdentifier: String? = nil + vendorIdentifier: String? = nil, + visibility: Visibility? = nil ) { + self.activityProperties = activityProperties self.archived = archived self.defaultFormatter = defaultFormatter self.recurrenceDuration = recurrenceDuration @@ -87,9 +94,11 @@ public struct GameCenterLeaderboard: Hashable, Codable { self.scoreSortType = scoreSortType self.submissionType = submissionType self.vendorIdentifier = vendorIdentifier + self.visibility = visibility } private enum CodingKeys: String, CodingKey { + case activityProperties case archived case defaultFormatter case recurrenceDuration @@ -101,60 +110,82 @@ public struct GameCenterLeaderboard: Hashable, Codable { case scoreSortType case submissionType case vendorIdentifier + case visibility } - public enum ScoreSortType: Hashable, Codable, RawRepresentable { - case asc - case desc - case unknown(String) + public struct ScoreSortType: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var asc: Self { + .init(rawValue: "ASC") + } - public var rawValue: String { - switch self { - case .asc: return "ASC" - case .desc: return "DESC" - case .unknown(let rawValue): return rawValue - } + public static var desc: Self { + .init(rawValue: "DESC") } + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "ASC": self = .asc - case "DESC": self = .desc - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum SubmissionType: Hashable, Codable, RawRepresentable { - case bestScore - case mostRecentScore - case unknown(String) + public struct SubmissionType: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var bestScore: Self { + .init(rawValue: "BEST_SCORE") + } - public var rawValue: String { - switch self { - case .bestScore: return "BEST_SCORE" - case .mostRecentScore: return "MOST_RECENT_SCORE" - case .unknown(let rawValue): return rawValue - } + public static var mostRecentScore: Self { + .init(rawValue: "MOST_RECENT_SCORE") + } + + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "BEST_SCORE": self = .bestScore - case "MOST_RECENT_SCORE": self = .mostRecentScore - default: self = .unknown(rawValue) - } + self.rawValue = rawValue + } + } + + public struct Visibility: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var hideForAll: Self { + .init(rawValue: "HIDE_FOR_ALL") + } + + public static var showForAll: Self { + .init(rawValue: "SHOW_FOR_ALL") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue } } } - public struct Relationships: Hashable, Codable { + public struct Relationships: Hashable, Codable, Sendable { + public var activity: Activity? + + public var challenge: Challenge? + public var gameCenterDetail: GameCenterDetail? public var gameCenterGroup: GameCenterGroup? public var gameCenterLeaderboardSets: GameCenterLeaderboardSets? + @available(*, deprecated) public var groupLeaderboard: GroupLeaderboard? public var localizations: Localizations? @@ -162,6 +193,8 @@ public struct GameCenterLeaderboard: Hashable, Codable { public var releases: Releases? public init( + activity: Activity? = nil, + challenge: Challenge? = nil, gameCenterDetail: GameCenterDetail? = nil, gameCenterGroup: GameCenterGroup? = nil, gameCenterLeaderboardSets: GameCenterLeaderboardSets? = nil, @@ -169,6 +202,8 @@ public struct GameCenterLeaderboard: Hashable, Codable { localizations: Localizations? = nil, releases: Releases? = nil ) { + self.activity = activity + self.challenge = challenge self.gameCenterDetail = gameCenterDetail self.gameCenterGroup = gameCenterGroup self.gameCenterLeaderboardSets = gameCenterLeaderboardSets @@ -178,6 +213,8 @@ public struct GameCenterLeaderboard: Hashable, Codable { } private enum CodingKeys: String, CodingKey { + case activity + case challenge case gameCenterDetail case gameCenterGroup case gameCenterLeaderboardSets @@ -186,14 +223,14 @@ public struct GameCenterLeaderboard: Hashable, Codable { case releases } - public struct GameCenterDetail: Hashable, Codable { + public struct Activity: Hashable, Codable, Sendable { public var data: Data? - public var links: Links? + public var links: RelationshipLinks? public init( data: Data? = nil, - links: Links? = nil + links: RelationshipLinks? = nil ) { self.data = data self.links = links @@ -204,7 +241,7 @@ public struct GameCenterLeaderboard: Hashable, Codable { case links } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -222,50 +259,66 @@ public struct GameCenterLeaderboard: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { - case gameCenterDetails + public enum `Type`: String, Hashable, Codable, Sendable { + case gameCenterActivities } } + } - public struct Links: Hashable, Codable { - public var related: URL? + public struct Challenge: Hashable, Codable, Sendable { + public var data: Data? - public var `self`: URL? + public var links: RelationshipLinks? + + public init( + data: Data? = nil, + links: RelationshipLinks? = nil + ) { + self.data = data + self.links = links + } + + private enum CodingKeys: String, CodingKey { + case data + case links + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` public init( - related: URL? = nil, - self _self: URL? = nil + id: String, + type: `Type` ) { - self.related = related - self.`self` = _self + self.id = id + self.type = type } private enum CodingKeys: String, CodingKey { - case related - case `self` = "self" + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case gameCenterChallenges } } } - public struct GameCenterGroup: Hashable, Codable { + public struct GameCenterDetail: Hashable, Codable, Sendable { public var data: Data? - public var links: Links? - - public init( - data: Data? = nil, - links: Links? = nil - ) { + public init(data: Data? = nil) { self.data = data - self.links = links } private enum CodingKeys: String, CodingKey { case data - case links } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -283,55 +336,66 @@ public struct GameCenterLeaderboard: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { - case gameCenterGroups + public enum `Type`: String, Hashable, Codable, Sendable { + case gameCenterDetails } } + } + + public struct GameCenterGroup: Hashable, Codable, Sendable { + public var data: Data? + + public init(data: Data? = nil) { + self.data = data + } + + private enum CodingKeys: String, CodingKey { + case data + } - public struct Links: Hashable, Codable { - public var related: URL? + public struct Data: Hashable, Codable, Sendable { + public var id: String - public var `self`: URL? + public var type: `Type` public init( - related: URL? = nil, - self _self: URL? = nil + id: String, + type: `Type` ) { - self.related = related - self.`self` = _self + self.id = id + self.type = type } private enum CodingKeys: String, CodingKey { - case related - case `self` = "self" + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case gameCenterGroups } } } - public struct GameCenterLeaderboardSets: Hashable, Codable { + public struct GameCenterLeaderboardSets: Hashable, Codable, Sendable { public var data: [Data]? - public var links: Links? - public var meta: PagingInformation? public init( data: [Data]? = nil, - links: Links? = nil, meta: PagingInformation? = nil ) { self.data = data - self.links = links self.meta = meta } private enum CodingKeys: String, CodingKey { case data - case links case meta } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -349,39 +413,20 @@ public struct GameCenterLeaderboard: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case gameCenterLeaderboardSets } } - - public struct Links: Hashable, Codable { - public var related: URL? - - public var `self`: URL? - - public init( - related: URL? = nil, - self _self: URL? = nil - ) { - self.related = related - self.`self` = _self - } - - private enum CodingKeys: String, CodingKey { - case related - case `self` = "self" - } - } } - public struct GroupLeaderboard: Hashable, Codable { + public struct GroupLeaderboard: Hashable, Codable, Sendable { public var data: Data? - public var links: Links? + public var links: RelationshipLinks? public init( data: Data? = nil, - links: Links? = nil + links: RelationshipLinks? = nil ) { self.data = data self.links = links @@ -392,7 +437,7 @@ public struct GameCenterLeaderboard: Hashable, Codable { case links } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -410,41 +455,22 @@ public struct GameCenterLeaderboard: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case gameCenterLeaderboards } } - - public struct Links: Hashable, Codable { - public var related: URL? - - public var `self`: URL? - - public init( - related: URL? = nil, - self _self: URL? = nil - ) { - self.related = related - self.`self` = _self - } - - private enum CodingKeys: String, CodingKey { - case related - case `self` = "self" - } - } } - public struct Localizations: Hashable, Codable { + public struct Localizations: Hashable, Codable, Sendable { public var data: [Data]? - public var links: Links? + public var links: RelationshipLinks? public var meta: PagingInformation? public init( data: [Data]? = nil, - links: Links? = nil, + links: RelationshipLinks? = nil, meta: PagingInformation? = nil ) { self.data = data @@ -458,7 +484,7 @@ public struct GameCenterLeaderboard: Hashable, Codable { case meta } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -476,41 +502,22 @@ public struct GameCenterLeaderboard: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case gameCenterLeaderboardLocalizations } } - - public struct Links: Hashable, Codable { - public var related: URL? - - public var `self`: URL? - - public init( - related: URL? = nil, - self _self: URL? = nil - ) { - self.related = related - self.`self` = _self - } - - private enum CodingKeys: String, CodingKey { - case related - case `self` = "self" - } - } } - public struct Releases: Hashable, Codable { + public struct Releases: Hashable, Codable, Sendable { public var data: [Data]? - public var links: Links? + public var links: RelationshipLinks? public var meta: PagingInformation? public init( data: [Data]? = nil, - links: Links? = nil, + links: RelationshipLinks? = nil, meta: PagingInformation? = nil ) { self.data = data @@ -524,7 +531,7 @@ public struct GameCenterLeaderboard: Hashable, Codable { case meta } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -542,29 +549,10 @@ public struct GameCenterLeaderboard: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case gameCenterLeaderboardReleases } } - - public struct Links: Hashable, Codable { - public var related: URL? - - public var `self`: URL? - - public init( - related: URL? = nil, - self _self: URL? = nil - ) { - self.related = related - self.`self` = _self - } - - private enum CodingKeys: String, CodingKey { - case related - case `self` = "self" - } - } } } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/GameCenterLeaderboardEntrySubmission.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/GameCenterLeaderboardEntrySubmission.generated.swift new file mode 100644 index 00000000..37dc6bee --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/GameCenterLeaderboardEntrySubmission.generated.swift @@ -0,0 +1,83 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct GameCenterLeaderboardEntrySubmission: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public var attributes: Attributes? + + public var links: ResourceLinks? + + public init( + id: String, + type: `Type`, + attributes: Attributes? = nil, + links: ResourceLinks? = nil + ) { + self.id = id + self.type = type + self.attributes = attributes + self.links = links + } + + private enum CodingKeys: String, CodingKey { + case id + case type + case attributes + case links + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case gameCenterLeaderboardEntrySubmissions + } + + public struct Attributes: Hashable, Codable, Sendable { + public var bundleId: String? + + public var challengeIds: [String]? + + public var context: String? + + public var scopedPlayerId: String? + + public var score: String? + + public var submittedDate: String? + + public var vendorIdentifier: String? + + public init( + bundleId: String? = nil, + challengeIds: [String]? = nil, + context: String? = nil, + scopedPlayerId: String? = nil, + score: String? = nil, + submittedDate: String? = nil, + vendorIdentifier: String? = nil + ) { + self.bundleId = bundleId + self.challengeIds = challengeIds + self.context = context + self.scopedPlayerId = scopedPlayerId + self.score = score + self.submittedDate = submittedDate + self.vendorIdentifier = vendorIdentifier + } + + private enum CodingKeys: String, CodingKey { + case bundleId + case challengeIds + case context + case scopedPlayerId + case score + case submittedDate + case vendorIdentifier + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/GameCenterLeaderboardFormatter.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/GameCenterLeaderboardFormatter.generated.swift index 370ed974..51f3ef4b 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/GameCenterLeaderboardFormatter.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/GameCenterLeaderboardFormatter.generated.swift @@ -3,73 +3,87 @@ // swiftlint:disable all import Foundation -public enum GameCenterLeaderboardFormatter: Hashable, Codable, RawRepresentable { - case decimalPoint1Place - case decimalPoint2Place - case decimalPoint3Place - case elapsedTimeMillisecond - case elapsedTimeMinute - case elapsedTimeSecond - case integer - case moneyDollar - case moneyDollarDecimal - case moneyEuro - case moneyEuroDecimal - case moneyFranc - case moneyFrancDecimal - case moneyKroner - case moneyKronerDecimal - case moneyPound - case moneyPoundDecimal - case moneyYen - case unknown(String) - - public var rawValue: String { - switch self { - case .decimalPoint1Place: return "DECIMAL_POINT_1_PLACE" - case .decimalPoint2Place: return "DECIMAL_POINT_2_PLACE" - case .decimalPoint3Place: return "DECIMAL_POINT_3_PLACE" - case .elapsedTimeMillisecond: return "ELAPSED_TIME_MILLISECOND" - case .elapsedTimeMinute: return "ELAPSED_TIME_MINUTE" - case .elapsedTimeSecond: return "ELAPSED_TIME_SECOND" - case .integer: return "INTEGER" - case .moneyDollar: return "MONEY_DOLLAR" - case .moneyDollarDecimal: return "MONEY_DOLLAR_DECIMAL" - case .moneyEuro: return "MONEY_EURO" - case .moneyEuroDecimal: return "MONEY_EURO_DECIMAL" - case .moneyFranc: return "MONEY_FRANC" - case .moneyFrancDecimal: return "MONEY_FRANC_DECIMAL" - case .moneyKroner: return "MONEY_KRONER" - case .moneyKronerDecimal: return "MONEY_KRONER_DECIMAL" - case .moneyPound: return "MONEY_POUND" - case .moneyPoundDecimal: return "MONEY_POUND_DECIMAL" - case .moneyYen: return "MONEY_YEN" - case .unknown(let rawValue): return rawValue - } +public struct GameCenterLeaderboardFormatter: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var decimalPoint1Place: Self { + .init(rawValue: "DECIMAL_POINT_1_PLACE") } + public static var decimalPoint2Place: Self { + .init(rawValue: "DECIMAL_POINT_2_PLACE") + } + + public static var decimalPoint3Place: Self { + .init(rawValue: "DECIMAL_POINT_3_PLACE") + } + + public static var elapsedTimeCentisecond: Self { + .init(rawValue: "ELAPSED_TIME_CENTISECOND") + } + + public static var elapsedTimeMinute: Self { + .init(rawValue: "ELAPSED_TIME_MINUTE") + } + + public static var elapsedTimeSecond: Self { + .init(rawValue: "ELAPSED_TIME_SECOND") + } + + public static var integer: Self { + .init(rawValue: "INTEGER") + } + + public static var moneyDollar: Self { + .init(rawValue: "MONEY_DOLLAR") + } + + public static var moneyDollarDecimal: Self { + .init(rawValue: "MONEY_DOLLAR_DECIMAL") + } + + public static var moneyEuro: Self { + .init(rawValue: "MONEY_EURO") + } + + public static var moneyEuroDecimal: Self { + .init(rawValue: "MONEY_EURO_DECIMAL") + } + + public static var moneyFranc: Self { + .init(rawValue: "MONEY_FRANC") + } + + public static var moneyFrancDecimal: Self { + .init(rawValue: "MONEY_FRANC_DECIMAL") + } + + public static var moneyKroner: Self { + .init(rawValue: "MONEY_KRONER") + } + + public static var moneyKronerDecimal: Self { + .init(rawValue: "MONEY_KRONER_DECIMAL") + } + + public static var moneyPound: Self { + .init(rawValue: "MONEY_POUND") + } + + public static var moneyPoundDecimal: Self { + .init(rawValue: "MONEY_POUND_DECIMAL") + } + + public static var moneyYen: Self { + .init(rawValue: "MONEY_YEN") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "DECIMAL_POINT_1_PLACE": self = .decimalPoint1Place - case "DECIMAL_POINT_2_PLACE": self = .decimalPoint2Place - case "DECIMAL_POINT_3_PLACE": self = .decimalPoint3Place - case "ELAPSED_TIME_MILLISECOND": self = .elapsedTimeMillisecond - case "ELAPSED_TIME_MINUTE": self = .elapsedTimeMinute - case "ELAPSED_TIME_SECOND": self = .elapsedTimeSecond - case "INTEGER": self = .integer - case "MONEY_DOLLAR": self = .moneyDollar - case "MONEY_DOLLAR_DECIMAL": self = .moneyDollarDecimal - case "MONEY_EURO": self = .moneyEuro - case "MONEY_EURO_DECIMAL": self = .moneyEuroDecimal - case "MONEY_FRANC": self = .moneyFranc - case "MONEY_FRANC_DECIMAL": self = .moneyFrancDecimal - case "MONEY_KRONER": self = .moneyKroner - case "MONEY_KRONER_DECIMAL": self = .moneyKronerDecimal - case "MONEY_POUND": self = .moneyPound - case "MONEY_POUND_DECIMAL": self = .moneyPoundDecimal - case "MONEY_YEN": self = .moneyYen - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/GameCenterLeaderboardImage.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/GameCenterLeaderboardImage.generated.swift index 8661d69b..4e5e14f3 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/GameCenterLeaderboardImage.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/GameCenterLeaderboardImage.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct GameCenterLeaderboardImage: Hashable, Codable { +public struct GameCenterLeaderboardImage: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -36,11 +36,11 @@ public struct GameCenterLeaderboardImage: Hashable, Codable { case links } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case gameCenterLeaderboardImages } - public struct Attributes: Hashable, Codable { + public struct Attributes: Hashable, Codable, Sendable { public var assetDeliveryState: AppMediaAssetState? public var fileName: String? @@ -74,7 +74,7 @@ public struct GameCenterLeaderboardImage: Hashable, Codable { } } - public struct Relationships: Hashable, Codable { + public struct Relationships: Hashable, Codable, Sendable { public var gameCenterLeaderboardLocalization: GameCenterLeaderboardLocalization? public init(gameCenterLeaderboardLocalization: GameCenterLeaderboardLocalization? = nil) { @@ -85,25 +85,18 @@ public struct GameCenterLeaderboardImage: Hashable, Codable { case gameCenterLeaderboardLocalization } - public struct GameCenterLeaderboardLocalization: Hashable, Codable { + public struct GameCenterLeaderboardLocalization: Hashable, Codable, Sendable { public var data: Data? - public var links: Links? - - public init( - data: Data? = nil, - links: Links? = nil - ) { + public init(data: Data? = nil) { self.data = data - self.links = links } private enum CodingKeys: String, CodingKey { case data - case links } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -121,29 +114,10 @@ public struct GameCenterLeaderboardImage: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case gameCenterLeaderboardLocalizations } } - - public struct Links: Hashable, Codable { - public var related: URL? - - public var `self`: URL? - - public init( - related: URL? = nil, - self _self: URL? = nil - ) { - self.related = related - self.`self` = _self - } - - private enum CodingKeys: String, CodingKey { - case related - case `self` = "self" - } - } } } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/GameCenterLeaderboardLocalization.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/GameCenterLeaderboardLocalization.generated.swift index bbdb21ed..a9b94718 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/GameCenterLeaderboardLocalization.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/GameCenterLeaderboardLocalization.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct GameCenterLeaderboardLocalization: Hashable, Codable { +public struct GameCenterLeaderboardLocalization: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -36,11 +36,11 @@ public struct GameCenterLeaderboardLocalization: Hashable, Codable { case links } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case gameCenterLeaderboardLocalizations } - public struct Attributes: Hashable, Codable { + public struct Attributes: Hashable, Codable, Sendable { public var formatterOverride: GameCenterLeaderboardFormatter? public var formatterSuffix: String? @@ -74,7 +74,7 @@ public struct GameCenterLeaderboardLocalization: Hashable, Codable { } } - public struct Relationships: Hashable, Codable { + public struct Relationships: Hashable, Codable, Sendable { public var gameCenterLeaderboard: GameCenterLeaderboard? public var gameCenterLeaderboardImage: GameCenterLeaderboardImage? @@ -92,25 +92,18 @@ public struct GameCenterLeaderboardLocalization: Hashable, Codable { case gameCenterLeaderboardImage } - public struct GameCenterLeaderboard: Hashable, Codable { + public struct GameCenterLeaderboard: Hashable, Codable, Sendable { public var data: Data? - public var links: Links? - - public init( - data: Data? = nil, - links: Links? = nil - ) { + public init(data: Data? = nil) { self.data = data - self.links = links } private enum CodingKeys: String, CodingKey { case data - case links } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -128,39 +121,20 @@ public struct GameCenterLeaderboardLocalization: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case gameCenterLeaderboards } } - - public struct Links: Hashable, Codable { - public var related: URL? - - public var `self`: URL? - - public init( - related: URL? = nil, - self _self: URL? = nil - ) { - self.related = related - self.`self` = _self - } - - private enum CodingKeys: String, CodingKey { - case related - case `self` = "self" - } - } } - public struct GameCenterLeaderboardImage: Hashable, Codable { + public struct GameCenterLeaderboardImage: Hashable, Codable, Sendable { public var data: Data? - public var links: Links? + public var links: RelationshipLinks? public init( data: Data? = nil, - links: Links? = nil + links: RelationshipLinks? = nil ) { self.data = data self.links = links @@ -171,7 +145,7 @@ public struct GameCenterLeaderboardLocalization: Hashable, Codable { case links } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -189,29 +163,10 @@ public struct GameCenterLeaderboardLocalization: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case gameCenterLeaderboardImages } } - - public struct Links: Hashable, Codable { - public var related: URL? - - public var `self`: URL? - - public init( - related: URL? = nil, - self _self: URL? = nil - ) { - self.related = related - self.`self` = _self - } - - private enum CodingKeys: String, CodingKey { - case related - case `self` = "self" - } - } } } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/GameCenterLeaderboardRelease.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/GameCenterLeaderboardRelease.generated.swift index f5eecf9e..50c44b50 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/GameCenterLeaderboardRelease.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/GameCenterLeaderboardRelease.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct GameCenterLeaderboardRelease: Hashable, Codable { +public struct GameCenterLeaderboardRelease: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -36,11 +36,11 @@ public struct GameCenterLeaderboardRelease: Hashable, Codable { case links } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case gameCenterLeaderboardReleases } - public struct Attributes: Hashable, Codable { + public struct Attributes: Hashable, Codable, Sendable { public var live: Bool? public init(live: Bool? = nil) { @@ -52,7 +52,7 @@ public struct GameCenterLeaderboardRelease: Hashable, Codable { } } - public struct Relationships: Hashable, Codable { + public struct Relationships: Hashable, Codable, Sendable { public var gameCenterDetail: GameCenterDetail? public var gameCenterLeaderboard: GameCenterLeaderboard? @@ -70,25 +70,18 @@ public struct GameCenterLeaderboardRelease: Hashable, Codable { case gameCenterLeaderboard } - public struct GameCenterDetail: Hashable, Codable { + public struct GameCenterDetail: Hashable, Codable, Sendable { public var data: Data? - public var links: Links? - - public init( - data: Data? = nil, - links: Links? = nil - ) { + public init(data: Data? = nil) { self.data = data - self.links = links } private enum CodingKeys: String, CodingKey { case data - case links } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -106,50 +99,24 @@ public struct GameCenterLeaderboardRelease: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case gameCenterDetails } } - - public struct Links: Hashable, Codable { - public var related: URL? - - public var `self`: URL? - - public init( - related: URL? = nil, - self _self: URL? = nil - ) { - self.related = related - self.`self` = _self - } - - private enum CodingKeys: String, CodingKey { - case related - case `self` = "self" - } - } } - public struct GameCenterLeaderboard: Hashable, Codable { + public struct GameCenterLeaderboard: Hashable, Codable, Sendable { public var data: Data? - public var links: Links? - - public init( - data: Data? = nil, - links: Links? = nil - ) { + public init(data: Data? = nil) { self.data = data - self.links = links } private enum CodingKeys: String, CodingKey { case data - case links } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -167,29 +134,10 @@ public struct GameCenterLeaderboardRelease: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case gameCenterLeaderboards } } - - public struct Links: Hashable, Codable { - public var related: URL? - - public var `self`: URL? - - public init( - related: URL? = nil, - self _self: URL? = nil - ) { - self.related = related - self.`self` = _self - } - - private enum CodingKeys: String, CodingKey { - case related - case `self` = "self" - } - } } } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/GameCenterLeaderboardSet.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/GameCenterLeaderboardSet.generated.swift index 1ae34614..d3944084 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/GameCenterLeaderboardSet.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/GameCenterLeaderboardSet.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct GameCenterLeaderboardSet: Hashable, Codable { +public struct GameCenterLeaderboardSet: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -36,11 +36,11 @@ public struct GameCenterLeaderboardSet: Hashable, Codable { case links } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case gameCenterLeaderboardSets } - public struct Attributes: Hashable, Codable { + public struct Attributes: Hashable, Codable, Sendable { public var referenceName: String? public var vendorIdentifier: String? @@ -59,13 +59,14 @@ public struct GameCenterLeaderboardSet: Hashable, Codable { } } - public struct Relationships: Hashable, Codable { + public struct Relationships: Hashable, Codable, Sendable { public var gameCenterDetail: GameCenterDetail? public var gameCenterGroup: GameCenterGroup? public var gameCenterLeaderboards: GameCenterLeaderboards? + @available(*, deprecated) public var groupLeaderboardSet: GroupLeaderboardSet? public var localizations: Localizations? @@ -97,25 +98,18 @@ public struct GameCenterLeaderboardSet: Hashable, Codable { case releases } - public struct GameCenterDetail: Hashable, Codable { + public struct GameCenterDetail: Hashable, Codable, Sendable { public var data: Data? - public var links: Links? - - public init( - data: Data? = nil, - links: Links? = nil - ) { + public init(data: Data? = nil) { self.data = data - self.links = links } private enum CodingKeys: String, CodingKey { case data - case links } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -133,50 +127,24 @@ public struct GameCenterLeaderboardSet: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case gameCenterDetails } } - - public struct Links: Hashable, Codable { - public var related: URL? - - public var `self`: URL? - - public init( - related: URL? = nil, - self _self: URL? = nil - ) { - self.related = related - self.`self` = _self - } - - private enum CodingKeys: String, CodingKey { - case related - case `self` = "self" - } - } } - public struct GameCenterGroup: Hashable, Codable { + public struct GameCenterGroup: Hashable, Codable, Sendable { public var data: Data? - public var links: Links? - - public init( - data: Data? = nil, - links: Links? = nil - ) { + public init(data: Data? = nil) { self.data = data - self.links = links } private enum CodingKeys: String, CodingKey { case data - case links } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -194,41 +162,22 @@ public struct GameCenterLeaderboardSet: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case gameCenterGroups } } - - public struct Links: Hashable, Codable { - public var related: URL? - - public var `self`: URL? - - public init( - related: URL? = nil, - self _self: URL? = nil - ) { - self.related = related - self.`self` = _self - } - - private enum CodingKeys: String, CodingKey { - case related - case `self` = "self" - } - } } - public struct GameCenterLeaderboards: Hashable, Codable { + public struct GameCenterLeaderboards: Hashable, Codable, Sendable { public var data: [Data]? - public var links: Links? + public var links: RelationshipLinks? public var meta: PagingInformation? public init( data: [Data]? = nil, - links: Links? = nil, + links: RelationshipLinks? = nil, meta: PagingInformation? = nil ) { self.data = data @@ -242,7 +191,7 @@ public struct GameCenterLeaderboardSet: Hashable, Codable { case meta } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -260,39 +209,20 @@ public struct GameCenterLeaderboardSet: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case gameCenterLeaderboards } } - - public struct Links: Hashable, Codable { - public var related: URL? - - public var `self`: URL? - - public init( - related: URL? = nil, - self _self: URL? = nil - ) { - self.related = related - self.`self` = _self - } - - private enum CodingKeys: String, CodingKey { - case related - case `self` = "self" - } - } } - public struct GroupLeaderboardSet: Hashable, Codable { + public struct GroupLeaderboardSet: Hashable, Codable, Sendable { public var data: Data? - public var links: Links? + public var links: RelationshipLinks? public init( data: Data? = nil, - links: Links? = nil + links: RelationshipLinks? = nil ) { self.data = data self.links = links @@ -303,7 +233,7 @@ public struct GameCenterLeaderboardSet: Hashable, Codable { case links } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -321,41 +251,22 @@ public struct GameCenterLeaderboardSet: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case gameCenterLeaderboardSets } } - - public struct Links: Hashable, Codable { - public var related: URL? - - public var `self`: URL? - - public init( - related: URL? = nil, - self _self: URL? = nil - ) { - self.related = related - self.`self` = _self - } - - private enum CodingKeys: String, CodingKey { - case related - case `self` = "self" - } - } } - public struct Localizations: Hashable, Codable { + public struct Localizations: Hashable, Codable, Sendable { public var data: [Data]? - public var links: Links? + public var links: RelationshipLinks? public var meta: PagingInformation? public init( data: [Data]? = nil, - links: Links? = nil, + links: RelationshipLinks? = nil, meta: PagingInformation? = nil ) { self.data = data @@ -369,7 +280,7 @@ public struct GameCenterLeaderboardSet: Hashable, Codable { case meta } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -387,41 +298,22 @@ public struct GameCenterLeaderboardSet: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case gameCenterLeaderboardSetLocalizations } } - - public struct Links: Hashable, Codable { - public var related: URL? - - public var `self`: URL? - - public init( - related: URL? = nil, - self _self: URL? = nil - ) { - self.related = related - self.`self` = _self - } - - private enum CodingKeys: String, CodingKey { - case related - case `self` = "self" - } - } } - public struct Releases: Hashable, Codable { + public struct Releases: Hashable, Codable, Sendable { public var data: [Data]? - public var links: Links? + public var links: RelationshipLinks? public var meta: PagingInformation? public init( data: [Data]? = nil, - links: Links? = nil, + links: RelationshipLinks? = nil, meta: PagingInformation? = nil ) { self.data = data @@ -435,7 +327,7 @@ public struct GameCenterLeaderboardSet: Hashable, Codable { case meta } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -453,29 +345,10 @@ public struct GameCenterLeaderboardSet: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case gameCenterLeaderboardSetReleases } } - - public struct Links: Hashable, Codable { - public var related: URL? - - public var `self`: URL? - - public init( - related: URL? = nil, - self _self: URL? = nil - ) { - self.related = related - self.`self` = _self - } - - private enum CodingKeys: String, CodingKey { - case related - case `self` = "self" - } - } } } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/GameCenterLeaderboardSetImage.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/GameCenterLeaderboardSetImage.generated.swift index 83bf3575..ebe3db87 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/GameCenterLeaderboardSetImage.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/GameCenterLeaderboardSetImage.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct GameCenterLeaderboardSetImage: Hashable, Codable { +public struct GameCenterLeaderboardSetImage: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -36,11 +36,11 @@ public struct GameCenterLeaderboardSetImage: Hashable, Codable { case links } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case gameCenterLeaderboardSetImages } - public struct Attributes: Hashable, Codable { + public struct Attributes: Hashable, Codable, Sendable { public var assetDeliveryState: AppMediaAssetState? public var fileName: String? @@ -74,7 +74,7 @@ public struct GameCenterLeaderboardSetImage: Hashable, Codable { } } - public struct Relationships: Hashable, Codable { + public struct Relationships: Hashable, Codable, Sendable { public var gameCenterLeaderboardSetLocalization: GameCenterLeaderboardSetLocalization? public init(gameCenterLeaderboardSetLocalization: GameCenterLeaderboardSetLocalization? = nil) { @@ -85,25 +85,18 @@ public struct GameCenterLeaderboardSetImage: Hashable, Codable { case gameCenterLeaderboardSetLocalization } - public struct GameCenterLeaderboardSetLocalization: Hashable, Codable { + public struct GameCenterLeaderboardSetLocalization: Hashable, Codable, Sendable { public var data: Data? - public var links: Links? - - public init( - data: Data? = nil, - links: Links? = nil - ) { + public init(data: Data? = nil) { self.data = data - self.links = links } private enum CodingKeys: String, CodingKey { case data - case links } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -121,29 +114,10 @@ public struct GameCenterLeaderboardSetImage: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case gameCenterLeaderboardSetLocalizations } } - - public struct Links: Hashable, Codable { - public var related: URL? - - public var `self`: URL? - - public init( - related: URL? = nil, - self _self: URL? = nil - ) { - self.related = related - self.`self` = _self - } - - private enum CodingKeys: String, CodingKey { - case related - case `self` = "self" - } - } } } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/GameCenterLeaderboardSetLocalization.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/GameCenterLeaderboardSetLocalization.generated.swift index b5ab6c86..74a1b76f 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/GameCenterLeaderboardSetLocalization.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/GameCenterLeaderboardSetLocalization.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct GameCenterLeaderboardSetLocalization: Hashable, Codable { +public struct GameCenterLeaderboardSetLocalization: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -36,11 +36,11 @@ public struct GameCenterLeaderboardSetLocalization: Hashable, Codable { case links } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case gameCenterLeaderboardSetLocalizations } - public struct Attributes: Hashable, Codable { + public struct Attributes: Hashable, Codable, Sendable { public var locale: String? public var name: String? @@ -59,7 +59,7 @@ public struct GameCenterLeaderboardSetLocalization: Hashable, Codable { } } - public struct Relationships: Hashable, Codable { + public struct Relationships: Hashable, Codable, Sendable { public var gameCenterLeaderboardSet: GameCenterLeaderboardSet? public var gameCenterLeaderboardSetImage: GameCenterLeaderboardSetImage? @@ -77,25 +77,18 @@ public struct GameCenterLeaderboardSetLocalization: Hashable, Codable { case gameCenterLeaderboardSetImage } - public struct GameCenterLeaderboardSet: Hashable, Codable { + public struct GameCenterLeaderboardSet: Hashable, Codable, Sendable { public var data: Data? - public var links: Links? - - public init( - data: Data? = nil, - links: Links? = nil - ) { + public init(data: Data? = nil) { self.data = data - self.links = links } private enum CodingKeys: String, CodingKey { case data - case links } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -113,39 +106,20 @@ public struct GameCenterLeaderboardSetLocalization: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case gameCenterLeaderboardSets } } - - public struct Links: Hashable, Codable { - public var related: URL? - - public var `self`: URL? - - public init( - related: URL? = nil, - self _self: URL? = nil - ) { - self.related = related - self.`self` = _self - } - - private enum CodingKeys: String, CodingKey { - case related - case `self` = "self" - } - } } - public struct GameCenterLeaderboardSetImage: Hashable, Codable { + public struct GameCenterLeaderboardSetImage: Hashable, Codable, Sendable { public var data: Data? - public var links: Links? + public var links: RelationshipLinks? public init( data: Data? = nil, - links: Links? = nil + links: RelationshipLinks? = nil ) { self.data = data self.links = links @@ -156,7 +130,7 @@ public struct GameCenterLeaderboardSetLocalization: Hashable, Codable { case links } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -174,29 +148,10 @@ public struct GameCenterLeaderboardSetLocalization: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case gameCenterLeaderboardSetImages } } - - public struct Links: Hashable, Codable { - public var related: URL? - - public var `self`: URL? - - public init( - related: URL? = nil, - self _self: URL? = nil - ) { - self.related = related - self.`self` = _self - } - - private enum CodingKeys: String, CodingKey { - case related - case `self` = "self" - } - } } } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/GameCenterLeaderboardSetMemberLocalization.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/GameCenterLeaderboardSetMemberLocalization.generated.swift index 9c54b929..3cae6e4d 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/GameCenterLeaderboardSetMemberLocalization.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/GameCenterLeaderboardSetMemberLocalization.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct GameCenterLeaderboardSetMemberLocalization: Hashable, Codable { +public struct GameCenterLeaderboardSetMemberLocalization: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -36,11 +36,11 @@ public struct GameCenterLeaderboardSetMemberLocalization: Hashable, Codable { case links } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case gameCenterLeaderboardSetMemberLocalizations } - public struct Attributes: Hashable, Codable { + public struct Attributes: Hashable, Codable, Sendable { public var locale: String? public var name: String? @@ -59,7 +59,7 @@ public struct GameCenterLeaderboardSetMemberLocalization: Hashable, Codable { } } - public struct Relationships: Hashable, Codable { + public struct Relationships: Hashable, Codable, Sendable { public var gameCenterLeaderboard: GameCenterLeaderboard? public var gameCenterLeaderboardSet: GameCenterLeaderboardSet? @@ -77,14 +77,14 @@ public struct GameCenterLeaderboardSetMemberLocalization: Hashable, Codable { case gameCenterLeaderboardSet } - public struct GameCenterLeaderboard: Hashable, Codable { + public struct GameCenterLeaderboard: Hashable, Codable, Sendable { public var data: Data? - public var links: Links? + public var links: RelationshipLinks? public init( data: Data? = nil, - links: Links? = nil + links: RelationshipLinks? = nil ) { self.data = data self.links = links @@ -95,7 +95,7 @@ public struct GameCenterLeaderboardSetMemberLocalization: Hashable, Codable { case links } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -113,39 +113,20 @@ public struct GameCenterLeaderboardSetMemberLocalization: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case gameCenterLeaderboards } } - - public struct Links: Hashable, Codable { - public var related: URL? - - public var `self`: URL? - - public init( - related: URL? = nil, - self _self: URL? = nil - ) { - self.related = related - self.`self` = _self - } - - private enum CodingKeys: String, CodingKey { - case related - case `self` = "self" - } - } } - public struct GameCenterLeaderboardSet: Hashable, Codable { + public struct GameCenterLeaderboardSet: Hashable, Codable, Sendable { public var data: Data? - public var links: Links? + public var links: RelationshipLinks? public init( data: Data? = nil, - links: Links? = nil + links: RelationshipLinks? = nil ) { self.data = data self.links = links @@ -156,7 +137,7 @@ public struct GameCenterLeaderboardSetMemberLocalization: Hashable, Codable { case links } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -174,29 +155,10 @@ public struct GameCenterLeaderboardSetMemberLocalization: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case gameCenterLeaderboardSets } } - - public struct Links: Hashable, Codable { - public var related: URL? - - public var `self`: URL? - - public init( - related: URL? = nil, - self _self: URL? = nil - ) { - self.related = related - self.`self` = _self - } - - private enum CodingKeys: String, CodingKey { - case related - case `self` = "self" - } - } } } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/GameCenterLeaderboardSetRelease.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/GameCenterLeaderboardSetRelease.generated.swift index 2ebfcaea..4a2424a1 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/GameCenterLeaderboardSetRelease.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/GameCenterLeaderboardSetRelease.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct GameCenterLeaderboardSetRelease: Hashable, Codable { +public struct GameCenterLeaderboardSetRelease: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -36,11 +36,11 @@ public struct GameCenterLeaderboardSetRelease: Hashable, Codable { case links } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case gameCenterLeaderboardSetReleases } - public struct Attributes: Hashable, Codable { + public struct Attributes: Hashable, Codable, Sendable { public var live: Bool? public init(live: Bool? = nil) { @@ -52,7 +52,7 @@ public struct GameCenterLeaderboardSetRelease: Hashable, Codable { } } - public struct Relationships: Hashable, Codable { + public struct Relationships: Hashable, Codable, Sendable { public var gameCenterDetail: GameCenterDetail? public var gameCenterLeaderboardSet: GameCenterLeaderboardSet? @@ -70,25 +70,18 @@ public struct GameCenterLeaderboardSetRelease: Hashable, Codable { case gameCenterLeaderboardSet } - public struct GameCenterDetail: Hashable, Codable { + public struct GameCenterDetail: Hashable, Codable, Sendable { public var data: Data? - public var links: Links? - - public init( - data: Data? = nil, - links: Links? = nil - ) { + public init(data: Data? = nil) { self.data = data - self.links = links } private enum CodingKeys: String, CodingKey { case data - case links } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -106,50 +99,24 @@ public struct GameCenterLeaderboardSetRelease: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case gameCenterDetails } } - - public struct Links: Hashable, Codable { - public var related: URL? - - public var `self`: URL? - - public init( - related: URL? = nil, - self _self: URL? = nil - ) { - self.related = related - self.`self` = _self - } - - private enum CodingKeys: String, CodingKey { - case related - case `self` = "self" - } - } } - public struct GameCenterLeaderboardSet: Hashable, Codable { + public struct GameCenterLeaderboardSet: Hashable, Codable, Sendable { public var data: Data? - public var links: Links? - - public init( - data: Data? = nil, - links: Links? = nil - ) { + public init(data: Data? = nil) { self.data = data - self.links = links } private enum CodingKeys: String, CodingKey { case data - case links } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -167,29 +134,10 @@ public struct GameCenterLeaderboardSetRelease: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case gameCenterLeaderboardSets } } - - public struct Links: Hashable, Codable { - public var related: URL? - - public var `self`: URL? - - public init( - related: URL? = nil, - self _self: URL? = nil - ) { - self.related = related - self.`self` = _self - } - - private enum CodingKeys: String, CodingKey { - case related - case `self` = "self" - } - } } } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/GameCenterMatchmakingQueue.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/GameCenterMatchmakingQueue.generated.swift index 93a1812a..8bfdf39a 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/GameCenterMatchmakingQueue.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/GameCenterMatchmakingQueue.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct GameCenterMatchmakingQueue: Hashable, Codable { +public struct GameCenterMatchmakingQueue: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -36,23 +36,30 @@ public struct GameCenterMatchmakingQueue: Hashable, Codable { case links } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case gameCenterMatchmakingQueues } - public struct Attributes: Hashable, Codable { + public struct Attributes: Hashable, Codable, Sendable { + public var classicMatchmakingBundleIds: [String]? + public var referenceName: String? - public init(referenceName: String? = nil) { + public init( + classicMatchmakingBundleIds: [String]? = nil, + referenceName: String? = nil + ) { + self.classicMatchmakingBundleIds = classicMatchmakingBundleIds self.referenceName = referenceName } private enum CodingKeys: String, CodingKey { + case classicMatchmakingBundleIds case referenceName } } - public struct Relationships: Hashable, Codable { + public struct Relationships: Hashable, Codable, Sendable { public var experimentRuleSet: ExperimentRuleSet? public var ruleSet: RuleSet? @@ -70,25 +77,18 @@ public struct GameCenterMatchmakingQueue: Hashable, Codable { case ruleSet } - public struct ExperimentRuleSet: Hashable, Codable { + public struct ExperimentRuleSet: Hashable, Codable, Sendable { public var data: Data? - public var links: Links? - - public init( - data: Data? = nil, - links: Links? = nil - ) { + public init(data: Data? = nil) { self.data = data - self.links = links } private enum CodingKeys: String, CodingKey { case data - case links } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -106,50 +106,24 @@ public struct GameCenterMatchmakingQueue: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case gameCenterMatchmakingRuleSets } } - - public struct Links: Hashable, Codable { - public var related: URL? - - public var `self`: URL? - - public init( - related: URL? = nil, - self _self: URL? = nil - ) { - self.related = related - self.`self` = _self - } - - private enum CodingKeys: String, CodingKey { - case related - case `self` = "self" - } - } } - public struct RuleSet: Hashable, Codable { + public struct RuleSet: Hashable, Codable, Sendable { public var data: Data? - public var links: Links? - - public init( - data: Data? = nil, - links: Links? = nil - ) { + public init(data: Data? = nil) { self.data = data - self.links = links } private enum CodingKeys: String, CodingKey { case data - case links } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -167,29 +141,10 @@ public struct GameCenterMatchmakingQueue: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case gameCenterMatchmakingRuleSets } } - - public struct Links: Hashable, Codable { - public var related: URL? - - public var `self`: URL? - - public init( - related: URL? = nil, - self _self: URL? = nil - ) { - self.related = related - self.`self` = _self - } - - private enum CodingKeys: String, CodingKey { - case related - case `self` = "self" - } - } } } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/GameCenterMatchmakingRule.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/GameCenterMatchmakingRule.generated.swift index abcd17b7..5e37ffee 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/GameCenterMatchmakingRule.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/GameCenterMatchmakingRule.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct GameCenterMatchmakingRule: Hashable, Codable { +public struct GameCenterMatchmakingRule: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -31,11 +31,11 @@ public struct GameCenterMatchmakingRule: Hashable, Codable { case links } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case gameCenterMatchmakingRules } - public struct Attributes: Hashable, Codable { + public struct Attributes: Hashable, Codable, Sendable { public var type: `Type`? public var description: String? @@ -68,31 +68,31 @@ public struct GameCenterMatchmakingRule: Hashable, Codable { case weight } - public enum `Type`: Hashable, Codable, RawRepresentable { - case compatible - case distance - case match - case team - case unknown(String) - - public var rawValue: String { - switch self { - case .compatible: return "COMPATIBLE" - case .distance: return "DISTANCE" - case .match: return "MATCH" - case .team: return "TEAM" - case .unknown(let rawValue): return rawValue - } + public struct `Type`: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var compatible: Self { + .init(rawValue: "COMPATIBLE") } + public static var distance: Self { + .init(rawValue: "DISTANCE") + } + + public static var match: Self { + .init(rawValue: "MATCH") + } + + public static var team: Self { + .init(rawValue: "TEAM") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "COMPATIBLE": self = .compatible - case "DISTANCE": self = .distance - case "MATCH": self = .match - case "TEAM": self = .team - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/GameCenterMatchmakingRuleSet.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/GameCenterMatchmakingRuleSet.generated.swift index c1e7b97f..30a94fb6 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/GameCenterMatchmakingRuleSet.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/GameCenterMatchmakingRuleSet.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct GameCenterMatchmakingRuleSet: Hashable, Codable { +public struct GameCenterMatchmakingRuleSet: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -36,11 +36,11 @@ public struct GameCenterMatchmakingRuleSet: Hashable, Codable { case links } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case gameCenterMatchmakingRuleSets } - public struct Attributes: Hashable, Codable { + public struct Attributes: Hashable, Codable, Sendable { public var maxPlayers: Int? public var minPlayers: Int? @@ -69,7 +69,7 @@ public struct GameCenterMatchmakingRuleSet: Hashable, Codable { } } - public struct Relationships: Hashable, Codable { + public struct Relationships: Hashable, Codable, Sendable { public var matchmakingQueues: MatchmakingQueues? public var rules: Rules? @@ -92,16 +92,16 @@ public struct GameCenterMatchmakingRuleSet: Hashable, Codable { case teams } - public struct MatchmakingQueues: Hashable, Codable { + public struct MatchmakingQueues: Hashable, Codable, Sendable { public var data: [Data]? - public var links: Links? + public var links: RelationshipLinks? public var meta: PagingInformation? public init( data: [Data]? = nil, - links: Links? = nil, + links: RelationshipLinks? = nil, meta: PagingInformation? = nil ) { self.data = data @@ -115,7 +115,7 @@ public struct GameCenterMatchmakingRuleSet: Hashable, Codable { case meta } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -133,41 +133,22 @@ public struct GameCenterMatchmakingRuleSet: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case gameCenterMatchmakingQueues } } - - public struct Links: Hashable, Codable { - public var related: URL? - - public var `self`: URL? - - public init( - related: URL? = nil, - self _self: URL? = nil - ) { - self.related = related - self.`self` = _self - } - - private enum CodingKeys: String, CodingKey { - case related - case `self` = "self" - } - } } - public struct Rules: Hashable, Codable { + public struct Rules: Hashable, Codable, Sendable { public var data: [Data]? - public var links: Links? + public var links: RelationshipLinks? public var meta: PagingInformation? public init( data: [Data]? = nil, - links: Links? = nil, + links: RelationshipLinks? = nil, meta: PagingInformation? = nil ) { self.data = data @@ -181,7 +162,7 @@ public struct GameCenterMatchmakingRuleSet: Hashable, Codable { case meta } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -199,41 +180,22 @@ public struct GameCenterMatchmakingRuleSet: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case gameCenterMatchmakingRules } } - - public struct Links: Hashable, Codable { - public var related: URL? - - public var `self`: URL? - - public init( - related: URL? = nil, - self _self: URL? = nil - ) { - self.related = related - self.`self` = _self - } - - private enum CodingKeys: String, CodingKey { - case related - case `self` = "self" - } - } } - public struct Teams: Hashable, Codable { + public struct Teams: Hashable, Codable, Sendable { public var data: [Data]? - public var links: Links? + public var links: RelationshipLinks? public var meta: PagingInformation? public init( data: [Data]? = nil, - links: Links? = nil, + links: RelationshipLinks? = nil, meta: PagingInformation? = nil ) { self.data = data @@ -247,7 +209,7 @@ public struct GameCenterMatchmakingRuleSet: Hashable, Codable { case meta } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -265,29 +227,10 @@ public struct GameCenterMatchmakingRuleSet: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case gameCenterMatchmakingTeams } } - - public struct Links: Hashable, Codable { - public var related: URL? - - public var `self`: URL? - - public init( - related: URL? = nil, - self _self: URL? = nil - ) { - self.related = related - self.`self` = _self - } - - private enum CodingKeys: String, CodingKey { - case related - case `self` = "self" - } - } } } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/GameCenterMatchmakingRuleSetTest.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/GameCenterMatchmakingRuleSetTest.generated.swift index 15fbcaf3..d48617b2 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/GameCenterMatchmakingRuleSetTest.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/GameCenterMatchmakingRuleSetTest.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct GameCenterMatchmakingRuleSetTest: Hashable, Codable { +public struct GameCenterMatchmakingRuleSetTest: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -31,11 +31,11 @@ public struct GameCenterMatchmakingRuleSetTest: Hashable, Codable { case links } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case gameCenterMatchmakingRuleSetTests } - public struct Attributes: Hashable, Codable { + public struct Attributes: Hashable, Codable, Sendable { public var matchmakingResults: [[MatchmakingResults]]? public init(matchmakingResults: [[MatchmakingResults]]? = nil) { @@ -46,7 +46,7 @@ public struct GameCenterMatchmakingRuleSetTest: Hashable, Codable { case matchmakingResults } - public struct MatchmakingResults: Hashable, Codable { + public struct MatchmakingResults: Hashable, Codable, Sendable { public var requestName: String? public var teamAssignments: [GameCenterMatchmakingTeamAssignment]? diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/GameCenterMatchmakingTeam.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/GameCenterMatchmakingTeam.generated.swift index 6149f21c..e8426761 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/GameCenterMatchmakingTeam.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/GameCenterMatchmakingTeam.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct GameCenterMatchmakingTeam: Hashable, Codable { +public struct GameCenterMatchmakingTeam: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -31,11 +31,11 @@ public struct GameCenterMatchmakingTeam: Hashable, Codable { case links } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case gameCenterMatchmakingTeams } - public struct Attributes: Hashable, Codable { + public struct Attributes: Hashable, Codable, Sendable { public var maxPlayers: Int? public var minPlayers: Int? diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/GameCenterMatchmakingTeamAssignment.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/GameCenterMatchmakingTeamAssignment.generated.swift index 66f353b1..8ba23dc9 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/GameCenterMatchmakingTeamAssignment.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/GameCenterMatchmakingTeamAssignment.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct GameCenterMatchmakingTeamAssignment: Hashable, Codable { +public struct GameCenterMatchmakingTeamAssignment: Hashable, Codable, Sendable { public var playerId: String? public var team: String? diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/GameCenterMatchmakingTestPlayerPropertyInlineCreate.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/GameCenterMatchmakingTestPlayerPropertyInlineCreate.generated.swift index d2fb3732..2be46278 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/GameCenterMatchmakingTestPlayerPropertyInlineCreate.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/GameCenterMatchmakingTestPlayerPropertyInlineCreate.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct GameCenterMatchmakingTestPlayerPropertyInlineCreate: Hashable, Codable { +public struct GameCenterMatchmakingTestPlayerPropertyInlineCreate: Hashable, Codable, Sendable { public var id: String? public var type: `Type` @@ -26,11 +26,11 @@ public struct GameCenterMatchmakingTestPlayerPropertyInlineCreate: Hashable, Cod case attributes } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case gameCenterMatchmakingTestPlayerProperties } - public struct Attributes: Hashable, Codable { + public struct Attributes: Hashable, Codable, Sendable { public var playerId: String public var properties: [Property]? diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/GameCenterMatchmakingTestRequestInlineCreate.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/GameCenterMatchmakingTestRequestInlineCreate.generated.swift index a1fe9482..6fb498f8 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/GameCenterMatchmakingTestRequestInlineCreate.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/GameCenterMatchmakingTestRequestInlineCreate.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct GameCenterMatchmakingTestRequestInlineCreate: Hashable, Codable { +public struct GameCenterMatchmakingTestRequestInlineCreate: Hashable, Codable, Sendable { public var id: String? public var type: `Type` @@ -31,11 +31,11 @@ public struct GameCenterMatchmakingTestRequestInlineCreate: Hashable, Codable { case relationships } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case gameCenterMatchmakingTestRequests } - public struct Attributes: Hashable, Codable { + public struct Attributes: Hashable, Codable, Sendable { public var appVersion: String public var bundleId: String @@ -93,141 +93,176 @@ public struct GameCenterMatchmakingTestRequestInlineCreate: Hashable, Codable { case secondsInQueue } - public enum Locale: Hashable, Codable, RawRepresentable { - case ar_sa - case ca_es - case cs_cz - case da_dk - case de_de - case el_gr - case en_au - case en_gb - case en_ky - case en_us - case es_es - case es_mx - case fi_fi - case fr_ca - case fr_fr - case hi_in - case hr_hr - case hu_hu - case id_id - case it_it - case iw_il - case ja_jp - case ko_kr - case ms_my - case nl_nl - case no_no - case pl_pl - case pt_br - case pt_pt - case ro_ro - case ru_ru - case sk_sk - case sv_se - case th_th - case tr_tr - case uk_ua - case zh_cn - case zh_hk - case zh_tw - case unknown(String) - - public var rawValue: String { - switch self { - case .ar_sa: return "AR-SA" - case .ca_es: return "CA-ES" - case .cs_cz: return "CS-CZ" - case .da_dk: return "DA-DK" - case .de_de: return "DE-DE" - case .el_gr: return "EL-GR" - case .en_au: return "EN-AU" - case .en_gb: return "EN-GB" - case .en_ky: return "EN-KY" - case .en_us: return "EN-US" - case .es_es: return "ES-ES" - case .es_mx: return "ES-MX" - case .fi_fi: return "FI-FI" - case .fr_ca: return "FR-CA" - case .fr_fr: return "FR-FR" - case .hi_in: return "HI-IN" - case .hr_hr: return "HR-HR" - case .hu_hu: return "HU-HU" - case .id_id: return "ID-ID" - case .it_it: return "IT-IT" - case .iw_il: return "IW-IL" - case .ja_jp: return "JA-JP" - case .ko_kr: return "KO-KR" - case .ms_my: return "MS-MY" - case .nl_nl: return "NL-NL" - case .no_no: return "NO-NO" - case .pl_pl: return "PL-PL" - case .pt_br: return "PT-BR" - case .pt_pt: return "PT-PT" - case .ro_ro: return "RO-RO" - case .ru_ru: return "RU-RU" - case .sk_sk: return "SK-SK" - case .sv_se: return "SV-SE" - case .th_th: return "TH-TH" - case .tr_tr: return "TR-TR" - case .uk_ua: return "UK-UA" - case .zh_cn: return "ZH-CN" - case .zh_hk: return "ZH-HK" - case .zh_tw: return "ZH-TW" - case .unknown(let rawValue): return rawValue - } + public struct Locale: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var ar_sa: Self { + .init(rawValue: "AR-SA") + } + + public static var ca_es: Self { + .init(rawValue: "CA-ES") + } + + public static var cs_cz: Self { + .init(rawValue: "CS-CZ") + } + + public static var da_dk: Self { + .init(rawValue: "DA-DK") + } + + public static var de_de: Self { + .init(rawValue: "DE-DE") + } + + public static var el_gr: Self { + .init(rawValue: "EL-GR") + } + + public static var en_au: Self { + .init(rawValue: "EN-AU") + } + + public static var en_gb: Self { + .init(rawValue: "EN-GB") + } + + public static var en_ky: Self { + .init(rawValue: "EN-KY") + } + + public static var en_us: Self { + .init(rawValue: "EN-US") + } + + public static var es_es: Self { + .init(rawValue: "ES-ES") + } + + public static var es_mx: Self { + .init(rawValue: "ES-MX") + } + + public static var fi_fi: Self { + .init(rawValue: "FI-FI") + } + + public static var fr_ca: Self { + .init(rawValue: "FR-CA") + } + + public static var fr_fr: Self { + .init(rawValue: "FR-FR") + } + + public static var hi_in: Self { + .init(rawValue: "HI-IN") + } + + public static var hr_hr: Self { + .init(rawValue: "HR-HR") + } + + public static var hu_hu: Self { + .init(rawValue: "HU-HU") + } + + public static var id_id: Self { + .init(rawValue: "ID-ID") + } + + public static var it_it: Self { + .init(rawValue: "IT-IT") + } + + public static var iw_il: Self { + .init(rawValue: "IW-IL") } + public static var ja_jp: Self { + .init(rawValue: "JA-JP") + } + + public static var ko_kr: Self { + .init(rawValue: "KO-KR") + } + + public static var ms_my: Self { + .init(rawValue: "MS-MY") + } + + public static var nl_nl: Self { + .init(rawValue: "NL-NL") + } + + public static var no_no: Self { + .init(rawValue: "NO-NO") + } + + public static var pl_pl: Self { + .init(rawValue: "PL-PL") + } + + public static var pt_br: Self { + .init(rawValue: "PT-BR") + } + + public static var pt_pt: Self { + .init(rawValue: "PT-PT") + } + + public static var ro_ro: Self { + .init(rawValue: "RO-RO") + } + + public static var ru_ru: Self { + .init(rawValue: "RU-RU") + } + + public static var sk_sk: Self { + .init(rawValue: "SK-SK") + } + + public static var sv_se: Self { + .init(rawValue: "SV-SE") + } + + public static var th_th: Self { + .init(rawValue: "TH-TH") + } + + public static var tr_tr: Self { + .init(rawValue: "TR-TR") + } + + public static var uk_ua: Self { + .init(rawValue: "UK-UA") + } + + public static var zh_cn: Self { + .init(rawValue: "ZH-CN") + } + + public static var zh_hk: Self { + .init(rawValue: "ZH-HK") + } + + public static var zh_tw: Self { + .init(rawValue: "ZH-TW") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "AR-SA": self = .ar_sa - case "CA-ES": self = .ca_es - case "CS-CZ": self = .cs_cz - case "DA-DK": self = .da_dk - case "DE-DE": self = .de_de - case "EL-GR": self = .el_gr - case "EN-AU": self = .en_au - case "EN-GB": self = .en_gb - case "EN-KY": self = .en_ky - case "EN-US": self = .en_us - case "ES-ES": self = .es_es - case "ES-MX": self = .es_mx - case "FI-FI": self = .fi_fi - case "FR-CA": self = .fr_ca - case "FR-FR": self = .fr_fr - case "HI-IN": self = .hi_in - case "HR-HR": self = .hr_hr - case "HU-HU": self = .hu_hu - case "ID-ID": self = .id_id - case "IT-IT": self = .it_it - case "IW-IL": self = .iw_il - case "JA-JP": self = .ja_jp - case "KO-KR": self = .ko_kr - case "MS-MY": self = .ms_my - case "NL-NL": self = .nl_nl - case "NO-NO": self = .no_no - case "PL-PL": self = .pl_pl - case "PT-BR": self = .pt_br - case "PT-PT": self = .pt_pt - case "RO-RO": self = .ro_ro - case "RU-RU": self = .ru_ru - case "SK-SK": self = .sk_sk - case "SV-SE": self = .sv_se - case "TH-TH": self = .th_th - case "TR-TR": self = .tr_tr - case "UK-UA": self = .uk_ua - case "ZH-CN": self = .zh_cn - case "ZH-HK": self = .zh_hk - case "ZH-TW": self = .zh_tw - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } } - public struct Relationships: Hashable, Codable { + public struct Relationships: Hashable, Codable, Sendable { public var matchmakingPlayerProperties: MatchmakingPlayerProperties? public init(matchmakingPlayerProperties: MatchmakingPlayerProperties? = nil) { @@ -238,7 +273,7 @@ public struct GameCenterMatchmakingTestRequestInlineCreate: Hashable, Codable { case matchmakingPlayerProperties } - public struct MatchmakingPlayerProperties: Hashable, Codable { + public struct MatchmakingPlayerProperties: Hashable, Codable, Sendable { public var data: [Data]? public init(data: [Data]? = nil) { @@ -249,7 +284,7 @@ public struct GameCenterMatchmakingTestRequestInlineCreate: Hashable, Codable { case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -267,7 +302,7 @@ public struct GameCenterMatchmakingTestRequestInlineCreate: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case gameCenterMatchmakingTestPlayerProperties } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/GameCenterPlayerAchievementSubmission.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/GameCenterPlayerAchievementSubmission.generated.swift new file mode 100644 index 00000000..cbbaef00 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/GameCenterPlayerAchievementSubmission.generated.swift @@ -0,0 +1,78 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct GameCenterPlayerAchievementSubmission: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public var attributes: Attributes? + + public var links: ResourceLinks? + + public init( + id: String, + type: `Type`, + attributes: Attributes? = nil, + links: ResourceLinks? = nil + ) { + self.id = id + self.type = type + self.attributes = attributes + self.links = links + } + + private enum CodingKeys: String, CodingKey { + case id + case type + case attributes + case links + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case gameCenterPlayerAchievementSubmissions + } + + public struct Attributes: Hashable, Codable, Sendable { + public var bundleId: String? + + public var challengeIds: [String]? + + public var percentageAchieved: Int? + + public var scopedPlayerId: String? + + public var submittedDate: String? + + public var vendorIdentifier: String? + + public init( + bundleId: String? = nil, + challengeIds: [String]? = nil, + percentageAchieved: Int? = nil, + scopedPlayerId: String? = nil, + submittedDate: String? = nil, + vendorIdentifier: String? = nil + ) { + self.bundleId = bundleId + self.challengeIds = challengeIds + self.percentageAchieved = percentageAchieved + self.scopedPlayerId = scopedPlayerId + self.submittedDate = submittedDate + self.vendorIdentifier = vendorIdentifier + } + + private enum CodingKeys: String, CodingKey { + case bundleId + case challengeIds + case percentageAchieved + case scopedPlayerId + case submittedDate + case vendorIdentifier + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/GameCenterVersionState.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/GameCenterVersionState.generated.swift new file mode 100644 index 00000000..5359ee22 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/GameCenterVersionState.generated.swift @@ -0,0 +1,54 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct GameCenterVersionState: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var accepted: Self { + .init(rawValue: "ACCEPTED") + } + + public static var inReview: Self { + .init(rawValue: "IN_REVIEW") + } + + public static var live: Self { + .init(rawValue: "LIVE") + } + + public static var pendingRelease: Self { + .init(rawValue: "PENDING_RELEASE") + } + + public static var prepareForSubmission: Self { + .init(rawValue: "PREPARE_FOR_SUBMISSION") + } + + public static var readyForReview: Self { + .init(rawValue: "READY_FOR_REVIEW") + } + + public static var rejected: Self { + .init(rawValue: "REJECTED") + } + + public static var replacedWithNewVersion: Self { + .init(rawValue: "REPLACED_WITH_NEW_VERSION") + } + + public static var waitingForReview: Self { + .init(rawValue: "WAITING_FOR_REVIEW") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/HttpHeader.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/HttpHeader.generated.swift index 3ae7bf60..85a5bb23 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/HttpHeader.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/HttpHeader.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct HttpHeader: Hashable, Codable { +public struct HttpHeader: Hashable, Codable, Sendable { public var name: String? public var value: String? diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/IconAssetType.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/IconAssetType.generated.swift index 59f7a554..5d25556c 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/IconAssetType.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/IconAssetType.generated.swift @@ -3,37 +3,39 @@ // swiftlint:disable all import Foundation -public enum IconAssetType: Hashable, Codable, RawRepresentable { - case alternateExperiment - case appStore - case messagesAppStore - case tvOSHomeScreen - case tvOSTopShelf - case watchAppStore - case unknown(String) - - public var rawValue: String { - switch self { - case .alternateExperiment: return "ALTERNATE_EXPERIMENT" - case .appStore: return "APP_STORE" - case .messagesAppStore: return "MESSAGES_APP_STORE" - case .tvOSHomeScreen: return "TV_OS_HOME_SCREEN" - case .tvOSTopShelf: return "TV_OS_TOP_SHELF" - case .watchAppStore: return "WATCH_APP_STORE" - case .unknown(let rawValue): return rawValue - } +public struct IconAssetType: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var alternateExperiment: Self { + .init(rawValue: "ALTERNATE_EXPERIMENT") } + public static var appStore: Self { + .init(rawValue: "APP_STORE") + } + + public static var messagesAppStore: Self { + .init(rawValue: "MESSAGES_APP_STORE") + } + + public static var tvOSHomeScreen: Self { + .init(rawValue: "TV_OS_HOME_SCREEN") + } + + public static var tvOSTopShelf: Self { + .init(rawValue: "TV_OS_TOP_SHELF") + } + + public static var watchAppStore: Self { + .init(rawValue: "WATCH_APP_STORE") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "ALTERNATE_EXPERIMENT": self = .alternateExperiment - case "APP_STORE": self = .appStore - case "MESSAGES_APP_STORE": self = .messagesAppStore - case "TV_OS_HOME_SCREEN": self = .tvOSHomeScreen - case "TV_OS_TOP_SHELF": self = .tvOSTopShelf - case "WATCH_APP_STORE": self = .watchAppStore - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/ImageAsset.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/ImageAsset.generated.swift index 1dc71f74..26d5a3a3 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/ImageAsset.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/ImageAsset.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct ImageAsset: Hashable, Codable { +public struct ImageAsset: Hashable, Codable, Sendable { public var width: Int? public var height: Int? diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/InAppPurchase.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/InAppPurchase.generated.swift index 7570fd5e..87c2c15b 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/InAppPurchase.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/InAppPurchase.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct InAppPurchase: Hashable, Codable { +public struct InAppPurchase: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -36,11 +36,11 @@ public struct InAppPurchase: Hashable, Codable { case links } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case inAppPurchases } - public struct Attributes: Hashable, Codable { + public struct Attributes: Hashable, Codable, Sendable { public var inAppPurchaseType: InAppPurchaseType? public var productId: String? @@ -68,112 +68,128 @@ public struct InAppPurchase: Hashable, Codable { case state } - public enum InAppPurchaseType: Hashable, Codable, RawRepresentable { - case automaticallyRenewableSubscription - case consumable - case freeSubscription - case nonConsumable - case nonRenewingSubscription - case unknown(String) - - public var rawValue: String { - switch self { - case .automaticallyRenewableSubscription: return "AUTOMATICALLY_RENEWABLE_SUBSCRIPTION" - case .consumable: return "CONSUMABLE" - case .freeSubscription: return "FREE_SUBSCRIPTION" - case .nonConsumable: return "NON_CONSUMABLE" - case .nonRenewingSubscription: return "NON_RENEWING_SUBSCRIPTION" - case .unknown(let rawValue): return rawValue - } + public struct InAppPurchaseType: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var automaticallyRenewableSubscription: Self { + .init(rawValue: "AUTOMATICALLY_RENEWABLE_SUBSCRIPTION") + } + + public static var consumable: Self { + .init(rawValue: "CONSUMABLE") + } + + public static var freeSubscription: Self { + .init(rawValue: "FREE_SUBSCRIPTION") + } + + public static var nonConsumable: Self { + .init(rawValue: "NON_CONSUMABLE") + } + + public static var nonRenewingSubscription: Self { + .init(rawValue: "NON_RENEWING_SUBSCRIPTION") } + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "AUTOMATICALLY_RENEWABLE_SUBSCRIPTION": self = .automaticallyRenewableSubscription - case "CONSUMABLE": self = .consumable - case "FREE_SUBSCRIPTION": self = .freeSubscription - case "NON_CONSUMABLE": self = .nonConsumable - case "NON_RENEWING_SUBSCRIPTION": self = .nonRenewingSubscription - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum State: Hashable, Codable, RawRepresentable { - case approved - case created - case deleted - case deletionInProgress - case developerActionNeeded - case developerRemovedFromSale - case developerSignedOff - case inReview - case missingMetadata - case pendingDeveloperRelease - case prepareForSubmission - case processingContent - case readyToSubmit - case rejected - case removedFromSale - case replaced - case waitingForReview - case waitingForScreenshot - case waitingForUpload - case unknown(String) - - public var rawValue: String { - switch self { - case .approved: return "APPROVED" - case .created: return "CREATED" - case .deleted: return "DELETED" - case .deletionInProgress: return "DELETION_IN_PROGRESS" - case .developerActionNeeded: return "DEVELOPER_ACTION_NEEDED" - case .developerRemovedFromSale: return "DEVELOPER_REMOVED_FROM_SALE" - case .developerSignedOff: return "DEVELOPER_SIGNED_OFF" - case .inReview: return "IN_REVIEW" - case .missingMetadata: return "MISSING_METADATA" - case .pendingDeveloperRelease: return "PENDING_DEVELOPER_RELEASE" - case .prepareForSubmission: return "PREPARE_FOR_SUBMISSION" - case .processingContent: return "PROCESSING_CONTENT" - case .readyToSubmit: return "READY_TO_SUBMIT" - case .rejected: return "REJECTED" - case .removedFromSale: return "REMOVED_FROM_SALE" - case .replaced: return "REPLACED" - case .waitingForReview: return "WAITING_FOR_REVIEW" - case .waitingForScreenshot: return "WAITING_FOR_SCREENSHOT" - case .waitingForUpload: return "WAITING_FOR_UPLOAD" - case .unknown(let rawValue): return rawValue - } + public struct State: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var approved: Self { + .init(rawValue: "APPROVED") + } + + public static var created: Self { + .init(rawValue: "CREATED") } + public static var deleted: Self { + .init(rawValue: "DELETED") + } + + public static var deletionInProgress: Self { + .init(rawValue: "DELETION_IN_PROGRESS") + } + + public static var developerActionNeeded: Self { + .init(rawValue: "DEVELOPER_ACTION_NEEDED") + } + + public static var developerRemovedFromSale: Self { + .init(rawValue: "DEVELOPER_REMOVED_FROM_SALE") + } + + public static var developerSignedOff: Self { + .init(rawValue: "DEVELOPER_SIGNED_OFF") + } + + public static var inReview: Self { + .init(rawValue: "IN_REVIEW") + } + + public static var missingMetadata: Self { + .init(rawValue: "MISSING_METADATA") + } + + public static var pendingDeveloperRelease: Self { + .init(rawValue: "PENDING_DEVELOPER_RELEASE") + } + + public static var prepareForSubmission: Self { + .init(rawValue: "PREPARE_FOR_SUBMISSION") + } + + public static var processingContent: Self { + .init(rawValue: "PROCESSING_CONTENT") + } + + public static var readyToSubmit: Self { + .init(rawValue: "READY_TO_SUBMIT") + } + + public static var rejected: Self { + .init(rawValue: "REJECTED") + } + + public static var removedFromSale: Self { + .init(rawValue: "REMOVED_FROM_SALE") + } + + public static var replaced: Self { + .init(rawValue: "REPLACED") + } + + public static var waitingForReview: Self { + .init(rawValue: "WAITING_FOR_REVIEW") + } + + public static var waitingForScreenshot: Self { + .init(rawValue: "WAITING_FOR_SCREENSHOT") + } + + public static var waitingForUpload: Self { + .init(rawValue: "WAITING_FOR_UPLOAD") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "APPROVED": self = .approved - case "CREATED": self = .created - case "DELETED": self = .deleted - case "DELETION_IN_PROGRESS": self = .deletionInProgress - case "DEVELOPER_ACTION_NEEDED": self = .developerActionNeeded - case "DEVELOPER_REMOVED_FROM_SALE": self = .developerRemovedFromSale - case "DEVELOPER_SIGNED_OFF": self = .developerSignedOff - case "IN_REVIEW": self = .inReview - case "MISSING_METADATA": self = .missingMetadata - case "PENDING_DEVELOPER_RELEASE": self = .pendingDeveloperRelease - case "PREPARE_FOR_SUBMISSION": self = .prepareForSubmission - case "PROCESSING_CONTENT": self = .processingContent - case "READY_TO_SUBMIT": self = .readyToSubmit - case "REJECTED": self = .rejected - case "REMOVED_FROM_SALE": self = .removedFromSale - case "REPLACED": self = .replaced - case "WAITING_FOR_REVIEW": self = .waitingForReview - case "WAITING_FOR_SCREENSHOT": self = .waitingForScreenshot - case "WAITING_FOR_UPLOAD": self = .waitingForUpload - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } } - public struct Relationships: Hashable, Codable { + public struct Relationships: Hashable, Codable, Sendable { public var apps: Apps? public init(apps: Apps? = nil) { @@ -184,30 +200,25 @@ public struct InAppPurchase: Hashable, Codable { case apps } - public struct Apps: Hashable, Codable { + public struct Apps: Hashable, Codable, Sendable { public var data: [Data]? - public var links: Links? - public var meta: PagingInformation? public init( data: [Data]? = nil, - links: Links? = nil, meta: PagingInformation? = nil ) { self.data = data - self.links = links self.meta = meta } private enum CodingKeys: String, CodingKey { case data - case links case meta } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -225,29 +236,10 @@ public struct InAppPurchase: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case apps } } - - public struct Links: Hashable, Codable { - public var related: URL? - - public var `self`: URL? - - public init( - related: URL? = nil, - self _self: URL? = nil - ) { - self.related = related - self.`self` = _self - } - - private enum CodingKeys: String, CodingKey { - case related - case `self` = "self" - } - } } } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/InAppPurchaseAppStoreReviewScreenshot.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/InAppPurchaseAppStoreReviewScreenshot.generated.swift index 4174ec88..d612afab 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/InAppPurchaseAppStoreReviewScreenshot.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/InAppPurchaseAppStoreReviewScreenshot.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct InAppPurchaseAppStoreReviewScreenshot: Hashable, Codable { +public struct InAppPurchaseAppStoreReviewScreenshot: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -36,11 +36,11 @@ public struct InAppPurchaseAppStoreReviewScreenshot: Hashable, Codable { case links } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case inAppPurchaseAppStoreReviewScreenshots } - public struct Attributes: Hashable, Codable { + public struct Attributes: Hashable, Codable, Sendable { public var assetDeliveryState: AppMediaAssetState? public var assetToken: String? @@ -89,7 +89,7 @@ public struct InAppPurchaseAppStoreReviewScreenshot: Hashable, Codable { } } - public struct Relationships: Hashable, Codable { + public struct Relationships: Hashable, Codable, Sendable { public var inAppPurchaseV2: InAppPurchaseV2? public init(inAppPurchaseV2: InAppPurchaseV2? = nil) { @@ -100,25 +100,18 @@ public struct InAppPurchaseAppStoreReviewScreenshot: Hashable, Codable { case inAppPurchaseV2 } - public struct InAppPurchaseV2: Hashable, Codable { + public struct InAppPurchaseV2: Hashable, Codable, Sendable { public var data: Data? - public var links: Links? - - public init( - data: Data? = nil, - links: Links? = nil - ) { + public init(data: Data? = nil) { self.data = data - self.links = links } private enum CodingKeys: String, CodingKey { case data - case links } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -136,29 +129,10 @@ public struct InAppPurchaseAppStoreReviewScreenshot: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case inAppPurchases } } - - public struct Links: Hashable, Codable { - public var related: URL? - - public var `self`: URL? - - public init( - related: URL? = nil, - self _self: URL? = nil - ) { - self.related = related - self.`self` = _self - } - - private enum CodingKeys: String, CodingKey { - case related - case `self` = "self" - } - } } } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/InAppPurchaseAvailability.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/InAppPurchaseAvailability.generated.swift index cbe21f1f..67ffbfad 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/InAppPurchaseAvailability.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/InAppPurchaseAvailability.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct InAppPurchaseAvailability: Hashable, Codable { +public struct InAppPurchaseAvailability: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -36,11 +36,11 @@ public struct InAppPurchaseAvailability: Hashable, Codable { case links } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case inAppPurchaseAvailabilities } - public struct Attributes: Hashable, Codable { + public struct Attributes: Hashable, Codable, Sendable { public var availableInNewTerritories: Bool? public init(availableInNewTerritories: Bool? = nil) { @@ -52,7 +52,7 @@ public struct InAppPurchaseAvailability: Hashable, Codable { } } - public struct Relationships: Hashable, Codable { + public struct Relationships: Hashable, Codable, Sendable { public var availableTerritories: AvailableTerritories? public init(availableTerritories: AvailableTerritories? = nil) { @@ -63,16 +63,16 @@ public struct InAppPurchaseAvailability: Hashable, Codable { case availableTerritories } - public struct AvailableTerritories: Hashable, Codable { + public struct AvailableTerritories: Hashable, Codable, Sendable { public var data: [Data]? - public var links: Links? + public var links: RelationshipLinks? public var meta: PagingInformation? public init( data: [Data]? = nil, - links: Links? = nil, + links: RelationshipLinks? = nil, meta: PagingInformation? = nil ) { self.data = data @@ -86,7 +86,7 @@ public struct InAppPurchaseAvailability: Hashable, Codable { case meta } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -104,29 +104,10 @@ public struct InAppPurchaseAvailability: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case territories } } - - public struct Links: Hashable, Codable { - public var related: URL? - - public var `self`: URL? - - public init( - related: URL? = nil, - self _self: URL? = nil - ) { - self.related = related - self.`self` = _self - } - - private enum CodingKeys: String, CodingKey { - case related - case `self` = "self" - } - } } } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/InAppPurchaseContent.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/InAppPurchaseContent.generated.swift index 5fbcfc6f..ebd28d76 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/InAppPurchaseContent.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/InAppPurchaseContent.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct InAppPurchaseContent: Hashable, Codable { +public struct InAppPurchaseContent: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -36,11 +36,11 @@ public struct InAppPurchaseContent: Hashable, Codable { case links } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case inAppPurchaseContents } - public struct Attributes: Hashable, Codable { + public struct Attributes: Hashable, Codable, Sendable { public var fileName: String? public var fileSize: Int? @@ -69,7 +69,7 @@ public struct InAppPurchaseContent: Hashable, Codable { } } - public struct Relationships: Hashable, Codable { + public struct Relationships: Hashable, Codable, Sendable { public var inAppPurchaseV2: InAppPurchaseV2? public init(inAppPurchaseV2: InAppPurchaseV2? = nil) { @@ -80,25 +80,18 @@ public struct InAppPurchaseContent: Hashable, Codable { case inAppPurchaseV2 } - public struct InAppPurchaseV2: Hashable, Codable { + public struct InAppPurchaseV2: Hashable, Codable, Sendable { public var data: Data? - public var links: Links? - - public init( - data: Data? = nil, - links: Links? = nil - ) { + public init(data: Data? = nil) { self.data = data - self.links = links } private enum CodingKeys: String, CodingKey { case data - case links } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -116,29 +109,10 @@ public struct InAppPurchaseContent: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case inAppPurchases } } - - public struct Links: Hashable, Codable { - public var related: URL? - - public var `self`: URL? - - public init( - related: URL? = nil, - self _self: URL? = nil - ) { - self.related = related - self.`self` = _self - } - - private enum CodingKeys: String, CodingKey { - case related - case `self` = "self" - } - } } } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/InAppPurchaseImage.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/InAppPurchaseImage.generated.swift new file mode 100644 index 00000000..729e565a --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/InAppPurchaseImage.generated.swift @@ -0,0 +1,175 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct InAppPurchaseImage: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public var attributes: Attributes? + + public var relationships: Relationships? + + public var links: ResourceLinks? + + public init( + id: String, + type: `Type`, + attributes: Attributes? = nil, + relationships: Relationships? = nil, + links: ResourceLinks? = nil + ) { + self.id = id + self.type = type + self.attributes = attributes + self.relationships = relationships + self.links = links + } + + private enum CodingKeys: String, CodingKey { + case id + case type + case attributes + case relationships + case links + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case inAppPurchaseImages + } + + public struct Attributes: Hashable, Codable, Sendable { + public var assetToken: String? + + public var fileName: String? + + public var fileSize: Int? + + public var imageAsset: ImageAsset? + + public var sourceFileChecksum: String? + + public var state: State? + + public var uploadOperations: [UploadOperation]? + + public init( + assetToken: String? = nil, + fileName: String? = nil, + fileSize: Int? = nil, + imageAsset: ImageAsset? = nil, + sourceFileChecksum: String? = nil, + state: State? = nil, + uploadOperations: [UploadOperation]? = nil + ) { + self.assetToken = assetToken + self.fileName = fileName + self.fileSize = fileSize + self.imageAsset = imageAsset + self.sourceFileChecksum = sourceFileChecksum + self.state = state + self.uploadOperations = uploadOperations + } + + private enum CodingKeys: String, CodingKey { + case assetToken + case fileName + case fileSize + case imageAsset + case sourceFileChecksum + case state + case uploadOperations + } + + public struct State: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var approved: Self { + .init(rawValue: "APPROVED") + } + + public static var awaitingUpload: Self { + .init(rawValue: "AWAITING_UPLOAD") + } + + public static var failed: Self { + .init(rawValue: "FAILED") + } + + public static var prepareForSubmission: Self { + .init(rawValue: "PREPARE_FOR_SUBMISSION") + } + + public static var rejected: Self { + .init(rawValue: "REJECTED") + } + + public static var uploadComplete: Self { + .init(rawValue: "UPLOAD_COMPLETE") + } + + public static var waitingForReview: Self { + .init(rawValue: "WAITING_FOR_REVIEW") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + } + + public struct Relationships: Hashable, Codable, Sendable { + public var inAppPurchase: InAppPurchase? + + public init(inAppPurchase: InAppPurchase? = nil) { + self.inAppPurchase = inAppPurchase + } + + private enum CodingKeys: String, CodingKey { + case inAppPurchase + } + + public struct InAppPurchase: Hashable, Codable, Sendable { + public var data: Data? + + public init(data: Data? = nil) { + self.data = data + } + + private enum CodingKeys: String, CodingKey { + case data + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case inAppPurchases + } + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/InAppPurchaseLocalization.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/InAppPurchaseLocalization.generated.swift index d81b9b8e..f1a443cb 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/InAppPurchaseLocalization.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/InAppPurchaseLocalization.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct InAppPurchaseLocalization: Hashable, Codable { +public struct InAppPurchaseLocalization: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -36,11 +36,11 @@ public struct InAppPurchaseLocalization: Hashable, Codable { case links } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case inAppPurchaseLocalizations } - public struct Attributes: Hashable, Codable { + public struct Attributes: Hashable, Codable, Sendable { public var description: String? public var locale: String? @@ -68,36 +68,36 @@ public struct InAppPurchaseLocalization: Hashable, Codable { case state } - public enum State: Hashable, Codable, RawRepresentable { - case approved - case prepareForSubmission - case rejected - case waitingForReview - case unknown(String) - - public var rawValue: String { - switch self { - case .approved: return "APPROVED" - case .prepareForSubmission: return "PREPARE_FOR_SUBMISSION" - case .rejected: return "REJECTED" - case .waitingForReview: return "WAITING_FOR_REVIEW" - case .unknown(let rawValue): return rawValue - } + public struct State: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var approved: Self { + .init(rawValue: "APPROVED") + } + + public static var prepareForSubmission: Self { + .init(rawValue: "PREPARE_FOR_SUBMISSION") } + public static var rejected: Self { + .init(rawValue: "REJECTED") + } + + public static var waitingForReview: Self { + .init(rawValue: "WAITING_FOR_REVIEW") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "APPROVED": self = .approved - case "PREPARE_FOR_SUBMISSION": self = .prepareForSubmission - case "REJECTED": self = .rejected - case "WAITING_FOR_REVIEW": self = .waitingForReview - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } } - public struct Relationships: Hashable, Codable { + public struct Relationships: Hashable, Codable, Sendable { public var inAppPurchaseV2: InAppPurchaseV2? public init(inAppPurchaseV2: InAppPurchaseV2? = nil) { @@ -108,25 +108,18 @@ public struct InAppPurchaseLocalization: Hashable, Codable { case inAppPurchaseV2 } - public struct InAppPurchaseV2: Hashable, Codable { + public struct InAppPurchaseV2: Hashable, Codable, Sendable { public var data: Data? - public var links: Links? - - public init( - data: Data? = nil, - links: Links? = nil - ) { + public init(data: Data? = nil) { self.data = data - self.links = links } private enum CodingKeys: String, CodingKey { case data - case links } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -144,29 +137,10 @@ public struct InAppPurchaseLocalization: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case inAppPurchases } } - - public struct Links: Hashable, Codable { - public var related: URL? - - public var `self`: URL? - - public init( - related: URL? = nil, - self _self: URL? = nil - ) { - self.related = related - self.`self` = _self - } - - private enum CodingKeys: String, CodingKey { - case related - case `self` = "self" - } - } } } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/InAppPurchasePrice.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/InAppPurchasePrice.generated.swift index dc435ac7..663cc803 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/InAppPurchasePrice.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/InAppPurchasePrice.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct InAppPurchasePrice: Hashable, Codable { +public struct InAppPurchasePrice: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -36,11 +36,11 @@ public struct InAppPurchasePrice: Hashable, Codable { case links } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case inAppPurchasePrices } - public struct Attributes: Hashable, Codable { + public struct Attributes: Hashable, Codable, Sendable { public var endDate: String? public var manual: Bool? @@ -64,7 +64,7 @@ public struct InAppPurchasePrice: Hashable, Codable { } } - public struct Relationships: Hashable, Codable { + public struct Relationships: Hashable, Codable, Sendable { public var inAppPurchasePricePoint: InAppPurchasePricePoint? public var territory: Territory? @@ -82,25 +82,18 @@ public struct InAppPurchasePrice: Hashable, Codable { case territory } - public struct InAppPurchasePricePoint: Hashable, Codable { + public struct InAppPurchasePricePoint: Hashable, Codable, Sendable { public var data: Data? - public var links: Links? - - public init( - data: Data? = nil, - links: Links? = nil - ) { + public init(data: Data? = nil) { self.data = data - self.links = links } private enum CodingKeys: String, CodingKey { case data - case links } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -118,50 +111,24 @@ public struct InAppPurchasePrice: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case inAppPurchasePricePoints } } - - public struct Links: Hashable, Codable { - public var related: URL? - - public var `self`: URL? - - public init( - related: URL? = nil, - self _self: URL? = nil - ) { - self.related = related - self.`self` = _self - } - - private enum CodingKeys: String, CodingKey { - case related - case `self` = "self" - } - } } - public struct Territory: Hashable, Codable { + public struct Territory: Hashable, Codable, Sendable { public var data: Data? - public var links: Links? - - public init( - data: Data? = nil, - links: Links? = nil - ) { + public init(data: Data? = nil) { self.data = data - self.links = links } private enum CodingKeys: String, CodingKey { case data - case links } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -179,29 +146,10 @@ public struct InAppPurchasePrice: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case territories } } - - public struct Links: Hashable, Codable { - public var related: URL? - - public var `self`: URL? - - public init( - related: URL? = nil, - self _self: URL? = nil - ) { - self.related = related - self.`self` = _self - } - - private enum CodingKeys: String, CodingKey { - case related - case `self` = "self" - } - } } } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/InAppPurchasePriceInlineCreate.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/InAppPurchasePriceInlineCreate.generated.swift index 598c905b..98805033 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/InAppPurchasePriceInlineCreate.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/InAppPurchasePriceInlineCreate.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct InAppPurchasePriceInlineCreate: Hashable, Codable { +public struct InAppPurchasePriceInlineCreate: Hashable, Codable, Sendable { public var id: String? public var type: `Type` @@ -31,11 +31,11 @@ public struct InAppPurchasePriceInlineCreate: Hashable, Codable { case relationships } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case inAppPurchasePrices } - public struct Attributes: Hashable, Codable { + public struct Attributes: Hashable, Codable, Sendable { public var endDate: String? public var startDate: String? @@ -54,7 +54,7 @@ public struct InAppPurchasePriceInlineCreate: Hashable, Codable { } } - public struct Relationships: Hashable, Codable { + public struct Relationships: Hashable, Codable, Sendable { public var inAppPurchasePricePoint: InAppPurchasePricePoint? public var inAppPurchaseV2: InAppPurchaseV2? @@ -72,7 +72,7 @@ public struct InAppPurchasePriceInlineCreate: Hashable, Codable { case inAppPurchaseV2 } - public struct InAppPurchasePricePoint: Hashable, Codable { + public struct InAppPurchasePricePoint: Hashable, Codable, Sendable { public var data: Data? public init(data: Data? = nil) { @@ -83,7 +83,7 @@ public struct InAppPurchasePriceInlineCreate: Hashable, Codable { case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -101,13 +101,13 @@ public struct InAppPurchasePriceInlineCreate: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case inAppPurchasePricePoints } } } - public struct InAppPurchaseV2: Hashable, Codable { + public struct InAppPurchaseV2: Hashable, Codable, Sendable { public var data: Data? public init(data: Data? = nil) { @@ -118,7 +118,7 @@ public struct InAppPurchasePriceInlineCreate: Hashable, Codable { case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -136,7 +136,7 @@ public struct InAppPurchasePriceInlineCreate: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case inAppPurchases } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/InAppPurchasePricePoint.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/InAppPurchasePricePoint.generated.swift index fcaaf96f..4970bf82 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/InAppPurchasePricePoint.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/InAppPurchasePricePoint.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct InAppPurchasePricePoint: Hashable, Codable { +public struct InAppPurchasePricePoint: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -36,65 +36,71 @@ public struct InAppPurchasePricePoint: Hashable, Codable { case links } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case inAppPurchasePricePoints } - public struct Attributes: Hashable, Codable { + public struct Attributes: Hashable, Codable, Sendable { public var customerPrice: String? - @available(*, deprecated) - public var priceTier: String? - public var proceeds: String? public init( customerPrice: String? = nil, - priceTier: String? = nil, proceeds: String? = nil ) { self.customerPrice = customerPrice - self.priceTier = priceTier self.proceeds = proceeds } private enum CodingKeys: String, CodingKey { case customerPrice - case priceTier case proceeds } } - public struct Relationships: Hashable, Codable { + public struct Relationships: Hashable, Codable, Sendable { + public var equalizations: Equalizations? + public var territory: Territory? - public init(territory: Territory? = nil) { + public init( + equalizations: Equalizations? = nil, + territory: Territory? = nil + ) { + self.equalizations = equalizations self.territory = territory } private enum CodingKeys: String, CodingKey { + case equalizations case territory } - public struct Territory: Hashable, Codable { - public var data: Data? + public struct Equalizations: Hashable, Codable, Sendable { + public var links: RelationshipLinks? + + public init(links: RelationshipLinks? = nil) { + self.links = links + } + + private enum CodingKeys: String, CodingKey { + case links + } + } - public var links: Links? + public struct Territory: Hashable, Codable, Sendable { + public var data: Data? - public init( - data: Data? = nil, - links: Links? = nil - ) { + public init(data: Data? = nil) { self.data = data - self.links = links } private enum CodingKeys: String, CodingKey { case data - case links } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -112,29 +118,10 @@ public struct InAppPurchasePricePoint: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case territories } } - - public struct Links: Hashable, Codable { - public var related: URL? - - public var `self`: URL? - - public init( - related: URL? = nil, - self _self: URL? = nil - ) { - self.related = related - self.`self` = _self - } - - private enum CodingKeys: String, CodingKey { - case related - case `self` = "self" - } - } } } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/InAppPurchasePriceSchedule.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/InAppPurchasePriceSchedule.generated.swift index b17556e6..d4cce63a 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/InAppPurchasePriceSchedule.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/InAppPurchasePriceSchedule.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct InAppPurchasePriceSchedule: Hashable, Codable { +public struct InAppPurchasePriceSchedule: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -31,48 +31,43 @@ public struct InAppPurchasePriceSchedule: Hashable, Codable { case links } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case inAppPurchasePriceSchedules } - public struct Relationships: Hashable, Codable { + public struct Relationships: Hashable, Codable, Sendable { public var automaticPrices: AutomaticPrices? public var baseTerritory: BaseTerritory? - public var inAppPurchase: InAppPurchase? - public var manualPrices: ManualPrices? public init( automaticPrices: AutomaticPrices? = nil, baseTerritory: BaseTerritory? = nil, - inAppPurchase: InAppPurchase? = nil, manualPrices: ManualPrices? = nil ) { self.automaticPrices = automaticPrices self.baseTerritory = baseTerritory - self.inAppPurchase = inAppPurchase self.manualPrices = manualPrices } private enum CodingKeys: String, CodingKey { case automaticPrices case baseTerritory - case inAppPurchase case manualPrices } - public struct AutomaticPrices: Hashable, Codable { + public struct AutomaticPrices: Hashable, Codable, Sendable { public var data: [Data]? - public var links: Links? + public var links: RelationshipLinks? public var meta: PagingInformation? public init( data: [Data]? = nil, - links: Links? = nil, + links: RelationshipLinks? = nil, meta: PagingInformation? = nil ) { self.data = data @@ -86,7 +81,7 @@ public struct InAppPurchasePriceSchedule: Hashable, Codable { case meta } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -104,39 +99,20 @@ public struct InAppPurchasePriceSchedule: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case inAppPurchasePrices } } - - public struct Links: Hashable, Codable { - public var related: URL? - - public var `self`: URL? - - public init( - related: URL? = nil, - self _self: URL? = nil - ) { - self.related = related - self.`self` = _self - } - - private enum CodingKeys: String, CodingKey { - case related - case `self` = "self" - } - } } - public struct BaseTerritory: Hashable, Codable { + public struct BaseTerritory: Hashable, Codable, Sendable { public var data: Data? - public var links: Links? + public var links: RelationshipLinks? public init( data: Data? = nil, - links: Links? = nil + links: RelationshipLinks? = nil ) { self.data = data self.links = links @@ -147,7 +123,7 @@ public struct InAppPurchasePriceSchedule: Hashable, Codable { case links } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -165,102 +141,22 @@ public struct InAppPurchasePriceSchedule: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case territories } } - - public struct Links: Hashable, Codable { - public var related: URL? - - public var `self`: URL? - - public init( - related: URL? = nil, - self _self: URL? = nil - ) { - self.related = related - self.`self` = _self - } - - private enum CodingKeys: String, CodingKey { - case related - case `self` = "self" - } - } } - public struct InAppPurchase: Hashable, Codable { - public var data: Data? - - public var links: Links? - - public init( - data: Data? = nil, - links: Links? = nil - ) { - self.data = data - self.links = links - } - - private enum CodingKeys: String, CodingKey { - case data - case links - } - - public struct Data: Hashable, Codable { - public var id: String - - public var type: `Type` - - public init( - id: String, - type: `Type` - ) { - self.id = id - self.type = type - } - - private enum CodingKeys: String, CodingKey { - case id - case type - } - - public enum `Type`: String, Hashable, Codable { - case inAppPurchases - } - } - - public struct Links: Hashable, Codable { - public var related: URL? - - public var `self`: URL? - - public init( - related: URL? = nil, - self _self: URL? = nil - ) { - self.related = related - self.`self` = _self - } - - private enum CodingKeys: String, CodingKey { - case related - case `self` = "self" - } - } - } - - public struct ManualPrices: Hashable, Codable { + public struct ManualPrices: Hashable, Codable, Sendable { public var data: [Data]? - public var links: Links? + public var links: RelationshipLinks? public var meta: PagingInformation? public init( data: [Data]? = nil, - links: Links? = nil, + links: RelationshipLinks? = nil, meta: PagingInformation? = nil ) { self.data = data @@ -274,7 +170,7 @@ public struct InAppPurchasePriceSchedule: Hashable, Codable { case meta } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -292,29 +188,10 @@ public struct InAppPurchasePriceSchedule: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case inAppPurchasePrices } } - - public struct Links: Hashable, Codable { - public var related: URL? - - public var `self`: URL? - - public init( - related: URL? = nil, - self _self: URL? = nil - ) { - self.related = related - self.`self` = _self - } - - private enum CodingKeys: String, CodingKey { - case related - case `self` = "self" - } - } } } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/InAppPurchaseState.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/InAppPurchaseState.generated.swift index 79961d27..baac75d3 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/InAppPurchaseState.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/InAppPurchaseState.generated.swift @@ -3,55 +3,63 @@ // swiftlint:disable all import Foundation -public enum InAppPurchaseState: Hashable, Codable, RawRepresentable { - case approved - case developerActionNeeded - case developerRemovedFromSale - case inReview - case missingMetadata - case pendingBinaryApproval - case processingContent - case readyToSubmit - case rejected - case removedFromSale - case waitingForReview - case waitingForUpload - case unknown(String) - - public var rawValue: String { - switch self { - case .approved: return "APPROVED" - case .developerActionNeeded: return "DEVELOPER_ACTION_NEEDED" - case .developerRemovedFromSale: return "DEVELOPER_REMOVED_FROM_SALE" - case .inReview: return "IN_REVIEW" - case .missingMetadata: return "MISSING_METADATA" - case .pendingBinaryApproval: return "PENDING_BINARY_APPROVAL" - case .processingContent: return "PROCESSING_CONTENT" - case .readyToSubmit: return "READY_TO_SUBMIT" - case .rejected: return "REJECTED" - case .removedFromSale: return "REMOVED_FROM_SALE" - case .waitingForReview: return "WAITING_FOR_REVIEW" - case .waitingForUpload: return "WAITING_FOR_UPLOAD" - case .unknown(let rawValue): return rawValue - } +public struct InAppPurchaseState: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var approved: Self { + .init(rawValue: "APPROVED") } + public static var developerActionNeeded: Self { + .init(rawValue: "DEVELOPER_ACTION_NEEDED") + } + + public static var developerRemovedFromSale: Self { + .init(rawValue: "DEVELOPER_REMOVED_FROM_SALE") + } + + public static var inReview: Self { + .init(rawValue: "IN_REVIEW") + } + + public static var missingMetadata: Self { + .init(rawValue: "MISSING_METADATA") + } + + public static var pendingBinaryApproval: Self { + .init(rawValue: "PENDING_BINARY_APPROVAL") + } + + public static var processingContent: Self { + .init(rawValue: "PROCESSING_CONTENT") + } + + public static var readyToSubmit: Self { + .init(rawValue: "READY_TO_SUBMIT") + } + + public static var rejected: Self { + .init(rawValue: "REJECTED") + } + + public static var removedFromSale: Self { + .init(rawValue: "REMOVED_FROM_SALE") + } + + public static var waitingForReview: Self { + .init(rawValue: "WAITING_FOR_REVIEW") + } + + public static var waitingForUpload: Self { + .init(rawValue: "WAITING_FOR_UPLOAD") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "APPROVED": self = .approved - case "DEVELOPER_ACTION_NEEDED": self = .developerActionNeeded - case "DEVELOPER_REMOVED_FROM_SALE": self = .developerRemovedFromSale - case "IN_REVIEW": self = .inReview - case "MISSING_METADATA": self = .missingMetadata - case "PENDING_BINARY_APPROVAL": self = .pendingBinaryApproval - case "PROCESSING_CONTENT": self = .processingContent - case "READY_TO_SUBMIT": self = .readyToSubmit - case "REJECTED": self = .rejected - case "REMOVED_FROM_SALE": self = .removedFromSale - case "WAITING_FOR_REVIEW": self = .waitingForReview - case "WAITING_FOR_UPLOAD": self = .waitingForUpload - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/InAppPurchaseSubmission.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/InAppPurchaseSubmission.generated.swift index 749b2fbd..3dce45ef 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/InAppPurchaseSubmission.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/InAppPurchaseSubmission.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct InAppPurchaseSubmission: Hashable, Codable { +public struct InAppPurchaseSubmission: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -31,11 +31,11 @@ public struct InAppPurchaseSubmission: Hashable, Codable { case links } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case inAppPurchaseSubmissions } - public struct Relationships: Hashable, Codable { + public struct Relationships: Hashable, Codable, Sendable { public var inAppPurchaseV2: InAppPurchaseV2? public init(inAppPurchaseV2: InAppPurchaseV2? = nil) { @@ -46,25 +46,18 @@ public struct InAppPurchaseSubmission: Hashable, Codable { case inAppPurchaseV2 } - public struct InAppPurchaseV2: Hashable, Codable { + public struct InAppPurchaseV2: Hashable, Codable, Sendable { public var data: Data? - public var links: Links? - - public init( - data: Data? = nil, - links: Links? = nil - ) { + public init(data: Data? = nil) { self.data = data - self.links = links } private enum CodingKeys: String, CodingKey { case data - case links } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -82,29 +75,10 @@ public struct InAppPurchaseSubmission: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case inAppPurchases } } - - public struct Links: Hashable, Codable { - public var related: URL? - - public var `self`: URL? - - public init( - related: URL? = nil, - self _self: URL? = nil - ) { - self.related = related - self.`self` = _self - } - - private enum CodingKeys: String, CodingKey { - case related - case `self` = "self" - } - } } } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/InAppPurchaseType.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/InAppPurchaseType.generated.swift index e6578b4f..c02c0565 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/InAppPurchaseType.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/InAppPurchaseType.generated.swift @@ -3,28 +3,27 @@ // swiftlint:disable all import Foundation -public enum InAppPurchaseType: Hashable, Codable, RawRepresentable { - case consumable - case nonConsumable - case nonRenewingSubscription - case unknown(String) - - public var rawValue: String { - switch self { - case .consumable: return "CONSUMABLE" - case .nonConsumable: return "NON_CONSUMABLE" - case .nonRenewingSubscription: return "NON_RENEWING_SUBSCRIPTION" - case .unknown(let rawValue): return rawValue - } +public struct InAppPurchaseType: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var consumable: Self { + .init(rawValue: "CONSUMABLE") } + public static var nonConsumable: Self { + .init(rawValue: "NON_CONSUMABLE") + } + + public static var nonRenewingSubscription: Self { + .init(rawValue: "NON_RENEWING_SUBSCRIPTION") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "CONSUMABLE": self = .consumable - case "NON_CONSUMABLE": self = .nonConsumable - case "NON_RENEWING_SUBSCRIPTION": self = .nonRenewingSubscription - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/InAppPurchaseV2.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/InAppPurchaseV2.generated.swift index f7e58bbe..eaf45182 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/InAppPurchaseV2.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/InAppPurchaseV2.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct InAppPurchaseV2: Hashable, Codable { +public struct InAppPurchaseV2: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -36,14 +36,11 @@ public struct InAppPurchaseV2: Hashable, Codable { case links } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case inAppPurchases } - public struct Attributes: Hashable, Codable { - @available(*, deprecated) - public var availableInAllTerritories: Bool? - + public struct Attributes: Hashable, Codable, Sendable { public var contentHosting: Bool? public var familySharable: Bool? @@ -59,7 +56,6 @@ public struct InAppPurchaseV2: Hashable, Codable { public var state: InAppPurchaseState? public init( - availableInAllTerritories: Bool? = nil, contentHosting: Bool? = nil, familySharable: Bool? = nil, inAppPurchaseType: InAppPurchaseType? = nil, @@ -68,7 +64,6 @@ public struct InAppPurchaseV2: Hashable, Codable { reviewNote: String? = nil, state: InAppPurchaseState? = nil ) { - self.availableInAllTerritories = availableInAllTerritories self.contentHosting = contentHosting self.familySharable = familySharable self.inAppPurchaseType = inAppPurchaseType @@ -79,7 +74,6 @@ public struct InAppPurchaseV2: Hashable, Codable { } private enum CodingKeys: String, CodingKey { - case availableInAllTerritories case contentHosting case familySharable case inAppPurchaseType @@ -90,13 +84,15 @@ public struct InAppPurchaseV2: Hashable, Codable { } } - public struct Relationships: Hashable, Codable { + public struct Relationships: Hashable, Codable, Sendable { public var appStoreReviewScreenshot: AppStoreReviewScreenshot? public var content: Content? public var iapPriceSchedule: IapPriceSchedule? + public var images: Images? + public var inAppPurchaseAvailability: InAppPurchaseAvailability? public var inAppPurchaseLocalizations: InAppPurchaseLocalizations? @@ -109,6 +105,7 @@ public struct InAppPurchaseV2: Hashable, Codable { appStoreReviewScreenshot: AppStoreReviewScreenshot? = nil, content: Content? = nil, iapPriceSchedule: IapPriceSchedule? = nil, + images: Images? = nil, inAppPurchaseAvailability: InAppPurchaseAvailability? = nil, inAppPurchaseLocalizations: InAppPurchaseLocalizations? = nil, pricePoints: PricePoints? = nil, @@ -117,6 +114,7 @@ public struct InAppPurchaseV2: Hashable, Codable { self.appStoreReviewScreenshot = appStoreReviewScreenshot self.content = content self.iapPriceSchedule = iapPriceSchedule + self.images = images self.inAppPurchaseAvailability = inAppPurchaseAvailability self.inAppPurchaseLocalizations = inAppPurchaseLocalizations self.pricePoints = pricePoints @@ -127,20 +125,21 @@ public struct InAppPurchaseV2: Hashable, Codable { case appStoreReviewScreenshot case content case iapPriceSchedule + case images case inAppPurchaseAvailability case inAppPurchaseLocalizations case pricePoints case promotedPurchase } - public struct AppStoreReviewScreenshot: Hashable, Codable { + public struct AppStoreReviewScreenshot: Hashable, Codable, Sendable { public var data: Data? - public var links: Links? + public var links: RelationshipLinks? public init( data: Data? = nil, - links: Links? = nil + links: RelationshipLinks? = nil ) { self.data = data self.links = links @@ -151,7 +150,7 @@ public struct InAppPurchaseV2: Hashable, Codable { case links } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -169,39 +168,20 @@ public struct InAppPurchaseV2: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case inAppPurchaseAppStoreReviewScreenshots } } - - public struct Links: Hashable, Codable { - public var related: URL? - - public var `self`: URL? - - public init( - related: URL? = nil, - self _self: URL? = nil - ) { - self.related = related - self.`self` = _self - } - - private enum CodingKeys: String, CodingKey { - case related - case `self` = "self" - } - } } - public struct Content: Hashable, Codable { + public struct Content: Hashable, Codable, Sendable { public var data: Data? - public var links: Links? + public var links: RelationshipLinks? public init( data: Data? = nil, - links: Links? = nil + links: RelationshipLinks? = nil ) { self.data = data self.links = links @@ -212,7 +192,7 @@ public struct InAppPurchaseV2: Hashable, Codable { case links } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -230,39 +210,20 @@ public struct InAppPurchaseV2: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case inAppPurchaseContents } } - - public struct Links: Hashable, Codable { - public var related: URL? - - public var `self`: URL? - - public init( - related: URL? = nil, - self _self: URL? = nil - ) { - self.related = related - self.`self` = _self - } - - private enum CodingKeys: String, CodingKey { - case related - case `self` = "self" - } - } } - public struct IapPriceSchedule: Hashable, Codable { + public struct IapPriceSchedule: Hashable, Codable, Sendable { public var data: Data? - public var links: Links? + public var links: RelationshipLinks? public init( data: Data? = nil, - links: Links? = nil + links: RelationshipLinks? = nil ) { self.data = data self.links = links @@ -273,7 +234,7 @@ public struct InAppPurchaseV2: Hashable, Codable { case links } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -291,39 +252,67 @@ public struct InAppPurchaseV2: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case inAppPurchasePriceSchedules } } + } - public struct Links: Hashable, Codable { - public var related: URL? + public struct Images: Hashable, Codable, Sendable { + public var data: [Data]? - public var `self`: URL? + public var links: RelationshipLinks? + + public var meta: PagingInformation? + + public init( + data: [Data]? = nil, + links: RelationshipLinks? = nil, + meta: PagingInformation? = nil + ) { + self.data = data + self.links = links + self.meta = meta + } + + private enum CodingKeys: String, CodingKey { + case data + case links + case meta + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` public init( - related: URL? = nil, - self _self: URL? = nil + id: String, + type: `Type` ) { - self.related = related - self.`self` = _self + self.id = id + self.type = type } private enum CodingKeys: String, CodingKey { - case related - case `self` = "self" + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case inAppPurchaseImages } } } - public struct InAppPurchaseAvailability: Hashable, Codable { + public struct InAppPurchaseAvailability: Hashable, Codable, Sendable { public var data: Data? - public var links: Links? + public var links: RelationshipLinks? public init( data: Data? = nil, - links: Links? = nil + links: RelationshipLinks? = nil ) { self.data = data self.links = links @@ -334,7 +323,7 @@ public struct InAppPurchaseV2: Hashable, Codable { case links } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -352,41 +341,22 @@ public struct InAppPurchaseV2: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case inAppPurchaseAvailabilities } } - - public struct Links: Hashable, Codable { - public var related: URL? - - public var `self`: URL? - - public init( - related: URL? = nil, - self _self: URL? = nil - ) { - self.related = related - self.`self` = _self - } - - private enum CodingKeys: String, CodingKey { - case related - case `self` = "self" - } - } } - public struct InAppPurchaseLocalizations: Hashable, Codable { + public struct InAppPurchaseLocalizations: Hashable, Codable, Sendable { public var data: [Data]? - public var links: Links? + public var links: RelationshipLinks? public var meta: PagingInformation? public init( data: [Data]? = nil, - links: Links? = nil, + links: RelationshipLinks? = nil, meta: PagingInformation? = nil ) { self.data = data @@ -400,7 +370,7 @@ public struct InAppPurchaseV2: Hashable, Codable { case meta } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -418,41 +388,22 @@ public struct InAppPurchaseV2: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case inAppPurchaseLocalizations } } - - public struct Links: Hashable, Codable { - public var related: URL? - - public var `self`: URL? - - public init( - related: URL? = nil, - self _self: URL? = nil - ) { - self.related = related - self.`self` = _self - } - - private enum CodingKeys: String, CodingKey { - case related - case `self` = "self" - } - } } - public struct PricePoints: Hashable, Codable { + public struct PricePoints: Hashable, Codable, Sendable { public var data: [Data]? - public var links: Links? + public var links: RelationshipLinks? public var meta: PagingInformation? public init( data: [Data]? = nil, - links: Links? = nil, + links: RelationshipLinks? = nil, meta: PagingInformation? = nil ) { self.data = data @@ -466,7 +417,7 @@ public struct InAppPurchaseV2: Hashable, Codable { case meta } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -484,39 +435,20 @@ public struct InAppPurchaseV2: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case inAppPurchasePricePoints } } - - public struct Links: Hashable, Codable { - public var related: URL? - - public var `self`: URL? - - public init( - related: URL? = nil, - self _self: URL? = nil - ) { - self.related = related - self.`self` = _self - } - - private enum CodingKeys: String, CodingKey { - case related - case `self` = "self" - } - } } - public struct PromotedPurchase: Hashable, Codable { + public struct PromotedPurchase: Hashable, Codable, Sendable { public var data: Data? - public var links: Links? + public var links: RelationshipLinks? public init( data: Data? = nil, - links: Links? = nil + links: RelationshipLinks? = nil ) { self.data = data self.links = links @@ -527,7 +459,7 @@ public struct InAppPurchaseV2: Hashable, Codable { case links } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -545,29 +477,10 @@ public struct InAppPurchaseV2: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case promotedPurchases } } - - public struct Links: Hashable, Codable { - public var related: URL? - - public var `self`: URL? - - public init( - related: URL? = nil, - self _self: URL? = nil - ) { - self.related = related - self.`self` = _self - } - - private enum CodingKeys: String, CodingKey { - case related - case `self` = "self" - } - } } } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/IntegerRange.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/IntegerRange.generated.swift new file mode 100644 index 00000000..29c06c82 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/IntegerRange.generated.swift @@ -0,0 +1,25 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct IntegerRange: Hashable, Codable, Sendable { + public var maximum: Int? + + public var minimum: Int? + + public init( + maximum: Int? = nil, + minimum: Int? = nil + ) { + self.maximum = maximum + self.minimum = minimum + } + + private enum CodingKeys: String, CodingKey { + case maximum + case minimum + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/InternalBetaState.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/InternalBetaState.generated.swift index cf6f19d0..a030cbb5 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/InternalBetaState.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/InternalBetaState.generated.swift @@ -3,40 +3,43 @@ // swiftlint:disable all import Foundation -public enum InternalBetaState: Hashable, Codable, RawRepresentable { - case expired - case inBetaTesting - case inExportComplianceReview - case missingExportCompliance - case processing - case processingException - case readyForBetaTesting - case unknown(String) - - public var rawValue: String { - switch self { - case .expired: return "EXPIRED" - case .inBetaTesting: return "IN_BETA_TESTING" - case .inExportComplianceReview: return "IN_EXPORT_COMPLIANCE_REVIEW" - case .missingExportCompliance: return "MISSING_EXPORT_COMPLIANCE" - case .processing: return "PROCESSING" - case .processingException: return "PROCESSING_EXCEPTION" - case .readyForBetaTesting: return "READY_FOR_BETA_TESTING" - case .unknown(let rawValue): return rawValue - } +public struct InternalBetaState: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var expired: Self { + .init(rawValue: "EXPIRED") } + public static var inBetaTesting: Self { + .init(rawValue: "IN_BETA_TESTING") + } + + public static var inExportComplianceReview: Self { + .init(rawValue: "IN_EXPORT_COMPLIANCE_REVIEW") + } + + public static var missingExportCompliance: Self { + .init(rawValue: "MISSING_EXPORT_COMPLIANCE") + } + + public static var processing: Self { + .init(rawValue: "PROCESSING") + } + + public static var processingException: Self { + .init(rawValue: "PROCESSING_EXCEPTION") + } + + public static var readyForBetaTesting: Self { + .init(rawValue: "READY_FOR_BETA_TESTING") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "EXPIRED": self = .expired - case "IN_BETA_TESTING": self = .inBetaTesting - case "IN_EXPORT_COMPLIANCE_REVIEW": self = .inExportComplianceReview - case "MISSING_EXPORT_COMPLIANCE": self = .missingExportCompliance - case "PROCESSING": self = .processing - case "PROCESSING_EXCEPTION": self = .processingException - case "READY_FOR_BETA_TESTING": self = .readyForBetaTesting - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/KidsAgeBand.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/KidsAgeBand.generated.swift index 0cf501c9..57fcbe89 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/KidsAgeBand.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/KidsAgeBand.generated.swift @@ -3,28 +3,27 @@ // swiftlint:disable all import Foundation -public enum KidsAgeBand: Hashable, Codable, RawRepresentable { - case fiveAndUnder - case nineToEleven - case sixToEight - case unknown(String) - - public var rawValue: String { - switch self { - case .fiveAndUnder: return "FIVE_AND_UNDER" - case .nineToEleven: return "NINE_TO_ELEVEN" - case .sixToEight: return "SIX_TO_EIGHT" - case .unknown(let rawValue): return rawValue - } +public struct KidsAgeBand: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var fiveAndUnder: Self { + .init(rawValue: "FIVE_AND_UNDER") } + public static var nineToEleven: Self { + .init(rawValue: "NINE_TO_ELEVEN") + } + + public static var sixToEight: Self { + .init(rawValue: "SIX_TO_EIGHT") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "FIVE_AND_UNDER": self = .fiveAndUnder - case "NINE_TO_ELEVEN": self = .nineToEleven - case "SIX_TO_EIGHT": self = .sixToEight - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Location.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Location.generated.swift index e5cd261a..102e2fa3 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Location.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Location.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct Location: Hashable, Codable { +public struct Location: Hashable, Codable, Sendable { public var latitude: Float? public var longitude: Float? diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/MarketplaceSearchDetail.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/MarketplaceSearchDetail.generated.swift new file mode 100644 index 00000000..8e874e12 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/MarketplaceSearchDetail.generated.swift @@ -0,0 +1,51 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct MarketplaceSearchDetail: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public var attributes: Attributes? + + public var links: ResourceLinks? + + public init( + id: String, + type: `Type`, + attributes: Attributes? = nil, + links: ResourceLinks? = nil + ) { + self.id = id + self.type = type + self.attributes = attributes + self.links = links + } + + private enum CodingKeys: String, CodingKey { + case id + case type + case attributes + case links + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case marketplaceSearchDetails + } + + public struct Attributes: Hashable, Codable, Sendable { + public var catalogUrl: URL? + + public init(catalogUrl: URL? = nil) { + self.catalogUrl = catalogUrl + } + + private enum CodingKeys: String, CodingKey { + case catalogUrl + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/MarketplaceWebhook.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/MarketplaceWebhook.generated.swift new file mode 100644 index 00000000..406961e2 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/MarketplaceWebhook.generated.swift @@ -0,0 +1,51 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct MarketplaceWebhook: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public var attributes: Attributes? + + public var links: ResourceLinks? + + public init( + id: String, + type: `Type`, + attributes: Attributes? = nil, + links: ResourceLinks? = nil + ) { + self.id = id + self.type = type + self.attributes = attributes + self.links = links + } + + private enum CodingKeys: String, CodingKey { + case id + case type + case attributes + case links + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case marketplaceWebhooks + } + + public struct Attributes: Hashable, Codable, Sendable { + public var endpointUrl: URL? + + public init(endpointUrl: URL? = nil) { + self.endpointUrl = endpointUrl + } + + private enum CodingKeys: String, CodingKey { + case endpointUrl + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/MerchantId.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/MerchantId.generated.swift new file mode 100644 index 00000000..9834d5ad --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/MerchantId.generated.swift @@ -0,0 +1,122 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct MerchantId: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public var attributes: Attributes? + + public var relationships: Relationships? + + public var links: ResourceLinks? + + public init( + id: String, + type: `Type`, + attributes: Attributes? = nil, + relationships: Relationships? = nil, + links: ResourceLinks? = nil + ) { + self.id = id + self.type = type + self.attributes = attributes + self.relationships = relationships + self.links = links + } + + private enum CodingKeys: String, CodingKey { + case id + case type + case attributes + case relationships + case links + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case merchantIds + } + + public struct Attributes: Hashable, Codable, Sendable { + public var identifier: String? + + public var name: String? + + public init( + identifier: String? = nil, + name: String? = nil + ) { + self.identifier = identifier + self.name = name + } + + private enum CodingKeys: String, CodingKey { + case identifier + case name + } + } + + public struct Relationships: Hashable, Codable, Sendable { + public var certificates: Certificates? + + public init(certificates: Certificates? = nil) { + self.certificates = certificates + } + + private enum CodingKeys: String, CodingKey { + case certificates + } + + public struct Certificates: Hashable, Codable, Sendable { + public var data: [Data]? + + public var links: RelationshipLinks? + + public var meta: PagingInformation? + + public init( + data: [Data]? = nil, + links: RelationshipLinks? = nil, + meta: PagingInformation? = nil + ) { + self.data = data + self.links = links + self.meta = meta + } + + private enum CodingKeys: String, CodingKey { + case data + case links + case meta + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case certificates + } + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/MetricCategory.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/MetricCategory.generated.swift index f1a4ec8a..99e707bd 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/MetricCategory.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/MetricCategory.generated.swift @@ -3,40 +3,43 @@ // swiftlint:disable all import Foundation -public enum MetricCategory: Hashable, Codable, RawRepresentable { - case animation - case battery - case disk - case hang - case launch - case memory - case termination - case unknown(String) - - public var rawValue: String { - switch self { - case .animation: return "ANIMATION" - case .battery: return "BATTERY" - case .disk: return "DISK" - case .hang: return "HANG" - case .launch: return "LAUNCH" - case .memory: return "MEMORY" - case .termination: return "TERMINATION" - case .unknown(let rawValue): return rawValue - } +public struct MetricCategory: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var animation: Self { + .init(rawValue: "ANIMATION") } + public static var battery: Self { + .init(rawValue: "BATTERY") + } + + public static var disk: Self { + .init(rawValue: "DISK") + } + + public static var hang: Self { + .init(rawValue: "HANG") + } + + public static var launch: Self { + .init(rawValue: "LAUNCH") + } + + public static var memory: Self { + .init(rawValue: "MEMORY") + } + + public static var termination: Self { + .init(rawValue: "TERMINATION") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "ANIMATION": self = .animation - case "BATTERY": self = .battery - case "DISK": self = .disk - case "HANG": self = .hang - case "LAUNCH": self = .launch - case "MEMORY": self = .memory - case "TERMINATION": self = .termination - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/MetricsInsight.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/MetricsInsight.generated.swift index 39393f8d..93a1fb6f 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/MetricsInsight.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/MetricsInsight.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct MetricsInsight: Hashable, Codable { +public struct MetricsInsight: Hashable, Codable, Sendable { public var highImpact: Bool? public var latestVersion: String? @@ -56,7 +56,7 @@ public struct MetricsInsight: Hashable, Codable { case summaryString } - public struct Populations: Hashable, Codable { + public struct Populations: Hashable, Codable, Sendable { public var deltaPercentage: Float? public var device: String? diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Nomination.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Nomination.generated.swift new file mode 100644 index 00000000..8db0fbe4 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Nomination.generated.swift @@ -0,0 +1,451 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct Nomination: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public var attributes: Attributes? + + public var relationships: Relationships? + + public var links: ResourceLinks? + + public init( + id: String, + type: `Type`, + attributes: Attributes? = nil, + relationships: Relationships? = nil, + links: ResourceLinks? = nil + ) { + self.id = id + self.type = type + self.attributes = attributes + self.relationships = relationships + self.links = links + } + + private enum CodingKeys: String, CodingKey { + case id + case type + case attributes + case relationships + case links + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case nominations + } + + public struct Attributes: Hashable, Codable, Sendable { + public var type: `Type`? + + public var createdDate: String? + + public var description: String? + + public var deviceFamilies: [DeviceFamily]? + + public var hasInAppEvents: Bool? + + public var lastModifiedDate: String? + + public var launchInSelectMarketsFirst: Bool? + + public var locales: [String]? + + public var name: String? + + public var notes: String? + + public var preOrderEnabled: Bool? + + public var publishEndDate: String? + + public var publishStartDate: String? + + public var state: State? + + public var submittedDate: String? + + public var supplementalMaterialsUris: [URL]? + + public init( + type: `Type`? = nil, + createdDate: String? = nil, + description: String? = nil, + deviceFamilies: [DeviceFamily]? = nil, + hasInAppEvents: Bool? = nil, + lastModifiedDate: String? = nil, + launchInSelectMarketsFirst: Bool? = nil, + locales: [String]? = nil, + name: String? = nil, + notes: String? = nil, + preOrderEnabled: Bool? = nil, + publishEndDate: String? = nil, + publishStartDate: String? = nil, + state: State? = nil, + submittedDate: String? = nil, + supplementalMaterialsUris: [URL]? = nil + ) { + self.type = type + self.createdDate = createdDate + self.description = description + self.deviceFamilies = deviceFamilies + self.hasInAppEvents = hasInAppEvents + self.lastModifiedDate = lastModifiedDate + self.launchInSelectMarketsFirst = launchInSelectMarketsFirst + self.locales = locales + self.name = name + self.notes = notes + self.preOrderEnabled = preOrderEnabled + self.publishEndDate = publishEndDate + self.publishStartDate = publishStartDate + self.state = state + self.submittedDate = submittedDate + self.supplementalMaterialsUris = supplementalMaterialsUris + } + + private enum CodingKeys: String, CodingKey { + case type + case createdDate + case description + case deviceFamilies + case hasInAppEvents + case lastModifiedDate + case launchInSelectMarketsFirst + case locales + case name + case notes + case preOrderEnabled + case publishEndDate + case publishStartDate + case state + case submittedDate + case supplementalMaterialsUris + } + + public struct `Type`: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var appEnhancements: Self { + .init(rawValue: "APP_ENHANCEMENTS") + } + + public static var appLaunch: Self { + .init(rawValue: "APP_LAUNCH") + } + + public static var newContent: Self { + .init(rawValue: "NEW_CONTENT") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct State: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var archived: Self { + .init(rawValue: "ARCHIVED") + } + + public static var draft: Self { + .init(rawValue: "DRAFT") + } + + public static var submitted: Self { + .init(rawValue: "SUBMITTED") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + } + + public struct Relationships: Hashable, Codable, Sendable { + public var createdByActor: CreatedByActor? + + public var inAppEvents: InAppEvents? + + public var lastModifiedByActor: LastModifiedByActor? + + public var relatedApps: RelatedApps? + + public var submittedByActor: SubmittedByActor? + + public var supportedTerritories: SupportedTerritories? + + public init( + createdByActor: CreatedByActor? = nil, + inAppEvents: InAppEvents? = nil, + lastModifiedByActor: LastModifiedByActor? = nil, + relatedApps: RelatedApps? = nil, + submittedByActor: SubmittedByActor? = nil, + supportedTerritories: SupportedTerritories? = nil + ) { + self.createdByActor = createdByActor + self.inAppEvents = inAppEvents + self.lastModifiedByActor = lastModifiedByActor + self.relatedApps = relatedApps + self.submittedByActor = submittedByActor + self.supportedTerritories = supportedTerritories + } + + private enum CodingKeys: String, CodingKey { + case createdByActor + case inAppEvents + case lastModifiedByActor + case relatedApps + case submittedByActor + case supportedTerritories + } + + public struct CreatedByActor: Hashable, Codable, Sendable { + public var data: Data? + + public init(data: Data? = nil) { + self.data = data + } + + private enum CodingKeys: String, CodingKey { + case data + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case actors + } + } + } + + public struct InAppEvents: Hashable, Codable, Sendable { + public var data: [Data]? + + public var meta: PagingInformation? + + public init( + data: [Data]? = nil, + meta: PagingInformation? = nil + ) { + self.data = data + self.meta = meta + } + + private enum CodingKeys: String, CodingKey { + case data + case meta + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case appEvents + } + } + } + + public struct LastModifiedByActor: Hashable, Codable, Sendable { + public var data: Data? + + public init(data: Data? = nil) { + self.data = data + } + + private enum CodingKeys: String, CodingKey { + case data + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case actors + } + } + } + + public struct RelatedApps: Hashable, Codable, Sendable { + public var data: [Data]? + + public var meta: PagingInformation? + + public init( + data: [Data]? = nil, + meta: PagingInformation? = nil + ) { + self.data = data + self.meta = meta + } + + private enum CodingKeys: String, CodingKey { + case data + case meta + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case apps + } + } + } + + public struct SubmittedByActor: Hashable, Codable, Sendable { + public var data: Data? + + public init(data: Data? = nil) { + self.data = data + } + + private enum CodingKeys: String, CodingKey { + case data + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case actors + } + } + } + + public struct SupportedTerritories: Hashable, Codable, Sendable { + public var data: [Data]? + + public var meta: PagingInformation? + + public init( + data: [Data]? = nil, + meta: PagingInformation? = nil + ) { + self.data = data + self.meta = meta + } + + private enum CodingKeys: String, CodingKey { + case data + case meta + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case territories + } + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/PagedDocumentLinks.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/PagedDocumentLinks.generated.swift index 314ff65d..a4646a45 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/PagedDocumentLinks.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/PagedDocumentLinks.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct PagedDocumentLinks: Hashable, Codable { +public struct PagedDocumentLinks: Hashable, Codable, Sendable { public var first: URL? public var next: URL? diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/PagingInformation.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/PagingInformation.generated.swift index 9007a2cd..b7ffadf9 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/PagingInformation.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/PagingInformation.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct PagingInformation: Hashable, Codable { +public struct PagingInformation: Hashable, Codable, Sendable { public var paging: Paging public init(paging: Paging) { @@ -14,21 +14,26 @@ public struct PagingInformation: Hashable, Codable { case paging } - public struct Paging: Hashable, Codable { + public struct Paging: Hashable, Codable, Sendable { public var limit: Int + public var nextCursor: String? + public var total: Int? public init( limit: Int, + nextCursor: String? = nil, total: Int? = nil ) { self.limit = limit + self.nextCursor = nextCursor self.total = total } private enum CodingKeys: String, CodingKey { case limit + case nextCursor case total } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/PassTypeId.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/PassTypeId.generated.swift new file mode 100644 index 00000000..7bf5c8c6 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/PassTypeId.generated.swift @@ -0,0 +1,122 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct PassTypeId: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public var attributes: Attributes? + + public var relationships: Relationships? + + public var links: ResourceLinks? + + public init( + id: String, + type: `Type`, + attributes: Attributes? = nil, + relationships: Relationships? = nil, + links: ResourceLinks? = nil + ) { + self.id = id + self.type = type + self.attributes = attributes + self.relationships = relationships + self.links = links + } + + private enum CodingKeys: String, CodingKey { + case id + case type + case attributes + case relationships + case links + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case passTypeIds + } + + public struct Attributes: Hashable, Codable, Sendable { + public var identifier: String? + + public var name: String? + + public init( + identifier: String? = nil, + name: String? = nil + ) { + self.identifier = identifier + self.name = name + } + + private enum CodingKeys: String, CodingKey { + case identifier + case name + } + } + + public struct Relationships: Hashable, Codable, Sendable { + public var certificates: Certificates? + + public init(certificates: Certificates? = nil) { + self.certificates = certificates + } + + private enum CodingKeys: String, CodingKey { + case certificates + } + + public struct Certificates: Hashable, Codable, Sendable { + public var data: [Data]? + + public var links: RelationshipLinks? + + public var meta: PagingInformation? + + public init( + data: [Data]? = nil, + links: RelationshipLinks? = nil, + meta: PagingInformation? = nil + ) { + self.data = data + self.links = links + self.meta = meta + } + + private enum CodingKeys: String, CodingKey { + case data + case links + case meta + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case certificates + } + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/PerfPowerMetric.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/PerfPowerMetric.generated.swift index aae8b709..e2cefbf1 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/PerfPowerMetric.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/PerfPowerMetric.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct PerfPowerMetric: Hashable, Codable { +public struct PerfPowerMetric: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -31,11 +31,11 @@ public struct PerfPowerMetric: Hashable, Codable { case links } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case perfPowerMetrics } - public struct Attributes: Hashable, Codable { + public struct Attributes: Hashable, Codable, Sendable { public var deviceType: String? public var metricType: MetricType? @@ -58,59 +58,59 @@ public struct PerfPowerMetric: Hashable, Codable { case platform } - public enum MetricType: Hashable, Codable, RawRepresentable { - case animation - case battery - case disk - case hang - case launch - case memory - case termination - case unknown(String) - - public var rawValue: String { - switch self { - case .animation: return "ANIMATION" - case .battery: return "BATTERY" - case .disk: return "DISK" - case .hang: return "HANG" - case .launch: return "LAUNCH" - case .memory: return "MEMORY" - case .termination: return "TERMINATION" - case .unknown(let rawValue): return rawValue - } + public struct MetricType: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var animation: Self { + .init(rawValue: "ANIMATION") } + public static var battery: Self { + .init(rawValue: "BATTERY") + } + + public static var disk: Self { + .init(rawValue: "DISK") + } + + public static var hang: Self { + .init(rawValue: "HANG") + } + + public static var launch: Self { + .init(rawValue: "LAUNCH") + } + + public static var memory: Self { + .init(rawValue: "MEMORY") + } + + public static var termination: Self { + .init(rawValue: "TERMINATION") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "ANIMATION": self = .animation - case "BATTERY": self = .battery - case "DISK": self = .disk - case "HANG": self = .hang - case "LAUNCH": self = .launch - case "MEMORY": self = .memory - case "TERMINATION": self = .termination - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum Platform: Hashable, Codable, RawRepresentable { - case iOS - case unknown(String) + public struct Platform: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var iOS: Self { + .init(rawValue: "IOS") + } - public var rawValue: String { - switch self { - case .iOS: return "IOS" - case .unknown(let rawValue): return rawValue - } + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "IOS": self = .iOS - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/PhasedReleaseState.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/PhasedReleaseState.generated.swift index 1cb32ce9..ff94f492 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/PhasedReleaseState.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/PhasedReleaseState.generated.swift @@ -3,31 +3,31 @@ // swiftlint:disable all import Foundation -public enum PhasedReleaseState: Hashable, Codable, RawRepresentable { - case active - case complete - case inactive - case paused - case unknown(String) - - public var rawValue: String { - switch self { - case .active: return "ACTIVE" - case .complete: return "COMPLETE" - case .inactive: return "INACTIVE" - case .paused: return "PAUSED" - case .unknown(let rawValue): return rawValue - } +public struct PhasedReleaseState: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var active: Self { + .init(rawValue: "ACTIVE") } + public static var complete: Self { + .init(rawValue: "COMPLETE") + } + + public static var inactive: Self { + .init(rawValue: "INACTIVE") + } + + public static var paused: Self { + .init(rawValue: "PAUSED") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "ACTIVE": self = .active - case "COMPLETE": self = .complete - case "INACTIVE": self = .inactive - case "PAUSED": self = .paused - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Platform.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Platform.generated.swift index c965505e..94939c3e 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Platform.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Platform.generated.swift @@ -3,28 +3,31 @@ // swiftlint:disable all import Foundation -public enum Platform: Hashable, Codable, RawRepresentable { - case iOS - case macOS - case tvOS - case unknown(String) - - public var rawValue: String { - switch self { - case .iOS: return "IOS" - case .macOS: return "MAC_OS" - case .tvOS: return "TV_OS" - case .unknown(let rawValue): return rawValue - } +public struct Platform: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var iOS: Self { + .init(rawValue: "IOS") } + public static var macOS: Self { + .init(rawValue: "MAC_OS") + } + + public static var tvOS: Self { + .init(rawValue: "TV_OS") + } + + public static var visionOS: Self { + .init(rawValue: "VISION_OS") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "IOS": self = .iOS - case "MAC_OS": self = .macOS - case "TV_OS": self = .tvOS - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/PrereleaseVersion.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/PrereleaseVersion.generated.swift index a020535c..cd045113 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/PrereleaseVersion.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/PrereleaseVersion.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct PrereleaseVersion: Hashable, Codable { +public struct PrereleaseVersion: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -36,11 +36,11 @@ public struct PrereleaseVersion: Hashable, Codable { case links } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case preReleaseVersions } - public struct Attributes: Hashable, Codable { + public struct Attributes: Hashable, Codable, Sendable { public var platform: Platform? public var version: String? @@ -59,7 +59,7 @@ public struct PrereleaseVersion: Hashable, Codable { } } - public struct Relationships: Hashable, Codable { + public struct Relationships: Hashable, Codable, Sendable { public var app: App? public var builds: Builds? @@ -77,14 +77,14 @@ public struct PrereleaseVersion: Hashable, Codable { case builds } - public struct App: Hashable, Codable { + public struct App: Hashable, Codable, Sendable { public var data: Data? - public var links: Links? + public var links: RelationshipLinks? public init( data: Data? = nil, - links: Links? = nil + links: RelationshipLinks? = nil ) { self.data = data self.links = links @@ -95,7 +95,7 @@ public struct PrereleaseVersion: Hashable, Codable { case links } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -113,41 +113,22 @@ public struct PrereleaseVersion: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case apps } } - - public struct Links: Hashable, Codable { - public var related: URL? - - public var `self`: URL? - - public init( - related: URL? = nil, - self _self: URL? = nil - ) { - self.related = related - self.`self` = _self - } - - private enum CodingKeys: String, CodingKey { - case related - case `self` = "self" - } - } } - public struct Builds: Hashable, Codable { + public struct Builds: Hashable, Codable, Sendable { public var data: [Data]? - public var links: Links? + public var links: RelationshipLinks? public var meta: PagingInformation? public init( data: [Data]? = nil, - links: Links? = nil, + links: RelationshipLinks? = nil, meta: PagingInformation? = nil ) { self.data = data @@ -161,7 +142,7 @@ public struct PrereleaseVersion: Hashable, Codable { case meta } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -179,29 +160,10 @@ public struct PrereleaseVersion: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case builds } } - - public struct Links: Hashable, Codable { - public var related: URL? - - public var `self`: URL? - - public init( - related: URL? = nil, - self _self: URL? = nil - ) { - self.related = related - self.`self` = _self - } - - private enum CodingKeys: String, CodingKey { - case related - case `self` = "self" - } - } } } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/PreviewFrameImage.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/PreviewFrameImage.generated.swift new file mode 100644 index 00000000..ed4b4b6a --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/PreviewFrameImage.generated.swift @@ -0,0 +1,25 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct PreviewFrameImage: Hashable, Codable, Sendable { + public var image: ImageAsset? + + public var state: AppMediaPreviewFrameImageState? + + public init( + image: ImageAsset? = nil, + state: AppMediaPreviewFrameImageState? = nil + ) { + self.image = image + self.state = state + } + + private enum CodingKeys: String, CodingKey { + case image + case state + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/PreviewType.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/PreviewType.generated.swift index d477d0e8..d62357d7 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/PreviewType.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/PreviewType.generated.swift @@ -3,64 +3,79 @@ // swiftlint:disable all import Foundation -public enum PreviewType: Hashable, Codable, RawRepresentable { - case appleTv - case desktop - case ipad105 - case ipad97 - case ipadPro129 - case ipadPro3Gen11 - case ipadPro3Gen129 - case iphone35 - case iphone40 - case iphone47 - case iphone55 - case iphone58 - case iphone61 - case iphone65 - case iphone67 - case unknown(String) - - public var rawValue: String { - switch self { - case .appleTv: return "APPLE_TV" - case .desktop: return "DESKTOP" - case .ipad105: return "IPAD_105" - case .ipad97: return "IPAD_97" - case .ipadPro129: return "IPAD_PRO_129" - case .ipadPro3Gen11: return "IPAD_PRO_3GEN_11" - case .ipadPro3Gen129: return "IPAD_PRO_3GEN_129" - case .iphone35: return "IPHONE_35" - case .iphone40: return "IPHONE_40" - case .iphone47: return "IPHONE_47" - case .iphone55: return "IPHONE_55" - case .iphone58: return "IPHONE_58" - case .iphone61: return "IPHONE_61" - case .iphone65: return "IPHONE_65" - case .iphone67: return "IPHONE_67" - case .unknown(let rawValue): return rawValue - } +public struct PreviewType: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var appleTv: Self { + .init(rawValue: "APPLE_TV") } + public static var appleVisionPro: Self { + .init(rawValue: "APPLE_VISION_PRO") + } + + public static var desktop: Self { + .init(rawValue: "DESKTOP") + } + + public static var ipad105: Self { + .init(rawValue: "IPAD_105") + } + + public static var ipad97: Self { + .init(rawValue: "IPAD_97") + } + + public static var ipadPro129: Self { + .init(rawValue: "IPAD_PRO_129") + } + + public static var ipadPro3Gen11: Self { + .init(rawValue: "IPAD_PRO_3GEN_11") + } + + public static var ipadPro3Gen129: Self { + .init(rawValue: "IPAD_PRO_3GEN_129") + } + + public static var iphone35: Self { + .init(rawValue: "IPHONE_35") + } + + public static var iphone40: Self { + .init(rawValue: "IPHONE_40") + } + + public static var iphone47: Self { + .init(rawValue: "IPHONE_47") + } + + public static var iphone55: Self { + .init(rawValue: "IPHONE_55") + } + + public static var iphone58: Self { + .init(rawValue: "IPHONE_58") + } + + public static var iphone61: Self { + .init(rawValue: "IPHONE_61") + } + + public static var iphone65: Self { + .init(rawValue: "IPHONE_65") + } + + public static var iphone67: Self { + .init(rawValue: "IPHONE_67") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "APPLE_TV": self = .appleTv - case "DESKTOP": self = .desktop - case "IPAD_105": self = .ipad105 - case "IPAD_97": self = .ipad97 - case "IPAD_PRO_129": self = .ipadPro129 - case "IPAD_PRO_3GEN_11": self = .ipadPro3Gen11 - case "IPAD_PRO_3GEN_129": self = .ipadPro3Gen129 - case "IPHONE_35": self = .iphone35 - case "IPHONE_40": self = .iphone40 - case "IPHONE_47": self = .iphone47 - case "IPHONE_55": self = .iphone55 - case "IPHONE_58": self = .iphone58 - case "IPHONE_61": self = .iphone61 - case "IPHONE_65": self = .iphone65 - case "IPHONE_67": self = .iphone67 - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Profile.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Profile.generated.swift index 77f2e401..2412e2bc 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Profile.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Profile.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct Profile: Hashable, Codable { +public struct Profile: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -36,11 +36,11 @@ public struct Profile: Hashable, Codable { case links } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case profiles } - public struct Attributes: Hashable, Codable { + public struct Attributes: Hashable, Codable, Sendable { public var createdDate: String? public var expirationDate: String? @@ -88,88 +88,96 @@ public struct Profile: Hashable, Codable { case uuid } - public enum ProfileState: Hashable, Codable, RawRepresentable { - case active - case invalid - case unknown(String) + public struct ProfileState: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var active: Self { + .init(rawValue: "ACTIVE") + } - public var rawValue: String { - switch self { - case .active: return "ACTIVE" - case .invalid: return "INVALID" - case .unknown(let rawValue): return rawValue - } + public static var invalid: Self { + .init(rawValue: "INVALID") } + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "ACTIVE": self = .active - case "INVALID": self = .invalid - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum ProfileType: Hashable, Codable, RawRepresentable { - case iOSAppAdhoc - case iOSAppDevelopment - case iOSAppInhouse - case iOSAppStore - case macAppDevelopment - case macAppDirect - case macAppStore - case macCatalystAppDevelopment - case macCatalystAppDirect - case macCatalystAppStore - case tvOSAppAdhoc - case tvOSAppDevelopment - case tvOSAppInhouse - case tvOSAppStore - case unknown(String) - - public var rawValue: String { - switch self { - case .iOSAppAdhoc: return "IOS_APP_ADHOC" - case .iOSAppDevelopment: return "IOS_APP_DEVELOPMENT" - case .iOSAppInhouse: return "IOS_APP_INHOUSE" - case .iOSAppStore: return "IOS_APP_STORE" - case .macAppDevelopment: return "MAC_APP_DEVELOPMENT" - case .macAppDirect: return "MAC_APP_DIRECT" - case .macAppStore: return "MAC_APP_STORE" - case .macCatalystAppDevelopment: return "MAC_CATALYST_APP_DEVELOPMENT" - case .macCatalystAppDirect: return "MAC_CATALYST_APP_DIRECT" - case .macCatalystAppStore: return "MAC_CATALYST_APP_STORE" - case .tvOSAppAdhoc: return "TVOS_APP_ADHOC" - case .tvOSAppDevelopment: return "TVOS_APP_DEVELOPMENT" - case .tvOSAppInhouse: return "TVOS_APP_INHOUSE" - case .tvOSAppStore: return "TVOS_APP_STORE" - case .unknown(let rawValue): return rawValue - } + public struct ProfileType: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var iOSAppAdhoc: Self { + .init(rawValue: "IOS_APP_ADHOC") + } + + public static var iOSAppDevelopment: Self { + .init(rawValue: "IOS_APP_DEVELOPMENT") + } + + public static var iOSAppInhouse: Self { + .init(rawValue: "IOS_APP_INHOUSE") + } + + public static var iOSAppStore: Self { + .init(rawValue: "IOS_APP_STORE") + } + + public static var macAppDevelopment: Self { + .init(rawValue: "MAC_APP_DEVELOPMENT") + } + + public static var macAppDirect: Self { + .init(rawValue: "MAC_APP_DIRECT") } + public static var macAppStore: Self { + .init(rawValue: "MAC_APP_STORE") + } + + public static var macCatalystAppDevelopment: Self { + .init(rawValue: "MAC_CATALYST_APP_DEVELOPMENT") + } + + public static var macCatalystAppDirect: Self { + .init(rawValue: "MAC_CATALYST_APP_DIRECT") + } + + public static var macCatalystAppStore: Self { + .init(rawValue: "MAC_CATALYST_APP_STORE") + } + + public static var tvOSAppAdhoc: Self { + .init(rawValue: "TVOS_APP_ADHOC") + } + + public static var tvOSAppDevelopment: Self { + .init(rawValue: "TVOS_APP_DEVELOPMENT") + } + + public static var tvOSAppInhouse: Self { + .init(rawValue: "TVOS_APP_INHOUSE") + } + + public static var tvOSAppStore: Self { + .init(rawValue: "TVOS_APP_STORE") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "IOS_APP_ADHOC": self = .iOSAppAdhoc - case "IOS_APP_DEVELOPMENT": self = .iOSAppDevelopment - case "IOS_APP_INHOUSE": self = .iOSAppInhouse - case "IOS_APP_STORE": self = .iOSAppStore - case "MAC_APP_DEVELOPMENT": self = .macAppDevelopment - case "MAC_APP_DIRECT": self = .macAppDirect - case "MAC_APP_STORE": self = .macAppStore - case "MAC_CATALYST_APP_DEVELOPMENT": self = .macCatalystAppDevelopment - case "MAC_CATALYST_APP_DIRECT": self = .macCatalystAppDirect - case "MAC_CATALYST_APP_STORE": self = .macCatalystAppStore - case "TVOS_APP_ADHOC": self = .tvOSAppAdhoc - case "TVOS_APP_DEVELOPMENT": self = .tvOSAppDevelopment - case "TVOS_APP_INHOUSE": self = .tvOSAppInhouse - case "TVOS_APP_STORE": self = .tvOSAppStore - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } } - public struct Relationships: Hashable, Codable { + public struct Relationships: Hashable, Codable, Sendable { public var bundleId: BundleId? public var certificates: Certificates? @@ -192,14 +200,14 @@ public struct Profile: Hashable, Codable { case devices } - public struct BundleId: Hashable, Codable { + public struct BundleId: Hashable, Codable, Sendable { public var data: Data? - public var links: Links? + public var links: RelationshipLinks? public init( data: Data? = nil, - links: Links? = nil + links: RelationshipLinks? = nil ) { self.data = data self.links = links @@ -210,7 +218,7 @@ public struct Profile: Hashable, Codable { case links } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -228,41 +236,22 @@ public struct Profile: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case bundleIds } } - - public struct Links: Hashable, Codable { - public var related: URL? - - public var `self`: URL? - - public init( - related: URL? = nil, - self _self: URL? = nil - ) { - self.related = related - self.`self` = _self - } - - private enum CodingKeys: String, CodingKey { - case related - case `self` = "self" - } - } } - public struct Certificates: Hashable, Codable { + public struct Certificates: Hashable, Codable, Sendable { public var data: [Data]? - public var links: Links? + public var links: RelationshipLinks? public var meta: PagingInformation? public init( data: [Data]? = nil, - links: Links? = nil, + links: RelationshipLinks? = nil, meta: PagingInformation? = nil ) { self.data = data @@ -276,7 +265,7 @@ public struct Profile: Hashable, Codable { case meta } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -294,41 +283,22 @@ public struct Profile: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case certificates } } - - public struct Links: Hashable, Codable { - public var related: URL? - - public var `self`: URL? - - public init( - related: URL? = nil, - self _self: URL? = nil - ) { - self.related = related - self.`self` = _self - } - - private enum CodingKeys: String, CodingKey { - case related - case `self` = "self" - } - } } - public struct Devices: Hashable, Codable { + public struct Devices: Hashable, Codable, Sendable { public var data: [Data]? - public var links: Links? + public var links: RelationshipLinks? public var meta: PagingInformation? public init( data: [Data]? = nil, - links: Links? = nil, + links: RelationshipLinks? = nil, meta: PagingInformation? = nil ) { self.data = data @@ -342,7 +312,7 @@ public struct Profile: Hashable, Codable { case meta } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -360,29 +330,10 @@ public struct Profile: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case devices } } - - public struct Links: Hashable, Codable { - public var related: URL? - - public var `self`: URL? - - public init( - related: URL? = nil, - self _self: URL? = nil - ) { - self.related = related - self.`self` = _self - } - - private enum CodingKeys: String, CodingKey { - case related - case `self` = "self" - } - } } } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/PromotedPurchase.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/PromotedPurchase.generated.swift index c51318b3..230f24f9 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/PromotedPurchase.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/PromotedPurchase.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct PromotedPurchase: Hashable, Codable { +public struct PromotedPurchase: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -36,11 +36,11 @@ public struct PromotedPurchase: Hashable, Codable { case links } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case promotedPurchases } - public struct Attributes: Hashable, Codable { + public struct Attributes: Hashable, Codable, Sendable { public var enabled: Bool? public var state: State? @@ -63,77 +63,65 @@ public struct PromotedPurchase: Hashable, Codable { case visibleForAllUsers } - public enum State: Hashable, Codable, RawRepresentable { - case approved - case inReview - case prepareForSubmission - case rejected - case unknown(String) - - public var rawValue: String { - switch self { - case .approved: return "APPROVED" - case .inReview: return "IN_REVIEW" - case .prepareForSubmission: return "PREPARE_FOR_SUBMISSION" - case .rejected: return "REJECTED" - case .unknown(let rawValue): return rawValue - } + public struct State: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var approved: Self { + .init(rawValue: "APPROVED") + } + + public static var inReview: Self { + .init(rawValue: "IN_REVIEW") + } + + public static var prepareForSubmission: Self { + .init(rawValue: "PREPARE_FOR_SUBMISSION") } + public static var rejected: Self { + .init(rawValue: "REJECTED") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "APPROVED": self = .approved - case "IN_REVIEW": self = .inReview - case "PREPARE_FOR_SUBMISSION": self = .prepareForSubmission - case "REJECTED": self = .rejected - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } } - public struct Relationships: Hashable, Codable { + public struct Relationships: Hashable, Codable, Sendable { public var inAppPurchaseV2: InAppPurchaseV2? - public var promotionImages: PromotionImages? - public var subscription: Subscription? public init( inAppPurchaseV2: InAppPurchaseV2? = nil, - promotionImages: PromotionImages? = nil, subscription: Subscription? = nil ) { self.inAppPurchaseV2 = inAppPurchaseV2 - self.promotionImages = promotionImages self.subscription = subscription } private enum CodingKeys: String, CodingKey { case inAppPurchaseV2 - case promotionImages case subscription } - public struct InAppPurchaseV2: Hashable, Codable { + public struct InAppPurchaseV2: Hashable, Codable, Sendable { public var data: Data? - public var links: Links? - - public init( - data: Data? = nil, - links: Links? = nil - ) { + public init(data: Data? = nil) { self.data = data - self.links = links } private enum CodingKeys: String, CodingKey { case data - case links } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -151,116 +139,24 @@ public struct PromotedPurchase: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case inAppPurchases } } - - public struct Links: Hashable, Codable { - public var related: URL? - - public var `self`: URL? - - public init( - related: URL? = nil, - self _self: URL? = nil - ) { - self.related = related - self.`self` = _self - } - - private enum CodingKeys: String, CodingKey { - case related - case `self` = "self" - } - } } - public struct PromotionImages: Hashable, Codable { - public var data: [Data]? - - public var links: Links? - - public var meta: PagingInformation? - - public init( - data: [Data]? = nil, - links: Links? = nil, - meta: PagingInformation? = nil - ) { - self.data = data - self.links = links - self.meta = meta - } - - private enum CodingKeys: String, CodingKey { - case data - case links - case meta - } - - public struct Data: Hashable, Codable { - public var id: String - - public var type: `Type` - - public init( - id: String, - type: `Type` - ) { - self.id = id - self.type = type - } - - private enum CodingKeys: String, CodingKey { - case id - case type - } - - public enum `Type`: String, Hashable, Codable { - case promotedPurchaseImages - } - } - - public struct Links: Hashable, Codable { - public var related: URL? - - public var `self`: URL? - - public init( - related: URL? = nil, - self _self: URL? = nil - ) { - self.related = related - self.`self` = _self - } - - private enum CodingKeys: String, CodingKey { - case related - case `self` = "self" - } - } - } - - public struct Subscription: Hashable, Codable { + public struct Subscription: Hashable, Codable, Sendable { public var data: Data? - public var links: Links? - - public init( - data: Data? = nil, - links: Links? = nil - ) { + public init(data: Data? = nil) { self.data = data - self.links = links } private enum CodingKeys: String, CodingKey { case data - case links } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -278,29 +174,10 @@ public struct PromotedPurchase: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case subscriptions } } - - public struct Links: Hashable, Codable { - public var related: URL? - - public var `self`: URL? - - public init( - related: URL? = nil, - self _self: URL? = nil - ) { - self.related = related - self.`self` = _self - } - - private enum CodingKeys: String, CodingKey { - case related - case `self` = "self" - } - } } } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/PromotedPurchaseImage.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/PromotedPurchaseImage.generated.swift deleted file mode 100644 index f2b3579b..00000000 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/PromotedPurchaseImage.generated.swift +++ /dev/null @@ -1,203 +0,0 @@ -// autogenerated - -// swiftlint:disable all -import Foundation - -public struct PromotedPurchaseImage: Hashable, Codable { - public var id: String - - public var type: `Type` - - public var attributes: Attributes? - - public var relationships: Relationships? - - public var links: ResourceLinks? - - public init( - id: String, - type: `Type`, - attributes: Attributes? = nil, - relationships: Relationships? = nil, - links: ResourceLinks? = nil - ) { - self.id = id - self.type = type - self.attributes = attributes - self.relationships = relationships - self.links = links - } - - private enum CodingKeys: String, CodingKey { - case id - case type - case attributes - case relationships - case links - } - - public enum `Type`: String, Hashable, Codable { - case promotedPurchaseImages - } - - public struct Attributes: Hashable, Codable { - public var assetToken: String? - - public var assetType: String? - - public var fileName: String? - - public var fileSize: Int? - - public var imageAsset: ImageAsset? - - public var sourceFileChecksum: String? - - public var state: State? - - public var uploadOperations: [UploadOperation]? - - public init( - assetToken: String? = nil, - assetType: String? = nil, - fileName: String? = nil, - fileSize: Int? = nil, - imageAsset: ImageAsset? = nil, - sourceFileChecksum: String? = nil, - state: State? = nil, - uploadOperations: [UploadOperation]? = nil - ) { - self.assetToken = assetToken - self.assetType = assetType - self.fileName = fileName - self.fileSize = fileSize - self.imageAsset = imageAsset - self.sourceFileChecksum = sourceFileChecksum - self.state = state - self.uploadOperations = uploadOperations - } - - private enum CodingKeys: String, CodingKey { - case assetToken - case assetType - case fileName - case fileSize - case imageAsset - case sourceFileChecksum - case state - case uploadOperations - } - - public enum State: Hashable, Codable, RawRepresentable { - case approved - case awaitingUpload - case failed - case prepareForSubmission - case rejected - case uploadComplete - case waitingForReview - case unknown(String) - - public var rawValue: String { - switch self { - case .approved: return "APPROVED" - case .awaitingUpload: return "AWAITING_UPLOAD" - case .failed: return "FAILED" - case .prepareForSubmission: return "PREPARE_FOR_SUBMISSION" - case .rejected: return "REJECTED" - case .uploadComplete: return "UPLOAD_COMPLETE" - case .waitingForReview: return "WAITING_FOR_REVIEW" - case .unknown(let rawValue): return rawValue - } - } - - public init(rawValue: String) { - switch rawValue { - case "APPROVED": self = .approved - case "AWAITING_UPLOAD": self = .awaitingUpload - case "FAILED": self = .failed - case "PREPARE_FOR_SUBMISSION": self = .prepareForSubmission - case "REJECTED": self = .rejected - case "UPLOAD_COMPLETE": self = .uploadComplete - case "WAITING_FOR_REVIEW": self = .waitingForReview - default: self = .unknown(rawValue) - } - } - } - } - - public struct Relationships: Hashable, Codable { - public var promotedPurchase: PromotedPurchase? - - public init(promotedPurchase: PromotedPurchase? = nil) { - self.promotedPurchase = promotedPurchase - } - - private enum CodingKeys: String, CodingKey { - case promotedPurchase - } - - public struct PromotedPurchase: Hashable, Codable { - public var data: Data? - - public var links: Links? - - public init( - data: Data? = nil, - links: Links? = nil - ) { - self.data = data - self.links = links - } - - private enum CodingKeys: String, CodingKey { - case data - case links - } - - public struct Data: Hashable, Codable { - public var id: String - - public var type: `Type` - - public init( - id: String, - type: `Type` - ) { - self.id = id - self.type = type - } - - private enum CodingKeys: String, CodingKey { - case id - case type - } - - public enum `Type`: String, Hashable, Codable { - case promotedPurchases - } - } - - public struct Links: Hashable, Codable { - public var related: URL? - - public var `self`: URL? - - public init( - related: URL? = nil, - self _self: URL? = nil - ) { - self.related = related - self.`self` = _self - } - - private enum CodingKeys: String, CodingKey { - case related - case `self` = "self" - } - } - } - } -} - -// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Property.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Property.generated.swift index 302ed671..83c09b4c 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Property.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Property.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct Property: Hashable, Codable { +public struct Property: Hashable, Codable, Sendable { public var key: String? public var value: String? diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/RelationshipLinks.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/RelationshipLinks.generated.swift new file mode 100644 index 00000000..aee9e821 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/RelationshipLinks.generated.swift @@ -0,0 +1,25 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct RelationshipLinks: Hashable, Codable, Sendable { + public var related: URL? + + public var `self`: URL? + + public init( + related: URL? = nil, + self _self: URL? = nil + ) { + self.related = related + self.`self` = _self + } + + private enum CodingKeys: String, CodingKey { + case related + case `self` = "self" + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/AccessibilityDeclarationCreateRequest.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/AccessibilityDeclarationCreateRequest.generated.swift new file mode 100644 index 00000000..262be50a --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/AccessibilityDeclarationCreateRequest.generated.swift @@ -0,0 +1,152 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct AccessibilityDeclarationCreateRequest: Hashable, Codable, Sendable { + public var data: Data + + public init(data: Data) { + self.data = data + } + + private enum CodingKeys: String, CodingKey { + case data + } + + public struct Data: Hashable, Codable, Sendable { + public var type: `Type` + + public var attributes: Attributes + + public var relationships: Relationships + + public init( + type: `Type`, + attributes: Attributes, + relationships: Relationships + ) { + self.type = type + self.attributes = attributes + self.relationships = relationships + } + + private enum CodingKeys: String, CodingKey { + case type + case attributes + case relationships + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case accessibilityDeclarations + } + + public struct Attributes: Hashable, Codable, Sendable { + public var deviceFamily: DeviceFamily + + public var supportsAudioDescriptions: Bool? + + public var supportsCaptions: Bool? + + public var supportsDarkInterface: Bool? + + public var supportsDifferentiateWithoutColorAlone: Bool? + + public var supportsLargerText: Bool? + + public var supportsReducedMotion: Bool? + + public var supportsSufficientContrast: Bool? + + public var supportsVoiceControl: Bool? + + public var supportsVoiceover: Bool? + + public init( + deviceFamily: DeviceFamily, + supportsAudioDescriptions: Bool? = nil, + supportsCaptions: Bool? = nil, + supportsDarkInterface: Bool? = nil, + supportsDifferentiateWithoutColorAlone: Bool? = nil, + supportsLargerText: Bool? = nil, + supportsReducedMotion: Bool? = nil, + supportsSufficientContrast: Bool? = nil, + supportsVoiceControl: Bool? = nil, + supportsVoiceover: Bool? = nil + ) { + self.deviceFamily = deviceFamily + self.supportsAudioDescriptions = supportsAudioDescriptions + self.supportsCaptions = supportsCaptions + self.supportsDarkInterface = supportsDarkInterface + self.supportsDifferentiateWithoutColorAlone = supportsDifferentiateWithoutColorAlone + self.supportsLargerText = supportsLargerText + self.supportsReducedMotion = supportsReducedMotion + self.supportsSufficientContrast = supportsSufficientContrast + self.supportsVoiceControl = supportsVoiceControl + self.supportsVoiceover = supportsVoiceover + } + + private enum CodingKeys: String, CodingKey { + case deviceFamily + case supportsAudioDescriptions + case supportsCaptions + case supportsDarkInterface + case supportsDifferentiateWithoutColorAlone + case supportsLargerText + case supportsReducedMotion + case supportsSufficientContrast + case supportsVoiceControl + case supportsVoiceover + } + } + + public struct Relationships: Hashable, Codable, Sendable { + public var app: App + + public init(app: App) { + self.app = app + } + + private enum CodingKeys: String, CodingKey { + case app + } + + public struct App: Hashable, Codable, Sendable { + public var data: Data + + public init(data: Data) { + self.data = data + } + + private enum CodingKeys: String, CodingKey { + case data + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case apps + } + } + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/AccessibilityDeclarationUpdateRequest.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/AccessibilityDeclarationUpdateRequest.generated.swift new file mode 100644 index 00000000..41282f79 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/AccessibilityDeclarationUpdateRequest.generated.swift @@ -0,0 +1,105 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct AccessibilityDeclarationUpdateRequest: Hashable, Codable, Sendable { + public var data: Data + + public init(data: Data) { + self.data = data + } + + private enum CodingKeys: String, CodingKey { + case data + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public var attributes: Attributes? + + public init( + id: String, + type: `Type`, + attributes: Attributes? = nil + ) { + self.id = id + self.type = type + self.attributes = attributes + } + + private enum CodingKeys: String, CodingKey { + case id + case type + case attributes + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case accessibilityDeclarations + } + + public struct Attributes: Hashable, Codable, Sendable { + public var publish: Bool? + + public var supportsAudioDescriptions: Bool? + + public var supportsCaptions: Bool? + + public var supportsDarkInterface: Bool? + + public var supportsDifferentiateWithoutColorAlone: Bool? + + public var supportsLargerText: Bool? + + public var supportsReducedMotion: Bool? + + public var supportsSufficientContrast: Bool? + + public var supportsVoiceControl: Bool? + + public var supportsVoiceover: Bool? + + public init( + publish: Bool? = nil, + supportsAudioDescriptions: Bool? = nil, + supportsCaptions: Bool? = nil, + supportsDarkInterface: Bool? = nil, + supportsDifferentiateWithoutColorAlone: Bool? = nil, + supportsLargerText: Bool? = nil, + supportsReducedMotion: Bool? = nil, + supportsSufficientContrast: Bool? = nil, + supportsVoiceControl: Bool? = nil, + supportsVoiceover: Bool? = nil + ) { + self.publish = publish + self.supportsAudioDescriptions = supportsAudioDescriptions + self.supportsCaptions = supportsCaptions + self.supportsDarkInterface = supportsDarkInterface + self.supportsDifferentiateWithoutColorAlone = supportsDifferentiateWithoutColorAlone + self.supportsLargerText = supportsLargerText + self.supportsReducedMotion = supportsReducedMotion + self.supportsSufficientContrast = supportsSufficientContrast + self.supportsVoiceControl = supportsVoiceControl + self.supportsVoiceover = supportsVoiceover + } + + private enum CodingKeys: String, CodingKey { + case publish + case supportsAudioDescriptions + case supportsCaptions + case supportsDarkInterface + case supportsDifferentiateWithoutColorAlone + case supportsLargerText + case supportsReducedMotion + case supportsSufficientContrast + case supportsVoiceControl + case supportsVoiceover + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/AgeRatingDeclarationUpdateRequest.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/AgeRatingDeclarationUpdateRequest.generated.swift index 2e173d5a..0233c48a 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/AgeRatingDeclarationUpdateRequest.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/AgeRatingDeclarationUpdateRequest.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct AgeRatingDeclarationUpdateRequest: Hashable, Codable { +public struct AgeRatingDeclarationUpdateRequest: Hashable, Codable, Sendable { public var data: Data public init(data: Data) { @@ -14,7 +14,7 @@ public struct AgeRatingDeclarationUpdateRequest: Hashable, Codable { case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -37,34 +37,33 @@ public struct AgeRatingDeclarationUpdateRequest: Hashable, Codable { case attributes } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case ageRatingDeclarations } - public struct Attributes: Hashable, Codable { + public struct Attributes: Hashable, Codable, Sendable { public var alcoholTobaccoOrDrugUseOrReferences: AlcoholTobaccoOrDrugUseOrReferences? public var contests: Contests? public var gambling: Bool? - @available(*, deprecated) - public var gamblingAndContests: Bool? - public var gamblingSimulated: GamblingSimulated? public var horrorOrFearThemes: HorrorOrFearThemes? public var kidsAgeBand: KidsAgeBand? + public var koreaAgeRatingOverride: KoreaAgeRatingOverride? + + public var lootBox: Bool? + public var matureOrSuggestiveThemes: MatureOrSuggestiveThemes? public var medicalOrTreatmentInformation: MedicalOrTreatmentInformation? public var profanityOrCrudeHumor: ProfanityOrCrudeHumor? - public var seventeenPlus: Bool? - public var sexualContentGraphicAndNudity: SexualContentGraphicAndNudity? public var sexualContentOrNudity: SexualContentOrNudity? @@ -81,14 +80,14 @@ public struct AgeRatingDeclarationUpdateRequest: Hashable, Codable { alcoholTobaccoOrDrugUseOrReferences: AlcoholTobaccoOrDrugUseOrReferences? = nil, contests: Contests? = nil, gambling: Bool? = nil, - gamblingAndContests: Bool? = nil, gamblingSimulated: GamblingSimulated? = nil, horrorOrFearThemes: HorrorOrFearThemes? = nil, kidsAgeBand: KidsAgeBand? = nil, + koreaAgeRatingOverride: KoreaAgeRatingOverride? = nil, + lootBox: Bool? = nil, matureOrSuggestiveThemes: MatureOrSuggestiveThemes? = nil, medicalOrTreatmentInformation: MedicalOrTreatmentInformation? = nil, profanityOrCrudeHumor: ProfanityOrCrudeHumor? = nil, - seventeenPlus: Bool? = nil, sexualContentGraphicAndNudity: SexualContentGraphicAndNudity? = nil, sexualContentOrNudity: SexualContentOrNudity? = nil, unrestrictedWebAccess: Bool? = nil, @@ -99,14 +98,14 @@ public struct AgeRatingDeclarationUpdateRequest: Hashable, Codable { self.alcoholTobaccoOrDrugUseOrReferences = alcoholTobaccoOrDrugUseOrReferences self.contests = contests self.gambling = gambling - self.gamblingAndContests = gamblingAndContests self.gamblingSimulated = gamblingSimulated self.horrorOrFearThemes = horrorOrFearThemes self.kidsAgeBand = kidsAgeBand + self.koreaAgeRatingOverride = koreaAgeRatingOverride + self.lootBox = lootBox self.matureOrSuggestiveThemes = matureOrSuggestiveThemes self.medicalOrTreatmentInformation = medicalOrTreatmentInformation self.profanityOrCrudeHumor = profanityOrCrudeHumor - self.seventeenPlus = seventeenPlus self.sexualContentGraphicAndNudity = sexualContentGraphicAndNudity self.sexualContentOrNudity = sexualContentOrNudity self.unrestrictedWebAccess = unrestrictedWebAccess @@ -119,14 +118,14 @@ public struct AgeRatingDeclarationUpdateRequest: Hashable, Codable { case alcoholTobaccoOrDrugUseOrReferences case contests case gambling - case gamblingAndContests case gamblingSimulated case horrorOrFearThemes case kidsAgeBand + case koreaAgeRatingOverride + case lootBox case matureOrSuggestiveThemes case medicalOrTreatmentInformation case profanityOrCrudeHumor - case seventeenPlus case sexualContentGraphicAndNudity case sexualContentOrNudity case unrestrictedWebAccess @@ -135,303 +134,219 @@ public struct AgeRatingDeclarationUpdateRequest: Hashable, Codable { case violenceRealisticProlongedGraphicOrSadistic } - public enum AlcoholTobaccoOrDrugUseOrReferences: Hashable, Codable, RawRepresentable { - case frequentOrIntense - case infrequentOrMild - case none - case unknown(String) + public struct AlcoholTobaccoOrDrugUseOrReferences: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var none: Self { + .init(rawValue: "NONE") + } - public var rawValue: String { - switch self { - case .frequentOrIntense: return "FREQUENT_OR_INTENSE" - case .infrequentOrMild: return "INFREQUENT_OR_MILD" - case .none: return "NONE" - case .unknown(let rawValue): return rawValue - } + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "FREQUENT_OR_INTENSE": self = .frequentOrIntense - case "INFREQUENT_OR_MILD": self = .infrequentOrMild - case "NONE": self = .none - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum Contests: Hashable, Codable, RawRepresentable { - case frequentOrIntense - case infrequentOrMild - case none - case unknown(String) + public struct Contests: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var none: Self { + .init(rawValue: "NONE") + } - public var rawValue: String { - switch self { - case .frequentOrIntense: return "FREQUENT_OR_INTENSE" - case .infrequentOrMild: return "INFREQUENT_OR_MILD" - case .none: return "NONE" - case .unknown(let rawValue): return rawValue - } + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "FREQUENT_OR_INTENSE": self = .frequentOrIntense - case "INFREQUENT_OR_MILD": self = .infrequentOrMild - case "NONE": self = .none - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum GamblingSimulated: Hashable, Codable, RawRepresentable { - case frequentOrIntense - case infrequentOrMild - case none - case unknown(String) + public struct GamblingSimulated: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var none: Self { + .init(rawValue: "NONE") + } - public var rawValue: String { - switch self { - case .frequentOrIntense: return "FREQUENT_OR_INTENSE" - case .infrequentOrMild: return "INFREQUENT_OR_MILD" - case .none: return "NONE" - case .unknown(let rawValue): return rawValue - } + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "FREQUENT_OR_INTENSE": self = .frequentOrIntense - case "INFREQUENT_OR_MILD": self = .infrequentOrMild - case "NONE": self = .none - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum HorrorOrFearThemes: Hashable, Codable, RawRepresentable { - case frequentOrIntense - case infrequentOrMild - case none - case unknown(String) + public struct HorrorOrFearThemes: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var none: Self { + .init(rawValue: "NONE") + } - public var rawValue: String { - switch self { - case .frequentOrIntense: return "FREQUENT_OR_INTENSE" - case .infrequentOrMild: return "INFREQUENT_OR_MILD" - case .none: return "NONE" - case .unknown(let rawValue): return rawValue - } + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "FREQUENT_OR_INTENSE": self = .frequentOrIntense - case "INFREQUENT_OR_MILD": self = .infrequentOrMild - case "NONE": self = .none - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum MatureOrSuggestiveThemes: Hashable, Codable, RawRepresentable { - case frequentOrIntense - case infrequentOrMild - case none - case unknown(String) + public struct KoreaAgeRatingOverride: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var fifteenPlus: Self { + .init(rawValue: "FIFTEEN_PLUS") + } + + public static var nineteenPlus: Self { + .init(rawValue: "NINETEEN_PLUS") + } + + public static var none: Self { + .init(rawValue: "NONE") + } - public var rawValue: String { - switch self { - case .frequentOrIntense: return "FREQUENT_OR_INTENSE" - case .infrequentOrMild: return "INFREQUENT_OR_MILD" - case .none: return "NONE" - case .unknown(let rawValue): return rawValue - } + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "FREQUENT_OR_INTENSE": self = .frequentOrIntense - case "INFREQUENT_OR_MILD": self = .infrequentOrMild - case "NONE": self = .none - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum MedicalOrTreatmentInformation: Hashable, Codable, RawRepresentable { - case frequentOrIntense - case infrequentOrMild - case none - case unknown(String) + public struct MatureOrSuggestiveThemes: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var none: Self { + .init(rawValue: "NONE") + } - public var rawValue: String { - switch self { - case .frequentOrIntense: return "FREQUENT_OR_INTENSE" - case .infrequentOrMild: return "INFREQUENT_OR_MILD" - case .none: return "NONE" - case .unknown(let rawValue): return rawValue - } + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "FREQUENT_OR_INTENSE": self = .frequentOrIntense - case "INFREQUENT_OR_MILD": self = .infrequentOrMild - case "NONE": self = .none - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum ProfanityOrCrudeHumor: Hashable, Codable, RawRepresentable { - case frequentOrIntense - case infrequentOrMild - case none - case unknown(String) + public struct MedicalOrTreatmentInformation: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var none: Self { + .init(rawValue: "NONE") + } - public var rawValue: String { - switch self { - case .frequentOrIntense: return "FREQUENT_OR_INTENSE" - case .infrequentOrMild: return "INFREQUENT_OR_MILD" - case .none: return "NONE" - case .unknown(let rawValue): return rawValue - } + public var description: String { + rawValue } + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct ProfanityOrCrudeHumor: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var none: Self { + .init(rawValue: "NONE") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "FREQUENT_OR_INTENSE": self = .frequentOrIntense - case "INFREQUENT_OR_MILD": self = .infrequentOrMild - case "NONE": self = .none - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum SexualContentGraphicAndNudity: Hashable, Codable, RawRepresentable { - case frequentOrIntense - case infrequentOrMild - case none - case unknown(String) + public struct SexualContentGraphicAndNudity: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var none: Self { + .init(rawValue: "NONE") + } - public var rawValue: String { - switch self { - case .frequentOrIntense: return "FREQUENT_OR_INTENSE" - case .infrequentOrMild: return "INFREQUENT_OR_MILD" - case .none: return "NONE" - case .unknown(let rawValue): return rawValue - } + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "FREQUENT_OR_INTENSE": self = .frequentOrIntense - case "INFREQUENT_OR_MILD": self = .infrequentOrMild - case "NONE": self = .none - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum SexualContentOrNudity: Hashable, Codable, RawRepresentable { - case frequentOrIntense - case infrequentOrMild - case none - case unknown(String) + public struct SexualContentOrNudity: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var none: Self { + .init(rawValue: "NONE") + } - public var rawValue: String { - switch self { - case .frequentOrIntense: return "FREQUENT_OR_INTENSE" - case .infrequentOrMild: return "INFREQUENT_OR_MILD" - case .none: return "NONE" - case .unknown(let rawValue): return rawValue - } + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "FREQUENT_OR_INTENSE": self = .frequentOrIntense - case "INFREQUENT_OR_MILD": self = .infrequentOrMild - case "NONE": self = .none - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum ViolenceCartoonOrFantasy: Hashable, Codable, RawRepresentable { - case frequentOrIntense - case infrequentOrMild - case none - case unknown(String) + public struct ViolenceCartoonOrFantasy: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var none: Self { + .init(rawValue: "NONE") + } - public var rawValue: String { - switch self { - case .frequentOrIntense: return "FREQUENT_OR_INTENSE" - case .infrequentOrMild: return "INFREQUENT_OR_MILD" - case .none: return "NONE" - case .unknown(let rawValue): return rawValue - } + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "FREQUENT_OR_INTENSE": self = .frequentOrIntense - case "INFREQUENT_OR_MILD": self = .infrequentOrMild - case "NONE": self = .none - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum ViolenceRealistic: Hashable, Codable, RawRepresentable { - case frequentOrIntense - case infrequentOrMild - case none - case unknown(String) + public struct ViolenceRealistic: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var none: Self { + .init(rawValue: "NONE") + } - public var rawValue: String { - switch self { - case .frequentOrIntense: return "FREQUENT_OR_INTENSE" - case .infrequentOrMild: return "INFREQUENT_OR_MILD" - case .none: return "NONE" - case .unknown(let rawValue): return rawValue - } + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "FREQUENT_OR_INTENSE": self = .frequentOrIntense - case "INFREQUENT_OR_MILD": self = .infrequentOrMild - case "NONE": self = .none - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum ViolenceRealisticProlongedGraphicOrSadistic: Hashable, Codable, RawRepresentable { - case frequentOrIntense - case infrequentOrMild - case none - case unknown(String) + public struct ViolenceRealisticProlongedGraphicOrSadistic: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var none: Self { + .init(rawValue: "NONE") + } - public var rawValue: String { - switch self { - case .frequentOrIntense: return "FREQUENT_OR_INTENSE" - case .infrequentOrMild: return "INFREQUENT_OR_MILD" - case .none: return "NONE" - case .unknown(let rawValue): return rawValue - } + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "FREQUENT_OR_INTENSE": self = .frequentOrIntense - case "INFREQUENT_OR_MILD": self = .infrequentOrMild - case "NONE": self = .none - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/AlternativeDistributionDomainCreateRequest.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/AlternativeDistributionDomainCreateRequest.generated.swift new file mode 100644 index 00000000..969acf78 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/AlternativeDistributionDomainCreateRequest.generated.swift @@ -0,0 +1,60 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct AlternativeDistributionDomainCreateRequest: Hashable, Codable, Sendable { + public var data: Data + + public init(data: Data) { + self.data = data + } + + private enum CodingKeys: String, CodingKey { + case data + } + + public struct Data: Hashable, Codable, Sendable { + public var type: `Type` + + public var attributes: Attributes + + public init( + type: `Type`, + attributes: Attributes + ) { + self.type = type + self.attributes = attributes + } + + private enum CodingKeys: String, CodingKey { + case type + case attributes + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case alternativeDistributionDomains + } + + public struct Attributes: Hashable, Codable, Sendable { + public var domain: String + + public var referenceName: String + + public init( + domain: String, + referenceName: String + ) { + self.domain = domain + self.referenceName = referenceName + } + + private enum CodingKeys: String, CodingKey { + case domain + case referenceName + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/AlternativeDistributionKeyCreateRequest.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/AlternativeDistributionKeyCreateRequest.generated.swift new file mode 100644 index 00000000..f9505d50 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/AlternativeDistributionKeyCreateRequest.generated.swift @@ -0,0 +1,105 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct AlternativeDistributionKeyCreateRequest: Hashable, Codable, Sendable { + public var data: Data + + public init(data: Data) { + self.data = data + } + + private enum CodingKeys: String, CodingKey { + case data + } + + public struct Data: Hashable, Codable, Sendable { + public var type: `Type` + + public var attributes: Attributes + + public var relationships: Relationships? + + public init( + type: `Type`, + attributes: Attributes, + relationships: Relationships? = nil + ) { + self.type = type + self.attributes = attributes + self.relationships = relationships + } + + private enum CodingKeys: String, CodingKey { + case type + case attributes + case relationships + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case alternativeDistributionKeys + } + + public struct Attributes: Hashable, Codable, Sendable { + public var publicKey: String + + public init(publicKey: String) { + self.publicKey = publicKey + } + + private enum CodingKeys: String, CodingKey { + case publicKey + } + } + + public struct Relationships: Hashable, Codable, Sendable { + public var app: App? + + public init(app: App? = nil) { + self.app = app + } + + private enum CodingKeys: String, CodingKey { + case app + } + + public struct App: Hashable, Codable, Sendable { + public var data: Data? + + public init(data: Data? = nil) { + self.data = data + } + + private enum CodingKeys: String, CodingKey { + case data + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case apps + } + } + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/AppStoreVersionSubmissionCreateRequest.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/AlternativeDistributionPackageCreateRequest.generated.swift similarity index 79% rename from Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/AppStoreVersionSubmissionCreateRequest.generated.swift rename to Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/AlternativeDistributionPackageCreateRequest.generated.swift index 1d879a14..8e2bf904 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/AppStoreVersionSubmissionCreateRequest.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/AlternativeDistributionPackageCreateRequest.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct AppStoreVersionSubmissionCreateRequest: Hashable, Codable { +public struct AlternativeDistributionPackageCreateRequest: Hashable, Codable, Sendable { public var data: Data public init(data: Data) { @@ -14,7 +14,7 @@ public struct AppStoreVersionSubmissionCreateRequest: Hashable, Codable { case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var type: `Type` public var relationships: Relationships @@ -32,11 +32,11 @@ public struct AppStoreVersionSubmissionCreateRequest: Hashable, Codable { case relationships } - public enum `Type`: String, Hashable, Codable { - case appStoreVersionSubmissions + public enum `Type`: String, Hashable, Codable, Sendable { + case alternativeDistributionPackages } - public struct Relationships: Hashable, Codable { + public struct Relationships: Hashable, Codable, Sendable { public var appStoreVersion: AppStoreVersion public init(appStoreVersion: AppStoreVersion) { @@ -47,7 +47,7 @@ public struct AppStoreVersionSubmissionCreateRequest: Hashable, Codable { case appStoreVersion } - public struct AppStoreVersion: Hashable, Codable { + public struct AppStoreVersion: Hashable, Codable, Sendable { public var data: Data public init(data: Data) { @@ -58,7 +58,7 @@ public struct AppStoreVersionSubmissionCreateRequest: Hashable, Codable { case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -76,7 +76,7 @@ public struct AppStoreVersionSubmissionCreateRequest: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case appStoreVersions } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/AnalyticsReportRequest.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/AnalyticsReportRequest.generated.swift new file mode 100644 index 00000000..9d6ce2dd --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/AnalyticsReportRequest.generated.swift @@ -0,0 +1,142 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct AnalyticsReportRequest: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public var attributes: Attributes? + + public var relationships: Relationships? + + public var links: ResourceLinks? + + public init( + id: String, + type: `Type`, + attributes: Attributes? = nil, + relationships: Relationships? = nil, + links: ResourceLinks? = nil + ) { + self.id = id + self.type = type + self.attributes = attributes + self.relationships = relationships + self.links = links + } + + private enum CodingKeys: String, CodingKey { + case id + case type + case attributes + case relationships + case links + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case analyticsReportRequests + } + + public struct Attributes: Hashable, Codable, Sendable { + public var accessType: AccessType? + + public var stoppedDueToInactivity: Bool? + + public init( + accessType: AccessType? = nil, + stoppedDueToInactivity: Bool? = nil + ) { + self.accessType = accessType + self.stoppedDueToInactivity = stoppedDueToInactivity + } + + private enum CodingKeys: String, CodingKey { + case accessType + case stoppedDueToInactivity + } + + public struct AccessType: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var oneTimeSnapshot: Self { + .init(rawValue: "ONE_TIME_SNAPSHOT") + } + + public static var ongoing: Self { + .init(rawValue: "ONGOING") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + } + + public struct Relationships: Hashable, Codable, Sendable { + public var reports: Reports? + + public init(reports: Reports? = nil) { + self.reports = reports + } + + private enum CodingKeys: String, CodingKey { + case reports + } + + public struct Reports: Hashable, Codable, Sendable { + public var data: [Data]? + + public var links: RelationshipLinks? + + public var meta: PagingInformation? + + public init( + data: [Data]? = nil, + links: RelationshipLinks? = nil, + meta: PagingInformation? = nil + ) { + self.data = data + self.links = links + self.meta = meta + } + + private enum CodingKeys: String, CodingKey { + case data + case links + case meta + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case analyticsReports + } + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/AnalyticsReportRequestCreateRequest.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/AnalyticsReportRequestCreateRequest.generated.swift new file mode 100644 index 00000000..7c5435f1 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/AnalyticsReportRequestCreateRequest.generated.swift @@ -0,0 +1,125 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct AnalyticsReportRequestCreateRequest: Hashable, Codable, Sendable { + public var data: Data + + public init(data: Data) { + self.data = data + } + + private enum CodingKeys: String, CodingKey { + case data + } + + public struct Data: Hashable, Codable, Sendable { + public var type: `Type` + + public var attributes: Attributes + + public var relationships: Relationships + + public init( + type: `Type`, + attributes: Attributes, + relationships: Relationships + ) { + self.type = type + self.attributes = attributes + self.relationships = relationships + } + + private enum CodingKeys: String, CodingKey { + case type + case attributes + case relationships + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case analyticsReportRequests + } + + public struct Attributes: Hashable, Codable, Sendable { + public var accessType: AccessType + + public init(accessType: AccessType) { + self.accessType = accessType + } + + private enum CodingKeys: String, CodingKey { + case accessType + } + + public struct AccessType: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var oneTimeSnapshot: Self { + .init(rawValue: "ONE_TIME_SNAPSHOT") + } + + public static var ongoing: Self { + .init(rawValue: "ONGOING") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + } + + public struct Relationships: Hashable, Codable, Sendable { + public var app: App + + public init(app: App) { + self.app = app + } + + private enum CodingKeys: String, CodingKey { + case app + } + + public struct App: Hashable, Codable, Sendable { + public var data: Data + + public init(data: Data) { + self.data = data + } + + private enum CodingKeys: String, CodingKey { + case data + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case apps + } + } + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/AppAvailabilityV2CreateRequest.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/AppAvailabilityV2CreateRequest.generated.swift index 98ef35ec..351d92ea 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/AppAvailabilityV2CreateRequest.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/AppAvailabilityV2CreateRequest.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct AppAvailabilityV2CreateRequest: Hashable, Codable { +public struct AppAvailabilityV2CreateRequest: Hashable, Codable, Sendable { public var data: Data public var included: [TerritoryAvailabilityInlineCreate]? @@ -21,7 +21,7 @@ public struct AppAvailabilityV2CreateRequest: Hashable, Codable { case included } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var type: `Type` public var attributes: Attributes @@ -44,11 +44,11 @@ public struct AppAvailabilityV2CreateRequest: Hashable, Codable { case relationships } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case appAvailabilities } - public struct Attributes: Hashable, Codable { + public struct Attributes: Hashable, Codable, Sendable { public var availableInNewTerritories: Bool public init(availableInNewTerritories: Bool) { @@ -60,7 +60,7 @@ public struct AppAvailabilityV2CreateRequest: Hashable, Codable { } } - public struct Relationships: Hashable, Codable { + public struct Relationships: Hashable, Codable, Sendable { public var app: App public var territoryAvailabilities: TerritoryAvailabilities @@ -78,7 +78,7 @@ public struct AppAvailabilityV2CreateRequest: Hashable, Codable { case territoryAvailabilities } - public struct App: Hashable, Codable { + public struct App: Hashable, Codable, Sendable { public var data: Data public init(data: Data) { @@ -89,7 +89,7 @@ public struct AppAvailabilityV2CreateRequest: Hashable, Codable { case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -107,13 +107,13 @@ public struct AppAvailabilityV2CreateRequest: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case apps } } } - public struct TerritoryAvailabilities: Hashable, Codable { + public struct TerritoryAvailabilities: Hashable, Codable, Sendable { public var data: [Data] public init(data: [Data]) { @@ -124,7 +124,7 @@ public struct AppAvailabilityV2CreateRequest: Hashable, Codable { case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -142,7 +142,7 @@ public struct AppAvailabilityV2CreateRequest: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case territoryAvailabilities } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/AppBetaTestersLinkagesRequest.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/AppBetaTestersLinkagesRequest.generated.swift index a46f5ff2..1df2403e 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/AppBetaTestersLinkagesRequest.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/AppBetaTestersLinkagesRequest.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct AppBetaTestersLinkagesRequest: Hashable, Codable { +public struct AppBetaTestersLinkagesRequest: Hashable, Codable, Sendable { public var data: [Data] public init(data: [Data]) { @@ -14,7 +14,7 @@ public struct AppBetaTestersLinkagesRequest: Hashable, Codable { case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -32,7 +32,7 @@ public struct AppBetaTestersLinkagesRequest: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case betaTesters } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/AppClipAdvancedExperienceCreateRequest.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/AppClipAdvancedExperienceCreateRequest.generated.swift index 71c498ae..611fc5a9 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/AppClipAdvancedExperienceCreateRequest.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/AppClipAdvancedExperienceCreateRequest.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct AppClipAdvancedExperienceCreateRequest: Hashable, Codable { +public struct AppClipAdvancedExperienceCreateRequest: Hashable, Codable, Sendable { public var data: Data public var included: [AppClipAdvancedExperienceLocalizationInlineCreate]? @@ -21,7 +21,7 @@ public struct AppClipAdvancedExperienceCreateRequest: Hashable, Codable { case included } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var type: `Type` public var attributes: Attributes @@ -44,11 +44,11 @@ public struct AppClipAdvancedExperienceCreateRequest: Hashable, Codable { case relationships } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case appClipAdvancedExperiences } - public struct Attributes: Hashable, Codable { + public struct Attributes: Hashable, Codable, Sendable { public var action: AppClipAction? public var businessCategory: BusinessCategory? @@ -86,104 +86,127 @@ public struct AppClipAdvancedExperienceCreateRequest: Hashable, Codable { case place } - public enum BusinessCategory: Hashable, Codable, RawRepresentable { - case automotive - case beauty - case bikes - case books - case casino - case education - case educationJapan - case entertainment - case evCharger - case financialCny - case financialEur - case financialGbp - case financialJpy - case financialUsd - case fitness - case foodAndDrink - case gas - case grocery - case healthAndMedical - case hotelAndTravel - case music - case parking - case petServices - case professionalServices - case shopping - case ticketing - case transit - case unknown(String) - - public var rawValue: String { - switch self { - case .automotive: return "AUTOMOTIVE" - case .beauty: return "BEAUTY" - case .bikes: return "BIKES" - case .books: return "BOOKS" - case .casino: return "CASINO" - case .education: return "EDUCATION" - case .educationJapan: return "EDUCATION_JAPAN" - case .entertainment: return "ENTERTAINMENT" - case .evCharger: return "EV_CHARGER" - case .financialCny: return "FINANCIAL_CNY" - case .financialEur: return "FINANCIAL_EUR" - case .financialGbp: return "FINANCIAL_GBP" - case .financialJpy: return "FINANCIAL_JPY" - case .financialUsd: return "FINANCIAL_USD" - case .fitness: return "FITNESS" - case .foodAndDrink: return "FOOD_AND_DRINK" - case .gas: return "GAS" - case .grocery: return "GROCERY" - case .healthAndMedical: return "HEALTH_AND_MEDICAL" - case .hotelAndTravel: return "HOTEL_AND_TRAVEL" - case .music: return "MUSIC" - case .parking: return "PARKING" - case .petServices: return "PET_SERVICES" - case .professionalServices: return "PROFESSIONAL_SERVICES" - case .shopping: return "SHOPPING" - case .ticketing: return "TICKETING" - case .transit: return "TRANSIT" - case .unknown(let rawValue): return rawValue - } + public struct BusinessCategory: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var automotive: Self { + .init(rawValue: "AUTOMOTIVE") + } + + public static var beauty: Self { + .init(rawValue: "BEAUTY") + } + + public static var bikes: Self { + .init(rawValue: "BIKES") + } + + public static var books: Self { + .init(rawValue: "BOOKS") + } + + public static var casino: Self { + .init(rawValue: "CASINO") + } + + public static var education: Self { + .init(rawValue: "EDUCATION") + } + + public static var educationJapan: Self { + .init(rawValue: "EDUCATION_JAPAN") + } + + public static var entertainment: Self { + .init(rawValue: "ENTERTAINMENT") + } + + public static var evCharger: Self { + .init(rawValue: "EV_CHARGER") + } + + public static var financialCny: Self { + .init(rawValue: "FINANCIAL_CNY") + } + + public static var financialEur: Self { + .init(rawValue: "FINANCIAL_EUR") + } + + public static var financialGbp: Self { + .init(rawValue: "FINANCIAL_GBP") + } + + public static var financialJpy: Self { + .init(rawValue: "FINANCIAL_JPY") + } + + public static var financialUsd: Self { + .init(rawValue: "FINANCIAL_USD") + } + + public static var fitness: Self { + .init(rawValue: "FITNESS") + } + + public static var foodAndDrink: Self { + .init(rawValue: "FOOD_AND_DRINK") + } + + public static var gas: Self { + .init(rawValue: "GAS") + } + + public static var grocery: Self { + .init(rawValue: "GROCERY") + } + + public static var healthAndMedical: Self { + .init(rawValue: "HEALTH_AND_MEDICAL") + } + + public static var hotelAndTravel: Self { + .init(rawValue: "HOTEL_AND_TRAVEL") + } + + public static var music: Self { + .init(rawValue: "MUSIC") } + public static var parking: Self { + .init(rawValue: "PARKING") + } + + public static var petServices: Self { + .init(rawValue: "PET_SERVICES") + } + + public static var professionalServices: Self { + .init(rawValue: "PROFESSIONAL_SERVICES") + } + + public static var shopping: Self { + .init(rawValue: "SHOPPING") + } + + public static var ticketing: Self { + .init(rawValue: "TICKETING") + } + + public static var transit: Self { + .init(rawValue: "TRANSIT") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "AUTOMOTIVE": self = .automotive - case "BEAUTY": self = .beauty - case "BIKES": self = .bikes - case "BOOKS": self = .books - case "CASINO": self = .casino - case "EDUCATION": self = .education - case "EDUCATION_JAPAN": self = .educationJapan - case "ENTERTAINMENT": self = .entertainment - case "EV_CHARGER": self = .evCharger - case "FINANCIAL_CNY": self = .financialCny - case "FINANCIAL_EUR": self = .financialEur - case "FINANCIAL_GBP": self = .financialGbp - case "FINANCIAL_JPY": self = .financialJpy - case "FINANCIAL_USD": self = .financialUsd - case "FITNESS": self = .fitness - case "FOOD_AND_DRINK": self = .foodAndDrink - case "GAS": self = .gas - case "GROCERY": self = .grocery - case "HEALTH_AND_MEDICAL": self = .healthAndMedical - case "HOTEL_AND_TRAVEL": self = .hotelAndTravel - case "MUSIC": self = .music - case "PARKING": self = .parking - case "PET_SERVICES": self = .petServices - case "PROFESSIONAL_SERVICES": self = .professionalServices - case "SHOPPING": self = .shopping - case "TICKETING": self = .ticketing - case "TRANSIT": self = .transit - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public struct Place: Hashable, Codable { + public struct Place: Hashable, Codable, Sendable { public var categories: [String]? public var displayPoint: DisplayPoint? @@ -236,7 +259,7 @@ public struct AppClipAdvancedExperienceCreateRequest: Hashable, Codable { case relationship } - public struct DisplayPoint: Hashable, Codable { + public struct DisplayPoint: Hashable, Codable, Sendable { public var coordinates: Coordinates? public var source: Source? @@ -254,7 +277,7 @@ public struct AppClipAdvancedExperienceCreateRequest: Hashable, Codable { case source } - public struct Coordinates: Hashable, Codable { + public struct Coordinates: Hashable, Codable, Sendable { public var latitude: Float? public var longitude: Float? @@ -273,30 +296,28 @@ public struct AppClipAdvancedExperienceCreateRequest: Hashable, Codable { } } - public enum Source: Hashable, Codable, RawRepresentable { - case calculated - case manuallyPlaced - case unknown(String) + public struct Source: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var calculated: Self { + .init(rawValue: "CALCULATED") + } - public var rawValue: String { - switch self { - case .calculated: return "CALCULATED" - case .manuallyPlaced: return "MANUALLY_PLACED" - case .unknown(let rawValue): return rawValue - } + public static var manuallyPlaced: Self { + .init(rawValue: "MANUALLY_PLACED") } + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "CALCULATED": self = .calculated - case "MANUALLY_PLACED": self = .manuallyPlaced - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } } - public struct MainAddress: Hashable, Codable { + public struct MainAddress: Hashable, Codable, Sendable { public var fullAddress: String? public var structuredAddress: StructuredAddress? @@ -314,7 +335,7 @@ public struct AppClipAdvancedExperienceCreateRequest: Hashable, Codable { case structuredAddress } - public struct StructuredAddress: Hashable, Codable { + public struct StructuredAddress: Hashable, Codable, Sendable { public var countryCode: String? public var floor: String? @@ -359,62 +380,179 @@ public struct AppClipAdvancedExperienceCreateRequest: Hashable, Codable { } } - public enum MapAction: Hashable, Codable, RawRepresentable { - case buyTickets - case hotelBookRoom - case parkingReserveParking - case restaurantJoinWaitlist - case restaurantOrderDelivery - case restaurantOrderFood - case restaurantOrderTakeout - case restaurantReservation - case restaurantViewMenu - case scheduleAppointment - case theaterNowPlaying - case viewAvailability - case viewPricing - case unknown(String) - - public var rawValue: String { - switch self { - case .buyTickets: return "BUY_TICKETS" - case .hotelBookRoom: return "HOTEL_BOOK_ROOM" - case .parkingReserveParking: return "PARKING_RESERVE_PARKING" - case .restaurantJoinWaitlist: return "RESTAURANT_JOIN_WAITLIST" - case .restaurantOrderDelivery: return "RESTAURANT_ORDER_DELIVERY" - case .restaurantOrderFood: return "RESTAURANT_ORDER_FOOD" - case .restaurantOrderTakeout: return "RESTAURANT_ORDER_TAKEOUT" - case .restaurantReservation: return "RESTAURANT_RESERVATION" - case .restaurantViewMenu: return "RESTAURANT_VIEW_MENU" - case .scheduleAppointment: return "SCHEDULE_APPOINTMENT" - case .theaterNowPlaying: return "THEATER_NOW_PLAYING" - case .viewAvailability: return "VIEW_AVAILABILITY" - case .viewPricing: return "VIEW_PRICING" - case .unknown(let rawValue): return rawValue - } + public struct MapAction: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var airlineBookTravel: Self { + .init(rawValue: "AIRLINE_BOOK_TRAVEL") + } + + public static var airlineCheckIn: Self { + .init(rawValue: "AIRLINE_CHECK_IN") + } + + public static var airlineFlightStatus: Self { + .init(rawValue: "AIRLINE_FLIGHT_STATUS") + } + + public static var apply: Self { + .init(rawValue: "APPLY") + } + + public static var book: Self { + .init(rawValue: "BOOK") + } + + public static var bookActivities: Self { + .init(rawValue: "BOOK_ACTIVITIES") + } + + public static var bookRides: Self { + .init(rawValue: "BOOK_RIDES") + } + + public static var bookTeetimes: Self { + .init(rawValue: "BOOK_TEETIMES") } + public static var bookTours: Self { + .init(rawValue: "BOOK_TOURS") + } + + public static var buyTickets: Self { + .init(rawValue: "BUY_TICKETS") + } + + public static var careers: Self { + .init(rawValue: "CAREERS") + } + + public static var chargeEv: Self { + .init(rawValue: "CHARGE_EV") + } + + public static var coupons: Self { + .init(rawValue: "COUPONS") + } + + public static var donate: Self { + .init(rawValue: "DONATE") + } + + public static var events: Self { + .init(rawValue: "EVENTS") + } + + public static var eventsShows: Self { + .init(rawValue: "EVENTS_SHOWS") + } + + public static var eventsSports: Self { + .init(rawValue: "EVENTS_SPORTS") + } + + public static var giftCard: Self { + .init(rawValue: "GIFT_CARD") + } + + public static var hotelAmenities: Self { + .init(rawValue: "HOTEL_AMENITIES") + } + + public static var hotelBookRoom: Self { + .init(rawValue: "HOTEL_BOOK_ROOM") + } + + public static var join: Self { + .init(rawValue: "JOIN") + } + + public static var parkingAvailable: Self { + .init(rawValue: "PARKING_AVAILABLE") + } + + public static var parkingReserveParking: Self { + .init(rawValue: "PARKING_RESERVE_PARKING") + } + + public static var restaurantJoinWaitlist: Self { + .init(rawValue: "RESTAURANT_JOIN_WAITLIST") + } + + public static var restaurantOrderDelivery: Self { + .init(rawValue: "RESTAURANT_ORDER_DELIVERY") + } + + public static var restaurantOrderFood: Self { + .init(rawValue: "RESTAURANT_ORDER_FOOD") + } + + public static var restaurantOrderTakeout: Self { + .init(rawValue: "RESTAURANT_ORDER_TAKEOUT") + } + + public static var restaurantPickup: Self { + .init(rawValue: "RESTAURANT_PICKUP") + } + + public static var restaurantReservation: Self { + .init(rawValue: "RESTAURANT_RESERVATION") + } + + public static var restaurantViewMenu: Self { + .init(rawValue: "RESTAURANT_VIEW_MENU") + } + + public static var retailServiceQuote: Self { + .init(rawValue: "RETAIL_SERVICE_QUOTE") + } + + public static var retailStoreDelivery: Self { + .init(rawValue: "RETAIL_STORE_DELIVERY") + } + + public static var retailStorePickup: Self { + .init(rawValue: "RETAIL_STORE_PICKUP") + } + + public static var retailStoreShop: Self { + .init(rawValue: "RETAIL_STORE_SHOP") + } + + public static var scheduleAppointment: Self { + .init(rawValue: "SCHEDULE_APPOINTMENT") + } + + public static var services: Self { + .init(rawValue: "SERVICES") + } + + public static var support: Self { + .init(rawValue: "SUPPORT") + } + + public static var theaterNowPlaying: Self { + .init(rawValue: "THEATER_NOW_PLAYING") + } + + public static var viewAvailability: Self { + .init(rawValue: "VIEW_AVAILABILITY") + } + + public static var viewPricing: Self { + .init(rawValue: "VIEW_PRICING") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "BUY_TICKETS": self = .buyTickets - case "HOTEL_BOOK_ROOM": self = .hotelBookRoom - case "PARKING_RESERVE_PARKING": self = .parkingReserveParking - case "RESTAURANT_JOIN_WAITLIST": self = .restaurantJoinWaitlist - case "RESTAURANT_ORDER_DELIVERY": self = .restaurantOrderDelivery - case "RESTAURANT_ORDER_FOOD": self = .restaurantOrderFood - case "RESTAURANT_ORDER_TAKEOUT": self = .restaurantOrderTakeout - case "RESTAURANT_RESERVATION": self = .restaurantReservation - case "RESTAURANT_VIEW_MENU": self = .restaurantViewMenu - case "SCHEDULE_APPOINTMENT": self = .scheduleAppointment - case "THEATER_NOW_PLAYING": self = .theaterNowPlaying - case "VIEW_AVAILABILITY": self = .viewAvailability - case "VIEW_PRICING": self = .viewPricing - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public struct PhoneNumber: Hashable, Codable { + public struct PhoneNumber: Hashable, Codable, Sendable { public var type: `Type`? public var intent: String? @@ -437,63 +575,62 @@ public struct AppClipAdvancedExperienceCreateRequest: Hashable, Codable { case number } - public enum `Type`: Hashable, Codable, RawRepresentable { - case fax - case landline - case mobile - case tollfree - case unknown(String) - - public var rawValue: String { - switch self { - case .fax: return "FAX" - case .landline: return "LANDLINE" - case .mobile: return "MOBILE" - case .tollfree: return "TOLLFREE" - case .unknown(let rawValue): return rawValue - } + public struct `Type`: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var fax: Self { + .init(rawValue: "FAX") + } + + public static var landline: Self { + .init(rawValue: "LANDLINE") + } + + public static var mobile: Self { + .init(rawValue: "MOBILE") + } + + public static var tollfree: Self { + .init(rawValue: "TOLLFREE") + } + + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "FAX": self = .fax - case "LANDLINE": self = .landline - case "MOBILE": self = .mobile - case "TOLLFREE": self = .tollfree - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } } - public enum Relationship: Hashable, Codable, RawRepresentable { - case authorized - case other - case owner - case unknown(String) + public struct Relationship: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var authorized: Self { + .init(rawValue: "AUTHORIZED") + } - public var rawValue: String { - switch self { - case .authorized: return "AUTHORIZED" - case .other: return "OTHER" - case .owner: return "OWNER" - case .unknown(let rawValue): return rawValue - } + public static var other: Self { + .init(rawValue: "OTHER") + } + + public static var owner: Self { + .init(rawValue: "OWNER") + } + + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "AUTHORIZED": self = .authorized - case "OTHER": self = .other - case "OWNER": self = .owner - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } } } - public struct Relationships: Hashable, Codable { + public struct Relationships: Hashable, Codable, Sendable { public var appClip: AppClip public var headerImage: HeaderImage @@ -516,7 +653,7 @@ public struct AppClipAdvancedExperienceCreateRequest: Hashable, Codable { case localizations } - public struct AppClip: Hashable, Codable { + public struct AppClip: Hashable, Codable, Sendable { public var data: Data public init(data: Data) { @@ -527,7 +664,7 @@ public struct AppClipAdvancedExperienceCreateRequest: Hashable, Codable { case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -545,13 +682,13 @@ public struct AppClipAdvancedExperienceCreateRequest: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case appClips } } } - public struct HeaderImage: Hashable, Codable { + public struct HeaderImage: Hashable, Codable, Sendable { public var data: Data public init(data: Data) { @@ -562,7 +699,7 @@ public struct AppClipAdvancedExperienceCreateRequest: Hashable, Codable { case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -580,13 +717,13 @@ public struct AppClipAdvancedExperienceCreateRequest: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case appClipAdvancedExperienceImages } } } - public struct Localizations: Hashable, Codable { + public struct Localizations: Hashable, Codable, Sendable { public var data: [Data] public init(data: [Data]) { @@ -597,7 +734,7 @@ public struct AppClipAdvancedExperienceCreateRequest: Hashable, Codable { case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -615,7 +752,7 @@ public struct AppClipAdvancedExperienceCreateRequest: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case appClipAdvancedExperienceLocalizations } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/AppClipAdvancedExperienceImageCreateRequest.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/AppClipAdvancedExperienceImageCreateRequest.generated.swift index b66d32a3..7797a09e 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/AppClipAdvancedExperienceImageCreateRequest.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/AppClipAdvancedExperienceImageCreateRequest.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct AppClipAdvancedExperienceImageCreateRequest: Hashable, Codable { +public struct AppClipAdvancedExperienceImageCreateRequest: Hashable, Codable, Sendable { public var data: Data public init(data: Data) { @@ -14,7 +14,7 @@ public struct AppClipAdvancedExperienceImageCreateRequest: Hashable, Codable { case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var type: `Type` public var attributes: Attributes @@ -32,11 +32,11 @@ public struct AppClipAdvancedExperienceImageCreateRequest: Hashable, Codable { case attributes } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case appClipAdvancedExperienceImages } - public struct Attributes: Hashable, Codable { + public struct Attributes: Hashable, Codable, Sendable { public var fileName: String public var fileSize: Int diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/AppClipAdvancedExperienceImageUpdateRequest.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/AppClipAdvancedExperienceImageUpdateRequest.generated.swift index 0a02c6d0..b3d2a247 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/AppClipAdvancedExperienceImageUpdateRequest.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/AppClipAdvancedExperienceImageUpdateRequest.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct AppClipAdvancedExperienceImageUpdateRequest: Hashable, Codable { +public struct AppClipAdvancedExperienceImageUpdateRequest: Hashable, Codable, Sendable { public var data: Data public init(data: Data) { @@ -14,7 +14,7 @@ public struct AppClipAdvancedExperienceImageUpdateRequest: Hashable, Codable { case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -37,11 +37,11 @@ public struct AppClipAdvancedExperienceImageUpdateRequest: Hashable, Codable { case attributes } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case appClipAdvancedExperienceImages } - public struct Attributes: Hashable, Codable { + public struct Attributes: Hashable, Codable, Sendable { public var sourceFileChecksum: String? public var uploaded: Bool? diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/AppClipAdvancedExperienceUpdateRequest.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/AppClipAdvancedExperienceUpdateRequest.generated.swift index 8a26de43..a8a2c3f8 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/AppClipAdvancedExperienceUpdateRequest.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/AppClipAdvancedExperienceUpdateRequest.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct AppClipAdvancedExperienceUpdateRequest: Hashable, Codable { +public struct AppClipAdvancedExperienceUpdateRequest: Hashable, Codable, Sendable { public var data: Data public var included: [AppClipAdvancedExperienceLocalizationInlineCreate]? @@ -21,7 +21,7 @@ public struct AppClipAdvancedExperienceUpdateRequest: Hashable, Codable { case included } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -49,11 +49,11 @@ public struct AppClipAdvancedExperienceUpdateRequest: Hashable, Codable { case relationships } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case appClipAdvancedExperiences } - public struct Attributes: Hashable, Codable { + public struct Attributes: Hashable, Codable, Sendable { public var action: AppClipAction? public var businessCategory: BusinessCategory? @@ -91,104 +91,127 @@ public struct AppClipAdvancedExperienceUpdateRequest: Hashable, Codable { case removed } - public enum BusinessCategory: Hashable, Codable, RawRepresentable { - case automotive - case beauty - case bikes - case books - case casino - case education - case educationJapan - case entertainment - case evCharger - case financialCny - case financialEur - case financialGbp - case financialJpy - case financialUsd - case fitness - case foodAndDrink - case gas - case grocery - case healthAndMedical - case hotelAndTravel - case music - case parking - case petServices - case professionalServices - case shopping - case ticketing - case transit - case unknown(String) - - public var rawValue: String { - switch self { - case .automotive: return "AUTOMOTIVE" - case .beauty: return "BEAUTY" - case .bikes: return "BIKES" - case .books: return "BOOKS" - case .casino: return "CASINO" - case .education: return "EDUCATION" - case .educationJapan: return "EDUCATION_JAPAN" - case .entertainment: return "ENTERTAINMENT" - case .evCharger: return "EV_CHARGER" - case .financialCny: return "FINANCIAL_CNY" - case .financialEur: return "FINANCIAL_EUR" - case .financialGbp: return "FINANCIAL_GBP" - case .financialJpy: return "FINANCIAL_JPY" - case .financialUsd: return "FINANCIAL_USD" - case .fitness: return "FITNESS" - case .foodAndDrink: return "FOOD_AND_DRINK" - case .gas: return "GAS" - case .grocery: return "GROCERY" - case .healthAndMedical: return "HEALTH_AND_MEDICAL" - case .hotelAndTravel: return "HOTEL_AND_TRAVEL" - case .music: return "MUSIC" - case .parking: return "PARKING" - case .petServices: return "PET_SERVICES" - case .professionalServices: return "PROFESSIONAL_SERVICES" - case .shopping: return "SHOPPING" - case .ticketing: return "TICKETING" - case .transit: return "TRANSIT" - case .unknown(let rawValue): return rawValue - } + public struct BusinessCategory: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var automotive: Self { + .init(rawValue: "AUTOMOTIVE") + } + + public static var beauty: Self { + .init(rawValue: "BEAUTY") + } + + public static var bikes: Self { + .init(rawValue: "BIKES") + } + + public static var books: Self { + .init(rawValue: "BOOKS") + } + + public static var casino: Self { + .init(rawValue: "CASINO") + } + + public static var education: Self { + .init(rawValue: "EDUCATION") + } + + public static var educationJapan: Self { + .init(rawValue: "EDUCATION_JAPAN") + } + + public static var entertainment: Self { + .init(rawValue: "ENTERTAINMENT") + } + + public static var evCharger: Self { + .init(rawValue: "EV_CHARGER") + } + + public static var financialCny: Self { + .init(rawValue: "FINANCIAL_CNY") + } + + public static var financialEur: Self { + .init(rawValue: "FINANCIAL_EUR") + } + + public static var financialGbp: Self { + .init(rawValue: "FINANCIAL_GBP") + } + + public static var financialJpy: Self { + .init(rawValue: "FINANCIAL_JPY") + } + + public static var financialUsd: Self { + .init(rawValue: "FINANCIAL_USD") + } + + public static var fitness: Self { + .init(rawValue: "FITNESS") + } + + public static var foodAndDrink: Self { + .init(rawValue: "FOOD_AND_DRINK") + } + + public static var gas: Self { + .init(rawValue: "GAS") + } + + public static var grocery: Self { + .init(rawValue: "GROCERY") + } + + public static var healthAndMedical: Self { + .init(rawValue: "HEALTH_AND_MEDICAL") + } + + public static var hotelAndTravel: Self { + .init(rawValue: "HOTEL_AND_TRAVEL") + } + + public static var music: Self { + .init(rawValue: "MUSIC") } + public static var parking: Self { + .init(rawValue: "PARKING") + } + + public static var petServices: Self { + .init(rawValue: "PET_SERVICES") + } + + public static var professionalServices: Self { + .init(rawValue: "PROFESSIONAL_SERVICES") + } + + public static var shopping: Self { + .init(rawValue: "SHOPPING") + } + + public static var ticketing: Self { + .init(rawValue: "TICKETING") + } + + public static var transit: Self { + .init(rawValue: "TRANSIT") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "AUTOMOTIVE": self = .automotive - case "BEAUTY": self = .beauty - case "BIKES": self = .bikes - case "BOOKS": self = .books - case "CASINO": self = .casino - case "EDUCATION": self = .education - case "EDUCATION_JAPAN": self = .educationJapan - case "ENTERTAINMENT": self = .entertainment - case "EV_CHARGER": self = .evCharger - case "FINANCIAL_CNY": self = .financialCny - case "FINANCIAL_EUR": self = .financialEur - case "FINANCIAL_GBP": self = .financialGbp - case "FINANCIAL_JPY": self = .financialJpy - case "FINANCIAL_USD": self = .financialUsd - case "FITNESS": self = .fitness - case "FOOD_AND_DRINK": self = .foodAndDrink - case "GAS": self = .gas - case "GROCERY": self = .grocery - case "HEALTH_AND_MEDICAL": self = .healthAndMedical - case "HOTEL_AND_TRAVEL": self = .hotelAndTravel - case "MUSIC": self = .music - case "PARKING": self = .parking - case "PET_SERVICES": self = .petServices - case "PROFESSIONAL_SERVICES": self = .professionalServices - case "SHOPPING": self = .shopping - case "TICKETING": self = .ticketing - case "TRANSIT": self = .transit - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public struct Place: Hashable, Codable { + public struct Place: Hashable, Codable, Sendable { public var categories: [String]? public var displayPoint: DisplayPoint? @@ -241,7 +264,7 @@ public struct AppClipAdvancedExperienceUpdateRequest: Hashable, Codable { case relationship } - public struct DisplayPoint: Hashable, Codable { + public struct DisplayPoint: Hashable, Codable, Sendable { public var coordinates: Coordinates? public var source: Source? @@ -259,7 +282,7 @@ public struct AppClipAdvancedExperienceUpdateRequest: Hashable, Codable { case source } - public struct Coordinates: Hashable, Codable { + public struct Coordinates: Hashable, Codable, Sendable { public var latitude: Float? public var longitude: Float? @@ -278,30 +301,28 @@ public struct AppClipAdvancedExperienceUpdateRequest: Hashable, Codable { } } - public enum Source: Hashable, Codable, RawRepresentable { - case calculated - case manuallyPlaced - case unknown(String) + public struct Source: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var calculated: Self { + .init(rawValue: "CALCULATED") + } - public var rawValue: String { - switch self { - case .calculated: return "CALCULATED" - case .manuallyPlaced: return "MANUALLY_PLACED" - case .unknown(let rawValue): return rawValue - } + public static var manuallyPlaced: Self { + .init(rawValue: "MANUALLY_PLACED") } + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "CALCULATED": self = .calculated - case "MANUALLY_PLACED": self = .manuallyPlaced - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } } - public struct MainAddress: Hashable, Codable { + public struct MainAddress: Hashable, Codable, Sendable { public var fullAddress: String? public var structuredAddress: StructuredAddress? @@ -319,7 +340,7 @@ public struct AppClipAdvancedExperienceUpdateRequest: Hashable, Codable { case structuredAddress } - public struct StructuredAddress: Hashable, Codable { + public struct StructuredAddress: Hashable, Codable, Sendable { public var countryCode: String? public var floor: String? @@ -364,62 +385,179 @@ public struct AppClipAdvancedExperienceUpdateRequest: Hashable, Codable { } } - public enum MapAction: Hashable, Codable, RawRepresentable { - case buyTickets - case hotelBookRoom - case parkingReserveParking - case restaurantJoinWaitlist - case restaurantOrderDelivery - case restaurantOrderFood - case restaurantOrderTakeout - case restaurantReservation - case restaurantViewMenu - case scheduleAppointment - case theaterNowPlaying - case viewAvailability - case viewPricing - case unknown(String) - - public var rawValue: String { - switch self { - case .buyTickets: return "BUY_TICKETS" - case .hotelBookRoom: return "HOTEL_BOOK_ROOM" - case .parkingReserveParking: return "PARKING_RESERVE_PARKING" - case .restaurantJoinWaitlist: return "RESTAURANT_JOIN_WAITLIST" - case .restaurantOrderDelivery: return "RESTAURANT_ORDER_DELIVERY" - case .restaurantOrderFood: return "RESTAURANT_ORDER_FOOD" - case .restaurantOrderTakeout: return "RESTAURANT_ORDER_TAKEOUT" - case .restaurantReservation: return "RESTAURANT_RESERVATION" - case .restaurantViewMenu: return "RESTAURANT_VIEW_MENU" - case .scheduleAppointment: return "SCHEDULE_APPOINTMENT" - case .theaterNowPlaying: return "THEATER_NOW_PLAYING" - case .viewAvailability: return "VIEW_AVAILABILITY" - case .viewPricing: return "VIEW_PRICING" - case .unknown(let rawValue): return rawValue - } + public struct MapAction: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var airlineBookTravel: Self { + .init(rawValue: "AIRLINE_BOOK_TRAVEL") + } + + public static var airlineCheckIn: Self { + .init(rawValue: "AIRLINE_CHECK_IN") + } + + public static var airlineFlightStatus: Self { + .init(rawValue: "AIRLINE_FLIGHT_STATUS") + } + + public static var apply: Self { + .init(rawValue: "APPLY") + } + + public static var book: Self { + .init(rawValue: "BOOK") + } + + public static var bookActivities: Self { + .init(rawValue: "BOOK_ACTIVITIES") + } + + public static var bookRides: Self { + .init(rawValue: "BOOK_RIDES") + } + + public static var bookTeetimes: Self { + .init(rawValue: "BOOK_TEETIMES") } + public static var bookTours: Self { + .init(rawValue: "BOOK_TOURS") + } + + public static var buyTickets: Self { + .init(rawValue: "BUY_TICKETS") + } + + public static var careers: Self { + .init(rawValue: "CAREERS") + } + + public static var chargeEv: Self { + .init(rawValue: "CHARGE_EV") + } + + public static var coupons: Self { + .init(rawValue: "COUPONS") + } + + public static var donate: Self { + .init(rawValue: "DONATE") + } + + public static var events: Self { + .init(rawValue: "EVENTS") + } + + public static var eventsShows: Self { + .init(rawValue: "EVENTS_SHOWS") + } + + public static var eventsSports: Self { + .init(rawValue: "EVENTS_SPORTS") + } + + public static var giftCard: Self { + .init(rawValue: "GIFT_CARD") + } + + public static var hotelAmenities: Self { + .init(rawValue: "HOTEL_AMENITIES") + } + + public static var hotelBookRoom: Self { + .init(rawValue: "HOTEL_BOOK_ROOM") + } + + public static var join: Self { + .init(rawValue: "JOIN") + } + + public static var parkingAvailable: Self { + .init(rawValue: "PARKING_AVAILABLE") + } + + public static var parkingReserveParking: Self { + .init(rawValue: "PARKING_RESERVE_PARKING") + } + + public static var restaurantJoinWaitlist: Self { + .init(rawValue: "RESTAURANT_JOIN_WAITLIST") + } + + public static var restaurantOrderDelivery: Self { + .init(rawValue: "RESTAURANT_ORDER_DELIVERY") + } + + public static var restaurantOrderFood: Self { + .init(rawValue: "RESTAURANT_ORDER_FOOD") + } + + public static var restaurantOrderTakeout: Self { + .init(rawValue: "RESTAURANT_ORDER_TAKEOUT") + } + + public static var restaurantPickup: Self { + .init(rawValue: "RESTAURANT_PICKUP") + } + + public static var restaurantReservation: Self { + .init(rawValue: "RESTAURANT_RESERVATION") + } + + public static var restaurantViewMenu: Self { + .init(rawValue: "RESTAURANT_VIEW_MENU") + } + + public static var retailServiceQuote: Self { + .init(rawValue: "RETAIL_SERVICE_QUOTE") + } + + public static var retailStoreDelivery: Self { + .init(rawValue: "RETAIL_STORE_DELIVERY") + } + + public static var retailStorePickup: Self { + .init(rawValue: "RETAIL_STORE_PICKUP") + } + + public static var retailStoreShop: Self { + .init(rawValue: "RETAIL_STORE_SHOP") + } + + public static var scheduleAppointment: Self { + .init(rawValue: "SCHEDULE_APPOINTMENT") + } + + public static var services: Self { + .init(rawValue: "SERVICES") + } + + public static var support: Self { + .init(rawValue: "SUPPORT") + } + + public static var theaterNowPlaying: Self { + .init(rawValue: "THEATER_NOW_PLAYING") + } + + public static var viewAvailability: Self { + .init(rawValue: "VIEW_AVAILABILITY") + } + + public static var viewPricing: Self { + .init(rawValue: "VIEW_PRICING") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "BUY_TICKETS": self = .buyTickets - case "HOTEL_BOOK_ROOM": self = .hotelBookRoom - case "PARKING_RESERVE_PARKING": self = .parkingReserveParking - case "RESTAURANT_JOIN_WAITLIST": self = .restaurantJoinWaitlist - case "RESTAURANT_ORDER_DELIVERY": self = .restaurantOrderDelivery - case "RESTAURANT_ORDER_FOOD": self = .restaurantOrderFood - case "RESTAURANT_ORDER_TAKEOUT": self = .restaurantOrderTakeout - case "RESTAURANT_RESERVATION": self = .restaurantReservation - case "RESTAURANT_VIEW_MENU": self = .restaurantViewMenu - case "SCHEDULE_APPOINTMENT": self = .scheduleAppointment - case "THEATER_NOW_PLAYING": self = .theaterNowPlaying - case "VIEW_AVAILABILITY": self = .viewAvailability - case "VIEW_PRICING": self = .viewPricing - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public struct PhoneNumber: Hashable, Codable { + public struct PhoneNumber: Hashable, Codable, Sendable { public var type: `Type`? public var intent: String? @@ -442,63 +580,62 @@ public struct AppClipAdvancedExperienceUpdateRequest: Hashable, Codable { case number } - public enum `Type`: Hashable, Codable, RawRepresentable { - case fax - case landline - case mobile - case tollfree - case unknown(String) - - public var rawValue: String { - switch self { - case .fax: return "FAX" - case .landline: return "LANDLINE" - case .mobile: return "MOBILE" - case .tollfree: return "TOLLFREE" - case .unknown(let rawValue): return rawValue - } + public struct `Type`: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var fax: Self { + .init(rawValue: "FAX") + } + + public static var landline: Self { + .init(rawValue: "LANDLINE") + } + + public static var mobile: Self { + .init(rawValue: "MOBILE") + } + + public static var tollfree: Self { + .init(rawValue: "TOLLFREE") + } + + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "FAX": self = .fax - case "LANDLINE": self = .landline - case "MOBILE": self = .mobile - case "TOLLFREE": self = .tollfree - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } } - public enum Relationship: Hashable, Codable, RawRepresentable { - case authorized - case other - case owner - case unknown(String) + public struct Relationship: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var authorized: Self { + .init(rawValue: "AUTHORIZED") + } - public var rawValue: String { - switch self { - case .authorized: return "AUTHORIZED" - case .other: return "OTHER" - case .owner: return "OWNER" - case .unknown(let rawValue): return rawValue - } + public static var other: Self { + .init(rawValue: "OTHER") + } + + public static var owner: Self { + .init(rawValue: "OWNER") + } + + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "AUTHORIZED": self = .authorized - case "OTHER": self = .other - case "OWNER": self = .owner - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } } } - public struct Relationships: Hashable, Codable { + public struct Relationships: Hashable, Codable, Sendable { public var appClip: AppClip? public var headerImage: HeaderImage? @@ -521,7 +658,7 @@ public struct AppClipAdvancedExperienceUpdateRequest: Hashable, Codable { case localizations } - public struct AppClip: Hashable, Codable { + public struct AppClip: Hashable, Codable, Sendable { public var data: Data? public init(data: Data? = nil) { @@ -532,7 +669,7 @@ public struct AppClipAdvancedExperienceUpdateRequest: Hashable, Codable { case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -550,13 +687,13 @@ public struct AppClipAdvancedExperienceUpdateRequest: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case appClips } } } - public struct HeaderImage: Hashable, Codable { + public struct HeaderImage: Hashable, Codable, Sendable { public var data: Data? public init(data: Data? = nil) { @@ -567,7 +704,7 @@ public struct AppClipAdvancedExperienceUpdateRequest: Hashable, Codable { case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -585,13 +722,13 @@ public struct AppClipAdvancedExperienceUpdateRequest: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case appClipAdvancedExperienceImages } } } - public struct Localizations: Hashable, Codable { + public struct Localizations: Hashable, Codable, Sendable { public var data: [Data]? public init(data: [Data]? = nil) { @@ -602,7 +739,7 @@ public struct AppClipAdvancedExperienceUpdateRequest: Hashable, Codable { case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -620,7 +757,7 @@ public struct AppClipAdvancedExperienceUpdateRequest: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case appClipAdvancedExperienceLocalizations } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/AppClipAppStoreReviewDetailCreateRequest.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/AppClipAppStoreReviewDetailCreateRequest.generated.swift index 72badeb9..f43c957d 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/AppClipAppStoreReviewDetailCreateRequest.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/AppClipAppStoreReviewDetailCreateRequest.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct AppClipAppStoreReviewDetailCreateRequest: Hashable, Codable { +public struct AppClipAppStoreReviewDetailCreateRequest: Hashable, Codable, Sendable { public var data: Data public init(data: Data) { @@ -14,7 +14,7 @@ public struct AppClipAppStoreReviewDetailCreateRequest: Hashable, Codable { case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var type: `Type` public var attributes: Attributes? @@ -37,11 +37,11 @@ public struct AppClipAppStoreReviewDetailCreateRequest: Hashable, Codable { case relationships } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case appClipAppStoreReviewDetails } - public struct Attributes: Hashable, Codable { + public struct Attributes: Hashable, Codable, Sendable { public var invocationUrls: [URL]? public init(invocationUrls: [URL]? = nil) { @@ -53,7 +53,7 @@ public struct AppClipAppStoreReviewDetailCreateRequest: Hashable, Codable { } } - public struct Relationships: Hashable, Codable { + public struct Relationships: Hashable, Codable, Sendable { public var appClipDefaultExperience: AppClipDefaultExperience public init(appClipDefaultExperience: AppClipDefaultExperience) { @@ -64,7 +64,7 @@ public struct AppClipAppStoreReviewDetailCreateRequest: Hashable, Codable { case appClipDefaultExperience } - public struct AppClipDefaultExperience: Hashable, Codable { + public struct AppClipDefaultExperience: Hashable, Codable, Sendable { public var data: Data public init(data: Data) { @@ -75,7 +75,7 @@ public struct AppClipAppStoreReviewDetailCreateRequest: Hashable, Codable { case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -93,7 +93,7 @@ public struct AppClipAppStoreReviewDetailCreateRequest: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case appClipDefaultExperiences } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/AppClipAppStoreReviewDetailUpdateRequest.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/AppClipAppStoreReviewDetailUpdateRequest.generated.swift index e64d7ceb..0d70eafe 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/AppClipAppStoreReviewDetailUpdateRequest.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/AppClipAppStoreReviewDetailUpdateRequest.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct AppClipAppStoreReviewDetailUpdateRequest: Hashable, Codable { +public struct AppClipAppStoreReviewDetailUpdateRequest: Hashable, Codable, Sendable { public var data: Data public init(data: Data) { @@ -14,7 +14,7 @@ public struct AppClipAppStoreReviewDetailUpdateRequest: Hashable, Codable { case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -37,11 +37,11 @@ public struct AppClipAppStoreReviewDetailUpdateRequest: Hashable, Codable { case attributes } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case appClipAppStoreReviewDetails } - public struct Attributes: Hashable, Codable { + public struct Attributes: Hashable, Codable, Sendable { public var invocationUrls: [URL]? public init(invocationUrls: [URL]? = nil) { diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/AppClipDefaultExperienceCreateRequest.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/AppClipDefaultExperienceCreateRequest.generated.swift index 758c23bc..b36fbb4e 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/AppClipDefaultExperienceCreateRequest.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/AppClipDefaultExperienceCreateRequest.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct AppClipDefaultExperienceCreateRequest: Hashable, Codable { +public struct AppClipDefaultExperienceCreateRequest: Hashable, Codable, Sendable { public var data: Data public init(data: Data) { @@ -14,7 +14,7 @@ public struct AppClipDefaultExperienceCreateRequest: Hashable, Codable { case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var type: `Type` public var attributes: Attributes? @@ -37,11 +37,11 @@ public struct AppClipDefaultExperienceCreateRequest: Hashable, Codable { case relationships } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case appClipDefaultExperiences } - public struct Attributes: Hashable, Codable { + public struct Attributes: Hashable, Codable, Sendable { public var action: AppClipAction? public init(action: AppClipAction? = nil) { @@ -53,7 +53,7 @@ public struct AppClipDefaultExperienceCreateRequest: Hashable, Codable { } } - public struct Relationships: Hashable, Codable { + public struct Relationships: Hashable, Codable, Sendable { public var appClip: AppClip public var appClipDefaultExperienceTemplate: AppClipDefaultExperienceTemplate? @@ -76,7 +76,7 @@ public struct AppClipDefaultExperienceCreateRequest: Hashable, Codable { case releaseWithAppStoreVersion } - public struct AppClip: Hashable, Codable { + public struct AppClip: Hashable, Codable, Sendable { public var data: Data public init(data: Data) { @@ -87,7 +87,7 @@ public struct AppClipDefaultExperienceCreateRequest: Hashable, Codable { case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -105,13 +105,13 @@ public struct AppClipDefaultExperienceCreateRequest: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case appClips } } } - public struct AppClipDefaultExperienceTemplate: Hashable, Codable { + public struct AppClipDefaultExperienceTemplate: Hashable, Codable, Sendable { public var data: Data? public init(data: Data? = nil) { @@ -122,7 +122,7 @@ public struct AppClipDefaultExperienceCreateRequest: Hashable, Codable { case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -140,13 +140,13 @@ public struct AppClipDefaultExperienceCreateRequest: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case appClipDefaultExperiences } } } - public struct ReleaseWithAppStoreVersion: Hashable, Codable { + public struct ReleaseWithAppStoreVersion: Hashable, Codable, Sendable { public var data: Data? public init(data: Data? = nil) { @@ -157,7 +157,7 @@ public struct AppClipDefaultExperienceCreateRequest: Hashable, Codable { case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -175,7 +175,7 @@ public struct AppClipDefaultExperienceCreateRequest: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case appStoreVersions } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/AppClipDefaultExperienceLocalizationCreateRequest.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/AppClipDefaultExperienceLocalizationCreateRequest.generated.swift index 42f8de22..d53832a9 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/AppClipDefaultExperienceLocalizationCreateRequest.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/AppClipDefaultExperienceLocalizationCreateRequest.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct AppClipDefaultExperienceLocalizationCreateRequest: Hashable, Codable { +public struct AppClipDefaultExperienceLocalizationCreateRequest: Hashable, Codable, Sendable { public var data: Data public init(data: Data) { @@ -14,7 +14,7 @@ public struct AppClipDefaultExperienceLocalizationCreateRequest: Hashable, Codab case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var type: `Type` public var attributes: Attributes @@ -37,11 +37,11 @@ public struct AppClipDefaultExperienceLocalizationCreateRequest: Hashable, Codab case relationships } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case appClipDefaultExperienceLocalizations } - public struct Attributes: Hashable, Codable { + public struct Attributes: Hashable, Codable, Sendable { public var locale: String public var subtitle: String? @@ -60,7 +60,7 @@ public struct AppClipDefaultExperienceLocalizationCreateRequest: Hashable, Codab } } - public struct Relationships: Hashable, Codable { + public struct Relationships: Hashable, Codable, Sendable { public var appClipDefaultExperience: AppClipDefaultExperience public init(appClipDefaultExperience: AppClipDefaultExperience) { @@ -71,7 +71,7 @@ public struct AppClipDefaultExperienceLocalizationCreateRequest: Hashable, Codab case appClipDefaultExperience } - public struct AppClipDefaultExperience: Hashable, Codable { + public struct AppClipDefaultExperience: Hashable, Codable, Sendable { public var data: Data public init(data: Data) { @@ -82,7 +82,7 @@ public struct AppClipDefaultExperienceLocalizationCreateRequest: Hashable, Codab case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -100,7 +100,7 @@ public struct AppClipDefaultExperienceLocalizationCreateRequest: Hashable, Codab case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case appClipDefaultExperiences } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/AppClipDefaultExperienceLocalizationUpdateRequest.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/AppClipDefaultExperienceLocalizationUpdateRequest.generated.swift index 01df70ca..bb9377c2 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/AppClipDefaultExperienceLocalizationUpdateRequest.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/AppClipDefaultExperienceLocalizationUpdateRequest.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct AppClipDefaultExperienceLocalizationUpdateRequest: Hashable, Codable { +public struct AppClipDefaultExperienceLocalizationUpdateRequest: Hashable, Codable, Sendable { public var data: Data public init(data: Data) { @@ -14,7 +14,7 @@ public struct AppClipDefaultExperienceLocalizationUpdateRequest: Hashable, Codab case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -37,11 +37,11 @@ public struct AppClipDefaultExperienceLocalizationUpdateRequest: Hashable, Codab case attributes } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case appClipDefaultExperienceLocalizations } - public struct Attributes: Hashable, Codable { + public struct Attributes: Hashable, Codable, Sendable { public var subtitle: String? public init(subtitle: String? = nil) { diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/AppClipDefaultExperienceReleaseWithAppStoreVersionLinkageRequest.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/AppClipDefaultExperienceReleaseWithAppStoreVersionLinkageRequest.generated.swift index a3b71ab5..bca8ff84 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/AppClipDefaultExperienceReleaseWithAppStoreVersionLinkageRequest.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/AppClipDefaultExperienceReleaseWithAppStoreVersionLinkageRequest.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct AppClipDefaultExperienceReleaseWithAppStoreVersionLinkageRequest: Hashable, Codable { +public struct AppClipDefaultExperienceReleaseWithAppStoreVersionLinkageRequest: Hashable, Codable, Sendable { public var data: Data public init(data: Data) { @@ -14,7 +14,7 @@ public struct AppClipDefaultExperienceReleaseWithAppStoreVersionLinkageRequest: case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -32,7 +32,7 @@ public struct AppClipDefaultExperienceReleaseWithAppStoreVersionLinkageRequest: case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case appStoreVersions } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/AppClipDefaultExperienceUpdateRequest.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/AppClipDefaultExperienceUpdateRequest.generated.swift index 420f7599..791260ad 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/AppClipDefaultExperienceUpdateRequest.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/AppClipDefaultExperienceUpdateRequest.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct AppClipDefaultExperienceUpdateRequest: Hashable, Codable { +public struct AppClipDefaultExperienceUpdateRequest: Hashable, Codable, Sendable { public var data: Data public init(data: Data) { @@ -14,7 +14,7 @@ public struct AppClipDefaultExperienceUpdateRequest: Hashable, Codable { case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -42,11 +42,11 @@ public struct AppClipDefaultExperienceUpdateRequest: Hashable, Codable { case relationships } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case appClipDefaultExperiences } - public struct Attributes: Hashable, Codable { + public struct Attributes: Hashable, Codable, Sendable { public var action: AppClipAction? public init(action: AppClipAction? = nil) { @@ -58,7 +58,7 @@ public struct AppClipDefaultExperienceUpdateRequest: Hashable, Codable { } } - public struct Relationships: Hashable, Codable { + public struct Relationships: Hashable, Codable, Sendable { public var releaseWithAppStoreVersion: ReleaseWithAppStoreVersion? public init(releaseWithAppStoreVersion: ReleaseWithAppStoreVersion? = nil) { @@ -69,7 +69,7 @@ public struct AppClipDefaultExperienceUpdateRequest: Hashable, Codable { case releaseWithAppStoreVersion } - public struct ReleaseWithAppStoreVersion: Hashable, Codable { + public struct ReleaseWithAppStoreVersion: Hashable, Codable, Sendable { public var data: Data? public init(data: Data? = nil) { @@ -80,7 +80,7 @@ public struct AppClipDefaultExperienceUpdateRequest: Hashable, Codable { case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -98,7 +98,7 @@ public struct AppClipDefaultExperienceUpdateRequest: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case appStoreVersions } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/AppClipHeaderImageCreateRequest.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/AppClipHeaderImageCreateRequest.generated.swift index 872b2e11..62f00101 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/AppClipHeaderImageCreateRequest.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/AppClipHeaderImageCreateRequest.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct AppClipHeaderImageCreateRequest: Hashable, Codable { +public struct AppClipHeaderImageCreateRequest: Hashable, Codable, Sendable { public var data: Data public init(data: Data) { @@ -14,7 +14,7 @@ public struct AppClipHeaderImageCreateRequest: Hashable, Codable { case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var type: `Type` public var attributes: Attributes @@ -37,11 +37,11 @@ public struct AppClipHeaderImageCreateRequest: Hashable, Codable { case relationships } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case appClipHeaderImages } - public struct Attributes: Hashable, Codable { + public struct Attributes: Hashable, Codable, Sendable { public var fileName: String public var fileSize: Int @@ -60,7 +60,7 @@ public struct AppClipHeaderImageCreateRequest: Hashable, Codable { } } - public struct Relationships: Hashable, Codable { + public struct Relationships: Hashable, Codable, Sendable { public var appClipDefaultExperienceLocalization: AppClipDefaultExperienceLocalization public init(appClipDefaultExperienceLocalization: AppClipDefaultExperienceLocalization) { @@ -71,7 +71,7 @@ public struct AppClipHeaderImageCreateRequest: Hashable, Codable { case appClipDefaultExperienceLocalization } - public struct AppClipDefaultExperienceLocalization: Hashable, Codable { + public struct AppClipDefaultExperienceLocalization: Hashable, Codable, Sendable { public var data: Data public init(data: Data) { @@ -82,7 +82,7 @@ public struct AppClipHeaderImageCreateRequest: Hashable, Codable { case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -100,7 +100,7 @@ public struct AppClipHeaderImageCreateRequest: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case appClipDefaultExperienceLocalizations } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/AppClipHeaderImageUpdateRequest.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/AppClipHeaderImageUpdateRequest.generated.swift index aa4b806a..95db4c28 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/AppClipHeaderImageUpdateRequest.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/AppClipHeaderImageUpdateRequest.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct AppClipHeaderImageUpdateRequest: Hashable, Codable { +public struct AppClipHeaderImageUpdateRequest: Hashable, Codable, Sendable { public var data: Data public init(data: Data) { @@ -14,7 +14,7 @@ public struct AppClipHeaderImageUpdateRequest: Hashable, Codable { case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -37,11 +37,11 @@ public struct AppClipHeaderImageUpdateRequest: Hashable, Codable { case attributes } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case appClipHeaderImages } - public struct Attributes: Hashable, Codable { + public struct Attributes: Hashable, Codable, Sendable { public var sourceFileChecksum: String? public var uploaded: Bool? diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/AppCustomProductPageCreateRequest.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/AppCustomProductPageCreateRequest.generated.swift index 7d196311..ecad5b6c 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/AppCustomProductPageCreateRequest.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/AppCustomProductPageCreateRequest.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct AppCustomProductPageCreateRequest: Hashable, Codable { +public struct AppCustomProductPageCreateRequest: Hashable, Codable, Sendable { public var data: Data public var included: [Included]? @@ -21,7 +21,7 @@ public struct AppCustomProductPageCreateRequest: Hashable, Codable { case included } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var type: `Type` public var attributes: Attributes @@ -44,11 +44,11 @@ public struct AppCustomProductPageCreateRequest: Hashable, Codable { case relationships } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case appCustomProductPages } - public struct Attributes: Hashable, Codable { + public struct Attributes: Hashable, Codable, Sendable { public var name: String public init(name: String) { @@ -60,7 +60,7 @@ public struct AppCustomProductPageCreateRequest: Hashable, Codable { } } - public struct Relationships: Hashable, Codable { + public struct Relationships: Hashable, Codable, Sendable { public var app: App public var appCustomProductPageVersions: AppCustomProductPageVersions? @@ -88,7 +88,7 @@ public struct AppCustomProductPageCreateRequest: Hashable, Codable { case customProductPageTemplate } - public struct App: Hashable, Codable { + public struct App: Hashable, Codable, Sendable { public var data: Data public init(data: Data) { @@ -99,7 +99,7 @@ public struct AppCustomProductPageCreateRequest: Hashable, Codable { case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -117,13 +117,13 @@ public struct AppCustomProductPageCreateRequest: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case apps } } } - public struct AppCustomProductPageVersions: Hashable, Codable { + public struct AppCustomProductPageVersions: Hashable, Codable, Sendable { public var data: [Data]? public init(data: [Data]? = nil) { @@ -134,7 +134,7 @@ public struct AppCustomProductPageCreateRequest: Hashable, Codable { case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -152,13 +152,13 @@ public struct AppCustomProductPageCreateRequest: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case appCustomProductPageVersions } } } - public struct AppStoreVersionTemplate: Hashable, Codable { + public struct AppStoreVersionTemplate: Hashable, Codable, Sendable { public var data: Data? public init(data: Data? = nil) { @@ -169,7 +169,7 @@ public struct AppCustomProductPageCreateRequest: Hashable, Codable { case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -187,13 +187,13 @@ public struct AppCustomProductPageCreateRequest: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case appStoreVersions } } } - public struct CustomProductPageTemplate: Hashable, Codable { + public struct CustomProductPageTemplate: Hashable, Codable, Sendable { public var data: Data? public init(data: Data? = nil) { @@ -204,7 +204,7 @@ public struct AppCustomProductPageCreateRequest: Hashable, Codable { case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -222,7 +222,7 @@ public struct AppCustomProductPageCreateRequest: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case appCustomProductPages } } @@ -230,7 +230,7 @@ public struct AppCustomProductPageCreateRequest: Hashable, Codable { } } - public enum Included: Hashable, Codable { + public enum Included: Hashable, Codable, Sendable { case appCustomProductPageLocalizationInlineCreate(AppCustomProductPageLocalizationInlineCreate) case appCustomProductPageVersionInlineCreate(AppCustomProductPageVersionInlineCreate) diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/AppCustomProductPageLocalizationCreateRequest.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/AppCustomProductPageLocalizationCreateRequest.generated.swift index 138e2f0e..8a0ddb24 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/AppCustomProductPageLocalizationCreateRequest.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/AppCustomProductPageLocalizationCreateRequest.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct AppCustomProductPageLocalizationCreateRequest: Hashable, Codable { +public struct AppCustomProductPageLocalizationCreateRequest: Hashable, Codable, Sendable { public var data: Data public init(data: Data) { @@ -14,7 +14,7 @@ public struct AppCustomProductPageLocalizationCreateRequest: Hashable, Codable { case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var type: `Type` public var attributes: Attributes @@ -37,11 +37,11 @@ public struct AppCustomProductPageLocalizationCreateRequest: Hashable, Codable { case relationships } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case appCustomProductPageLocalizations } - public struct Attributes: Hashable, Codable { + public struct Attributes: Hashable, Codable, Sendable { public var locale: String public var promotionalText: String? @@ -60,7 +60,7 @@ public struct AppCustomProductPageLocalizationCreateRequest: Hashable, Codable { } } - public struct Relationships: Hashable, Codable { + public struct Relationships: Hashable, Codable, Sendable { public var appCustomProductPageVersion: AppCustomProductPageVersion public init(appCustomProductPageVersion: AppCustomProductPageVersion) { @@ -71,7 +71,7 @@ public struct AppCustomProductPageLocalizationCreateRequest: Hashable, Codable { case appCustomProductPageVersion } - public struct AppCustomProductPageVersion: Hashable, Codable { + public struct AppCustomProductPageVersion: Hashable, Codable, Sendable { public var data: Data public init(data: Data) { @@ -82,7 +82,7 @@ public struct AppCustomProductPageLocalizationCreateRequest: Hashable, Codable { case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -100,7 +100,7 @@ public struct AppCustomProductPageLocalizationCreateRequest: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case appCustomProductPageVersions } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/AppCustomProductPageLocalizationUpdateRequest.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/AppCustomProductPageLocalizationUpdateRequest.generated.swift index 8bfa30b9..47759245 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/AppCustomProductPageLocalizationUpdateRequest.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/AppCustomProductPageLocalizationUpdateRequest.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct AppCustomProductPageLocalizationUpdateRequest: Hashable, Codable { +public struct AppCustomProductPageLocalizationUpdateRequest: Hashable, Codable, Sendable { public var data: Data public init(data: Data) { @@ -14,7 +14,7 @@ public struct AppCustomProductPageLocalizationUpdateRequest: Hashable, Codable { case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -37,11 +37,11 @@ public struct AppCustomProductPageLocalizationUpdateRequest: Hashable, Codable { case attributes } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case appCustomProductPageLocalizations } - public struct Attributes: Hashable, Codable { + public struct Attributes: Hashable, Codable, Sendable { public var promotionalText: String? public init(promotionalText: String? = nil) { diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/AppCustomProductPageUpdateRequest.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/AppCustomProductPageUpdateRequest.generated.swift index 33c812e4..ba96a075 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/AppCustomProductPageUpdateRequest.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/AppCustomProductPageUpdateRequest.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct AppCustomProductPageUpdateRequest: Hashable, Codable { +public struct AppCustomProductPageUpdateRequest: Hashable, Codable, Sendable { public var data: Data public init(data: Data) { @@ -14,7 +14,7 @@ public struct AppCustomProductPageUpdateRequest: Hashable, Codable { case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -37,11 +37,11 @@ public struct AppCustomProductPageUpdateRequest: Hashable, Codable { case attributes } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case appCustomProductPages } - public struct Attributes: Hashable, Codable { + public struct Attributes: Hashable, Codable, Sendable { public var name: String? public var visible: Bool? diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/AppCustomProductPageVersionCreateRequest.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/AppCustomProductPageVersionCreateRequest.generated.swift index 52afc846..a4fa6a09 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/AppCustomProductPageVersionCreateRequest.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/AppCustomProductPageVersionCreateRequest.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct AppCustomProductPageVersionCreateRequest: Hashable, Codable { +public struct AppCustomProductPageVersionCreateRequest: Hashable, Codable, Sendable { public var data: Data public init(data: Data) { @@ -14,29 +14,46 @@ public struct AppCustomProductPageVersionCreateRequest: Hashable, Codable { case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var type: `Type` + public var attributes: Attributes? + public var relationships: Relationships public init( type: `Type`, + attributes: Attributes? = nil, relationships: Relationships ) { self.type = type + self.attributes = attributes self.relationships = relationships } private enum CodingKeys: String, CodingKey { case type + case attributes case relationships } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case appCustomProductPageVersions } - public struct Relationships: Hashable, Codable { + public struct Attributes: Hashable, Codable, Sendable { + public var deepLink: URL? + + public init(deepLink: URL? = nil) { + self.deepLink = deepLink + } + + private enum CodingKeys: String, CodingKey { + case deepLink + } + } + + public struct Relationships: Hashable, Codable, Sendable { public var appCustomProductPage: AppCustomProductPage public var appCustomProductPageLocalizations: AppCustomProductPageLocalizations? @@ -54,7 +71,7 @@ public struct AppCustomProductPageVersionCreateRequest: Hashable, Codable { case appCustomProductPageLocalizations } - public struct AppCustomProductPage: Hashable, Codable { + public struct AppCustomProductPage: Hashable, Codable, Sendable { public var data: Data public init(data: Data) { @@ -65,7 +82,7 @@ public struct AppCustomProductPageVersionCreateRequest: Hashable, Codable { case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -83,13 +100,13 @@ public struct AppCustomProductPageVersionCreateRequest: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case appCustomProductPages } } } - public struct AppCustomProductPageLocalizations: Hashable, Codable { + public struct AppCustomProductPageLocalizations: Hashable, Codable, Sendable { public var data: [Data]? public init(data: [Data]? = nil) { @@ -100,7 +117,7 @@ public struct AppCustomProductPageVersionCreateRequest: Hashable, Codable { case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -118,7 +135,7 @@ public struct AppCustomProductPageVersionCreateRequest: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case appCustomProductPageLocalizations } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/AppCustomProductPageVersionUpdateRequest.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/AppCustomProductPageVersionUpdateRequest.generated.swift new file mode 100644 index 00000000..8c4bd831 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/AppCustomProductPageVersionUpdateRequest.generated.swift @@ -0,0 +1,58 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct AppCustomProductPageVersionUpdateRequest: Hashable, Codable, Sendable { + public var data: Data + + public init(data: Data) { + self.data = data + } + + private enum CodingKeys: String, CodingKey { + case data + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public var attributes: Attributes? + + public init( + id: String, + type: `Type`, + attributes: Attributes? = nil + ) { + self.id = id + self.type = type + self.attributes = attributes + } + + private enum CodingKeys: String, CodingKey { + case id + case type + case attributes + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case appCustomProductPageVersions + } + + public struct Attributes: Hashable, Codable, Sendable { + public var deepLink: URL? + + public init(deepLink: URL? = nil) { + self.deepLink = deepLink + } + + private enum CodingKeys: String, CodingKey { + case deepLink + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/AppEncryptionDeclarationBuildsLinkagesRequest.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/AppEncryptionDeclarationBuildsLinkagesRequest.generated.swift index 65a50c82..1ac0d229 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/AppEncryptionDeclarationBuildsLinkagesRequest.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/AppEncryptionDeclarationBuildsLinkagesRequest.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct AppEncryptionDeclarationBuildsLinkagesRequest: Hashable, Codable { +public struct AppEncryptionDeclarationBuildsLinkagesRequest: Hashable, Codable, Sendable { public var data: [Data] public init(data: [Data]) { @@ -14,7 +14,7 @@ public struct AppEncryptionDeclarationBuildsLinkagesRequest: Hashable, Codable { case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -32,7 +32,7 @@ public struct AppEncryptionDeclarationBuildsLinkagesRequest: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case builds } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/AppEncryptionDeclarationCreateRequest.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/AppEncryptionDeclarationCreateRequest.generated.swift new file mode 100644 index 00000000..9ffe3549 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/AppEncryptionDeclarationCreateRequest.generated.swift @@ -0,0 +1,123 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct AppEncryptionDeclarationCreateRequest: Hashable, Codable, Sendable { + public var data: Data + + public init(data: Data) { + self.data = data + } + + private enum CodingKeys: String, CodingKey { + case data + } + + public struct Data: Hashable, Codable, Sendable { + public var type: `Type` + + public var attributes: Attributes + + public var relationships: Relationships + + public init( + type: `Type`, + attributes: Attributes, + relationships: Relationships + ) { + self.type = type + self.attributes = attributes + self.relationships = relationships + } + + private enum CodingKeys: String, CodingKey { + case type + case attributes + case relationships + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case appEncryptionDeclarations + } + + public struct Attributes: Hashable, Codable, Sendable { + public var appDescription: String + + public var availableOnFrenchStore: Bool + + public var containsProprietaryCryptography: Bool + + public var containsThirdPartyCryptography: Bool + + public init( + appDescription: String, + availableOnFrenchStore: Bool, + containsProprietaryCryptography: Bool, + containsThirdPartyCryptography: Bool + ) { + self.appDescription = appDescription + self.availableOnFrenchStore = availableOnFrenchStore + self.containsProprietaryCryptography = containsProprietaryCryptography + self.containsThirdPartyCryptography = containsThirdPartyCryptography + } + + private enum CodingKeys: String, CodingKey { + case appDescription + case availableOnFrenchStore + case containsProprietaryCryptography + case containsThirdPartyCryptography + } + } + + public struct Relationships: Hashable, Codable, Sendable { + @available(*, deprecated) + public var app: App + + public init(app: App) { + self.app = app + } + + private enum CodingKeys: String, CodingKey { + case app + } + + public struct App: Hashable, Codable, Sendable { + public var data: Data + + public init(data: Data) { + self.data = data + } + + private enum CodingKeys: String, CodingKey { + case data + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case apps + } + } + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/AppEncryptionDeclarationDocumentCreateRequest.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/AppEncryptionDeclarationDocumentCreateRequest.generated.swift index e469fda5..8fd5084c 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/AppEncryptionDeclarationDocumentCreateRequest.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/AppEncryptionDeclarationDocumentCreateRequest.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct AppEncryptionDeclarationDocumentCreateRequest: Hashable, Codable { +public struct AppEncryptionDeclarationDocumentCreateRequest: Hashable, Codable, Sendable { public var data: Data public init(data: Data) { @@ -14,7 +14,7 @@ public struct AppEncryptionDeclarationDocumentCreateRequest: Hashable, Codable { case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var type: `Type` public var attributes: Attributes @@ -37,11 +37,11 @@ public struct AppEncryptionDeclarationDocumentCreateRequest: Hashable, Codable { case relationships } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case appEncryptionDeclarationDocuments } - public struct Attributes: Hashable, Codable { + public struct Attributes: Hashable, Codable, Sendable { public var fileName: String public var fileSize: Int @@ -60,7 +60,7 @@ public struct AppEncryptionDeclarationDocumentCreateRequest: Hashable, Codable { } } - public struct Relationships: Hashable, Codable { + public struct Relationships: Hashable, Codable, Sendable { public var appEncryptionDeclaration: AppEncryptionDeclaration public init(appEncryptionDeclaration: AppEncryptionDeclaration) { @@ -71,7 +71,7 @@ public struct AppEncryptionDeclarationDocumentCreateRequest: Hashable, Codable { case appEncryptionDeclaration } - public struct AppEncryptionDeclaration: Hashable, Codable { + public struct AppEncryptionDeclaration: Hashable, Codable, Sendable { public var data: Data public init(data: Data) { @@ -82,7 +82,7 @@ public struct AppEncryptionDeclarationDocumentCreateRequest: Hashable, Codable { case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -100,7 +100,7 @@ public struct AppEncryptionDeclarationDocumentCreateRequest: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case appEncryptionDeclarations } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/AppEncryptionDeclarationDocumentUpdateRequest.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/AppEncryptionDeclarationDocumentUpdateRequest.generated.swift index daf4da8c..e0264c39 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/AppEncryptionDeclarationDocumentUpdateRequest.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/AppEncryptionDeclarationDocumentUpdateRequest.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct AppEncryptionDeclarationDocumentUpdateRequest: Hashable, Codable { +public struct AppEncryptionDeclarationDocumentUpdateRequest: Hashable, Codable, Sendable { public var data: Data public init(data: Data) { @@ -14,7 +14,7 @@ public struct AppEncryptionDeclarationDocumentUpdateRequest: Hashable, Codable { case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -37,11 +37,11 @@ public struct AppEncryptionDeclarationDocumentUpdateRequest: Hashable, Codable { case attributes } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case appEncryptionDeclarationDocuments } - public struct Attributes: Hashable, Codable { + public struct Attributes: Hashable, Codable, Sendable { public var sourceFileChecksum: String? public var uploaded: Bool? diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/AppEventCreateRequest.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/AppEventCreateRequest.generated.swift index 480e4d39..9c75b028 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/AppEventCreateRequest.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/AppEventCreateRequest.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct AppEventCreateRequest: Hashable, Codable { +public struct AppEventCreateRequest: Hashable, Codable, Sendable { public var data: Data public init(data: Data) { @@ -14,7 +14,7 @@ public struct AppEventCreateRequest: Hashable, Codable { case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var type: `Type` public var attributes: Attributes @@ -37,11 +37,11 @@ public struct AppEventCreateRequest: Hashable, Codable { case relationships } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case appEvents } - public struct Attributes: Hashable, Codable { + public struct Attributes: Hashable, Codable, Sendable { public var badge: Badge? public var deepLink: URL? @@ -50,7 +50,7 @@ public struct AppEventCreateRequest: Hashable, Codable { public var priority: Priority? - public var purchaseRequirement: PurchaseRequirement? + public var purchaseRequirement: String? public var purpose: Purpose? @@ -63,7 +63,7 @@ public struct AppEventCreateRequest: Hashable, Codable { deepLink: URL? = nil, primaryLocale: String? = nil, priority: Priority? = nil, - purchaseRequirement: PurchaseRequirement? = nil, + purchaseRequirement: String? = nil, purpose: Purpose? = nil, referenceName: String, territorySchedules: [TerritorySchedules]? = nil @@ -89,125 +89,95 @@ public struct AppEventCreateRequest: Hashable, Codable { case territorySchedules } - public enum Badge: Hashable, Codable, RawRepresentable { - case challenge - case competition - case liveEvent - case majorUpdate - case newSeason - case premiere - case specialEvent - case unknown(String) - - public var rawValue: String { - switch self { - case .challenge: return "CHALLENGE" - case .competition: return "COMPETITION" - case .liveEvent: return "LIVE_EVENT" - case .majorUpdate: return "MAJOR_UPDATE" - case .newSeason: return "NEW_SEASON" - case .premiere: return "PREMIERE" - case .specialEvent: return "SPECIAL_EVENT" - case .unknown(let rawValue): return rawValue - } + public struct Badge: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var challenge: Self { + .init(rawValue: "CHALLENGE") } - public init(rawValue: String) { - switch rawValue { - case "CHALLENGE": self = .challenge - case "COMPETITION": self = .competition - case "LIVE_EVENT": self = .liveEvent - case "MAJOR_UPDATE": self = .majorUpdate - case "NEW_SEASON": self = .newSeason - case "PREMIERE": self = .premiere - case "SPECIAL_EVENT": self = .specialEvent - default: self = .unknown(rawValue) - } + public static var competition: Self { + .init(rawValue: "COMPETITION") } - } - public enum Priority: Hashable, Codable, RawRepresentable { - case high - case normal - case unknown(String) + public static var liveEvent: Self { + .init(rawValue: "LIVE_EVENT") + } - public var rawValue: String { - switch self { - case .high: return "HIGH" - case .normal: return "NORMAL" - case .unknown(let rawValue): return rawValue - } + public static var majorUpdate: Self { + .init(rawValue: "MAJOR_UPDATE") + } + + public static var newSeason: Self { + .init(rawValue: "NEW_SEASON") } + public static var premiere: Self { + .init(rawValue: "PREMIERE") + } + + public static var specialEvent: Self { + .init(rawValue: "SPECIAL_EVENT") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "HIGH": self = .high - case "NORMAL": self = .normal - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum PurchaseRequirement: Hashable, Codable, RawRepresentable { - case inAppPurchase - case inAppPurchaseAndSubscription - case inAppPurchaseOrSubscription - case noCostAssociated - case subscription - case unknown(String) - - public var rawValue: String { - switch self { - case .inAppPurchase: return "IN_APP_PURCHASE" - case .inAppPurchaseAndSubscription: return "IN_APP_PURCHASE_AND_SUBSCRIPTION" - case .inAppPurchaseOrSubscription: return "IN_APP_PURCHASE_OR_SUBSCRIPTION" - case .noCostAssociated: return "NO_COST_ASSOCIATED" - case .subscription: return "SUBSCRIPTION" - case .unknown(let rawValue): return rawValue - } + public struct Priority: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var high: Self { + .init(rawValue: "HIGH") } + public static var normal: Self { + .init(rawValue: "NORMAL") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "IN_APP_PURCHASE": self = .inAppPurchase - case "IN_APP_PURCHASE_AND_SUBSCRIPTION": self = .inAppPurchaseAndSubscription - case "IN_APP_PURCHASE_OR_SUBSCRIPTION": self = .inAppPurchaseOrSubscription - case "NO_COST_ASSOCIATED": self = .noCostAssociated - case "SUBSCRIPTION": self = .subscription - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum Purpose: Hashable, Codable, RawRepresentable { - case appropriateForAllUsers - case attractNewUsers - case bringBackLapsedUsers - case keepActiveUsersInformed - case unknown(String) - - public var rawValue: String { - switch self { - case .appropriateForAllUsers: return "APPROPRIATE_FOR_ALL_USERS" - case .attractNewUsers: return "ATTRACT_NEW_USERS" - case .bringBackLapsedUsers: return "BRING_BACK_LAPSED_USERS" - case .keepActiveUsersInformed: return "KEEP_ACTIVE_USERS_INFORMED" - case .unknown(let rawValue): return rawValue - } + public struct Purpose: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var appropriateForAllUsers: Self { + .init(rawValue: "APPROPRIATE_FOR_ALL_USERS") + } + + public static var attractNewUsers: Self { + .init(rawValue: "ATTRACT_NEW_USERS") } + public static var bringBackLapsedUsers: Self { + .init(rawValue: "BRING_BACK_LAPSED_USERS") + } + + public static var keepActiveUsersInformed: Self { + .init(rawValue: "KEEP_ACTIVE_USERS_INFORMED") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "APPROPRIATE_FOR_ALL_USERS": self = .appropriateForAllUsers - case "ATTRACT_NEW_USERS": self = .attractNewUsers - case "BRING_BACK_LAPSED_USERS": self = .bringBackLapsedUsers - case "KEEP_ACTIVE_USERS_INFORMED": self = .keepActiveUsersInformed - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public struct TerritorySchedules: Hashable, Codable { + public struct TerritorySchedules: Hashable, Codable, Sendable { public var eventEnd: String? public var eventStart: String? @@ -237,7 +207,7 @@ public struct AppEventCreateRequest: Hashable, Codable { } } - public struct Relationships: Hashable, Codable { + public struct Relationships: Hashable, Codable, Sendable { public var app: App public init(app: App) { @@ -248,7 +218,7 @@ public struct AppEventCreateRequest: Hashable, Codable { case app } - public struct App: Hashable, Codable { + public struct App: Hashable, Codable, Sendable { public var data: Data public init(data: Data) { @@ -259,7 +229,7 @@ public struct AppEventCreateRequest: Hashable, Codable { case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -277,7 +247,7 @@ public struct AppEventCreateRequest: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case apps } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/AppEventLocalizationCreateRequest.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/AppEventLocalizationCreateRequest.generated.swift index 66cff6e8..eb5190fc 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/AppEventLocalizationCreateRequest.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/AppEventLocalizationCreateRequest.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct AppEventLocalizationCreateRequest: Hashable, Codable { +public struct AppEventLocalizationCreateRequest: Hashable, Codable, Sendable { public var data: Data public init(data: Data) { @@ -14,7 +14,7 @@ public struct AppEventLocalizationCreateRequest: Hashable, Codable { case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var type: `Type` public var attributes: Attributes @@ -37,11 +37,11 @@ public struct AppEventLocalizationCreateRequest: Hashable, Codable { case relationships } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case appEventLocalizations } - public struct Attributes: Hashable, Codable { + public struct Attributes: Hashable, Codable, Sendable { public var locale: String public var longDescription: String? @@ -70,7 +70,7 @@ public struct AppEventLocalizationCreateRequest: Hashable, Codable { } } - public struct Relationships: Hashable, Codable { + public struct Relationships: Hashable, Codable, Sendable { public var appEvent: AppEvent public init(appEvent: AppEvent) { @@ -81,7 +81,7 @@ public struct AppEventLocalizationCreateRequest: Hashable, Codable { case appEvent } - public struct AppEvent: Hashable, Codable { + public struct AppEvent: Hashable, Codable, Sendable { public var data: Data public init(data: Data) { @@ -92,7 +92,7 @@ public struct AppEventLocalizationCreateRequest: Hashable, Codable { case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -110,7 +110,7 @@ public struct AppEventLocalizationCreateRequest: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case appEvents } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/AppEventLocalizationUpdateRequest.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/AppEventLocalizationUpdateRequest.generated.swift index 501d1726..ebff5b44 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/AppEventLocalizationUpdateRequest.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/AppEventLocalizationUpdateRequest.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct AppEventLocalizationUpdateRequest: Hashable, Codable { +public struct AppEventLocalizationUpdateRequest: Hashable, Codable, Sendable { public var data: Data public init(data: Data) { @@ -14,7 +14,7 @@ public struct AppEventLocalizationUpdateRequest: Hashable, Codable { case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -37,11 +37,11 @@ public struct AppEventLocalizationUpdateRequest: Hashable, Codable { case attributes } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case appEventLocalizations } - public struct Attributes: Hashable, Codable { + public struct Attributes: Hashable, Codable, Sendable { public var longDescription: String? public var name: String? diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/AppEventScreenshotCreateRequest.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/AppEventScreenshotCreateRequest.generated.swift index 1eb95efc..38b14e4f 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/AppEventScreenshotCreateRequest.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/AppEventScreenshotCreateRequest.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct AppEventScreenshotCreateRequest: Hashable, Codable { +public struct AppEventScreenshotCreateRequest: Hashable, Codable, Sendable { public var data: Data public init(data: Data) { @@ -14,7 +14,7 @@ public struct AppEventScreenshotCreateRequest: Hashable, Codable { case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var type: `Type` public var attributes: Attributes @@ -37,11 +37,11 @@ public struct AppEventScreenshotCreateRequest: Hashable, Codable { case relationships } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case appEventScreenshots } - public struct Attributes: Hashable, Codable { + public struct Attributes: Hashable, Codable, Sendable { public var appEventAssetType: AppEventAssetType public var fileName: String @@ -65,7 +65,7 @@ public struct AppEventScreenshotCreateRequest: Hashable, Codable { } } - public struct Relationships: Hashable, Codable { + public struct Relationships: Hashable, Codable, Sendable { public var appEventLocalization: AppEventLocalization public init(appEventLocalization: AppEventLocalization) { @@ -76,7 +76,7 @@ public struct AppEventScreenshotCreateRequest: Hashable, Codable { case appEventLocalization } - public struct AppEventLocalization: Hashable, Codable { + public struct AppEventLocalization: Hashable, Codable, Sendable { public var data: Data public init(data: Data) { @@ -87,7 +87,7 @@ public struct AppEventScreenshotCreateRequest: Hashable, Codable { case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -105,7 +105,7 @@ public struct AppEventScreenshotCreateRequest: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case appEventLocalizations } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/AppEventScreenshotUpdateRequest.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/AppEventScreenshotUpdateRequest.generated.swift index 0df383b3..87599eb8 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/AppEventScreenshotUpdateRequest.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/AppEventScreenshotUpdateRequest.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct AppEventScreenshotUpdateRequest: Hashable, Codable { +public struct AppEventScreenshotUpdateRequest: Hashable, Codable, Sendable { public var data: Data public init(data: Data) { @@ -14,7 +14,7 @@ public struct AppEventScreenshotUpdateRequest: Hashable, Codable { case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -37,11 +37,11 @@ public struct AppEventScreenshotUpdateRequest: Hashable, Codable { case attributes } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case appEventScreenshots } - public struct Attributes: Hashable, Codable { + public struct Attributes: Hashable, Codable, Sendable { public var uploaded: Bool? public init(uploaded: Bool? = nil) { diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/AppEventUpdateRequest.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/AppEventUpdateRequest.generated.swift index b01ace2c..c0ec8b1b 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/AppEventUpdateRequest.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/AppEventUpdateRequest.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct AppEventUpdateRequest: Hashable, Codable { +public struct AppEventUpdateRequest: Hashable, Codable, Sendable { public var data: Data public init(data: Data) { @@ -14,7 +14,7 @@ public struct AppEventUpdateRequest: Hashable, Codable { case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -37,11 +37,11 @@ public struct AppEventUpdateRequest: Hashable, Codable { case attributes } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case appEvents } - public struct Attributes: Hashable, Codable { + public struct Attributes: Hashable, Codable, Sendable { public var badge: Badge? public var deepLink: URL? @@ -50,7 +50,7 @@ public struct AppEventUpdateRequest: Hashable, Codable { public var priority: Priority? - public var purchaseRequirement: PurchaseRequirement? + public var purchaseRequirement: String? public var purpose: Purpose? @@ -63,7 +63,7 @@ public struct AppEventUpdateRequest: Hashable, Codable { deepLink: URL? = nil, primaryLocale: String? = nil, priority: Priority? = nil, - purchaseRequirement: PurchaseRequirement? = nil, + purchaseRequirement: String? = nil, purpose: Purpose? = nil, referenceName: String? = nil, territorySchedules: [TerritorySchedules]? = nil @@ -89,125 +89,95 @@ public struct AppEventUpdateRequest: Hashable, Codable { case territorySchedules } - public enum Badge: Hashable, Codable, RawRepresentable { - case challenge - case competition - case liveEvent - case majorUpdate - case newSeason - case premiere - case specialEvent - case unknown(String) - - public var rawValue: String { - switch self { - case .challenge: return "CHALLENGE" - case .competition: return "COMPETITION" - case .liveEvent: return "LIVE_EVENT" - case .majorUpdate: return "MAJOR_UPDATE" - case .newSeason: return "NEW_SEASON" - case .premiere: return "PREMIERE" - case .specialEvent: return "SPECIAL_EVENT" - case .unknown(let rawValue): return rawValue - } + public struct Badge: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var challenge: Self { + .init(rawValue: "CHALLENGE") } - public init(rawValue: String) { - switch rawValue { - case "CHALLENGE": self = .challenge - case "COMPETITION": self = .competition - case "LIVE_EVENT": self = .liveEvent - case "MAJOR_UPDATE": self = .majorUpdate - case "NEW_SEASON": self = .newSeason - case "PREMIERE": self = .premiere - case "SPECIAL_EVENT": self = .specialEvent - default: self = .unknown(rawValue) - } + public static var competition: Self { + .init(rawValue: "COMPETITION") + } + + public static var liveEvent: Self { + .init(rawValue: "LIVE_EVENT") } - } - public enum Priority: Hashable, Codable, RawRepresentable { - case high - case normal - case unknown(String) + public static var majorUpdate: Self { + .init(rawValue: "MAJOR_UPDATE") + } + + public static var newSeason: Self { + .init(rawValue: "NEW_SEASON") + } - public var rawValue: String { - switch self { - case .high: return "HIGH" - case .normal: return "NORMAL" - case .unknown(let rawValue): return rawValue - } + public static var premiere: Self { + .init(rawValue: "PREMIERE") } + public static var specialEvent: Self { + .init(rawValue: "SPECIAL_EVENT") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "HIGH": self = .high - case "NORMAL": self = .normal - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum PurchaseRequirement: Hashable, Codable, RawRepresentable { - case inAppPurchase - case inAppPurchaseAndSubscription - case inAppPurchaseOrSubscription - case noCostAssociated - case subscription - case unknown(String) - - public var rawValue: String { - switch self { - case .inAppPurchase: return "IN_APP_PURCHASE" - case .inAppPurchaseAndSubscription: return "IN_APP_PURCHASE_AND_SUBSCRIPTION" - case .inAppPurchaseOrSubscription: return "IN_APP_PURCHASE_OR_SUBSCRIPTION" - case .noCostAssociated: return "NO_COST_ASSOCIATED" - case .subscription: return "SUBSCRIPTION" - case .unknown(let rawValue): return rawValue - } + public struct Priority: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var high: Self { + .init(rawValue: "HIGH") } + public static var normal: Self { + .init(rawValue: "NORMAL") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "IN_APP_PURCHASE": self = .inAppPurchase - case "IN_APP_PURCHASE_AND_SUBSCRIPTION": self = .inAppPurchaseAndSubscription - case "IN_APP_PURCHASE_OR_SUBSCRIPTION": self = .inAppPurchaseOrSubscription - case "NO_COST_ASSOCIATED": self = .noCostAssociated - case "SUBSCRIPTION": self = .subscription - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum Purpose: Hashable, Codable, RawRepresentable { - case appropriateForAllUsers - case attractNewUsers - case bringBackLapsedUsers - case keepActiveUsersInformed - case unknown(String) + public struct Purpose: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var appropriateForAllUsers: Self { + .init(rawValue: "APPROPRIATE_FOR_ALL_USERS") + } + + public static var attractNewUsers: Self { + .init(rawValue: "ATTRACT_NEW_USERS") + } + + public static var bringBackLapsedUsers: Self { + .init(rawValue: "BRING_BACK_LAPSED_USERS") + } - public var rawValue: String { - switch self { - case .appropriateForAllUsers: return "APPROPRIATE_FOR_ALL_USERS" - case .attractNewUsers: return "ATTRACT_NEW_USERS" - case .bringBackLapsedUsers: return "BRING_BACK_LAPSED_USERS" - case .keepActiveUsersInformed: return "KEEP_ACTIVE_USERS_INFORMED" - case .unknown(let rawValue): return rawValue - } + public static var keepActiveUsersInformed: Self { + .init(rawValue: "KEEP_ACTIVE_USERS_INFORMED") } + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "APPROPRIATE_FOR_ALL_USERS": self = .appropriateForAllUsers - case "ATTRACT_NEW_USERS": self = .attractNewUsers - case "BRING_BACK_LAPSED_USERS": self = .bringBackLapsedUsers - case "KEEP_ACTIVE_USERS_INFORMED": self = .keepActiveUsersInformed - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public struct TerritorySchedules: Hashable, Codable { + public struct TerritorySchedules: Hashable, Codable, Sendable { public var eventEnd: String? public var eventStart: String? diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/AppEventVideoClipCreateRequest.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/AppEventVideoClipCreateRequest.generated.swift index 9d99ed13..178fe148 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/AppEventVideoClipCreateRequest.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/AppEventVideoClipCreateRequest.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct AppEventVideoClipCreateRequest: Hashable, Codable { +public struct AppEventVideoClipCreateRequest: Hashable, Codable, Sendable { public var data: Data public init(data: Data) { @@ -14,7 +14,7 @@ public struct AppEventVideoClipCreateRequest: Hashable, Codable { case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var type: `Type` public var attributes: Attributes @@ -37,11 +37,11 @@ public struct AppEventVideoClipCreateRequest: Hashable, Codable { case relationships } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case appEventVideoClips } - public struct Attributes: Hashable, Codable { + public struct Attributes: Hashable, Codable, Sendable { public var appEventAssetType: AppEventAssetType public var fileName: String @@ -70,7 +70,7 @@ public struct AppEventVideoClipCreateRequest: Hashable, Codable { } } - public struct Relationships: Hashable, Codable { + public struct Relationships: Hashable, Codable, Sendable { public var appEventLocalization: AppEventLocalization public init(appEventLocalization: AppEventLocalization) { @@ -81,7 +81,7 @@ public struct AppEventVideoClipCreateRequest: Hashable, Codable { case appEventLocalization } - public struct AppEventLocalization: Hashable, Codable { + public struct AppEventLocalization: Hashable, Codable, Sendable { public var data: Data public init(data: Data) { @@ -92,7 +92,7 @@ public struct AppEventVideoClipCreateRequest: Hashable, Codable { case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -110,7 +110,7 @@ public struct AppEventVideoClipCreateRequest: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case appEventLocalizations } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/AppEventVideoClipUpdateRequest.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/AppEventVideoClipUpdateRequest.generated.swift index 3806d023..e0dad619 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/AppEventVideoClipUpdateRequest.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/AppEventVideoClipUpdateRequest.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct AppEventVideoClipUpdateRequest: Hashable, Codable { +public struct AppEventVideoClipUpdateRequest: Hashable, Codable, Sendable { public var data: Data public init(data: Data) { @@ -14,7 +14,7 @@ public struct AppEventVideoClipUpdateRequest: Hashable, Codable { case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -37,11 +37,11 @@ public struct AppEventVideoClipUpdateRequest: Hashable, Codable { case attributes } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case appEventVideoClips } - public struct Attributes: Hashable, Codable { + public struct Attributes: Hashable, Codable, Sendable { public var previewFrameTimeCode: String? public var uploaded: Bool? diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/AppInfoLocalizationCreateRequest.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/AppInfoLocalizationCreateRequest.generated.swift index 8021dc7b..8260e07b 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/AppInfoLocalizationCreateRequest.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/AppInfoLocalizationCreateRequest.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct AppInfoLocalizationCreateRequest: Hashable, Codable { +public struct AppInfoLocalizationCreateRequest: Hashable, Codable, Sendable { public var data: Data public init(data: Data) { @@ -14,7 +14,7 @@ public struct AppInfoLocalizationCreateRequest: Hashable, Codable { case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var type: `Type` public var attributes: Attributes @@ -37,14 +37,14 @@ public struct AppInfoLocalizationCreateRequest: Hashable, Codable { case relationships } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case appInfoLocalizations } - public struct Attributes: Hashable, Codable { + public struct Attributes: Hashable, Codable, Sendable { public var locale: String - public var name: String? + public var name: String public var privacyChoicesUrl: String? @@ -56,7 +56,7 @@ public struct AppInfoLocalizationCreateRequest: Hashable, Codable { public init( locale: String, - name: String? = nil, + name: String, privacyChoicesUrl: String? = nil, privacyPolicyText: String? = nil, privacyPolicyUrl: String? = nil, @@ -80,7 +80,7 @@ public struct AppInfoLocalizationCreateRequest: Hashable, Codable { } } - public struct Relationships: Hashable, Codable { + public struct Relationships: Hashable, Codable, Sendable { public var appInfo: AppInfo public init(appInfo: AppInfo) { @@ -91,7 +91,7 @@ public struct AppInfoLocalizationCreateRequest: Hashable, Codable { case appInfo } - public struct AppInfo: Hashable, Codable { + public struct AppInfo: Hashable, Codable, Sendable { public var data: Data public init(data: Data) { @@ -102,7 +102,7 @@ public struct AppInfoLocalizationCreateRequest: Hashable, Codable { case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -120,7 +120,7 @@ public struct AppInfoLocalizationCreateRequest: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case appInfos } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/AppInfoLocalizationUpdateRequest.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/AppInfoLocalizationUpdateRequest.generated.swift index 689b2d89..3d282036 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/AppInfoLocalizationUpdateRequest.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/AppInfoLocalizationUpdateRequest.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct AppInfoLocalizationUpdateRequest: Hashable, Codable { +public struct AppInfoLocalizationUpdateRequest: Hashable, Codable, Sendable { public var data: Data public init(data: Data) { @@ -14,7 +14,7 @@ public struct AppInfoLocalizationUpdateRequest: Hashable, Codable { case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -37,11 +37,11 @@ public struct AppInfoLocalizationUpdateRequest: Hashable, Codable { case attributes } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case appInfoLocalizations } - public struct Attributes: Hashable, Codable { + public struct Attributes: Hashable, Codable, Sendable { public var name: String? public var privacyChoicesUrl: String? diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/AppInfoUpdateRequest.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/AppInfoUpdateRequest.generated.swift index 18836adc..da2db55f 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/AppInfoUpdateRequest.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/AppInfoUpdateRequest.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct AppInfoUpdateRequest: Hashable, Codable { +public struct AppInfoUpdateRequest: Hashable, Codable, Sendable { public var data: Data public init(data: Data) { @@ -14,7 +14,7 @@ public struct AppInfoUpdateRequest: Hashable, Codable { case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -37,11 +37,11 @@ public struct AppInfoUpdateRequest: Hashable, Codable { case relationships } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case appInfos } - public struct Relationships: Hashable, Codable { + public struct Relationships: Hashable, Codable, Sendable { public var primaryCategory: PrimaryCategory? public var primarySubcategoryOne: PrimarySubcategoryOne? @@ -79,7 +79,7 @@ public struct AppInfoUpdateRequest: Hashable, Codable { case secondarySubcategoryTwo } - public struct PrimaryCategory: Hashable, Codable { + public struct PrimaryCategory: Hashable, Codable, Sendable { public var data: Data? public init(data: Data? = nil) { @@ -90,7 +90,7 @@ public struct AppInfoUpdateRequest: Hashable, Codable { case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -108,13 +108,13 @@ public struct AppInfoUpdateRequest: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case appCategories } } } - public struct PrimarySubcategoryOne: Hashable, Codable { + public struct PrimarySubcategoryOne: Hashable, Codable, Sendable { public var data: Data? public init(data: Data? = nil) { @@ -125,7 +125,7 @@ public struct AppInfoUpdateRequest: Hashable, Codable { case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -143,13 +143,13 @@ public struct AppInfoUpdateRequest: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case appCategories } } } - public struct PrimarySubcategoryTwo: Hashable, Codable { + public struct PrimarySubcategoryTwo: Hashable, Codable, Sendable { public var data: Data? public init(data: Data? = nil) { @@ -160,7 +160,7 @@ public struct AppInfoUpdateRequest: Hashable, Codable { case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -178,13 +178,13 @@ public struct AppInfoUpdateRequest: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case appCategories } } } - public struct SecondaryCategory: Hashable, Codable { + public struct SecondaryCategory: Hashable, Codable, Sendable { public var data: Data? public init(data: Data? = nil) { @@ -195,7 +195,7 @@ public struct AppInfoUpdateRequest: Hashable, Codable { case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -213,13 +213,13 @@ public struct AppInfoUpdateRequest: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case appCategories } } } - public struct SecondarySubcategoryOne: Hashable, Codable { + public struct SecondarySubcategoryOne: Hashable, Codable, Sendable { public var data: Data? public init(data: Data? = nil) { @@ -230,7 +230,7 @@ public struct AppInfoUpdateRequest: Hashable, Codable { case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -248,13 +248,13 @@ public struct AppInfoUpdateRequest: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case appCategories } } } - public struct SecondarySubcategoryTwo: Hashable, Codable { + public struct SecondarySubcategoryTwo: Hashable, Codable, Sendable { public var data: Data? public init(data: Data? = nil) { @@ -265,7 +265,7 @@ public struct AppInfoUpdateRequest: Hashable, Codable { case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -283,7 +283,7 @@ public struct AppInfoUpdateRequest: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case appCategories } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/AppPreviewCreateRequest.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/AppPreviewCreateRequest.generated.swift index 78412b16..017dbb74 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/AppPreviewCreateRequest.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/AppPreviewCreateRequest.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct AppPreviewCreateRequest: Hashable, Codable { +public struct AppPreviewCreateRequest: Hashable, Codable, Sendable { public var data: Data public init(data: Data) { @@ -14,7 +14,7 @@ public struct AppPreviewCreateRequest: Hashable, Codable { case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var type: `Type` public var attributes: Attributes @@ -37,11 +37,11 @@ public struct AppPreviewCreateRequest: Hashable, Codable { case relationships } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case appPreviews } - public struct Attributes: Hashable, Codable { + public struct Attributes: Hashable, Codable, Sendable { public var fileName: String public var fileSize: Int @@ -70,7 +70,7 @@ public struct AppPreviewCreateRequest: Hashable, Codable { } } - public struct Relationships: Hashable, Codable { + public struct Relationships: Hashable, Codable, Sendable { public var appPreviewSet: AppPreviewSet public init(appPreviewSet: AppPreviewSet) { @@ -81,7 +81,7 @@ public struct AppPreviewCreateRequest: Hashable, Codable { case appPreviewSet } - public struct AppPreviewSet: Hashable, Codable { + public struct AppPreviewSet: Hashable, Codable, Sendable { public var data: Data public init(data: Data) { @@ -92,7 +92,7 @@ public struct AppPreviewCreateRequest: Hashable, Codable { case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -110,7 +110,7 @@ public struct AppPreviewCreateRequest: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case appPreviewSets } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/AppPreviewSetAppPreviewsLinkagesRequest.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/AppPreviewSetAppPreviewsLinkagesRequest.generated.swift index ab24799d..1175e885 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/AppPreviewSetAppPreviewsLinkagesRequest.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/AppPreviewSetAppPreviewsLinkagesRequest.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct AppPreviewSetAppPreviewsLinkagesRequest: Hashable, Codable { +public struct AppPreviewSetAppPreviewsLinkagesRequest: Hashable, Codable, Sendable { public var data: [Data] public init(data: [Data]) { @@ -14,7 +14,7 @@ public struct AppPreviewSetAppPreviewsLinkagesRequest: Hashable, Codable { case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -32,7 +32,7 @@ public struct AppPreviewSetAppPreviewsLinkagesRequest: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case appPreviews } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/AppPreviewSetCreateRequest.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/AppPreviewSetCreateRequest.generated.swift index 0221657d..16a7f72a 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/AppPreviewSetCreateRequest.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/AppPreviewSetCreateRequest.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct AppPreviewSetCreateRequest: Hashable, Codable { +public struct AppPreviewSetCreateRequest: Hashable, Codable, Sendable { public var data: Data public init(data: Data) { @@ -14,7 +14,7 @@ public struct AppPreviewSetCreateRequest: Hashable, Codable { case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var type: `Type` public var attributes: Attributes @@ -37,11 +37,11 @@ public struct AppPreviewSetCreateRequest: Hashable, Codable { case relationships } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case appPreviewSets } - public struct Attributes: Hashable, Codable { + public struct Attributes: Hashable, Codable, Sendable { public var previewType: PreviewType public init(previewType: PreviewType) { @@ -53,7 +53,7 @@ public struct AppPreviewSetCreateRequest: Hashable, Codable { } } - public struct Relationships: Hashable, Codable { + public struct Relationships: Hashable, Codable, Sendable { public var appCustomProductPageLocalization: AppCustomProductPageLocalization? public var appStoreVersionExperimentTreatmentLocalization: AppStoreVersionExperimentTreatmentLocalization? @@ -76,7 +76,7 @@ public struct AppPreviewSetCreateRequest: Hashable, Codable { case appStoreVersionLocalization } - public struct AppCustomProductPageLocalization: Hashable, Codable { + public struct AppCustomProductPageLocalization: Hashable, Codable, Sendable { public var data: Data? public init(data: Data? = nil) { @@ -87,7 +87,7 @@ public struct AppPreviewSetCreateRequest: Hashable, Codable { case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -105,13 +105,13 @@ public struct AppPreviewSetCreateRequest: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case appCustomProductPageLocalizations } } } - public struct AppStoreVersionExperimentTreatmentLocalization: Hashable, Codable { + public struct AppStoreVersionExperimentTreatmentLocalization: Hashable, Codable, Sendable { public var data: Data? public init(data: Data? = nil) { @@ -122,7 +122,7 @@ public struct AppPreviewSetCreateRequest: Hashable, Codable { case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -140,13 +140,13 @@ public struct AppPreviewSetCreateRequest: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case appStoreVersionExperimentTreatmentLocalizations } } } - public struct AppStoreVersionLocalization: Hashable, Codable { + public struct AppStoreVersionLocalization: Hashable, Codable, Sendable { public var data: Data? public init(data: Data? = nil) { @@ -157,7 +157,7 @@ public struct AppPreviewSetCreateRequest: Hashable, Codable { case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -175,7 +175,7 @@ public struct AppPreviewSetCreateRequest: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case appStoreVersionLocalizations } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/AppPreviewUpdateRequest.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/AppPreviewUpdateRequest.generated.swift index c7815d50..49b8e1cb 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/AppPreviewUpdateRequest.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/AppPreviewUpdateRequest.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct AppPreviewUpdateRequest: Hashable, Codable { +public struct AppPreviewUpdateRequest: Hashable, Codable, Sendable { public var data: Data public init(data: Data) { @@ -14,7 +14,7 @@ public struct AppPreviewUpdateRequest: Hashable, Codable { case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -37,11 +37,11 @@ public struct AppPreviewUpdateRequest: Hashable, Codable { case attributes } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case appPreviews } - public struct Attributes: Hashable, Codable { + public struct Attributes: Hashable, Codable, Sendable { public var previewFrameTimeCode: String? public var sourceFileChecksum: String? diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/AppPriceScheduleCreateRequest.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/AppPriceScheduleCreateRequest.generated.swift index a5f764a2..8d29b698 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/AppPriceScheduleCreateRequest.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/AppPriceScheduleCreateRequest.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct AppPriceScheduleCreateRequest: Hashable, Codable { +public struct AppPriceScheduleCreateRequest: Hashable, Codable, Sendable { public var data: Data public var included: [Included]? @@ -21,7 +21,7 @@ public struct AppPriceScheduleCreateRequest: Hashable, Codable { case included } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var type: `Type` public var relationships: Relationships @@ -39,11 +39,11 @@ public struct AppPriceScheduleCreateRequest: Hashable, Codable { case relationships } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case appPriceSchedules } - public struct Relationships: Hashable, Codable { + public struct Relationships: Hashable, Codable, Sendable { public var app: App public var baseTerritory: BaseTerritory @@ -66,7 +66,7 @@ public struct AppPriceScheduleCreateRequest: Hashable, Codable { case manualPrices } - public struct App: Hashable, Codable { + public struct App: Hashable, Codable, Sendable { public var data: Data public init(data: Data) { @@ -77,7 +77,7 @@ public struct AppPriceScheduleCreateRequest: Hashable, Codable { case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -95,13 +95,13 @@ public struct AppPriceScheduleCreateRequest: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case apps } } } - public struct BaseTerritory: Hashable, Codable { + public struct BaseTerritory: Hashable, Codable, Sendable { public var data: Data public init(data: Data) { @@ -112,7 +112,7 @@ public struct AppPriceScheduleCreateRequest: Hashable, Codable { case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -130,13 +130,13 @@ public struct AppPriceScheduleCreateRequest: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case territories } } } - public struct ManualPrices: Hashable, Codable { + public struct ManualPrices: Hashable, Codable, Sendable { public var data: [Data] public init(data: [Data]) { @@ -147,7 +147,7 @@ public struct AppPriceScheduleCreateRequest: Hashable, Codable { case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -165,7 +165,7 @@ public struct AppPriceScheduleCreateRequest: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case appPrices } } @@ -173,7 +173,7 @@ public struct AppPriceScheduleCreateRequest: Hashable, Codable { } } - public enum Included: Hashable, Codable { + public enum Included: Hashable, Codable, Sendable { case appPriceV2InlineCreate(AppPriceV2InlineCreate) case territoryInlineCreate(TerritoryInlineCreate) diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/AppPromotedPurchasesLinkagesRequest.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/AppPromotedPurchasesLinkagesRequest.generated.swift index c22e0fb6..37c96f05 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/AppPromotedPurchasesLinkagesRequest.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/AppPromotedPurchasesLinkagesRequest.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct AppPromotedPurchasesLinkagesRequest: Hashable, Codable { +public struct AppPromotedPurchasesLinkagesRequest: Hashable, Codable, Sendable { public var data: [Data] public init(data: [Data]) { @@ -14,7 +14,7 @@ public struct AppPromotedPurchasesLinkagesRequest: Hashable, Codable { case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -32,7 +32,7 @@ public struct AppPromotedPurchasesLinkagesRequest: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case promotedPurchases } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/AppScreenshotCreateRequest.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/AppScreenshotCreateRequest.generated.swift index 522d8007..8409e7cd 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/AppScreenshotCreateRequest.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/AppScreenshotCreateRequest.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct AppScreenshotCreateRequest: Hashable, Codable { +public struct AppScreenshotCreateRequest: Hashable, Codable, Sendable { public var data: Data public init(data: Data) { @@ -14,7 +14,7 @@ public struct AppScreenshotCreateRequest: Hashable, Codable { case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var type: `Type` public var attributes: Attributes @@ -37,11 +37,11 @@ public struct AppScreenshotCreateRequest: Hashable, Codable { case relationships } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case appScreenshots } - public struct Attributes: Hashable, Codable { + public struct Attributes: Hashable, Codable, Sendable { public var fileName: String public var fileSize: Int @@ -60,7 +60,7 @@ public struct AppScreenshotCreateRequest: Hashable, Codable { } } - public struct Relationships: Hashable, Codable { + public struct Relationships: Hashable, Codable, Sendable { public var appScreenshotSet: AppScreenshotSet public init(appScreenshotSet: AppScreenshotSet) { @@ -71,7 +71,7 @@ public struct AppScreenshotCreateRequest: Hashable, Codable { case appScreenshotSet } - public struct AppScreenshotSet: Hashable, Codable { + public struct AppScreenshotSet: Hashable, Codable, Sendable { public var data: Data public init(data: Data) { @@ -82,7 +82,7 @@ public struct AppScreenshotCreateRequest: Hashable, Codable { case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -100,7 +100,7 @@ public struct AppScreenshotCreateRequest: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case appScreenshotSets } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/AppScreenshotSetAppScreenshotsLinkagesRequest.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/AppScreenshotSetAppScreenshotsLinkagesRequest.generated.swift index a4eda159..a0636eac 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/AppScreenshotSetAppScreenshotsLinkagesRequest.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/AppScreenshotSetAppScreenshotsLinkagesRequest.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct AppScreenshotSetAppScreenshotsLinkagesRequest: Hashable, Codable { +public struct AppScreenshotSetAppScreenshotsLinkagesRequest: Hashable, Codable, Sendable { public var data: [Data] public init(data: [Data]) { @@ -14,7 +14,7 @@ public struct AppScreenshotSetAppScreenshotsLinkagesRequest: Hashable, Codable { case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -32,7 +32,7 @@ public struct AppScreenshotSetAppScreenshotsLinkagesRequest: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case appScreenshots } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/AppScreenshotSetCreateRequest.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/AppScreenshotSetCreateRequest.generated.swift index 8f1fecb4..171d4a18 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/AppScreenshotSetCreateRequest.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/AppScreenshotSetCreateRequest.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct AppScreenshotSetCreateRequest: Hashable, Codable { +public struct AppScreenshotSetCreateRequest: Hashable, Codable, Sendable { public var data: Data public init(data: Data) { @@ -14,7 +14,7 @@ public struct AppScreenshotSetCreateRequest: Hashable, Codable { case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var type: `Type` public var attributes: Attributes @@ -37,11 +37,11 @@ public struct AppScreenshotSetCreateRequest: Hashable, Codable { case relationships } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case appScreenshotSets } - public struct Attributes: Hashable, Codable { + public struct Attributes: Hashable, Codable, Sendable { public var screenshotDisplayType: ScreenshotDisplayType public init(screenshotDisplayType: ScreenshotDisplayType) { @@ -53,7 +53,7 @@ public struct AppScreenshotSetCreateRequest: Hashable, Codable { } } - public struct Relationships: Hashable, Codable { + public struct Relationships: Hashable, Codable, Sendable { public var appCustomProductPageLocalization: AppCustomProductPageLocalization? public var appStoreVersionExperimentTreatmentLocalization: AppStoreVersionExperimentTreatmentLocalization? @@ -76,7 +76,7 @@ public struct AppScreenshotSetCreateRequest: Hashable, Codable { case appStoreVersionLocalization } - public struct AppCustomProductPageLocalization: Hashable, Codable { + public struct AppCustomProductPageLocalization: Hashable, Codable, Sendable { public var data: Data? public init(data: Data? = nil) { @@ -87,7 +87,7 @@ public struct AppScreenshotSetCreateRequest: Hashable, Codable { case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -105,13 +105,13 @@ public struct AppScreenshotSetCreateRequest: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case appCustomProductPageLocalizations } } } - public struct AppStoreVersionExperimentTreatmentLocalization: Hashable, Codable { + public struct AppStoreVersionExperimentTreatmentLocalization: Hashable, Codable, Sendable { public var data: Data? public init(data: Data? = nil) { @@ -122,7 +122,7 @@ public struct AppScreenshotSetCreateRequest: Hashable, Codable { case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -140,13 +140,13 @@ public struct AppScreenshotSetCreateRequest: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case appStoreVersionExperimentTreatmentLocalizations } } } - public struct AppStoreVersionLocalization: Hashable, Codable { + public struct AppStoreVersionLocalization: Hashable, Codable, Sendable { public var data: Data? public init(data: Data? = nil) { @@ -157,7 +157,7 @@ public struct AppScreenshotSetCreateRequest: Hashable, Codable { case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -175,7 +175,7 @@ public struct AppScreenshotSetCreateRequest: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case appStoreVersionLocalizations } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/AppScreenshotUpdateRequest.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/AppScreenshotUpdateRequest.generated.swift index b0e6d70e..ac226391 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/AppScreenshotUpdateRequest.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/AppScreenshotUpdateRequest.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct AppScreenshotUpdateRequest: Hashable, Codable { +public struct AppScreenshotUpdateRequest: Hashable, Codable, Sendable { public var data: Data public init(data: Data) { @@ -14,7 +14,7 @@ public struct AppScreenshotUpdateRequest: Hashable, Codable { case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -37,11 +37,11 @@ public struct AppScreenshotUpdateRequest: Hashable, Codable { case attributes } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case appScreenshots } - public struct Attributes: Hashable, Codable { + public struct Attributes: Hashable, Codable, Sendable { public var sourceFileChecksum: String? public var uploaded: Bool? diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/AppStoreReviewAttachmentCreateRequest.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/AppStoreReviewAttachmentCreateRequest.generated.swift index 19c35e6c..f925d3ac 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/AppStoreReviewAttachmentCreateRequest.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/AppStoreReviewAttachmentCreateRequest.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct AppStoreReviewAttachmentCreateRequest: Hashable, Codable { +public struct AppStoreReviewAttachmentCreateRequest: Hashable, Codable, Sendable { public var data: Data public init(data: Data) { @@ -14,7 +14,7 @@ public struct AppStoreReviewAttachmentCreateRequest: Hashable, Codable { case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var type: `Type` public var attributes: Attributes @@ -37,11 +37,11 @@ public struct AppStoreReviewAttachmentCreateRequest: Hashable, Codable { case relationships } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case appStoreReviewAttachments } - public struct Attributes: Hashable, Codable { + public struct Attributes: Hashable, Codable, Sendable { public var fileName: String public var fileSize: Int @@ -60,7 +60,7 @@ public struct AppStoreReviewAttachmentCreateRequest: Hashable, Codable { } } - public struct Relationships: Hashable, Codable { + public struct Relationships: Hashable, Codable, Sendable { public var appStoreReviewDetail: AppStoreReviewDetail public init(appStoreReviewDetail: AppStoreReviewDetail) { @@ -71,7 +71,7 @@ public struct AppStoreReviewAttachmentCreateRequest: Hashable, Codable { case appStoreReviewDetail } - public struct AppStoreReviewDetail: Hashable, Codable { + public struct AppStoreReviewDetail: Hashable, Codable, Sendable { public var data: Data public init(data: Data) { @@ -82,7 +82,7 @@ public struct AppStoreReviewAttachmentCreateRequest: Hashable, Codable { case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -100,7 +100,7 @@ public struct AppStoreReviewAttachmentCreateRequest: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case appStoreReviewDetails } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/AppStoreReviewAttachmentUpdateRequest.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/AppStoreReviewAttachmentUpdateRequest.generated.swift index ba707d3e..f8ac9721 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/AppStoreReviewAttachmentUpdateRequest.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/AppStoreReviewAttachmentUpdateRequest.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct AppStoreReviewAttachmentUpdateRequest: Hashable, Codable { +public struct AppStoreReviewAttachmentUpdateRequest: Hashable, Codable, Sendable { public var data: Data public init(data: Data) { @@ -14,7 +14,7 @@ public struct AppStoreReviewAttachmentUpdateRequest: Hashable, Codable { case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -37,11 +37,11 @@ public struct AppStoreReviewAttachmentUpdateRequest: Hashable, Codable { case attributes } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case appStoreReviewAttachments } - public struct Attributes: Hashable, Codable { + public struct Attributes: Hashable, Codable, Sendable { public var sourceFileChecksum: String? public var uploaded: Bool? diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/AppStoreReviewDetailCreateRequest.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/AppStoreReviewDetailCreateRequest.generated.swift index 44698ffc..85b513be 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/AppStoreReviewDetailCreateRequest.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/AppStoreReviewDetailCreateRequest.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct AppStoreReviewDetailCreateRequest: Hashable, Codable { +public struct AppStoreReviewDetailCreateRequest: Hashable, Codable, Sendable { public var data: Data public init(data: Data) { @@ -14,7 +14,7 @@ public struct AppStoreReviewDetailCreateRequest: Hashable, Codable { case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var type: `Type` public var attributes: Attributes? @@ -37,11 +37,11 @@ public struct AppStoreReviewDetailCreateRequest: Hashable, Codable { case relationships } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case appStoreReviewDetails } - public struct Attributes: Hashable, Codable { + public struct Attributes: Hashable, Codable, Sendable { public var contactEmail: String? public var contactFirstName: String? @@ -90,7 +90,7 @@ public struct AppStoreReviewDetailCreateRequest: Hashable, Codable { } } - public struct Relationships: Hashable, Codable { + public struct Relationships: Hashable, Codable, Sendable { public var appStoreVersion: AppStoreVersion public init(appStoreVersion: AppStoreVersion) { @@ -101,7 +101,7 @@ public struct AppStoreReviewDetailCreateRequest: Hashable, Codable { case appStoreVersion } - public struct AppStoreVersion: Hashable, Codable { + public struct AppStoreVersion: Hashable, Codable, Sendable { public var data: Data public init(data: Data) { @@ -112,7 +112,7 @@ public struct AppStoreReviewDetailCreateRequest: Hashable, Codable { case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -130,7 +130,7 @@ public struct AppStoreReviewDetailCreateRequest: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case appStoreVersions } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/AppStoreReviewDetailUpdateRequest.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/AppStoreReviewDetailUpdateRequest.generated.swift index 000e64b4..9affd907 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/AppStoreReviewDetailUpdateRequest.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/AppStoreReviewDetailUpdateRequest.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct AppStoreReviewDetailUpdateRequest: Hashable, Codable { +public struct AppStoreReviewDetailUpdateRequest: Hashable, Codable, Sendable { public var data: Data public init(data: Data) { @@ -14,7 +14,7 @@ public struct AppStoreReviewDetailUpdateRequest: Hashable, Codable { case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -37,11 +37,11 @@ public struct AppStoreReviewDetailUpdateRequest: Hashable, Codable { case attributes } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case appStoreReviewDetails } - public struct Attributes: Hashable, Codable { + public struct Attributes: Hashable, Codable, Sendable { public var contactEmail: String? public var contactFirstName: String? diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/AppStoreVersionAppClipDefaultExperienceLinkageRequest.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/AppStoreVersionAppClipDefaultExperienceLinkageRequest.generated.swift index b1e1d46b..d5acbe85 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/AppStoreVersionAppClipDefaultExperienceLinkageRequest.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/AppStoreVersionAppClipDefaultExperienceLinkageRequest.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct AppStoreVersionAppClipDefaultExperienceLinkageRequest: Hashable, Codable { +public struct AppStoreVersionAppClipDefaultExperienceLinkageRequest: Hashable, Codable, Sendable { public var data: Data public init(data: Data) { @@ -14,7 +14,7 @@ public struct AppStoreVersionAppClipDefaultExperienceLinkageRequest: Hashable, C case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -32,7 +32,7 @@ public struct AppStoreVersionAppClipDefaultExperienceLinkageRequest: Hashable, C case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case appClipDefaultExperiences } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/AppStoreVersionBuildLinkageRequest.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/AppStoreVersionBuildLinkageRequest.generated.swift index c34350cd..f940f90c 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/AppStoreVersionBuildLinkageRequest.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/AppStoreVersionBuildLinkageRequest.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct AppStoreVersionBuildLinkageRequest: Hashable, Codable { +public struct AppStoreVersionBuildLinkageRequest: Hashable, Codable, Sendable { public var data: Data public init(data: Data) { @@ -14,7 +14,7 @@ public struct AppStoreVersionBuildLinkageRequest: Hashable, Codable { case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -32,7 +32,7 @@ public struct AppStoreVersionBuildLinkageRequest: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case builds } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/AppStoreVersionCreateRequest.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/AppStoreVersionCreateRequest.generated.swift index c13e16a8..7ca20227 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/AppStoreVersionCreateRequest.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/AppStoreVersionCreateRequest.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct AppStoreVersionCreateRequest: Hashable, Codable { +public struct AppStoreVersionCreateRequest: Hashable, Codable, Sendable { public var data: Data public init(data: Data) { @@ -14,7 +14,7 @@ public struct AppStoreVersionCreateRequest: Hashable, Codable { case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var type: `Type` public var attributes: Attributes @@ -37,11 +37,11 @@ public struct AppStoreVersionCreateRequest: Hashable, Codable { case relationships } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case appStoreVersions } - public struct Attributes: Hashable, Codable { + public struct Attributes: Hashable, Codable, Sendable { public var copyright: String? public var earliestReleaseDate: String? @@ -50,6 +50,11 @@ public struct AppStoreVersionCreateRequest: Hashable, Codable { public var releaseType: ReleaseType? + public var reviewType: ReviewType? + + @available(*, deprecated) + public var usesIdfa: Bool? + public var versionString: String public init( @@ -57,12 +62,16 @@ public struct AppStoreVersionCreateRequest: Hashable, Codable { earliestReleaseDate: String? = nil, platform: Platform, releaseType: ReleaseType? = nil, + reviewType: ReviewType? = nil, + usesIdfa: Bool? = nil, versionString: String ) { self.copyright = copyright self.earliestReleaseDate = earliestReleaseDate self.platform = platform self.releaseType = releaseType + self.reviewType = reviewType + self.usesIdfa = usesIdfa self.versionString = versionString } @@ -71,36 +80,57 @@ public struct AppStoreVersionCreateRequest: Hashable, Codable { case earliestReleaseDate case platform case releaseType + case reviewType + case usesIdfa case versionString } - public enum ReleaseType: Hashable, Codable, RawRepresentable { - case afterApproval - case manual - case scheduled - case unknown(String) - - public var rawValue: String { - switch self { - case .afterApproval: return "AFTER_APPROVAL" - case .manual: return "MANUAL" - case .scheduled: return "SCHEDULED" - case .unknown(let rawValue): return rawValue - } + public struct ReleaseType: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var afterApproval: Self { + .init(rawValue: "AFTER_APPROVAL") } + public static var manual: Self { + .init(rawValue: "MANUAL") + } + + public static var scheduled: Self { + .init(rawValue: "SCHEDULED") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "AFTER_APPROVAL": self = .afterApproval - case "MANUAL": self = .manual - case "SCHEDULED": self = .scheduled - default: self = .unknown(rawValue) - } + self.rawValue = rawValue + } + } + + public struct ReviewType: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var appStore: Self { + .init(rawValue: "APP_STORE") + } + + public static var notarization: Self { + .init(rawValue: "NOTARIZATION") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue } } } - public struct Relationships: Hashable, Codable { + public struct Relationships: Hashable, Codable, Sendable { public var app: App public var appStoreVersionLocalizations: AppStoreVersionLocalizations? @@ -123,7 +153,7 @@ public struct AppStoreVersionCreateRequest: Hashable, Codable { case build } - public struct App: Hashable, Codable { + public struct App: Hashable, Codable, Sendable { public var data: Data public init(data: Data) { @@ -134,7 +164,7 @@ public struct AppStoreVersionCreateRequest: Hashable, Codable { case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -152,13 +182,13 @@ public struct AppStoreVersionCreateRequest: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case apps } } } - public struct AppStoreVersionLocalizations: Hashable, Codable { + public struct AppStoreVersionLocalizations: Hashable, Codable, Sendable { public var data: [Data]? public init(data: [Data]? = nil) { @@ -169,7 +199,7 @@ public struct AppStoreVersionCreateRequest: Hashable, Codable { case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -187,13 +217,13 @@ public struct AppStoreVersionCreateRequest: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case appStoreVersionLocalizations } } } - public struct Build: Hashable, Codable { + public struct Build: Hashable, Codable, Sendable { public var data: Data? public init(data: Data? = nil) { @@ -204,7 +234,7 @@ public struct AppStoreVersionCreateRequest: Hashable, Codable { case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -222,7 +252,7 @@ public struct AppStoreVersionCreateRequest: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case builds } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/AppStoreVersionExperimentCreateRequest.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/AppStoreVersionExperimentCreateRequest.generated.swift index efbacd0a..ce19f8a4 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/AppStoreVersionExperimentCreateRequest.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/AppStoreVersionExperimentCreateRequest.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct AppStoreVersionExperimentCreateRequest: Hashable, Codable { +public struct AppStoreVersionExperimentCreateRequest: Hashable, Codable, Sendable { public var data: Data public init(data: Data) { @@ -14,7 +14,7 @@ public struct AppStoreVersionExperimentCreateRequest: Hashable, Codable { case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var type: `Type` public var attributes: Attributes @@ -37,11 +37,11 @@ public struct AppStoreVersionExperimentCreateRequest: Hashable, Codable { case relationships } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case appStoreVersionExperiments } - public struct Attributes: Hashable, Codable { + public struct Attributes: Hashable, Codable, Sendable { public var name: String public var trafficProportion: Int @@ -60,7 +60,7 @@ public struct AppStoreVersionExperimentCreateRequest: Hashable, Codable { } } - public struct Relationships: Hashable, Codable { + public struct Relationships: Hashable, Codable, Sendable { public var appStoreVersion: AppStoreVersion public init(appStoreVersion: AppStoreVersion) { @@ -71,7 +71,7 @@ public struct AppStoreVersionExperimentCreateRequest: Hashable, Codable { case appStoreVersion } - public struct AppStoreVersion: Hashable, Codable { + public struct AppStoreVersion: Hashable, Codable, Sendable { public var data: Data public init(data: Data) { @@ -82,7 +82,7 @@ public struct AppStoreVersionExperimentCreateRequest: Hashable, Codable { case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -100,7 +100,7 @@ public struct AppStoreVersionExperimentCreateRequest: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case appStoreVersions } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/AppStoreVersionExperimentTreatmentCreateRequest.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/AppStoreVersionExperimentTreatmentCreateRequest.generated.swift index 6d53cfa1..c5462e58 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/AppStoreVersionExperimentTreatmentCreateRequest.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/AppStoreVersionExperimentTreatmentCreateRequest.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct AppStoreVersionExperimentTreatmentCreateRequest: Hashable, Codable { +public struct AppStoreVersionExperimentTreatmentCreateRequest: Hashable, Codable, Sendable { public var data: Data public init(data: Data) { @@ -14,17 +14,17 @@ public struct AppStoreVersionExperimentTreatmentCreateRequest: Hashable, Codable case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var type: `Type` public var attributes: Attributes - public var relationships: Relationships + public var relationships: Relationships? public init( type: `Type`, attributes: Attributes, - relationships: Relationships + relationships: Relationships? = nil ) { self.type = type self.attributes = attributes @@ -37,11 +37,11 @@ public struct AppStoreVersionExperimentTreatmentCreateRequest: Hashable, Codable case relationships } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case appStoreVersionExperimentTreatments } - public struct Attributes: Hashable, Codable { + public struct Attributes: Hashable, Codable, Sendable { public var appIconName: String? public var name: String @@ -60,13 +60,13 @@ public struct AppStoreVersionExperimentTreatmentCreateRequest: Hashable, Codable } } - public struct Relationships: Hashable, Codable { - public var appStoreVersionExperiment: AppStoreVersionExperiment + public struct Relationships: Hashable, Codable, Sendable { + public var appStoreVersionExperiment: AppStoreVersionExperiment? public var appStoreVersionExperimentV2: AppStoreVersionExperimentV2? public init( - appStoreVersionExperiment: AppStoreVersionExperiment, + appStoreVersionExperiment: AppStoreVersionExperiment? = nil, appStoreVersionExperimentV2: AppStoreVersionExperimentV2? = nil ) { self.appStoreVersionExperiment = appStoreVersionExperiment @@ -78,10 +78,10 @@ public struct AppStoreVersionExperimentTreatmentCreateRequest: Hashable, Codable case appStoreVersionExperimentV2 } - public struct AppStoreVersionExperiment: Hashable, Codable { - public var data: Data + public struct AppStoreVersionExperiment: Hashable, Codable, Sendable { + public var data: Data? - public init(data: Data) { + public init(data: Data? = nil) { self.data = data } @@ -89,7 +89,7 @@ public struct AppStoreVersionExperimentTreatmentCreateRequest: Hashable, Codable case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -107,13 +107,13 @@ public struct AppStoreVersionExperimentTreatmentCreateRequest: Hashable, Codable case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case appStoreVersionExperiments } } } - public struct AppStoreVersionExperimentV2: Hashable, Codable { + public struct AppStoreVersionExperimentV2: Hashable, Codable, Sendable { public var data: Data? public init(data: Data? = nil) { @@ -124,7 +124,7 @@ public struct AppStoreVersionExperimentTreatmentCreateRequest: Hashable, Codable case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -142,7 +142,7 @@ public struct AppStoreVersionExperimentTreatmentCreateRequest: Hashable, Codable case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case appStoreVersionExperiments } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/AppStoreVersionExperimentTreatmentLocalizationCreateRequest.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/AppStoreVersionExperimentTreatmentLocalizationCreateRequest.generated.swift index 1d36efcb..e63efece 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/AppStoreVersionExperimentTreatmentLocalizationCreateRequest.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/AppStoreVersionExperimentTreatmentLocalizationCreateRequest.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct AppStoreVersionExperimentTreatmentLocalizationCreateRequest: Hashable, Codable { +public struct AppStoreVersionExperimentTreatmentLocalizationCreateRequest: Hashable, Codable, Sendable { public var data: Data public init(data: Data) { @@ -14,7 +14,7 @@ public struct AppStoreVersionExperimentTreatmentLocalizationCreateRequest: Hasha case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var type: `Type` public var attributes: Attributes @@ -37,11 +37,11 @@ public struct AppStoreVersionExperimentTreatmentLocalizationCreateRequest: Hasha case relationships } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case appStoreVersionExperimentTreatmentLocalizations } - public struct Attributes: Hashable, Codable { + public struct Attributes: Hashable, Codable, Sendable { public var locale: String public init(locale: String) { @@ -53,7 +53,7 @@ public struct AppStoreVersionExperimentTreatmentLocalizationCreateRequest: Hasha } } - public struct Relationships: Hashable, Codable { + public struct Relationships: Hashable, Codable, Sendable { public var appStoreVersionExperimentTreatment: AppStoreVersionExperimentTreatment public init(appStoreVersionExperimentTreatment: AppStoreVersionExperimentTreatment) { @@ -64,7 +64,7 @@ public struct AppStoreVersionExperimentTreatmentLocalizationCreateRequest: Hasha case appStoreVersionExperimentTreatment } - public struct AppStoreVersionExperimentTreatment: Hashable, Codable { + public struct AppStoreVersionExperimentTreatment: Hashable, Codable, Sendable { public var data: Data public init(data: Data) { @@ -75,7 +75,7 @@ public struct AppStoreVersionExperimentTreatmentLocalizationCreateRequest: Hasha case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -93,7 +93,7 @@ public struct AppStoreVersionExperimentTreatmentLocalizationCreateRequest: Hasha case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case appStoreVersionExperimentTreatments } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/AppStoreVersionExperimentTreatmentUpdateRequest.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/AppStoreVersionExperimentTreatmentUpdateRequest.generated.swift index 5cd4b348..f10d0e6c 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/AppStoreVersionExperimentTreatmentUpdateRequest.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/AppStoreVersionExperimentTreatmentUpdateRequest.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct AppStoreVersionExperimentTreatmentUpdateRequest: Hashable, Codable { +public struct AppStoreVersionExperimentTreatmentUpdateRequest: Hashable, Codable, Sendable { public var data: Data public init(data: Data) { @@ -14,7 +14,7 @@ public struct AppStoreVersionExperimentTreatmentUpdateRequest: Hashable, Codable case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -37,11 +37,11 @@ public struct AppStoreVersionExperimentTreatmentUpdateRequest: Hashable, Codable case attributes } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case appStoreVersionExperimentTreatments } - public struct Attributes: Hashable, Codable { + public struct Attributes: Hashable, Codable, Sendable { public var appIconName: String? public var name: String? diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/AppStoreVersionExperimentUpdateRequest.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/AppStoreVersionExperimentUpdateRequest.generated.swift index 6075f672..f6d3ed4f 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/AppStoreVersionExperimentUpdateRequest.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/AppStoreVersionExperimentUpdateRequest.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct AppStoreVersionExperimentUpdateRequest: Hashable, Codable { +public struct AppStoreVersionExperimentUpdateRequest: Hashable, Codable, Sendable { public var data: Data public init(data: Data) { @@ -14,7 +14,7 @@ public struct AppStoreVersionExperimentUpdateRequest: Hashable, Codable { case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -37,11 +37,11 @@ public struct AppStoreVersionExperimentUpdateRequest: Hashable, Codable { case attributes } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case appStoreVersionExperiments } - public struct Attributes: Hashable, Codable { + public struct Attributes: Hashable, Codable, Sendable { public var name: String? public var started: Bool? diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/AppStoreVersionExperimentV2CreateRequest.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/AppStoreVersionExperimentV2CreateRequest.generated.swift index f4ef0404..281ee61d 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/AppStoreVersionExperimentV2CreateRequest.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/AppStoreVersionExperimentV2CreateRequest.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct AppStoreVersionExperimentV2CreateRequest: Hashable, Codable { +public struct AppStoreVersionExperimentV2CreateRequest: Hashable, Codable, Sendable { public var data: Data public init(data: Data) { @@ -14,7 +14,7 @@ public struct AppStoreVersionExperimentV2CreateRequest: Hashable, Codable { case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var type: `Type` public var attributes: Attributes @@ -37,11 +37,11 @@ public struct AppStoreVersionExperimentV2CreateRequest: Hashable, Codable { case relationships } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case appStoreVersionExperiments } - public struct Attributes: Hashable, Codable { + public struct Attributes: Hashable, Codable, Sendable { public var name: String public var platform: Platform @@ -65,7 +65,7 @@ public struct AppStoreVersionExperimentV2CreateRequest: Hashable, Codable { } } - public struct Relationships: Hashable, Codable { + public struct Relationships: Hashable, Codable, Sendable { public var app: App public init(app: App) { @@ -76,7 +76,7 @@ public struct AppStoreVersionExperimentV2CreateRequest: Hashable, Codable { case app } - public struct App: Hashable, Codable { + public struct App: Hashable, Codable, Sendable { public var data: Data public init(data: Data) { @@ -87,7 +87,7 @@ public struct AppStoreVersionExperimentV2CreateRequest: Hashable, Codable { case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -105,7 +105,7 @@ public struct AppStoreVersionExperimentV2CreateRequest: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case apps } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/AppStoreVersionExperimentV2UpdateRequest.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/AppStoreVersionExperimentV2UpdateRequest.generated.swift index 953f6236..0115f132 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/AppStoreVersionExperimentV2UpdateRequest.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/AppStoreVersionExperimentV2UpdateRequest.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct AppStoreVersionExperimentV2UpdateRequest: Hashable, Codable { +public struct AppStoreVersionExperimentV2UpdateRequest: Hashable, Codable, Sendable { public var data: Data public init(data: Data) { @@ -14,7 +14,7 @@ public struct AppStoreVersionExperimentV2UpdateRequest: Hashable, Codable { case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -37,11 +37,11 @@ public struct AppStoreVersionExperimentV2UpdateRequest: Hashable, Codable { case attributes } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case appStoreVersionExperiments } - public struct Attributes: Hashable, Codable { + public struct Attributes: Hashable, Codable, Sendable { public var name: String? public var started: Bool? diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/AppStoreVersionLocalizationCreateRequest.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/AppStoreVersionLocalizationCreateRequest.generated.swift index 47c42969..9caebd20 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/AppStoreVersionLocalizationCreateRequest.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/AppStoreVersionLocalizationCreateRequest.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct AppStoreVersionLocalizationCreateRequest: Hashable, Codable { +public struct AppStoreVersionLocalizationCreateRequest: Hashable, Codable, Sendable { public var data: Data public init(data: Data) { @@ -14,7 +14,7 @@ public struct AppStoreVersionLocalizationCreateRequest: Hashable, Codable { case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var type: `Type` public var attributes: Attributes @@ -37,11 +37,11 @@ public struct AppStoreVersionLocalizationCreateRequest: Hashable, Codable { case relationships } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case appStoreVersionLocalizations } - public struct Attributes: Hashable, Codable { + public struct Attributes: Hashable, Codable, Sendable { public var description: String? public var keywords: String? @@ -85,7 +85,7 @@ public struct AppStoreVersionLocalizationCreateRequest: Hashable, Codable { } } - public struct Relationships: Hashable, Codable { + public struct Relationships: Hashable, Codable, Sendable { public var appStoreVersion: AppStoreVersion public init(appStoreVersion: AppStoreVersion) { @@ -96,7 +96,7 @@ public struct AppStoreVersionLocalizationCreateRequest: Hashable, Codable { case appStoreVersion } - public struct AppStoreVersion: Hashable, Codable { + public struct AppStoreVersion: Hashable, Codable, Sendable { public var data: Data public init(data: Data) { @@ -107,7 +107,7 @@ public struct AppStoreVersionLocalizationCreateRequest: Hashable, Codable { case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -125,7 +125,7 @@ public struct AppStoreVersionLocalizationCreateRequest: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case appStoreVersions } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/AppStoreVersionLocalizationUpdateRequest.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/AppStoreVersionLocalizationUpdateRequest.generated.swift index c7204844..7c3e2691 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/AppStoreVersionLocalizationUpdateRequest.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/AppStoreVersionLocalizationUpdateRequest.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct AppStoreVersionLocalizationUpdateRequest: Hashable, Codable { +public struct AppStoreVersionLocalizationUpdateRequest: Hashable, Codable, Sendable { public var data: Data public init(data: Data) { @@ -14,7 +14,7 @@ public struct AppStoreVersionLocalizationUpdateRequest: Hashable, Codable { case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -37,11 +37,11 @@ public struct AppStoreVersionLocalizationUpdateRequest: Hashable, Codable { case attributes } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case appStoreVersionLocalizations } - public struct Attributes: Hashable, Codable { + public struct Attributes: Hashable, Codable, Sendable { public var description: String? public var keywords: String? diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/AppStoreVersionPhasedReleaseCreateRequest.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/AppStoreVersionPhasedReleaseCreateRequest.generated.swift index e0acf72b..7a67dcea 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/AppStoreVersionPhasedReleaseCreateRequest.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/AppStoreVersionPhasedReleaseCreateRequest.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct AppStoreVersionPhasedReleaseCreateRequest: Hashable, Codable { +public struct AppStoreVersionPhasedReleaseCreateRequest: Hashable, Codable, Sendable { public var data: Data public init(data: Data) { @@ -14,7 +14,7 @@ public struct AppStoreVersionPhasedReleaseCreateRequest: Hashable, Codable { case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var type: `Type` public var attributes: Attributes? @@ -37,11 +37,11 @@ public struct AppStoreVersionPhasedReleaseCreateRequest: Hashable, Codable { case relationships } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case appStoreVersionPhasedReleases } - public struct Attributes: Hashable, Codable { + public struct Attributes: Hashable, Codable, Sendable { public var phasedReleaseState: PhasedReleaseState? public init(phasedReleaseState: PhasedReleaseState? = nil) { @@ -53,7 +53,7 @@ public struct AppStoreVersionPhasedReleaseCreateRequest: Hashable, Codable { } } - public struct Relationships: Hashable, Codable { + public struct Relationships: Hashable, Codable, Sendable { public var appStoreVersion: AppStoreVersion public init(appStoreVersion: AppStoreVersion) { @@ -64,7 +64,7 @@ public struct AppStoreVersionPhasedReleaseCreateRequest: Hashable, Codable { case appStoreVersion } - public struct AppStoreVersion: Hashable, Codable { + public struct AppStoreVersion: Hashable, Codable, Sendable { public var data: Data public init(data: Data) { @@ -75,7 +75,7 @@ public struct AppStoreVersionPhasedReleaseCreateRequest: Hashable, Codable { case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -93,7 +93,7 @@ public struct AppStoreVersionPhasedReleaseCreateRequest: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case appStoreVersions } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/AppStoreVersionPhasedReleaseUpdateRequest.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/AppStoreVersionPhasedReleaseUpdateRequest.generated.swift index b69e49eb..06159b19 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/AppStoreVersionPhasedReleaseUpdateRequest.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/AppStoreVersionPhasedReleaseUpdateRequest.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct AppStoreVersionPhasedReleaseUpdateRequest: Hashable, Codable { +public struct AppStoreVersionPhasedReleaseUpdateRequest: Hashable, Codable, Sendable { public var data: Data public init(data: Data) { @@ -14,7 +14,7 @@ public struct AppStoreVersionPhasedReleaseUpdateRequest: Hashable, Codable { case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -37,11 +37,11 @@ public struct AppStoreVersionPhasedReleaseUpdateRequest: Hashable, Codable { case attributes } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case appStoreVersionPhasedReleases } - public struct Attributes: Hashable, Codable { + public struct Attributes: Hashable, Codable, Sendable { public var phasedReleaseState: PhasedReleaseState? public init(phasedReleaseState: PhasedReleaseState? = nil) { diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/AppStoreVersionPromotionCreateRequest.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/AppStoreVersionPromotionCreateRequest.generated.swift index 78a57fcb..fe299060 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/AppStoreVersionPromotionCreateRequest.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/AppStoreVersionPromotionCreateRequest.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct AppStoreVersionPromotionCreateRequest: Hashable, Codable { +public struct AppStoreVersionPromotionCreateRequest: Hashable, Codable, Sendable { public var data: Data public init(data: Data) { @@ -14,7 +14,7 @@ public struct AppStoreVersionPromotionCreateRequest: Hashable, Codable { case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var type: `Type` public var relationships: Relationships @@ -32,11 +32,11 @@ public struct AppStoreVersionPromotionCreateRequest: Hashable, Codable { case relationships } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case appStoreVersionPromotions } - public struct Relationships: Hashable, Codable { + public struct Relationships: Hashable, Codable, Sendable { public var appStoreVersion: AppStoreVersion public var appStoreVersionExperimentTreatment: AppStoreVersionExperimentTreatment @@ -54,7 +54,7 @@ public struct AppStoreVersionPromotionCreateRequest: Hashable, Codable { case appStoreVersionExperimentTreatment } - public struct AppStoreVersion: Hashable, Codable { + public struct AppStoreVersion: Hashable, Codable, Sendable { public var data: Data public init(data: Data) { @@ -65,7 +65,7 @@ public struct AppStoreVersionPromotionCreateRequest: Hashable, Codable { case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -83,13 +83,13 @@ public struct AppStoreVersionPromotionCreateRequest: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case appStoreVersions } } } - public struct AppStoreVersionExperimentTreatment: Hashable, Codable { + public struct AppStoreVersionExperimentTreatment: Hashable, Codable, Sendable { public var data: Data public init(data: Data) { @@ -100,7 +100,7 @@ public struct AppStoreVersionPromotionCreateRequest: Hashable, Codable { case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -118,7 +118,7 @@ public struct AppStoreVersionPromotionCreateRequest: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case appStoreVersionExperimentTreatments } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/AppStoreVersionReleaseRequest.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/AppStoreVersionReleaseRequest.generated.swift index 06e6fbce..dd8fa528 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/AppStoreVersionReleaseRequest.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/AppStoreVersionReleaseRequest.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct AppStoreVersionReleaseRequest: Hashable, Codable { +public struct AppStoreVersionReleaseRequest: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -26,7 +26,7 @@ public struct AppStoreVersionReleaseRequest: Hashable, Codable { case links } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case appStoreVersionReleaseRequests } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/AppStoreVersionReleaseRequestCreateRequest.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/AppStoreVersionReleaseRequestCreateRequest.generated.swift index ecb1c891..fac656cd 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/AppStoreVersionReleaseRequestCreateRequest.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/AppStoreVersionReleaseRequestCreateRequest.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct AppStoreVersionReleaseRequestCreateRequest: Hashable, Codable { +public struct AppStoreVersionReleaseRequestCreateRequest: Hashable, Codable, Sendable { public var data: Data public init(data: Data) { @@ -14,7 +14,7 @@ public struct AppStoreVersionReleaseRequestCreateRequest: Hashable, Codable { case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var type: `Type` public var relationships: Relationships @@ -32,11 +32,11 @@ public struct AppStoreVersionReleaseRequestCreateRequest: Hashable, Codable { case relationships } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case appStoreVersionReleaseRequests } - public struct Relationships: Hashable, Codable { + public struct Relationships: Hashable, Codable, Sendable { public var appStoreVersion: AppStoreVersion public init(appStoreVersion: AppStoreVersion) { @@ -47,7 +47,7 @@ public struct AppStoreVersionReleaseRequestCreateRequest: Hashable, Codable { case appStoreVersion } - public struct AppStoreVersion: Hashable, Codable { + public struct AppStoreVersion: Hashable, Codable, Sendable { public var data: Data public init(data: Data) { @@ -58,7 +58,7 @@ public struct AppStoreVersionReleaseRequestCreateRequest: Hashable, Codable { case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -76,7 +76,7 @@ public struct AppStoreVersionReleaseRequestCreateRequest: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case appStoreVersions } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/AppStoreVersionUpdateRequest.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/AppStoreVersionUpdateRequest.generated.swift index 9344120e..bb3327d0 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/AppStoreVersionUpdateRequest.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/AppStoreVersionUpdateRequest.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct AppStoreVersionUpdateRequest: Hashable, Codable { +public struct AppStoreVersionUpdateRequest: Hashable, Codable, Sendable { public var data: Data public init(data: Data) { @@ -14,7 +14,7 @@ public struct AppStoreVersionUpdateRequest: Hashable, Codable { case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -42,11 +42,11 @@ public struct AppStoreVersionUpdateRequest: Hashable, Codable { case relationships } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case appStoreVersions } - public struct Attributes: Hashable, Codable { + public struct Attributes: Hashable, Codable, Sendable { public var copyright: String? public var downloadable: Bool? @@ -55,6 +55,11 @@ public struct AppStoreVersionUpdateRequest: Hashable, Codable { public var releaseType: ReleaseType? + public var reviewType: ReviewType? + + @available(*, deprecated) + public var usesIdfa: Bool? + public var versionString: String? public init( @@ -62,12 +67,16 @@ public struct AppStoreVersionUpdateRequest: Hashable, Codable { downloadable: Bool? = nil, earliestReleaseDate: String? = nil, releaseType: ReleaseType? = nil, + reviewType: ReviewType? = nil, + usesIdfa: Bool? = nil, versionString: String? = nil ) { self.copyright = copyright self.downloadable = downloadable self.earliestReleaseDate = earliestReleaseDate self.releaseType = releaseType + self.reviewType = reviewType + self.usesIdfa = usesIdfa self.versionString = versionString } @@ -76,36 +85,57 @@ public struct AppStoreVersionUpdateRequest: Hashable, Codable { case downloadable case earliestReleaseDate case releaseType + case reviewType + case usesIdfa case versionString } - public enum ReleaseType: Hashable, Codable, RawRepresentable { - case afterApproval - case manual - case scheduled - case unknown(String) - - public var rawValue: String { - switch self { - case .afterApproval: return "AFTER_APPROVAL" - case .manual: return "MANUAL" - case .scheduled: return "SCHEDULED" - case .unknown(let rawValue): return rawValue - } + public struct ReleaseType: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var afterApproval: Self { + .init(rawValue: "AFTER_APPROVAL") } + public static var manual: Self { + .init(rawValue: "MANUAL") + } + + public static var scheduled: Self { + .init(rawValue: "SCHEDULED") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "AFTER_APPROVAL": self = .afterApproval - case "MANUAL": self = .manual - case "SCHEDULED": self = .scheduled - default: self = .unknown(rawValue) - } + self.rawValue = rawValue + } + } + + public struct ReviewType: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var appStore: Self { + .init(rawValue: "APP_STORE") + } + + public static var notarization: Self { + .init(rawValue: "NOTARIZATION") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue } } } - public struct Relationships: Hashable, Codable { + public struct Relationships: Hashable, Codable, Sendable { public var appClipDefaultExperience: AppClipDefaultExperience? public var build: Build? @@ -123,7 +153,7 @@ public struct AppStoreVersionUpdateRequest: Hashable, Codable { case build } - public struct AppClipDefaultExperience: Hashable, Codable { + public struct AppClipDefaultExperience: Hashable, Codable, Sendable { public var data: Data? public init(data: Data? = nil) { @@ -134,7 +164,7 @@ public struct AppStoreVersionUpdateRequest: Hashable, Codable { case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -152,13 +182,13 @@ public struct AppStoreVersionUpdateRequest: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case appClipDefaultExperiences } } } - public struct Build: Hashable, Codable { + public struct Build: Hashable, Codable, Sendable { public var data: Data? public init(data: Data? = nil) { @@ -169,7 +199,7 @@ public struct AppStoreVersionUpdateRequest: Hashable, Codable { case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -187,7 +217,7 @@ public struct AppStoreVersionUpdateRequest: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case builds } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/AppUpdateRequest.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/AppUpdateRequest.generated.swift index be98ef5d..8af6aa9d 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/AppUpdateRequest.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/AppUpdateRequest.generated.swift @@ -3,59 +3,46 @@ // swiftlint:disable all import Foundation -public struct AppUpdateRequest: Hashable, Codable { +public struct AppUpdateRequest: Hashable, Codable, Sendable { public var data: Data - public var included: [AppPriceInlineCreate]? - - public init( - data: Data, - included: [AppPriceInlineCreate]? = nil - ) { + public init(data: Data) { self.data = data - self.included = included } private enum CodingKeys: String, CodingKey { case data - case included } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` public var attributes: Attributes? - public var relationships: Relationships? - public init( id: String, type: `Type`, - attributes: Attributes? = nil, - relationships: Relationships? = nil + attributes: Attributes? = nil ) { self.id = id self.type = type self.attributes = attributes - self.relationships = relationships } private enum CodingKeys: String, CodingKey { case id case type case attributes - case relationships } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case apps } - public struct Attributes: Hashable, Codable { - @available(*, deprecated) - public var availableInNewTerritories: Bool? + public struct Attributes: Hashable, Codable, Sendable { + public var accessibilityUrl: URL? public var bundleId: String? @@ -63,6 +50,8 @@ public struct AppUpdateRequest: Hashable, Codable { public var primaryLocale: String? + public var streamlinedPurchasingEnabled: Bool? + public var subscriptionStatusUrl: URL? public var subscriptionStatusUrlForSandbox: URL? @@ -72,19 +61,21 @@ public struct AppUpdateRequest: Hashable, Codable { public var subscriptionStatusUrlVersionForSandbox: SubscriptionStatusUrlVersion? public init( - availableInNewTerritories: Bool? = nil, + accessibilityUrl: URL? = nil, bundleId: String? = nil, contentRightsDeclaration: ContentRightsDeclaration? = nil, primaryLocale: String? = nil, + streamlinedPurchasingEnabled: Bool? = nil, subscriptionStatusUrl: URL? = nil, subscriptionStatusUrlForSandbox: URL? = nil, subscriptionStatusUrlVersion: SubscriptionStatusUrlVersion? = nil, subscriptionStatusUrlVersionForSandbox: SubscriptionStatusUrlVersion? = nil ) { - self.availableInNewTerritories = availableInNewTerritories + self.accessibilityUrl = accessibilityUrl self.bundleId = bundleId self.contentRightsDeclaration = contentRightsDeclaration self.primaryLocale = primaryLocale + self.streamlinedPurchasingEnabled = streamlinedPurchasingEnabled self.subscriptionStatusUrl = subscriptionStatusUrl self.subscriptionStatusUrlForSandbox = subscriptionStatusUrlForSandbox self.subscriptionStatusUrlVersion = subscriptionStatusUrlVersion @@ -92,126 +83,34 @@ public struct AppUpdateRequest: Hashable, Codable { } private enum CodingKeys: String, CodingKey { - case availableInNewTerritories + case accessibilityUrl case bundleId case contentRightsDeclaration case primaryLocale + case streamlinedPurchasingEnabled case subscriptionStatusUrl case subscriptionStatusUrlForSandbox case subscriptionStatusUrlVersion case subscriptionStatusUrlVersionForSandbox } - public enum ContentRightsDeclaration: Hashable, Codable, RawRepresentable { - case doesNotUseThirdPartyContent - case usesThirdPartyContent - case unknown(String) - - public var rawValue: String { - switch self { - case .doesNotUseThirdPartyContent: return "DOES_NOT_USE_THIRD_PARTY_CONTENT" - case .usesThirdPartyContent: return "USES_THIRD_PARTY_CONTENT" - case .unknown(let rawValue): return rawValue - } - } - - public init(rawValue: String) { - switch rawValue { - case "DOES_NOT_USE_THIRD_PARTY_CONTENT": self = .doesNotUseThirdPartyContent - case "USES_THIRD_PARTY_CONTENT": self = .usesThirdPartyContent - default: self = .unknown(rawValue) - } - } - } - } - - public struct Relationships: Hashable, Codable { - @available(*, deprecated) - public var availableTerritories: AvailableTerritories? - - @available(*, deprecated) - public var prices: Prices? - - public init( - availableTerritories: AvailableTerritories? = nil, - prices: Prices? = nil - ) { - self.availableTerritories = availableTerritories - self.prices = prices - } - - private enum CodingKeys: String, CodingKey { - case availableTerritories - case prices - } - - public struct AvailableTerritories: Hashable, Codable { - public var data: [Data]? - - public init(data: [Data]? = nil) { - self.data = data + public struct ContentRightsDeclaration: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var doesNotUseThirdPartyContent: Self { + .init(rawValue: "DOES_NOT_USE_THIRD_PARTY_CONTENT") } - private enum CodingKeys: String, CodingKey { - case data + public static var usesThirdPartyContent: Self { + .init(rawValue: "USES_THIRD_PARTY_CONTENT") } - public struct Data: Hashable, Codable { - public var id: String - - public var type: `Type` - - public init( - id: String, - type: `Type` - ) { - self.id = id - self.type = type - } - - private enum CodingKeys: String, CodingKey { - case id - case type - } - - public enum `Type`: String, Hashable, Codable { - case territories - } + public var description: String { + rawValue } - } - public struct Prices: Hashable, Codable { - public var data: [Data]? + public var rawValue: String - public init(data: [Data]? = nil) { - self.data = data - } - - private enum CodingKeys: String, CodingKey { - case data - } - - public struct Data: Hashable, Codable { - public var id: String - - public var type: `Type` - - public init( - id: String, - type: `Type` - ) { - self.id = id - self.type = type - } - - private enum CodingKeys: String, CodingKey { - case id - case type - } - - public enum `Type`: String, Hashable, Codable { - case appPrices - } + public init(rawValue: String) { + self.rawValue = rawValue } } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/BackgroundAssetCreateRequest.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/BackgroundAssetCreateRequest.generated.swift new file mode 100644 index 00000000..3809a626 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/BackgroundAssetCreateRequest.generated.swift @@ -0,0 +1,105 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct BackgroundAssetCreateRequest: Hashable, Codable, Sendable { + public var data: Data + + public init(data: Data) { + self.data = data + } + + private enum CodingKeys: String, CodingKey { + case data + } + + public struct Data: Hashable, Codable, Sendable { + public var type: `Type` + + public var attributes: Attributes + + public var relationships: Relationships + + public init( + type: `Type`, + attributes: Attributes, + relationships: Relationships + ) { + self.type = type + self.attributes = attributes + self.relationships = relationships + } + + private enum CodingKeys: String, CodingKey { + case type + case attributes + case relationships + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case backgroundAssets + } + + public struct Attributes: Hashable, Codable, Sendable { + public var assetPackIdentifier: String + + public init(assetPackIdentifier: String) { + self.assetPackIdentifier = assetPackIdentifier + } + + private enum CodingKeys: String, CodingKey { + case assetPackIdentifier + } + } + + public struct Relationships: Hashable, Codable, Sendable { + public var app: App + + public init(app: App) { + self.app = app + } + + private enum CodingKeys: String, CodingKey { + case app + } + + public struct App: Hashable, Codable, Sendable { + public var data: Data + + public init(data: Data) { + self.data = data + } + + private enum CodingKeys: String, CodingKey { + case data + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case apps + } + } + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/BackgroundAssetUploadFileCreateRequest.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/BackgroundAssetUploadFileCreateRequest.generated.swift new file mode 100644 index 00000000..b8feafff --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/BackgroundAssetUploadFileCreateRequest.generated.swift @@ -0,0 +1,137 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct BackgroundAssetUploadFileCreateRequest: Hashable, Codable, Sendable { + public var data: Data + + public init(data: Data) { + self.data = data + } + + private enum CodingKeys: String, CodingKey { + case data + } + + public struct Data: Hashable, Codable, Sendable { + public var type: `Type` + + public var attributes: Attributes + + public var relationships: Relationships + + public init( + type: `Type`, + attributes: Attributes, + relationships: Relationships + ) { + self.type = type + self.attributes = attributes + self.relationships = relationships + } + + private enum CodingKeys: String, CodingKey { + case type + case attributes + case relationships + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case backgroundAssetUploadFiles + } + + public struct Attributes: Hashable, Codable, Sendable { + public var assetType: AssetType + + public var fileName: String + + public var fileSize: Int + + public init( + assetType: AssetType, + fileName: String, + fileSize: Int + ) { + self.assetType = assetType + self.fileName = fileName + self.fileSize = fileSize + } + + private enum CodingKeys: String, CodingKey { + case assetType + case fileName + case fileSize + } + + public struct AssetType: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var asset: Self { + .init(rawValue: "ASSET") + } + + public static var manifest: Self { + .init(rawValue: "MANIFEST") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + } + + public struct Relationships: Hashable, Codable, Sendable { + public var backgroundAssetVersion: BackgroundAssetVersion + + public init(backgroundAssetVersion: BackgroundAssetVersion) { + self.backgroundAssetVersion = backgroundAssetVersion + } + + private enum CodingKeys: String, CodingKey { + case backgroundAssetVersion + } + + public struct BackgroundAssetVersion: Hashable, Codable, Sendable { + public var data: Data + + public init(data: Data) { + self.data = data + } + + private enum CodingKeys: String, CodingKey { + case data + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case backgroundAssetVersions + } + } + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/BackgroundAssetUploadFileUpdateRequest.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/BackgroundAssetUploadFileUpdateRequest.generated.swift new file mode 100644 index 00000000..cba7c7b3 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/BackgroundAssetUploadFileUpdateRequest.generated.swift @@ -0,0 +1,65 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct BackgroundAssetUploadFileUpdateRequest: Hashable, Codable, Sendable { + public var data: Data + + public init(data: Data) { + self.data = data + } + + private enum CodingKeys: String, CodingKey { + case data + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public var attributes: Attributes? + + public init( + id: String, + type: `Type`, + attributes: Attributes? = nil + ) { + self.id = id + self.type = type + self.attributes = attributes + } + + private enum CodingKeys: String, CodingKey { + case id + case type + case attributes + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case backgroundAssetUploadFiles + } + + public struct Attributes: Hashable, Codable, Sendable { + public var sourceFileChecksum: String? + + public var uploaded: Bool? + + public init( + sourceFileChecksum: String? = nil, + uploaded: Bool? = nil + ) { + self.sourceFileChecksum = sourceFileChecksum + self.uploaded = uploaded + } + + private enum CodingKeys: String, CodingKey { + case sourceFileChecksum + case uploaded + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/BackgroundAssetVersionCreateRequest.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/BackgroundAssetVersionCreateRequest.generated.swift new file mode 100644 index 00000000..c154fb89 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/BackgroundAssetVersionCreateRequest.generated.swift @@ -0,0 +1,88 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct BackgroundAssetVersionCreateRequest: Hashable, Codable, Sendable { + public var data: Data + + public init(data: Data) { + self.data = data + } + + private enum CodingKeys: String, CodingKey { + case data + } + + public struct Data: Hashable, Codable, Sendable { + public var type: `Type` + + public var relationships: Relationships + + public init( + type: `Type`, + relationships: Relationships + ) { + self.type = type + self.relationships = relationships + } + + private enum CodingKeys: String, CodingKey { + case type + case relationships + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case backgroundAssetVersions + } + + public struct Relationships: Hashable, Codable, Sendable { + public var backgroundAsset: BackgroundAsset + + public init(backgroundAsset: BackgroundAsset) { + self.backgroundAsset = backgroundAsset + } + + private enum CodingKeys: String, CodingKey { + case backgroundAsset + } + + public struct BackgroundAsset: Hashable, Codable, Sendable { + public var data: Data + + public init(data: Data) { + self.data = data + } + + private enum CodingKeys: String, CodingKey { + case data + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case backgroundAssets + } + } + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/BetaAppClipInvocationCreateRequest.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/BetaAppClipInvocationCreateRequest.generated.swift index 412d0ee5..877dda3d 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/BetaAppClipInvocationCreateRequest.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/BetaAppClipInvocationCreateRequest.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct BetaAppClipInvocationCreateRequest: Hashable, Codable { +public struct BetaAppClipInvocationCreateRequest: Hashable, Codable, Sendable { public var data: Data public var included: [BetaAppClipInvocationLocalizationInlineCreate]? @@ -21,7 +21,7 @@ public struct BetaAppClipInvocationCreateRequest: Hashable, Codable { case included } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var type: `Type` public var attributes: Attributes @@ -44,11 +44,11 @@ public struct BetaAppClipInvocationCreateRequest: Hashable, Codable { case relationships } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case betaAppClipInvocations } - public struct Attributes: Hashable, Codable { + public struct Attributes: Hashable, Codable, Sendable { public var url: URL public init(url: URL) { @@ -60,7 +60,7 @@ public struct BetaAppClipInvocationCreateRequest: Hashable, Codable { } } - public struct Relationships: Hashable, Codable { + public struct Relationships: Hashable, Codable, Sendable { public var betaAppClipInvocationLocalizations: BetaAppClipInvocationLocalizations public var buildBundle: BuildBundle @@ -78,7 +78,7 @@ public struct BetaAppClipInvocationCreateRequest: Hashable, Codable { case buildBundle } - public struct BetaAppClipInvocationLocalizations: Hashable, Codable { + public struct BetaAppClipInvocationLocalizations: Hashable, Codable, Sendable { public var data: [Data] public init(data: [Data]) { @@ -89,7 +89,7 @@ public struct BetaAppClipInvocationCreateRequest: Hashable, Codable { case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -107,13 +107,13 @@ public struct BetaAppClipInvocationCreateRequest: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case betaAppClipInvocationLocalizations } } } - public struct BuildBundle: Hashable, Codable { + public struct BuildBundle: Hashable, Codable, Sendable { public var data: Data public init(data: Data) { @@ -124,7 +124,7 @@ public struct BetaAppClipInvocationCreateRequest: Hashable, Codable { case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -142,7 +142,7 @@ public struct BetaAppClipInvocationCreateRequest: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case buildBundles } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/BetaAppClipInvocationLocalizationCreateRequest.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/BetaAppClipInvocationLocalizationCreateRequest.generated.swift index f66df705..5afa1c8c 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/BetaAppClipInvocationLocalizationCreateRequest.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/BetaAppClipInvocationLocalizationCreateRequest.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct BetaAppClipInvocationLocalizationCreateRequest: Hashable, Codable { +public struct BetaAppClipInvocationLocalizationCreateRequest: Hashable, Codable, Sendable { public var data: Data public init(data: Data) { @@ -14,7 +14,7 @@ public struct BetaAppClipInvocationLocalizationCreateRequest: Hashable, Codable case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var type: `Type` public var attributes: Attributes @@ -37,11 +37,11 @@ public struct BetaAppClipInvocationLocalizationCreateRequest: Hashable, Codable case relationships } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case betaAppClipInvocationLocalizations } - public struct Attributes: Hashable, Codable { + public struct Attributes: Hashable, Codable, Sendable { public var locale: String public var title: String @@ -60,7 +60,7 @@ public struct BetaAppClipInvocationLocalizationCreateRequest: Hashable, Codable } } - public struct Relationships: Hashable, Codable { + public struct Relationships: Hashable, Codable, Sendable { public var betaAppClipInvocation: BetaAppClipInvocation public init(betaAppClipInvocation: BetaAppClipInvocation) { @@ -71,7 +71,7 @@ public struct BetaAppClipInvocationLocalizationCreateRequest: Hashable, Codable case betaAppClipInvocation } - public struct BetaAppClipInvocation: Hashable, Codable { + public struct BetaAppClipInvocation: Hashable, Codable, Sendable { public var data: Data public init(data: Data) { @@ -82,7 +82,7 @@ public struct BetaAppClipInvocationLocalizationCreateRequest: Hashable, Codable case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -100,7 +100,7 @@ public struct BetaAppClipInvocationLocalizationCreateRequest: Hashable, Codable case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case betaAppClipInvocations } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/BetaAppClipInvocationLocalizationUpdateRequest.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/BetaAppClipInvocationLocalizationUpdateRequest.generated.swift index 199c4954..f54a2680 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/BetaAppClipInvocationLocalizationUpdateRequest.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/BetaAppClipInvocationLocalizationUpdateRequest.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct BetaAppClipInvocationLocalizationUpdateRequest: Hashable, Codable { +public struct BetaAppClipInvocationLocalizationUpdateRequest: Hashable, Codable, Sendable { public var data: Data public init(data: Data) { @@ -14,7 +14,7 @@ public struct BetaAppClipInvocationLocalizationUpdateRequest: Hashable, Codable case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -37,11 +37,11 @@ public struct BetaAppClipInvocationLocalizationUpdateRequest: Hashable, Codable case attributes } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case betaAppClipInvocationLocalizations } - public struct Attributes: Hashable, Codable { + public struct Attributes: Hashable, Codable, Sendable { public var title: String? public init(title: String? = nil) { diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/BetaAppClipInvocationUpdateRequest.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/BetaAppClipInvocationUpdateRequest.generated.swift index 56839525..d4a6396c 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/BetaAppClipInvocationUpdateRequest.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/BetaAppClipInvocationUpdateRequest.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct BetaAppClipInvocationUpdateRequest: Hashable, Codable { +public struct BetaAppClipInvocationUpdateRequest: Hashable, Codable, Sendable { public var data: Data public init(data: Data) { @@ -14,7 +14,7 @@ public struct BetaAppClipInvocationUpdateRequest: Hashable, Codable { case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -37,11 +37,11 @@ public struct BetaAppClipInvocationUpdateRequest: Hashable, Codable { case attributes } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case betaAppClipInvocations } - public struct Attributes: Hashable, Codable { + public struct Attributes: Hashable, Codable, Sendable { public var url: URL? public init(url: URL? = nil) { diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/BetaAppLocalizationCreateRequest.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/BetaAppLocalizationCreateRequest.generated.swift index d4ed69ff..bff9ebc8 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/BetaAppLocalizationCreateRequest.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/BetaAppLocalizationCreateRequest.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct BetaAppLocalizationCreateRequest: Hashable, Codable { +public struct BetaAppLocalizationCreateRequest: Hashable, Codable, Sendable { public var data: Data public init(data: Data) { @@ -14,7 +14,7 @@ public struct BetaAppLocalizationCreateRequest: Hashable, Codable { case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var type: `Type` public var attributes: Attributes @@ -37,11 +37,11 @@ public struct BetaAppLocalizationCreateRequest: Hashable, Codable { case relationships } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case betaAppLocalizations } - public struct Attributes: Hashable, Codable { + public struct Attributes: Hashable, Codable, Sendable { public var description: String? public var feedbackEmail: String? @@ -80,7 +80,7 @@ public struct BetaAppLocalizationCreateRequest: Hashable, Codable { } } - public struct Relationships: Hashable, Codable { + public struct Relationships: Hashable, Codable, Sendable { public var app: App public init(app: App) { @@ -91,7 +91,7 @@ public struct BetaAppLocalizationCreateRequest: Hashable, Codable { case app } - public struct App: Hashable, Codable { + public struct App: Hashable, Codable, Sendable { public var data: Data public init(data: Data) { @@ -102,7 +102,7 @@ public struct BetaAppLocalizationCreateRequest: Hashable, Codable { case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -120,7 +120,7 @@ public struct BetaAppLocalizationCreateRequest: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case apps } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/BetaAppLocalizationUpdateRequest.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/BetaAppLocalizationUpdateRequest.generated.swift index 88c3402c..bad04627 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/BetaAppLocalizationUpdateRequest.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/BetaAppLocalizationUpdateRequest.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct BetaAppLocalizationUpdateRequest: Hashable, Codable { +public struct BetaAppLocalizationUpdateRequest: Hashable, Codable, Sendable { public var data: Data public init(data: Data) { @@ -14,7 +14,7 @@ public struct BetaAppLocalizationUpdateRequest: Hashable, Codable { case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -37,11 +37,11 @@ public struct BetaAppLocalizationUpdateRequest: Hashable, Codable { case attributes } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case betaAppLocalizations } - public struct Attributes: Hashable, Codable { + public struct Attributes: Hashable, Codable, Sendable { public var description: String? public var feedbackEmail: String? diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/BetaAppReviewDetailUpdateRequest.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/BetaAppReviewDetailUpdateRequest.generated.swift index 844d4364..28295cf3 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/BetaAppReviewDetailUpdateRequest.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/BetaAppReviewDetailUpdateRequest.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct BetaAppReviewDetailUpdateRequest: Hashable, Codable { +public struct BetaAppReviewDetailUpdateRequest: Hashable, Codable, Sendable { public var data: Data public init(data: Data) { @@ -14,7 +14,7 @@ public struct BetaAppReviewDetailUpdateRequest: Hashable, Codable { case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -37,11 +37,11 @@ public struct BetaAppReviewDetailUpdateRequest: Hashable, Codable { case attributes } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case betaAppReviewDetails } - public struct Attributes: Hashable, Codable { + public struct Attributes: Hashable, Codable, Sendable { public var contactEmail: String? public var contactFirstName: String? diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/BetaAppReviewSubmissionCreateRequest.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/BetaAppReviewSubmissionCreateRequest.generated.swift index 7010a207..951c5df0 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/BetaAppReviewSubmissionCreateRequest.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/BetaAppReviewSubmissionCreateRequest.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct BetaAppReviewSubmissionCreateRequest: Hashable, Codable { +public struct BetaAppReviewSubmissionCreateRequest: Hashable, Codable, Sendable { public var data: Data public init(data: Data) { @@ -14,7 +14,7 @@ public struct BetaAppReviewSubmissionCreateRequest: Hashable, Codable { case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var type: `Type` public var relationships: Relationships @@ -32,11 +32,11 @@ public struct BetaAppReviewSubmissionCreateRequest: Hashable, Codable { case relationships } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case betaAppReviewSubmissions } - public struct Relationships: Hashable, Codable { + public struct Relationships: Hashable, Codable, Sendable { public var build: Build public init(build: Build) { @@ -47,7 +47,7 @@ public struct BetaAppReviewSubmissionCreateRequest: Hashable, Codable { case build } - public struct Build: Hashable, Codable { + public struct Build: Hashable, Codable, Sendable { public var data: Data public init(data: Data) { @@ -58,7 +58,7 @@ public struct BetaAppReviewSubmissionCreateRequest: Hashable, Codable { case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -76,7 +76,7 @@ public struct BetaAppReviewSubmissionCreateRequest: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case builds } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/BetaBuildLocalizationCreateRequest.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/BetaBuildLocalizationCreateRequest.generated.swift index 4e28cf05..19afa7e9 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/BetaBuildLocalizationCreateRequest.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/BetaBuildLocalizationCreateRequest.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct BetaBuildLocalizationCreateRequest: Hashable, Codable { +public struct BetaBuildLocalizationCreateRequest: Hashable, Codable, Sendable { public var data: Data public init(data: Data) { @@ -14,7 +14,7 @@ public struct BetaBuildLocalizationCreateRequest: Hashable, Codable { case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var type: `Type` public var attributes: Attributes @@ -37,11 +37,11 @@ public struct BetaBuildLocalizationCreateRequest: Hashable, Codable { case relationships } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case betaBuildLocalizations } - public struct Attributes: Hashable, Codable { + public struct Attributes: Hashable, Codable, Sendable { public var locale: String public var whatsNew: String? @@ -60,7 +60,7 @@ public struct BetaBuildLocalizationCreateRequest: Hashable, Codable { } } - public struct Relationships: Hashable, Codable { + public struct Relationships: Hashable, Codable, Sendable { public var build: Build public init(build: Build) { @@ -71,7 +71,7 @@ public struct BetaBuildLocalizationCreateRequest: Hashable, Codable { case build } - public struct Build: Hashable, Codable { + public struct Build: Hashable, Codable, Sendable { public var data: Data public init(data: Data) { @@ -82,7 +82,7 @@ public struct BetaBuildLocalizationCreateRequest: Hashable, Codable { case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -100,7 +100,7 @@ public struct BetaBuildLocalizationCreateRequest: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case builds } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/BetaBuildLocalizationUpdateRequest.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/BetaBuildLocalizationUpdateRequest.generated.swift index 8f027f45..144e2f5b 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/BetaBuildLocalizationUpdateRequest.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/BetaBuildLocalizationUpdateRequest.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct BetaBuildLocalizationUpdateRequest: Hashable, Codable { +public struct BetaBuildLocalizationUpdateRequest: Hashable, Codable, Sendable { public var data: Data public init(data: Data) { @@ -14,7 +14,7 @@ public struct BetaBuildLocalizationUpdateRequest: Hashable, Codable { case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -37,11 +37,11 @@ public struct BetaBuildLocalizationUpdateRequest: Hashable, Codable { case attributes } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case betaBuildLocalizations } - public struct Attributes: Hashable, Codable { + public struct Attributes: Hashable, Codable, Sendable { public var whatsNew: String? public init(whatsNew: String? = nil) { diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/BetaGroupBetaTestersLinkagesRequest.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/BetaGroupBetaTestersLinkagesRequest.generated.swift index 2b0d584d..4a39acf9 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/BetaGroupBetaTestersLinkagesRequest.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/BetaGroupBetaTestersLinkagesRequest.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct BetaGroupBetaTestersLinkagesRequest: Hashable, Codable { +public struct BetaGroupBetaTestersLinkagesRequest: Hashable, Codable, Sendable { public var data: [Data] public init(data: [Data]) { @@ -14,7 +14,7 @@ public struct BetaGroupBetaTestersLinkagesRequest: Hashable, Codable { case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -32,7 +32,7 @@ public struct BetaGroupBetaTestersLinkagesRequest: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case betaTesters } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/BetaGroupBuildsLinkagesRequest.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/BetaGroupBuildsLinkagesRequest.generated.swift index 5a5b6a5e..249cb972 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/BetaGroupBuildsLinkagesRequest.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/BetaGroupBuildsLinkagesRequest.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct BetaGroupBuildsLinkagesRequest: Hashable, Codable { +public struct BetaGroupBuildsLinkagesRequest: Hashable, Codable, Sendable { public var data: [Data] public init(data: [Data]) { @@ -14,7 +14,7 @@ public struct BetaGroupBuildsLinkagesRequest: Hashable, Codable { case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -32,7 +32,7 @@ public struct BetaGroupBuildsLinkagesRequest: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case builds } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/BetaGroupCreateRequest.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/BetaGroupCreateRequest.generated.swift index 025d142f..a2e6a86a 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/BetaGroupCreateRequest.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/BetaGroupCreateRequest.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct BetaGroupCreateRequest: Hashable, Codable { +public struct BetaGroupCreateRequest: Hashable, Codable, Sendable { public var data: Data public init(data: Data) { @@ -14,7 +14,7 @@ public struct BetaGroupCreateRequest: Hashable, Codable { case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var type: `Type` public var attributes: Attributes @@ -37,11 +37,11 @@ public struct BetaGroupCreateRequest: Hashable, Codable { case relationships } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case betaGroups } - public struct Attributes: Hashable, Codable { + public struct Attributes: Hashable, Codable, Sendable { public var feedbackEnabled: Bool? public var hasAccessToAllBuilds: Bool? @@ -85,7 +85,7 @@ public struct BetaGroupCreateRequest: Hashable, Codable { } } - public struct Relationships: Hashable, Codable { + public struct Relationships: Hashable, Codable, Sendable { public var app: App public var betaTesters: BetaTesters? @@ -108,7 +108,7 @@ public struct BetaGroupCreateRequest: Hashable, Codable { case builds } - public struct App: Hashable, Codable { + public struct App: Hashable, Codable, Sendable { public var data: Data public init(data: Data) { @@ -119,7 +119,7 @@ public struct BetaGroupCreateRequest: Hashable, Codable { case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -137,13 +137,13 @@ public struct BetaGroupCreateRequest: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case apps } } } - public struct BetaTesters: Hashable, Codable { + public struct BetaTesters: Hashable, Codable, Sendable { public var data: [Data]? public init(data: [Data]? = nil) { @@ -154,7 +154,7 @@ public struct BetaGroupCreateRequest: Hashable, Codable { case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -172,13 +172,13 @@ public struct BetaGroupCreateRequest: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case betaTesters } } } - public struct Builds: Hashable, Codable { + public struct Builds: Hashable, Codable, Sendable { public var data: [Data]? public init(data: [Data]? = nil) { @@ -189,7 +189,7 @@ public struct BetaGroupCreateRequest: Hashable, Codable { case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -207,7 +207,7 @@ public struct BetaGroupCreateRequest: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case builds } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/BetaGroupUpdateRequest.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/BetaGroupUpdateRequest.generated.swift index 7dc6e2b7..7d1f10eb 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/BetaGroupUpdateRequest.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/BetaGroupUpdateRequest.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct BetaGroupUpdateRequest: Hashable, Codable { +public struct BetaGroupUpdateRequest: Hashable, Codable, Sendable { public var data: Data public init(data: Data) { @@ -14,7 +14,7 @@ public struct BetaGroupUpdateRequest: Hashable, Codable { case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -37,15 +37,17 @@ public struct BetaGroupUpdateRequest: Hashable, Codable { case attributes } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case betaGroups } - public struct Attributes: Hashable, Codable { + public struct Attributes: Hashable, Codable, Sendable { public var feedbackEnabled: Bool? public var iosBuildsAvailableForAppleSiliconMac: Bool? + public var iosBuildsAvailableForAppleVision: Bool? + public var name: String? public var publicLinkEnabled: Bool? @@ -57,6 +59,7 @@ public struct BetaGroupUpdateRequest: Hashable, Codable { public init( feedbackEnabled: Bool? = nil, iosBuildsAvailableForAppleSiliconMac: Bool? = nil, + iosBuildsAvailableForAppleVision: Bool? = nil, name: String? = nil, publicLinkEnabled: Bool? = nil, publicLinkLimit: Int? = nil, @@ -64,6 +67,7 @@ public struct BetaGroupUpdateRequest: Hashable, Codable { ) { self.feedbackEnabled = feedbackEnabled self.iosBuildsAvailableForAppleSiliconMac = iosBuildsAvailableForAppleSiliconMac + self.iosBuildsAvailableForAppleVision = iosBuildsAvailableForAppleVision self.name = name self.publicLinkEnabled = publicLinkEnabled self.publicLinkLimit = publicLinkLimit @@ -73,6 +77,7 @@ public struct BetaGroupUpdateRequest: Hashable, Codable { private enum CodingKeys: String, CodingKey { case feedbackEnabled case iosBuildsAvailableForAppleSiliconMac + case iosBuildsAvailableForAppleVision case name case publicLinkEnabled case publicLinkLimit diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/BetaLicenseAgreementUpdateRequest.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/BetaLicenseAgreementUpdateRequest.generated.swift index 7926b457..223fc355 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/BetaLicenseAgreementUpdateRequest.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/BetaLicenseAgreementUpdateRequest.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct BetaLicenseAgreementUpdateRequest: Hashable, Codable { +public struct BetaLicenseAgreementUpdateRequest: Hashable, Codable, Sendable { public var data: Data public init(data: Data) { @@ -14,7 +14,7 @@ public struct BetaLicenseAgreementUpdateRequest: Hashable, Codable { case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -37,11 +37,11 @@ public struct BetaLicenseAgreementUpdateRequest: Hashable, Codable { case attributes } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case betaLicenseAgreements } - public struct Attributes: Hashable, Codable { + public struct Attributes: Hashable, Codable, Sendable { public var agreementText: String? public init(agreementText: String? = nil) { diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/BetaRecruitmentCriterionCreateRequest.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/BetaRecruitmentCriterionCreateRequest.generated.swift new file mode 100644 index 00000000..3422cad9 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/BetaRecruitmentCriterionCreateRequest.generated.swift @@ -0,0 +1,105 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct BetaRecruitmentCriterionCreateRequest: Hashable, Codable, Sendable { + public var data: Data + + public init(data: Data) { + self.data = data + } + + private enum CodingKeys: String, CodingKey { + case data + } + + public struct Data: Hashable, Codable, Sendable { + public var type: `Type` + + public var attributes: Attributes + + public var relationships: Relationships + + public init( + type: `Type`, + attributes: Attributes, + relationships: Relationships + ) { + self.type = type + self.attributes = attributes + self.relationships = relationships + } + + private enum CodingKeys: String, CodingKey { + case type + case attributes + case relationships + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case betaRecruitmentCriteria + } + + public struct Attributes: Hashable, Codable, Sendable { + public var deviceFamilyOsVersionFilters: [DeviceFamilyOsVersionFilter] + + public init(deviceFamilyOsVersionFilters: [DeviceFamilyOsVersionFilter]) { + self.deviceFamilyOsVersionFilters = deviceFamilyOsVersionFilters + } + + private enum CodingKeys: String, CodingKey { + case deviceFamilyOsVersionFilters + } + } + + public struct Relationships: Hashable, Codable, Sendable { + public var betaGroup: BetaGroup + + public init(betaGroup: BetaGroup) { + self.betaGroup = betaGroup + } + + private enum CodingKeys: String, CodingKey { + case betaGroup + } + + public struct BetaGroup: Hashable, Codable, Sendable { + public var data: Data + + public init(data: Data) { + self.data = data + } + + private enum CodingKeys: String, CodingKey { + case data + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case betaGroups + } + } + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/BetaRecruitmentCriterionUpdateRequest.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/BetaRecruitmentCriterionUpdateRequest.generated.swift new file mode 100644 index 00000000..15381e7b --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/BetaRecruitmentCriterionUpdateRequest.generated.swift @@ -0,0 +1,58 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct BetaRecruitmentCriterionUpdateRequest: Hashable, Codable, Sendable { + public var data: Data + + public init(data: Data) { + self.data = data + } + + private enum CodingKeys: String, CodingKey { + case data + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public var attributes: Attributes? + + public init( + id: String, + type: `Type`, + attributes: Attributes? = nil + ) { + self.id = id + self.type = type + self.attributes = attributes + } + + private enum CodingKeys: String, CodingKey { + case id + case type + case attributes + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case betaRecruitmentCriteria + } + + public struct Attributes: Hashable, Codable, Sendable { + public var deviceFamilyOsVersionFilters: [DeviceFamilyOsVersionFilter]? + + public init(deviceFamilyOsVersionFilters: [DeviceFamilyOsVersionFilter]? = nil) { + self.deviceFamilyOsVersionFilters = deviceFamilyOsVersionFilters + } + + private enum CodingKeys: String, CodingKey { + case deviceFamilyOsVersionFilters + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/BetaTesterAppsLinkagesRequest.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/BetaTesterAppsLinkagesRequest.generated.swift index 30ca837a..d66b3c93 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/BetaTesterAppsLinkagesRequest.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/BetaTesterAppsLinkagesRequest.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct BetaTesterAppsLinkagesRequest: Hashable, Codable { +public struct BetaTesterAppsLinkagesRequest: Hashable, Codable, Sendable { public var data: [Data] public init(data: [Data]) { @@ -14,7 +14,7 @@ public struct BetaTesterAppsLinkagesRequest: Hashable, Codable { case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -32,7 +32,7 @@ public struct BetaTesterAppsLinkagesRequest: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case apps } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/BetaTesterBetaGroupsLinkagesRequest.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/BetaTesterBetaGroupsLinkagesRequest.generated.swift index 179b3ee6..b1aca4b5 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/BetaTesterBetaGroupsLinkagesRequest.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/BetaTesterBetaGroupsLinkagesRequest.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct BetaTesterBetaGroupsLinkagesRequest: Hashable, Codable { +public struct BetaTesterBetaGroupsLinkagesRequest: Hashable, Codable, Sendable { public var data: [Data] public init(data: [Data]) { @@ -14,7 +14,7 @@ public struct BetaTesterBetaGroupsLinkagesRequest: Hashable, Codable { case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -32,7 +32,7 @@ public struct BetaTesterBetaGroupsLinkagesRequest: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case betaGroups } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/BetaTesterBuildsLinkagesRequest.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/BetaTesterBuildsLinkagesRequest.generated.swift index 14738445..edc4c09b 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/BetaTesterBuildsLinkagesRequest.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/BetaTesterBuildsLinkagesRequest.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct BetaTesterBuildsLinkagesRequest: Hashable, Codable { +public struct BetaTesterBuildsLinkagesRequest: Hashable, Codable, Sendable { public var data: [Data] public init(data: [Data]) { @@ -14,7 +14,7 @@ public struct BetaTesterBuildsLinkagesRequest: Hashable, Codable { case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -32,7 +32,7 @@ public struct BetaTesterBuildsLinkagesRequest: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case builds } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/BetaTesterCreateRequest.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/BetaTesterCreateRequest.generated.swift index 9d0823c7..d33e9028 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/BetaTesterCreateRequest.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/BetaTesterCreateRequest.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct BetaTesterCreateRequest: Hashable, Codable { +public struct BetaTesterCreateRequest: Hashable, Codable, Sendable { public var data: Data public init(data: Data) { @@ -14,7 +14,7 @@ public struct BetaTesterCreateRequest: Hashable, Codable { case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var type: `Type` public var attributes: Attributes @@ -37,11 +37,11 @@ public struct BetaTesterCreateRequest: Hashable, Codable { case relationships } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case betaTesters } - public struct Attributes: Hashable, Codable { + public struct Attributes: Hashable, Codable, Sendable { public var email: String public var firstName: String? @@ -65,7 +65,7 @@ public struct BetaTesterCreateRequest: Hashable, Codable { } } - public struct Relationships: Hashable, Codable { + public struct Relationships: Hashable, Codable, Sendable { public var betaGroups: BetaGroups? public var builds: Builds? @@ -83,7 +83,7 @@ public struct BetaTesterCreateRequest: Hashable, Codable { case builds } - public struct BetaGroups: Hashable, Codable { + public struct BetaGroups: Hashable, Codable, Sendable { public var data: [Data]? public init(data: [Data]? = nil) { @@ -94,7 +94,7 @@ public struct BetaTesterCreateRequest: Hashable, Codable { case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -112,13 +112,13 @@ public struct BetaTesterCreateRequest: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case betaGroups } } } - public struct Builds: Hashable, Codable { + public struct Builds: Hashable, Codable, Sendable { public var data: [Data]? public init(data: [Data]? = nil) { @@ -129,7 +129,7 @@ public struct BetaTesterCreateRequest: Hashable, Codable { case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -147,7 +147,7 @@ public struct BetaTesterCreateRequest: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case builds } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/BetaTesterInvitationCreateRequest.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/BetaTesterInvitationCreateRequest.generated.swift index 2b93e51d..c6c19aff 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/BetaTesterInvitationCreateRequest.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/BetaTesterInvitationCreateRequest.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct BetaTesterInvitationCreateRequest: Hashable, Codable { +public struct BetaTesterInvitationCreateRequest: Hashable, Codable, Sendable { public var data: Data public init(data: Data) { @@ -14,7 +14,7 @@ public struct BetaTesterInvitationCreateRequest: Hashable, Codable { case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var type: `Type` public var relationships: Relationships @@ -32,18 +32,19 @@ public struct BetaTesterInvitationCreateRequest: Hashable, Codable { case relationships } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case betaTesterInvitations } - public struct Relationships: Hashable, Codable { + public struct Relationships: Hashable, Codable, Sendable { public var app: App - public var betaTester: BetaTester + @available(*, deprecated) + public var betaTester: BetaTester? public init( app: App, - betaTester: BetaTester + betaTester: BetaTester? = nil ) { self.app = app self.betaTester = betaTester @@ -54,7 +55,7 @@ public struct BetaTesterInvitationCreateRequest: Hashable, Codable { case betaTester } - public struct App: Hashable, Codable { + public struct App: Hashable, Codable, Sendable { public var data: Data public init(data: Data) { @@ -65,7 +66,7 @@ public struct BetaTesterInvitationCreateRequest: Hashable, Codable { case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -83,16 +84,16 @@ public struct BetaTesterInvitationCreateRequest: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case apps } } } - public struct BetaTester: Hashable, Codable { - public var data: Data + public struct BetaTester: Hashable, Codable, Sendable { + public var data: Data? - public init(data: Data) { + public init(data: Data? = nil) { self.data = data } @@ -100,7 +101,7 @@ public struct BetaTesterInvitationCreateRequest: Hashable, Codable { case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -118,7 +119,7 @@ public struct BetaTesterInvitationCreateRequest: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case betaTesters } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/BuildAppEncryptionDeclarationLinkageRequest.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/BuildAppEncryptionDeclarationLinkageRequest.generated.swift index 6eca527d..05964398 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/BuildAppEncryptionDeclarationLinkageRequest.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/BuildAppEncryptionDeclarationLinkageRequest.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct BuildAppEncryptionDeclarationLinkageRequest: Hashable, Codable { +public struct BuildAppEncryptionDeclarationLinkageRequest: Hashable, Codable, Sendable { public var data: Data public init(data: Data) { @@ -14,7 +14,7 @@ public struct BuildAppEncryptionDeclarationLinkageRequest: Hashable, Codable { case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -32,7 +32,7 @@ public struct BuildAppEncryptionDeclarationLinkageRequest: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case appEncryptionDeclarations } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/BuildBetaDetailUpdateRequest.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/BuildBetaDetailUpdateRequest.generated.swift index 87deeed3..0cc79c73 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/BuildBetaDetailUpdateRequest.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/BuildBetaDetailUpdateRequest.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct BuildBetaDetailUpdateRequest: Hashable, Codable { +public struct BuildBetaDetailUpdateRequest: Hashable, Codable, Sendable { public var data: Data public init(data: Data) { @@ -14,7 +14,7 @@ public struct BuildBetaDetailUpdateRequest: Hashable, Codable { case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -37,11 +37,11 @@ public struct BuildBetaDetailUpdateRequest: Hashable, Codable { case attributes } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case buildBetaDetails } - public struct Attributes: Hashable, Codable { + public struct Attributes: Hashable, Codable, Sendable { public var autoNotifyEnabled: Bool? public init(autoNotifyEnabled: Bool? = nil) { diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/BuildBetaGroupsLinkagesRequest.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/BuildBetaGroupsLinkagesRequest.generated.swift index f4141d40..e7735851 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/BuildBetaGroupsLinkagesRequest.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/BuildBetaGroupsLinkagesRequest.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct BuildBetaGroupsLinkagesRequest: Hashable, Codable { +public struct BuildBetaGroupsLinkagesRequest: Hashable, Codable, Sendable { public var data: [Data] public init(data: [Data]) { @@ -14,7 +14,7 @@ public struct BuildBetaGroupsLinkagesRequest: Hashable, Codable { case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -32,7 +32,7 @@ public struct BuildBetaGroupsLinkagesRequest: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case betaGroups } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/BuildBetaNotificationCreateRequest.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/BuildBetaNotificationCreateRequest.generated.swift index 6f6302ed..4e353290 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/BuildBetaNotificationCreateRequest.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/BuildBetaNotificationCreateRequest.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct BuildBetaNotificationCreateRequest: Hashable, Codable { +public struct BuildBetaNotificationCreateRequest: Hashable, Codable, Sendable { public var data: Data public init(data: Data) { @@ -14,7 +14,7 @@ public struct BuildBetaNotificationCreateRequest: Hashable, Codable { case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var type: `Type` public var relationships: Relationships @@ -32,11 +32,11 @@ public struct BuildBetaNotificationCreateRequest: Hashable, Codable { case relationships } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case buildBetaNotifications } - public struct Relationships: Hashable, Codable { + public struct Relationships: Hashable, Codable, Sendable { public var build: Build public init(build: Build) { @@ -47,7 +47,7 @@ public struct BuildBetaNotificationCreateRequest: Hashable, Codable { case build } - public struct Build: Hashable, Codable { + public struct Build: Hashable, Codable, Sendable { public var data: Data public init(data: Data) { @@ -58,7 +58,7 @@ public struct BuildBetaNotificationCreateRequest: Hashable, Codable { case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -76,7 +76,7 @@ public struct BuildBetaNotificationCreateRequest: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case builds } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/BuildIndividualTestersLinkagesRequest.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/BuildIndividualTestersLinkagesRequest.generated.swift index bcbc282b..82e292a3 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/BuildIndividualTestersLinkagesRequest.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/BuildIndividualTestersLinkagesRequest.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct BuildIndividualTestersLinkagesRequest: Hashable, Codable { +public struct BuildIndividualTestersLinkagesRequest: Hashable, Codable, Sendable { public var data: [Data] public init(data: [Data]) { @@ -14,7 +14,7 @@ public struct BuildIndividualTestersLinkagesRequest: Hashable, Codable { case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -32,7 +32,7 @@ public struct BuildIndividualTestersLinkagesRequest: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case betaTesters } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/BuildUpdateRequest.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/BuildUpdateRequest.generated.swift index be232ca5..1305d2eb 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/BuildUpdateRequest.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/BuildUpdateRequest.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct BuildUpdateRequest: Hashable, Codable { +public struct BuildUpdateRequest: Hashable, Codable, Sendable { public var data: Data public init(data: Data) { @@ -14,7 +14,7 @@ public struct BuildUpdateRequest: Hashable, Codable { case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -42,11 +42,11 @@ public struct BuildUpdateRequest: Hashable, Codable { case relationships } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case builds } - public struct Attributes: Hashable, Codable { + public struct Attributes: Hashable, Codable, Sendable { public var expired: Bool? public var usesNonExemptEncryption: Bool? @@ -65,7 +65,7 @@ public struct BuildUpdateRequest: Hashable, Codable { } } - public struct Relationships: Hashable, Codable { + public struct Relationships: Hashable, Codable, Sendable { public var appEncryptionDeclaration: AppEncryptionDeclaration? public init(appEncryptionDeclaration: AppEncryptionDeclaration? = nil) { @@ -76,7 +76,7 @@ public struct BuildUpdateRequest: Hashable, Codable { case appEncryptionDeclaration } - public struct AppEncryptionDeclaration: Hashable, Codable { + public struct AppEncryptionDeclaration: Hashable, Codable, Sendable { public var data: Data? public init(data: Data? = nil) { @@ -87,7 +87,7 @@ public struct BuildUpdateRequest: Hashable, Codable { case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -105,7 +105,7 @@ public struct BuildUpdateRequest: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case appEncryptionDeclarations } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/BundleIdCapabilityCreateRequest.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/BundleIdCapabilityCreateRequest.generated.swift index c8a56dbe..ab804f2d 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/BundleIdCapabilityCreateRequest.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/BundleIdCapabilityCreateRequest.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct BundleIdCapabilityCreateRequest: Hashable, Codable { +public struct BundleIdCapabilityCreateRequest: Hashable, Codable, Sendable { public var data: Data public init(data: Data) { @@ -14,7 +14,7 @@ public struct BundleIdCapabilityCreateRequest: Hashable, Codable { case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var type: `Type` public var attributes: Attributes @@ -37,11 +37,11 @@ public struct BundleIdCapabilityCreateRequest: Hashable, Codable { case relationships } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case bundleIdCapabilities } - public struct Attributes: Hashable, Codable { + public struct Attributes: Hashable, Codable, Sendable { public var capabilityType: CapabilityType public var settings: [CapabilitySetting]? @@ -60,7 +60,7 @@ public struct BundleIdCapabilityCreateRequest: Hashable, Codable { } } - public struct Relationships: Hashable, Codable { + public struct Relationships: Hashable, Codable, Sendable { public var bundleId: BundleId public init(bundleId: BundleId) { @@ -71,7 +71,7 @@ public struct BundleIdCapabilityCreateRequest: Hashable, Codable { case bundleId } - public struct BundleId: Hashable, Codable { + public struct BundleId: Hashable, Codable, Sendable { public var data: Data public init(data: Data) { @@ -82,7 +82,7 @@ public struct BundleIdCapabilityCreateRequest: Hashable, Codable { case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -100,7 +100,7 @@ public struct BundleIdCapabilityCreateRequest: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case bundleIds } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/BundleIdCapabilityUpdateRequest.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/BundleIdCapabilityUpdateRequest.generated.swift index 04f7f5f2..dd3752ed 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/BundleIdCapabilityUpdateRequest.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/BundleIdCapabilityUpdateRequest.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct BundleIdCapabilityUpdateRequest: Hashable, Codable { +public struct BundleIdCapabilityUpdateRequest: Hashable, Codable, Sendable { public var data: Data public init(data: Data) { @@ -14,7 +14,7 @@ public struct BundleIdCapabilityUpdateRequest: Hashable, Codable { case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -37,11 +37,11 @@ public struct BundleIdCapabilityUpdateRequest: Hashable, Codable { case attributes } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case bundleIdCapabilities } - public struct Attributes: Hashable, Codable { + public struct Attributes: Hashable, Codable, Sendable { public var capabilityType: CapabilityType? public var settings: [CapabilitySetting]? diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/BundleIdCreateRequest.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/BundleIdCreateRequest.generated.swift index 9bcc59b1..4ab6a4aa 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/BundleIdCreateRequest.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/BundleIdCreateRequest.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct BundleIdCreateRequest: Hashable, Codable { +public struct BundleIdCreateRequest: Hashable, Codable, Sendable { public var data: Data public init(data: Data) { @@ -14,7 +14,7 @@ public struct BundleIdCreateRequest: Hashable, Codable { case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var type: `Type` public var attributes: Attributes @@ -32,11 +32,11 @@ public struct BundleIdCreateRequest: Hashable, Codable { case attributes } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case bundleIds } - public struct Attributes: Hashable, Codable { + public struct Attributes: Hashable, Codable, Sendable { public var identifier: String public var name: String diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/BundleIdUpdateRequest.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/BundleIdUpdateRequest.generated.swift index dd0cca81..d8a22f2d 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/BundleIdUpdateRequest.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/BundleIdUpdateRequest.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct BundleIdUpdateRequest: Hashable, Codable { +public struct BundleIdUpdateRequest: Hashable, Codable, Sendable { public var data: Data public init(data: Data) { @@ -14,7 +14,7 @@ public struct BundleIdUpdateRequest: Hashable, Codable { case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -37,11 +37,11 @@ public struct BundleIdUpdateRequest: Hashable, Codable { case attributes } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case bundleIds } - public struct Attributes: Hashable, Codable { + public struct Attributes: Hashable, Codable, Sendable { public var name: String? public init(name: String? = nil) { diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/CertificateCreateRequest.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/CertificateCreateRequest.generated.swift index 1de6b0d0..e40a7989 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/CertificateCreateRequest.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/CertificateCreateRequest.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct CertificateCreateRequest: Hashable, Codable { +public struct CertificateCreateRequest: Hashable, Codable, Sendable { public var data: Data public init(data: Data) { @@ -14,29 +14,34 @@ public struct CertificateCreateRequest: Hashable, Codable { case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var type: `Type` public var attributes: Attributes + public var relationships: Relationships? + public init( type: `Type`, - attributes: Attributes + attributes: Attributes, + relationships: Relationships? = nil ) { self.type = type self.attributes = attributes + self.relationships = relationships } private enum CodingKeys: String, CodingKey { case type case attributes + case relationships } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case certificates } - public struct Attributes: Hashable, Codable { + public struct Attributes: Hashable, Codable, Sendable { public var certificateType: CertificateType public var csrContent: String @@ -54,6 +59,95 @@ public struct CertificateCreateRequest: Hashable, Codable { case csrContent } } + + public struct Relationships: Hashable, Codable, Sendable { + public var merchantId: MerchantId? + + public var passTypeId: PassTypeId? + + public init( + merchantId: MerchantId? = nil, + passTypeId: PassTypeId? = nil + ) { + self.merchantId = merchantId + self.passTypeId = passTypeId + } + + private enum CodingKeys: String, CodingKey { + case merchantId + case passTypeId + } + + public struct MerchantId: Hashable, Codable, Sendable { + public var data: Data? + + public init(data: Data? = nil) { + self.data = data + } + + private enum CodingKeys: String, CodingKey { + case data + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case merchantIds + } + } + } + + public struct PassTypeId: Hashable, Codable, Sendable { + public var data: Data? + + public init(data: Data? = nil) { + self.data = data + } + + private enum CodingKeys: String, CodingKey { + case data + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case passTypeIds + } + } + } + } } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/CertificateUpdateRequest.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/CertificateUpdateRequest.generated.swift new file mode 100644 index 00000000..0fdb0069 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/CertificateUpdateRequest.generated.swift @@ -0,0 +1,58 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct CertificateUpdateRequest: Hashable, Codable, Sendable { + public var data: Data + + public init(data: Data) { + self.data = data + } + + private enum CodingKeys: String, CodingKey { + case data + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public var attributes: Attributes? + + public init( + id: String, + type: `Type`, + attributes: Attributes? = nil + ) { + self.id = id + self.type = type + self.attributes = attributes + } + + private enum CodingKeys: String, CodingKey { + case id + case type + case attributes + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case certificates + } + + public struct Attributes: Hashable, Codable, Sendable { + public var activated: Bool? + + public init(activated: Bool? = nil) { + self.activated = activated + } + + private enum CodingKeys: String, CodingKey { + case activated + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/CiBuildRunCreateRequest.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/CiBuildRunCreateRequest.generated.swift index c74ce0b6..52a1e557 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/CiBuildRunCreateRequest.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/CiBuildRunCreateRequest.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct CiBuildRunCreateRequest: Hashable, Codable { +public struct CiBuildRunCreateRequest: Hashable, Codable, Sendable { public var data: Data public init(data: Data) { @@ -14,7 +14,7 @@ public struct CiBuildRunCreateRequest: Hashable, Codable { case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var type: `Type` public var attributes: Attributes? @@ -37,11 +37,11 @@ public struct CiBuildRunCreateRequest: Hashable, Codable { case relationships } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case ciBuildRuns } - public struct Attributes: Hashable, Codable { + public struct Attributes: Hashable, Codable, Sendable { public var clean: Bool? public init(clean: Bool? = nil) { @@ -53,7 +53,7 @@ public struct CiBuildRunCreateRequest: Hashable, Codable { } } - public struct Relationships: Hashable, Codable { + public struct Relationships: Hashable, Codable, Sendable { public var buildRun: BuildRun? public var pullRequest: PullRequest? @@ -81,7 +81,7 @@ public struct CiBuildRunCreateRequest: Hashable, Codable { case workflow } - public struct BuildRun: Hashable, Codable { + public struct BuildRun: Hashable, Codable, Sendable { public var data: Data? public init(data: Data? = nil) { @@ -92,7 +92,7 @@ public struct CiBuildRunCreateRequest: Hashable, Codable { case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -110,13 +110,13 @@ public struct CiBuildRunCreateRequest: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case ciBuildRuns } } } - public struct PullRequest: Hashable, Codable { + public struct PullRequest: Hashable, Codable, Sendable { public var data: Data? public init(data: Data? = nil) { @@ -127,7 +127,7 @@ public struct CiBuildRunCreateRequest: Hashable, Codable { case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -145,13 +145,13 @@ public struct CiBuildRunCreateRequest: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case scmPullRequests } } } - public struct SourceBranchOrTag: Hashable, Codable { + public struct SourceBranchOrTag: Hashable, Codable, Sendable { public var data: Data? public init(data: Data? = nil) { @@ -162,7 +162,7 @@ public struct CiBuildRunCreateRequest: Hashable, Codable { case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -180,13 +180,13 @@ public struct CiBuildRunCreateRequest: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case scmGitReferences } } } - public struct Workflow: Hashable, Codable { + public struct Workflow: Hashable, Codable, Sendable { public var data: Data? public init(data: Data? = nil) { @@ -197,7 +197,7 @@ public struct CiBuildRunCreateRequest: Hashable, Codable { case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -215,7 +215,7 @@ public struct CiBuildRunCreateRequest: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case ciWorkflows } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/CiWorkflowCreateRequest.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/CiWorkflowCreateRequest.generated.swift index eb3fdb55..2a7c2914 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/CiWorkflowCreateRequest.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/CiWorkflowCreateRequest.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct CiWorkflowCreateRequest: Hashable, Codable { +public struct CiWorkflowCreateRequest: Hashable, Codable, Sendable { public var data: Data public init(data: Data) { @@ -14,7 +14,7 @@ public struct CiWorkflowCreateRequest: Hashable, Codable { case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var type: `Type` public var attributes: Attributes @@ -37,11 +37,11 @@ public struct CiWorkflowCreateRequest: Hashable, Codable { case relationships } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case ciWorkflows } - public struct Attributes: Hashable, Codable { + public struct Attributes: Hashable, Codable, Sendable { public var actions: [CiAction] public var branchStartCondition: CiBranchStartCondition? @@ -56,6 +56,12 @@ public struct CiWorkflowCreateRequest: Hashable, Codable { public var isLockedForEditing: Bool? + public var manualBranchStartCondition: CiManualBranchStartCondition? + + public var manualPullRequestStartCondition: CiManualPullRequestStartCondition? + + public var manualTagStartCondition: CiManualTagStartCondition? + public var name: String public var pullRequestStartCondition: CiPullRequestStartCondition? @@ -72,6 +78,9 @@ public struct CiWorkflowCreateRequest: Hashable, Codable { description: String, isEnabled: Bool, isLockedForEditing: Bool? = nil, + manualBranchStartCondition: CiManualBranchStartCondition? = nil, + manualPullRequestStartCondition: CiManualPullRequestStartCondition? = nil, + manualTagStartCondition: CiManualTagStartCondition? = nil, name: String, pullRequestStartCondition: CiPullRequestStartCondition? = nil, scheduledStartCondition: CiScheduledStartCondition? = nil, @@ -84,6 +93,9 @@ public struct CiWorkflowCreateRequest: Hashable, Codable { self.description = description self.isEnabled = isEnabled self.isLockedForEditing = isLockedForEditing + self.manualBranchStartCondition = manualBranchStartCondition + self.manualPullRequestStartCondition = manualPullRequestStartCondition + self.manualTagStartCondition = manualTagStartCondition self.name = name self.pullRequestStartCondition = pullRequestStartCondition self.scheduledStartCondition = scheduledStartCondition @@ -98,6 +110,9 @@ public struct CiWorkflowCreateRequest: Hashable, Codable { case description case isEnabled case isLockedForEditing + case manualBranchStartCondition + case manualPullRequestStartCondition + case manualTagStartCondition case name case pullRequestStartCondition case scheduledStartCondition @@ -105,7 +120,7 @@ public struct CiWorkflowCreateRequest: Hashable, Codable { } } - public struct Relationships: Hashable, Codable { + public struct Relationships: Hashable, Codable, Sendable { public var macOsVersion: MacOsVersion public var product: Product @@ -133,7 +148,7 @@ public struct CiWorkflowCreateRequest: Hashable, Codable { case xcodeVersion } - public struct MacOsVersion: Hashable, Codable { + public struct MacOsVersion: Hashable, Codable, Sendable { public var data: Data public init(data: Data) { @@ -144,7 +159,7 @@ public struct CiWorkflowCreateRequest: Hashable, Codable { case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -162,13 +177,13 @@ public struct CiWorkflowCreateRequest: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case ciMacOsVersions } } } - public struct Product: Hashable, Codable { + public struct Product: Hashable, Codable, Sendable { public var data: Data public init(data: Data) { @@ -179,7 +194,7 @@ public struct CiWorkflowCreateRequest: Hashable, Codable { case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -197,13 +212,13 @@ public struct CiWorkflowCreateRequest: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case ciProducts } } } - public struct Repository: Hashable, Codable { + public struct Repository: Hashable, Codable, Sendable { public var data: Data public init(data: Data) { @@ -214,7 +229,7 @@ public struct CiWorkflowCreateRequest: Hashable, Codable { case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -232,13 +247,13 @@ public struct CiWorkflowCreateRequest: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case scmRepositories } } } - public struct XcodeVersion: Hashable, Codable { + public struct XcodeVersion: Hashable, Codable, Sendable { public var data: Data public init(data: Data) { @@ -249,7 +264,7 @@ public struct CiWorkflowCreateRequest: Hashable, Codable { case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -267,7 +282,7 @@ public struct CiWorkflowCreateRequest: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case ciXcodeVersions } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/CiWorkflowUpdateRequest.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/CiWorkflowUpdateRequest.generated.swift index 7d62a404..0cb1bece 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/CiWorkflowUpdateRequest.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/CiWorkflowUpdateRequest.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct CiWorkflowUpdateRequest: Hashable, Codable { +public struct CiWorkflowUpdateRequest: Hashable, Codable, Sendable { public var data: Data public init(data: Data) { @@ -14,7 +14,7 @@ public struct CiWorkflowUpdateRequest: Hashable, Codable { case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -42,11 +42,11 @@ public struct CiWorkflowUpdateRequest: Hashable, Codable { case relationships } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case ciWorkflows } - public struct Attributes: Hashable, Codable { + public struct Attributes: Hashable, Codable, Sendable { public var actions: [CiAction]? public var branchStartCondition: CiBranchStartCondition? @@ -61,6 +61,12 @@ public struct CiWorkflowUpdateRequest: Hashable, Codable { public var isLockedForEditing: Bool? + public var manualBranchStartCondition: CiManualBranchStartCondition? + + public var manualPullRequestStartCondition: CiManualPullRequestStartCondition? + + public var manualTagStartCondition: CiManualTagStartCondition? + public var name: String? public var pullRequestStartCondition: CiPullRequestStartCondition? @@ -77,6 +83,9 @@ public struct CiWorkflowUpdateRequest: Hashable, Codable { description: String? = nil, isEnabled: Bool? = nil, isLockedForEditing: Bool? = nil, + manualBranchStartCondition: CiManualBranchStartCondition? = nil, + manualPullRequestStartCondition: CiManualPullRequestStartCondition? = nil, + manualTagStartCondition: CiManualTagStartCondition? = nil, name: String? = nil, pullRequestStartCondition: CiPullRequestStartCondition? = nil, scheduledStartCondition: CiScheduledStartCondition? = nil, @@ -89,6 +98,9 @@ public struct CiWorkflowUpdateRequest: Hashable, Codable { self.description = description self.isEnabled = isEnabled self.isLockedForEditing = isLockedForEditing + self.manualBranchStartCondition = manualBranchStartCondition + self.manualPullRequestStartCondition = manualPullRequestStartCondition + self.manualTagStartCondition = manualTagStartCondition self.name = name self.pullRequestStartCondition = pullRequestStartCondition self.scheduledStartCondition = scheduledStartCondition @@ -103,6 +115,9 @@ public struct CiWorkflowUpdateRequest: Hashable, Codable { case description case isEnabled case isLockedForEditing + case manualBranchStartCondition + case manualPullRequestStartCondition + case manualTagStartCondition case name case pullRequestStartCondition case scheduledStartCondition @@ -110,7 +125,7 @@ public struct CiWorkflowUpdateRequest: Hashable, Codable { } } - public struct Relationships: Hashable, Codable { + public struct Relationships: Hashable, Codable, Sendable { public var macOsVersion: MacOsVersion? public var xcodeVersion: XcodeVersion? @@ -128,7 +143,7 @@ public struct CiWorkflowUpdateRequest: Hashable, Codable { case xcodeVersion } - public struct MacOsVersion: Hashable, Codable { + public struct MacOsVersion: Hashable, Codable, Sendable { public var data: Data? public init(data: Data? = nil) { @@ -139,7 +154,7 @@ public struct CiWorkflowUpdateRequest: Hashable, Codable { case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -157,13 +172,13 @@ public struct CiWorkflowUpdateRequest: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case ciMacOsVersions } } } - public struct XcodeVersion: Hashable, Codable { + public struct XcodeVersion: Hashable, Codable, Sendable { public var data: Data? public init(data: Data? = nil) { @@ -174,7 +189,7 @@ public struct CiWorkflowUpdateRequest: Hashable, Codable { case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -192,7 +207,7 @@ public struct CiWorkflowUpdateRequest: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case ciXcodeVersions } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/CustomerReviewResponseV1CreateRequest.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/CustomerReviewResponseV1CreateRequest.generated.swift index 5ba19778..809921aa 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/CustomerReviewResponseV1CreateRequest.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/CustomerReviewResponseV1CreateRequest.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct CustomerReviewResponseV1CreateRequest: Hashable, Codable { +public struct CustomerReviewResponseV1CreateRequest: Hashable, Codable, Sendable { public var data: Data public init(data: Data) { @@ -14,7 +14,7 @@ public struct CustomerReviewResponseV1CreateRequest: Hashable, Codable { case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var type: `Type` public var attributes: Attributes @@ -37,11 +37,11 @@ public struct CustomerReviewResponseV1CreateRequest: Hashable, Codable { case relationships } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case customerReviewResponses } - public struct Attributes: Hashable, Codable { + public struct Attributes: Hashable, Codable, Sendable { public var responseBody: String public init(responseBody: String) { @@ -53,7 +53,7 @@ public struct CustomerReviewResponseV1CreateRequest: Hashable, Codable { } } - public struct Relationships: Hashable, Codable { + public struct Relationships: Hashable, Codable, Sendable { public var review: Review public init(review: Review) { @@ -64,7 +64,7 @@ public struct CustomerReviewResponseV1CreateRequest: Hashable, Codable { case review } - public struct Review: Hashable, Codable { + public struct Review: Hashable, Codable, Sendable { public var data: Data public init(data: Data) { @@ -75,7 +75,7 @@ public struct CustomerReviewResponseV1CreateRequest: Hashable, Codable { case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -93,7 +93,7 @@ public struct CustomerReviewResponseV1CreateRequest: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case customerReviews } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/DeviceCreateRequest.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/DeviceCreateRequest.generated.swift index c903bbd7..6f5236f6 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/DeviceCreateRequest.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/DeviceCreateRequest.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct DeviceCreateRequest: Hashable, Codable { +public struct DeviceCreateRequest: Hashable, Codable, Sendable { public var data: Data public init(data: Data) { @@ -14,7 +14,7 @@ public struct DeviceCreateRequest: Hashable, Codable { case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var type: `Type` public var attributes: Attributes @@ -32,11 +32,11 @@ public struct DeviceCreateRequest: Hashable, Codable { case attributes } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case devices } - public struct Attributes: Hashable, Codable { + public struct Attributes: Hashable, Codable, Sendable { public var name: String public var platform: BundleIdPlatform diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/DeviceUpdateRequest.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/DeviceUpdateRequest.generated.swift index 0fe913df..3a957e90 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/DeviceUpdateRequest.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/DeviceUpdateRequest.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct DeviceUpdateRequest: Hashable, Codable { +public struct DeviceUpdateRequest: Hashable, Codable, Sendable { public var data: Data public init(data: Data) { @@ -14,7 +14,7 @@ public struct DeviceUpdateRequest: Hashable, Codable { case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -37,11 +37,11 @@ public struct DeviceUpdateRequest: Hashable, Codable { case attributes } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case devices } - public struct Attributes: Hashable, Codable { + public struct Attributes: Hashable, Codable, Sendable { public var name: String? public var status: Status? @@ -59,25 +59,23 @@ public struct DeviceUpdateRequest: Hashable, Codable { case status } - public enum Status: Hashable, Codable, RawRepresentable { - case disabled - case enabled - case unknown(String) - - public var rawValue: String { - switch self { - case .disabled: return "DISABLED" - case .enabled: return "ENABLED" - case .unknown(let rawValue): return rawValue - } + public struct Status: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var disabled: Self { + .init(rawValue: "DISABLED") } + public static var enabled: Self { + .init(rawValue: "ENABLED") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "DISABLED": self = .disabled - case "ENABLED": self = .enabled - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/EndAppAvailabilityPreOrderCreateRequest.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/EndAppAvailabilityPreOrderCreateRequest.generated.swift index a814b9af..24ea0beb 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/EndAppAvailabilityPreOrderCreateRequest.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/EndAppAvailabilityPreOrderCreateRequest.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct EndAppAvailabilityPreOrderCreateRequest: Hashable, Codable { +public struct EndAppAvailabilityPreOrderCreateRequest: Hashable, Codable, Sendable { public var data: Data public init(data: Data) { @@ -14,7 +14,7 @@ public struct EndAppAvailabilityPreOrderCreateRequest: Hashable, Codable { case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var type: `Type` public var relationships: Relationships @@ -32,11 +32,11 @@ public struct EndAppAvailabilityPreOrderCreateRequest: Hashable, Codable { case relationships } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case endAppAvailabilityPreOrders } - public struct Relationships: Hashable, Codable { + public struct Relationships: Hashable, Codable, Sendable { public var territoryAvailabilities: TerritoryAvailabilities public init(territoryAvailabilities: TerritoryAvailabilities) { @@ -47,7 +47,7 @@ public struct EndAppAvailabilityPreOrderCreateRequest: Hashable, Codable { case territoryAvailabilities } - public struct TerritoryAvailabilities: Hashable, Codable { + public struct TerritoryAvailabilities: Hashable, Codable, Sendable { public var data: [Data] public init(data: [Data]) { @@ -58,7 +58,7 @@ public struct EndAppAvailabilityPreOrderCreateRequest: Hashable, Codable { case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -76,7 +76,7 @@ public struct EndAppAvailabilityPreOrderCreateRequest: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case territoryAvailabilities } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/EndUserLicenseAgreementCreateRequest.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/EndUserLicenseAgreementCreateRequest.generated.swift index 2a1b4d7a..990dff0f 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/EndUserLicenseAgreementCreateRequest.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/EndUserLicenseAgreementCreateRequest.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct EndUserLicenseAgreementCreateRequest: Hashable, Codable { +public struct EndUserLicenseAgreementCreateRequest: Hashable, Codable, Sendable { public var data: Data public init(data: Data) { @@ -14,7 +14,7 @@ public struct EndUserLicenseAgreementCreateRequest: Hashable, Codable { case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var type: `Type` public var attributes: Attributes @@ -37,11 +37,11 @@ public struct EndUserLicenseAgreementCreateRequest: Hashable, Codable { case relationships } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case endUserLicenseAgreements } - public struct Attributes: Hashable, Codable { + public struct Attributes: Hashable, Codable, Sendable { public var agreementText: String public init(agreementText: String) { @@ -53,7 +53,7 @@ public struct EndUserLicenseAgreementCreateRequest: Hashable, Codable { } } - public struct Relationships: Hashable, Codable { + public struct Relationships: Hashable, Codable, Sendable { public var app: App public var territories: Territories @@ -71,7 +71,7 @@ public struct EndUserLicenseAgreementCreateRequest: Hashable, Codable { case territories } - public struct App: Hashable, Codable { + public struct App: Hashable, Codable, Sendable { public var data: Data public init(data: Data) { @@ -82,7 +82,7 @@ public struct EndUserLicenseAgreementCreateRequest: Hashable, Codable { case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -100,13 +100,13 @@ public struct EndUserLicenseAgreementCreateRequest: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case apps } } } - public struct Territories: Hashable, Codable { + public struct Territories: Hashable, Codable, Sendable { public var data: [Data] public init(data: [Data]) { @@ -117,7 +117,7 @@ public struct EndUserLicenseAgreementCreateRequest: Hashable, Codable { case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -135,7 +135,7 @@ public struct EndUserLicenseAgreementCreateRequest: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case territories } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/EndUserLicenseAgreementUpdateRequest.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/EndUserLicenseAgreementUpdateRequest.generated.swift index ca9ccbf6..dbf4dd6f 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/EndUserLicenseAgreementUpdateRequest.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/EndUserLicenseAgreementUpdateRequest.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct EndUserLicenseAgreementUpdateRequest: Hashable, Codable { +public struct EndUserLicenseAgreementUpdateRequest: Hashable, Codable, Sendable { public var data: Data public init(data: Data) { @@ -14,7 +14,7 @@ public struct EndUserLicenseAgreementUpdateRequest: Hashable, Codable { case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -42,11 +42,11 @@ public struct EndUserLicenseAgreementUpdateRequest: Hashable, Codable { case relationships } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case endUserLicenseAgreements } - public struct Attributes: Hashable, Codable { + public struct Attributes: Hashable, Codable, Sendable { public var agreementText: String? public init(agreementText: String? = nil) { @@ -58,7 +58,7 @@ public struct EndUserLicenseAgreementUpdateRequest: Hashable, Codable { } } - public struct Relationships: Hashable, Codable { + public struct Relationships: Hashable, Codable, Sendable { public var territories: Territories? public init(territories: Territories? = nil) { @@ -69,7 +69,7 @@ public struct EndUserLicenseAgreementUpdateRequest: Hashable, Codable { case territories } - public struct Territories: Hashable, Codable { + public struct Territories: Hashable, Codable, Sendable { public var data: [Data]? public init(data: [Data]? = nil) { @@ -80,7 +80,7 @@ public struct EndUserLicenseAgreementUpdateRequest: Hashable, Codable { case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -98,7 +98,7 @@ public struct EndUserLicenseAgreementUpdateRequest: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case territories } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterAchievementActivityLinkageRequest.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterAchievementActivityLinkageRequest.generated.swift new file mode 100644 index 00000000..0c30cdcd --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterAchievementActivityLinkageRequest.generated.swift @@ -0,0 +1,41 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct GameCenterAchievementActivityLinkageRequest: Hashable, Codable, Sendable { + public var data: Data + + public init(data: Data) { + self.data = data + } + + private enum CodingKeys: String, CodingKey { + case data + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case gameCenterActivities + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterAchievementCreateRequest.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterAchievementCreateRequest.generated.swift index 46cee03e..a43be368 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterAchievementCreateRequest.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterAchievementCreateRequest.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct GameCenterAchievementCreateRequest: Hashable, Codable { +public struct GameCenterAchievementCreateRequest: Hashable, Codable, Sendable { public var data: Data public init(data: Data) { @@ -14,7 +14,7 @@ public struct GameCenterAchievementCreateRequest: Hashable, Codable { case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var type: `Type` public var attributes: Attributes @@ -37,11 +37,13 @@ public struct GameCenterAchievementCreateRequest: Hashable, Codable { case relationships } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case gameCenterAchievements } - public struct Attributes: Hashable, Codable { + public struct Attributes: Hashable, Codable, Sendable { + public var activityProperties: [String: String]? + public var points: Int public var referenceName: String @@ -53,12 +55,14 @@ public struct GameCenterAchievementCreateRequest: Hashable, Codable { public var vendorIdentifier: String public init( + activityProperties: [String: String]? = nil, points: Int, referenceName: String, repeatable: Bool, showBeforeEarned: Bool, vendorIdentifier: String ) { + self.activityProperties = activityProperties self.points = points self.referenceName = referenceName self.repeatable = repeatable @@ -67,6 +71,7 @@ public struct GameCenterAchievementCreateRequest: Hashable, Codable { } private enum CodingKeys: String, CodingKey { + case activityProperties case points case referenceName case repeatable @@ -75,7 +80,7 @@ public struct GameCenterAchievementCreateRequest: Hashable, Codable { } } - public struct Relationships: Hashable, Codable { + public struct Relationships: Hashable, Codable, Sendable { public var gameCenterDetail: GameCenterDetail? public var gameCenterGroup: GameCenterGroup? @@ -93,7 +98,7 @@ public struct GameCenterAchievementCreateRequest: Hashable, Codable { case gameCenterGroup } - public struct GameCenterDetail: Hashable, Codable { + public struct GameCenterDetail: Hashable, Codable, Sendable { public var data: Data? public init(data: Data? = nil) { @@ -104,7 +109,7 @@ public struct GameCenterAchievementCreateRequest: Hashable, Codable { case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -122,13 +127,13 @@ public struct GameCenterAchievementCreateRequest: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case gameCenterDetails } } } - public struct GameCenterGroup: Hashable, Codable { + public struct GameCenterGroup: Hashable, Codable, Sendable { public var data: Data? public init(data: Data? = nil) { @@ -139,7 +144,7 @@ public struct GameCenterAchievementCreateRequest: Hashable, Codable { case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -157,7 +162,7 @@ public struct GameCenterAchievementCreateRequest: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case gameCenterGroups } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterAchievementGroupAchievementLinkageRequest.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterAchievementGroupAchievementLinkageRequest.generated.swift index fa4bc570..66b4244c 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterAchievementGroupAchievementLinkageRequest.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterAchievementGroupAchievementLinkageRequest.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct GameCenterAchievementGroupAchievementLinkageRequest: Hashable, Codable { +public struct GameCenterAchievementGroupAchievementLinkageRequest: Hashable, Codable, Sendable { public var data: Data public init(data: Data) { @@ -14,7 +14,7 @@ public struct GameCenterAchievementGroupAchievementLinkageRequest: Hashable, Cod case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -32,7 +32,7 @@ public struct GameCenterAchievementGroupAchievementLinkageRequest: Hashable, Cod case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case gameCenterAchievements } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterAchievementImageCreateRequest.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterAchievementImageCreateRequest.generated.swift index afada5a8..2e773bb9 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterAchievementImageCreateRequest.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterAchievementImageCreateRequest.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct GameCenterAchievementImageCreateRequest: Hashable, Codable { +public struct GameCenterAchievementImageCreateRequest: Hashable, Codable, Sendable { public var data: Data public init(data: Data) { @@ -14,7 +14,7 @@ public struct GameCenterAchievementImageCreateRequest: Hashable, Codable { case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var type: `Type` public var attributes: Attributes @@ -37,11 +37,11 @@ public struct GameCenterAchievementImageCreateRequest: Hashable, Codable { case relationships } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case gameCenterAchievementImages } - public struct Attributes: Hashable, Codable { + public struct Attributes: Hashable, Codable, Sendable { public var fileName: String public var fileSize: Int @@ -60,7 +60,7 @@ public struct GameCenterAchievementImageCreateRequest: Hashable, Codable { } } - public struct Relationships: Hashable, Codable { + public struct Relationships: Hashable, Codable, Sendable { public var gameCenterAchievementLocalization: GameCenterAchievementLocalization public init(gameCenterAchievementLocalization: GameCenterAchievementLocalization) { @@ -71,7 +71,7 @@ public struct GameCenterAchievementImageCreateRequest: Hashable, Codable { case gameCenterAchievementLocalization } - public struct GameCenterAchievementLocalization: Hashable, Codable { + public struct GameCenterAchievementLocalization: Hashable, Codable, Sendable { public var data: Data public init(data: Data) { @@ -82,7 +82,7 @@ public struct GameCenterAchievementImageCreateRequest: Hashable, Codable { case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -100,7 +100,7 @@ public struct GameCenterAchievementImageCreateRequest: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case gameCenterAchievementLocalizations } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterAchievementImageUpdateRequest.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterAchievementImageUpdateRequest.generated.swift index ccb3aa9b..babfbc3d 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterAchievementImageUpdateRequest.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterAchievementImageUpdateRequest.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct GameCenterAchievementImageUpdateRequest: Hashable, Codable { +public struct GameCenterAchievementImageUpdateRequest: Hashable, Codable, Sendable { public var data: Data public init(data: Data) { @@ -14,7 +14,7 @@ public struct GameCenterAchievementImageUpdateRequest: Hashable, Codable { case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -37,11 +37,11 @@ public struct GameCenterAchievementImageUpdateRequest: Hashable, Codable { case attributes } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case gameCenterAchievementImages } - public struct Attributes: Hashable, Codable { + public struct Attributes: Hashable, Codable, Sendable { public var uploaded: Bool? public init(uploaded: Bool? = nil) { diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterAchievementLocalizationCreateRequest.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterAchievementLocalizationCreateRequest.generated.swift index aefe6365..bd1f5d66 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterAchievementLocalizationCreateRequest.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterAchievementLocalizationCreateRequest.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct GameCenterAchievementLocalizationCreateRequest: Hashable, Codable { +public struct GameCenterAchievementLocalizationCreateRequest: Hashable, Codable, Sendable { public var data: Data public init(data: Data) { @@ -14,7 +14,7 @@ public struct GameCenterAchievementLocalizationCreateRequest: Hashable, Codable case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var type: `Type` public var attributes: Attributes @@ -37,11 +37,11 @@ public struct GameCenterAchievementLocalizationCreateRequest: Hashable, Codable case relationships } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case gameCenterAchievementLocalizations } - public struct Attributes: Hashable, Codable { + public struct Attributes: Hashable, Codable, Sendable { public var afterEarnedDescription: String public var beforeEarnedDescription: String @@ -70,7 +70,7 @@ public struct GameCenterAchievementLocalizationCreateRequest: Hashable, Codable } } - public struct Relationships: Hashable, Codable { + public struct Relationships: Hashable, Codable, Sendable { public var gameCenterAchievement: GameCenterAchievement public init(gameCenterAchievement: GameCenterAchievement) { @@ -81,7 +81,7 @@ public struct GameCenterAchievementLocalizationCreateRequest: Hashable, Codable case gameCenterAchievement } - public struct GameCenterAchievement: Hashable, Codable { + public struct GameCenterAchievement: Hashable, Codable, Sendable { public var data: Data public init(data: Data) { @@ -92,7 +92,7 @@ public struct GameCenterAchievementLocalizationCreateRequest: Hashable, Codable case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -110,7 +110,7 @@ public struct GameCenterAchievementLocalizationCreateRequest: Hashable, Codable case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case gameCenterAchievements } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterAchievementLocalizationUpdateRequest.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterAchievementLocalizationUpdateRequest.generated.swift index 3c7d6623..138b06c2 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterAchievementLocalizationUpdateRequest.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterAchievementLocalizationUpdateRequest.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct GameCenterAchievementLocalizationUpdateRequest: Hashable, Codable { +public struct GameCenterAchievementLocalizationUpdateRequest: Hashable, Codable, Sendable { public var data: Data public init(data: Data) { @@ -14,7 +14,7 @@ public struct GameCenterAchievementLocalizationUpdateRequest: Hashable, Codable case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -37,11 +37,11 @@ public struct GameCenterAchievementLocalizationUpdateRequest: Hashable, Codable case attributes } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case gameCenterAchievementLocalizations } - public struct Attributes: Hashable, Codable { + public struct Attributes: Hashable, Codable, Sendable { public var afterEarnedDescription: String? public var beforeEarnedDescription: String? diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterAchievementReleaseCreateRequest.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterAchievementReleaseCreateRequest.generated.swift index 171a1156..073cf9cd 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterAchievementReleaseCreateRequest.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterAchievementReleaseCreateRequest.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct GameCenterAchievementReleaseCreateRequest: Hashable, Codable { +public struct GameCenterAchievementReleaseCreateRequest: Hashable, Codable, Sendable { public var data: Data public init(data: Data) { @@ -14,7 +14,7 @@ public struct GameCenterAchievementReleaseCreateRequest: Hashable, Codable { case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var type: `Type` public var relationships: Relationships @@ -32,11 +32,11 @@ public struct GameCenterAchievementReleaseCreateRequest: Hashable, Codable { case relationships } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case gameCenterAchievementReleases } - public struct Relationships: Hashable, Codable { + public struct Relationships: Hashable, Codable, Sendable { public var gameCenterAchievement: GameCenterAchievement public var gameCenterDetail: GameCenterDetail @@ -54,7 +54,7 @@ public struct GameCenterAchievementReleaseCreateRequest: Hashable, Codable { case gameCenterDetail } - public struct GameCenterAchievement: Hashable, Codable { + public struct GameCenterAchievement: Hashable, Codable, Sendable { public var data: Data public init(data: Data) { @@ -65,7 +65,7 @@ public struct GameCenterAchievementReleaseCreateRequest: Hashable, Codable { case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -83,13 +83,13 @@ public struct GameCenterAchievementReleaseCreateRequest: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case gameCenterAchievements } } } - public struct GameCenterDetail: Hashable, Codable { + public struct GameCenterDetail: Hashable, Codable, Sendable { public var data: Data public init(data: Data) { @@ -100,7 +100,7 @@ public struct GameCenterAchievementReleaseCreateRequest: Hashable, Codable { case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -118,7 +118,7 @@ public struct GameCenterAchievementReleaseCreateRequest: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case gameCenterDetails } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterAchievementUpdateRequest.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterAchievementUpdateRequest.generated.swift index 28036b6e..df8f1655 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterAchievementUpdateRequest.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterAchievementUpdateRequest.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct GameCenterAchievementUpdateRequest: Hashable, Codable { +public struct GameCenterAchievementUpdateRequest: Hashable, Codable, Sendable { public var data: Data public init(data: Data) { @@ -14,7 +14,7 @@ public struct GameCenterAchievementUpdateRequest: Hashable, Codable { case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -37,11 +37,13 @@ public struct GameCenterAchievementUpdateRequest: Hashable, Codable { case attributes } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case gameCenterAchievements } - public struct Attributes: Hashable, Codable { + public struct Attributes: Hashable, Codable, Sendable { + public var activityProperties: [String: String]? + public var archived: Bool? public var points: Int? @@ -53,12 +55,14 @@ public struct GameCenterAchievementUpdateRequest: Hashable, Codable { public var showBeforeEarned: Bool? public init( + activityProperties: [String: String]? = nil, archived: Bool? = nil, points: Int? = nil, referenceName: String? = nil, repeatable: Bool? = nil, showBeforeEarned: Bool? = nil ) { + self.activityProperties = activityProperties self.archived = archived self.points = points self.referenceName = referenceName @@ -67,6 +71,7 @@ public struct GameCenterAchievementUpdateRequest: Hashable, Codable { } private enum CodingKeys: String, CodingKey { + case activityProperties case archived case points case referenceName diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterActivityAchievementsLinkagesRequest.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterActivityAchievementsLinkagesRequest.generated.swift new file mode 100644 index 00000000..c58cb861 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterActivityAchievementsLinkagesRequest.generated.swift @@ -0,0 +1,41 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct GameCenterActivityAchievementsLinkagesRequest: Hashable, Codable, Sendable { + public var data: [Data] + + public init(data: [Data]) { + self.data = data + } + + private enum CodingKeys: String, CodingKey { + case data + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case gameCenterAchievements + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterActivityCreateRequest.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterActivityCreateRequest.generated.swift new file mode 100644 index 00000000..ee6b1f27 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterActivityCreateRequest.generated.swift @@ -0,0 +1,199 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct GameCenterActivityCreateRequest: Hashable, Codable, Sendable { + public var data: Data + + public init(data: Data) { + self.data = data + } + + private enum CodingKeys: String, CodingKey { + case data + } + + public struct Data: Hashable, Codable, Sendable { + public var type: `Type` + + public var attributes: Attributes + + public var relationships: Relationships? + + public init( + type: `Type`, + attributes: Attributes, + relationships: Relationships? = nil + ) { + self.type = type + self.attributes = attributes + self.relationships = relationships + } + + private enum CodingKeys: String, CodingKey { + case type + case attributes + case relationships + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case gameCenterActivities + } + + public struct Attributes: Hashable, Codable, Sendable { + public var maximumPlayersCount: Int? + + public var minimumPlayersCount: Int? + + public var playStyle: PlayStyle? + + public var properties: [String: String]? + + public var referenceName: String + + public var supportsPartyCode: Bool? + + public var vendorIdentifier: String + + public init( + maximumPlayersCount: Int? = nil, + minimumPlayersCount: Int? = nil, + playStyle: PlayStyle? = nil, + properties: [String: String]? = nil, + referenceName: String, + supportsPartyCode: Bool? = nil, + vendorIdentifier: String + ) { + self.maximumPlayersCount = maximumPlayersCount + self.minimumPlayersCount = minimumPlayersCount + self.playStyle = playStyle + self.properties = properties + self.referenceName = referenceName + self.supportsPartyCode = supportsPartyCode + self.vendorIdentifier = vendorIdentifier + } + + private enum CodingKeys: String, CodingKey { + case maximumPlayersCount + case minimumPlayersCount + case playStyle + case properties + case referenceName + case supportsPartyCode + case vendorIdentifier + } + + public struct PlayStyle: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var asynchronous: Self { + .init(rawValue: "ASYNCHRONOUS") + } + + public static var synchronous: Self { + .init(rawValue: "SYNCHRONOUS") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + } + + public struct Relationships: Hashable, Codable, Sendable { + public var gameCenterDetail: GameCenterDetail? + + public var gameCenterGroup: GameCenterGroup? + + public init( + gameCenterDetail: GameCenterDetail? = nil, + gameCenterGroup: GameCenterGroup? = nil + ) { + self.gameCenterDetail = gameCenterDetail + self.gameCenterGroup = gameCenterGroup + } + + private enum CodingKeys: String, CodingKey { + case gameCenterDetail + case gameCenterGroup + } + + public struct GameCenterDetail: Hashable, Codable, Sendable { + public var data: Data? + + public init(data: Data? = nil) { + self.data = data + } + + private enum CodingKeys: String, CodingKey { + case data + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case gameCenterDetails + } + } + } + + public struct GameCenterGroup: Hashable, Codable, Sendable { + public var data: Data? + + public init(data: Data? = nil) { + self.data = data + } + + private enum CodingKeys: String, CodingKey { + case data + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case gameCenterGroups + } + } + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterActivityImageCreateRequest.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterActivityImageCreateRequest.generated.swift new file mode 100644 index 00000000..00501795 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterActivityImageCreateRequest.generated.swift @@ -0,0 +1,154 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct GameCenterActivityImageCreateRequest: Hashable, Codable, Sendable { + public var data: Data + + public init(data: Data) { + self.data = data + } + + private enum CodingKeys: String, CodingKey { + case data + } + + public struct Data: Hashable, Codable, Sendable { + public var type: `Type` + + public var attributes: Attributes + + public var relationships: Relationships? + + public init( + type: `Type`, + attributes: Attributes, + relationships: Relationships? = nil + ) { + self.type = type + self.attributes = attributes + self.relationships = relationships + } + + private enum CodingKeys: String, CodingKey { + case type + case attributes + case relationships + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case gameCenterActivityImages + } + + public struct Attributes: Hashable, Codable, Sendable { + public var fileName: String + + public var fileSize: Int + + public init( + fileName: String, + fileSize: Int + ) { + self.fileName = fileName + self.fileSize = fileSize + } + + private enum CodingKeys: String, CodingKey { + case fileName + case fileSize + } + } + + public struct Relationships: Hashable, Codable, Sendable { + public var localization: Localization? + + public var version: Version? + + public init( + localization: Localization? = nil, + version: Version? = nil + ) { + self.localization = localization + self.version = version + } + + private enum CodingKeys: String, CodingKey { + case localization + case version + } + + public struct Localization: Hashable, Codable, Sendable { + public var data: Data? + + public init(data: Data? = nil) { + self.data = data + } + + private enum CodingKeys: String, CodingKey { + case data + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case gameCenterActivityLocalizations + } + } + } + + public struct Version: Hashable, Codable, Sendable { + public var data: Data? + + public init(data: Data? = nil) { + self.data = data + } + + private enum CodingKeys: String, CodingKey { + case data + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case gameCenterActivityVersions + } + } + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterActivityImageUpdateRequest.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterActivityImageUpdateRequest.generated.swift new file mode 100644 index 00000000..d2b80706 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterActivityImageUpdateRequest.generated.swift @@ -0,0 +1,58 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct GameCenterActivityImageUpdateRequest: Hashable, Codable, Sendable { + public var data: Data + + public init(data: Data) { + self.data = data + } + + private enum CodingKeys: String, CodingKey { + case data + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public var attributes: Attributes? + + public init( + id: String, + type: `Type`, + attributes: Attributes? = nil + ) { + self.id = id + self.type = type + self.attributes = attributes + } + + private enum CodingKeys: String, CodingKey { + case id + case type + case attributes + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case gameCenterActivityImages + } + + public struct Attributes: Hashable, Codable, Sendable { + public var uploaded: Bool? + + public init(uploaded: Bool? = nil) { + self.uploaded = uploaded + } + + private enum CodingKeys: String, CodingKey { + case uploaded + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterActivityLeaderboardsLinkagesRequest.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterActivityLeaderboardsLinkagesRequest.generated.swift new file mode 100644 index 00000000..fdd5927f --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterActivityLeaderboardsLinkagesRequest.generated.swift @@ -0,0 +1,41 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct GameCenterActivityLeaderboardsLinkagesRequest: Hashable, Codable, Sendable { + public var data: [Data] + + public init(data: [Data]) { + self.data = data + } + + private enum CodingKeys: String, CodingKey { + case data + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case gameCenterLeaderboards + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterActivityLocalizationCreateRequest.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterActivityLocalizationCreateRequest.generated.swift new file mode 100644 index 00000000..f5670dcb --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterActivityLocalizationCreateRequest.generated.swift @@ -0,0 +1,117 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct GameCenterActivityLocalizationCreateRequest: Hashable, Codable, Sendable { + public var data: Data + + public init(data: Data) { + self.data = data + } + + private enum CodingKeys: String, CodingKey { + case data + } + + public struct Data: Hashable, Codable, Sendable { + public var type: `Type` + + public var attributes: Attributes + + public var relationships: Relationships + + public init( + type: `Type`, + attributes: Attributes, + relationships: Relationships + ) { + self.type = type + self.attributes = attributes + self.relationships = relationships + } + + private enum CodingKeys: String, CodingKey { + case type + case attributes + case relationships + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case gameCenterActivityLocalizations + } + + public struct Attributes: Hashable, Codable, Sendable { + public var description: String? + + public var locale: String + + public var name: String + + public init( + description: String? = nil, + locale: String, + name: String + ) { + self.description = description + self.locale = locale + self.name = name + } + + private enum CodingKeys: String, CodingKey { + case description + case locale + case name + } + } + + public struct Relationships: Hashable, Codable, Sendable { + public var version: Version + + public init(version: Version) { + self.version = version + } + + private enum CodingKeys: String, CodingKey { + case version + } + + public struct Version: Hashable, Codable, Sendable { + public var data: Data + + public init(data: Data) { + self.data = data + } + + private enum CodingKeys: String, CodingKey { + case data + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case gameCenterActivityVersions + } + } + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterActivityLocalizationUpdateRequest.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterActivityLocalizationUpdateRequest.generated.swift new file mode 100644 index 00000000..2b9a762e --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterActivityLocalizationUpdateRequest.generated.swift @@ -0,0 +1,65 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct GameCenterActivityLocalizationUpdateRequest: Hashable, Codable, Sendable { + public var data: Data + + public init(data: Data) { + self.data = data + } + + private enum CodingKeys: String, CodingKey { + case data + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public var attributes: Attributes? + + public init( + id: String, + type: `Type`, + attributes: Attributes? = nil + ) { + self.id = id + self.type = type + self.attributes = attributes + } + + private enum CodingKeys: String, CodingKey { + case id + case type + case attributes + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case gameCenterActivityLocalizations + } + + public struct Attributes: Hashable, Codable, Sendable { + public var description: String? + + public var name: String? + + public init( + description: String? = nil, + name: String? = nil + ) { + self.description = description + self.name = name + } + + private enum CodingKeys: String, CodingKey { + case description + case name + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterActivityUpdateRequest.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterActivityUpdateRequest.generated.swift new file mode 100644 index 00000000..8b895ce1 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterActivityUpdateRequest.generated.swift @@ -0,0 +1,110 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct GameCenterActivityUpdateRequest: Hashable, Codable, Sendable { + public var data: Data + + public init(data: Data) { + self.data = data + } + + private enum CodingKeys: String, CodingKey { + case data + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public var attributes: Attributes? + + public init( + id: String, + type: `Type`, + attributes: Attributes? = nil + ) { + self.id = id + self.type = type + self.attributes = attributes + } + + private enum CodingKeys: String, CodingKey { + case id + case type + case attributes + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case gameCenterActivities + } + + public struct Attributes: Hashable, Codable, Sendable { + public var archived: Bool? + + public var maximumPlayersCount: Int? + + public var minimumPlayersCount: Int? + + public var playStyle: PlayStyle? + + public var properties: [String: String]? + + public var referenceName: String? + + public var supportsPartyCode: Bool? + + public init( + archived: Bool? = nil, + maximumPlayersCount: Int? = nil, + minimumPlayersCount: Int? = nil, + playStyle: PlayStyle? = nil, + properties: [String: String]? = nil, + referenceName: String? = nil, + supportsPartyCode: Bool? = nil + ) { + self.archived = archived + self.maximumPlayersCount = maximumPlayersCount + self.minimumPlayersCount = minimumPlayersCount + self.playStyle = playStyle + self.properties = properties + self.referenceName = referenceName + self.supportsPartyCode = supportsPartyCode + } + + private enum CodingKeys: String, CodingKey { + case archived + case maximumPlayersCount + case minimumPlayersCount + case playStyle + case properties + case referenceName + case supportsPartyCode + } + + public struct PlayStyle: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var asynchronous: Self { + .init(rawValue: "ASYNCHRONOUS") + } + + public static var synchronous: Self { + .init(rawValue: "SYNCHRONOUS") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterActivityVersionCreateRequest.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterActivityVersionCreateRequest.generated.swift new file mode 100644 index 00000000..a66f6627 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterActivityVersionCreateRequest.generated.swift @@ -0,0 +1,105 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct GameCenterActivityVersionCreateRequest: Hashable, Codable, Sendable { + public var data: Data + + public init(data: Data) { + self.data = data + } + + private enum CodingKeys: String, CodingKey { + case data + } + + public struct Data: Hashable, Codable, Sendable { + public var type: `Type` + + public var attributes: Attributes? + + public var relationships: Relationships + + public init( + type: `Type`, + attributes: Attributes? = nil, + relationships: Relationships + ) { + self.type = type + self.attributes = attributes + self.relationships = relationships + } + + private enum CodingKeys: String, CodingKey { + case type + case attributes + case relationships + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case gameCenterActivityVersions + } + + public struct Attributes: Hashable, Codable, Sendable { + public var fallbackUrl: String? + + public init(fallbackUrl: String? = nil) { + self.fallbackUrl = fallbackUrl + } + + private enum CodingKeys: String, CodingKey { + case fallbackUrl + } + } + + public struct Relationships: Hashable, Codable, Sendable { + public var activity: Activity + + public init(activity: Activity) { + self.activity = activity + } + + private enum CodingKeys: String, CodingKey { + case activity + } + + public struct Activity: Hashable, Codable, Sendable { + public var data: Data + + public init(data: Data) { + self.data = data + } + + private enum CodingKeys: String, CodingKey { + case data + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case gameCenterActivities + } + } + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/AppAvailabilityCreateRequest.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterActivityVersionReleaseCreateRequest.generated.swift similarity index 60% rename from Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/AppAvailabilityCreateRequest.generated.swift rename to Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterActivityVersionReleaseCreateRequest.generated.swift index ba37f15b..7ded1c67 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/AppAvailabilityCreateRequest.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterActivityVersionReleaseCreateRequest.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct AppAvailabilityCreateRequest: Hashable, Codable { +public struct GameCenterActivityVersionReleaseCreateRequest: Hashable, Codable, Sendable { public var data: Data public init(data: Data) { @@ -14,64 +14,47 @@ public struct AppAvailabilityCreateRequest: Hashable, Codable { case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var type: `Type` - public var attributes: Attributes - public var relationships: Relationships public init( type: `Type`, - attributes: Attributes, relationships: Relationships ) { self.type = type - self.attributes = attributes self.relationships = relationships } private enum CodingKeys: String, CodingKey { case type - case attributes case relationships } - public enum `Type`: String, Hashable, Codable { - case appAvailabilities - } - - public struct Attributes: Hashable, Codable { - public var availableInNewTerritories: Bool - - public init(availableInNewTerritories: Bool) { - self.availableInNewTerritories = availableInNewTerritories - } - - private enum CodingKeys: String, CodingKey { - case availableInNewTerritories - } + public enum `Type`: String, Hashable, Codable, Sendable { + case gameCenterActivityVersionReleases } - public struct Relationships: Hashable, Codable { - public var app: App + public struct Relationships: Hashable, Codable, Sendable { + public var gameCenterDetail: GameCenterDetail - public var availableTerritories: AvailableTerritories + public var version: Version public init( - app: App, - availableTerritories: AvailableTerritories + gameCenterDetail: GameCenterDetail, + version: Version ) { - self.app = app - self.availableTerritories = availableTerritories + self.gameCenterDetail = gameCenterDetail + self.version = version } private enum CodingKeys: String, CodingKey { - case app - case availableTerritories + case gameCenterDetail + case version } - public struct App: Hashable, Codable { + public struct GameCenterDetail: Hashable, Codable, Sendable { public var data: Data public init(data: Data) { @@ -82,7 +65,7 @@ public struct AppAvailabilityCreateRequest: Hashable, Codable { case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -100,16 +83,16 @@ public struct AppAvailabilityCreateRequest: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { - case apps + public enum `Type`: String, Hashable, Codable, Sendable { + case gameCenterDetails } } } - public struct AvailableTerritories: Hashable, Codable { - public var data: [Data] + public struct Version: Hashable, Codable, Sendable { + public var data: Data - public init(data: [Data]) { + public init(data: Data) { self.data = data } @@ -117,7 +100,7 @@ public struct AppAvailabilityCreateRequest: Hashable, Codable { case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -135,8 +118,8 @@ public struct AppAvailabilityCreateRequest: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { - case territories + public enum `Type`: String, Hashable, Codable, Sendable { + case gameCenterActivityVersions } } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterActivityVersionUpdateRequest.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterActivityVersionUpdateRequest.generated.swift new file mode 100644 index 00000000..8cf99ed0 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterActivityVersionUpdateRequest.generated.swift @@ -0,0 +1,58 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct GameCenterActivityVersionUpdateRequest: Hashable, Codable, Sendable { + public var data: Data + + public init(data: Data) { + self.data = data + } + + private enum CodingKeys: String, CodingKey { + case data + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public var attributes: Attributes? + + public init( + id: String, + type: `Type`, + attributes: Attributes? = nil + ) { + self.id = id + self.type = type + self.attributes = attributes + } + + private enum CodingKeys: String, CodingKey { + case id + case type + case attributes + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case gameCenterActivityVersions + } + + public struct Attributes: Hashable, Codable, Sendable { + public var fallbackUrl: String? + + public init(fallbackUrl: String? = nil) { + self.fallbackUrl = fallbackUrl + } + + private enum CodingKeys: String, CodingKey { + case fallbackUrl + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterAppVersionCompatibilityVersionsLinkagesRequest.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterAppVersionCompatibilityVersionsLinkagesRequest.generated.swift index bdecb8d2..52d407ab 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterAppVersionCompatibilityVersionsLinkagesRequest.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterAppVersionCompatibilityVersionsLinkagesRequest.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct GameCenterAppVersionCompatibilityVersionsLinkagesRequest: Hashable, Codable { +public struct GameCenterAppVersionCompatibilityVersionsLinkagesRequest: Hashable, Codable, Sendable { public var data: [Data] public init(data: [Data]) { @@ -14,7 +14,7 @@ public struct GameCenterAppVersionCompatibilityVersionsLinkagesRequest: Hashable case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -32,7 +32,7 @@ public struct GameCenterAppVersionCompatibilityVersionsLinkagesRequest: Hashable case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case gameCenterAppVersions } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterAppVersionCreateRequest.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterAppVersionCreateRequest.generated.swift index 8b3cee06..14a508cb 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterAppVersionCreateRequest.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterAppVersionCreateRequest.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct GameCenterAppVersionCreateRequest: Hashable, Codable { +public struct GameCenterAppVersionCreateRequest: Hashable, Codable, Sendable { public var data: Data public init(data: Data) { @@ -14,7 +14,7 @@ public struct GameCenterAppVersionCreateRequest: Hashable, Codable { case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var type: `Type` public var relationships: Relationships @@ -32,11 +32,11 @@ public struct GameCenterAppVersionCreateRequest: Hashable, Codable { case relationships } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case gameCenterAppVersions } - public struct Relationships: Hashable, Codable { + public struct Relationships: Hashable, Codable, Sendable { public var appStoreVersion: AppStoreVersion public init(appStoreVersion: AppStoreVersion) { @@ -47,7 +47,7 @@ public struct GameCenterAppVersionCreateRequest: Hashable, Codable { case appStoreVersion } - public struct AppStoreVersion: Hashable, Codable { + public struct AppStoreVersion: Hashable, Codable, Sendable { public var data: Data public init(data: Data) { @@ -58,7 +58,7 @@ public struct GameCenterAppVersionCreateRequest: Hashable, Codable { case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -76,7 +76,7 @@ public struct GameCenterAppVersionCreateRequest: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case appStoreVersions } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterAppVersionUpdateRequest.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterAppVersionUpdateRequest.generated.swift index 61eee0ad..5b3c8dbf 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterAppVersionUpdateRequest.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterAppVersionUpdateRequest.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct GameCenterAppVersionUpdateRequest: Hashable, Codable { +public struct GameCenterAppVersionUpdateRequest: Hashable, Codable, Sendable { public var data: Data public init(data: Data) { @@ -14,7 +14,7 @@ public struct GameCenterAppVersionUpdateRequest: Hashable, Codable { case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -37,11 +37,11 @@ public struct GameCenterAppVersionUpdateRequest: Hashable, Codable { case attributes } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case gameCenterAppVersions } - public struct Attributes: Hashable, Codable { + public struct Attributes: Hashable, Codable, Sendable { public var enabled: Bool? public init(enabled: Bool? = nil) { diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterChallengeCreateRequest.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterChallengeCreateRequest.generated.swift new file mode 100644 index 00000000..b363b3a2 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterChallengeCreateRequest.generated.swift @@ -0,0 +1,249 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct GameCenterChallengeCreateRequest: Hashable, Codable, Sendable { + public var data: Data + + public init(data: Data) { + self.data = data + } + + private enum CodingKeys: String, CodingKey { + case data + } + + public struct Data: Hashable, Codable, Sendable { + public var type: `Type` + + public var attributes: Attributes + + public var relationships: Relationships? + + public init( + type: `Type`, + attributes: Attributes, + relationships: Relationships? = nil + ) { + self.type = type + self.attributes = attributes + self.relationships = relationships + } + + private enum CodingKeys: String, CodingKey { + case type + case attributes + case relationships + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case gameCenterChallenges + } + + public struct Attributes: Hashable, Codable, Sendable { + public var allowedDurations: [AllowedDurations]? + + public var challengeType: ChallengeType + + public var referenceName: String + + public var repeatable: Bool? + + public var vendorIdentifier: String + + public init( + allowedDurations: [AllowedDurations]? = nil, + challengeType: ChallengeType, + referenceName: String, + repeatable: Bool? = nil, + vendorIdentifier: String + ) { + self.allowedDurations = allowedDurations + self.challengeType = challengeType + self.referenceName = referenceName + self.repeatable = repeatable + self.vendorIdentifier = vendorIdentifier + } + + private enum CodingKeys: String, CodingKey { + case allowedDurations + case challengeType + case referenceName + case repeatable + case vendorIdentifier + } + + public struct AllowedDurations: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var oneDay: Self { + .init(rawValue: "ONE_DAY") + } + + public static var oneWeek: Self { + .init(rawValue: "ONE_WEEK") + } + + public static var threeDays: Self { + .init(rawValue: "THREE_DAYS") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct ChallengeType: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var leaderboard: Self { + .init(rawValue: "LEADERBOARD") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + } + + public struct Relationships: Hashable, Codable, Sendable { + public var gameCenterDetail: GameCenterDetail? + + public var gameCenterGroup: GameCenterGroup? + + public var leaderboard: Leaderboard? + + public init( + gameCenterDetail: GameCenterDetail? = nil, + gameCenterGroup: GameCenterGroup? = nil, + leaderboard: Leaderboard? = nil + ) { + self.gameCenterDetail = gameCenterDetail + self.gameCenterGroup = gameCenterGroup + self.leaderboard = leaderboard + } + + private enum CodingKeys: String, CodingKey { + case gameCenterDetail + case gameCenterGroup + case leaderboard + } + + public struct GameCenterDetail: Hashable, Codable, Sendable { + public var data: Data? + + public init(data: Data? = nil) { + self.data = data + } + + private enum CodingKeys: String, CodingKey { + case data + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case gameCenterDetails + } + } + } + + public struct GameCenterGroup: Hashable, Codable, Sendable { + public var data: Data? + + public init(data: Data? = nil) { + self.data = data + } + + private enum CodingKeys: String, CodingKey { + case data + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case gameCenterGroups + } + } + } + + public struct Leaderboard: Hashable, Codable, Sendable { + public var data: Data? + + public init(data: Data? = nil) { + self.data = data + } + + private enum CodingKeys: String, CodingKey { + case data + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case gameCenterLeaderboards + } + } + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterChallengeImageCreateRequest.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterChallengeImageCreateRequest.generated.swift new file mode 100644 index 00000000..c9483f35 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterChallengeImageCreateRequest.generated.swift @@ -0,0 +1,154 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct GameCenterChallengeImageCreateRequest: Hashable, Codable, Sendable { + public var data: Data + + public init(data: Data) { + self.data = data + } + + private enum CodingKeys: String, CodingKey { + case data + } + + public struct Data: Hashable, Codable, Sendable { + public var type: `Type` + + public var attributes: Attributes + + public var relationships: Relationships? + + public init( + type: `Type`, + attributes: Attributes, + relationships: Relationships? = nil + ) { + self.type = type + self.attributes = attributes + self.relationships = relationships + } + + private enum CodingKeys: String, CodingKey { + case type + case attributes + case relationships + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case gameCenterChallengeImages + } + + public struct Attributes: Hashable, Codable, Sendable { + public var fileName: String + + public var fileSize: Int + + public init( + fileName: String, + fileSize: Int + ) { + self.fileName = fileName + self.fileSize = fileSize + } + + private enum CodingKeys: String, CodingKey { + case fileName + case fileSize + } + } + + public struct Relationships: Hashable, Codable, Sendable { + public var localization: Localization? + + public var version: Version? + + public init( + localization: Localization? = nil, + version: Version? = nil + ) { + self.localization = localization + self.version = version + } + + private enum CodingKeys: String, CodingKey { + case localization + case version + } + + public struct Localization: Hashable, Codable, Sendable { + public var data: Data? + + public init(data: Data? = nil) { + self.data = data + } + + private enum CodingKeys: String, CodingKey { + case data + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case gameCenterChallengeLocalizations + } + } + } + + public struct Version: Hashable, Codable, Sendable { + public var data: Data? + + public init(data: Data? = nil) { + self.data = data + } + + private enum CodingKeys: String, CodingKey { + case data + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case gameCenterChallengeVersions + } + } + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterChallengeImageUpdateRequest.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterChallengeImageUpdateRequest.generated.swift new file mode 100644 index 00000000..49327cdb --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterChallengeImageUpdateRequest.generated.swift @@ -0,0 +1,58 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct GameCenterChallengeImageUpdateRequest: Hashable, Codable, Sendable { + public var data: Data + + public init(data: Data) { + self.data = data + } + + private enum CodingKeys: String, CodingKey { + case data + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public var attributes: Attributes? + + public init( + id: String, + type: `Type`, + attributes: Attributes? = nil + ) { + self.id = id + self.type = type + self.attributes = attributes + } + + private enum CodingKeys: String, CodingKey { + case id + case type + case attributes + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case gameCenterChallengeImages + } + + public struct Attributes: Hashable, Codable, Sendable { + public var uploaded: Bool? + + public init(uploaded: Bool? = nil) { + self.uploaded = uploaded + } + + private enum CodingKeys: String, CodingKey { + case uploaded + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterChallengeLeaderboardLinkageRequest.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterChallengeLeaderboardLinkageRequest.generated.swift new file mode 100644 index 00000000..ad3281c3 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterChallengeLeaderboardLinkageRequest.generated.swift @@ -0,0 +1,41 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct GameCenterChallengeLeaderboardLinkageRequest: Hashable, Codable, Sendable { + public var data: Data + + public init(data: Data) { + self.data = data + } + + private enum CodingKeys: String, CodingKey { + case data + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case gameCenterLeaderboards + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterChallengeLocalizationCreateRequest.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterChallengeLocalizationCreateRequest.generated.swift new file mode 100644 index 00000000..28fa51e9 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterChallengeLocalizationCreateRequest.generated.swift @@ -0,0 +1,117 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct GameCenterChallengeLocalizationCreateRequest: Hashable, Codable, Sendable { + public var data: Data + + public init(data: Data) { + self.data = data + } + + private enum CodingKeys: String, CodingKey { + case data + } + + public struct Data: Hashable, Codable, Sendable { + public var type: `Type` + + public var attributes: Attributes + + public var relationships: Relationships + + public init( + type: `Type`, + attributes: Attributes, + relationships: Relationships + ) { + self.type = type + self.attributes = attributes + self.relationships = relationships + } + + private enum CodingKeys: String, CodingKey { + case type + case attributes + case relationships + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case gameCenterChallengeLocalizations + } + + public struct Attributes: Hashable, Codable, Sendable { + public var description: String? + + public var locale: String + + public var name: String + + public init( + description: String? = nil, + locale: String, + name: String + ) { + self.description = description + self.locale = locale + self.name = name + } + + private enum CodingKeys: String, CodingKey { + case description + case locale + case name + } + } + + public struct Relationships: Hashable, Codable, Sendable { + public var version: Version + + public init(version: Version) { + self.version = version + } + + private enum CodingKeys: String, CodingKey { + case version + } + + public struct Version: Hashable, Codable, Sendable { + public var data: Data + + public init(data: Data) { + self.data = data + } + + private enum CodingKeys: String, CodingKey { + case data + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case gameCenterChallengeVersions + } + } + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterChallengeLocalizationUpdateRequest.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterChallengeLocalizationUpdateRequest.generated.swift new file mode 100644 index 00000000..6cb8e33e --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterChallengeLocalizationUpdateRequest.generated.swift @@ -0,0 +1,65 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct GameCenterChallengeLocalizationUpdateRequest: Hashable, Codable, Sendable { + public var data: Data + + public init(data: Data) { + self.data = data + } + + private enum CodingKeys: String, CodingKey { + case data + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public var attributes: Attributes? + + public init( + id: String, + type: `Type`, + attributes: Attributes? = nil + ) { + self.id = id + self.type = type + self.attributes = attributes + } + + private enum CodingKeys: String, CodingKey { + case id + case type + case attributes + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case gameCenterChallengeLocalizations + } + + public struct Attributes: Hashable, Codable, Sendable { + public var description: String? + + public var name: String? + + public init( + description: String? = nil, + name: String? = nil + ) { + self.description = description + self.name = name + } + + private enum CodingKeys: String, CodingKey { + case description + case name + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterChallengeUpdateRequest.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterChallengeUpdateRequest.generated.swift new file mode 100644 index 00000000..e06e7a68 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterChallengeUpdateRequest.generated.swift @@ -0,0 +1,151 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct GameCenterChallengeUpdateRequest: Hashable, Codable, Sendable { + public var data: Data + + public init(data: Data) { + self.data = data + } + + private enum CodingKeys: String, CodingKey { + case data + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public var attributes: Attributes? + + public var relationships: Relationships? + + public init( + id: String, + type: `Type`, + attributes: Attributes? = nil, + relationships: Relationships? = nil + ) { + self.id = id + self.type = type + self.attributes = attributes + self.relationships = relationships + } + + private enum CodingKeys: String, CodingKey { + case id + case type + case attributes + case relationships + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case gameCenterChallenges + } + + public struct Attributes: Hashable, Codable, Sendable { + public var allowedDurations: [AllowedDurations]? + + public var archived: Bool? + + public var referenceName: String? + + public var repeatable: Bool? + + public init( + allowedDurations: [AllowedDurations]? = nil, + archived: Bool? = nil, + referenceName: String? = nil, + repeatable: Bool? = nil + ) { + self.allowedDurations = allowedDurations + self.archived = archived + self.referenceName = referenceName + self.repeatable = repeatable + } + + private enum CodingKeys: String, CodingKey { + case allowedDurations + case archived + case referenceName + case repeatable + } + + public struct AllowedDurations: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var oneDay: Self { + .init(rawValue: "ONE_DAY") + } + + public static var oneWeek: Self { + .init(rawValue: "ONE_WEEK") + } + + public static var threeDays: Self { + .init(rawValue: "THREE_DAYS") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + } + + public struct Relationships: Hashable, Codable, Sendable { + public var leaderboard: Leaderboard? + + public init(leaderboard: Leaderboard? = nil) { + self.leaderboard = leaderboard + } + + private enum CodingKeys: String, CodingKey { + case leaderboard + } + + public struct Leaderboard: Hashable, Codable, Sendable { + public var data: Data? + + public init(data: Data? = nil) { + self.data = data + } + + private enum CodingKeys: String, CodingKey { + case data + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case gameCenterLeaderboards + } + } + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterChallengeVersionCreateRequest.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterChallengeVersionCreateRequest.generated.swift new file mode 100644 index 00000000..5d6c361e --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterChallengeVersionCreateRequest.generated.swift @@ -0,0 +1,88 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct GameCenterChallengeVersionCreateRequest: Hashable, Codable, Sendable { + public var data: Data + + public init(data: Data) { + self.data = data + } + + private enum CodingKeys: String, CodingKey { + case data + } + + public struct Data: Hashable, Codable, Sendable { + public var type: `Type` + + public var relationships: Relationships + + public init( + type: `Type`, + relationships: Relationships + ) { + self.type = type + self.relationships = relationships + } + + private enum CodingKeys: String, CodingKey { + case type + case relationships + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case gameCenterChallengeVersions + } + + public struct Relationships: Hashable, Codable, Sendable { + public var challenge: Challenge + + public init(challenge: Challenge) { + self.challenge = challenge + } + + private enum CodingKeys: String, CodingKey { + case challenge + } + + public struct Challenge: Hashable, Codable, Sendable { + public var data: Data + + public init(data: Data) { + self.data = data + } + + private enum CodingKeys: String, CodingKey { + case data + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case gameCenterChallenges + } + } + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterChallengeVersionReleaseCreateRequest.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterChallengeVersionReleaseCreateRequest.generated.swift new file mode 100644 index 00000000..3f602001 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterChallengeVersionReleaseCreateRequest.generated.swift @@ -0,0 +1,130 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct GameCenterChallengeVersionReleaseCreateRequest: Hashable, Codable, Sendable { + public var data: Data + + public init(data: Data) { + self.data = data + } + + private enum CodingKeys: String, CodingKey { + case data + } + + public struct Data: Hashable, Codable, Sendable { + public var type: `Type` + + public var relationships: Relationships + + public init( + type: `Type`, + relationships: Relationships + ) { + self.type = type + self.relationships = relationships + } + + private enum CodingKeys: String, CodingKey { + case type + case relationships + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case gameCenterChallengeVersionReleases + } + + public struct Relationships: Hashable, Codable, Sendable { + public var gameCenterDetail: GameCenterDetail + + public var version: Version + + public init( + gameCenterDetail: GameCenterDetail, + version: Version + ) { + self.gameCenterDetail = gameCenterDetail + self.version = version + } + + private enum CodingKeys: String, CodingKey { + case gameCenterDetail + case version + } + + public struct GameCenterDetail: Hashable, Codable, Sendable { + public var data: Data + + public init(data: Data) { + self.data = data + } + + private enum CodingKeys: String, CodingKey { + case data + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case gameCenterDetails + } + } + } + + public struct Version: Hashable, Codable, Sendable { + public var data: Data + + public init(data: Data) { + self.data = data + } + + private enum CodingKeys: String, CodingKey { + case data + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case gameCenterChallengeVersions + } + } + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterDetailChallengesMinimumPlatformVersionsLinkagesRequest.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterDetailChallengesMinimumPlatformVersionsLinkagesRequest.generated.swift new file mode 100644 index 00000000..0fde6b42 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterDetailChallengesMinimumPlatformVersionsLinkagesRequest.generated.swift @@ -0,0 +1,41 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct GameCenterDetailChallengesMinimumPlatformVersionsLinkagesRequest: Hashable, Codable, Sendable { + public var data: [Data] + + public init(data: [Data]) { + self.data = data + } + + private enum CodingKeys: String, CodingKey { + case data + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case appStoreVersions + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterDetailCreateRequest.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterDetailCreateRequest.generated.swift index 54faa511..ce9f9023 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterDetailCreateRequest.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterDetailCreateRequest.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct GameCenterDetailCreateRequest: Hashable, Codable { +public struct GameCenterDetailCreateRequest: Hashable, Codable, Sendable { public var data: Data public init(data: Data) { @@ -14,7 +14,7 @@ public struct GameCenterDetailCreateRequest: Hashable, Codable { case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var type: `Type` public var attributes: Attributes? @@ -37,11 +37,12 @@ public struct GameCenterDetailCreateRequest: Hashable, Codable { case relationships } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case gameCenterDetails } - public struct Attributes: Hashable, Codable { + public struct Attributes: Hashable, Codable, Sendable { + @available(*, deprecated) public var challengeEnabled: Bool? public init(challengeEnabled: Bool? = nil) { @@ -53,7 +54,7 @@ public struct GameCenterDetailCreateRequest: Hashable, Codable { } } - public struct Relationships: Hashable, Codable { + public struct Relationships: Hashable, Codable, Sendable { public var app: App public init(app: App) { @@ -64,7 +65,7 @@ public struct GameCenterDetailCreateRequest: Hashable, Codable { case app } - public struct App: Hashable, Codable { + public struct App: Hashable, Codable, Sendable { public var data: Data public init(data: Data) { @@ -75,7 +76,7 @@ public struct GameCenterDetailCreateRequest: Hashable, Codable { case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -93,7 +94,7 @@ public struct GameCenterDetailCreateRequest: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case apps } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterDetailGameCenterAchievementsLinkagesRequest.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterDetailGameCenterAchievementsLinkagesRequest.generated.swift index 5210a69f..289675cc 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterDetailGameCenterAchievementsLinkagesRequest.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterDetailGameCenterAchievementsLinkagesRequest.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct GameCenterDetailGameCenterAchievementsLinkagesRequest: Hashable, Codable { +public struct GameCenterDetailGameCenterAchievementsLinkagesRequest: Hashable, Codable, Sendable { public var data: [Data] public init(data: [Data]) { @@ -14,7 +14,7 @@ public struct GameCenterDetailGameCenterAchievementsLinkagesRequest: Hashable, C case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -32,7 +32,7 @@ public struct GameCenterDetailGameCenterAchievementsLinkagesRequest: Hashable, C case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case gameCenterAchievements } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterDetailGameCenterLeaderboardSetsLinkagesRequest.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterDetailGameCenterLeaderboardSetsLinkagesRequest.generated.swift index c2d7dcc1..05f3de3b 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterDetailGameCenterLeaderboardSetsLinkagesRequest.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterDetailGameCenterLeaderboardSetsLinkagesRequest.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct GameCenterDetailGameCenterLeaderboardSetsLinkagesRequest: Hashable, Codable { +public struct GameCenterDetailGameCenterLeaderboardSetsLinkagesRequest: Hashable, Codable, Sendable { public var data: [Data] public init(data: [Data]) { @@ -14,7 +14,7 @@ public struct GameCenterDetailGameCenterLeaderboardSetsLinkagesRequest: Hashable case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -32,7 +32,7 @@ public struct GameCenterDetailGameCenterLeaderboardSetsLinkagesRequest: Hashable case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case gameCenterLeaderboardSets } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterDetailGameCenterLeaderboardsLinkagesRequest.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterDetailGameCenterLeaderboardsLinkagesRequest.generated.swift index a861d207..e16a72cb 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterDetailGameCenterLeaderboardsLinkagesRequest.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterDetailGameCenterLeaderboardsLinkagesRequest.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct GameCenterDetailGameCenterLeaderboardsLinkagesRequest: Hashable, Codable { +public struct GameCenterDetailGameCenterLeaderboardsLinkagesRequest: Hashable, Codable, Sendable { public var data: [Data] public init(data: [Data]) { @@ -14,7 +14,7 @@ public struct GameCenterDetailGameCenterLeaderboardsLinkagesRequest: Hashable, C case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -32,7 +32,7 @@ public struct GameCenterDetailGameCenterLeaderboardsLinkagesRequest: Hashable, C case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case gameCenterLeaderboards } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterDetailUpdateRequest.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterDetailUpdateRequest.generated.swift index 2098bde0..54d19f9f 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterDetailUpdateRequest.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterDetailUpdateRequest.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct GameCenterDetailUpdateRequest: Hashable, Codable { +public struct GameCenterDetailUpdateRequest: Hashable, Codable, Sendable { public var data: Data public init(data: Data) { @@ -14,7 +14,7 @@ public struct GameCenterDetailUpdateRequest: Hashable, Codable { case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -42,11 +42,12 @@ public struct GameCenterDetailUpdateRequest: Hashable, Codable { case relationships } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case gameCenterDetails } - public struct Attributes: Hashable, Codable { + public struct Attributes: Hashable, Codable, Sendable { + @available(*, deprecated) public var challengeEnabled: Bool? public init(challengeEnabled: Bool? = nil) { @@ -58,7 +59,7 @@ public struct GameCenterDetailUpdateRequest: Hashable, Codable { } } - public struct Relationships: Hashable, Codable { + public struct Relationships: Hashable, Codable, Sendable { public var defaultGroupLeaderboard: DefaultGroupLeaderboard? public var defaultLeaderboard: DefaultLeaderboard? @@ -81,7 +82,7 @@ public struct GameCenterDetailUpdateRequest: Hashable, Codable { case gameCenterGroup } - public struct DefaultGroupLeaderboard: Hashable, Codable { + public struct DefaultGroupLeaderboard: Hashable, Codable, Sendable { public var data: Data? public init(data: Data? = nil) { @@ -92,7 +93,7 @@ public struct GameCenterDetailUpdateRequest: Hashable, Codable { case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -110,13 +111,13 @@ public struct GameCenterDetailUpdateRequest: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case gameCenterLeaderboards } } } - public struct DefaultLeaderboard: Hashable, Codable { + public struct DefaultLeaderboard: Hashable, Codable, Sendable { public var data: Data? public init(data: Data? = nil) { @@ -127,7 +128,7 @@ public struct GameCenterDetailUpdateRequest: Hashable, Codable { case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -145,13 +146,13 @@ public struct GameCenterDetailUpdateRequest: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case gameCenterLeaderboards } } } - public struct GameCenterGroup: Hashable, Codable { + public struct GameCenterGroup: Hashable, Codable, Sendable { public var data: Data? public init(data: Data? = nil) { @@ -162,7 +163,7 @@ public struct GameCenterDetailUpdateRequest: Hashable, Codable { case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -180,7 +181,7 @@ public struct GameCenterDetailUpdateRequest: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case gameCenterGroups } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterEnabledVersionCompatibleVersionsLinkagesRequest.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterEnabledVersionCompatibleVersionsLinkagesRequest.generated.swift index b6698c52..d3e22a5a 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterEnabledVersionCompatibleVersionsLinkagesRequest.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterEnabledVersionCompatibleVersionsLinkagesRequest.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct GameCenterEnabledVersionCompatibleVersionsLinkagesRequest: Hashable, Codable { +public struct GameCenterEnabledVersionCompatibleVersionsLinkagesRequest: Hashable, Codable, Sendable { public var data: [Data] public init(data: [Data]) { @@ -14,7 +14,7 @@ public struct GameCenterEnabledVersionCompatibleVersionsLinkagesRequest: Hashabl case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -32,7 +32,7 @@ public struct GameCenterEnabledVersionCompatibleVersionsLinkagesRequest: Hashabl case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case gameCenterEnabledVersions } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterGroupCreateRequest.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterGroupCreateRequest.generated.swift index 34c012c6..2c7dbcd9 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterGroupCreateRequest.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterGroupCreateRequest.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct GameCenterGroupCreateRequest: Hashable, Codable { +public struct GameCenterGroupCreateRequest: Hashable, Codable, Sendable { public var data: Data public init(data: Data) { @@ -14,7 +14,7 @@ public struct GameCenterGroupCreateRequest: Hashable, Codable { case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var type: `Type` public var attributes: Attributes? @@ -32,11 +32,11 @@ public struct GameCenterGroupCreateRequest: Hashable, Codable { case attributes } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case gameCenterGroups } - public struct Attributes: Hashable, Codable { + public struct Attributes: Hashable, Codable, Sendable { public var referenceName: String? public init(referenceName: String? = nil) { diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterGroupGameCenterAchievementsLinkagesRequest.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterGroupGameCenterAchievementsLinkagesRequest.generated.swift index 93252247..02efede9 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterGroupGameCenterAchievementsLinkagesRequest.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterGroupGameCenterAchievementsLinkagesRequest.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct GameCenterGroupGameCenterAchievementsLinkagesRequest: Hashable, Codable { +public struct GameCenterGroupGameCenterAchievementsLinkagesRequest: Hashable, Codable, Sendable { public var data: [Data] public init(data: [Data]) { @@ -14,7 +14,7 @@ public struct GameCenterGroupGameCenterAchievementsLinkagesRequest: Hashable, Co case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -32,7 +32,7 @@ public struct GameCenterGroupGameCenterAchievementsLinkagesRequest: Hashable, Co case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case gameCenterAchievements } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterGroupGameCenterLeaderboardSetsLinkagesRequest.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterGroupGameCenterLeaderboardSetsLinkagesRequest.generated.swift index 5a31d2c5..3946e61c 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterGroupGameCenterLeaderboardSetsLinkagesRequest.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterGroupGameCenterLeaderboardSetsLinkagesRequest.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct GameCenterGroupGameCenterLeaderboardSetsLinkagesRequest: Hashable, Codable { +public struct GameCenterGroupGameCenterLeaderboardSetsLinkagesRequest: Hashable, Codable, Sendable { public var data: [Data] public init(data: [Data]) { @@ -14,7 +14,7 @@ public struct GameCenterGroupGameCenterLeaderboardSetsLinkagesRequest: Hashable, case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -32,7 +32,7 @@ public struct GameCenterGroupGameCenterLeaderboardSetsLinkagesRequest: Hashable, case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case gameCenterLeaderboardSets } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterGroupGameCenterLeaderboardsLinkagesRequest.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterGroupGameCenterLeaderboardsLinkagesRequest.generated.swift index 01e0a978..3d8d37aa 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterGroupGameCenterLeaderboardsLinkagesRequest.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterGroupGameCenterLeaderboardsLinkagesRequest.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct GameCenterGroupGameCenterLeaderboardsLinkagesRequest: Hashable, Codable { +public struct GameCenterGroupGameCenterLeaderboardsLinkagesRequest: Hashable, Codable, Sendable { public var data: [Data] public init(data: [Data]) { @@ -14,7 +14,7 @@ public struct GameCenterGroupGameCenterLeaderboardsLinkagesRequest: Hashable, Co case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -32,7 +32,7 @@ public struct GameCenterGroupGameCenterLeaderboardsLinkagesRequest: Hashable, Co case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case gameCenterLeaderboards } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterGroupUpdateRequest.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterGroupUpdateRequest.generated.swift index a6a91791..3f887e89 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterGroupUpdateRequest.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterGroupUpdateRequest.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct GameCenterGroupUpdateRequest: Hashable, Codable { +public struct GameCenterGroupUpdateRequest: Hashable, Codable, Sendable { public var data: Data public init(data: Data) { @@ -14,7 +14,7 @@ public struct GameCenterGroupUpdateRequest: Hashable, Codable { case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -37,11 +37,11 @@ public struct GameCenterGroupUpdateRequest: Hashable, Codable { case attributes } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case gameCenterGroups } - public struct Attributes: Hashable, Codable { + public struct Attributes: Hashable, Codable, Sendable { public var referenceName: String? public init(referenceName: String? = nil) { diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterLeaderboardActivityLinkageRequest.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterLeaderboardActivityLinkageRequest.generated.swift new file mode 100644 index 00000000..64a8f59e --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterLeaderboardActivityLinkageRequest.generated.swift @@ -0,0 +1,41 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct GameCenterLeaderboardActivityLinkageRequest: Hashable, Codable, Sendable { + public var data: Data + + public init(data: Data) { + self.data = data + } + + private enum CodingKeys: String, CodingKey { + case data + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case gameCenterActivities + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterLeaderboardChallengeLinkageRequest.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterLeaderboardChallengeLinkageRequest.generated.swift new file mode 100644 index 00000000..0e46091e --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterLeaderboardChallengeLinkageRequest.generated.swift @@ -0,0 +1,41 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct GameCenterLeaderboardChallengeLinkageRequest: Hashable, Codable, Sendable { + public var data: Data + + public init(data: Data) { + self.data = data + } + + private enum CodingKeys: String, CodingKey { + case data + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case gameCenterChallenges + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterLeaderboardCreateRequest.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterLeaderboardCreateRequest.generated.swift index 9de16080..208a45c6 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterLeaderboardCreateRequest.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterLeaderboardCreateRequest.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct GameCenterLeaderboardCreateRequest: Hashable, Codable { +public struct GameCenterLeaderboardCreateRequest: Hashable, Codable, Sendable { public var data: Data public init(data: Data) { @@ -14,7 +14,7 @@ public struct GameCenterLeaderboardCreateRequest: Hashable, Codable { case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var type: `Type` public var attributes: Attributes @@ -37,11 +37,13 @@ public struct GameCenterLeaderboardCreateRequest: Hashable, Codable { case relationships } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case gameCenterLeaderboards } - public struct Attributes: Hashable, Codable { + public struct Attributes: Hashable, Codable, Sendable { + public var activityProperties: [String: String]? + public var defaultFormatter: GameCenterLeaderboardFormatter public var recurrenceDuration: String? @@ -62,7 +64,10 @@ public struct GameCenterLeaderboardCreateRequest: Hashable, Codable { public var vendorIdentifier: String + public var visibility: Visibility? + public init( + activityProperties: [String: String]? = nil, defaultFormatter: GameCenterLeaderboardFormatter, recurrenceDuration: String? = nil, recurrenceRule: String? = nil, @@ -72,8 +77,10 @@ public struct GameCenterLeaderboardCreateRequest: Hashable, Codable { scoreRangeStart: String? = nil, scoreSortType: ScoreSortType, submissionType: SubmissionType, - vendorIdentifier: String + vendorIdentifier: String, + visibility: Visibility? = nil ) { + self.activityProperties = activityProperties self.defaultFormatter = defaultFormatter self.recurrenceDuration = recurrenceDuration self.recurrenceRule = recurrenceRule @@ -84,9 +91,11 @@ public struct GameCenterLeaderboardCreateRequest: Hashable, Codable { self.scoreSortType = scoreSortType self.submissionType = submissionType self.vendorIdentifier = vendorIdentifier + self.visibility = visibility } private enum CodingKeys: String, CodingKey { + case activityProperties case defaultFormatter case recurrenceDuration case recurrenceRule @@ -97,54 +106,71 @@ public struct GameCenterLeaderboardCreateRequest: Hashable, Codable { case scoreSortType case submissionType case vendorIdentifier + case visibility } - public enum ScoreSortType: Hashable, Codable, RawRepresentable { - case asc - case desc - case unknown(String) + public struct ScoreSortType: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var asc: Self { + .init(rawValue: "ASC") + } - public var rawValue: String { - switch self { - case .asc: return "ASC" - case .desc: return "DESC" - case .unknown(let rawValue): return rawValue - } + public static var desc: Self { + .init(rawValue: "DESC") } + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "ASC": self = .asc - case "DESC": self = .desc - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum SubmissionType: Hashable, Codable, RawRepresentable { - case bestScore - case mostRecentScore - case unknown(String) + public struct SubmissionType: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var bestScore: Self { + .init(rawValue: "BEST_SCORE") + } - public var rawValue: String { - switch self { - case .bestScore: return "BEST_SCORE" - case .mostRecentScore: return "MOST_RECENT_SCORE" - case .unknown(let rawValue): return rawValue - } + public static var mostRecentScore: Self { + .init(rawValue: "MOST_RECENT_SCORE") } + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "BEST_SCORE": self = .bestScore - case "MOST_RECENT_SCORE": self = .mostRecentScore - default: self = .unknown(rawValue) - } + self.rawValue = rawValue + } + } + + public struct Visibility: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var hideForAll: Self { + .init(rawValue: "HIDE_FOR_ALL") + } + + public static var showForAll: Self { + .init(rawValue: "SHOW_FOR_ALL") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue } } } - public struct Relationships: Hashable, Codable { + public struct Relationships: Hashable, Codable, Sendable { public var gameCenterDetail: GameCenterDetail? public var gameCenterGroup: GameCenterGroup? @@ -167,7 +193,7 @@ public struct GameCenterLeaderboardCreateRequest: Hashable, Codable { case gameCenterLeaderboardSets } - public struct GameCenterDetail: Hashable, Codable { + public struct GameCenterDetail: Hashable, Codable, Sendable { public var data: Data? public init(data: Data? = nil) { @@ -178,7 +204,7 @@ public struct GameCenterLeaderboardCreateRequest: Hashable, Codable { case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -196,13 +222,13 @@ public struct GameCenterLeaderboardCreateRequest: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case gameCenterDetails } } } - public struct GameCenterGroup: Hashable, Codable { + public struct GameCenterGroup: Hashable, Codable, Sendable { public var data: Data? public init(data: Data? = nil) { @@ -213,7 +239,7 @@ public struct GameCenterLeaderboardCreateRequest: Hashable, Codable { case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -231,13 +257,13 @@ public struct GameCenterLeaderboardCreateRequest: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case gameCenterGroups } } } - public struct GameCenterLeaderboardSets: Hashable, Codable { + public struct GameCenterLeaderboardSets: Hashable, Codable, Sendable { public var data: [Data]? public init(data: [Data]? = nil) { @@ -248,7 +274,7 @@ public struct GameCenterLeaderboardCreateRequest: Hashable, Codable { case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -266,7 +292,7 @@ public struct GameCenterLeaderboardCreateRequest: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case gameCenterLeaderboardSets } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterLeaderboardEntrySubmissionCreateRequest.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterLeaderboardEntrySubmissionCreateRequest.generated.swift new file mode 100644 index 00000000..51d40bb6 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterLeaderboardEntrySubmissionCreateRequest.generated.swift @@ -0,0 +1,85 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct GameCenterLeaderboardEntrySubmissionCreateRequest: Hashable, Codable, Sendable { + public var data: Data + + public init(data: Data) { + self.data = data + } + + private enum CodingKeys: String, CodingKey { + case data + } + + public struct Data: Hashable, Codable, Sendable { + public var type: `Type` + + public var attributes: Attributes + + public init( + type: `Type`, + attributes: Attributes + ) { + self.type = type + self.attributes = attributes + } + + private enum CodingKeys: String, CodingKey { + case type + case attributes + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case gameCenterLeaderboardEntrySubmissions + } + + public struct Attributes: Hashable, Codable, Sendable { + public var bundleId: String + + public var challengeIds: [String]? + + public var context: String? + + public var scopedPlayerId: String + + public var score: String + + public var submittedDate: String? + + public var vendorIdentifier: String + + public init( + bundleId: String, + challengeIds: [String]? = nil, + context: String? = nil, + scopedPlayerId: String, + score: String, + submittedDate: String? = nil, + vendorIdentifier: String + ) { + self.bundleId = bundleId + self.challengeIds = challengeIds + self.context = context + self.scopedPlayerId = scopedPlayerId + self.score = score + self.submittedDate = submittedDate + self.vendorIdentifier = vendorIdentifier + } + + private enum CodingKeys: String, CodingKey { + case bundleId + case challengeIds + case context + case scopedPlayerId + case score + case submittedDate + case vendorIdentifier + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterLeaderboardGroupLeaderboardLinkageRequest.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterLeaderboardGroupLeaderboardLinkageRequest.generated.swift index bdcca0f2..80f0eb7a 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterLeaderboardGroupLeaderboardLinkageRequest.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterLeaderboardGroupLeaderboardLinkageRequest.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct GameCenterLeaderboardGroupLeaderboardLinkageRequest: Hashable, Codable { +public struct GameCenterLeaderboardGroupLeaderboardLinkageRequest: Hashable, Codable, Sendable { public var data: Data public init(data: Data) { @@ -14,7 +14,7 @@ public struct GameCenterLeaderboardGroupLeaderboardLinkageRequest: Hashable, Cod case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -32,7 +32,7 @@ public struct GameCenterLeaderboardGroupLeaderboardLinkageRequest: Hashable, Cod case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case gameCenterLeaderboards } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterLeaderboardImageCreateRequest.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterLeaderboardImageCreateRequest.generated.swift index 9d1d8a87..6d56cc71 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterLeaderboardImageCreateRequest.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterLeaderboardImageCreateRequest.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct GameCenterLeaderboardImageCreateRequest: Hashable, Codable { +public struct GameCenterLeaderboardImageCreateRequest: Hashable, Codable, Sendable { public var data: Data public init(data: Data) { @@ -14,7 +14,7 @@ public struct GameCenterLeaderboardImageCreateRequest: Hashable, Codable { case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var type: `Type` public var attributes: Attributes @@ -37,11 +37,11 @@ public struct GameCenterLeaderboardImageCreateRequest: Hashable, Codable { case relationships } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case gameCenterLeaderboardImages } - public struct Attributes: Hashable, Codable { + public struct Attributes: Hashable, Codable, Sendable { public var fileName: String public var fileSize: Int @@ -60,7 +60,7 @@ public struct GameCenterLeaderboardImageCreateRequest: Hashable, Codable { } } - public struct Relationships: Hashable, Codable { + public struct Relationships: Hashable, Codable, Sendable { public var gameCenterLeaderboardLocalization: GameCenterLeaderboardLocalization public init(gameCenterLeaderboardLocalization: GameCenterLeaderboardLocalization) { @@ -71,7 +71,7 @@ public struct GameCenterLeaderboardImageCreateRequest: Hashable, Codable { case gameCenterLeaderboardLocalization } - public struct GameCenterLeaderboardLocalization: Hashable, Codable { + public struct GameCenterLeaderboardLocalization: Hashable, Codable, Sendable { public var data: Data public init(data: Data) { @@ -82,7 +82,7 @@ public struct GameCenterLeaderboardImageCreateRequest: Hashable, Codable { case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -100,7 +100,7 @@ public struct GameCenterLeaderboardImageCreateRequest: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case gameCenterLeaderboardLocalizations } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterLeaderboardImageUpdateRequest.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterLeaderboardImageUpdateRequest.generated.swift index 2aad71f2..be2c46fb 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterLeaderboardImageUpdateRequest.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterLeaderboardImageUpdateRequest.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct GameCenterLeaderboardImageUpdateRequest: Hashable, Codable { +public struct GameCenterLeaderboardImageUpdateRequest: Hashable, Codable, Sendable { public var data: Data public init(data: Data) { @@ -14,7 +14,7 @@ public struct GameCenterLeaderboardImageUpdateRequest: Hashable, Codable { case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -37,11 +37,11 @@ public struct GameCenterLeaderboardImageUpdateRequest: Hashable, Codable { case attributes } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case gameCenterLeaderboardImages } - public struct Attributes: Hashable, Codable { + public struct Attributes: Hashable, Codable, Sendable { public var uploaded: Bool? public init(uploaded: Bool? = nil) { diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterLeaderboardLocalizationCreateRequest.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterLeaderboardLocalizationCreateRequest.generated.swift index f040bfdf..fde31381 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterLeaderboardLocalizationCreateRequest.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterLeaderboardLocalizationCreateRequest.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct GameCenterLeaderboardLocalizationCreateRequest: Hashable, Codable { +public struct GameCenterLeaderboardLocalizationCreateRequest: Hashable, Codable, Sendable { public var data: Data public init(data: Data) { @@ -14,7 +14,7 @@ public struct GameCenterLeaderboardLocalizationCreateRequest: Hashable, Codable case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var type: `Type` public var attributes: Attributes @@ -37,11 +37,11 @@ public struct GameCenterLeaderboardLocalizationCreateRequest: Hashable, Codable case relationships } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case gameCenterLeaderboardLocalizations } - public struct Attributes: Hashable, Codable { + public struct Attributes: Hashable, Codable, Sendable { public var formatterOverride: GameCenterLeaderboardFormatter? public var formatterSuffix: String? @@ -75,7 +75,7 @@ public struct GameCenterLeaderboardLocalizationCreateRequest: Hashable, Codable } } - public struct Relationships: Hashable, Codable { + public struct Relationships: Hashable, Codable, Sendable { public var gameCenterLeaderboard: GameCenterLeaderboard public init(gameCenterLeaderboard: GameCenterLeaderboard) { @@ -86,7 +86,7 @@ public struct GameCenterLeaderboardLocalizationCreateRequest: Hashable, Codable case gameCenterLeaderboard } - public struct GameCenterLeaderboard: Hashable, Codable { + public struct GameCenterLeaderboard: Hashable, Codable, Sendable { public var data: Data public init(data: Data) { @@ -97,7 +97,7 @@ public struct GameCenterLeaderboardLocalizationCreateRequest: Hashable, Codable case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -115,7 +115,7 @@ public struct GameCenterLeaderboardLocalizationCreateRequest: Hashable, Codable case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case gameCenterLeaderboards } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterLeaderboardLocalizationUpdateRequest.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterLeaderboardLocalizationUpdateRequest.generated.swift index fbf90e12..eda19640 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterLeaderboardLocalizationUpdateRequest.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterLeaderboardLocalizationUpdateRequest.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct GameCenterLeaderboardLocalizationUpdateRequest: Hashable, Codable { +public struct GameCenterLeaderboardLocalizationUpdateRequest: Hashable, Codable, Sendable { public var data: Data public init(data: Data) { @@ -14,7 +14,7 @@ public struct GameCenterLeaderboardLocalizationUpdateRequest: Hashable, Codable case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -37,11 +37,11 @@ public struct GameCenterLeaderboardLocalizationUpdateRequest: Hashable, Codable case attributes } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case gameCenterLeaderboardLocalizations } - public struct Attributes: Hashable, Codable { + public struct Attributes: Hashable, Codable, Sendable { public var formatterOverride: GameCenterLeaderboardFormatter? public var formatterSuffix: String? diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterLeaderboardReleaseCreateRequest.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterLeaderboardReleaseCreateRequest.generated.swift index 6caa2a35..79136573 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterLeaderboardReleaseCreateRequest.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterLeaderboardReleaseCreateRequest.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct GameCenterLeaderboardReleaseCreateRequest: Hashable, Codable { +public struct GameCenterLeaderboardReleaseCreateRequest: Hashable, Codable, Sendable { public var data: Data public init(data: Data) { @@ -14,7 +14,7 @@ public struct GameCenterLeaderboardReleaseCreateRequest: Hashable, Codable { case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var type: `Type` public var relationships: Relationships @@ -32,11 +32,11 @@ public struct GameCenterLeaderboardReleaseCreateRequest: Hashable, Codable { case relationships } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case gameCenterLeaderboardReleases } - public struct Relationships: Hashable, Codable { + public struct Relationships: Hashable, Codable, Sendable { public var gameCenterDetail: GameCenterDetail public var gameCenterLeaderboard: GameCenterLeaderboard @@ -54,7 +54,7 @@ public struct GameCenterLeaderboardReleaseCreateRequest: Hashable, Codable { case gameCenterLeaderboard } - public struct GameCenterDetail: Hashable, Codable { + public struct GameCenterDetail: Hashable, Codable, Sendable { public var data: Data public init(data: Data) { @@ -65,7 +65,7 @@ public struct GameCenterLeaderboardReleaseCreateRequest: Hashable, Codable { case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -83,13 +83,13 @@ public struct GameCenterLeaderboardReleaseCreateRequest: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case gameCenterDetails } } } - public struct GameCenterLeaderboard: Hashable, Codable { + public struct GameCenterLeaderboard: Hashable, Codable, Sendable { public var data: Data public init(data: Data) { @@ -100,7 +100,7 @@ public struct GameCenterLeaderboardReleaseCreateRequest: Hashable, Codable { case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -118,7 +118,7 @@ public struct GameCenterLeaderboardReleaseCreateRequest: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case gameCenterLeaderboards } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterLeaderboardSetCreateRequest.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterLeaderboardSetCreateRequest.generated.swift index 56f3cdd1..33a071ae 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterLeaderboardSetCreateRequest.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterLeaderboardSetCreateRequest.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct GameCenterLeaderboardSetCreateRequest: Hashable, Codable { +public struct GameCenterLeaderboardSetCreateRequest: Hashable, Codable, Sendable { public var data: Data public init(data: Data) { @@ -14,7 +14,7 @@ public struct GameCenterLeaderboardSetCreateRequest: Hashable, Codable { case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var type: `Type` public var attributes: Attributes @@ -37,11 +37,11 @@ public struct GameCenterLeaderboardSetCreateRequest: Hashable, Codable { case relationships } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case gameCenterLeaderboardSets } - public struct Attributes: Hashable, Codable { + public struct Attributes: Hashable, Codable, Sendable { public var referenceName: String public var vendorIdentifier: String @@ -60,7 +60,7 @@ public struct GameCenterLeaderboardSetCreateRequest: Hashable, Codable { } } - public struct Relationships: Hashable, Codable { + public struct Relationships: Hashable, Codable, Sendable { public var gameCenterDetail: GameCenterDetail? public var gameCenterGroup: GameCenterGroup? @@ -83,7 +83,7 @@ public struct GameCenterLeaderboardSetCreateRequest: Hashable, Codable { case gameCenterLeaderboards } - public struct GameCenterDetail: Hashable, Codable { + public struct GameCenterDetail: Hashable, Codable, Sendable { public var data: Data? public init(data: Data? = nil) { @@ -94,7 +94,7 @@ public struct GameCenterLeaderboardSetCreateRequest: Hashable, Codable { case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -112,13 +112,13 @@ public struct GameCenterLeaderboardSetCreateRequest: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case gameCenterDetails } } } - public struct GameCenterGroup: Hashable, Codable { + public struct GameCenterGroup: Hashable, Codable, Sendable { public var data: Data? public init(data: Data? = nil) { @@ -129,7 +129,7 @@ public struct GameCenterLeaderboardSetCreateRequest: Hashable, Codable { case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -147,13 +147,13 @@ public struct GameCenterLeaderboardSetCreateRequest: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case gameCenterGroups } } } - public struct GameCenterLeaderboards: Hashable, Codable { + public struct GameCenterLeaderboards: Hashable, Codable, Sendable { public var data: [Data]? public init(data: [Data]? = nil) { @@ -164,7 +164,7 @@ public struct GameCenterLeaderboardSetCreateRequest: Hashable, Codable { case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -182,7 +182,7 @@ public struct GameCenterLeaderboardSetCreateRequest: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case gameCenterLeaderboards } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterLeaderboardSetGameCenterLeaderboardsLinkagesRequest.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterLeaderboardSetGameCenterLeaderboardsLinkagesRequest.generated.swift index 43ac0f76..28af0e58 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterLeaderboardSetGameCenterLeaderboardsLinkagesRequest.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterLeaderboardSetGameCenterLeaderboardsLinkagesRequest.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct GameCenterLeaderboardSetGameCenterLeaderboardsLinkagesRequest: Hashable, Codable { +public struct GameCenterLeaderboardSetGameCenterLeaderboardsLinkagesRequest: Hashable, Codable, Sendable { public var data: [Data] public init(data: [Data]) { @@ -14,7 +14,7 @@ public struct GameCenterLeaderboardSetGameCenterLeaderboardsLinkagesRequest: Has case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -32,7 +32,7 @@ public struct GameCenterLeaderboardSetGameCenterLeaderboardsLinkagesRequest: Has case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case gameCenterLeaderboards } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterLeaderboardSetGroupLeaderboardSetLinkageRequest.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterLeaderboardSetGroupLeaderboardSetLinkageRequest.generated.swift index 19a74ef3..42561995 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterLeaderboardSetGroupLeaderboardSetLinkageRequest.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterLeaderboardSetGroupLeaderboardSetLinkageRequest.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct GameCenterLeaderboardSetGroupLeaderboardSetLinkageRequest: Hashable, Codable { +public struct GameCenterLeaderboardSetGroupLeaderboardSetLinkageRequest: Hashable, Codable, Sendable { public var data: Data public init(data: Data) { @@ -14,7 +14,7 @@ public struct GameCenterLeaderboardSetGroupLeaderboardSetLinkageRequest: Hashabl case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -32,7 +32,7 @@ public struct GameCenterLeaderboardSetGroupLeaderboardSetLinkageRequest: Hashabl case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case gameCenterLeaderboardSets } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterLeaderboardSetImageCreateRequest.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterLeaderboardSetImageCreateRequest.generated.swift index 292605c3..377b9b04 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterLeaderboardSetImageCreateRequest.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterLeaderboardSetImageCreateRequest.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct GameCenterLeaderboardSetImageCreateRequest: Hashable, Codable { +public struct GameCenterLeaderboardSetImageCreateRequest: Hashable, Codable, Sendable { public var data: Data public init(data: Data) { @@ -14,7 +14,7 @@ public struct GameCenterLeaderboardSetImageCreateRequest: Hashable, Codable { case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var type: `Type` public var attributes: Attributes @@ -37,11 +37,11 @@ public struct GameCenterLeaderboardSetImageCreateRequest: Hashable, Codable { case relationships } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case gameCenterLeaderboardSetImages } - public struct Attributes: Hashable, Codable { + public struct Attributes: Hashable, Codable, Sendable { public var fileName: String public var fileSize: Int @@ -60,7 +60,7 @@ public struct GameCenterLeaderboardSetImageCreateRequest: Hashable, Codable { } } - public struct Relationships: Hashable, Codable { + public struct Relationships: Hashable, Codable, Sendable { public var gameCenterLeaderboardSetLocalization: GameCenterLeaderboardSetLocalization public init(gameCenterLeaderboardSetLocalization: GameCenterLeaderboardSetLocalization) { @@ -71,7 +71,7 @@ public struct GameCenterLeaderboardSetImageCreateRequest: Hashable, Codable { case gameCenterLeaderboardSetLocalization } - public struct GameCenterLeaderboardSetLocalization: Hashable, Codable { + public struct GameCenterLeaderboardSetLocalization: Hashable, Codable, Sendable { public var data: Data public init(data: Data) { @@ -82,7 +82,7 @@ public struct GameCenterLeaderboardSetImageCreateRequest: Hashable, Codable { case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -100,7 +100,7 @@ public struct GameCenterLeaderboardSetImageCreateRequest: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case gameCenterLeaderboardSetLocalizations } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterLeaderboardSetImageUpdateRequest.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterLeaderboardSetImageUpdateRequest.generated.swift index a9af49bd..1519eb45 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterLeaderboardSetImageUpdateRequest.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterLeaderboardSetImageUpdateRequest.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct GameCenterLeaderboardSetImageUpdateRequest: Hashable, Codable { +public struct GameCenterLeaderboardSetImageUpdateRequest: Hashable, Codable, Sendable { public var data: Data public init(data: Data) { @@ -14,7 +14,7 @@ public struct GameCenterLeaderboardSetImageUpdateRequest: Hashable, Codable { case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -37,11 +37,11 @@ public struct GameCenterLeaderboardSetImageUpdateRequest: Hashable, Codable { case attributes } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case gameCenterLeaderboardSetImages } - public struct Attributes: Hashable, Codable { + public struct Attributes: Hashable, Codable, Sendable { public var uploaded: Bool? public init(uploaded: Bool? = nil) { diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterLeaderboardSetLocalizationCreateRequest.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterLeaderboardSetLocalizationCreateRequest.generated.swift index 57a69d63..98ec5a32 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterLeaderboardSetLocalizationCreateRequest.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterLeaderboardSetLocalizationCreateRequest.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct GameCenterLeaderboardSetLocalizationCreateRequest: Hashable, Codable { +public struct GameCenterLeaderboardSetLocalizationCreateRequest: Hashable, Codable, Sendable { public var data: Data public init(data: Data) { @@ -14,7 +14,7 @@ public struct GameCenterLeaderboardSetLocalizationCreateRequest: Hashable, Codab case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var type: `Type` public var attributes: Attributes @@ -37,11 +37,11 @@ public struct GameCenterLeaderboardSetLocalizationCreateRequest: Hashable, Codab case relationships } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case gameCenterLeaderboardSetLocalizations } - public struct Attributes: Hashable, Codable { + public struct Attributes: Hashable, Codable, Sendable { public var locale: String public var name: String @@ -60,7 +60,7 @@ public struct GameCenterLeaderboardSetLocalizationCreateRequest: Hashable, Codab } } - public struct Relationships: Hashable, Codable { + public struct Relationships: Hashable, Codable, Sendable { public var gameCenterLeaderboardSet: GameCenterLeaderboardSet public init(gameCenterLeaderboardSet: GameCenterLeaderboardSet) { @@ -71,7 +71,7 @@ public struct GameCenterLeaderboardSetLocalizationCreateRequest: Hashable, Codab case gameCenterLeaderboardSet } - public struct GameCenterLeaderboardSet: Hashable, Codable { + public struct GameCenterLeaderboardSet: Hashable, Codable, Sendable { public var data: Data public init(data: Data) { @@ -82,7 +82,7 @@ public struct GameCenterLeaderboardSetLocalizationCreateRequest: Hashable, Codab case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -100,7 +100,7 @@ public struct GameCenterLeaderboardSetLocalizationCreateRequest: Hashable, Codab case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case gameCenterLeaderboardSets } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterLeaderboardSetLocalizationUpdateRequest.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterLeaderboardSetLocalizationUpdateRequest.generated.swift index 4d0650d1..4a10513d 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterLeaderboardSetLocalizationUpdateRequest.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterLeaderboardSetLocalizationUpdateRequest.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct GameCenterLeaderboardSetLocalizationUpdateRequest: Hashable, Codable { +public struct GameCenterLeaderboardSetLocalizationUpdateRequest: Hashable, Codable, Sendable { public var data: Data public init(data: Data) { @@ -14,7 +14,7 @@ public struct GameCenterLeaderboardSetLocalizationUpdateRequest: Hashable, Codab case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -37,11 +37,11 @@ public struct GameCenterLeaderboardSetLocalizationUpdateRequest: Hashable, Codab case attributes } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case gameCenterLeaderboardSetLocalizations } - public struct Attributes: Hashable, Codable { + public struct Attributes: Hashable, Codable, Sendable { public var name: String? public init(name: String? = nil) { diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterLeaderboardSetMemberLocalizationCreateRequest.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterLeaderboardSetMemberLocalizationCreateRequest.generated.swift index 078d3126..3b3b986a 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterLeaderboardSetMemberLocalizationCreateRequest.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterLeaderboardSetMemberLocalizationCreateRequest.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct GameCenterLeaderboardSetMemberLocalizationCreateRequest: Hashable, Codable { +public struct GameCenterLeaderboardSetMemberLocalizationCreateRequest: Hashable, Codable, Sendable { public var data: Data public init(data: Data) { @@ -14,7 +14,7 @@ public struct GameCenterLeaderboardSetMemberLocalizationCreateRequest: Hashable, case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var type: `Type` public var attributes: Attributes? @@ -37,11 +37,11 @@ public struct GameCenterLeaderboardSetMemberLocalizationCreateRequest: Hashable, case relationships } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case gameCenterLeaderboardSetMemberLocalizations } - public struct Attributes: Hashable, Codable { + public struct Attributes: Hashable, Codable, Sendable { public var locale: String? public var name: String? @@ -60,7 +60,7 @@ public struct GameCenterLeaderboardSetMemberLocalizationCreateRequest: Hashable, } } - public struct Relationships: Hashable, Codable { + public struct Relationships: Hashable, Codable, Sendable { public var gameCenterLeaderboard: GameCenterLeaderboard public var gameCenterLeaderboardSet: GameCenterLeaderboardSet @@ -78,7 +78,7 @@ public struct GameCenterLeaderboardSetMemberLocalizationCreateRequest: Hashable, case gameCenterLeaderboardSet } - public struct GameCenterLeaderboard: Hashable, Codable { + public struct GameCenterLeaderboard: Hashable, Codable, Sendable { public var data: Data public init(data: Data) { @@ -89,7 +89,7 @@ public struct GameCenterLeaderboardSetMemberLocalizationCreateRequest: Hashable, case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -107,13 +107,13 @@ public struct GameCenterLeaderboardSetMemberLocalizationCreateRequest: Hashable, case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case gameCenterLeaderboards } } } - public struct GameCenterLeaderboardSet: Hashable, Codable { + public struct GameCenterLeaderboardSet: Hashable, Codable, Sendable { public var data: Data public init(data: Data) { @@ -124,7 +124,7 @@ public struct GameCenterLeaderboardSetMemberLocalizationCreateRequest: Hashable, case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -142,7 +142,7 @@ public struct GameCenterLeaderboardSetMemberLocalizationCreateRequest: Hashable, case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case gameCenterLeaderboardSets } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterLeaderboardSetMemberLocalizationUpdateRequest.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterLeaderboardSetMemberLocalizationUpdateRequest.generated.swift index 92f9f30f..cf1f619a 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterLeaderboardSetMemberLocalizationUpdateRequest.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterLeaderboardSetMemberLocalizationUpdateRequest.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct GameCenterLeaderboardSetMemberLocalizationUpdateRequest: Hashable, Codable { +public struct GameCenterLeaderboardSetMemberLocalizationUpdateRequest: Hashable, Codable, Sendable { public var data: Data public init(data: Data) { @@ -14,7 +14,7 @@ public struct GameCenterLeaderboardSetMemberLocalizationUpdateRequest: Hashable, case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -37,11 +37,11 @@ public struct GameCenterLeaderboardSetMemberLocalizationUpdateRequest: Hashable, case attributes } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case gameCenterLeaderboardSetMemberLocalizations } - public struct Attributes: Hashable, Codable { + public struct Attributes: Hashable, Codable, Sendable { public var name: String? public init(name: String? = nil) { diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterLeaderboardSetReleaseCreateRequest.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterLeaderboardSetReleaseCreateRequest.generated.swift index 4f995751..9f93050c 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterLeaderboardSetReleaseCreateRequest.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterLeaderboardSetReleaseCreateRequest.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct GameCenterLeaderboardSetReleaseCreateRequest: Hashable, Codable { +public struct GameCenterLeaderboardSetReleaseCreateRequest: Hashable, Codable, Sendable { public var data: Data public init(data: Data) { @@ -14,7 +14,7 @@ public struct GameCenterLeaderboardSetReleaseCreateRequest: Hashable, Codable { case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var type: `Type` public var relationships: Relationships @@ -32,11 +32,11 @@ public struct GameCenterLeaderboardSetReleaseCreateRequest: Hashable, Codable { case relationships } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case gameCenterLeaderboardSetReleases } - public struct Relationships: Hashable, Codable { + public struct Relationships: Hashable, Codable, Sendable { public var gameCenterDetail: GameCenterDetail public var gameCenterLeaderboardSet: GameCenterLeaderboardSet @@ -54,7 +54,7 @@ public struct GameCenterLeaderboardSetReleaseCreateRequest: Hashable, Codable { case gameCenterLeaderboardSet } - public struct GameCenterDetail: Hashable, Codable { + public struct GameCenterDetail: Hashable, Codable, Sendable { public var data: Data public init(data: Data) { @@ -65,7 +65,7 @@ public struct GameCenterLeaderboardSetReleaseCreateRequest: Hashable, Codable { case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -83,13 +83,13 @@ public struct GameCenterLeaderboardSetReleaseCreateRequest: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case gameCenterDetails } } } - public struct GameCenterLeaderboardSet: Hashable, Codable { + public struct GameCenterLeaderboardSet: Hashable, Codable, Sendable { public var data: Data public init(data: Data) { @@ -100,7 +100,7 @@ public struct GameCenterLeaderboardSetReleaseCreateRequest: Hashable, Codable { case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -118,7 +118,7 @@ public struct GameCenterLeaderboardSetReleaseCreateRequest: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case gameCenterLeaderboardSets } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterLeaderboardSetUpdateRequest.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterLeaderboardSetUpdateRequest.generated.swift index c8500286..4843ac70 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterLeaderboardSetUpdateRequest.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterLeaderboardSetUpdateRequest.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct GameCenterLeaderboardSetUpdateRequest: Hashable, Codable { +public struct GameCenterLeaderboardSetUpdateRequest: Hashable, Codable, Sendable { public var data: Data public init(data: Data) { @@ -14,7 +14,7 @@ public struct GameCenterLeaderboardSetUpdateRequest: Hashable, Codable { case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -37,11 +37,11 @@ public struct GameCenterLeaderboardSetUpdateRequest: Hashable, Codable { case attributes } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case gameCenterLeaderboardSets } - public struct Attributes: Hashable, Codable { + public struct Attributes: Hashable, Codable, Sendable { public var referenceName: String? public init(referenceName: String? = nil) { diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterLeaderboardUpdateRequest.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterLeaderboardUpdateRequest.generated.swift index a4d21424..1c9ca564 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterLeaderboardUpdateRequest.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterLeaderboardUpdateRequest.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct GameCenterLeaderboardUpdateRequest: Hashable, Codable { +public struct GameCenterLeaderboardUpdateRequest: Hashable, Codable, Sendable { public var data: Data public init(data: Data) { @@ -14,7 +14,7 @@ public struct GameCenterLeaderboardUpdateRequest: Hashable, Codable { case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -37,11 +37,13 @@ public struct GameCenterLeaderboardUpdateRequest: Hashable, Codable { case attributes } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case gameCenterLeaderboards } - public struct Attributes: Hashable, Codable { + public struct Attributes: Hashable, Codable, Sendable { + public var activityProperties: [String: String]? + public var archived: Bool? public var defaultFormatter: GameCenterLeaderboardFormatter? @@ -62,7 +64,10 @@ public struct GameCenterLeaderboardUpdateRequest: Hashable, Codable { public var submissionType: SubmissionType? + public var visibility: Visibility? + public init( + activityProperties: [String: String]? = nil, archived: Bool? = nil, defaultFormatter: GameCenterLeaderboardFormatter? = nil, recurrenceDuration: String? = nil, @@ -72,8 +77,10 @@ public struct GameCenterLeaderboardUpdateRequest: Hashable, Codable { scoreRangeEnd: String? = nil, scoreRangeStart: String? = nil, scoreSortType: ScoreSortType? = nil, - submissionType: SubmissionType? = nil + submissionType: SubmissionType? = nil, + visibility: Visibility? = nil ) { + self.activityProperties = activityProperties self.archived = archived self.defaultFormatter = defaultFormatter self.recurrenceDuration = recurrenceDuration @@ -84,9 +91,11 @@ public struct GameCenterLeaderboardUpdateRequest: Hashable, Codable { self.scoreRangeStart = scoreRangeStart self.scoreSortType = scoreSortType self.submissionType = submissionType + self.visibility = visibility } private enum CodingKeys: String, CodingKey { + case activityProperties case archived case defaultFormatter case recurrenceDuration @@ -97,49 +106,66 @@ public struct GameCenterLeaderboardUpdateRequest: Hashable, Codable { case scoreRangeStart case scoreSortType case submissionType + case visibility } - public enum ScoreSortType: Hashable, Codable, RawRepresentable { - case asc - case desc - case unknown(String) - - public var rawValue: String { - switch self { - case .asc: return "ASC" - case .desc: return "DESC" - case .unknown(let rawValue): return rawValue - } + public struct ScoreSortType: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var asc: Self { + .init(rawValue: "ASC") + } + + public static var desc: Self { + .init(rawValue: "DESC") + } + + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "ASC": self = .asc - case "DESC": self = .desc - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum SubmissionType: Hashable, Codable, RawRepresentable { - case bestScore - case mostRecentScore - case unknown(String) - - public var rawValue: String { - switch self { - case .bestScore: return "BEST_SCORE" - case .mostRecentScore: return "MOST_RECENT_SCORE" - case .unknown(let rawValue): return rawValue - } + public struct SubmissionType: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var bestScore: Self { + .init(rawValue: "BEST_SCORE") + } + + public static var mostRecentScore: Self { + .init(rawValue: "MOST_RECENT_SCORE") } + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct Visibility: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var hideForAll: Self { + .init(rawValue: "HIDE_FOR_ALL") + } + + public static var showForAll: Self { + .init(rawValue: "SHOW_FOR_ALL") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "BEST_SCORE": self = .bestScore - case "MOST_RECENT_SCORE": self = .mostRecentScore - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterMatchmakingQueueCreateRequest.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterMatchmakingQueueCreateRequest.generated.swift index 97a9cfca..afb484b2 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterMatchmakingQueueCreateRequest.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterMatchmakingQueueCreateRequest.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct GameCenterMatchmakingQueueCreateRequest: Hashable, Codable { +public struct GameCenterMatchmakingQueueCreateRequest: Hashable, Codable, Sendable { public var data: Data public init(data: Data) { @@ -14,7 +14,7 @@ public struct GameCenterMatchmakingQueueCreateRequest: Hashable, Codable { case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var type: `Type` public var attributes: Attributes @@ -37,23 +37,30 @@ public struct GameCenterMatchmakingQueueCreateRequest: Hashable, Codable { case relationships } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case gameCenterMatchmakingQueues } - public struct Attributes: Hashable, Codable { + public struct Attributes: Hashable, Codable, Sendable { + public var classicMatchmakingBundleIds: [String]? + public var referenceName: String - public init(referenceName: String) { + public init( + classicMatchmakingBundleIds: [String]? = nil, + referenceName: String + ) { + self.classicMatchmakingBundleIds = classicMatchmakingBundleIds self.referenceName = referenceName } private enum CodingKeys: String, CodingKey { + case classicMatchmakingBundleIds case referenceName } } - public struct Relationships: Hashable, Codable { + public struct Relationships: Hashable, Codable, Sendable { public var experimentRuleSet: ExperimentRuleSet? public var ruleSet: RuleSet @@ -71,7 +78,7 @@ public struct GameCenterMatchmakingQueueCreateRequest: Hashable, Codable { case ruleSet } - public struct ExperimentRuleSet: Hashable, Codable { + public struct ExperimentRuleSet: Hashable, Codable, Sendable { public var data: Data? public init(data: Data? = nil) { @@ -82,7 +89,7 @@ public struct GameCenterMatchmakingQueueCreateRequest: Hashable, Codable { case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -100,13 +107,13 @@ public struct GameCenterMatchmakingQueueCreateRequest: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case gameCenterMatchmakingRuleSets } } } - public struct RuleSet: Hashable, Codable { + public struct RuleSet: Hashable, Codable, Sendable { public var data: Data public init(data: Data) { @@ -117,7 +124,7 @@ public struct GameCenterMatchmakingQueueCreateRequest: Hashable, Codable { case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -135,7 +142,7 @@ public struct GameCenterMatchmakingQueueCreateRequest: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case gameCenterMatchmakingRuleSets } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterMatchmakingQueueUpdateRequest.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterMatchmakingQueueUpdateRequest.generated.swift index 341beb84..c482b5b6 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterMatchmakingQueueUpdateRequest.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterMatchmakingQueueUpdateRequest.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct GameCenterMatchmakingQueueUpdateRequest: Hashable, Codable { +public struct GameCenterMatchmakingQueueUpdateRequest: Hashable, Codable, Sendable { public var data: Data public init(data: Data) { @@ -14,34 +14,51 @@ public struct GameCenterMatchmakingQueueUpdateRequest: Hashable, Codable { case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` + public var attributes: Attributes? + public var relationships: Relationships? public init( id: String, type: `Type`, + attributes: Attributes? = nil, relationships: Relationships? = nil ) { self.id = id self.type = type + self.attributes = attributes self.relationships = relationships } private enum CodingKeys: String, CodingKey { case id case type + case attributes case relationships } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case gameCenterMatchmakingQueues } - public struct Relationships: Hashable, Codable { + public struct Attributes: Hashable, Codable, Sendable { + public var classicMatchmakingBundleIds: [String]? + + public init(classicMatchmakingBundleIds: [String]? = nil) { + self.classicMatchmakingBundleIds = classicMatchmakingBundleIds + } + + private enum CodingKeys: String, CodingKey { + case classicMatchmakingBundleIds + } + } + + public struct Relationships: Hashable, Codable, Sendable { public var experimentRuleSet: ExperimentRuleSet? public var ruleSet: RuleSet? @@ -59,7 +76,7 @@ public struct GameCenterMatchmakingQueueUpdateRequest: Hashable, Codable { case ruleSet } - public struct ExperimentRuleSet: Hashable, Codable { + public struct ExperimentRuleSet: Hashable, Codable, Sendable { public var data: Data? public init(data: Data? = nil) { @@ -70,7 +87,7 @@ public struct GameCenterMatchmakingQueueUpdateRequest: Hashable, Codable { case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -88,13 +105,13 @@ public struct GameCenterMatchmakingQueueUpdateRequest: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case gameCenterMatchmakingRuleSets } } } - public struct RuleSet: Hashable, Codable { + public struct RuleSet: Hashable, Codable, Sendable { public var data: Data? public init(data: Data? = nil) { @@ -105,7 +122,7 @@ public struct GameCenterMatchmakingQueueUpdateRequest: Hashable, Codable { case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -123,7 +140,7 @@ public struct GameCenterMatchmakingQueueUpdateRequest: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case gameCenterMatchmakingRuleSets } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterMatchmakingRuleCreateRequest.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterMatchmakingRuleCreateRequest.generated.swift index f6b6a6d8..667063f5 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterMatchmakingRuleCreateRequest.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterMatchmakingRuleCreateRequest.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct GameCenterMatchmakingRuleCreateRequest: Hashable, Codable { +public struct GameCenterMatchmakingRuleCreateRequest: Hashable, Codable, Sendable { public var data: Data public init(data: Data) { @@ -14,7 +14,7 @@ public struct GameCenterMatchmakingRuleCreateRequest: Hashable, Codable { case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var type: `Type` public var attributes: Attributes @@ -37,11 +37,11 @@ public struct GameCenterMatchmakingRuleCreateRequest: Hashable, Codable { case relationships } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case gameCenterMatchmakingRules } - public struct Attributes: Hashable, Codable { + public struct Attributes: Hashable, Codable, Sendable { public var type: `Type` public var description: String @@ -74,36 +74,36 @@ public struct GameCenterMatchmakingRuleCreateRequest: Hashable, Codable { case weight } - public enum `Type`: Hashable, Codable, RawRepresentable { - case compatible - case distance - case match - case team - case unknown(String) - - public var rawValue: String { - switch self { - case .compatible: return "COMPATIBLE" - case .distance: return "DISTANCE" - case .match: return "MATCH" - case .team: return "TEAM" - case .unknown(let rawValue): return rawValue - } + public struct `Type`: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var compatible: Self { + .init(rawValue: "COMPATIBLE") + } + + public static var distance: Self { + .init(rawValue: "DISTANCE") } + public static var match: Self { + .init(rawValue: "MATCH") + } + + public static var team: Self { + .init(rawValue: "TEAM") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "COMPATIBLE": self = .compatible - case "DISTANCE": self = .distance - case "MATCH": self = .match - case "TEAM": self = .team - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } } - public struct Relationships: Hashable, Codable { + public struct Relationships: Hashable, Codable, Sendable { public var ruleSet: RuleSet public init(ruleSet: RuleSet) { @@ -114,7 +114,7 @@ public struct GameCenterMatchmakingRuleCreateRequest: Hashable, Codable { case ruleSet } - public struct RuleSet: Hashable, Codable { + public struct RuleSet: Hashable, Codable, Sendable { public var data: Data public init(data: Data) { @@ -125,7 +125,7 @@ public struct GameCenterMatchmakingRuleCreateRequest: Hashable, Codable { case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -143,7 +143,7 @@ public struct GameCenterMatchmakingRuleCreateRequest: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case gameCenterMatchmakingRuleSets } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterMatchmakingRuleSetCreateRequest.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterMatchmakingRuleSetCreateRequest.generated.swift index fb36a4ee..217f8aed 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterMatchmakingRuleSetCreateRequest.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterMatchmakingRuleSetCreateRequest.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct GameCenterMatchmakingRuleSetCreateRequest: Hashable, Codable { +public struct GameCenterMatchmakingRuleSetCreateRequest: Hashable, Codable, Sendable { public var data: Data public init(data: Data) { @@ -14,7 +14,7 @@ public struct GameCenterMatchmakingRuleSetCreateRequest: Hashable, Codable { case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var type: `Type` public var attributes: Attributes @@ -32,11 +32,11 @@ public struct GameCenterMatchmakingRuleSetCreateRequest: Hashable, Codable { case attributes } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case gameCenterMatchmakingRuleSets } - public struct Attributes: Hashable, Codable { + public struct Attributes: Hashable, Codable, Sendable { public var maxPlayers: Int public var minPlayers: Int diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterMatchmakingRuleSetTestCreateRequest.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterMatchmakingRuleSetTestCreateRequest.generated.swift index ca33e951..b61561ca 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterMatchmakingRuleSetTestCreateRequest.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterMatchmakingRuleSetTestCreateRequest.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct GameCenterMatchmakingRuleSetTestCreateRequest: Hashable, Codable { +public struct GameCenterMatchmakingRuleSetTestCreateRequest: Hashable, Codable, Sendable { public var data: Data public var included: [Included]? @@ -21,7 +21,7 @@ public struct GameCenterMatchmakingRuleSetTestCreateRequest: Hashable, Codable { case included } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var type: `Type` public var relationships: Relationships @@ -39,11 +39,11 @@ public struct GameCenterMatchmakingRuleSetTestCreateRequest: Hashable, Codable { case relationships } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case gameCenterMatchmakingRuleSetTests } - public struct Relationships: Hashable, Codable { + public struct Relationships: Hashable, Codable, Sendable { public var matchmakingRequests: MatchmakingRequests public var matchmakingRuleSet: MatchmakingRuleSet @@ -61,7 +61,7 @@ public struct GameCenterMatchmakingRuleSetTestCreateRequest: Hashable, Codable { case matchmakingRuleSet } - public struct MatchmakingRequests: Hashable, Codable { + public struct MatchmakingRequests: Hashable, Codable, Sendable { public var data: [Data] public init(data: [Data]) { @@ -72,7 +72,7 @@ public struct GameCenterMatchmakingRuleSetTestCreateRequest: Hashable, Codable { case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -90,13 +90,13 @@ public struct GameCenterMatchmakingRuleSetTestCreateRequest: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case gameCenterMatchmakingTestRequests } } } - public struct MatchmakingRuleSet: Hashable, Codable { + public struct MatchmakingRuleSet: Hashable, Codable, Sendable { public var data: Data public init(data: Data) { @@ -107,7 +107,7 @@ public struct GameCenterMatchmakingRuleSetTestCreateRequest: Hashable, Codable { case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -125,7 +125,7 @@ public struct GameCenterMatchmakingRuleSetTestCreateRequest: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case gameCenterMatchmakingRuleSets } } @@ -133,7 +133,7 @@ public struct GameCenterMatchmakingRuleSetTestCreateRequest: Hashable, Codable { } } - public enum Included: Hashable, Codable { + public enum Included: Hashable, Codable, Sendable { case gameCenterMatchmakingTestPlayerPropertyInlineCreate(GameCenterMatchmakingTestPlayerPropertyInlineCreate) case gameCenterMatchmakingTestRequestInlineCreate(GameCenterMatchmakingTestRequestInlineCreate) diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterMatchmakingRuleSetUpdateRequest.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterMatchmakingRuleSetUpdateRequest.generated.swift index 334c5332..b302ea71 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterMatchmakingRuleSetUpdateRequest.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterMatchmakingRuleSetUpdateRequest.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct GameCenterMatchmakingRuleSetUpdateRequest: Hashable, Codable { +public struct GameCenterMatchmakingRuleSetUpdateRequest: Hashable, Codable, Sendable { public var data: Data public init(data: Data) { @@ -14,7 +14,7 @@ public struct GameCenterMatchmakingRuleSetUpdateRequest: Hashable, Codable { case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -37,11 +37,11 @@ public struct GameCenterMatchmakingRuleSetUpdateRequest: Hashable, Codable { case attributes } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case gameCenterMatchmakingRuleSets } - public struct Attributes: Hashable, Codable { + public struct Attributes: Hashable, Codable, Sendable { public var maxPlayers: Int? public var minPlayers: Int? diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterMatchmakingRuleUpdateRequest.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterMatchmakingRuleUpdateRequest.generated.swift index 212096f6..d5459d8c 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterMatchmakingRuleUpdateRequest.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterMatchmakingRuleUpdateRequest.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct GameCenterMatchmakingRuleUpdateRequest: Hashable, Codable { +public struct GameCenterMatchmakingRuleUpdateRequest: Hashable, Codable, Sendable { public var data: Data public init(data: Data) { @@ -14,7 +14,7 @@ public struct GameCenterMatchmakingRuleUpdateRequest: Hashable, Codable { case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -37,11 +37,11 @@ public struct GameCenterMatchmakingRuleUpdateRequest: Hashable, Codable { case attributes } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case gameCenterMatchmakingRules } - public struct Attributes: Hashable, Codable { + public struct Attributes: Hashable, Codable, Sendable { public var description: String? public var expression: String? diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterMatchmakingTeamCreateRequest.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterMatchmakingTeamCreateRequest.generated.swift index 3a7930ec..f3f698a6 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterMatchmakingTeamCreateRequest.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterMatchmakingTeamCreateRequest.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct GameCenterMatchmakingTeamCreateRequest: Hashable, Codable { +public struct GameCenterMatchmakingTeamCreateRequest: Hashable, Codable, Sendable { public var data: Data public init(data: Data) { @@ -14,7 +14,7 @@ public struct GameCenterMatchmakingTeamCreateRequest: Hashable, Codable { case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var type: `Type` public var attributes: Attributes @@ -37,11 +37,11 @@ public struct GameCenterMatchmakingTeamCreateRequest: Hashable, Codable { case relationships } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case gameCenterMatchmakingTeams } - public struct Attributes: Hashable, Codable { + public struct Attributes: Hashable, Codable, Sendable { public var maxPlayers: Int public var minPlayers: Int @@ -65,7 +65,7 @@ public struct GameCenterMatchmakingTeamCreateRequest: Hashable, Codable { } } - public struct Relationships: Hashable, Codable { + public struct Relationships: Hashable, Codable, Sendable { public var ruleSet: RuleSet public init(ruleSet: RuleSet) { @@ -76,7 +76,7 @@ public struct GameCenterMatchmakingTeamCreateRequest: Hashable, Codable { case ruleSet } - public struct RuleSet: Hashable, Codable { + public struct RuleSet: Hashable, Codable, Sendable { public var data: Data public init(data: Data) { @@ -87,7 +87,7 @@ public struct GameCenterMatchmakingTeamCreateRequest: Hashable, Codable { case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -105,7 +105,7 @@ public struct GameCenterMatchmakingTeamCreateRequest: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case gameCenterMatchmakingRuleSets } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterMatchmakingTeamUpdateRequest.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterMatchmakingTeamUpdateRequest.generated.swift index d4b746af..989d9a74 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterMatchmakingTeamUpdateRequest.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterMatchmakingTeamUpdateRequest.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct GameCenterMatchmakingTeamUpdateRequest: Hashable, Codable { +public struct GameCenterMatchmakingTeamUpdateRequest: Hashable, Codable, Sendable { public var data: Data public init(data: Data) { @@ -14,7 +14,7 @@ public struct GameCenterMatchmakingTeamUpdateRequest: Hashable, Codable { case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -37,11 +37,11 @@ public struct GameCenterMatchmakingTeamUpdateRequest: Hashable, Codable { case attributes } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case gameCenterMatchmakingTeams } - public struct Attributes: Hashable, Codable { + public struct Attributes: Hashable, Codable, Sendable { public var maxPlayers: Int? public var minPlayers: Int? diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterPlayerAchievementSubmissionCreateRequest.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterPlayerAchievementSubmissionCreateRequest.generated.swift new file mode 100644 index 00000000..dd368a3e --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterPlayerAchievementSubmissionCreateRequest.generated.swift @@ -0,0 +1,80 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct GameCenterPlayerAchievementSubmissionCreateRequest: Hashable, Codable, Sendable { + public var data: Data + + public init(data: Data) { + self.data = data + } + + private enum CodingKeys: String, CodingKey { + case data + } + + public struct Data: Hashable, Codable, Sendable { + public var type: `Type` + + public var attributes: Attributes + + public init( + type: `Type`, + attributes: Attributes + ) { + self.type = type + self.attributes = attributes + } + + private enum CodingKeys: String, CodingKey { + case type + case attributes + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case gameCenterPlayerAchievementSubmissions + } + + public struct Attributes: Hashable, Codable, Sendable { + public var bundleId: String + + public var challengeIds: [String]? + + public var percentageAchieved: Int + + public var scopedPlayerId: String + + public var submittedDate: String? + + public var vendorIdentifier: String + + public init( + bundleId: String, + challengeIds: [String]? = nil, + percentageAchieved: Int, + scopedPlayerId: String, + submittedDate: String? = nil, + vendorIdentifier: String + ) { + self.bundleId = bundleId + self.challengeIds = challengeIds + self.percentageAchieved = percentageAchieved + self.scopedPlayerId = scopedPlayerId + self.submittedDate = submittedDate + self.vendorIdentifier = vendorIdentifier + } + + private enum CodingKeys: String, CodingKey { + case bundleId + case challengeIds + case percentageAchieved + case scopedPlayerId + case submittedDate + case vendorIdentifier + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/InAppPurchaseAppStoreReviewScreenshotCreateRequest.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/InAppPurchaseAppStoreReviewScreenshotCreateRequest.generated.swift index 1c7f2a37..3bd959de 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/InAppPurchaseAppStoreReviewScreenshotCreateRequest.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/InAppPurchaseAppStoreReviewScreenshotCreateRequest.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct InAppPurchaseAppStoreReviewScreenshotCreateRequest: Hashable, Codable { +public struct InAppPurchaseAppStoreReviewScreenshotCreateRequest: Hashable, Codable, Sendable { public var data: Data public init(data: Data) { @@ -14,7 +14,7 @@ public struct InAppPurchaseAppStoreReviewScreenshotCreateRequest: Hashable, Coda case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var type: `Type` public var attributes: Attributes @@ -37,11 +37,11 @@ public struct InAppPurchaseAppStoreReviewScreenshotCreateRequest: Hashable, Coda case relationships } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case inAppPurchaseAppStoreReviewScreenshots } - public struct Attributes: Hashable, Codable { + public struct Attributes: Hashable, Codable, Sendable { public var fileName: String public var fileSize: Int @@ -60,7 +60,7 @@ public struct InAppPurchaseAppStoreReviewScreenshotCreateRequest: Hashable, Coda } } - public struct Relationships: Hashable, Codable { + public struct Relationships: Hashable, Codable, Sendable { public var inAppPurchaseV2: InAppPurchaseV2 public init(inAppPurchaseV2: InAppPurchaseV2) { @@ -71,7 +71,7 @@ public struct InAppPurchaseAppStoreReviewScreenshotCreateRequest: Hashable, Coda case inAppPurchaseV2 } - public struct InAppPurchaseV2: Hashable, Codable { + public struct InAppPurchaseV2: Hashable, Codable, Sendable { public var data: Data public init(data: Data) { @@ -82,7 +82,7 @@ public struct InAppPurchaseAppStoreReviewScreenshotCreateRequest: Hashable, Coda case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -100,7 +100,7 @@ public struct InAppPurchaseAppStoreReviewScreenshotCreateRequest: Hashable, Coda case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case inAppPurchases } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/InAppPurchaseAppStoreReviewScreenshotUpdateRequest.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/InAppPurchaseAppStoreReviewScreenshotUpdateRequest.generated.swift index 197d09ad..0cc6ae5f 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/InAppPurchaseAppStoreReviewScreenshotUpdateRequest.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/InAppPurchaseAppStoreReviewScreenshotUpdateRequest.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct InAppPurchaseAppStoreReviewScreenshotUpdateRequest: Hashable, Codable { +public struct InAppPurchaseAppStoreReviewScreenshotUpdateRequest: Hashable, Codable, Sendable { public var data: Data public init(data: Data) { @@ -14,7 +14,7 @@ public struct InAppPurchaseAppStoreReviewScreenshotUpdateRequest: Hashable, Coda case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -37,11 +37,11 @@ public struct InAppPurchaseAppStoreReviewScreenshotUpdateRequest: Hashable, Coda case attributes } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case inAppPurchaseAppStoreReviewScreenshots } - public struct Attributes: Hashable, Codable { + public struct Attributes: Hashable, Codable, Sendable { public var sourceFileChecksum: String? public var uploaded: Bool? diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/InAppPurchaseAvailabilityCreateRequest.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/InAppPurchaseAvailabilityCreateRequest.generated.swift index b18f861a..2138b187 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/InAppPurchaseAvailabilityCreateRequest.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/InAppPurchaseAvailabilityCreateRequest.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct InAppPurchaseAvailabilityCreateRequest: Hashable, Codable { +public struct InAppPurchaseAvailabilityCreateRequest: Hashable, Codable, Sendable { public var data: Data public init(data: Data) { @@ -14,7 +14,7 @@ public struct InAppPurchaseAvailabilityCreateRequest: Hashable, Codable { case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var type: `Type` public var attributes: Attributes @@ -37,11 +37,11 @@ public struct InAppPurchaseAvailabilityCreateRequest: Hashable, Codable { case relationships } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case inAppPurchaseAvailabilities } - public struct Attributes: Hashable, Codable { + public struct Attributes: Hashable, Codable, Sendable { public var availableInNewTerritories: Bool public init(availableInNewTerritories: Bool) { @@ -53,7 +53,7 @@ public struct InAppPurchaseAvailabilityCreateRequest: Hashable, Codable { } } - public struct Relationships: Hashable, Codable { + public struct Relationships: Hashable, Codable, Sendable { public var availableTerritories: AvailableTerritories public var inAppPurchase: InAppPurchase @@ -71,7 +71,7 @@ public struct InAppPurchaseAvailabilityCreateRequest: Hashable, Codable { case inAppPurchase } - public struct AvailableTerritories: Hashable, Codable { + public struct AvailableTerritories: Hashable, Codable, Sendable { public var data: [Data] public init(data: [Data]) { @@ -82,7 +82,7 @@ public struct InAppPurchaseAvailabilityCreateRequest: Hashable, Codable { case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -100,13 +100,13 @@ public struct InAppPurchaseAvailabilityCreateRequest: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case territories } } } - public struct InAppPurchase: Hashable, Codable { + public struct InAppPurchase: Hashable, Codable, Sendable { public var data: Data public init(data: Data) { @@ -117,7 +117,7 @@ public struct InAppPurchaseAvailabilityCreateRequest: Hashable, Codable { case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -135,7 +135,7 @@ public struct InAppPurchaseAvailabilityCreateRequest: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case inAppPurchases } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/InAppPurchaseImageCreateRequest.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/InAppPurchaseImageCreateRequest.generated.swift new file mode 100644 index 00000000..bc4349e3 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/InAppPurchaseImageCreateRequest.generated.swift @@ -0,0 +1,112 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct InAppPurchaseImageCreateRequest: Hashable, Codable, Sendable { + public var data: Data + + public init(data: Data) { + self.data = data + } + + private enum CodingKeys: String, CodingKey { + case data + } + + public struct Data: Hashable, Codable, Sendable { + public var type: `Type` + + public var attributes: Attributes + + public var relationships: Relationships + + public init( + type: `Type`, + attributes: Attributes, + relationships: Relationships + ) { + self.type = type + self.attributes = attributes + self.relationships = relationships + } + + private enum CodingKeys: String, CodingKey { + case type + case attributes + case relationships + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case inAppPurchaseImages + } + + public struct Attributes: Hashable, Codable, Sendable { + public var fileName: String + + public var fileSize: Int + + public init( + fileName: String, + fileSize: Int + ) { + self.fileName = fileName + self.fileSize = fileSize + } + + private enum CodingKeys: String, CodingKey { + case fileName + case fileSize + } + } + + public struct Relationships: Hashable, Codable, Sendable { + public var inAppPurchase: InAppPurchase + + public init(inAppPurchase: InAppPurchase) { + self.inAppPurchase = inAppPurchase + } + + private enum CodingKeys: String, CodingKey { + case inAppPurchase + } + + public struct InAppPurchase: Hashable, Codable, Sendable { + public var data: Data + + public init(data: Data) { + self.data = data + } + + private enum CodingKeys: String, CodingKey { + case data + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case inAppPurchases + } + } + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/InAppPurchaseImageUpdateRequest.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/InAppPurchaseImageUpdateRequest.generated.swift new file mode 100644 index 00000000..e38178e1 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/InAppPurchaseImageUpdateRequest.generated.swift @@ -0,0 +1,65 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct InAppPurchaseImageUpdateRequest: Hashable, Codable, Sendable { + public var data: Data + + public init(data: Data) { + self.data = data + } + + private enum CodingKeys: String, CodingKey { + case data + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public var attributes: Attributes? + + public init( + id: String, + type: `Type`, + attributes: Attributes? = nil + ) { + self.id = id + self.type = type + self.attributes = attributes + } + + private enum CodingKeys: String, CodingKey { + case id + case type + case attributes + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case inAppPurchaseImages + } + + public struct Attributes: Hashable, Codable, Sendable { + public var sourceFileChecksum: String? + + public var uploaded: Bool? + + public init( + sourceFileChecksum: String? = nil, + uploaded: Bool? = nil + ) { + self.sourceFileChecksum = sourceFileChecksum + self.uploaded = uploaded + } + + private enum CodingKeys: String, CodingKey { + case sourceFileChecksum + case uploaded + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/InAppPurchaseLocalizationCreateRequest.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/InAppPurchaseLocalizationCreateRequest.generated.swift index 9f7cd721..dc7afafe 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/InAppPurchaseLocalizationCreateRequest.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/InAppPurchaseLocalizationCreateRequest.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct InAppPurchaseLocalizationCreateRequest: Hashable, Codable { +public struct InAppPurchaseLocalizationCreateRequest: Hashable, Codable, Sendable { public var data: Data public init(data: Data) { @@ -14,7 +14,7 @@ public struct InAppPurchaseLocalizationCreateRequest: Hashable, Codable { case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var type: `Type` public var attributes: Attributes @@ -37,11 +37,11 @@ public struct InAppPurchaseLocalizationCreateRequest: Hashable, Codable { case relationships } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case inAppPurchaseLocalizations } - public struct Attributes: Hashable, Codable { + public struct Attributes: Hashable, Codable, Sendable { public var description: String? public var locale: String @@ -65,7 +65,7 @@ public struct InAppPurchaseLocalizationCreateRequest: Hashable, Codable { } } - public struct Relationships: Hashable, Codable { + public struct Relationships: Hashable, Codable, Sendable { public var inAppPurchaseV2: InAppPurchaseV2 public init(inAppPurchaseV2: InAppPurchaseV2) { @@ -76,7 +76,7 @@ public struct InAppPurchaseLocalizationCreateRequest: Hashable, Codable { case inAppPurchaseV2 } - public struct InAppPurchaseV2: Hashable, Codable { + public struct InAppPurchaseV2: Hashable, Codable, Sendable { public var data: Data public init(data: Data) { @@ -87,7 +87,7 @@ public struct InAppPurchaseLocalizationCreateRequest: Hashable, Codable { case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -105,7 +105,7 @@ public struct InAppPurchaseLocalizationCreateRequest: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case inAppPurchases } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/InAppPurchaseLocalizationUpdateRequest.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/InAppPurchaseLocalizationUpdateRequest.generated.swift index fdac7928..b66fa9b7 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/InAppPurchaseLocalizationUpdateRequest.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/InAppPurchaseLocalizationUpdateRequest.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct InAppPurchaseLocalizationUpdateRequest: Hashable, Codable { +public struct InAppPurchaseLocalizationUpdateRequest: Hashable, Codable, Sendable { public var data: Data public init(data: Data) { @@ -14,7 +14,7 @@ public struct InAppPurchaseLocalizationUpdateRequest: Hashable, Codable { case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -37,11 +37,11 @@ public struct InAppPurchaseLocalizationUpdateRequest: Hashable, Codable { case attributes } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case inAppPurchaseLocalizations } - public struct Attributes: Hashable, Codable { + public struct Attributes: Hashable, Codable, Sendable { public var description: String? public var name: String? diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/InAppPurchasePriceScheduleCreateRequest.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/InAppPurchasePriceScheduleCreateRequest.generated.swift index 22f4bcce..b7df17f0 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/InAppPurchasePriceScheduleCreateRequest.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/InAppPurchasePriceScheduleCreateRequest.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct InAppPurchasePriceScheduleCreateRequest: Hashable, Codable { +public struct InAppPurchasePriceScheduleCreateRequest: Hashable, Codable, Sendable { public var data: Data public var included: [Included]? @@ -21,7 +21,7 @@ public struct InAppPurchasePriceScheduleCreateRequest: Hashable, Codable { case included } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var type: `Type` public var relationships: Relationships @@ -39,19 +39,19 @@ public struct InAppPurchasePriceScheduleCreateRequest: Hashable, Codable { case relationships } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case inAppPurchasePriceSchedules } - public struct Relationships: Hashable, Codable { - public var baseTerritory: BaseTerritory? + public struct Relationships: Hashable, Codable, Sendable { + public var baseTerritory: BaseTerritory public var inAppPurchase: InAppPurchase public var manualPrices: ManualPrices public init( - baseTerritory: BaseTerritory? = nil, + baseTerritory: BaseTerritory, inAppPurchase: InAppPurchase, manualPrices: ManualPrices ) { @@ -66,10 +66,10 @@ public struct InAppPurchasePriceScheduleCreateRequest: Hashable, Codable { case manualPrices } - public struct BaseTerritory: Hashable, Codable { - public var data: Data? + public struct BaseTerritory: Hashable, Codable, Sendable { + public var data: Data - public init(data: Data? = nil) { + public init(data: Data) { self.data = data } @@ -77,7 +77,7 @@ public struct InAppPurchasePriceScheduleCreateRequest: Hashable, Codable { case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -95,13 +95,13 @@ public struct InAppPurchasePriceScheduleCreateRequest: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case territories } } } - public struct InAppPurchase: Hashable, Codable { + public struct InAppPurchase: Hashable, Codable, Sendable { public var data: Data public init(data: Data) { @@ -112,7 +112,7 @@ public struct InAppPurchasePriceScheduleCreateRequest: Hashable, Codable { case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -130,13 +130,13 @@ public struct InAppPurchasePriceScheduleCreateRequest: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case inAppPurchases } } } - public struct ManualPrices: Hashable, Codable { + public struct ManualPrices: Hashable, Codable, Sendable { public var data: [Data] public init(data: [Data]) { @@ -147,7 +147,7 @@ public struct InAppPurchasePriceScheduleCreateRequest: Hashable, Codable { case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -165,7 +165,7 @@ public struct InAppPurchasePriceScheduleCreateRequest: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case inAppPurchasePrices } } @@ -173,7 +173,7 @@ public struct InAppPurchasePriceScheduleCreateRequest: Hashable, Codable { } } - public enum Included: Hashable, Codable { + public enum Included: Hashable, Codable, Sendable { case inAppPurchasePriceInlineCreate(InAppPurchasePriceInlineCreate) case territoryInlineCreate(TerritoryInlineCreate) diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/InAppPurchaseSubmissionCreateRequest.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/InAppPurchaseSubmissionCreateRequest.generated.swift index e222cb00..53b57ebd 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/InAppPurchaseSubmissionCreateRequest.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/InAppPurchaseSubmissionCreateRequest.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct InAppPurchaseSubmissionCreateRequest: Hashable, Codable { +public struct InAppPurchaseSubmissionCreateRequest: Hashable, Codable, Sendable { public var data: Data public init(data: Data) { @@ -14,7 +14,7 @@ public struct InAppPurchaseSubmissionCreateRequest: Hashable, Codable { case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var type: `Type` public var relationships: Relationships @@ -32,11 +32,11 @@ public struct InAppPurchaseSubmissionCreateRequest: Hashable, Codable { case relationships } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case inAppPurchaseSubmissions } - public struct Relationships: Hashable, Codable { + public struct Relationships: Hashable, Codable, Sendable { public var inAppPurchaseV2: InAppPurchaseV2 public init(inAppPurchaseV2: InAppPurchaseV2) { @@ -47,7 +47,7 @@ public struct InAppPurchaseSubmissionCreateRequest: Hashable, Codable { case inAppPurchaseV2 } - public struct InAppPurchaseV2: Hashable, Codable { + public struct InAppPurchaseV2: Hashable, Codable, Sendable { public var data: Data public init(data: Data) { @@ -58,7 +58,7 @@ public struct InAppPurchaseSubmissionCreateRequest: Hashable, Codable { case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -76,7 +76,7 @@ public struct InAppPurchaseSubmissionCreateRequest: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case inAppPurchases } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/InAppPurchaseV2CreateRequest.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/InAppPurchaseV2CreateRequest.generated.swift index a062ac98..6694f93c 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/InAppPurchaseV2CreateRequest.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/InAppPurchaseV2CreateRequest.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct InAppPurchaseV2CreateRequest: Hashable, Codable { +public struct InAppPurchaseV2CreateRequest: Hashable, Codable, Sendable { public var data: Data public init(data: Data) { @@ -14,7 +14,7 @@ public struct InAppPurchaseV2CreateRequest: Hashable, Codable { case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var type: `Type` public var attributes: Attributes @@ -37,14 +37,11 @@ public struct InAppPurchaseV2CreateRequest: Hashable, Codable { case relationships } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case inAppPurchases } - public struct Attributes: Hashable, Codable { - @available(*, deprecated) - public var availableInAllTerritories: Bool? - + public struct Attributes: Hashable, Codable, Sendable { public var familySharable: Bool? public var inAppPurchaseType: InAppPurchaseType @@ -56,14 +53,12 @@ public struct InAppPurchaseV2CreateRequest: Hashable, Codable { public var reviewNote: String? public init( - availableInAllTerritories: Bool? = nil, familySharable: Bool? = nil, inAppPurchaseType: InAppPurchaseType, name: String, productId: String, reviewNote: String? = nil ) { - self.availableInAllTerritories = availableInAllTerritories self.familySharable = familySharable self.inAppPurchaseType = inAppPurchaseType self.name = name @@ -72,7 +67,6 @@ public struct InAppPurchaseV2CreateRequest: Hashable, Codable { } private enum CodingKeys: String, CodingKey { - case availableInAllTerritories case familySharable case inAppPurchaseType case name @@ -81,7 +75,7 @@ public struct InAppPurchaseV2CreateRequest: Hashable, Codable { } } - public struct Relationships: Hashable, Codable { + public struct Relationships: Hashable, Codable, Sendable { public var app: App public init(app: App) { @@ -92,7 +86,7 @@ public struct InAppPurchaseV2CreateRequest: Hashable, Codable { case app } - public struct App: Hashable, Codable { + public struct App: Hashable, Codable, Sendable { public var data: Data public init(data: Data) { @@ -103,7 +97,7 @@ public struct InAppPurchaseV2CreateRequest: Hashable, Codable { case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -121,7 +115,7 @@ public struct InAppPurchaseV2CreateRequest: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case apps } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/InAppPurchaseV2UpdateRequest.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/InAppPurchaseV2UpdateRequest.generated.swift index b505e7e5..a4a605ca 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/InAppPurchaseV2UpdateRequest.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/InAppPurchaseV2UpdateRequest.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct InAppPurchaseV2UpdateRequest: Hashable, Codable { +public struct InAppPurchaseV2UpdateRequest: Hashable, Codable, Sendable { public var data: Data public init(data: Data) { @@ -14,7 +14,7 @@ public struct InAppPurchaseV2UpdateRequest: Hashable, Codable { case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -37,14 +37,11 @@ public struct InAppPurchaseV2UpdateRequest: Hashable, Codable { case attributes } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case inAppPurchases } - public struct Attributes: Hashable, Codable { - @available(*, deprecated) - public var availableInAllTerritories: Bool? - + public struct Attributes: Hashable, Codable, Sendable { public var familySharable: Bool? public var name: String? @@ -52,19 +49,16 @@ public struct InAppPurchaseV2UpdateRequest: Hashable, Codable { public var reviewNote: String? public init( - availableInAllTerritories: Bool? = nil, familySharable: Bool? = nil, name: String? = nil, reviewNote: String? = nil ) { - self.availableInAllTerritories = availableInAllTerritories self.familySharable = familySharable self.name = name self.reviewNote = reviewNote } private enum CodingKeys: String, CodingKey { - case availableInAllTerritories case familySharable case name case reviewNote diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/AppPreOrderCreateRequest.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/MarketplaceSearchDetailCreateRequest.generated.swift similarity index 71% rename from Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/AppPreOrderCreateRequest.generated.swift rename to Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/MarketplaceSearchDetailCreateRequest.generated.swift index 8079c82f..34f363b6 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/AppPreOrderCreateRequest.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/MarketplaceSearchDetailCreateRequest.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct AppPreOrderCreateRequest: Hashable, Codable { +public struct MarketplaceSearchDetailCreateRequest: Hashable, Codable, Sendable { public var data: Data public init(data: Data) { @@ -14,16 +14,16 @@ public struct AppPreOrderCreateRequest: Hashable, Codable { case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var type: `Type` - public var attributes: Attributes? + public var attributes: Attributes public var relationships: Relationships public init( type: `Type`, - attributes: Attributes? = nil, + attributes: Attributes, relationships: Relationships ) { self.type = type @@ -37,23 +37,23 @@ public struct AppPreOrderCreateRequest: Hashable, Codable { case relationships } - public enum `Type`: String, Hashable, Codable { - case appPreOrders + public enum `Type`: String, Hashable, Codable, Sendable { + case marketplaceSearchDetails } - public struct Attributes: Hashable, Codable { - public var appReleaseDate: String? + public struct Attributes: Hashable, Codable, Sendable { + public var catalogUrl: URL - public init(appReleaseDate: String? = nil) { - self.appReleaseDate = appReleaseDate + public init(catalogUrl: URL) { + self.catalogUrl = catalogUrl } private enum CodingKeys: String, CodingKey { - case appReleaseDate + case catalogUrl } } - public struct Relationships: Hashable, Codable { + public struct Relationships: Hashable, Codable, Sendable { public var app: App public init(app: App) { @@ -64,7 +64,7 @@ public struct AppPreOrderCreateRequest: Hashable, Codable { case app } - public struct App: Hashable, Codable { + public struct App: Hashable, Codable, Sendable { public var data: Data public init(data: Data) { @@ -75,7 +75,7 @@ public struct AppPreOrderCreateRequest: Hashable, Codable { case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -93,7 +93,7 @@ public struct AppPreOrderCreateRequest: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case apps } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/MarketplaceSearchDetailUpdateRequest.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/MarketplaceSearchDetailUpdateRequest.generated.swift new file mode 100644 index 00000000..8acf5f54 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/MarketplaceSearchDetailUpdateRequest.generated.swift @@ -0,0 +1,58 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct MarketplaceSearchDetailUpdateRequest: Hashable, Codable, Sendable { + public var data: Data + + public init(data: Data) { + self.data = data + } + + private enum CodingKeys: String, CodingKey { + case data + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public var attributes: Attributes? + + public init( + id: String, + type: `Type`, + attributes: Attributes? = nil + ) { + self.id = id + self.type = type + self.attributes = attributes + } + + private enum CodingKeys: String, CodingKey { + case id + case type + case attributes + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case marketplaceSearchDetails + } + + public struct Attributes: Hashable, Codable, Sendable { + public var catalogUrl: URL? + + public init(catalogUrl: URL? = nil) { + self.catalogUrl = catalogUrl + } + + private enum CodingKeys: String, CodingKey { + case catalogUrl + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/MarketplaceWebhookCreateRequest.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/MarketplaceWebhookCreateRequest.generated.swift new file mode 100644 index 00000000..4059885f --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/MarketplaceWebhookCreateRequest.generated.swift @@ -0,0 +1,60 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct MarketplaceWebhookCreateRequest: Hashable, Codable, Sendable { + public var data: Data + + public init(data: Data) { + self.data = data + } + + private enum CodingKeys: String, CodingKey { + case data + } + + public struct Data: Hashable, Codable, Sendable { + public var type: `Type` + + public var attributes: Attributes + + public init( + type: `Type`, + attributes: Attributes + ) { + self.type = type + self.attributes = attributes + } + + private enum CodingKeys: String, CodingKey { + case type + case attributes + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case marketplaceWebhooks + } + + public struct Attributes: Hashable, Codable, Sendable { + public var endpointUrl: URL + + public var secret: String + + public init( + endpointUrl: URL, + secret: String + ) { + self.endpointUrl = endpointUrl + self.secret = secret + } + + private enum CodingKeys: String, CodingKey { + case endpointUrl + case secret + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/MarketplaceWebhookUpdateRequest.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/MarketplaceWebhookUpdateRequest.generated.swift new file mode 100644 index 00000000..8f83c888 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/MarketplaceWebhookUpdateRequest.generated.swift @@ -0,0 +1,65 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct MarketplaceWebhookUpdateRequest: Hashable, Codable, Sendable { + public var data: Data + + public init(data: Data) { + self.data = data + } + + private enum CodingKeys: String, CodingKey { + case data + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public var attributes: Attributes? + + public init( + id: String, + type: `Type`, + attributes: Attributes? = nil + ) { + self.id = id + self.type = type + self.attributes = attributes + } + + private enum CodingKeys: String, CodingKey { + case id + case type + case attributes + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case marketplaceWebhooks + } + + public struct Attributes: Hashable, Codable, Sendable { + public var endpointUrl: URL? + + public var secret: String? + + public init( + endpointUrl: URL? = nil, + secret: String? = nil + ) { + self.endpointUrl = endpointUrl + self.secret = secret + } + + private enum CodingKeys: String, CodingKey { + case endpointUrl + case secret + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/MerchantIdCreateRequest.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/MerchantIdCreateRequest.generated.swift new file mode 100644 index 00000000..806e1ebe --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/MerchantIdCreateRequest.generated.swift @@ -0,0 +1,60 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct MerchantIdCreateRequest: Hashable, Codable, Sendable { + public var data: Data + + public init(data: Data) { + self.data = data + } + + private enum CodingKeys: String, CodingKey { + case data + } + + public struct Data: Hashable, Codable, Sendable { + public var type: `Type` + + public var attributes: Attributes + + public init( + type: `Type`, + attributes: Attributes + ) { + self.type = type + self.attributes = attributes + } + + private enum CodingKeys: String, CodingKey { + case type + case attributes + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case merchantIds + } + + public struct Attributes: Hashable, Codable, Sendable { + public var identifier: String + + public var name: String + + public init( + identifier: String, + name: String + ) { + self.identifier = identifier + self.name = name + } + + private enum CodingKeys: String, CodingKey { + case identifier + case name + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/AppPreOrderUpdateRequest.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/MerchantIdUpdateRequest.generated.swift similarity index 65% rename from Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/AppPreOrderUpdateRequest.generated.swift rename to Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/MerchantIdUpdateRequest.generated.swift index 6353f08e..7096e7ba 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/AppPreOrderUpdateRequest.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/MerchantIdUpdateRequest.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct AppPreOrderUpdateRequest: Hashable, Codable { +public struct MerchantIdUpdateRequest: Hashable, Codable, Sendable { public var data: Data public init(data: Data) { @@ -14,7 +14,7 @@ public struct AppPreOrderUpdateRequest: Hashable, Codable { case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -37,19 +37,19 @@ public struct AppPreOrderUpdateRequest: Hashable, Codable { case attributes } - public enum `Type`: String, Hashable, Codable { - case appPreOrders + public enum `Type`: String, Hashable, Codable, Sendable { + case merchantIds } - public struct Attributes: Hashable, Codable { - public var appReleaseDate: String? + public struct Attributes: Hashable, Codable, Sendable { + public var name: String? - public init(appReleaseDate: String? = nil) { - self.appReleaseDate = appReleaseDate + public init(name: String? = nil) { + self.name = name } private enum CodingKeys: String, CodingKey { - case appReleaseDate + case name } } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/NominationCreateRequest.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/NominationCreateRequest.generated.swift new file mode 100644 index 00000000..359c7587 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/NominationCreateRequest.generated.swift @@ -0,0 +1,273 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct NominationCreateRequest: Hashable, Codable, Sendable { + public var data: Data + + public init(data: Data) { + self.data = data + } + + private enum CodingKeys: String, CodingKey { + case data + } + + public struct Data: Hashable, Codable, Sendable { + public var type: `Type` + + public var attributes: Attributes + + public var relationships: Relationships + + public init( + type: `Type`, + attributes: Attributes, + relationships: Relationships + ) { + self.type = type + self.attributes = attributes + self.relationships = relationships + } + + private enum CodingKeys: String, CodingKey { + case type + case attributes + case relationships + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case nominations + } + + public struct Attributes: Hashable, Codable, Sendable { + public var type: `Type` + + public var description: String + + public var deviceFamilies: [DeviceFamily]? + + public var hasInAppEvents: Bool? + + public var launchInSelectMarketsFirst: Bool? + + public var locales: [String]? + + public var name: String + + public var notes: String? + + public var preOrderEnabled: Bool? + + public var publishEndDate: String? + + public var publishStartDate: String + + public var submitted: Bool + + public var supplementalMaterialsUris: [URL]? + + public init( + type: `Type`, + description: String, + deviceFamilies: [DeviceFamily]? = nil, + hasInAppEvents: Bool? = nil, + launchInSelectMarketsFirst: Bool? = nil, + locales: [String]? = nil, + name: String, + notes: String? = nil, + preOrderEnabled: Bool? = nil, + publishEndDate: String? = nil, + publishStartDate: String, + submitted: Bool, + supplementalMaterialsUris: [URL]? = nil + ) { + self.type = type + self.description = description + self.deviceFamilies = deviceFamilies + self.hasInAppEvents = hasInAppEvents + self.launchInSelectMarketsFirst = launchInSelectMarketsFirst + self.locales = locales + self.name = name + self.notes = notes + self.preOrderEnabled = preOrderEnabled + self.publishEndDate = publishEndDate + self.publishStartDate = publishStartDate + self.submitted = submitted + self.supplementalMaterialsUris = supplementalMaterialsUris + } + + private enum CodingKeys: String, CodingKey { + case type + case description + case deviceFamilies + case hasInAppEvents + case launchInSelectMarketsFirst + case locales + case name + case notes + case preOrderEnabled + case publishEndDate + case publishStartDate + case submitted + case supplementalMaterialsUris + } + + public struct `Type`: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var appEnhancements: Self { + .init(rawValue: "APP_ENHANCEMENTS") + } + + public static var appLaunch: Self { + .init(rawValue: "APP_LAUNCH") + } + + public static var newContent: Self { + .init(rawValue: "NEW_CONTENT") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + } + + public struct Relationships: Hashable, Codable, Sendable { + public var inAppEvents: InAppEvents? + + public var relatedApps: RelatedApps + + public var supportedTerritories: SupportedTerritories? + + public init( + inAppEvents: InAppEvents? = nil, + relatedApps: RelatedApps, + supportedTerritories: SupportedTerritories? = nil + ) { + self.inAppEvents = inAppEvents + self.relatedApps = relatedApps + self.supportedTerritories = supportedTerritories + } + + private enum CodingKeys: String, CodingKey { + case inAppEvents + case relatedApps + case supportedTerritories + } + + public struct InAppEvents: Hashable, Codable, Sendable { + public var data: [Data]? + + public init(data: [Data]? = nil) { + self.data = data + } + + private enum CodingKeys: String, CodingKey { + case data + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case appEvents + } + } + } + + public struct RelatedApps: Hashable, Codable, Sendable { + public var data: [Data] + + public init(data: [Data]) { + self.data = data + } + + private enum CodingKeys: String, CodingKey { + case data + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case apps + } + } + } + + public struct SupportedTerritories: Hashable, Codable, Sendable { + public var data: [Data]? + + public init(data: [Data]? = nil) { + self.data = data + } + + private enum CodingKeys: String, CodingKey { + case data + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case territories + } + } + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/NominationUpdateRequest.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/NominationUpdateRequest.generated.swift new file mode 100644 index 00000000..2a24a881 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/NominationUpdateRequest.generated.swift @@ -0,0 +1,283 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct NominationUpdateRequest: Hashable, Codable, Sendable { + public var data: Data + + public init(data: Data) { + self.data = data + } + + private enum CodingKeys: String, CodingKey { + case data + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public var attributes: Attributes? + + public var relationships: Relationships? + + public init( + id: String, + type: `Type`, + attributes: Attributes? = nil, + relationships: Relationships? = nil + ) { + self.id = id + self.type = type + self.attributes = attributes + self.relationships = relationships + } + + private enum CodingKeys: String, CodingKey { + case id + case type + case attributes + case relationships + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case nominations + } + + public struct Attributes: Hashable, Codable, Sendable { + public var type: `Type`? + + public var archived: Bool? + + public var description: String? + + public var deviceFamilies: [DeviceFamily]? + + public var hasInAppEvents: Bool? + + public var launchInSelectMarketsFirst: Bool? + + public var locales: [String]? + + public var name: String? + + public var notes: String? + + public var preOrderEnabled: Bool? + + public var publishEndDate: String? + + public var publishStartDate: String? + + public var submitted: Bool? + + public var supplementalMaterialsUris: [URL]? + + public init( + type: `Type`? = nil, + archived: Bool? = nil, + description: String? = nil, + deviceFamilies: [DeviceFamily]? = nil, + hasInAppEvents: Bool? = nil, + launchInSelectMarketsFirst: Bool? = nil, + locales: [String]? = nil, + name: String? = nil, + notes: String? = nil, + preOrderEnabled: Bool? = nil, + publishEndDate: String? = nil, + publishStartDate: String? = nil, + submitted: Bool? = nil, + supplementalMaterialsUris: [URL]? = nil + ) { + self.type = type + self.archived = archived + self.description = description + self.deviceFamilies = deviceFamilies + self.hasInAppEvents = hasInAppEvents + self.launchInSelectMarketsFirst = launchInSelectMarketsFirst + self.locales = locales + self.name = name + self.notes = notes + self.preOrderEnabled = preOrderEnabled + self.publishEndDate = publishEndDate + self.publishStartDate = publishStartDate + self.submitted = submitted + self.supplementalMaterialsUris = supplementalMaterialsUris + } + + private enum CodingKeys: String, CodingKey { + case type + case archived + case description + case deviceFamilies + case hasInAppEvents + case launchInSelectMarketsFirst + case locales + case name + case notes + case preOrderEnabled + case publishEndDate + case publishStartDate + case submitted + case supplementalMaterialsUris + } + + public struct `Type`: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var appEnhancements: Self { + .init(rawValue: "APP_ENHANCEMENTS") + } + + public static var appLaunch: Self { + .init(rawValue: "APP_LAUNCH") + } + + public static var newContent: Self { + .init(rawValue: "NEW_CONTENT") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + } + + public struct Relationships: Hashable, Codable, Sendable { + public var inAppEvents: InAppEvents? + + public var relatedApps: RelatedApps? + + public var supportedTerritories: SupportedTerritories? + + public init( + inAppEvents: InAppEvents? = nil, + relatedApps: RelatedApps? = nil, + supportedTerritories: SupportedTerritories? = nil + ) { + self.inAppEvents = inAppEvents + self.relatedApps = relatedApps + self.supportedTerritories = supportedTerritories + } + + private enum CodingKeys: String, CodingKey { + case inAppEvents + case relatedApps + case supportedTerritories + } + + public struct InAppEvents: Hashable, Codable, Sendable { + public var data: [Data]? + + public init(data: [Data]? = nil) { + self.data = data + } + + private enum CodingKeys: String, CodingKey { + case data + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case appEvents + } + } + } + + public struct RelatedApps: Hashable, Codable, Sendable { + public var data: [Data]? + + public init(data: [Data]? = nil) { + self.data = data + } + + private enum CodingKeys: String, CodingKey { + case data + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case apps + } + } + } + + public struct SupportedTerritories: Hashable, Codable, Sendable { + public var data: [Data]? + + public init(data: [Data]? = nil) { + self.data = data + } + + private enum CodingKeys: String, CodingKey { + case data + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case territories + } + } + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/PassTypeIdCreateRequest.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/PassTypeIdCreateRequest.generated.swift new file mode 100644 index 00000000..79ec7bd4 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/PassTypeIdCreateRequest.generated.swift @@ -0,0 +1,60 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct PassTypeIdCreateRequest: Hashable, Codable, Sendable { + public var data: Data + + public init(data: Data) { + self.data = data + } + + private enum CodingKeys: String, CodingKey { + case data + } + + public struct Data: Hashable, Codable, Sendable { + public var type: `Type` + + public var attributes: Attributes + + public init( + type: `Type`, + attributes: Attributes + ) { + self.type = type + self.attributes = attributes + } + + private enum CodingKeys: String, CodingKey { + case type + case attributes + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case passTypeIds + } + + public struct Attributes: Hashable, Codable, Sendable { + public var identifier: String + + public var name: String + + public init( + identifier: String, + name: String + ) { + self.identifier = identifier + self.name = name + } + + private enum CodingKeys: String, CodingKey { + case identifier + case name + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/PassTypeIdUpdateRequest.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/PassTypeIdUpdateRequest.generated.swift new file mode 100644 index 00000000..f4e9a476 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/PassTypeIdUpdateRequest.generated.swift @@ -0,0 +1,58 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct PassTypeIdUpdateRequest: Hashable, Codable, Sendable { + public var data: Data + + public init(data: Data) { + self.data = data + } + + private enum CodingKeys: String, CodingKey { + case data + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public var attributes: Attributes? + + public init( + id: String, + type: `Type`, + attributes: Attributes? = nil + ) { + self.id = id + self.type = type + self.attributes = attributes + } + + private enum CodingKeys: String, CodingKey { + case id + case type + case attributes + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case passTypeIds + } + + public struct Attributes: Hashable, Codable, Sendable { + public var name: String? + + public init(name: String? = nil) { + self.name = name + } + + private enum CodingKeys: String, CodingKey { + case name + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/ProfileCreateRequest.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/ProfileCreateRequest.generated.swift index febe739c..ab72db1a 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/ProfileCreateRequest.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/ProfileCreateRequest.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct ProfileCreateRequest: Hashable, Codable { +public struct ProfileCreateRequest: Hashable, Codable, Sendable { public var data: Data public init(data: Data) { @@ -14,7 +14,7 @@ public struct ProfileCreateRequest: Hashable, Codable { case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var type: `Type` public var attributes: Attributes @@ -37,11 +37,11 @@ public struct ProfileCreateRequest: Hashable, Codable { case relationships } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case profiles } - public struct Attributes: Hashable, Codable { + public struct Attributes: Hashable, Codable, Sendable { public var name: String public var profileType: ProfileType @@ -59,66 +59,76 @@ public struct ProfileCreateRequest: Hashable, Codable { case profileType } - public enum ProfileType: Hashable, Codable, RawRepresentable { - case iOSAppAdhoc - case iOSAppDevelopment - case iOSAppInhouse - case iOSAppStore - case macAppDevelopment - case macAppDirect - case macAppStore - case macCatalystAppDevelopment - case macCatalystAppDirect - case macCatalystAppStore - case tvOSAppAdhoc - case tvOSAppDevelopment - case tvOSAppInhouse - case tvOSAppStore - case unknown(String) - - public var rawValue: String { - switch self { - case .iOSAppAdhoc: return "IOS_APP_ADHOC" - case .iOSAppDevelopment: return "IOS_APP_DEVELOPMENT" - case .iOSAppInhouse: return "IOS_APP_INHOUSE" - case .iOSAppStore: return "IOS_APP_STORE" - case .macAppDevelopment: return "MAC_APP_DEVELOPMENT" - case .macAppDirect: return "MAC_APP_DIRECT" - case .macAppStore: return "MAC_APP_STORE" - case .macCatalystAppDevelopment: return "MAC_CATALYST_APP_DEVELOPMENT" - case .macCatalystAppDirect: return "MAC_CATALYST_APP_DIRECT" - case .macCatalystAppStore: return "MAC_CATALYST_APP_STORE" - case .tvOSAppAdhoc: return "TVOS_APP_ADHOC" - case .tvOSAppDevelopment: return "TVOS_APP_DEVELOPMENT" - case .tvOSAppInhouse: return "TVOS_APP_INHOUSE" - case .tvOSAppStore: return "TVOS_APP_STORE" - case .unknown(let rawValue): return rawValue - } + public struct ProfileType: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var iOSAppAdhoc: Self { + .init(rawValue: "IOS_APP_ADHOC") + } + + public static var iOSAppDevelopment: Self { + .init(rawValue: "IOS_APP_DEVELOPMENT") + } + + public static var iOSAppInhouse: Self { + .init(rawValue: "IOS_APP_INHOUSE") + } + + public static var iOSAppStore: Self { + .init(rawValue: "IOS_APP_STORE") + } + + public static var macAppDevelopment: Self { + .init(rawValue: "MAC_APP_DEVELOPMENT") + } + + public static var macAppDirect: Self { + .init(rawValue: "MAC_APP_DIRECT") + } + + public static var macAppStore: Self { + .init(rawValue: "MAC_APP_STORE") + } + + public static var macCatalystAppDevelopment: Self { + .init(rawValue: "MAC_CATALYST_APP_DEVELOPMENT") } + public static var macCatalystAppDirect: Self { + .init(rawValue: "MAC_CATALYST_APP_DIRECT") + } + + public static var macCatalystAppStore: Self { + .init(rawValue: "MAC_CATALYST_APP_STORE") + } + + public static var tvOSAppAdhoc: Self { + .init(rawValue: "TVOS_APP_ADHOC") + } + + public static var tvOSAppDevelopment: Self { + .init(rawValue: "TVOS_APP_DEVELOPMENT") + } + + public static var tvOSAppInhouse: Self { + .init(rawValue: "TVOS_APP_INHOUSE") + } + + public static var tvOSAppStore: Self { + .init(rawValue: "TVOS_APP_STORE") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "IOS_APP_ADHOC": self = .iOSAppAdhoc - case "IOS_APP_DEVELOPMENT": self = .iOSAppDevelopment - case "IOS_APP_INHOUSE": self = .iOSAppInhouse - case "IOS_APP_STORE": self = .iOSAppStore - case "MAC_APP_DEVELOPMENT": self = .macAppDevelopment - case "MAC_APP_DIRECT": self = .macAppDirect - case "MAC_APP_STORE": self = .macAppStore - case "MAC_CATALYST_APP_DEVELOPMENT": self = .macCatalystAppDevelopment - case "MAC_CATALYST_APP_DIRECT": self = .macCatalystAppDirect - case "MAC_CATALYST_APP_STORE": self = .macCatalystAppStore - case "TVOS_APP_ADHOC": self = .tvOSAppAdhoc - case "TVOS_APP_DEVELOPMENT": self = .tvOSAppDevelopment - case "TVOS_APP_INHOUSE": self = .tvOSAppInhouse - case "TVOS_APP_STORE": self = .tvOSAppStore - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } } - public struct Relationships: Hashable, Codable { + public struct Relationships: Hashable, Codable, Sendable { public var bundleId: BundleId public var certificates: Certificates @@ -141,7 +151,7 @@ public struct ProfileCreateRequest: Hashable, Codable { case devices } - public struct BundleId: Hashable, Codable { + public struct BundleId: Hashable, Codable, Sendable { public var data: Data public init(data: Data) { @@ -152,7 +162,7 @@ public struct ProfileCreateRequest: Hashable, Codable { case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -170,13 +180,13 @@ public struct ProfileCreateRequest: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case bundleIds } } } - public struct Certificates: Hashable, Codable { + public struct Certificates: Hashable, Codable, Sendable { public var data: [Data] public init(data: [Data]) { @@ -187,7 +197,7 @@ public struct ProfileCreateRequest: Hashable, Codable { case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -205,13 +215,13 @@ public struct ProfileCreateRequest: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case certificates } } } - public struct Devices: Hashable, Codable { + public struct Devices: Hashable, Codable, Sendable { public var data: [Data]? public init(data: [Data]? = nil) { @@ -222,7 +232,7 @@ public struct ProfileCreateRequest: Hashable, Codable { case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -240,7 +250,7 @@ public struct ProfileCreateRequest: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case devices } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/PromotedPurchaseCreateRequest.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/PromotedPurchaseCreateRequest.generated.swift index 9df8f25f..8300f921 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/PromotedPurchaseCreateRequest.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/PromotedPurchaseCreateRequest.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct PromotedPurchaseCreateRequest: Hashable, Codable { +public struct PromotedPurchaseCreateRequest: Hashable, Codable, Sendable { public var data: Data public init(data: Data) { @@ -14,7 +14,7 @@ public struct PromotedPurchaseCreateRequest: Hashable, Codable { case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var type: `Type` public var attributes: Attributes @@ -37,11 +37,11 @@ public struct PromotedPurchaseCreateRequest: Hashable, Codable { case relationships } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case promotedPurchases } - public struct Attributes: Hashable, Codable { + public struct Attributes: Hashable, Codable, Sendable { public var enabled: Bool? public var visibleForAllUsers: Bool @@ -60,7 +60,7 @@ public struct PromotedPurchaseCreateRequest: Hashable, Codable { } } - public struct Relationships: Hashable, Codable { + public struct Relationships: Hashable, Codable, Sendable { public var app: App public var inAppPurchaseV2: InAppPurchaseV2? @@ -83,7 +83,7 @@ public struct PromotedPurchaseCreateRequest: Hashable, Codable { case subscription } - public struct App: Hashable, Codable { + public struct App: Hashable, Codable, Sendable { public var data: Data public init(data: Data) { @@ -94,7 +94,7 @@ public struct PromotedPurchaseCreateRequest: Hashable, Codable { case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -112,13 +112,13 @@ public struct PromotedPurchaseCreateRequest: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case apps } } } - public struct InAppPurchaseV2: Hashable, Codable { + public struct InAppPurchaseV2: Hashable, Codable, Sendable { public var data: Data? public init(data: Data? = nil) { @@ -129,7 +129,7 @@ public struct PromotedPurchaseCreateRequest: Hashable, Codable { case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -147,13 +147,13 @@ public struct PromotedPurchaseCreateRequest: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case inAppPurchases } } } - public struct Subscription: Hashable, Codable { + public struct Subscription: Hashable, Codable, Sendable { public var data: Data? public init(data: Data? = nil) { @@ -164,7 +164,7 @@ public struct PromotedPurchaseCreateRequest: Hashable, Codable { case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -182,7 +182,7 @@ public struct PromotedPurchaseCreateRequest: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case subscriptions } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/PromotedPurchaseUpdateRequest.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/PromotedPurchaseUpdateRequest.generated.swift index 21405243..1f4a4672 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/PromotedPurchaseUpdateRequest.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/PromotedPurchaseUpdateRequest.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct PromotedPurchaseUpdateRequest: Hashable, Codable { +public struct PromotedPurchaseUpdateRequest: Hashable, Codable, Sendable { public var data: Data public init(data: Data) { @@ -14,7 +14,7 @@ public struct PromotedPurchaseUpdateRequest: Hashable, Codable { case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -37,11 +37,11 @@ public struct PromotedPurchaseUpdateRequest: Hashable, Codable { case attributes } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case promotedPurchases } - public struct Attributes: Hashable, Codable { + public struct Attributes: Hashable, Codable, Sendable { public var enabled: Bool? public var visibleForAllUsers: Bool? diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/ReviewSubmissionCreateRequest.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/ReviewSubmissionCreateRequest.generated.swift index 9da22b9a..b4876b43 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/ReviewSubmissionCreateRequest.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/ReviewSubmissionCreateRequest.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct ReviewSubmissionCreateRequest: Hashable, Codable { +public struct ReviewSubmissionCreateRequest: Hashable, Codable, Sendable { public var data: Data public init(data: Data) { @@ -14,16 +14,16 @@ public struct ReviewSubmissionCreateRequest: Hashable, Codable { case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var type: `Type` - public var attributes: Attributes + public var attributes: Attributes? public var relationships: Relationships public init( type: `Type`, - attributes: Attributes, + attributes: Attributes? = nil, relationships: Relationships ) { self.type = type @@ -37,14 +37,14 @@ public struct ReviewSubmissionCreateRequest: Hashable, Codable { case relationships } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case reviewSubmissions } - public struct Attributes: Hashable, Codable { - public var platform: Platform + public struct Attributes: Hashable, Codable, Sendable { + public var platform: Platform? - public init(platform: Platform) { + public init(platform: Platform? = nil) { self.platform = platform } @@ -53,7 +53,7 @@ public struct ReviewSubmissionCreateRequest: Hashable, Codable { } } - public struct Relationships: Hashable, Codable { + public struct Relationships: Hashable, Codable, Sendable { public var app: App public init(app: App) { @@ -64,7 +64,7 @@ public struct ReviewSubmissionCreateRequest: Hashable, Codable { case app } - public struct App: Hashable, Codable { + public struct App: Hashable, Codable, Sendable { public var data: Data public init(data: Data) { @@ -75,7 +75,7 @@ public struct ReviewSubmissionCreateRequest: Hashable, Codable { case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -93,7 +93,7 @@ public struct ReviewSubmissionCreateRequest: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case apps } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/ReviewSubmissionItemCreateRequest.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/ReviewSubmissionItemCreateRequest.generated.swift index 3fb3da3b..7599ca46 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/ReviewSubmissionItemCreateRequest.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/ReviewSubmissionItemCreateRequest.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct ReviewSubmissionItemCreateRequest: Hashable, Codable { +public struct ReviewSubmissionItemCreateRequest: Hashable, Codable, Sendable { public var data: Data public init(data: Data) { @@ -14,7 +14,7 @@ public struct ReviewSubmissionItemCreateRequest: Hashable, Codable { case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var type: `Type` public var relationships: Relationships @@ -32,11 +32,11 @@ public struct ReviewSubmissionItemCreateRequest: Hashable, Codable { case relationships } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case reviewSubmissionItems } - public struct Relationships: Hashable, Codable { + public struct Relationships: Hashable, Codable, Sendable { public var appCustomProductPageVersion: AppCustomProductPageVersion? public var appEvent: AppEvent? @@ -74,7 +74,7 @@ public struct ReviewSubmissionItemCreateRequest: Hashable, Codable { case reviewSubmission } - public struct AppCustomProductPageVersion: Hashable, Codable { + public struct AppCustomProductPageVersion: Hashable, Codable, Sendable { public var data: Data? public init(data: Data? = nil) { @@ -85,7 +85,7 @@ public struct ReviewSubmissionItemCreateRequest: Hashable, Codable { case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -103,13 +103,13 @@ public struct ReviewSubmissionItemCreateRequest: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case appCustomProductPageVersions } } } - public struct AppEvent: Hashable, Codable { + public struct AppEvent: Hashable, Codable, Sendable { public var data: Data? public init(data: Data? = nil) { @@ -120,7 +120,7 @@ public struct ReviewSubmissionItemCreateRequest: Hashable, Codable { case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -138,13 +138,13 @@ public struct ReviewSubmissionItemCreateRequest: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case appEvents } } } - public struct AppStoreVersion: Hashable, Codable { + public struct AppStoreVersion: Hashable, Codable, Sendable { public var data: Data? public init(data: Data? = nil) { @@ -155,7 +155,7 @@ public struct ReviewSubmissionItemCreateRequest: Hashable, Codable { case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -173,13 +173,13 @@ public struct ReviewSubmissionItemCreateRequest: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case appStoreVersions } } } - public struct AppStoreVersionExperiment: Hashable, Codable { + public struct AppStoreVersionExperiment: Hashable, Codable, Sendable { public var data: Data? public init(data: Data? = nil) { @@ -190,7 +190,7 @@ public struct ReviewSubmissionItemCreateRequest: Hashable, Codable { case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -208,13 +208,13 @@ public struct ReviewSubmissionItemCreateRequest: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case appStoreVersionExperiments } } } - public struct AppStoreVersionExperimentV2: Hashable, Codable { + public struct AppStoreVersionExperimentV2: Hashable, Codable, Sendable { public var data: Data? public init(data: Data? = nil) { @@ -225,7 +225,7 @@ public struct ReviewSubmissionItemCreateRequest: Hashable, Codable { case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -243,13 +243,13 @@ public struct ReviewSubmissionItemCreateRequest: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case appStoreVersionExperiments } } } - public struct ReviewSubmission: Hashable, Codable { + public struct ReviewSubmission: Hashable, Codable, Sendable { public var data: Data public init(data: Data) { @@ -260,7 +260,7 @@ public struct ReviewSubmissionItemCreateRequest: Hashable, Codable { case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -278,7 +278,7 @@ public struct ReviewSubmissionItemCreateRequest: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case reviewSubmissions } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/ReviewSubmissionItemUpdateRequest.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/ReviewSubmissionItemUpdateRequest.generated.swift index b0c5d49c..6a4b3773 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/ReviewSubmissionItemUpdateRequest.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/ReviewSubmissionItemUpdateRequest.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct ReviewSubmissionItemUpdateRequest: Hashable, Codable { +public struct ReviewSubmissionItemUpdateRequest: Hashable, Codable, Sendable { public var data: Data public init(data: Data) { @@ -14,7 +14,7 @@ public struct ReviewSubmissionItemUpdateRequest: Hashable, Codable { case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -37,11 +37,11 @@ public struct ReviewSubmissionItemUpdateRequest: Hashable, Codable { case attributes } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case reviewSubmissionItems } - public struct Attributes: Hashable, Codable { + public struct Attributes: Hashable, Codable, Sendable { public var removed: Bool? public var resolved: Bool? diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/ReviewSubmissionUpdateRequest.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/ReviewSubmissionUpdateRequest.generated.swift index 57f4af72..f512d286 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/ReviewSubmissionUpdateRequest.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/ReviewSubmissionUpdateRequest.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct ReviewSubmissionUpdateRequest: Hashable, Codable { +public struct ReviewSubmissionUpdateRequest: Hashable, Codable, Sendable { public var data: Data public init(data: Data) { @@ -14,7 +14,7 @@ public struct ReviewSubmissionUpdateRequest: Hashable, Codable { case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -37,25 +37,30 @@ public struct ReviewSubmissionUpdateRequest: Hashable, Codable { case attributes } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case reviewSubmissions } - public struct Attributes: Hashable, Codable { + public struct Attributes: Hashable, Codable, Sendable { public var canceled: Bool? + public var platform: Platform? + public var submitted: Bool? public init( canceled: Bool? = nil, + platform: Platform? = nil, submitted: Bool? = nil ) { self.canceled = canceled + self.platform = platform self.submitted = submitted } private enum CodingKeys: String, CodingKey { case canceled + case platform case submitted } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/RoutingAppCoverageCreateRequest.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/RoutingAppCoverageCreateRequest.generated.swift index 50158653..1430794e 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/RoutingAppCoverageCreateRequest.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/RoutingAppCoverageCreateRequest.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct RoutingAppCoverageCreateRequest: Hashable, Codable { +public struct RoutingAppCoverageCreateRequest: Hashable, Codable, Sendable { public var data: Data public init(data: Data) { @@ -14,7 +14,7 @@ public struct RoutingAppCoverageCreateRequest: Hashable, Codable { case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var type: `Type` public var attributes: Attributes @@ -37,11 +37,11 @@ public struct RoutingAppCoverageCreateRequest: Hashable, Codable { case relationships } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case routingAppCoverages } - public struct Attributes: Hashable, Codable { + public struct Attributes: Hashable, Codable, Sendable { public var fileName: String public var fileSize: Int @@ -60,7 +60,7 @@ public struct RoutingAppCoverageCreateRequest: Hashable, Codable { } } - public struct Relationships: Hashable, Codable { + public struct Relationships: Hashable, Codable, Sendable { public var appStoreVersion: AppStoreVersion public init(appStoreVersion: AppStoreVersion) { @@ -71,7 +71,7 @@ public struct RoutingAppCoverageCreateRequest: Hashable, Codable { case appStoreVersion } - public struct AppStoreVersion: Hashable, Codable { + public struct AppStoreVersion: Hashable, Codable, Sendable { public var data: Data public init(data: Data) { @@ -82,7 +82,7 @@ public struct RoutingAppCoverageCreateRequest: Hashable, Codable { case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -100,7 +100,7 @@ public struct RoutingAppCoverageCreateRequest: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case appStoreVersions } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/RoutingAppCoverageUpdateRequest.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/RoutingAppCoverageUpdateRequest.generated.swift index 60d85acf..f18e9702 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/RoutingAppCoverageUpdateRequest.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/RoutingAppCoverageUpdateRequest.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct RoutingAppCoverageUpdateRequest: Hashable, Codable { +public struct RoutingAppCoverageUpdateRequest: Hashable, Codable, Sendable { public var data: Data public init(data: Data) { @@ -14,7 +14,7 @@ public struct RoutingAppCoverageUpdateRequest: Hashable, Codable { case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -37,11 +37,11 @@ public struct RoutingAppCoverageUpdateRequest: Hashable, Codable { case attributes } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case routingAppCoverages } - public struct Attributes: Hashable, Codable { + public struct Attributes: Hashable, Codable, Sendable { public var sourceFileChecksum: String? public var uploaded: Bool? diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/SandboxTesterV2UpdateRequest.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/SandboxTesterV2UpdateRequest.generated.swift index ca790f2e..aa9c0774 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/SandboxTesterV2UpdateRequest.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/SandboxTesterV2UpdateRequest.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct SandboxTesterV2UpdateRequest: Hashable, Codable { +public struct SandboxTesterV2UpdateRequest: Hashable, Codable, Sendable { public var data: Data public init(data: Data) { @@ -14,7 +14,7 @@ public struct SandboxTesterV2UpdateRequest: Hashable, Codable { case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -37,11 +37,11 @@ public struct SandboxTesterV2UpdateRequest: Hashable, Codable { case attributes } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case sandboxTesters } - public struct Attributes: Hashable, Codable { + public struct Attributes: Hashable, Codable, Sendable { public var interruptPurchases: Bool? public var subscriptionRenewalRate: SubscriptionRenewalRate? @@ -64,34 +64,35 @@ public struct SandboxTesterV2UpdateRequest: Hashable, Codable { case territory } - public enum SubscriptionRenewalRate: Hashable, Codable, RawRepresentable { - case monthlyRenewalEveryFifteenMinutes - case monthlyRenewalEveryFiveMinutes - case monthlyRenewalEveryOneHour - case monthlyRenewalEveryThirtyMinutes - case monthlyRenewalEveryThreeMinutes - case unknown(String) - - public var rawValue: String { - switch self { - case .monthlyRenewalEveryFifteenMinutes: return "MONTHLY_RENEWAL_EVERY_FIFTEEN_MINUTES" - case .monthlyRenewalEveryFiveMinutes: return "MONTHLY_RENEWAL_EVERY_FIVE_MINUTES" - case .monthlyRenewalEveryOneHour: return "MONTHLY_RENEWAL_EVERY_ONE_HOUR" - case .monthlyRenewalEveryThirtyMinutes: return "MONTHLY_RENEWAL_EVERY_THIRTY_MINUTES" - case .monthlyRenewalEveryThreeMinutes: return "MONTHLY_RENEWAL_EVERY_THREE_MINUTES" - case .unknown(let rawValue): return rawValue - } + public struct SubscriptionRenewalRate: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var monthlyRenewalEveryFifteenMinutes: Self { + .init(rawValue: "MONTHLY_RENEWAL_EVERY_FIFTEEN_MINUTES") } + public static var monthlyRenewalEveryFiveMinutes: Self { + .init(rawValue: "MONTHLY_RENEWAL_EVERY_FIVE_MINUTES") + } + + public static var monthlyRenewalEveryOneHour: Self { + .init(rawValue: "MONTHLY_RENEWAL_EVERY_ONE_HOUR") + } + + public static var monthlyRenewalEveryThirtyMinutes: Self { + .init(rawValue: "MONTHLY_RENEWAL_EVERY_THIRTY_MINUTES") + } + + public static var monthlyRenewalEveryThreeMinutes: Self { + .init(rawValue: "MONTHLY_RENEWAL_EVERY_THREE_MINUTES") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "MONTHLY_RENEWAL_EVERY_FIFTEEN_MINUTES": self = .monthlyRenewalEveryFifteenMinutes - case "MONTHLY_RENEWAL_EVERY_FIVE_MINUTES": self = .monthlyRenewalEveryFiveMinutes - case "MONTHLY_RENEWAL_EVERY_ONE_HOUR": self = .monthlyRenewalEveryOneHour - case "MONTHLY_RENEWAL_EVERY_THIRTY_MINUTES": self = .monthlyRenewalEveryThirtyMinutes - case "MONTHLY_RENEWAL_EVERY_THREE_MINUTES": self = .monthlyRenewalEveryThreeMinutes - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/SandboxTestersClearPurchaseHistoryRequestV2CreateRequest.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/SandboxTestersClearPurchaseHistoryRequestV2CreateRequest.generated.swift index fa7681ef..6e2c38ad 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/SandboxTestersClearPurchaseHistoryRequestV2CreateRequest.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/SandboxTestersClearPurchaseHistoryRequestV2CreateRequest.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct SandboxTestersClearPurchaseHistoryRequestV2CreateRequest: Hashable, Codable { +public struct SandboxTestersClearPurchaseHistoryRequestV2CreateRequest: Hashable, Codable, Sendable { public var data: Data public init(data: Data) { @@ -14,7 +14,7 @@ public struct SandboxTestersClearPurchaseHistoryRequestV2CreateRequest: Hashable case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var type: `Type` public var relationships: Relationships @@ -32,11 +32,11 @@ public struct SandboxTestersClearPurchaseHistoryRequestV2CreateRequest: Hashable case relationships } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case sandboxTestersClearPurchaseHistoryRequest } - public struct Relationships: Hashable, Codable { + public struct Relationships: Hashable, Codable, Sendable { public var sandboxTesters: SandboxTesters public init(sandboxTesters: SandboxTesters) { @@ -47,7 +47,7 @@ public struct SandboxTestersClearPurchaseHistoryRequestV2CreateRequest: Hashable case sandboxTesters } - public struct SandboxTesters: Hashable, Codable { + public struct SandboxTesters: Hashable, Codable, Sendable { public var data: [Data] public init(data: [Data]) { @@ -58,7 +58,7 @@ public struct SandboxTestersClearPurchaseHistoryRequestV2CreateRequest: Hashable case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -76,7 +76,7 @@ public struct SandboxTestersClearPurchaseHistoryRequestV2CreateRequest: Hashable case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case sandboxTesters } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/ScmPullRequest.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/ScmPullRequest.generated.swift index 53a6acf4..b46947db 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/ScmPullRequest.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/ScmPullRequest.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct ScmPullRequest: Hashable, Codable { +public struct ScmPullRequest: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -36,11 +36,11 @@ public struct ScmPullRequest: Hashable, Codable { case links } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case scmPullRequests } - public struct Attributes: Hashable, Codable { + public struct Attributes: Hashable, Codable, Sendable { public var destinationBranchName: String? public var destinationRepositoryName: String? @@ -104,7 +104,7 @@ public struct ScmPullRequest: Hashable, Codable { } } - public struct Relationships: Hashable, Codable { + public struct Relationships: Hashable, Codable, Sendable { public var repository: Repository? public init(repository: Repository? = nil) { @@ -115,25 +115,18 @@ public struct ScmPullRequest: Hashable, Codable { case repository } - public struct Repository: Hashable, Codable { + public struct Repository: Hashable, Codable, Sendable { public var data: Data? - public var links: Links? - - public init( - data: Data? = nil, - links: Links? = nil - ) { + public init(data: Data? = nil) { self.data = data - self.links = links } private enum CodingKeys: String, CodingKey { case data - case links } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -151,29 +144,10 @@ public struct ScmPullRequest: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case scmRepositories } } - - public struct Links: Hashable, Codable { - public var related: URL? - - public var `self`: URL? - - public init( - related: URL? = nil, - self _self: URL? = nil - ) { - self.related = related - self.`self` = _self - } - - private enum CodingKeys: String, CodingKey { - case related - case `self` = "self" - } - } } } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/SubscriptionAppStoreReviewScreenshotCreateRequest.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/SubscriptionAppStoreReviewScreenshotCreateRequest.generated.swift index c0c45083..b8a5e80c 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/SubscriptionAppStoreReviewScreenshotCreateRequest.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/SubscriptionAppStoreReviewScreenshotCreateRequest.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct SubscriptionAppStoreReviewScreenshotCreateRequest: Hashable, Codable { +public struct SubscriptionAppStoreReviewScreenshotCreateRequest: Hashable, Codable, Sendable { public var data: Data public init(data: Data) { @@ -14,7 +14,7 @@ public struct SubscriptionAppStoreReviewScreenshotCreateRequest: Hashable, Codab case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var type: `Type` public var attributes: Attributes @@ -37,11 +37,11 @@ public struct SubscriptionAppStoreReviewScreenshotCreateRequest: Hashable, Codab case relationships } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case subscriptionAppStoreReviewScreenshots } - public struct Attributes: Hashable, Codable { + public struct Attributes: Hashable, Codable, Sendable { public var fileName: String public var fileSize: Int @@ -60,7 +60,7 @@ public struct SubscriptionAppStoreReviewScreenshotCreateRequest: Hashable, Codab } } - public struct Relationships: Hashable, Codable { + public struct Relationships: Hashable, Codable, Sendable { public var subscription: Subscription public init(subscription: Subscription) { @@ -71,7 +71,7 @@ public struct SubscriptionAppStoreReviewScreenshotCreateRequest: Hashable, Codab case subscription } - public struct Subscription: Hashable, Codable { + public struct Subscription: Hashable, Codable, Sendable { public var data: Data public init(data: Data) { @@ -82,7 +82,7 @@ public struct SubscriptionAppStoreReviewScreenshotCreateRequest: Hashable, Codab case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -100,7 +100,7 @@ public struct SubscriptionAppStoreReviewScreenshotCreateRequest: Hashable, Codab case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case subscriptions } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/SubscriptionAppStoreReviewScreenshotUpdateRequest.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/SubscriptionAppStoreReviewScreenshotUpdateRequest.generated.swift index 957990e6..a8f5601d 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/SubscriptionAppStoreReviewScreenshotUpdateRequest.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/SubscriptionAppStoreReviewScreenshotUpdateRequest.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct SubscriptionAppStoreReviewScreenshotUpdateRequest: Hashable, Codable { +public struct SubscriptionAppStoreReviewScreenshotUpdateRequest: Hashable, Codable, Sendable { public var data: Data public init(data: Data) { @@ -14,7 +14,7 @@ public struct SubscriptionAppStoreReviewScreenshotUpdateRequest: Hashable, Codab case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -37,11 +37,11 @@ public struct SubscriptionAppStoreReviewScreenshotUpdateRequest: Hashable, Codab case attributes } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case subscriptionAppStoreReviewScreenshots } - public struct Attributes: Hashable, Codable { + public struct Attributes: Hashable, Codable, Sendable { public var sourceFileChecksum: String? public var uploaded: Bool? diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/SubscriptionAvailabilityCreateRequest.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/SubscriptionAvailabilityCreateRequest.generated.swift index ffb83394..dfd6beba 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/SubscriptionAvailabilityCreateRequest.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/SubscriptionAvailabilityCreateRequest.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct SubscriptionAvailabilityCreateRequest: Hashable, Codable { +public struct SubscriptionAvailabilityCreateRequest: Hashable, Codable, Sendable { public var data: Data public init(data: Data) { @@ -14,7 +14,7 @@ public struct SubscriptionAvailabilityCreateRequest: Hashable, Codable { case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var type: `Type` public var attributes: Attributes @@ -37,11 +37,11 @@ public struct SubscriptionAvailabilityCreateRequest: Hashable, Codable { case relationships } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case subscriptionAvailabilities } - public struct Attributes: Hashable, Codable { + public struct Attributes: Hashable, Codable, Sendable { public var availableInNewTerritories: Bool public init(availableInNewTerritories: Bool) { @@ -53,7 +53,7 @@ public struct SubscriptionAvailabilityCreateRequest: Hashable, Codable { } } - public struct Relationships: Hashable, Codable { + public struct Relationships: Hashable, Codable, Sendable { public var availableTerritories: AvailableTerritories public var subscription: Subscription @@ -71,7 +71,7 @@ public struct SubscriptionAvailabilityCreateRequest: Hashable, Codable { case subscription } - public struct AvailableTerritories: Hashable, Codable { + public struct AvailableTerritories: Hashable, Codable, Sendable { public var data: [Data] public init(data: [Data]) { @@ -82,7 +82,7 @@ public struct SubscriptionAvailabilityCreateRequest: Hashable, Codable { case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -100,13 +100,13 @@ public struct SubscriptionAvailabilityCreateRequest: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case territories } } } - public struct Subscription: Hashable, Codable { + public struct Subscription: Hashable, Codable, Sendable { public var data: Data public init(data: Data) { @@ -117,7 +117,7 @@ public struct SubscriptionAvailabilityCreateRequest: Hashable, Codable { case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -135,7 +135,7 @@ public struct SubscriptionAvailabilityCreateRequest: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case subscriptions } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/SubscriptionCreateRequest.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/SubscriptionCreateRequest.generated.swift index 88e894c1..4d904fc8 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/SubscriptionCreateRequest.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/SubscriptionCreateRequest.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct SubscriptionCreateRequest: Hashable, Codable { +public struct SubscriptionCreateRequest: Hashable, Codable, Sendable { public var data: Data public init(data: Data) { @@ -14,7 +14,7 @@ public struct SubscriptionCreateRequest: Hashable, Codable { case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var type: `Type` public var attributes: Attributes @@ -37,14 +37,11 @@ public struct SubscriptionCreateRequest: Hashable, Codable { case relationships } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case subscriptions } - public struct Attributes: Hashable, Codable { - @available(*, deprecated) - public var availableInAllTerritories: Bool? - + public struct Attributes: Hashable, Codable, Sendable { public var familySharable: Bool? public var groupLevel: Int? @@ -58,7 +55,6 @@ public struct SubscriptionCreateRequest: Hashable, Codable { public var subscriptionPeriod: SubscriptionPeriod? public init( - availableInAllTerritories: Bool? = nil, familySharable: Bool? = nil, groupLevel: Int? = nil, name: String, @@ -66,7 +62,6 @@ public struct SubscriptionCreateRequest: Hashable, Codable { reviewNote: String? = nil, subscriptionPeriod: SubscriptionPeriod? = nil ) { - self.availableInAllTerritories = availableInAllTerritories self.familySharable = familySharable self.groupLevel = groupLevel self.name = name @@ -76,7 +71,6 @@ public struct SubscriptionCreateRequest: Hashable, Codable { } private enum CodingKeys: String, CodingKey { - case availableInAllTerritories case familySharable case groupLevel case name @@ -85,42 +79,44 @@ public struct SubscriptionCreateRequest: Hashable, Codable { case subscriptionPeriod } - public enum SubscriptionPeriod: Hashable, Codable, RawRepresentable { - case oneMonth - case oneWeek - case oneYear - case sixMonths - case threeMonths - case twoMonths - case unknown(String) - - public var rawValue: String { - switch self { - case .oneMonth: return "ONE_MONTH" - case .oneWeek: return "ONE_WEEK" - case .oneYear: return "ONE_YEAR" - case .sixMonths: return "SIX_MONTHS" - case .threeMonths: return "THREE_MONTHS" - case .twoMonths: return "TWO_MONTHS" - case .unknown(let rawValue): return rawValue - } + public struct SubscriptionPeriod: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var oneMonth: Self { + .init(rawValue: "ONE_MONTH") + } + + public static var oneWeek: Self { + .init(rawValue: "ONE_WEEK") + } + + public static var oneYear: Self { + .init(rawValue: "ONE_YEAR") + } + + public static var sixMonths: Self { + .init(rawValue: "SIX_MONTHS") } + public static var threeMonths: Self { + .init(rawValue: "THREE_MONTHS") + } + + public static var twoMonths: Self { + .init(rawValue: "TWO_MONTHS") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "ONE_MONTH": self = .oneMonth - case "ONE_WEEK": self = .oneWeek - case "ONE_YEAR": self = .oneYear - case "SIX_MONTHS": self = .sixMonths - case "THREE_MONTHS": self = .threeMonths - case "TWO_MONTHS": self = .twoMonths - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } } - public struct Relationships: Hashable, Codable { + public struct Relationships: Hashable, Codable, Sendable { public var group: Group public init(group: Group) { @@ -131,7 +127,7 @@ public struct SubscriptionCreateRequest: Hashable, Codable { case group } - public struct Group: Hashable, Codable { + public struct Group: Hashable, Codable, Sendable { public var data: Data public init(data: Data) { @@ -142,7 +138,7 @@ public struct SubscriptionCreateRequest: Hashable, Codable { case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -160,7 +156,7 @@ public struct SubscriptionCreateRequest: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case subscriptionGroups } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/SubscriptionGracePeriodUpdateRequest.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/SubscriptionGracePeriodUpdateRequest.generated.swift index 382e8637..fbb6ec72 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/SubscriptionGracePeriodUpdateRequest.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/SubscriptionGracePeriodUpdateRequest.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct SubscriptionGracePeriodUpdateRequest: Hashable, Codable { +public struct SubscriptionGracePeriodUpdateRequest: Hashable, Codable, Sendable { public var data: Data public init(data: Data) { @@ -14,7 +14,7 @@ public struct SubscriptionGracePeriodUpdateRequest: Hashable, Codable { case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -37,11 +37,11 @@ public struct SubscriptionGracePeriodUpdateRequest: Hashable, Codable { case attributes } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case subscriptionGracePeriods } - public struct Attributes: Hashable, Codable { + public struct Attributes: Hashable, Codable, Sendable { public var duration: SubscriptionGracePeriodDuration? public var optIn: Bool? @@ -69,25 +69,23 @@ public struct SubscriptionGracePeriodUpdateRequest: Hashable, Codable { case sandboxOptIn } - public enum RenewalType: Hashable, Codable, RawRepresentable { - case allRenewals - case paidToPaidOnly - case unknown(String) - - public var rawValue: String { - switch self { - case .allRenewals: return "ALL_RENEWALS" - case .paidToPaidOnly: return "PAID_TO_PAID_ONLY" - case .unknown(let rawValue): return rawValue - } + public struct RenewalType: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var allRenewals: Self { + .init(rawValue: "ALL_RENEWALS") } + public static var paidToPaidOnly: Self { + .init(rawValue: "PAID_TO_PAID_ONLY") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "ALL_RENEWALS": self = .allRenewals - case "PAID_TO_PAID_ONLY": self = .paidToPaidOnly - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/SubscriptionGroupCreateRequest.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/SubscriptionGroupCreateRequest.generated.swift index e5e945b4..c2b8f1eb 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/SubscriptionGroupCreateRequest.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/SubscriptionGroupCreateRequest.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct SubscriptionGroupCreateRequest: Hashable, Codable { +public struct SubscriptionGroupCreateRequest: Hashable, Codable, Sendable { public var data: Data public init(data: Data) { @@ -14,7 +14,7 @@ public struct SubscriptionGroupCreateRequest: Hashable, Codable { case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var type: `Type` public var attributes: Attributes @@ -37,11 +37,11 @@ public struct SubscriptionGroupCreateRequest: Hashable, Codable { case relationships } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case subscriptionGroups } - public struct Attributes: Hashable, Codable { + public struct Attributes: Hashable, Codable, Sendable { public var referenceName: String public init(referenceName: String) { @@ -53,7 +53,7 @@ public struct SubscriptionGroupCreateRequest: Hashable, Codable { } } - public struct Relationships: Hashable, Codable { + public struct Relationships: Hashable, Codable, Sendable { public var app: App public init(app: App) { @@ -64,7 +64,7 @@ public struct SubscriptionGroupCreateRequest: Hashable, Codable { case app } - public struct App: Hashable, Codable { + public struct App: Hashable, Codable, Sendable { public var data: Data public init(data: Data) { @@ -75,7 +75,7 @@ public struct SubscriptionGroupCreateRequest: Hashable, Codable { case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -93,7 +93,7 @@ public struct SubscriptionGroupCreateRequest: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case apps } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/SubscriptionGroupLocalizationCreateRequest.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/SubscriptionGroupLocalizationCreateRequest.generated.swift index eeed79d1..60296ffe 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/SubscriptionGroupLocalizationCreateRequest.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/SubscriptionGroupLocalizationCreateRequest.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct SubscriptionGroupLocalizationCreateRequest: Hashable, Codable { +public struct SubscriptionGroupLocalizationCreateRequest: Hashable, Codable, Sendable { public var data: Data public init(data: Data) { @@ -14,7 +14,7 @@ public struct SubscriptionGroupLocalizationCreateRequest: Hashable, Codable { case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var type: `Type` public var attributes: Attributes @@ -37,11 +37,11 @@ public struct SubscriptionGroupLocalizationCreateRequest: Hashable, Codable { case relationships } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case subscriptionGroupLocalizations } - public struct Attributes: Hashable, Codable { + public struct Attributes: Hashable, Codable, Sendable { public var customAppName: String? public var locale: String @@ -65,7 +65,7 @@ public struct SubscriptionGroupLocalizationCreateRequest: Hashable, Codable { } } - public struct Relationships: Hashable, Codable { + public struct Relationships: Hashable, Codable, Sendable { public var subscriptionGroup: SubscriptionGroup public init(subscriptionGroup: SubscriptionGroup) { @@ -76,7 +76,7 @@ public struct SubscriptionGroupLocalizationCreateRequest: Hashable, Codable { case subscriptionGroup } - public struct SubscriptionGroup: Hashable, Codable { + public struct SubscriptionGroup: Hashable, Codable, Sendable { public var data: Data public init(data: Data) { @@ -87,7 +87,7 @@ public struct SubscriptionGroupLocalizationCreateRequest: Hashable, Codable { case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -105,7 +105,7 @@ public struct SubscriptionGroupLocalizationCreateRequest: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case subscriptionGroups } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/SubscriptionGroupLocalizationUpdateRequest.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/SubscriptionGroupLocalizationUpdateRequest.generated.swift index 76dc9e5b..8e0edec3 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/SubscriptionGroupLocalizationUpdateRequest.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/SubscriptionGroupLocalizationUpdateRequest.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct SubscriptionGroupLocalizationUpdateRequest: Hashable, Codable { +public struct SubscriptionGroupLocalizationUpdateRequest: Hashable, Codable, Sendable { public var data: Data public init(data: Data) { @@ -14,7 +14,7 @@ public struct SubscriptionGroupLocalizationUpdateRequest: Hashable, Codable { case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -37,11 +37,11 @@ public struct SubscriptionGroupLocalizationUpdateRequest: Hashable, Codable { case attributes } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case subscriptionGroupLocalizations } - public struct Attributes: Hashable, Codable { + public struct Attributes: Hashable, Codable, Sendable { public var customAppName: String? public var name: String? diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/SubscriptionGroupSubmissionCreateRequest.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/SubscriptionGroupSubmissionCreateRequest.generated.swift index a65a2a2a..002701b7 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/SubscriptionGroupSubmissionCreateRequest.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/SubscriptionGroupSubmissionCreateRequest.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct SubscriptionGroupSubmissionCreateRequest: Hashable, Codable { +public struct SubscriptionGroupSubmissionCreateRequest: Hashable, Codable, Sendable { public var data: Data public init(data: Data) { @@ -14,7 +14,7 @@ public struct SubscriptionGroupSubmissionCreateRequest: Hashable, Codable { case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var type: `Type` public var relationships: Relationships @@ -32,11 +32,11 @@ public struct SubscriptionGroupSubmissionCreateRequest: Hashable, Codable { case relationships } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case subscriptionGroupSubmissions } - public struct Relationships: Hashable, Codable { + public struct Relationships: Hashable, Codable, Sendable { public var subscriptionGroup: SubscriptionGroup public init(subscriptionGroup: SubscriptionGroup) { @@ -47,7 +47,7 @@ public struct SubscriptionGroupSubmissionCreateRequest: Hashable, Codable { case subscriptionGroup } - public struct SubscriptionGroup: Hashable, Codable { + public struct SubscriptionGroup: Hashable, Codable, Sendable { public var data: Data public init(data: Data) { @@ -58,7 +58,7 @@ public struct SubscriptionGroupSubmissionCreateRequest: Hashable, Codable { case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -76,7 +76,7 @@ public struct SubscriptionGroupSubmissionCreateRequest: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case subscriptionGroups } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/SubscriptionGroupUpdateRequest.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/SubscriptionGroupUpdateRequest.generated.swift index 7d320218..037a34bd 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/SubscriptionGroupUpdateRequest.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/SubscriptionGroupUpdateRequest.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct SubscriptionGroupUpdateRequest: Hashable, Codable { +public struct SubscriptionGroupUpdateRequest: Hashable, Codable, Sendable { public var data: Data public init(data: Data) { @@ -14,7 +14,7 @@ public struct SubscriptionGroupUpdateRequest: Hashable, Codable { case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -37,11 +37,11 @@ public struct SubscriptionGroupUpdateRequest: Hashable, Codable { case attributes } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case subscriptionGroups } - public struct Attributes: Hashable, Codable { + public struct Attributes: Hashable, Codable, Sendable { public var referenceName: String? public init(referenceName: String? = nil) { diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/PromotedPurchaseImageCreateRequest.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/SubscriptionImageCreateRequest.generated.swift similarity index 74% rename from Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/PromotedPurchaseImageCreateRequest.generated.swift rename to Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/SubscriptionImageCreateRequest.generated.swift index 778cd8ec..9df89538 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/PromotedPurchaseImageCreateRequest.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/SubscriptionImageCreateRequest.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct PromotedPurchaseImageCreateRequest: Hashable, Codable { +public struct SubscriptionImageCreateRequest: Hashable, Codable, Sendable { public var data: Data public init(data: Data) { @@ -14,7 +14,7 @@ public struct PromotedPurchaseImageCreateRequest: Hashable, Codable { case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var type: `Type` public var attributes: Attributes @@ -37,11 +37,11 @@ public struct PromotedPurchaseImageCreateRequest: Hashable, Codable { case relationships } - public enum `Type`: String, Hashable, Codable { - case promotedPurchaseImages + public enum `Type`: String, Hashable, Codable, Sendable { + case subscriptionImages } - public struct Attributes: Hashable, Codable { + public struct Attributes: Hashable, Codable, Sendable { public var fileName: String public var fileSize: Int @@ -60,18 +60,18 @@ public struct PromotedPurchaseImageCreateRequest: Hashable, Codable { } } - public struct Relationships: Hashable, Codable { - public var promotedPurchase: PromotedPurchase + public struct Relationships: Hashable, Codable, Sendable { + public var subscription: Subscription - public init(promotedPurchase: PromotedPurchase) { - self.promotedPurchase = promotedPurchase + public init(subscription: Subscription) { + self.subscription = subscription } private enum CodingKeys: String, CodingKey { - case promotedPurchase + case subscription } - public struct PromotedPurchase: Hashable, Codable { + public struct Subscription: Hashable, Codable, Sendable { public var data: Data public init(data: Data) { @@ -82,7 +82,7 @@ public struct PromotedPurchaseImageCreateRequest: Hashable, Codable { case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -100,8 +100,8 @@ public struct PromotedPurchaseImageCreateRequest: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { - case promotedPurchases + public enum `Type`: String, Hashable, Codable, Sendable { + case subscriptions } } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/PromotedPurchaseImageUpdateRequest.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/SubscriptionImageUpdateRequest.generated.swift similarity index 80% rename from Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/PromotedPurchaseImageUpdateRequest.generated.swift rename to Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/SubscriptionImageUpdateRequest.generated.swift index dea33243..421999e8 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/PromotedPurchaseImageUpdateRequest.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/SubscriptionImageUpdateRequest.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct PromotedPurchaseImageUpdateRequest: Hashable, Codable { +public struct SubscriptionImageUpdateRequest: Hashable, Codable, Sendable { public var data: Data public init(data: Data) { @@ -14,7 +14,7 @@ public struct PromotedPurchaseImageUpdateRequest: Hashable, Codable { case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -37,11 +37,11 @@ public struct PromotedPurchaseImageUpdateRequest: Hashable, Codable { case attributes } - public enum `Type`: String, Hashable, Codable { - case promotedPurchaseImages + public enum `Type`: String, Hashable, Codable, Sendable { + case subscriptionImages } - public struct Attributes: Hashable, Codable { + public struct Attributes: Hashable, Codable, Sendable { public var sourceFileChecksum: String? public var uploaded: Bool? diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/SubscriptionIntroductoryOfferCreateRequest.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/SubscriptionIntroductoryOfferCreateRequest.generated.swift index 80208a87..641f26ab 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/SubscriptionIntroductoryOfferCreateRequest.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/SubscriptionIntroductoryOfferCreateRequest.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct SubscriptionIntroductoryOfferCreateRequest: Hashable, Codable { +public struct SubscriptionIntroductoryOfferCreateRequest: Hashable, Codable, Sendable { public var data: Data public var included: [SubscriptionPricePointInlineCreate]? @@ -21,7 +21,7 @@ public struct SubscriptionIntroductoryOfferCreateRequest: Hashable, Codable { case included } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var type: `Type` public var attributes: Attributes @@ -44,11 +44,11 @@ public struct SubscriptionIntroductoryOfferCreateRequest: Hashable, Codable { case relationships } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case subscriptionIntroductoryOffers } - public struct Attributes: Hashable, Codable { + public struct Attributes: Hashable, Codable, Sendable { public var duration: SubscriptionOfferDuration public var endDate: String? @@ -82,7 +82,7 @@ public struct SubscriptionIntroductoryOfferCreateRequest: Hashable, Codable { } } - public struct Relationships: Hashable, Codable { + public struct Relationships: Hashable, Codable, Sendable { public var subscription: Subscription public var subscriptionPricePoint: SubscriptionPricePoint? @@ -105,7 +105,7 @@ public struct SubscriptionIntroductoryOfferCreateRequest: Hashable, Codable { case territory } - public struct Subscription: Hashable, Codable { + public struct Subscription: Hashable, Codable, Sendable { public var data: Data public init(data: Data) { @@ -116,7 +116,7 @@ public struct SubscriptionIntroductoryOfferCreateRequest: Hashable, Codable { case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -134,13 +134,13 @@ public struct SubscriptionIntroductoryOfferCreateRequest: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case subscriptions } } } - public struct SubscriptionPricePoint: Hashable, Codable { + public struct SubscriptionPricePoint: Hashable, Codable, Sendable { public var data: Data? public init(data: Data? = nil) { @@ -151,7 +151,7 @@ public struct SubscriptionIntroductoryOfferCreateRequest: Hashable, Codable { case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -169,13 +169,13 @@ public struct SubscriptionIntroductoryOfferCreateRequest: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case subscriptionPricePoints } } } - public struct Territory: Hashable, Codable { + public struct Territory: Hashable, Codable, Sendable { public var data: Data? public init(data: Data? = nil) { @@ -186,7 +186,7 @@ public struct SubscriptionIntroductoryOfferCreateRequest: Hashable, Codable { case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -204,7 +204,7 @@ public struct SubscriptionIntroductoryOfferCreateRequest: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case territories } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/SubscriptionIntroductoryOfferUpdateRequest.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/SubscriptionIntroductoryOfferUpdateRequest.generated.swift index 45d90f80..71e23354 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/SubscriptionIntroductoryOfferUpdateRequest.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/SubscriptionIntroductoryOfferUpdateRequest.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct SubscriptionIntroductoryOfferUpdateRequest: Hashable, Codable { +public struct SubscriptionIntroductoryOfferUpdateRequest: Hashable, Codable, Sendable { public var data: Data public init(data: Data) { @@ -14,7 +14,7 @@ public struct SubscriptionIntroductoryOfferUpdateRequest: Hashable, Codable { case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -37,11 +37,11 @@ public struct SubscriptionIntroductoryOfferUpdateRequest: Hashable, Codable { case attributes } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case subscriptionIntroductoryOffers } - public struct Attributes: Hashable, Codable { + public struct Attributes: Hashable, Codable, Sendable { public var endDate: String? public init(endDate: String? = nil) { diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/SubscriptionIntroductoryOffersLinkagesRequest.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/SubscriptionIntroductoryOffersLinkagesRequest.generated.swift index 128acac3..aa371a70 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/SubscriptionIntroductoryOffersLinkagesRequest.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/SubscriptionIntroductoryOffersLinkagesRequest.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct SubscriptionIntroductoryOffersLinkagesRequest: Hashable, Codable { +public struct SubscriptionIntroductoryOffersLinkagesRequest: Hashable, Codable, Sendable { public var data: [Data] public init(data: [Data]) { @@ -14,7 +14,7 @@ public struct SubscriptionIntroductoryOffersLinkagesRequest: Hashable, Codable { case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -32,7 +32,7 @@ public struct SubscriptionIntroductoryOffersLinkagesRequest: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case subscriptionIntroductoryOffers } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/SubscriptionLocalizationCreateRequest.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/SubscriptionLocalizationCreateRequest.generated.swift index dfddc064..e40f8c57 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/SubscriptionLocalizationCreateRequest.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/SubscriptionLocalizationCreateRequest.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct SubscriptionLocalizationCreateRequest: Hashable, Codable { +public struct SubscriptionLocalizationCreateRequest: Hashable, Codable, Sendable { public var data: Data public init(data: Data) { @@ -14,7 +14,7 @@ public struct SubscriptionLocalizationCreateRequest: Hashable, Codable { case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var type: `Type` public var attributes: Attributes @@ -37,11 +37,11 @@ public struct SubscriptionLocalizationCreateRequest: Hashable, Codable { case relationships } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case subscriptionLocalizations } - public struct Attributes: Hashable, Codable { + public struct Attributes: Hashable, Codable, Sendable { public var description: String? public var locale: String @@ -65,7 +65,7 @@ public struct SubscriptionLocalizationCreateRequest: Hashable, Codable { } } - public struct Relationships: Hashable, Codable { + public struct Relationships: Hashable, Codable, Sendable { public var subscription: Subscription public init(subscription: Subscription) { @@ -76,7 +76,7 @@ public struct SubscriptionLocalizationCreateRequest: Hashable, Codable { case subscription } - public struct Subscription: Hashable, Codable { + public struct Subscription: Hashable, Codable, Sendable { public var data: Data public init(data: Data) { @@ -87,7 +87,7 @@ public struct SubscriptionLocalizationCreateRequest: Hashable, Codable { case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -105,7 +105,7 @@ public struct SubscriptionLocalizationCreateRequest: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case subscriptions } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/SubscriptionLocalizationUpdateRequest.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/SubscriptionLocalizationUpdateRequest.generated.swift index f68f1461..cba82106 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/SubscriptionLocalizationUpdateRequest.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/SubscriptionLocalizationUpdateRequest.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct SubscriptionLocalizationUpdateRequest: Hashable, Codable { +public struct SubscriptionLocalizationUpdateRequest: Hashable, Codable, Sendable { public var data: Data public init(data: Data) { @@ -14,7 +14,7 @@ public struct SubscriptionLocalizationUpdateRequest: Hashable, Codable { case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -37,11 +37,11 @@ public struct SubscriptionLocalizationUpdateRequest: Hashable, Codable { case attributes } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case subscriptionLocalizations } - public struct Attributes: Hashable, Codable { + public struct Attributes: Hashable, Codable, Sendable { public var description: String? public var name: String? diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/SubscriptionOfferCodeCreateRequest.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/SubscriptionOfferCodeCreateRequest.generated.swift index 41b831d2..0227e080 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/SubscriptionOfferCodeCreateRequest.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/SubscriptionOfferCodeCreateRequest.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct SubscriptionOfferCodeCreateRequest: Hashable, Codable { +public struct SubscriptionOfferCodeCreateRequest: Hashable, Codable, Sendable { public var data: Data public var included: [SubscriptionOfferCodePriceInlineCreate]? @@ -21,7 +21,7 @@ public struct SubscriptionOfferCodeCreateRequest: Hashable, Codable { case included } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var type: `Type` public var attributes: Attributes @@ -44,11 +44,11 @@ public struct SubscriptionOfferCodeCreateRequest: Hashable, Codable { case relationships } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case subscriptionOfferCodes } - public struct Attributes: Hashable, Codable { + public struct Attributes: Hashable, Codable, Sendable { public var customerEligibilities: [SubscriptionCustomerEligibility] public var duration: SubscriptionOfferDuration @@ -87,7 +87,7 @@ public struct SubscriptionOfferCodeCreateRequest: Hashable, Codable { } } - public struct Relationships: Hashable, Codable { + public struct Relationships: Hashable, Codable, Sendable { public var prices: Prices public var subscription: Subscription @@ -105,7 +105,7 @@ public struct SubscriptionOfferCodeCreateRequest: Hashable, Codable { case subscription } - public struct Prices: Hashable, Codable { + public struct Prices: Hashable, Codable, Sendable { public var data: [Data] public init(data: [Data]) { @@ -116,7 +116,7 @@ public struct SubscriptionOfferCodeCreateRequest: Hashable, Codable { case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -134,13 +134,13 @@ public struct SubscriptionOfferCodeCreateRequest: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case subscriptionOfferCodePrices } } } - public struct Subscription: Hashable, Codable { + public struct Subscription: Hashable, Codable, Sendable { public var data: Data public init(data: Data) { @@ -151,7 +151,7 @@ public struct SubscriptionOfferCodeCreateRequest: Hashable, Codable { case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -169,7 +169,7 @@ public struct SubscriptionOfferCodeCreateRequest: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case subscriptions } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/SubscriptionOfferCodeCustomCodeCreateRequest.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/SubscriptionOfferCodeCustomCodeCreateRequest.generated.swift index 2c606784..d1e053e6 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/SubscriptionOfferCodeCustomCodeCreateRequest.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/SubscriptionOfferCodeCustomCodeCreateRequest.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct SubscriptionOfferCodeCustomCodeCreateRequest: Hashable, Codable { +public struct SubscriptionOfferCodeCustomCodeCreateRequest: Hashable, Codable, Sendable { public var data: Data public init(data: Data) { @@ -14,7 +14,7 @@ public struct SubscriptionOfferCodeCustomCodeCreateRequest: Hashable, Codable { case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var type: `Type` public var attributes: Attributes @@ -37,11 +37,11 @@ public struct SubscriptionOfferCodeCustomCodeCreateRequest: Hashable, Codable { case relationships } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case subscriptionOfferCodeCustomCodes } - public struct Attributes: Hashable, Codable { + public struct Attributes: Hashable, Codable, Sendable { public var customCode: String public var expirationDate: String? @@ -65,7 +65,7 @@ public struct SubscriptionOfferCodeCustomCodeCreateRequest: Hashable, Codable { } } - public struct Relationships: Hashable, Codable { + public struct Relationships: Hashable, Codable, Sendable { public var offerCode: OfferCode public init(offerCode: OfferCode) { @@ -76,7 +76,7 @@ public struct SubscriptionOfferCodeCustomCodeCreateRequest: Hashable, Codable { case offerCode } - public struct OfferCode: Hashable, Codable { + public struct OfferCode: Hashable, Codable, Sendable { public var data: Data public init(data: Data) { @@ -87,7 +87,7 @@ public struct SubscriptionOfferCodeCustomCodeCreateRequest: Hashable, Codable { case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -105,7 +105,7 @@ public struct SubscriptionOfferCodeCustomCodeCreateRequest: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case subscriptionOfferCodes } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/SubscriptionOfferCodeCustomCodeUpdateRequest.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/SubscriptionOfferCodeCustomCodeUpdateRequest.generated.swift index cac02ef2..7901b710 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/SubscriptionOfferCodeCustomCodeUpdateRequest.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/SubscriptionOfferCodeCustomCodeUpdateRequest.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct SubscriptionOfferCodeCustomCodeUpdateRequest: Hashable, Codable { +public struct SubscriptionOfferCodeCustomCodeUpdateRequest: Hashable, Codable, Sendable { public var data: Data public init(data: Data) { @@ -14,7 +14,7 @@ public struct SubscriptionOfferCodeCustomCodeUpdateRequest: Hashable, Codable { case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -37,11 +37,11 @@ public struct SubscriptionOfferCodeCustomCodeUpdateRequest: Hashable, Codable { case attributes } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case subscriptionOfferCodeCustomCodes } - public struct Attributes: Hashable, Codable { + public struct Attributes: Hashable, Codable, Sendable { public var active: Bool? public init(active: Bool? = nil) { diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/SubscriptionOfferCodeOneTimeUseCodeCreateRequest.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/SubscriptionOfferCodeOneTimeUseCodeCreateRequest.generated.swift index e2364be5..281a5d36 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/SubscriptionOfferCodeOneTimeUseCodeCreateRequest.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/SubscriptionOfferCodeOneTimeUseCodeCreateRequest.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct SubscriptionOfferCodeOneTimeUseCodeCreateRequest: Hashable, Codable { +public struct SubscriptionOfferCodeOneTimeUseCodeCreateRequest: Hashable, Codable, Sendable { public var data: Data public init(data: Data) { @@ -14,7 +14,7 @@ public struct SubscriptionOfferCodeOneTimeUseCodeCreateRequest: Hashable, Codabl case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var type: `Type` public var attributes: Attributes @@ -37,11 +37,11 @@ public struct SubscriptionOfferCodeOneTimeUseCodeCreateRequest: Hashable, Codabl case relationships } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case subscriptionOfferCodeOneTimeUseCodes } - public struct Attributes: Hashable, Codable { + public struct Attributes: Hashable, Codable, Sendable { public var expirationDate: String public var numberOfCodes: Int @@ -60,7 +60,7 @@ public struct SubscriptionOfferCodeOneTimeUseCodeCreateRequest: Hashable, Codabl } } - public struct Relationships: Hashable, Codable { + public struct Relationships: Hashable, Codable, Sendable { public var offerCode: OfferCode public init(offerCode: OfferCode) { @@ -71,7 +71,7 @@ public struct SubscriptionOfferCodeOneTimeUseCodeCreateRequest: Hashable, Codabl case offerCode } - public struct OfferCode: Hashable, Codable { + public struct OfferCode: Hashable, Codable, Sendable { public var data: Data public init(data: Data) { @@ -82,7 +82,7 @@ public struct SubscriptionOfferCodeOneTimeUseCodeCreateRequest: Hashable, Codabl case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -100,7 +100,7 @@ public struct SubscriptionOfferCodeOneTimeUseCodeCreateRequest: Hashable, Codabl case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case subscriptionOfferCodes } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/SubscriptionOfferCodeOneTimeUseCodeUpdateRequest.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/SubscriptionOfferCodeOneTimeUseCodeUpdateRequest.generated.swift index 0629adba..b4ffa8cd 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/SubscriptionOfferCodeOneTimeUseCodeUpdateRequest.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/SubscriptionOfferCodeOneTimeUseCodeUpdateRequest.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct SubscriptionOfferCodeOneTimeUseCodeUpdateRequest: Hashable, Codable { +public struct SubscriptionOfferCodeOneTimeUseCodeUpdateRequest: Hashable, Codable, Sendable { public var data: Data public init(data: Data) { @@ -14,7 +14,7 @@ public struct SubscriptionOfferCodeOneTimeUseCodeUpdateRequest: Hashable, Codabl case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -37,11 +37,11 @@ public struct SubscriptionOfferCodeOneTimeUseCodeUpdateRequest: Hashable, Codabl case attributes } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case subscriptionOfferCodeOneTimeUseCodes } - public struct Attributes: Hashable, Codable { + public struct Attributes: Hashable, Codable, Sendable { public var active: Bool? public init(active: Bool? = nil) { diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/SubscriptionOfferCodeUpdateRequest.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/SubscriptionOfferCodeUpdateRequest.generated.swift index ab87e1e0..f95c90d1 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/SubscriptionOfferCodeUpdateRequest.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/SubscriptionOfferCodeUpdateRequest.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct SubscriptionOfferCodeUpdateRequest: Hashable, Codable { +public struct SubscriptionOfferCodeUpdateRequest: Hashable, Codable, Sendable { public var data: Data public init(data: Data) { @@ -14,7 +14,7 @@ public struct SubscriptionOfferCodeUpdateRequest: Hashable, Codable { case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -37,11 +37,11 @@ public struct SubscriptionOfferCodeUpdateRequest: Hashable, Codable { case attributes } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case subscriptionOfferCodes } - public struct Attributes: Hashable, Codable { + public struct Attributes: Hashable, Codable, Sendable { public var active: Bool? public init(active: Bool? = nil) { diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/SubscriptionPriceCreateRequest.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/SubscriptionPriceCreateRequest.generated.swift index 6ec43b8f..d32de84d 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/SubscriptionPriceCreateRequest.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/SubscriptionPriceCreateRequest.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct SubscriptionPriceCreateRequest: Hashable, Codable { +public struct SubscriptionPriceCreateRequest: Hashable, Codable, Sendable { public var data: Data public init(data: Data) { @@ -14,7 +14,7 @@ public struct SubscriptionPriceCreateRequest: Hashable, Codable { case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var type: `Type` public var attributes: Attributes? @@ -37,11 +37,11 @@ public struct SubscriptionPriceCreateRequest: Hashable, Codable { case relationships } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case subscriptionPrices } - public struct Attributes: Hashable, Codable { + public struct Attributes: Hashable, Codable, Sendable { public var preserveCurrentPrice: Bool? public var startDate: String? @@ -60,7 +60,7 @@ public struct SubscriptionPriceCreateRequest: Hashable, Codable { } } - public struct Relationships: Hashable, Codable { + public struct Relationships: Hashable, Codable, Sendable { public var subscription: Subscription public var subscriptionPricePoint: SubscriptionPricePoint @@ -83,7 +83,7 @@ public struct SubscriptionPriceCreateRequest: Hashable, Codable { case territory } - public struct Subscription: Hashable, Codable { + public struct Subscription: Hashable, Codable, Sendable { public var data: Data public init(data: Data) { @@ -94,7 +94,7 @@ public struct SubscriptionPriceCreateRequest: Hashable, Codable { case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -112,13 +112,13 @@ public struct SubscriptionPriceCreateRequest: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case subscriptions } } } - public struct SubscriptionPricePoint: Hashable, Codable { + public struct SubscriptionPricePoint: Hashable, Codable, Sendable { public var data: Data public init(data: Data) { @@ -129,7 +129,7 @@ public struct SubscriptionPriceCreateRequest: Hashable, Codable { case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -147,13 +147,13 @@ public struct SubscriptionPriceCreateRequest: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case subscriptionPricePoints } } } - public struct Territory: Hashable, Codable { + public struct Territory: Hashable, Codable, Sendable { public var data: Data? public init(data: Data? = nil) { @@ -164,7 +164,7 @@ public struct SubscriptionPriceCreateRequest: Hashable, Codable { case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -182,7 +182,7 @@ public struct SubscriptionPriceCreateRequest: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case territories } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/SubscriptionPricesLinkagesRequest.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/SubscriptionPricesLinkagesRequest.generated.swift index 80e095c9..29a1ed27 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/SubscriptionPricesLinkagesRequest.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/SubscriptionPricesLinkagesRequest.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct SubscriptionPricesLinkagesRequest: Hashable, Codable { +public struct SubscriptionPricesLinkagesRequest: Hashable, Codable, Sendable { public var data: [Data] public init(data: [Data]) { @@ -14,7 +14,7 @@ public struct SubscriptionPricesLinkagesRequest: Hashable, Codable { case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -32,7 +32,7 @@ public struct SubscriptionPricesLinkagesRequest: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case subscriptionPrices } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/SubscriptionPromotionalOfferCreateRequest.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/SubscriptionPromotionalOfferCreateRequest.generated.swift index 4f6393a4..acebfb12 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/SubscriptionPromotionalOfferCreateRequest.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/SubscriptionPromotionalOfferCreateRequest.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct SubscriptionPromotionalOfferCreateRequest: Hashable, Codable { +public struct SubscriptionPromotionalOfferCreateRequest: Hashable, Codable, Sendable { public var data: Data public var included: [SubscriptionPromotionalOfferPriceInlineCreate]? @@ -21,7 +21,7 @@ public struct SubscriptionPromotionalOfferCreateRequest: Hashable, Codable { case included } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var type: `Type` public var attributes: Attributes @@ -44,11 +44,11 @@ public struct SubscriptionPromotionalOfferCreateRequest: Hashable, Codable { case relationships } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case subscriptionPromotionalOffers } - public struct Attributes: Hashable, Codable { + public struct Attributes: Hashable, Codable, Sendable { public var duration: SubscriptionOfferDuration public var name: String @@ -82,7 +82,7 @@ public struct SubscriptionPromotionalOfferCreateRequest: Hashable, Codable { } } - public struct Relationships: Hashable, Codable { + public struct Relationships: Hashable, Codable, Sendable { public var prices: Prices public var subscription: Subscription @@ -100,7 +100,7 @@ public struct SubscriptionPromotionalOfferCreateRequest: Hashable, Codable { case subscription } - public struct Prices: Hashable, Codable { + public struct Prices: Hashable, Codable, Sendable { public var data: [Data] public init(data: [Data]) { @@ -111,7 +111,7 @@ public struct SubscriptionPromotionalOfferCreateRequest: Hashable, Codable { case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -129,13 +129,13 @@ public struct SubscriptionPromotionalOfferCreateRequest: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case subscriptionPromotionalOfferPrices } } } - public struct Subscription: Hashable, Codable { + public struct Subscription: Hashable, Codable, Sendable { public var data: Data public init(data: Data) { @@ -146,7 +146,7 @@ public struct SubscriptionPromotionalOfferCreateRequest: Hashable, Codable { case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -164,7 +164,7 @@ public struct SubscriptionPromotionalOfferCreateRequest: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case subscriptions } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/SubscriptionPromotionalOfferUpdateRequest.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/SubscriptionPromotionalOfferUpdateRequest.generated.swift index 397f811d..3fe62e76 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/SubscriptionPromotionalOfferUpdateRequest.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/SubscriptionPromotionalOfferUpdateRequest.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct SubscriptionPromotionalOfferUpdateRequest: Hashable, Codable { +public struct SubscriptionPromotionalOfferUpdateRequest: Hashable, Codable, Sendable { public var data: Data public var included: [SubscriptionPromotionalOfferPriceInlineCreate]? @@ -21,7 +21,7 @@ public struct SubscriptionPromotionalOfferUpdateRequest: Hashable, Codable { case included } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -44,11 +44,11 @@ public struct SubscriptionPromotionalOfferUpdateRequest: Hashable, Codable { case relationships } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case subscriptionPromotionalOffers } - public struct Relationships: Hashable, Codable { + public struct Relationships: Hashable, Codable, Sendable { public var prices: Prices? public init(prices: Prices? = nil) { @@ -59,7 +59,7 @@ public struct SubscriptionPromotionalOfferUpdateRequest: Hashable, Codable { case prices } - public struct Prices: Hashable, Codable { + public struct Prices: Hashable, Codable, Sendable { public var data: [Data]? public init(data: [Data]? = nil) { @@ -70,7 +70,7 @@ public struct SubscriptionPromotionalOfferUpdateRequest: Hashable, Codable { case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -88,7 +88,7 @@ public struct SubscriptionPromotionalOfferUpdateRequest: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case subscriptionPromotionalOfferPrices } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/SubscriptionSubmissionCreateRequest.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/SubscriptionSubmissionCreateRequest.generated.swift index 62fec5e5..c43fb3ab 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/SubscriptionSubmissionCreateRequest.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/SubscriptionSubmissionCreateRequest.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct SubscriptionSubmissionCreateRequest: Hashable, Codable { +public struct SubscriptionSubmissionCreateRequest: Hashable, Codable, Sendable { public var data: Data public init(data: Data) { @@ -14,7 +14,7 @@ public struct SubscriptionSubmissionCreateRequest: Hashable, Codable { case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var type: `Type` public var relationships: Relationships @@ -32,11 +32,11 @@ public struct SubscriptionSubmissionCreateRequest: Hashable, Codable { case relationships } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case subscriptionSubmissions } - public struct Relationships: Hashable, Codable { + public struct Relationships: Hashable, Codable, Sendable { public var subscription: Subscription public init(subscription: Subscription) { @@ -47,7 +47,7 @@ public struct SubscriptionSubmissionCreateRequest: Hashable, Codable { case subscription } - public struct Subscription: Hashable, Codable { + public struct Subscription: Hashable, Codable, Sendable { public var data: Data public init(data: Data) { @@ -58,7 +58,7 @@ public struct SubscriptionSubmissionCreateRequest: Hashable, Codable { case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -76,7 +76,7 @@ public struct SubscriptionSubmissionCreateRequest: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case subscriptions } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/SubscriptionUpdateRequest.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/SubscriptionUpdateRequest.generated.swift index d50a8413..e23c1909 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/SubscriptionUpdateRequest.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/SubscriptionUpdateRequest.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct SubscriptionUpdateRequest: Hashable, Codable { +public struct SubscriptionUpdateRequest: Hashable, Codable, Sendable { public var data: Data public var included: [Included]? @@ -21,7 +21,7 @@ public struct SubscriptionUpdateRequest: Hashable, Codable { case included } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -49,14 +49,11 @@ public struct SubscriptionUpdateRequest: Hashable, Codable { case relationships } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case subscriptions } - public struct Attributes: Hashable, Codable { - @available(*, deprecated) - public var availableInAllTerritories: Bool? - + public struct Attributes: Hashable, Codable, Sendable { public var familySharable: Bool? public var groupLevel: Int? @@ -68,14 +65,12 @@ public struct SubscriptionUpdateRequest: Hashable, Codable { public var subscriptionPeriod: SubscriptionPeriod? public init( - availableInAllTerritories: Bool? = nil, familySharable: Bool? = nil, groupLevel: Int? = nil, name: String? = nil, reviewNote: String? = nil, subscriptionPeriod: SubscriptionPeriod? = nil ) { - self.availableInAllTerritories = availableInAllTerritories self.familySharable = familySharable self.groupLevel = groupLevel self.name = name @@ -84,7 +79,6 @@ public struct SubscriptionUpdateRequest: Hashable, Codable { } private enum CodingKeys: String, CodingKey { - case availableInAllTerritories case familySharable case groupLevel case name @@ -92,42 +86,44 @@ public struct SubscriptionUpdateRequest: Hashable, Codable { case subscriptionPeriod } - public enum SubscriptionPeriod: Hashable, Codable, RawRepresentable { - case oneMonth - case oneWeek - case oneYear - case sixMonths - case threeMonths - case twoMonths - case unknown(String) - - public var rawValue: String { - switch self { - case .oneMonth: return "ONE_MONTH" - case .oneWeek: return "ONE_WEEK" - case .oneYear: return "ONE_YEAR" - case .sixMonths: return "SIX_MONTHS" - case .threeMonths: return "THREE_MONTHS" - case .twoMonths: return "TWO_MONTHS" - case .unknown(let rawValue): return rawValue - } + public struct SubscriptionPeriod: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var oneMonth: Self { + .init(rawValue: "ONE_MONTH") + } + + public static var oneWeek: Self { + .init(rawValue: "ONE_WEEK") + } + + public static var oneYear: Self { + .init(rawValue: "ONE_YEAR") + } + + public static var sixMonths: Self { + .init(rawValue: "SIX_MONTHS") } + public static var threeMonths: Self { + .init(rawValue: "THREE_MONTHS") + } + + public static var twoMonths: Self { + .init(rawValue: "TWO_MONTHS") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "ONE_MONTH": self = .oneMonth - case "ONE_WEEK": self = .oneWeek - case "ONE_YEAR": self = .oneYear - case "SIX_MONTHS": self = .sixMonths - case "THREE_MONTHS": self = .threeMonths - case "TWO_MONTHS": self = .twoMonths - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } } - public struct Relationships: Hashable, Codable { + public struct Relationships: Hashable, Codable, Sendable { public var introductoryOffers: IntroductoryOffers? public var prices: Prices? @@ -150,7 +146,7 @@ public struct SubscriptionUpdateRequest: Hashable, Codable { case promotionalOffers } - public struct IntroductoryOffers: Hashable, Codable { + public struct IntroductoryOffers: Hashable, Codable, Sendable { public var data: [Data]? public init(data: [Data]? = nil) { @@ -161,7 +157,7 @@ public struct SubscriptionUpdateRequest: Hashable, Codable { case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -179,13 +175,13 @@ public struct SubscriptionUpdateRequest: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case subscriptionIntroductoryOffers } } } - public struct Prices: Hashable, Codable { + public struct Prices: Hashable, Codable, Sendable { public var data: [Data]? public init(data: [Data]? = nil) { @@ -196,7 +192,7 @@ public struct SubscriptionUpdateRequest: Hashable, Codable { case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -214,13 +210,13 @@ public struct SubscriptionUpdateRequest: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case subscriptionPrices } } } - public struct PromotionalOffers: Hashable, Codable { + public struct PromotionalOffers: Hashable, Codable, Sendable { public var data: [Data]? public init(data: [Data]? = nil) { @@ -231,7 +227,7 @@ public struct SubscriptionUpdateRequest: Hashable, Codable { case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -249,7 +245,7 @@ public struct SubscriptionUpdateRequest: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case subscriptionPromotionalOffers } } @@ -257,7 +253,7 @@ public struct SubscriptionUpdateRequest: Hashable, Codable { } } - public enum Included: Hashable, Codable { + public enum Included: Hashable, Codable, Sendable { case subscriptionPromotionalOfferInlineCreate(SubscriptionPromotionalOfferInlineCreate) case subscriptionPriceInlineCreate(SubscriptionPriceInlineCreate) case subscriptionIntroductoryOfferInlineCreate(SubscriptionIntroductoryOfferInlineCreate) diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/TerritoryAvailabilityUpdateRequest.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/TerritoryAvailabilityUpdateRequest.generated.swift index d10b0a85..995b1935 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/TerritoryAvailabilityUpdateRequest.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/TerritoryAvailabilityUpdateRequest.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct TerritoryAvailabilityUpdateRequest: Hashable, Codable { +public struct TerritoryAvailabilityUpdateRequest: Hashable, Codable, Sendable { public var data: Data public init(data: Data) { @@ -14,7 +14,7 @@ public struct TerritoryAvailabilityUpdateRequest: Hashable, Codable { case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -37,11 +37,11 @@ public struct TerritoryAvailabilityUpdateRequest: Hashable, Codable { case attributes } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case territoryAvailabilities } - public struct Attributes: Hashable, Codable { + public struct Attributes: Hashable, Codable, Sendable { public var available: Bool? public var preOrderEnabled: Bool? diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/UserInvitationCreateRequest.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/UserInvitationCreateRequest.generated.swift index fad877a8..d83e1a3b 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/UserInvitationCreateRequest.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/UserInvitationCreateRequest.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct UserInvitationCreateRequest: Hashable, Codable { +public struct UserInvitationCreateRequest: Hashable, Codable, Sendable { public var data: Data public init(data: Data) { @@ -14,7 +14,7 @@ public struct UserInvitationCreateRequest: Hashable, Codable { case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var type: `Type` public var attributes: Attributes @@ -37,11 +37,11 @@ public struct UserInvitationCreateRequest: Hashable, Codable { case relationships } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case userInvitations } - public struct Attributes: Hashable, Codable { + public struct Attributes: Hashable, Codable, Sendable { public var allAppsVisible: Bool? public var email: String @@ -80,7 +80,7 @@ public struct UserInvitationCreateRequest: Hashable, Codable { } } - public struct Relationships: Hashable, Codable { + public struct Relationships: Hashable, Codable, Sendable { public var visibleApps: VisibleApps? public init(visibleApps: VisibleApps? = nil) { @@ -91,7 +91,7 @@ public struct UserInvitationCreateRequest: Hashable, Codable { case visibleApps } - public struct VisibleApps: Hashable, Codable { + public struct VisibleApps: Hashable, Codable, Sendable { public var data: [Data]? public init(data: [Data]? = nil) { @@ -102,7 +102,7 @@ public struct UserInvitationCreateRequest: Hashable, Codable { case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -120,7 +120,7 @@ public struct UserInvitationCreateRequest: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case apps } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/UserUpdateRequest.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/UserUpdateRequest.generated.swift index b44d6401..0b2bba89 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/UserUpdateRequest.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/UserUpdateRequest.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct UserUpdateRequest: Hashable, Codable { +public struct UserUpdateRequest: Hashable, Codable, Sendable { public var data: Data public init(data: Data) { @@ -14,7 +14,7 @@ public struct UserUpdateRequest: Hashable, Codable { case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -42,11 +42,11 @@ public struct UserUpdateRequest: Hashable, Codable { case relationships } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case users } - public struct Attributes: Hashable, Codable { + public struct Attributes: Hashable, Codable, Sendable { public var allAppsVisible: Bool? public var provisioningAllowed: Bool? @@ -70,7 +70,7 @@ public struct UserUpdateRequest: Hashable, Codable { } } - public struct Relationships: Hashable, Codable { + public struct Relationships: Hashable, Codable, Sendable { public var visibleApps: VisibleApps? public init(visibleApps: VisibleApps? = nil) { @@ -81,7 +81,7 @@ public struct UserUpdateRequest: Hashable, Codable { case visibleApps } - public struct VisibleApps: Hashable, Codable { + public struct VisibleApps: Hashable, Codable, Sendable { public var data: [Data]? public init(data: [Data]? = nil) { @@ -92,7 +92,7 @@ public struct UserUpdateRequest: Hashable, Codable { case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -110,7 +110,7 @@ public struct UserUpdateRequest: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case apps } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/UserVisibleAppsLinkagesRequest.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/UserVisibleAppsLinkagesRequest.generated.swift index 8d64cd3b..5b33fe3d 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/UserVisibleAppsLinkagesRequest.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/UserVisibleAppsLinkagesRequest.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct UserVisibleAppsLinkagesRequest: Hashable, Codable { +public struct UserVisibleAppsLinkagesRequest: Hashable, Codable, Sendable { public var data: [Data] public init(data: [Data]) { @@ -14,7 +14,7 @@ public struct UserVisibleAppsLinkagesRequest: Hashable, Codable { case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -32,7 +32,7 @@ public struct UserVisibleAppsLinkagesRequest: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case apps } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/WebhookCreateRequest.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/WebhookCreateRequest.generated.swift new file mode 100644 index 00000000..5170a8f7 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/WebhookCreateRequest.generated.swift @@ -0,0 +1,127 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct WebhookCreateRequest: Hashable, Codable, Sendable { + public var data: Data + + public init(data: Data) { + self.data = data + } + + private enum CodingKeys: String, CodingKey { + case data + } + + public struct Data: Hashable, Codable, Sendable { + public var type: `Type` + + public var attributes: Attributes + + public var relationships: Relationships + + public init( + type: `Type`, + attributes: Attributes, + relationships: Relationships + ) { + self.type = type + self.attributes = attributes + self.relationships = relationships + } + + private enum CodingKeys: String, CodingKey { + case type + case attributes + case relationships + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case webhooks + } + + public struct Attributes: Hashable, Codable, Sendable { + public var enabled: Bool + + public var eventTypes: [WebhookEventType] + + public var name: String + + public var secret: String + + public var url: URL + + public init( + enabled: Bool, + eventTypes: [WebhookEventType], + name: String, + secret: String, + url: URL + ) { + self.enabled = enabled + self.eventTypes = eventTypes + self.name = name + self.secret = secret + self.url = url + } + + private enum CodingKeys: String, CodingKey { + case enabled + case eventTypes + case name + case secret + case url + } + } + + public struct Relationships: Hashable, Codable, Sendable { + public var app: App + + public init(app: App) { + self.app = app + } + + private enum CodingKeys: String, CodingKey { + case app + } + + public struct App: Hashable, Codable, Sendable { + public var data: Data + + public init(data: Data) { + self.data = data + } + + private enum CodingKeys: String, CodingKey { + case data + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case apps + } + } + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/WebhookDeliveryCreateRequest.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/WebhookDeliveryCreateRequest.generated.swift new file mode 100644 index 00000000..6ed9dfa6 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/WebhookDeliveryCreateRequest.generated.swift @@ -0,0 +1,88 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct WebhookDeliveryCreateRequest: Hashable, Codable, Sendable { + public var data: Data + + public init(data: Data) { + self.data = data + } + + private enum CodingKeys: String, CodingKey { + case data + } + + public struct Data: Hashable, Codable, Sendable { + public var type: `Type` + + public var relationships: Relationships + + public init( + type: `Type`, + relationships: Relationships + ) { + self.type = type + self.relationships = relationships + } + + private enum CodingKeys: String, CodingKey { + case type + case relationships + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case webhookDeliveries + } + + public struct Relationships: Hashable, Codable, Sendable { + public var template: Template + + public init(template: Template) { + self.template = template + } + + private enum CodingKeys: String, CodingKey { + case template + } + + public struct Template: Hashable, Codable, Sendable { + public var data: Data + + public init(data: Data) { + self.data = data + } + + private enum CodingKeys: String, CodingKey { + case data + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case webhookDeliveries + } + } + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/WebhookPingCreateRequest.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/WebhookPingCreateRequest.generated.swift new file mode 100644 index 00000000..a71a7844 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/WebhookPingCreateRequest.generated.swift @@ -0,0 +1,88 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct WebhookPingCreateRequest: Hashable, Codable, Sendable { + public var data: Data + + public init(data: Data) { + self.data = data + } + + private enum CodingKeys: String, CodingKey { + case data + } + + public struct Data: Hashable, Codable, Sendable { + public var type: `Type` + + public var relationships: Relationships + + public init( + type: `Type`, + relationships: Relationships + ) { + self.type = type + self.relationships = relationships + } + + private enum CodingKeys: String, CodingKey { + case type + case relationships + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case webhookPings + } + + public struct Relationships: Hashable, Codable, Sendable { + public var webhook: Webhook + + public init(webhook: Webhook) { + self.webhook = webhook + } + + private enum CodingKeys: String, CodingKey { + case webhook + } + + public struct Webhook: Hashable, Codable, Sendable { + public var data: Data + + public init(data: Data) { + self.data = data + } + + private enum CodingKeys: String, CodingKey { + case data + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case webhooks + } + } + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/WebhookUpdateRequest.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/WebhookUpdateRequest.generated.swift new file mode 100644 index 00000000..a21048cc --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/WebhookUpdateRequest.generated.swift @@ -0,0 +1,80 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct WebhookUpdateRequest: Hashable, Codable, Sendable { + public var data: Data + + public init(data: Data) { + self.data = data + } + + private enum CodingKeys: String, CodingKey { + case data + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public var attributes: Attributes? + + public init( + id: String, + type: `Type`, + attributes: Attributes? = nil + ) { + self.id = id + self.type = type + self.attributes = attributes + } + + private enum CodingKeys: String, CodingKey { + case id + case type + case attributes + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case webhooks + } + + public struct Attributes: Hashable, Codable, Sendable { + public var enabled: Bool? + + public var eventTypes: [WebhookEventType]? + + public var name: String? + + public var secret: String? + + public var url: URL? + + public init( + enabled: Bool? = nil, + eventTypes: [WebhookEventType]? = nil, + name: String? = nil, + secret: String? = nil, + url: URL? = nil + ) { + self.enabled = enabled + self.eventTypes = eventTypes + self.name = name + self.secret = secret + self.url = url + } + + private enum CodingKeys: String, CodingKey { + case enabled + case eventTypes + case name + case secret + case url + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/WinBackOfferCreateRequest.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/WinBackOfferCreateRequest.generated.swift new file mode 100644 index 00000000..ec72f505 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/WinBackOfferCreateRequest.generated.swift @@ -0,0 +1,251 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct WinBackOfferCreateRequest: Hashable, Codable, Sendable { + public var data: Data + + public var included: [WinBackOfferPriceInlineCreate]? + + public init( + data: Data, + included: [WinBackOfferPriceInlineCreate]? = nil + ) { + self.data = data + self.included = included + } + + private enum CodingKeys: String, CodingKey { + case data + case included + } + + public struct Data: Hashable, Codable, Sendable { + public var type: `Type` + + public var attributes: Attributes + + public var relationships: Relationships + + public init( + type: `Type`, + attributes: Attributes, + relationships: Relationships + ) { + self.type = type + self.attributes = attributes + self.relationships = relationships + } + + private enum CodingKeys: String, CodingKey { + case type + case attributes + case relationships + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case winBackOffers + } + + public struct Attributes: Hashable, Codable, Sendable { + public var customerEligibilityPaidSubscriptionDurationInMonths: Int + + public var customerEligibilityTimeSinceLastSubscribedInMonths: IntegerRange + + public var customerEligibilityWaitBetweenOffersInMonths: Int? + + public var duration: SubscriptionOfferDuration + + public var endDate: String? + + public var offerId: String + + public var offerMode: SubscriptionOfferMode + + public var periodCount: Int + + public var priority: Priority + + public var promotionIntent: PromotionIntent? + + public var referenceName: String + + public var startDate: String + + public init( + customerEligibilityPaidSubscriptionDurationInMonths: Int, + customerEligibilityTimeSinceLastSubscribedInMonths: IntegerRange, + customerEligibilityWaitBetweenOffersInMonths: Int? = nil, + duration: SubscriptionOfferDuration, + endDate: String? = nil, + offerId: String, + offerMode: SubscriptionOfferMode, + periodCount: Int, + priority: Priority, + promotionIntent: PromotionIntent? = nil, + referenceName: String, + startDate: String + ) { + self.customerEligibilityPaidSubscriptionDurationInMonths = customerEligibilityPaidSubscriptionDurationInMonths + self.customerEligibilityTimeSinceLastSubscribedInMonths = customerEligibilityTimeSinceLastSubscribedInMonths + self.customerEligibilityWaitBetweenOffersInMonths = customerEligibilityWaitBetweenOffersInMonths + self.duration = duration + self.endDate = endDate + self.offerId = offerId + self.offerMode = offerMode + self.periodCount = periodCount + self.priority = priority + self.promotionIntent = promotionIntent + self.referenceName = referenceName + self.startDate = startDate + } + + private enum CodingKeys: String, CodingKey { + case customerEligibilityPaidSubscriptionDurationInMonths + case customerEligibilityTimeSinceLastSubscribedInMonths + case customerEligibilityWaitBetweenOffersInMonths + case duration + case endDate + case offerId + case offerMode + case periodCount + case priority + case promotionIntent + case referenceName + case startDate + } + + public struct Priority: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var high: Self { + .init(rawValue: "HIGH") + } + + public static var normal: Self { + .init(rawValue: "NORMAL") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct PromotionIntent: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var notPromoted: Self { + .init(rawValue: "NOT_PROMOTED") + } + + public static var useAutoGeneratedAssets: Self { + .init(rawValue: "USE_AUTO_GENERATED_ASSETS") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + } + + public struct Relationships: Hashable, Codable, Sendable { + public var prices: Prices + + public var subscription: Subscription + + public init( + prices: Prices, + subscription: Subscription + ) { + self.prices = prices + self.subscription = subscription + } + + private enum CodingKeys: String, CodingKey { + case prices + case subscription + } + + public struct Prices: Hashable, Codable, Sendable { + public var data: [Data] + + public init(data: [Data]) { + self.data = data + } + + private enum CodingKeys: String, CodingKey { + case data + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case winBackOfferPrices + } + } + } + + public struct Subscription: Hashable, Codable, Sendable { + public var data: Data + + public init(data: Data) { + self.data = data + } + + private enum CodingKeys: String, CodingKey { + case data + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case subscriptions + } + } + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/WinBackOfferUpdateRequest.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/WinBackOfferUpdateRequest.generated.swift new file mode 100644 index 00000000..cb22aa0d --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/WinBackOfferUpdateRequest.generated.swift @@ -0,0 +1,130 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct WinBackOfferUpdateRequest: Hashable, Codable, Sendable { + public var data: Data + + public init(data: Data) { + self.data = data + } + + private enum CodingKeys: String, CodingKey { + case data + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public var attributes: Attributes? + + public init( + id: String, + type: `Type`, + attributes: Attributes? = nil + ) { + self.id = id + self.type = type + self.attributes = attributes + } + + private enum CodingKeys: String, CodingKey { + case id + case type + case attributes + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case winBackOffers + } + + public struct Attributes: Hashable, Codable, Sendable { + public var customerEligibilityPaidSubscriptionDurationInMonths: Int? + + public var customerEligibilityTimeSinceLastSubscribedInMonths: IntegerRange? + + public var customerEligibilityWaitBetweenOffersInMonths: Int? + + public var endDate: String? + + public var priority: Priority? + + public var promotionIntent: PromotionIntent? + + public var startDate: String? + + public init( + customerEligibilityPaidSubscriptionDurationInMonths: Int? = nil, + customerEligibilityTimeSinceLastSubscribedInMonths: IntegerRange? = nil, + customerEligibilityWaitBetweenOffersInMonths: Int? = nil, + endDate: String? = nil, + priority: Priority? = nil, + promotionIntent: PromotionIntent? = nil, + startDate: String? = nil + ) { + self.customerEligibilityPaidSubscriptionDurationInMonths = customerEligibilityPaidSubscriptionDurationInMonths + self.customerEligibilityTimeSinceLastSubscribedInMonths = customerEligibilityTimeSinceLastSubscribedInMonths + self.customerEligibilityWaitBetweenOffersInMonths = customerEligibilityWaitBetweenOffersInMonths + self.endDate = endDate + self.priority = priority + self.promotionIntent = promotionIntent + self.startDate = startDate + } + + private enum CodingKeys: String, CodingKey { + case customerEligibilityPaidSubscriptionDurationInMonths + case customerEligibilityTimeSinceLastSubscribedInMonths + case customerEligibilityWaitBetweenOffersInMonths + case endDate + case priority + case promotionIntent + case startDate + } + + public struct Priority: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var high: Self { + .init(rawValue: "HIGH") + } + + public static var normal: Self { + .init(rawValue: "NORMAL") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct PromotionIntent: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var notPromoted: Self { + .init(rawValue: "NOT_PROMOTED") + } + + public static var useAutoGeneratedAssets: Self { + .init(rawValue: "USE_AUTO_GENERATED_ASSETS") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/ResourceLinks.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/ResourceLinks.generated.swift index d9fca492..99ed4418 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/ResourceLinks.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/ResourceLinks.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct ResourceLinks: Hashable, Codable { +public struct ResourceLinks: Hashable, Codable, Sendable { public var `self`: URL? public init(self _self: URL? = nil) { diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AccessibilityDeclarationResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AccessibilityDeclarationResponse.generated.swift new file mode 100644 index 00000000..a2418ee9 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AccessibilityDeclarationResponse.generated.swift @@ -0,0 +1,25 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct AccessibilityDeclarationResponse: Hashable, Codable, Sendable { + public var data: AccessibilityDeclaration + + public var links: DocumentLinks + + public init( + data: AccessibilityDeclaration, + links: DocumentLinks + ) { + self.data = data + self.links = links + } + + private enum CodingKeys: String, CodingKey { + case data + case links + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AccessibilityDeclarationsResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AccessibilityDeclarationsResponse.generated.swift new file mode 100644 index 00000000..ad747eba --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AccessibilityDeclarationsResponse.generated.swift @@ -0,0 +1,30 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct AccessibilityDeclarationsResponse: Hashable, Codable, Sendable { + public var data: [AccessibilityDeclaration] + + public var links: PagedDocumentLinks + + public var meta: PagingInformation? + + public init( + data: [AccessibilityDeclaration], + links: PagedDocumentLinks, + meta: PagingInformation? = nil + ) { + self.data = data + self.links = links + self.meta = meta + } + + private enum CodingKeys: String, CodingKey { + case data + case links + case meta + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/ActorResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/ActorResponse.generated.swift index b417d5be..363e4236 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/ActorResponse.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/ActorResponse.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct ActorResponse: Hashable, Codable { +public struct ActorResponse: Hashable, Codable, Sendable { public var data: Actor public var links: DocumentLinks diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/ActorsResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/ActorsResponse.generated.swift index aeb16384..d0ac3fde 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/ActorsResponse.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/ActorsResponse.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct ActorsResponse: Hashable, Codable { +public struct ActorsResponse: Hashable, Codable, Sendable { public var data: [Actor] public var links: PagedDocumentLinks diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AgeRatingDeclarationResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AgeRatingDeclarationResponse.generated.swift index b551c79c..0bcb94de 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AgeRatingDeclarationResponse.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AgeRatingDeclarationResponse.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct AgeRatingDeclarationResponse: Hashable, Codable { +public struct AgeRatingDeclarationResponse: Hashable, Codable, Sendable { public var data: AgeRatingDeclaration public var links: DocumentLinks diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AgeRatingDeclarationWithoutIncludesResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AgeRatingDeclarationWithoutIncludesResponse.generated.swift index 6f0ad46a..d7f88a86 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AgeRatingDeclarationWithoutIncludesResponse.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AgeRatingDeclarationWithoutIncludesResponse.generated.swift @@ -3,13 +3,13 @@ // swiftlint:disable all import Foundation -public struct AgeRatingDeclarationWithoutIncludesResponse: Hashable, Codable { - public var data: AppStoreVersion +public struct AgeRatingDeclarationWithoutIncludesResponse: Hashable, Codable, Sendable { + public var data: AgeRatingDeclaration public var links: DocumentLinks public init( - data: AppStoreVersion, + data: AgeRatingDeclaration, links: DocumentLinks ) { self.data = data diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AlternativeDistributionDomainResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AlternativeDistributionDomainResponse.generated.swift new file mode 100644 index 00000000..640ad765 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AlternativeDistributionDomainResponse.generated.swift @@ -0,0 +1,25 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct AlternativeDistributionDomainResponse: Hashable, Codable, Sendable { + public var data: AlternativeDistributionDomain + + public var links: DocumentLinks + + public init( + data: AlternativeDistributionDomain, + links: DocumentLinks + ) { + self.data = data + self.links = links + } + + private enum CodingKeys: String, CodingKey { + case data + case links + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AlternativeDistributionDomainsResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AlternativeDistributionDomainsResponse.generated.swift new file mode 100644 index 00000000..78749fce --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AlternativeDistributionDomainsResponse.generated.swift @@ -0,0 +1,30 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct AlternativeDistributionDomainsResponse: Hashable, Codable, Sendable { + public var data: [AlternativeDistributionDomain] + + public var links: PagedDocumentLinks + + public var meta: PagingInformation? + + public init( + data: [AlternativeDistributionDomain], + links: PagedDocumentLinks, + meta: PagingInformation? = nil + ) { + self.data = data + self.links = links + self.meta = meta + } + + private enum CodingKeys: String, CodingKey { + case data + case links + case meta + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AlternativeDistributionKeyResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AlternativeDistributionKeyResponse.generated.swift new file mode 100644 index 00000000..29224b7f --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AlternativeDistributionKeyResponse.generated.swift @@ -0,0 +1,25 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct AlternativeDistributionKeyResponse: Hashable, Codable, Sendable { + public var data: AlternativeDistributionKey + + public var links: DocumentLinks + + public init( + data: AlternativeDistributionKey, + links: DocumentLinks + ) { + self.data = data + self.links = links + } + + private enum CodingKeys: String, CodingKey { + case data + case links + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AlternativeDistributionKeysResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AlternativeDistributionKeysResponse.generated.swift new file mode 100644 index 00000000..e6fc166b --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AlternativeDistributionKeysResponse.generated.swift @@ -0,0 +1,30 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct AlternativeDistributionKeysResponse: Hashable, Codable, Sendable { + public var data: [AlternativeDistributionKey] + + public var links: PagedDocumentLinks + + public var meta: PagingInformation? + + public init( + data: [AlternativeDistributionKey], + links: PagedDocumentLinks, + meta: PagingInformation? = nil + ) { + self.data = data + self.links = links + self.meta = meta + } + + private enum CodingKeys: String, CodingKey { + case data + case links + case meta + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AlternativeDistributionPackageDeltaResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AlternativeDistributionPackageDeltaResponse.generated.swift new file mode 100644 index 00000000..6f240763 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AlternativeDistributionPackageDeltaResponse.generated.swift @@ -0,0 +1,25 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct AlternativeDistributionPackageDeltaResponse: Hashable, Codable, Sendable { + public var data: AlternativeDistributionPackageDelta + + public var links: DocumentLinks + + public init( + data: AlternativeDistributionPackageDelta, + links: DocumentLinks + ) { + self.data = data + self.links = links + } + + private enum CodingKeys: String, CodingKey { + case data + case links + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AlternativeDistributionPackageDeltasResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AlternativeDistributionPackageDeltasResponse.generated.swift new file mode 100644 index 00000000..90cd1739 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AlternativeDistributionPackageDeltasResponse.generated.swift @@ -0,0 +1,30 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct AlternativeDistributionPackageDeltasResponse: Hashable, Codable, Sendable { + public var data: [AlternativeDistributionPackageDelta] + + public var links: PagedDocumentLinks + + public var meta: PagingInformation? + + public init( + data: [AlternativeDistributionPackageDelta], + links: PagedDocumentLinks, + meta: PagingInformation? = nil + ) { + self.data = data + self.links = links + self.meta = meta + } + + private enum CodingKeys: String, CodingKey { + case data + case links + case meta + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AlternativeDistributionPackageResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AlternativeDistributionPackageResponse.generated.swift new file mode 100644 index 00000000..6ef26d11 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AlternativeDistributionPackageResponse.generated.swift @@ -0,0 +1,30 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct AlternativeDistributionPackageResponse: Hashable, Codable, Sendable { + public var data: AlternativeDistributionPackage + + public var included: [AlternativeDistributionPackageVersion]? + + public var links: DocumentLinks + + public init( + data: AlternativeDistributionPackage, + included: [AlternativeDistributionPackageVersion]? = nil, + links: DocumentLinks + ) { + self.data = data + self.included = included + self.links = links + } + + private enum CodingKeys: String, CodingKey { + case data + case included + case links + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AlternativeDistributionPackageVariantResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AlternativeDistributionPackageVariantResponse.generated.swift new file mode 100644 index 00000000..c4339e50 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AlternativeDistributionPackageVariantResponse.generated.swift @@ -0,0 +1,25 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct AlternativeDistributionPackageVariantResponse: Hashable, Codable, Sendable { + public var data: AlternativeDistributionPackageVariant + + public var links: DocumentLinks + + public init( + data: AlternativeDistributionPackageVariant, + links: DocumentLinks + ) { + self.data = data + self.links = links + } + + private enum CodingKeys: String, CodingKey { + case data + case links + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AlternativeDistributionPackageVariantsResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AlternativeDistributionPackageVariantsResponse.generated.swift new file mode 100644 index 00000000..2ff769a7 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AlternativeDistributionPackageVariantsResponse.generated.swift @@ -0,0 +1,30 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct AlternativeDistributionPackageVariantsResponse: Hashable, Codable, Sendable { + public var data: [AlternativeDistributionPackageVariant] + + public var links: PagedDocumentLinks + + public var meta: PagingInformation? + + public init( + data: [AlternativeDistributionPackageVariant], + links: PagedDocumentLinks, + meta: PagingInformation? = nil + ) { + self.data = data + self.links = links + self.meta = meta + } + + private enum CodingKeys: String, CodingKey { + case data + case links + case meta + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AlternativeDistributionPackageVersionDeltasLinkagesResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AlternativeDistributionPackageVersionDeltasLinkagesResponse.generated.swift new file mode 100644 index 00000000..170398a6 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AlternativeDistributionPackageVersionDeltasLinkagesResponse.generated.swift @@ -0,0 +1,53 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct AlternativeDistributionPackageVersionDeltasLinkagesResponse: Hashable, Codable, Sendable { + public var data: [Data] + + public var links: PagedDocumentLinks + + public var meta: PagingInformation? + + public init( + data: [Data], + links: PagedDocumentLinks, + meta: PagingInformation? = nil + ) { + self.data = data + self.links = links + self.meta = meta + } + + private enum CodingKeys: String, CodingKey { + case data + case links + case meta + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case alternativeDistributionPackageDeltas + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AlternativeDistributionPackageVersionResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AlternativeDistributionPackageVersionResponse.generated.swift new file mode 100644 index 00000000..e19f7c4e --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AlternativeDistributionPackageVersionResponse.generated.swift @@ -0,0 +1,71 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct AlternativeDistributionPackageVersionResponse: Hashable, Codable, Sendable { + public var data: AlternativeDistributionPackageVersion + + public var included: [Included]? + + public var links: DocumentLinks + + public init( + data: AlternativeDistributionPackageVersion, + included: [Included]? = nil, + links: DocumentLinks + ) { + self.data = data + self.included = included + self.links = links + } + + private enum CodingKeys: String, CodingKey { + case data + case included + case links + } + + public enum Included: Hashable, Codable, Sendable { + case alternativeDistributionPackageVariant(AlternativeDistributionPackageVariant) + case alternativeDistributionPackageDelta(AlternativeDistributionPackageDelta) + case alternativeDistributionPackage(AlternativeDistributionPackage) + + public init(from decoder: Decoder) throws { + self = try { + var lastError: Error! + do { + return .alternativeDistributionPackageVariant(try AlternativeDistributionPackageVariant(from: decoder)) + } catch { + lastError = error + } + do { + return .alternativeDistributionPackageDelta(try AlternativeDistributionPackageDelta(from: decoder)) + } catch { + lastError = error + } + do { + return .alternativeDistributionPackage(try AlternativeDistributionPackage(from: decoder)) + } catch { + lastError = error + } + throw lastError + }() + } + + public func encode(to encoder: Encoder) throws { + switch self { + case .alternativeDistributionPackageVariant(let value): + try value.encode(to: encoder) + + case .alternativeDistributionPackageDelta(let value): + try value.encode(to: encoder) + + case .alternativeDistributionPackage(let value): + try value.encode(to: encoder) + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AlternativeDistributionPackageVersionVariantsLinkagesResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AlternativeDistributionPackageVersionVariantsLinkagesResponse.generated.swift new file mode 100644 index 00000000..cc56b845 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AlternativeDistributionPackageVersionVariantsLinkagesResponse.generated.swift @@ -0,0 +1,53 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct AlternativeDistributionPackageVersionVariantsLinkagesResponse: Hashable, Codable, Sendable { + public var data: [Data] + + public var links: PagedDocumentLinks + + public var meta: PagingInformation? + + public init( + data: [Data], + links: PagedDocumentLinks, + meta: PagingInformation? = nil + ) { + self.data = data + self.links = links + self.meta = meta + } + + private enum CodingKeys: String, CodingKey { + case data + case links + case meta + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case alternativeDistributionPackageVariants + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AlternativeDistributionPackageVersionsLinkagesResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AlternativeDistributionPackageVersionsLinkagesResponse.generated.swift new file mode 100644 index 00000000..242b180b --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AlternativeDistributionPackageVersionsLinkagesResponse.generated.swift @@ -0,0 +1,53 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct AlternativeDistributionPackageVersionsLinkagesResponse: Hashable, Codable, Sendable { + public var data: [Data] + + public var links: PagedDocumentLinks + + public var meta: PagingInformation? + + public init( + data: [Data], + links: PagedDocumentLinks, + meta: PagingInformation? = nil + ) { + self.data = data + self.links = links + self.meta = meta + } + + private enum CodingKeys: String, CodingKey { + case data + case links + case meta + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case alternativeDistributionPackageVersions + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AlternativeDistributionPackageVersionsResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AlternativeDistributionPackageVersionsResponse.generated.swift new file mode 100644 index 00000000..638d3b6f --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AlternativeDistributionPackageVersionsResponse.generated.swift @@ -0,0 +1,76 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct AlternativeDistributionPackageVersionsResponse: Hashable, Codable, Sendable { + public var data: [AlternativeDistributionPackageVersion] + + public var included: [Included]? + + public var links: PagedDocumentLinks + + public var meta: PagingInformation? + + public init( + data: [AlternativeDistributionPackageVersion], + included: [Included]? = nil, + links: PagedDocumentLinks, + meta: PagingInformation? = nil + ) { + self.data = data + self.included = included + self.links = links + self.meta = meta + } + + private enum CodingKeys: String, CodingKey { + case data + case included + case links + case meta + } + + public enum Included: Hashable, Codable, Sendable { + case alternativeDistributionPackageVariant(AlternativeDistributionPackageVariant) + case alternativeDistributionPackageDelta(AlternativeDistributionPackageDelta) + case alternativeDistributionPackage(AlternativeDistributionPackage) + + public init(from decoder: Decoder) throws { + self = try { + var lastError: Error! + do { + return .alternativeDistributionPackageVariant(try AlternativeDistributionPackageVariant(from: decoder)) + } catch { + lastError = error + } + do { + return .alternativeDistributionPackageDelta(try AlternativeDistributionPackageDelta(from: decoder)) + } catch { + lastError = error + } + do { + return .alternativeDistributionPackage(try AlternativeDistributionPackage(from: decoder)) + } catch { + lastError = error + } + throw lastError + }() + } + + public func encode(to encoder: Encoder) throws { + switch self { + case .alternativeDistributionPackageVariant(let value): + try value.encode(to: encoder) + + case .alternativeDistributionPackageDelta(let value): + try value.encode(to: encoder) + + case .alternativeDistributionPackage(let value): + try value.encode(to: encoder) + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AnalyticsReportInstanceResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AnalyticsReportInstanceResponse.generated.swift new file mode 100644 index 00000000..aeb8bfde --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AnalyticsReportInstanceResponse.generated.swift @@ -0,0 +1,25 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct AnalyticsReportInstanceResponse: Hashable, Codable, Sendable { + public var data: AnalyticsReportInstance + + public var links: DocumentLinks + + public init( + data: AnalyticsReportInstance, + links: DocumentLinks + ) { + self.data = data + self.links = links + } + + private enum CodingKeys: String, CodingKey { + case data + case links + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AnalyticsReportInstanceSegmentsLinkagesResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AnalyticsReportInstanceSegmentsLinkagesResponse.generated.swift new file mode 100644 index 00000000..f065ec54 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AnalyticsReportInstanceSegmentsLinkagesResponse.generated.swift @@ -0,0 +1,53 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct AnalyticsReportInstanceSegmentsLinkagesResponse: Hashable, Codable, Sendable { + public var data: [Data] + + public var links: PagedDocumentLinks + + public var meta: PagingInformation? + + public init( + data: [Data], + links: PagedDocumentLinks, + meta: PagingInformation? = nil + ) { + self.data = data + self.links = links + self.meta = meta + } + + private enum CodingKeys: String, CodingKey { + case data + case links + case meta + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case analyticsReportSegments + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AnalyticsReportInstancesLinkagesResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AnalyticsReportInstancesLinkagesResponse.generated.swift new file mode 100644 index 00000000..341018ae --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AnalyticsReportInstancesLinkagesResponse.generated.swift @@ -0,0 +1,53 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct AnalyticsReportInstancesLinkagesResponse: Hashable, Codable, Sendable { + public var data: [Data] + + public var links: PagedDocumentLinks + + public var meta: PagingInformation? + + public init( + data: [Data], + links: PagedDocumentLinks, + meta: PagingInformation? = nil + ) { + self.data = data + self.links = links + self.meta = meta + } + + private enum CodingKeys: String, CodingKey { + case data + case links + case meta + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case analyticsReportInstances + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AnalyticsReportInstancesResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AnalyticsReportInstancesResponse.generated.swift new file mode 100644 index 00000000..e7ec5fbb --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AnalyticsReportInstancesResponse.generated.swift @@ -0,0 +1,30 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct AnalyticsReportInstancesResponse: Hashable, Codable, Sendable { + public var data: [AnalyticsReportInstance] + + public var links: PagedDocumentLinks + + public var meta: PagingInformation? + + public init( + data: [AnalyticsReportInstance], + links: PagedDocumentLinks, + meta: PagingInformation? = nil + ) { + self.data = data + self.links = links + self.meta = meta + } + + private enum CodingKeys: String, CodingKey { + case data + case links + case meta + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AnalyticsReportRequestReportsLinkagesResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AnalyticsReportRequestReportsLinkagesResponse.generated.swift new file mode 100644 index 00000000..92e75305 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AnalyticsReportRequestReportsLinkagesResponse.generated.swift @@ -0,0 +1,53 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct AnalyticsReportRequestReportsLinkagesResponse: Hashable, Codable, Sendable { + public var data: [Data] + + public var links: PagedDocumentLinks + + public var meta: PagingInformation? + + public init( + data: [Data], + links: PagedDocumentLinks, + meta: PagingInformation? = nil + ) { + self.data = data + self.links = links + self.meta = meta + } + + private enum CodingKeys: String, CodingKey { + case data + case links + case meta + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case analyticsReports + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AnalyticsReportRequestResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AnalyticsReportRequestResponse.generated.swift new file mode 100644 index 00000000..4dfb3761 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AnalyticsReportRequestResponse.generated.swift @@ -0,0 +1,30 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct AnalyticsReportRequestResponse: Hashable, Codable, Sendable { + public var data: AnalyticsReportRequest + + public var included: [AnalyticsReport]? + + public var links: DocumentLinks + + public init( + data: AnalyticsReportRequest, + included: [AnalyticsReport]? = nil, + links: DocumentLinks + ) { + self.data = data + self.included = included + self.links = links + } + + private enum CodingKeys: String, CodingKey { + case data + case included + case links + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AnalyticsReportRequestsResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AnalyticsReportRequestsResponse.generated.swift new file mode 100644 index 00000000..429c4524 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AnalyticsReportRequestsResponse.generated.swift @@ -0,0 +1,35 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct AnalyticsReportRequestsResponse: Hashable, Codable, Sendable { + public var data: [AnalyticsReportRequest] + + public var included: [AnalyticsReport]? + + public var links: PagedDocumentLinks + + public var meta: PagingInformation? + + public init( + data: [AnalyticsReportRequest], + included: [AnalyticsReport]? = nil, + links: PagedDocumentLinks, + meta: PagingInformation? = nil + ) { + self.data = data + self.included = included + self.links = links + self.meta = meta + } + + private enum CodingKeys: String, CodingKey { + case data + case included + case links + case meta + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AnalyticsReportResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AnalyticsReportResponse.generated.swift new file mode 100644 index 00000000..bdf904e1 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AnalyticsReportResponse.generated.swift @@ -0,0 +1,25 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct AnalyticsReportResponse: Hashable, Codable, Sendable { + public var data: AnalyticsReport + + public var links: DocumentLinks + + public init( + data: AnalyticsReport, + links: DocumentLinks + ) { + self.data = data + self.links = links + } + + private enum CodingKeys: String, CodingKey { + case data + case links + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AnalyticsReportSegmentResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AnalyticsReportSegmentResponse.generated.swift new file mode 100644 index 00000000..2d60c6b9 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AnalyticsReportSegmentResponse.generated.swift @@ -0,0 +1,25 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct AnalyticsReportSegmentResponse: Hashable, Codable, Sendable { + public var data: AnalyticsReportSegment + + public var links: DocumentLinks + + public init( + data: AnalyticsReportSegment, + links: DocumentLinks + ) { + self.data = data + self.links = links + } + + private enum CodingKeys: String, CodingKey { + case data + case links + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AnalyticsReportSegmentsResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AnalyticsReportSegmentsResponse.generated.swift new file mode 100644 index 00000000..a0caa6cf --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AnalyticsReportSegmentsResponse.generated.swift @@ -0,0 +1,30 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct AnalyticsReportSegmentsResponse: Hashable, Codable, Sendable { + public var data: [AnalyticsReportSegment] + + public var links: PagedDocumentLinks + + public var meta: PagingInformation? + + public init( + data: [AnalyticsReportSegment], + links: PagedDocumentLinks, + meta: PagingInformation? = nil + ) { + self.data = data + self.links = links + self.meta = meta + } + + private enum CodingKeys: String, CodingKey { + case data + case links + case meta + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppStoreVersionLocalizationsWithoutIncludesResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AnalyticsReportsResponse.generated.swift similarity index 74% rename from Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppStoreVersionLocalizationsWithoutIncludesResponse.generated.swift rename to Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AnalyticsReportsResponse.generated.swift index 097a85fc..7d3c15dc 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppStoreVersionLocalizationsWithoutIncludesResponse.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AnalyticsReportsResponse.generated.swift @@ -3,15 +3,15 @@ // swiftlint:disable all import Foundation -public struct AppStoreVersionLocalizationsWithoutIncludesResponse: Hashable, Codable { - public var data: [AppStoreVersion] +public struct AnalyticsReportsResponse: Hashable, Codable, Sendable { + public var data: [AnalyticsReport] public var links: PagedDocumentLinks public var meta: PagingInformation? public init( - data: [AppStoreVersion], + data: [AnalyticsReport], links: PagedDocumentLinks, meta: PagingInformation? = nil ) { diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppAccessibilityDeclarationsLinkagesResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppAccessibilityDeclarationsLinkagesResponse.generated.swift new file mode 100644 index 00000000..0cc22567 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppAccessibilityDeclarationsLinkagesResponse.generated.swift @@ -0,0 +1,53 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct AppAccessibilityDeclarationsLinkagesResponse: Hashable, Codable, Sendable { + public var data: [Data] + + public var links: PagedDocumentLinks + + public var meta: PagingInformation? + + public init( + data: [Data], + links: PagedDocumentLinks, + meta: PagingInformation? = nil + ) { + self.data = data + self.links = links + self.meta = meta + } + + private enum CodingKeys: String, CodingKey { + case data + case links + case meta + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case accessibilityDeclarations + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppAlternativeDistributionKeyLinkageResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppAlternativeDistributionKeyLinkageResponse.generated.swift new file mode 100644 index 00000000..9288bd33 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppAlternativeDistributionKeyLinkageResponse.generated.swift @@ -0,0 +1,48 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct AppAlternativeDistributionKeyLinkageResponse: Hashable, Codable, Sendable { + public var data: Data + + public var links: DocumentLinks + + public init( + data: Data, + links: DocumentLinks + ) { + self.data = data + self.links = links + } + + private enum CodingKeys: String, CodingKey { + case data + case links + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case alternativeDistributionKeys + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppAnalyticsReportRequestsLinkagesResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppAnalyticsReportRequestsLinkagesResponse.generated.swift new file mode 100644 index 00000000..2b3fd57e --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppAnalyticsReportRequestsLinkagesResponse.generated.swift @@ -0,0 +1,53 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct AppAnalyticsReportRequestsLinkagesResponse: Hashable, Codable, Sendable { + public var data: [Data] + + public var links: PagedDocumentLinks + + public var meta: PagingInformation? + + public init( + data: [Data], + links: PagedDocumentLinks, + meta: PagingInformation? = nil + ) { + self.data = data + self.links = links + self.meta = meta + } + + private enum CodingKeys: String, CodingKey { + case data + case links + case meta + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case analyticsReportRequests + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppAppAvailabilityV2LinkageResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppAppAvailabilityV2LinkageResponse.generated.swift new file mode 100644 index 00000000..d094d2de --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppAppAvailabilityV2LinkageResponse.generated.swift @@ -0,0 +1,48 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct AppAppAvailabilityV2LinkageResponse: Hashable, Codable, Sendable { + public var data: Data + + public var links: DocumentLinks + + public init( + data: Data, + links: DocumentLinks + ) { + self.data = data + self.links = links + } + + private enum CodingKeys: String, CodingKey { + case data + case links + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case appAvailabilities + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppAppClipsLinkagesResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppAppClipsLinkagesResponse.generated.swift new file mode 100644 index 00000000..cbadb6aa --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppAppClipsLinkagesResponse.generated.swift @@ -0,0 +1,53 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct AppAppClipsLinkagesResponse: Hashable, Codable, Sendable { + public var data: [Data] + + public var links: PagedDocumentLinks + + public var meta: PagingInformation? + + public init( + data: [Data], + links: PagedDocumentLinks, + meta: PagingInformation? = nil + ) { + self.data = data + self.links = links + self.meta = meta + } + + private enum CodingKeys: String, CodingKey { + case data + case links + case meta + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case appClips + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppAppCustomProductPagesLinkagesResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppAppCustomProductPagesLinkagesResponse.generated.swift new file mode 100644 index 00000000..14a1fe73 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppAppCustomProductPagesLinkagesResponse.generated.swift @@ -0,0 +1,53 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct AppAppCustomProductPagesLinkagesResponse: Hashable, Codable, Sendable { + public var data: [Data] + + public var links: PagedDocumentLinks + + public var meta: PagingInformation? + + public init( + data: [Data], + links: PagedDocumentLinks, + meta: PagingInformation? = nil + ) { + self.data = data + self.links = links + self.meta = meta + } + + private enum CodingKeys: String, CodingKey { + case data + case links + case meta + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case appCustomProductPages + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppAppEncryptionDeclarationsLinkagesResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppAppEncryptionDeclarationsLinkagesResponse.generated.swift new file mode 100644 index 00000000..82866c8d --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppAppEncryptionDeclarationsLinkagesResponse.generated.swift @@ -0,0 +1,53 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct AppAppEncryptionDeclarationsLinkagesResponse: Hashable, Codable, Sendable { + public var data: [Data] + + public var links: PagedDocumentLinks + + public var meta: PagingInformation? + + public init( + data: [Data], + links: PagedDocumentLinks, + meta: PagingInformation? = nil + ) { + self.data = data + self.links = links + self.meta = meta + } + + private enum CodingKeys: String, CodingKey { + case data + case links + case meta + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case appEncryptionDeclarations + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppAppEventsLinkagesResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppAppEventsLinkagesResponse.generated.swift new file mode 100644 index 00000000..5684f02d --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppAppEventsLinkagesResponse.generated.swift @@ -0,0 +1,53 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct AppAppEventsLinkagesResponse: Hashable, Codable, Sendable { + public var data: [Data] + + public var links: PagedDocumentLinks + + public var meta: PagingInformation? + + public init( + data: [Data], + links: PagedDocumentLinks, + meta: PagingInformation? = nil + ) { + self.data = data + self.links = links + self.meta = meta + } + + private enum CodingKeys: String, CodingKey { + case data + case links + case meta + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case appEvents + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppAppInfosLinkagesResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppAppInfosLinkagesResponse.generated.swift new file mode 100644 index 00000000..32a6714a --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppAppInfosLinkagesResponse.generated.swift @@ -0,0 +1,53 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct AppAppInfosLinkagesResponse: Hashable, Codable, Sendable { + public var data: [Data] + + public var links: PagedDocumentLinks + + public var meta: PagingInformation? + + public init( + data: [Data], + links: PagedDocumentLinks, + meta: PagingInformation? = nil + ) { + self.data = data + self.links = links + self.meta = meta + } + + private enum CodingKeys: String, CodingKey { + case data + case links + case meta + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case appInfos + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppAppPricePointsLinkagesResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppAppPricePointsLinkagesResponse.generated.swift new file mode 100644 index 00000000..644cb4d9 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppAppPricePointsLinkagesResponse.generated.swift @@ -0,0 +1,53 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct AppAppPricePointsLinkagesResponse: Hashable, Codable, Sendable { + public var data: [Data] + + public var links: PagedDocumentLinks + + public var meta: PagingInformation? + + public init( + data: [Data], + links: PagedDocumentLinks, + meta: PagingInformation? = nil + ) { + self.data = data + self.links = links + self.meta = meta + } + + private enum CodingKeys: String, CodingKey { + case data + case links + case meta + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case appPricePoints + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppAppPriceScheduleLinkageResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppAppPriceScheduleLinkageResponse.generated.swift new file mode 100644 index 00000000..9d26fdc9 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppAppPriceScheduleLinkageResponse.generated.swift @@ -0,0 +1,48 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct AppAppPriceScheduleLinkageResponse: Hashable, Codable, Sendable { + public var data: Data + + public var links: DocumentLinks + + public init( + data: Data, + links: DocumentLinks + ) { + self.data = data + self.links = links + } + + private enum CodingKeys: String, CodingKey { + case data + case links + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case appPriceSchedules + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppAppStoreVersionExperimentsV2LinkagesResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppAppStoreVersionExperimentsV2LinkagesResponse.generated.swift new file mode 100644 index 00000000..fdec8b50 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppAppStoreVersionExperimentsV2LinkagesResponse.generated.swift @@ -0,0 +1,53 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct AppAppStoreVersionExperimentsV2LinkagesResponse: Hashable, Codable, Sendable { + public var data: [Data] + + public var links: PagedDocumentLinks + + public var meta: PagingInformation? + + public init( + data: [Data], + links: PagedDocumentLinks, + meta: PagingInformation? = nil + ) { + self.data = data + self.links = links + self.meta = meta + } + + private enum CodingKeys: String, CodingKey { + case data + case links + case meta + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case appStoreVersionExperiments + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppAppStoreVersionsLinkagesResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppAppStoreVersionsLinkagesResponse.generated.swift new file mode 100644 index 00000000..fc722679 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppAppStoreVersionsLinkagesResponse.generated.swift @@ -0,0 +1,53 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct AppAppStoreVersionsLinkagesResponse: Hashable, Codable, Sendable { + public var data: [Data] + + public var links: PagedDocumentLinks + + public var meta: PagingInformation? + + public init( + data: [Data], + links: PagedDocumentLinks, + meta: PagingInformation? = nil + ) { + self.data = data + self.links = links + self.meta = meta + } + + private enum CodingKeys: String, CodingKey { + case data + case links + case meta + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case appStoreVersions + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppAvailabilityV2Response.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppAvailabilityV2Response.generated.swift index d54fc46f..09afc504 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppAvailabilityV2Response.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppAvailabilityV2Response.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct AppAvailabilityV2Response: Hashable, Codable { +public struct AppAvailabilityV2Response: Hashable, Codable, Sendable { public var data: AppAvailabilityV2 public var included: [TerritoryAvailability]? diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppAvailabilityV2TerritoryAvailabilitiesLinkagesResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppAvailabilityV2TerritoryAvailabilitiesLinkagesResponse.generated.swift new file mode 100644 index 00000000..65d8e5db --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppAvailabilityV2TerritoryAvailabilitiesLinkagesResponse.generated.swift @@ -0,0 +1,53 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct AppAvailabilityV2TerritoryAvailabilitiesLinkagesResponse: Hashable, Codable, Sendable { + public var data: [Data] + + public var links: PagedDocumentLinks + + public var meta: PagingInformation? + + public init( + data: [Data], + links: PagedDocumentLinks, + meta: PagingInformation? = nil + ) { + self.data = data + self.links = links + self.meta = meta + } + + private enum CodingKeys: String, CodingKey { + case data + case links + case meta + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case territoryAvailabilities + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppBackgroundAssetsLinkagesResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppBackgroundAssetsLinkagesResponse.generated.swift new file mode 100644 index 00000000..0ee374e1 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppBackgroundAssetsLinkagesResponse.generated.swift @@ -0,0 +1,53 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct AppBackgroundAssetsLinkagesResponse: Hashable, Codable, Sendable { + public var data: [Data] + + public var links: PagedDocumentLinks + + public var meta: PagingInformation? + + public init( + data: [Data], + links: PagedDocumentLinks, + meta: PagingInformation? = nil + ) { + self.data = data + self.links = links + self.meta = meta + } + + private enum CodingKeys: String, CodingKey { + case data + case links + case meta + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case backgroundAssets + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppBetaAppLocalizationsLinkagesResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppBetaAppLocalizationsLinkagesResponse.generated.swift new file mode 100644 index 00000000..18554693 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppBetaAppLocalizationsLinkagesResponse.generated.swift @@ -0,0 +1,53 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct AppBetaAppLocalizationsLinkagesResponse: Hashable, Codable, Sendable { + public var data: [Data] + + public var links: PagedDocumentLinks + + public var meta: PagingInformation? + + public init( + data: [Data], + links: PagedDocumentLinks, + meta: PagingInformation? = nil + ) { + self.data = data + self.links = links + self.meta = meta + } + + private enum CodingKeys: String, CodingKey { + case data + case links + case meta + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case betaAppLocalizations + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppBetaAppReviewDetailLinkageResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppBetaAppReviewDetailLinkageResponse.generated.swift new file mode 100644 index 00000000..a5de44b9 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppBetaAppReviewDetailLinkageResponse.generated.swift @@ -0,0 +1,48 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct AppBetaAppReviewDetailLinkageResponse: Hashable, Codable, Sendable { + public var data: Data + + public var links: DocumentLinks + + public init( + data: Data, + links: DocumentLinks + ) { + self.data = data + self.links = links + } + + private enum CodingKeys: String, CodingKey { + case data + case links + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case betaAppReviewDetails + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppBetaFeedbackCrashSubmissionsLinkagesResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppBetaFeedbackCrashSubmissionsLinkagesResponse.generated.swift new file mode 100644 index 00000000..c86f3252 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppBetaFeedbackCrashSubmissionsLinkagesResponse.generated.swift @@ -0,0 +1,53 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct AppBetaFeedbackCrashSubmissionsLinkagesResponse: Hashable, Codable, Sendable { + public var data: [Data] + + public var links: PagedDocumentLinks + + public var meta: PagingInformation? + + public init( + data: [Data], + links: PagedDocumentLinks, + meta: PagingInformation? = nil + ) { + self.data = data + self.links = links + self.meta = meta + } + + private enum CodingKeys: String, CodingKey { + case data + case links + case meta + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case betaFeedbackCrashSubmissions + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppBetaFeedbackScreenshotSubmissionsLinkagesResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppBetaFeedbackScreenshotSubmissionsLinkagesResponse.generated.swift new file mode 100644 index 00000000..353a93ae --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppBetaFeedbackScreenshotSubmissionsLinkagesResponse.generated.swift @@ -0,0 +1,53 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct AppBetaFeedbackScreenshotSubmissionsLinkagesResponse: Hashable, Codable, Sendable { + public var data: [Data] + + public var links: PagedDocumentLinks + + public var meta: PagingInformation? + + public init( + data: [Data], + links: PagedDocumentLinks, + meta: PagingInformation? = nil + ) { + self.data = data + self.links = links + self.meta = meta + } + + private enum CodingKeys: String, CodingKey { + case data + case links + case meta + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case betaFeedbackScreenshotSubmissions + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppBetaGroupsLinkagesResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppBetaGroupsLinkagesResponse.generated.swift new file mode 100644 index 00000000..bdb42ec8 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppBetaGroupsLinkagesResponse.generated.swift @@ -0,0 +1,53 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct AppBetaGroupsLinkagesResponse: Hashable, Codable, Sendable { + public var data: [Data] + + public var links: PagedDocumentLinks + + public var meta: PagingInformation? + + public init( + data: [Data], + links: PagedDocumentLinks, + meta: PagingInformation? = nil + ) { + self.data = data + self.links = links + self.meta = meta + } + + private enum CodingKeys: String, CodingKey { + case data + case links + case meta + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case betaGroups + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppBetaLicenseAgreementLinkageResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppBetaLicenseAgreementLinkageResponse.generated.swift new file mode 100644 index 00000000..4c6b406f --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppBetaLicenseAgreementLinkageResponse.generated.swift @@ -0,0 +1,48 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct AppBetaLicenseAgreementLinkageResponse: Hashable, Codable, Sendable { + public var data: Data + + public var links: DocumentLinks + + public init( + data: Data, + links: DocumentLinks + ) { + self.data = data + self.links = links + } + + private enum CodingKeys: String, CodingKey { + case data + case links + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case betaLicenseAgreements + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppBuildsLinkagesResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppBuildsLinkagesResponse.generated.swift new file mode 100644 index 00000000..26586a87 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppBuildsLinkagesResponse.generated.swift @@ -0,0 +1,53 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct AppBuildsLinkagesResponse: Hashable, Codable, Sendable { + public var data: [Data] + + public var links: PagedDocumentLinks + + public var meta: PagingInformation? + + public init( + data: [Data], + links: PagedDocumentLinks, + meta: PagingInformation? = nil + ) { + self.data = data + self.links = links + self.meta = meta + } + + private enum CodingKeys: String, CodingKey { + case data + case links + case meta + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case builds + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppCategoriesResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppCategoriesResponse.generated.swift index 8ebd1f5a..945b5b1d 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppCategoriesResponse.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppCategoriesResponse.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct AppCategoriesResponse: Hashable, Codable { +public struct AppCategoriesResponse: Hashable, Codable, Sendable { public var data: [AppCategory] public var included: [AppCategory]? diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppCategoriesWithoutIncludesResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppCategoriesWithoutIncludesResponse.generated.swift index e62084ac..54611516 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppCategoriesWithoutIncludesResponse.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppCategoriesWithoutIncludesResponse.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct AppCategoriesWithoutIncludesResponse: Hashable, Codable { +public struct AppCategoriesWithoutIncludesResponse: Hashable, Codable, Sendable { public var data: [AppCategory] public var links: PagedDocumentLinks diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppCategoryParentLinkageResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppCategoryParentLinkageResponse.generated.swift new file mode 100644 index 00000000..64dca81d --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppCategoryParentLinkageResponse.generated.swift @@ -0,0 +1,48 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct AppCategoryParentLinkageResponse: Hashable, Codable, Sendable { + public var data: Data + + public var links: DocumentLinks + + public init( + data: Data, + links: DocumentLinks + ) { + self.data = data + self.links = links + } + + private enum CodingKeys: String, CodingKey { + case data + case links + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case appCategories + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppCategoryResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppCategoryResponse.generated.swift index bfd0feb1..a931dbb2 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppCategoryResponse.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppCategoryResponse.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct AppCategoryResponse: Hashable, Codable { +public struct AppCategoryResponse: Hashable, Codable, Sendable { public var data: AppCategory public var included: [AppCategory]? diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppCategorySubcategoriesLinkagesResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppCategorySubcategoriesLinkagesResponse.generated.swift new file mode 100644 index 00000000..a6ef7d9c --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppCategorySubcategoriesLinkagesResponse.generated.swift @@ -0,0 +1,53 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct AppCategorySubcategoriesLinkagesResponse: Hashable, Codable, Sendable { + public var data: [Data] + + public var links: PagedDocumentLinks + + public var meta: PagingInformation? + + public init( + data: [Data], + links: PagedDocumentLinks, + meta: PagingInformation? = nil + ) { + self.data = data + self.links = links + self.meta = meta + } + + private enum CodingKeys: String, CodingKey { + case data + case links + case meta + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case appCategories + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppCategoryWithoutIncludesResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppCategoryWithoutIncludesResponse.generated.swift index 4c1f2e8b..d90ba1b2 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppCategoryWithoutIncludesResponse.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppCategoryWithoutIncludesResponse.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct AppCategoryWithoutIncludesResponse: Hashable, Codable { +public struct AppCategoryWithoutIncludesResponse: Hashable, Codable, Sendable { public var data: AppCategory public var links: DocumentLinks diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppCiProductLinkageResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppCiProductLinkageResponse.generated.swift new file mode 100644 index 00000000..6d5b374c --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppCiProductLinkageResponse.generated.swift @@ -0,0 +1,48 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct AppCiProductLinkageResponse: Hashable, Codable, Sendable { + public var data: Data + + public var links: DocumentLinks + + public init( + data: Data, + links: DocumentLinks + ) { + self.data = data + self.links = links + } + + private enum CodingKeys: String, CodingKey { + case data + case links + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case ciProducts + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppClipAdvancedExperienceImageResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppClipAdvancedExperienceImageResponse.generated.swift index 35e278d9..c8e87760 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppClipAdvancedExperienceImageResponse.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppClipAdvancedExperienceImageResponse.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct AppClipAdvancedExperienceImageResponse: Hashable, Codable { +public struct AppClipAdvancedExperienceImageResponse: Hashable, Codable, Sendable { public var data: AppClipAdvancedExperienceImage public var links: DocumentLinks diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppClipAdvancedExperienceResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppClipAdvancedExperienceResponse.generated.swift index 0d38ca11..64ebc2c0 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppClipAdvancedExperienceResponse.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppClipAdvancedExperienceResponse.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct AppClipAdvancedExperienceResponse: Hashable, Codable { +public struct AppClipAdvancedExperienceResponse: Hashable, Codable, Sendable { public var data: AppClipAdvancedExperience public var included: [Included]? @@ -26,7 +26,7 @@ public struct AppClipAdvancedExperienceResponse: Hashable, Codable { case links } - public enum Included: Hashable, Codable { + public enum Included: Hashable, Codable, Sendable { case appClip(AppClip) case appClipAdvancedExperienceImage(AppClipAdvancedExperienceImage) case appClipAdvancedExperienceLocalization(AppClipAdvancedExperienceLocalization) diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppClipAdvancedExperiencesResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppClipAdvancedExperiencesResponse.generated.swift index ce01070c..f0053532 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppClipAdvancedExperiencesResponse.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppClipAdvancedExperiencesResponse.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct AppClipAdvancedExperiencesResponse: Hashable, Codable { +public struct AppClipAdvancedExperiencesResponse: Hashable, Codable, Sendable { public var data: [AppClipAdvancedExperience] public var included: [Included]? @@ -31,7 +31,7 @@ public struct AppClipAdvancedExperiencesResponse: Hashable, Codable { case meta } - public enum Included: Hashable, Codable { + public enum Included: Hashable, Codable, Sendable { case appClip(AppClip) case appClipAdvancedExperienceImage(AppClipAdvancedExperienceImage) case appClipAdvancedExperienceLocalization(AppClipAdvancedExperienceLocalization) diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppClipAppClipAdvancedExperiencesLinkagesResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppClipAppClipAdvancedExperiencesLinkagesResponse.generated.swift new file mode 100644 index 00000000..9c794759 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppClipAppClipAdvancedExperiencesLinkagesResponse.generated.swift @@ -0,0 +1,53 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct AppClipAppClipAdvancedExperiencesLinkagesResponse: Hashable, Codable, Sendable { + public var data: [Data] + + public var links: PagedDocumentLinks + + public var meta: PagingInformation? + + public init( + data: [Data], + links: PagedDocumentLinks, + meta: PagingInformation? = nil + ) { + self.data = data + self.links = links + self.meta = meta + } + + private enum CodingKeys: String, CodingKey { + case data + case links + case meta + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case appClipAdvancedExperiences + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppClipAppClipDefaultExperiencesLinkagesResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppClipAppClipDefaultExperiencesLinkagesResponse.generated.swift new file mode 100644 index 00000000..9bf47baa --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppClipAppClipDefaultExperiencesLinkagesResponse.generated.swift @@ -0,0 +1,53 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct AppClipAppClipDefaultExperiencesLinkagesResponse: Hashable, Codable, Sendable { + public var data: [Data] + + public var links: PagedDocumentLinks + + public var meta: PagingInformation? + + public init( + data: [Data], + links: PagedDocumentLinks, + meta: PagingInformation? = nil + ) { + self.data = data + self.links = links + self.meta = meta + } + + private enum CodingKeys: String, CodingKey { + case data + case links + case meta + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case appClipDefaultExperiences + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppClipAppStoreReviewDetailResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppClipAppStoreReviewDetailResponse.generated.swift index 22ebd616..55c44199 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppClipAppStoreReviewDetailResponse.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppClipAppStoreReviewDetailResponse.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct AppClipAppStoreReviewDetailResponse: Hashable, Codable { +public struct AppClipAppStoreReviewDetailResponse: Hashable, Codable, Sendable { public var data: AppClipAppStoreReviewDetail public var included: [AppClipDefaultExperience]? diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppClipDefaultExperienceAppClipAppStoreReviewDetailLinkageResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppClipDefaultExperienceAppClipAppStoreReviewDetailLinkageResponse.generated.swift new file mode 100644 index 00000000..a2ed8fdf --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppClipDefaultExperienceAppClipAppStoreReviewDetailLinkageResponse.generated.swift @@ -0,0 +1,48 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct AppClipDefaultExperienceAppClipAppStoreReviewDetailLinkageResponse: Hashable, Codable, Sendable { + public var data: Data + + public var links: DocumentLinks + + public init( + data: Data, + links: DocumentLinks + ) { + self.data = data + self.links = links + } + + private enum CodingKeys: String, CodingKey { + case data + case links + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case appClipAppStoreReviewDetails + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppClipDefaultExperienceAppClipDefaultExperienceLocalizationsLinkagesResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppClipDefaultExperienceAppClipDefaultExperienceLocalizationsLinkagesResponse.generated.swift new file mode 100644 index 00000000..0042ac30 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppClipDefaultExperienceAppClipDefaultExperienceLocalizationsLinkagesResponse.generated.swift @@ -0,0 +1,53 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct AppClipDefaultExperienceAppClipDefaultExperienceLocalizationsLinkagesResponse: Hashable, Codable, Sendable { + public var data: [Data] + + public var links: PagedDocumentLinks + + public var meta: PagingInformation? + + public init( + data: [Data], + links: PagedDocumentLinks, + meta: PagingInformation? = nil + ) { + self.data = data + self.links = links + self.meta = meta + } + + private enum CodingKeys: String, CodingKey { + case data + case links + case meta + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case appClipDefaultExperienceLocalizations + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppClipDefaultExperienceLocalizationAppClipHeaderImageLinkageResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppClipDefaultExperienceLocalizationAppClipHeaderImageLinkageResponse.generated.swift new file mode 100644 index 00000000..42854f56 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppClipDefaultExperienceLocalizationAppClipHeaderImageLinkageResponse.generated.swift @@ -0,0 +1,48 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct AppClipDefaultExperienceLocalizationAppClipHeaderImageLinkageResponse: Hashable, Codable, Sendable { + public var data: Data + + public var links: DocumentLinks + + public init( + data: Data, + links: DocumentLinks + ) { + self.data = data + self.links = links + } + + private enum CodingKeys: String, CodingKey { + case data + case links + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case appClipHeaderImages + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppClipDefaultExperienceLocalizationResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppClipDefaultExperienceLocalizationResponse.generated.swift index bc765b31..4c78673a 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppClipDefaultExperienceLocalizationResponse.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppClipDefaultExperienceLocalizationResponse.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct AppClipDefaultExperienceLocalizationResponse: Hashable, Codable { +public struct AppClipDefaultExperienceLocalizationResponse: Hashable, Codable, Sendable { public var data: AppClipDefaultExperienceLocalization public var included: [Included]? @@ -26,7 +26,7 @@ public struct AppClipDefaultExperienceLocalizationResponse: Hashable, Codable { case links } - public enum Included: Hashable, Codable { + public enum Included: Hashable, Codable, Sendable { case appClipDefaultExperience(AppClipDefaultExperience) case appClipHeaderImage(AppClipHeaderImage) diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppClipDefaultExperienceLocalizationsResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppClipDefaultExperienceLocalizationsResponse.generated.swift index 37323952..9c52ccf9 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppClipDefaultExperienceLocalizationsResponse.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppClipDefaultExperienceLocalizationsResponse.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct AppClipDefaultExperienceLocalizationsResponse: Hashable, Codable { +public struct AppClipDefaultExperienceLocalizationsResponse: Hashable, Codable, Sendable { public var data: [AppClipDefaultExperienceLocalization] public var included: [Included]? @@ -31,7 +31,7 @@ public struct AppClipDefaultExperienceLocalizationsResponse: Hashable, Codable { case meta } - public enum Included: Hashable, Codable { + public enum Included: Hashable, Codable, Sendable { case appClipDefaultExperience(AppClipDefaultExperience) case appClipHeaderImage(AppClipHeaderImage) diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppClipDefaultExperienceReleaseWithAppStoreVersionLinkageResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppClipDefaultExperienceReleaseWithAppStoreVersionLinkageResponse.generated.swift index 33d266c3..465d3180 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppClipDefaultExperienceReleaseWithAppStoreVersionLinkageResponse.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppClipDefaultExperienceReleaseWithAppStoreVersionLinkageResponse.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct AppClipDefaultExperienceReleaseWithAppStoreVersionLinkageResponse: Hashable, Codable { +public struct AppClipDefaultExperienceReleaseWithAppStoreVersionLinkageResponse: Hashable, Codable, Sendable { public var data: Data public var links: DocumentLinks @@ -21,7 +21,7 @@ public struct AppClipDefaultExperienceReleaseWithAppStoreVersionLinkageResponse: case links } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -39,7 +39,7 @@ public struct AppClipDefaultExperienceReleaseWithAppStoreVersionLinkageResponse: case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case appStoreVersions } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppClipDefaultExperienceResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppClipDefaultExperienceResponse.generated.swift index 472a815d..c7089017 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppClipDefaultExperienceResponse.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppClipDefaultExperienceResponse.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct AppClipDefaultExperienceResponse: Hashable, Codable { +public struct AppClipDefaultExperienceResponse: Hashable, Codable, Sendable { public var data: AppClipDefaultExperience public var included: [Included]? @@ -26,7 +26,7 @@ public struct AppClipDefaultExperienceResponse: Hashable, Codable { case links } - public enum Included: Hashable, Codable { + public enum Included: Hashable, Codable, Sendable { case appClip(AppClip) case appStoreVersion(AppStoreVersion) case appClipDefaultExperienceLocalization(AppClipDefaultExperienceLocalization) diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppClipDefaultExperiencesResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppClipDefaultExperiencesResponse.generated.swift index f436dbda..ff3349b2 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppClipDefaultExperiencesResponse.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppClipDefaultExperiencesResponse.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct AppClipDefaultExperiencesResponse: Hashable, Codable { +public struct AppClipDefaultExperiencesResponse: Hashable, Codable, Sendable { public var data: [AppClipDefaultExperience] public var included: [Included]? @@ -31,7 +31,7 @@ public struct AppClipDefaultExperiencesResponse: Hashable, Codable { case meta } - public enum Included: Hashable, Codable { + public enum Included: Hashable, Codable, Sendable { case appClip(AppClip) case appStoreVersion(AppStoreVersion) case appClipDefaultExperienceLocalization(AppClipDefaultExperienceLocalization) diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppClipDomainStatusResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppClipDomainStatusResponse.generated.swift index 80a92561..47d05d50 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppClipDomainStatusResponse.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppClipDomainStatusResponse.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct AppClipDomainStatusResponse: Hashable, Codable { +public struct AppClipDomainStatusResponse: Hashable, Codable, Sendable { public var data: AppClipDomainStatus public var links: DocumentLinks diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppClipHeaderImageResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppClipHeaderImageResponse.generated.swift index a7cee51b..599bb497 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppClipHeaderImageResponse.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppClipHeaderImageResponse.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct AppClipHeaderImageResponse: Hashable, Codable { +public struct AppClipHeaderImageResponse: Hashable, Codable, Sendable { public var data: AppClipHeaderImage public var included: [AppClipDefaultExperienceLocalization]? diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppClipResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppClipResponse.generated.swift index 6044c8d2..4f76b1cb 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppClipResponse.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppClipResponse.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct AppClipResponse: Hashable, Codable { +public struct AppClipResponse: Hashable, Codable, Sendable { public var data: AppClip public var included: [Included]? @@ -26,7 +26,7 @@ public struct AppClipResponse: Hashable, Codable { case links } - public enum Included: Hashable, Codable { + public enum Included: Hashable, Codable, Sendable { case app(App) case appClipDefaultExperience(AppClipDefaultExperience) diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppClipsResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppClipsResponse.generated.swift index 1efb4f02..5d9c9771 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppClipsResponse.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppClipsResponse.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct AppClipsResponse: Hashable, Codable { +public struct AppClipsResponse: Hashable, Codable, Sendable { public var data: [AppClip] public var included: [Included]? @@ -31,7 +31,7 @@ public struct AppClipsResponse: Hashable, Codable { case meta } - public enum Included: Hashable, Codable { + public enum Included: Hashable, Codable, Sendable { case app(App) case appClipDefaultExperience(AppClipDefaultExperience) diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppCustomProductPageAppCustomProductPageVersionsLinkagesResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppCustomProductPageAppCustomProductPageVersionsLinkagesResponse.generated.swift new file mode 100644 index 00000000..59b5506a --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppCustomProductPageAppCustomProductPageVersionsLinkagesResponse.generated.swift @@ -0,0 +1,53 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct AppCustomProductPageAppCustomProductPageVersionsLinkagesResponse: Hashable, Codable, Sendable { + public var data: [Data] + + public var links: PagedDocumentLinks + + public var meta: PagingInformation? + + public init( + data: [Data], + links: PagedDocumentLinks, + meta: PagingInformation? = nil + ) { + self.data = data + self.links = links + self.meta = meta + } + + private enum CodingKeys: String, CodingKey { + case data + case links + case meta + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case appCustomProductPageVersions + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppCustomProductPageLocalizationAppPreviewSetsLinkagesResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppCustomProductPageLocalizationAppPreviewSetsLinkagesResponse.generated.swift new file mode 100644 index 00000000..7a183d0f --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppCustomProductPageLocalizationAppPreviewSetsLinkagesResponse.generated.swift @@ -0,0 +1,53 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct AppCustomProductPageLocalizationAppPreviewSetsLinkagesResponse: Hashable, Codable, Sendable { + public var data: [Data] + + public var links: PagedDocumentLinks + + public var meta: PagingInformation? + + public init( + data: [Data], + links: PagedDocumentLinks, + meta: PagingInformation? = nil + ) { + self.data = data + self.links = links + self.meta = meta + } + + private enum CodingKeys: String, CodingKey { + case data + case links + case meta + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case appPreviewSets + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppCustomProductPageLocalizationAppScreenshotSetsLinkagesResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppCustomProductPageLocalizationAppScreenshotSetsLinkagesResponse.generated.swift new file mode 100644 index 00000000..46ef30c6 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppCustomProductPageLocalizationAppScreenshotSetsLinkagesResponse.generated.swift @@ -0,0 +1,53 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct AppCustomProductPageLocalizationAppScreenshotSetsLinkagesResponse: Hashable, Codable, Sendable { + public var data: [Data] + + public var links: PagedDocumentLinks + + public var meta: PagingInformation? + + public init( + data: [Data], + links: PagedDocumentLinks, + meta: PagingInformation? = nil + ) { + self.data = data + self.links = links + self.meta = meta + } + + private enum CodingKeys: String, CodingKey { + case data + case links + case meta + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case appScreenshotSets + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppCustomProductPageLocalizationResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppCustomProductPageLocalizationResponse.generated.swift index bacbbd31..6bf30649 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppCustomProductPageLocalizationResponse.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppCustomProductPageLocalizationResponse.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct AppCustomProductPageLocalizationResponse: Hashable, Codable { +public struct AppCustomProductPageLocalizationResponse: Hashable, Codable, Sendable { public var data: AppCustomProductPageLocalization public var included: [Included]? @@ -26,7 +26,7 @@ public struct AppCustomProductPageLocalizationResponse: Hashable, Codable { case links } - public enum Included: Hashable, Codable { + public enum Included: Hashable, Codable, Sendable { case appCustomProductPageVersion(AppCustomProductPageVersion) case appScreenshotSet(AppScreenshotSet) case appPreviewSet(AppPreviewSet) diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppCustomProductPageLocalizationsResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppCustomProductPageLocalizationsResponse.generated.swift index 66dee81f..f50c3930 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppCustomProductPageLocalizationsResponse.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppCustomProductPageLocalizationsResponse.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct AppCustomProductPageLocalizationsResponse: Hashable, Codable { +public struct AppCustomProductPageLocalizationsResponse: Hashable, Codable, Sendable { public var data: [AppCustomProductPageLocalization] public var included: [Included]? @@ -31,7 +31,7 @@ public struct AppCustomProductPageLocalizationsResponse: Hashable, Codable { case meta } - public enum Included: Hashable, Codable { + public enum Included: Hashable, Codable, Sendable { case appCustomProductPageVersion(AppCustomProductPageVersion) case appScreenshotSet(AppScreenshotSet) case appPreviewSet(AppPreviewSet) diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppCustomProductPageResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppCustomProductPageResponse.generated.swift index 08a6860f..0f8f34a1 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppCustomProductPageResponse.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppCustomProductPageResponse.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct AppCustomProductPageResponse: Hashable, Codable { +public struct AppCustomProductPageResponse: Hashable, Codable, Sendable { public var data: AppCustomProductPage public var included: [Included]? @@ -26,7 +26,7 @@ public struct AppCustomProductPageResponse: Hashable, Codable { case links } - public enum Included: Hashable, Codable { + public enum Included: Hashable, Codable, Sendable { case app(App) case appCustomProductPageVersion(AppCustomProductPageVersion) diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppCustomProductPageVersionAppCustomProductPageLocalizationsLinkagesResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppCustomProductPageVersionAppCustomProductPageLocalizationsLinkagesResponse.generated.swift new file mode 100644 index 00000000..e1ead1dc --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppCustomProductPageVersionAppCustomProductPageLocalizationsLinkagesResponse.generated.swift @@ -0,0 +1,53 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct AppCustomProductPageVersionAppCustomProductPageLocalizationsLinkagesResponse: Hashable, Codable, Sendable { + public var data: [Data] + + public var links: PagedDocumentLinks + + public var meta: PagingInformation? + + public init( + data: [Data], + links: PagedDocumentLinks, + meta: PagingInformation? = nil + ) { + self.data = data + self.links = links + self.meta = meta + } + + private enum CodingKeys: String, CodingKey { + case data + case links + case meta + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case appCustomProductPageLocalizations + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppCustomProductPageVersionResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppCustomProductPageVersionResponse.generated.swift index 78cfdcea..e3060716 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppCustomProductPageVersionResponse.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppCustomProductPageVersionResponse.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct AppCustomProductPageVersionResponse: Hashable, Codable { +public struct AppCustomProductPageVersionResponse: Hashable, Codable, Sendable { public var data: AppCustomProductPageVersion public var included: [Included]? @@ -26,7 +26,7 @@ public struct AppCustomProductPageVersionResponse: Hashable, Codable { case links } - public enum Included: Hashable, Codable { + public enum Included: Hashable, Codable, Sendable { case appCustomProductPage(AppCustomProductPage) case appCustomProductPageLocalization(AppCustomProductPageLocalization) diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppCustomProductPageVersionsResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppCustomProductPageVersionsResponse.generated.swift index 30e60bec..e6ff0a53 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppCustomProductPageVersionsResponse.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppCustomProductPageVersionsResponse.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct AppCustomProductPageVersionsResponse: Hashable, Codable { +public struct AppCustomProductPageVersionsResponse: Hashable, Codable, Sendable { public var data: [AppCustomProductPageVersion] public var included: [Included]? @@ -31,7 +31,7 @@ public struct AppCustomProductPageVersionsResponse: Hashable, Codable { case meta } - public enum Included: Hashable, Codable { + public enum Included: Hashable, Codable, Sendable { case appCustomProductPage(AppCustomProductPage) case appCustomProductPageLocalization(AppCustomProductPageLocalization) diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppCustomProductPagesResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppCustomProductPagesResponse.generated.swift index 4499ac18..dc6cca71 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppCustomProductPagesResponse.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppCustomProductPagesResponse.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct AppCustomProductPagesResponse: Hashable, Codable { +public struct AppCustomProductPagesResponse: Hashable, Codable, Sendable { public var data: [AppCustomProductPage] public var included: [Included]? @@ -31,7 +31,7 @@ public struct AppCustomProductPagesResponse: Hashable, Codable { case meta } - public enum Included: Hashable, Codable { + public enum Included: Hashable, Codable, Sendable { case app(App) case appCustomProductPageVersion(AppCustomProductPageVersion) diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppCustomerReviewsLinkagesResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppCustomerReviewsLinkagesResponse.generated.swift new file mode 100644 index 00000000..f703265d --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppCustomerReviewsLinkagesResponse.generated.swift @@ -0,0 +1,53 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct AppCustomerReviewsLinkagesResponse: Hashable, Codable, Sendable { + public var data: [Data] + + public var links: PagedDocumentLinks + + public var meta: PagingInformation? + + public init( + data: [Data], + links: PagedDocumentLinks, + meta: PagingInformation? = nil + ) { + self.data = data + self.links = links + self.meta = meta + } + + private enum CodingKeys: String, CodingKey { + case data + case links + case meta + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case customerReviews + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppEncryptionDeclarationAppEncryptionDeclarationDocumentLinkageResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppEncryptionDeclarationAppEncryptionDeclarationDocumentLinkageResponse.generated.swift new file mode 100644 index 00000000..0101decc --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppEncryptionDeclarationAppEncryptionDeclarationDocumentLinkageResponse.generated.swift @@ -0,0 +1,48 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct AppEncryptionDeclarationAppEncryptionDeclarationDocumentLinkageResponse: Hashable, Codable, Sendable { + public var data: Data + + public var links: DocumentLinks + + public init( + data: Data, + links: DocumentLinks + ) { + self.data = data + self.links = links + } + + private enum CodingKeys: String, CodingKey { + case data + case links + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case appEncryptionDeclarationDocuments + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppEncryptionDeclarationAppLinkageResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppEncryptionDeclarationAppLinkageResponse.generated.swift new file mode 100644 index 00000000..4890bb74 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppEncryptionDeclarationAppLinkageResponse.generated.swift @@ -0,0 +1,48 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct AppEncryptionDeclarationAppLinkageResponse: Hashable, Codable, Sendable { + public var data: Data + + public var links: DocumentLinks + + public init( + data: Data, + links: DocumentLinks + ) { + self.data = data + self.links = links + } + + private enum CodingKeys: String, CodingKey { + case data + case links + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case apps + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppEncryptionDeclarationDocumentResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppEncryptionDeclarationDocumentResponse.generated.swift index 37559244..8c2111b0 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppEncryptionDeclarationDocumentResponse.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppEncryptionDeclarationDocumentResponse.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct AppEncryptionDeclarationDocumentResponse: Hashable, Codable { +public struct AppEncryptionDeclarationDocumentResponse: Hashable, Codable, Sendable { public var data: AppEncryptionDeclarationDocument public var links: DocumentLinks diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppEncryptionDeclarationResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppEncryptionDeclarationResponse.generated.swift index 5a47d594..26afb6eb 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppEncryptionDeclarationResponse.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppEncryptionDeclarationResponse.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct AppEncryptionDeclarationResponse: Hashable, Codable { +public struct AppEncryptionDeclarationResponse: Hashable, Codable, Sendable { public var data: AppEncryptionDeclaration public var included: [Included]? @@ -26,7 +26,7 @@ public struct AppEncryptionDeclarationResponse: Hashable, Codable { case links } - public enum Included: Hashable, Codable { + public enum Included: Hashable, Codable, Sendable { case app(App) case build(Build) case appEncryptionDeclarationDocument(AppEncryptionDeclarationDocument) diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppEncryptionDeclarationWithoutIncludesResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppEncryptionDeclarationWithoutIncludesResponse.generated.swift index a91f31f5..eb742128 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppEncryptionDeclarationWithoutIncludesResponse.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppEncryptionDeclarationWithoutIncludesResponse.generated.swift @@ -3,13 +3,13 @@ // swiftlint:disable all import Foundation -public struct AppEncryptionDeclarationWithoutIncludesResponse: Hashable, Codable { - public var data: Build +public struct AppEncryptionDeclarationWithoutIncludesResponse: Hashable, Codable, Sendable { + public var data: AppEncryptionDeclaration public var links: DocumentLinks public init( - data: Build, + data: AppEncryptionDeclaration, links: DocumentLinks ) { self.data = data diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppEncryptionDeclarationsResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppEncryptionDeclarationsResponse.generated.swift index da4f1ab4..8aeaeee2 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppEncryptionDeclarationsResponse.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppEncryptionDeclarationsResponse.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct AppEncryptionDeclarationsResponse: Hashable, Codable { +public struct AppEncryptionDeclarationsResponse: Hashable, Codable, Sendable { public var data: [AppEncryptionDeclaration] public var included: [Included]? @@ -31,7 +31,7 @@ public struct AppEncryptionDeclarationsResponse: Hashable, Codable { case meta } - public enum Included: Hashable, Codable { + public enum Included: Hashable, Codable, Sendable { case app(App) case build(Build) case appEncryptionDeclarationDocument(AppEncryptionDeclarationDocument) diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppEndUserLicenseAgreementLinkageResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppEndUserLicenseAgreementLinkageResponse.generated.swift new file mode 100644 index 00000000..aabc90b4 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppEndUserLicenseAgreementLinkageResponse.generated.swift @@ -0,0 +1,48 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct AppEndUserLicenseAgreementLinkageResponse: Hashable, Codable, Sendable { + public var data: Data + + public var links: DocumentLinks + + public init( + data: Data, + links: DocumentLinks + ) { + self.data = data + self.links = links + } + + private enum CodingKeys: String, CodingKey { + case data + case links + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case endUserLicenseAgreements + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppEventLocalizationAppEventScreenshotsLinkagesResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppEventLocalizationAppEventScreenshotsLinkagesResponse.generated.swift new file mode 100644 index 00000000..7b23129b --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppEventLocalizationAppEventScreenshotsLinkagesResponse.generated.swift @@ -0,0 +1,53 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct AppEventLocalizationAppEventScreenshotsLinkagesResponse: Hashable, Codable, Sendable { + public var data: [Data] + + public var links: PagedDocumentLinks + + public var meta: PagingInformation? + + public init( + data: [Data], + links: PagedDocumentLinks, + meta: PagingInformation? = nil + ) { + self.data = data + self.links = links + self.meta = meta + } + + private enum CodingKeys: String, CodingKey { + case data + case links + case meta + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case appEventScreenshots + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppEventLocalizationAppEventVideoClipsLinkagesResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppEventLocalizationAppEventVideoClipsLinkagesResponse.generated.swift new file mode 100644 index 00000000..2b92a6b7 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppEventLocalizationAppEventVideoClipsLinkagesResponse.generated.swift @@ -0,0 +1,53 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct AppEventLocalizationAppEventVideoClipsLinkagesResponse: Hashable, Codable, Sendable { + public var data: [Data] + + public var links: PagedDocumentLinks + + public var meta: PagingInformation? + + public init( + data: [Data], + links: PagedDocumentLinks, + meta: PagingInformation? = nil + ) { + self.data = data + self.links = links + self.meta = meta + } + + private enum CodingKeys: String, CodingKey { + case data + case links + case meta + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case appEventVideoClips + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppEventLocalizationResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppEventLocalizationResponse.generated.swift index de4a7ffb..0edbe6ae 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppEventLocalizationResponse.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppEventLocalizationResponse.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct AppEventLocalizationResponse: Hashable, Codable { +public struct AppEventLocalizationResponse: Hashable, Codable, Sendable { public var data: AppEventLocalization public var included: [Included]? @@ -26,7 +26,7 @@ public struct AppEventLocalizationResponse: Hashable, Codable { case links } - public enum Included: Hashable, Codable { + public enum Included: Hashable, Codable, Sendable { case appEvent(AppEvent) case appEventScreenshot(AppEventScreenshot) case appEventVideoClip(AppEventVideoClip) diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppEventLocalizationsLinkagesResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppEventLocalizationsLinkagesResponse.generated.swift new file mode 100644 index 00000000..cda4017b --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppEventLocalizationsLinkagesResponse.generated.swift @@ -0,0 +1,53 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct AppEventLocalizationsLinkagesResponse: Hashable, Codable, Sendable { + public var data: [Data] + + public var links: PagedDocumentLinks + + public var meta: PagingInformation? + + public init( + data: [Data], + links: PagedDocumentLinks, + meta: PagingInformation? = nil + ) { + self.data = data + self.links = links + self.meta = meta + } + + private enum CodingKeys: String, CodingKey { + case data + case links + case meta + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case appEventLocalizations + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppEventLocalizationsResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppEventLocalizationsResponse.generated.swift index a364f6e8..878c5c24 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppEventLocalizationsResponse.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppEventLocalizationsResponse.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct AppEventLocalizationsResponse: Hashable, Codable { +public struct AppEventLocalizationsResponse: Hashable, Codable, Sendable { public var data: [AppEventLocalization] public var included: [Included]? @@ -31,7 +31,7 @@ public struct AppEventLocalizationsResponse: Hashable, Codable { case meta } - public enum Included: Hashable, Codable { + public enum Included: Hashable, Codable, Sendable { case appEvent(AppEvent) case appEventScreenshot(AppEventScreenshot) case appEventVideoClip(AppEventVideoClip) diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppEventResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppEventResponse.generated.swift index 09a8e824..f9b4580e 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppEventResponse.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppEventResponse.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct AppEventResponse: Hashable, Codable { +public struct AppEventResponse: Hashable, Codable, Sendable { public var data: AppEvent public var included: [AppEventLocalization]? diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppEventScreenshotResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppEventScreenshotResponse.generated.swift index 108cfc9e..15e81ee2 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppEventScreenshotResponse.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppEventScreenshotResponse.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct AppEventScreenshotResponse: Hashable, Codable { +public struct AppEventScreenshotResponse: Hashable, Codable, Sendable { public var data: AppEventScreenshot public var included: [AppEventLocalization]? diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppEventScreenshotsResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppEventScreenshotsResponse.generated.swift index cc3fb466..ed74c8ee 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppEventScreenshotsResponse.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppEventScreenshotsResponse.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct AppEventScreenshotsResponse: Hashable, Codable { +public struct AppEventScreenshotsResponse: Hashable, Codable, Sendable { public var data: [AppEventScreenshot] public var included: [AppEventLocalization]? diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppEventVideoClipResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppEventVideoClipResponse.generated.swift index 3ecde923..77c87e92 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppEventVideoClipResponse.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppEventVideoClipResponse.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct AppEventVideoClipResponse: Hashable, Codable { +public struct AppEventVideoClipResponse: Hashable, Codable, Sendable { public var data: AppEventVideoClip public var included: [AppEventLocalization]? diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppEventVideoClipsResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppEventVideoClipsResponse.generated.swift index 7ec7d6ee..2bf17b62 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppEventVideoClipsResponse.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppEventVideoClipsResponse.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct AppEventVideoClipsResponse: Hashable, Codable { +public struct AppEventVideoClipsResponse: Hashable, Codable, Sendable { public var data: [AppEventVideoClip] public var included: [AppEventLocalization]? diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppEventsResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppEventsResponse.generated.swift index 6ad29d59..5c1e8715 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppEventsResponse.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppEventsResponse.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct AppEventsResponse: Hashable, Codable { +public struct AppEventsResponse: Hashable, Codable, Sendable { public var data: [AppEvent] public var included: [AppEventLocalization]? diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppGameCenterDetailLinkageResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppGameCenterDetailLinkageResponse.generated.swift new file mode 100644 index 00000000..3b8fdeae --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppGameCenterDetailLinkageResponse.generated.swift @@ -0,0 +1,48 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct AppGameCenterDetailLinkageResponse: Hashable, Codable, Sendable { + public var data: Data + + public var links: DocumentLinks + + public init( + data: Data, + links: DocumentLinks + ) { + self.data = data + self.links = links + } + + private enum CodingKeys: String, CodingKey { + case data + case links + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case gameCenterDetails + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppGameCenterEnabledVersionsLinkagesResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppGameCenterEnabledVersionsLinkagesResponse.generated.swift new file mode 100644 index 00000000..96aeb8e5 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppGameCenterEnabledVersionsLinkagesResponse.generated.swift @@ -0,0 +1,53 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct AppGameCenterEnabledVersionsLinkagesResponse: Hashable, Codable, Sendable { + public var data: [Data] + + public var links: PagedDocumentLinks + + public var meta: PagingInformation? + + public init( + data: [Data], + links: PagedDocumentLinks, + meta: PagingInformation? = nil + ) { + self.data = data + self.links = links + self.meta = meta + } + + private enum CodingKeys: String, CodingKey { + case data + case links + case meta + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case gameCenterEnabledVersions + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppInAppPurchasesLinkagesResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppInAppPurchasesLinkagesResponse.generated.swift new file mode 100644 index 00000000..3e6cf819 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppInAppPurchasesLinkagesResponse.generated.swift @@ -0,0 +1,53 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct AppInAppPurchasesLinkagesResponse: Hashable, Codable, Sendable { + public var data: [Data] + + public var links: PagedDocumentLinks + + public var meta: PagingInformation? + + public init( + data: [Data], + links: PagedDocumentLinks, + meta: PagingInformation? = nil + ) { + self.data = data + self.links = links + self.meta = meta + } + + private enum CodingKeys: String, CodingKey { + case data + case links + case meta + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case inAppPurchases + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppInAppPurchasesV2LinkagesResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppInAppPurchasesV2LinkagesResponse.generated.swift new file mode 100644 index 00000000..4ee5d8a4 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppInAppPurchasesV2LinkagesResponse.generated.swift @@ -0,0 +1,53 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct AppInAppPurchasesV2LinkagesResponse: Hashable, Codable, Sendable { + public var data: [Data] + + public var links: PagedDocumentLinks + + public var meta: PagingInformation? + + public init( + data: [Data], + links: PagedDocumentLinks, + meta: PagingInformation? = nil + ) { + self.data = data + self.links = links + self.meta = meta + } + + private enum CodingKeys: String, CodingKey { + case data + case links + case meta + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case inAppPurchases + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppInfoAgeRatingDeclarationLinkageResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppInfoAgeRatingDeclarationLinkageResponse.generated.swift new file mode 100644 index 00000000..b0e599a9 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppInfoAgeRatingDeclarationLinkageResponse.generated.swift @@ -0,0 +1,48 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct AppInfoAgeRatingDeclarationLinkageResponse: Hashable, Codable, Sendable { + public var data: Data + + public var links: DocumentLinks + + public init( + data: Data, + links: DocumentLinks + ) { + self.data = data + self.links = links + } + + private enum CodingKeys: String, CodingKey { + case data + case links + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case ageRatingDeclarations + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppInfoAppInfoLocalizationsLinkagesResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppInfoAppInfoLocalizationsLinkagesResponse.generated.swift new file mode 100644 index 00000000..d6a7ae4f --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppInfoAppInfoLocalizationsLinkagesResponse.generated.swift @@ -0,0 +1,53 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct AppInfoAppInfoLocalizationsLinkagesResponse: Hashable, Codable, Sendable { + public var data: [Data] + + public var links: PagedDocumentLinks + + public var meta: PagingInformation? + + public init( + data: [Data], + links: PagedDocumentLinks, + meta: PagingInformation? = nil + ) { + self.data = data + self.links = links + self.meta = meta + } + + private enum CodingKeys: String, CodingKey { + case data + case links + case meta + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case appInfoLocalizations + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppInfoLocalizationResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppInfoLocalizationResponse.generated.swift index 8ee98100..f4304527 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppInfoLocalizationResponse.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppInfoLocalizationResponse.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct AppInfoLocalizationResponse: Hashable, Codable { +public struct AppInfoLocalizationResponse: Hashable, Codable, Sendable { public var data: AppInfoLocalization public var included: [AppInfo]? diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppInfoLocalizationsResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppInfoLocalizationsResponse.generated.swift index 1c214660..263fb5b0 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppInfoLocalizationsResponse.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppInfoLocalizationsResponse.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct AppInfoLocalizationsResponse: Hashable, Codable { +public struct AppInfoLocalizationsResponse: Hashable, Codable, Sendable { public var data: [AppInfoLocalization] public var included: [AppInfo]? diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppInfoPrimaryCategoryLinkageResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppInfoPrimaryCategoryLinkageResponse.generated.swift new file mode 100644 index 00000000..2159be69 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppInfoPrimaryCategoryLinkageResponse.generated.swift @@ -0,0 +1,48 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct AppInfoPrimaryCategoryLinkageResponse: Hashable, Codable, Sendable { + public var data: Data + + public var links: DocumentLinks + + public init( + data: Data, + links: DocumentLinks + ) { + self.data = data + self.links = links + } + + private enum CodingKeys: String, CodingKey { + case data + case links + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case appCategories + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppInfoPrimarySubcategoryOneLinkageResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppInfoPrimarySubcategoryOneLinkageResponse.generated.swift new file mode 100644 index 00000000..c50aa97e --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppInfoPrimarySubcategoryOneLinkageResponse.generated.swift @@ -0,0 +1,48 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct AppInfoPrimarySubcategoryOneLinkageResponse: Hashable, Codable, Sendable { + public var data: Data + + public var links: DocumentLinks + + public init( + data: Data, + links: DocumentLinks + ) { + self.data = data + self.links = links + } + + private enum CodingKeys: String, CodingKey { + case data + case links + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case appCategories + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppInfoPrimarySubcategoryTwoLinkageResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppInfoPrimarySubcategoryTwoLinkageResponse.generated.swift new file mode 100644 index 00000000..1e486b75 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppInfoPrimarySubcategoryTwoLinkageResponse.generated.swift @@ -0,0 +1,48 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct AppInfoPrimarySubcategoryTwoLinkageResponse: Hashable, Codable, Sendable { + public var data: Data + + public var links: DocumentLinks + + public init( + data: Data, + links: DocumentLinks + ) { + self.data = data + self.links = links + } + + private enum CodingKeys: String, CodingKey { + case data + case links + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case appCategories + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppInfoResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppInfoResponse.generated.swift index 600799cd..a235fca8 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppInfoResponse.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppInfoResponse.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct AppInfoResponse: Hashable, Codable { +public struct AppInfoResponse: Hashable, Codable, Sendable { public var data: AppInfo public var included: [Included]? @@ -26,7 +26,7 @@ public struct AppInfoResponse: Hashable, Codable { case links } - public enum Included: Hashable, Codable { + public enum Included: Hashable, Codable, Sendable { case app(App) case ageRatingDeclaration(AgeRatingDeclaration) case appInfoLocalization(AppInfoLocalization) diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppInfoSecondaryCategoryLinkageResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppInfoSecondaryCategoryLinkageResponse.generated.swift new file mode 100644 index 00000000..bfec6eb4 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppInfoSecondaryCategoryLinkageResponse.generated.swift @@ -0,0 +1,48 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct AppInfoSecondaryCategoryLinkageResponse: Hashable, Codable, Sendable { + public var data: Data + + public var links: DocumentLinks + + public init( + data: Data, + links: DocumentLinks + ) { + self.data = data + self.links = links + } + + private enum CodingKeys: String, CodingKey { + case data + case links + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case appCategories + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppInfoSecondarySubcategoryOneLinkageResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppInfoSecondarySubcategoryOneLinkageResponse.generated.swift new file mode 100644 index 00000000..1a00eec4 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppInfoSecondarySubcategoryOneLinkageResponse.generated.swift @@ -0,0 +1,48 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct AppInfoSecondarySubcategoryOneLinkageResponse: Hashable, Codable, Sendable { + public var data: Data + + public var links: DocumentLinks + + public init( + data: Data, + links: DocumentLinks + ) { + self.data = data + self.links = links + } + + private enum CodingKeys: String, CodingKey { + case data + case links + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case appCategories + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppInfoSecondarySubcategoryTwoLinkageResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppInfoSecondarySubcategoryTwoLinkageResponse.generated.swift new file mode 100644 index 00000000..7627acd5 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppInfoSecondarySubcategoryTwoLinkageResponse.generated.swift @@ -0,0 +1,48 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct AppInfoSecondarySubcategoryTwoLinkageResponse: Hashable, Codable, Sendable { + public var data: Data + + public var links: DocumentLinks + + public init( + data: Data, + links: DocumentLinks + ) { + self.data = data + self.links = links + } + + private enum CodingKeys: String, CodingKey { + case data + case links + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case appCategories + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppInfosResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppInfosResponse.generated.swift index bb1e599c..b349271f 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppInfosResponse.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppInfosResponse.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct AppInfosResponse: Hashable, Codable { +public struct AppInfosResponse: Hashable, Codable, Sendable { public var data: [AppInfo] public var included: [Included]? @@ -31,7 +31,7 @@ public struct AppInfosResponse: Hashable, Codable { case meta } - public enum Included: Hashable, Codable { + public enum Included: Hashable, Codable, Sendable { case app(App) case ageRatingDeclaration(AgeRatingDeclaration) case appInfoLocalization(AppInfoLocalization) diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppMarketplaceSearchDetailLinkageResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppMarketplaceSearchDetailLinkageResponse.generated.swift new file mode 100644 index 00000000..e6d8bf5e --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppMarketplaceSearchDetailLinkageResponse.generated.swift @@ -0,0 +1,48 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct AppMarketplaceSearchDetailLinkageResponse: Hashable, Codable, Sendable { + public var data: Data + + public var links: DocumentLinks + + public init( + data: Data, + links: DocumentLinks + ) { + self.data = data + self.links = links + } + + private enum CodingKeys: String, CodingKey { + case data + case links + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case marketplaceSearchDetails + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppPerfPowerMetricsLinkagesResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppPerfPowerMetricsLinkagesResponse.generated.swift new file mode 100644 index 00000000..30afeba3 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppPerfPowerMetricsLinkagesResponse.generated.swift @@ -0,0 +1,53 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct AppPerfPowerMetricsLinkagesResponse: Hashable, Codable, Sendable { + public var data: [Data] + + public var links: PagedDocumentLinks + + public var meta: PagingInformation? + + public init( + data: [Data], + links: PagedDocumentLinks, + meta: PagingInformation? = nil + ) { + self.data = data + self.links = links + self.meta = meta + } + + private enum CodingKeys: String, CodingKey { + case data + case links + case meta + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case perfPowerMetrics + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppPreReleaseVersionsLinkagesResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppPreReleaseVersionsLinkagesResponse.generated.swift new file mode 100644 index 00000000..87e73e6e --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppPreReleaseVersionsLinkagesResponse.generated.swift @@ -0,0 +1,53 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct AppPreReleaseVersionsLinkagesResponse: Hashable, Codable, Sendable { + public var data: [Data] + + public var links: PagedDocumentLinks + + public var meta: PagingInformation? + + public init( + data: [Data], + links: PagedDocumentLinks, + meta: PagingInformation? = nil + ) { + self.data = data + self.links = links + self.meta = meta + } + + private enum CodingKeys: String, CodingKey { + case data + case links + case meta + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case preReleaseVersions + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppPreviewResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppPreviewResponse.generated.swift index 82181414..1bde5e32 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppPreviewResponse.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppPreviewResponse.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct AppPreviewResponse: Hashable, Codable { +public struct AppPreviewResponse: Hashable, Codable, Sendable { public var data: AppPreview public var included: [AppPreviewSet]? diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppPreviewSetAppPreviewsLinkagesResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppPreviewSetAppPreviewsLinkagesResponse.generated.swift index 1242acaf..4c6885a1 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppPreviewSetAppPreviewsLinkagesResponse.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppPreviewSetAppPreviewsLinkagesResponse.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct AppPreviewSetAppPreviewsLinkagesResponse: Hashable, Codable { +public struct AppPreviewSetAppPreviewsLinkagesResponse: Hashable, Codable, Sendable { public var data: [Data] public var links: PagedDocumentLinks @@ -26,7 +26,7 @@ public struct AppPreviewSetAppPreviewsLinkagesResponse: Hashable, Codable { case meta } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -44,7 +44,7 @@ public struct AppPreviewSetAppPreviewsLinkagesResponse: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case appPreviews } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppPreviewSetResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppPreviewSetResponse.generated.swift index 9b56b6c8..5da0bc9e 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppPreviewSetResponse.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppPreviewSetResponse.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct AppPreviewSetResponse: Hashable, Codable { +public struct AppPreviewSetResponse: Hashable, Codable, Sendable { public var data: AppPreviewSet public var included: [Included]? @@ -26,7 +26,7 @@ public struct AppPreviewSetResponse: Hashable, Codable { case links } - public enum Included: Hashable, Codable { + public enum Included: Hashable, Codable, Sendable { case appStoreVersionLocalization(AppStoreVersionLocalization) case appCustomProductPageLocalization(AppCustomProductPageLocalization) case appStoreVersionExperimentTreatmentLocalization(AppStoreVersionExperimentTreatmentLocalization) diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppPreviewSetsResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppPreviewSetsResponse.generated.swift index 17f3d02a..9639aae8 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppPreviewSetsResponse.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppPreviewSetsResponse.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct AppPreviewSetsResponse: Hashable, Codable { +public struct AppPreviewSetsResponse: Hashable, Codable, Sendable { public var data: [AppPreviewSet] public var included: [Included]? @@ -31,7 +31,7 @@ public struct AppPreviewSetsResponse: Hashable, Codable { case meta } - public enum Included: Hashable, Codable { + public enum Included: Hashable, Codable, Sendable { case appStoreVersionLocalization(AppStoreVersionLocalization) case appCustomProductPageLocalization(AppCustomProductPageLocalization) case appStoreVersionExperimentTreatmentLocalization(AppStoreVersionExperimentTreatmentLocalization) diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppPreviewsResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppPreviewsResponse.generated.swift index 29c822f7..8894f697 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppPreviewsResponse.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppPreviewsResponse.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct AppPreviewsResponse: Hashable, Codable { +public struct AppPreviewsResponse: Hashable, Codable, Sendable { public var data: [AppPreview] public var included: [AppPreviewSet]? diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppPricePointV3EqualizationsLinkagesResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppPricePointV3EqualizationsLinkagesResponse.generated.swift new file mode 100644 index 00000000..92a5b5a5 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppPricePointV3EqualizationsLinkagesResponse.generated.swift @@ -0,0 +1,53 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct AppPricePointV3EqualizationsLinkagesResponse: Hashable, Codable, Sendable { + public var data: [Data] + + public var links: PagedDocumentLinks + + public var meta: PagingInformation? + + public init( + data: [Data], + links: PagedDocumentLinks, + meta: PagingInformation? = nil + ) { + self.data = data + self.links = links + self.meta = meta + } + + private enum CodingKeys: String, CodingKey { + case data + case links + case meta + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case appPricePoints + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppPricePointV3Response.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppPricePointV3Response.generated.swift index ac7eb5b5..24dbf476 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppPricePointV3Response.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppPricePointV3Response.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct AppPricePointV3Response: Hashable, Codable { +public struct AppPricePointV3Response: Hashable, Codable, Sendable { public var data: AppPricePointV3 public var included: [Included]? @@ -26,7 +26,7 @@ public struct AppPricePointV3Response: Hashable, Codable { case links } - public enum Included: Hashable, Codable { + public enum Included: Hashable, Codable, Sendable { case app(App) case territory(Territory) diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppPricePointsV3Response.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppPricePointsV3Response.generated.swift index 5e75173c..89a2f2e6 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppPricePointsV3Response.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppPricePointsV3Response.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct AppPricePointsV3Response: Hashable, Codable { +public struct AppPricePointsV3Response: Hashable, Codable, Sendable { public var data: [AppPricePointV3] public var included: [Included]? @@ -31,7 +31,7 @@ public struct AppPricePointsV3Response: Hashable, Codable { case meta } - public enum Included: Hashable, Codable { + public enum Included: Hashable, Codable, Sendable { case app(App) case territory(Territory) diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppPriceScheduleAutomaticPricesLinkagesResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppPriceScheduleAutomaticPricesLinkagesResponse.generated.swift new file mode 100644 index 00000000..78433af1 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppPriceScheduleAutomaticPricesLinkagesResponse.generated.swift @@ -0,0 +1,53 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct AppPriceScheduleAutomaticPricesLinkagesResponse: Hashable, Codable, Sendable { + public var data: [Data] + + public var links: PagedDocumentLinks + + public var meta: PagingInformation? + + public init( + data: [Data], + links: PagedDocumentLinks, + meta: PagingInformation? = nil + ) { + self.data = data + self.links = links + self.meta = meta + } + + private enum CodingKeys: String, CodingKey { + case data + case links + case meta + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case appPrices + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppPriceScheduleBaseTerritoryLinkageResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppPriceScheduleBaseTerritoryLinkageResponse.generated.swift new file mode 100644 index 00000000..f86a2bd1 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppPriceScheduleBaseTerritoryLinkageResponse.generated.swift @@ -0,0 +1,48 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct AppPriceScheduleBaseTerritoryLinkageResponse: Hashable, Codable, Sendable { + public var data: Data + + public var links: DocumentLinks + + public init( + data: Data, + links: DocumentLinks + ) { + self.data = data + self.links = links + } + + private enum CodingKeys: String, CodingKey { + case data + case links + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case territories + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppPriceScheduleManualPricesLinkagesResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppPriceScheduleManualPricesLinkagesResponse.generated.swift new file mode 100644 index 00000000..f6eae766 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppPriceScheduleManualPricesLinkagesResponse.generated.swift @@ -0,0 +1,53 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct AppPriceScheduleManualPricesLinkagesResponse: Hashable, Codable, Sendable { + public var data: [Data] + + public var links: PagedDocumentLinks + + public var meta: PagingInformation? + + public init( + data: [Data], + links: PagedDocumentLinks, + meta: PagingInformation? = nil + ) { + self.data = data + self.links = links + self.meta = meta + } + + private enum CodingKeys: String, CodingKey { + case data + case links + case meta + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case appPrices + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppPriceScheduleResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppPriceScheduleResponse.generated.swift index 3333651c..c423c1c0 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppPriceScheduleResponse.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppPriceScheduleResponse.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct AppPriceScheduleResponse: Hashable, Codable { +public struct AppPriceScheduleResponse: Hashable, Codable, Sendable { public var data: AppPriceSchedule public var included: [Included]? @@ -26,7 +26,7 @@ public struct AppPriceScheduleResponse: Hashable, Codable { case links } - public enum Included: Hashable, Codable { + public enum Included: Hashable, Codable, Sendable { case app(App) case territory(Territory) case appPriceV2(AppPriceV2) diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppPricesV2Response.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppPricesV2Response.generated.swift index 61b267b8..35ce1cec 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppPricesV2Response.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppPricesV2Response.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct AppPricesV2Response: Hashable, Codable { +public struct AppPricesV2Response: Hashable, Codable, Sendable { public var data: [AppPriceV2] public var included: [Included]? @@ -31,7 +31,7 @@ public struct AppPricesV2Response: Hashable, Codable { case meta } - public enum Included: Hashable, Codable { + public enum Included: Hashable, Codable, Sendable { case appPricePointV3(AppPricePointV3) case territory(Territory) diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppPromotedPurchasesLinkagesResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppPromotedPurchasesLinkagesResponse.generated.swift index dba99737..be0d3d4a 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppPromotedPurchasesLinkagesResponse.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppPromotedPurchasesLinkagesResponse.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct AppPromotedPurchasesLinkagesResponse: Hashable, Codable { +public struct AppPromotedPurchasesLinkagesResponse: Hashable, Codable, Sendable { public var data: [Data] public var links: PagedDocumentLinks @@ -26,7 +26,7 @@ public struct AppPromotedPurchasesLinkagesResponse: Hashable, Codable { case meta } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -44,7 +44,7 @@ public struct AppPromotedPurchasesLinkagesResponse: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case promotedPurchases } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppResponse.generated.swift index 7764e3c0..ee1a0ee2 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppResponse.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppResponse.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct AppResponse: Hashable, Codable { +public struct AppResponse: Hashable, Codable, Sendable { public var data: App public var included: [Included]? @@ -26,7 +26,7 @@ public struct AppResponse: Hashable, Codable { case links } - public enum Included: Hashable, Codable { + public enum Included: Hashable, Codable, Sendable { case appEncryptionDeclaration(AppEncryptionDeclaration) case ciProduct(CiProduct) case betaGroup(BetaGroup) @@ -39,9 +39,6 @@ public struct AppResponse: Hashable, Codable { case appInfo(AppInfo) case appClip(AppClip) case endUserLicenseAgreement(EndUserLicenseAgreement) - case appPreOrder(AppPreOrder) - case appPrice(AppPrice) - case territory(Territory) case inAppPurchase(InAppPurchase) case subscriptionGroup(SubscriptionGroup) case gameCenterEnabledVersion(GameCenterEnabledVersion) @@ -117,21 +114,6 @@ public struct AppResponse: Hashable, Codable { } catch { lastError = error } - do { - return .appPreOrder(try AppPreOrder(from: decoder)) - } catch { - lastError = error - } - do { - return .appPrice(try AppPrice(from: decoder)) - } catch { - lastError = error - } - do { - return .territory(try Territory(from: decoder)) - } catch { - lastError = error - } do { return .inAppPurchase(try InAppPurchase(from: decoder)) } catch { @@ -229,15 +211,6 @@ public struct AppResponse: Hashable, Codable { case .endUserLicenseAgreement(let value): try value.encode(to: encoder) - case .appPreOrder(let value): - try value.encode(to: encoder) - - case .appPrice(let value): - try value.encode(to: encoder) - - case .territory(let value): - try value.encode(to: encoder) - case .inAppPurchase(let value): try value.encode(to: encoder) diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppReviewSubmissionsLinkagesResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppReviewSubmissionsLinkagesResponse.generated.swift new file mode 100644 index 00000000..a0cff2e5 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppReviewSubmissionsLinkagesResponse.generated.swift @@ -0,0 +1,53 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct AppReviewSubmissionsLinkagesResponse: Hashable, Codable, Sendable { + public var data: [Data] + + public var links: PagedDocumentLinks + + public var meta: PagingInformation? + + public init( + data: [Data], + links: PagedDocumentLinks, + meta: PagingInformation? = nil + ) { + self.data = data + self.links = links + self.meta = meta + } + + private enum CodingKeys: String, CodingKey { + case data + case links + case meta + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case reviewSubmissions + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppScreenshotResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppScreenshotResponse.generated.swift index 065a1ce7..db61f3ac 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppScreenshotResponse.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppScreenshotResponse.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct AppScreenshotResponse: Hashable, Codable { +public struct AppScreenshotResponse: Hashable, Codable, Sendable { public var data: AppScreenshot public var included: [AppScreenshotSet]? diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppScreenshotSetAppScreenshotsLinkagesResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppScreenshotSetAppScreenshotsLinkagesResponse.generated.swift index b7e73a82..8ea1291c 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppScreenshotSetAppScreenshotsLinkagesResponse.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppScreenshotSetAppScreenshotsLinkagesResponse.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct AppScreenshotSetAppScreenshotsLinkagesResponse: Hashable, Codable { +public struct AppScreenshotSetAppScreenshotsLinkagesResponse: Hashable, Codable, Sendable { public var data: [Data] public var links: PagedDocumentLinks @@ -26,7 +26,7 @@ public struct AppScreenshotSetAppScreenshotsLinkagesResponse: Hashable, Codable case meta } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -44,7 +44,7 @@ public struct AppScreenshotSetAppScreenshotsLinkagesResponse: Hashable, Codable case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case appScreenshots } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppScreenshotSetResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppScreenshotSetResponse.generated.swift index 43a9d835..d26d73b7 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppScreenshotSetResponse.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppScreenshotSetResponse.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct AppScreenshotSetResponse: Hashable, Codable { +public struct AppScreenshotSetResponse: Hashable, Codable, Sendable { public var data: AppScreenshotSet public var included: [Included]? @@ -26,7 +26,7 @@ public struct AppScreenshotSetResponse: Hashable, Codable { case links } - public enum Included: Hashable, Codable { + public enum Included: Hashable, Codable, Sendable { case appStoreVersionLocalization(AppStoreVersionLocalization) case appCustomProductPageLocalization(AppCustomProductPageLocalization) case appStoreVersionExperimentTreatmentLocalization(AppStoreVersionExperimentTreatmentLocalization) diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppScreenshotSetsResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppScreenshotSetsResponse.generated.swift index 29033658..9ad5309a 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppScreenshotSetsResponse.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppScreenshotSetsResponse.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct AppScreenshotSetsResponse: Hashable, Codable { +public struct AppScreenshotSetsResponse: Hashable, Codable, Sendable { public var data: [AppScreenshotSet] public var included: [Included]? @@ -31,7 +31,7 @@ public struct AppScreenshotSetsResponse: Hashable, Codable { case meta } - public enum Included: Hashable, Codable { + public enum Included: Hashable, Codable, Sendable { case appStoreVersionLocalization(AppStoreVersionLocalization) case appCustomProductPageLocalization(AppCustomProductPageLocalization) case appStoreVersionExperimentTreatmentLocalization(AppStoreVersionExperimentTreatmentLocalization) diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppScreenshotsResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppScreenshotsResponse.generated.swift index 94d2aa77..cc8c3b0b 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppScreenshotsResponse.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppScreenshotsResponse.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct AppScreenshotsResponse: Hashable, Codable { +public struct AppScreenshotsResponse: Hashable, Codable, Sendable { public var data: [AppScreenshot] public var included: [AppScreenshotSet]? diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppStoreReviewAttachmentResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppStoreReviewAttachmentResponse.generated.swift index b1b985c9..b9bd522a 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppStoreReviewAttachmentResponse.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppStoreReviewAttachmentResponse.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct AppStoreReviewAttachmentResponse: Hashable, Codable { +public struct AppStoreReviewAttachmentResponse: Hashable, Codable, Sendable { public var data: AppStoreReviewAttachment public var included: [AppStoreReviewDetail]? diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppStoreReviewAttachmentsResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppStoreReviewAttachmentsResponse.generated.swift index a48ddbc5..70c1a8e4 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppStoreReviewAttachmentsResponse.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppStoreReviewAttachmentsResponse.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct AppStoreReviewAttachmentsResponse: Hashable, Codable { +public struct AppStoreReviewAttachmentsResponse: Hashable, Codable, Sendable { public var data: [AppStoreReviewAttachment] public var included: [AppStoreReviewDetail]? diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppStoreReviewDetailAppStoreReviewAttachmentsLinkagesResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppStoreReviewDetailAppStoreReviewAttachmentsLinkagesResponse.generated.swift new file mode 100644 index 00000000..cec72519 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppStoreReviewDetailAppStoreReviewAttachmentsLinkagesResponse.generated.swift @@ -0,0 +1,53 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct AppStoreReviewDetailAppStoreReviewAttachmentsLinkagesResponse: Hashable, Codable, Sendable { + public var data: [Data] + + public var links: PagedDocumentLinks + + public var meta: PagingInformation? + + public init( + data: [Data], + links: PagedDocumentLinks, + meta: PagingInformation? = nil + ) { + self.data = data + self.links = links + self.meta = meta + } + + private enum CodingKeys: String, CodingKey { + case data + case links + case meta + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case appStoreReviewAttachments + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppStoreReviewDetailResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppStoreReviewDetailResponse.generated.swift index bb967a4c..381068c0 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppStoreReviewDetailResponse.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppStoreReviewDetailResponse.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct AppStoreReviewDetailResponse: Hashable, Codable { +public struct AppStoreReviewDetailResponse: Hashable, Codable, Sendable { public var data: AppStoreReviewDetail public var included: [Included]? @@ -26,7 +26,7 @@ public struct AppStoreReviewDetailResponse: Hashable, Codable { case links } - public enum Included: Hashable, Codable { + public enum Included: Hashable, Codable, Sendable { case appStoreVersion(AppStoreVersion) case appStoreReviewAttachment(AppStoreReviewAttachment) diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppStoreVersionAgeRatingDeclarationLinkageResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppStoreVersionAgeRatingDeclarationLinkageResponse.generated.swift new file mode 100644 index 00000000..20839749 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppStoreVersionAgeRatingDeclarationLinkageResponse.generated.swift @@ -0,0 +1,48 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct AppStoreVersionAgeRatingDeclarationLinkageResponse: Hashable, Codable, Sendable { + public var data: Data + + public var links: DocumentLinks + + public init( + data: Data, + links: DocumentLinks + ) { + self.data = data + self.links = links + } + + private enum CodingKeys: String, CodingKey { + case data + case links + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case ageRatingDeclarations + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppStoreVersionAlternativeDistributionPackageLinkageResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppStoreVersionAlternativeDistributionPackageLinkageResponse.generated.swift new file mode 100644 index 00000000..1c86877c --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppStoreVersionAlternativeDistributionPackageLinkageResponse.generated.swift @@ -0,0 +1,48 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct AppStoreVersionAlternativeDistributionPackageLinkageResponse: Hashable, Codable, Sendable { + public var data: Data + + public var links: DocumentLinks + + public init( + data: Data, + links: DocumentLinks + ) { + self.data = data + self.links = links + } + + private enum CodingKeys: String, CodingKey { + case data + case links + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case alternativeDistributionPackages + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppStoreVersionAppClipDefaultExperienceLinkageResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppStoreVersionAppClipDefaultExperienceLinkageResponse.generated.swift index 982c300d..a3df43c9 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppStoreVersionAppClipDefaultExperienceLinkageResponse.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppStoreVersionAppClipDefaultExperienceLinkageResponse.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct AppStoreVersionAppClipDefaultExperienceLinkageResponse: Hashable, Codable { +public struct AppStoreVersionAppClipDefaultExperienceLinkageResponse: Hashable, Codable, Sendable { public var data: Data public var links: DocumentLinks @@ -21,7 +21,7 @@ public struct AppStoreVersionAppClipDefaultExperienceLinkageResponse: Hashable, case links } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -39,7 +39,7 @@ public struct AppStoreVersionAppClipDefaultExperienceLinkageResponse: Hashable, case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case appClipDefaultExperiences } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppStoreVersionAppStoreReviewDetailLinkageResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppStoreVersionAppStoreReviewDetailLinkageResponse.generated.swift new file mode 100644 index 00000000..a4a8af3c --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppStoreVersionAppStoreReviewDetailLinkageResponse.generated.swift @@ -0,0 +1,48 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct AppStoreVersionAppStoreReviewDetailLinkageResponse: Hashable, Codable, Sendable { + public var data: Data + + public var links: DocumentLinks + + public init( + data: Data, + links: DocumentLinks + ) { + self.data = data + self.links = links + } + + private enum CodingKeys: String, CodingKey { + case data + case links + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case appStoreReviewDetails + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppStoreVersionAppStoreVersionExperimentsLinkagesResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppStoreVersionAppStoreVersionExperimentsLinkagesResponse.generated.swift new file mode 100644 index 00000000..9f6430dc --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppStoreVersionAppStoreVersionExperimentsLinkagesResponse.generated.swift @@ -0,0 +1,53 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct AppStoreVersionAppStoreVersionExperimentsLinkagesResponse: Hashable, Codable, Sendable { + public var data: [Data] + + public var links: PagedDocumentLinks + + public var meta: PagingInformation? + + public init( + data: [Data], + links: PagedDocumentLinks, + meta: PagingInformation? = nil + ) { + self.data = data + self.links = links + self.meta = meta + } + + private enum CodingKeys: String, CodingKey { + case data + case links + case meta + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case appStoreVersionExperiments + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppStoreVersionAppStoreVersionExperimentsV2LinkagesResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppStoreVersionAppStoreVersionExperimentsV2LinkagesResponse.generated.swift new file mode 100644 index 00000000..98900933 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppStoreVersionAppStoreVersionExperimentsV2LinkagesResponse.generated.swift @@ -0,0 +1,53 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct AppStoreVersionAppStoreVersionExperimentsV2LinkagesResponse: Hashable, Codable, Sendable { + public var data: [Data] + + public var links: PagedDocumentLinks + + public var meta: PagingInformation? + + public init( + data: [Data], + links: PagedDocumentLinks, + meta: PagingInformation? = nil + ) { + self.data = data + self.links = links + self.meta = meta + } + + private enum CodingKeys: String, CodingKey { + case data + case links + case meta + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case appStoreVersionExperiments + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppStoreVersionAppStoreVersionLocalizationsLinkagesResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppStoreVersionAppStoreVersionLocalizationsLinkagesResponse.generated.swift new file mode 100644 index 00000000..f6ace285 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppStoreVersionAppStoreVersionLocalizationsLinkagesResponse.generated.swift @@ -0,0 +1,53 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct AppStoreVersionAppStoreVersionLocalizationsLinkagesResponse: Hashable, Codable, Sendable { + public var data: [Data] + + public var links: PagedDocumentLinks + + public var meta: PagingInformation? + + public init( + data: [Data], + links: PagedDocumentLinks, + meta: PagingInformation? = nil + ) { + self.data = data + self.links = links + self.meta = meta + } + + private enum CodingKeys: String, CodingKey { + case data + case links + case meta + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case appStoreVersionLocalizations + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppStoreVersionAppStoreVersionPhasedReleaseLinkageResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppStoreVersionAppStoreVersionPhasedReleaseLinkageResponse.generated.swift new file mode 100644 index 00000000..cac28bf1 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppStoreVersionAppStoreVersionPhasedReleaseLinkageResponse.generated.swift @@ -0,0 +1,48 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct AppStoreVersionAppStoreVersionPhasedReleaseLinkageResponse: Hashable, Codable, Sendable { + public var data: Data + + public var links: DocumentLinks + + public init( + data: Data, + links: DocumentLinks + ) { + self.data = data + self.links = links + } + + private enum CodingKeys: String, CodingKey { + case data + case links + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case appStoreVersionPhasedReleases + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppStoreVersionAppStoreVersionSubmissionLinkageResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppStoreVersionAppStoreVersionSubmissionLinkageResponse.generated.swift new file mode 100644 index 00000000..3c91bc9f --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppStoreVersionAppStoreVersionSubmissionLinkageResponse.generated.swift @@ -0,0 +1,48 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct AppStoreVersionAppStoreVersionSubmissionLinkageResponse: Hashable, Codable, Sendable { + public var data: Data + + public var links: DocumentLinks + + public init( + data: Data, + links: DocumentLinks + ) { + self.data = data + self.links = links + } + + private enum CodingKeys: String, CodingKey { + case data + case links + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case appStoreVersionSubmissions + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppStoreVersionBuildLinkageResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppStoreVersionBuildLinkageResponse.generated.swift index 86318e77..2c49e060 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppStoreVersionBuildLinkageResponse.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppStoreVersionBuildLinkageResponse.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct AppStoreVersionBuildLinkageResponse: Hashable, Codable { +public struct AppStoreVersionBuildLinkageResponse: Hashable, Codable, Sendable { public var data: Data public var links: DocumentLinks @@ -21,7 +21,7 @@ public struct AppStoreVersionBuildLinkageResponse: Hashable, Codable { case links } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -39,7 +39,7 @@ public struct AppStoreVersionBuildLinkageResponse: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case builds } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppStoreVersionCustomerReviewsLinkagesResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppStoreVersionCustomerReviewsLinkagesResponse.generated.swift new file mode 100644 index 00000000..868383af --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppStoreVersionCustomerReviewsLinkagesResponse.generated.swift @@ -0,0 +1,53 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct AppStoreVersionCustomerReviewsLinkagesResponse: Hashable, Codable, Sendable { + public var data: [Data] + + public var links: PagedDocumentLinks + + public var meta: PagingInformation? + + public init( + data: [Data], + links: PagedDocumentLinks, + meta: PagingInformation? = nil + ) { + self.data = data + self.links = links + self.meta = meta + } + + private enum CodingKeys: String, CodingKey { + case data + case links + case meta + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case customerReviews + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppStoreVersionExperimentAppStoreVersionExperimentTreatmentsLinkagesResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppStoreVersionExperimentAppStoreVersionExperimentTreatmentsLinkagesResponse.generated.swift new file mode 100644 index 00000000..b9adefe1 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppStoreVersionExperimentAppStoreVersionExperimentTreatmentsLinkagesResponse.generated.swift @@ -0,0 +1,53 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct AppStoreVersionExperimentAppStoreVersionExperimentTreatmentsLinkagesResponse: Hashable, Codable, Sendable { + public var data: [Data] + + public var links: PagedDocumentLinks + + public var meta: PagingInformation? + + public init( + data: [Data], + links: PagedDocumentLinks, + meta: PagingInformation? = nil + ) { + self.data = data + self.links = links + self.meta = meta + } + + private enum CodingKeys: String, CodingKey { + case data + case links + case meta + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case appStoreVersionExperimentTreatments + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppStoreVersionExperimentResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppStoreVersionExperimentResponse.generated.swift index 374f8f93..a0ee6bd5 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppStoreVersionExperimentResponse.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppStoreVersionExperimentResponse.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct AppStoreVersionExperimentResponse: Hashable, Codable { +public struct AppStoreVersionExperimentResponse: Hashable, Codable, Sendable { public var data: AppStoreVersionExperiment public var included: [Included]? @@ -26,7 +26,7 @@ public struct AppStoreVersionExperimentResponse: Hashable, Codable { case links } - public enum Included: Hashable, Codable { + public enum Included: Hashable, Codable, Sendable { case appStoreVersion(AppStoreVersion) case appStoreVersionExperimentTreatment(AppStoreVersionExperimentTreatment) diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppStoreVersionExperimentTreatmentAppStoreVersionExperimentTreatmentLocalizationsLinkagesResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppStoreVersionExperimentTreatmentAppStoreVersionExperimentTreatmentLocalizationsLinkagesResponse.generated.swift new file mode 100644 index 00000000..7f2d46d6 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppStoreVersionExperimentTreatmentAppStoreVersionExperimentTreatmentLocalizationsLinkagesResponse.generated.swift @@ -0,0 +1,53 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct AppStoreVersionExperimentTreatmentAppStoreVersionExperimentTreatmentLocalizationsLinkagesResponse: Hashable, Codable, Sendable { + public var data: [Data] + + public var links: PagedDocumentLinks + + public var meta: PagingInformation? + + public init( + data: [Data], + links: PagedDocumentLinks, + meta: PagingInformation? = nil + ) { + self.data = data + self.links = links + self.meta = meta + } + + private enum CodingKeys: String, CodingKey { + case data + case links + case meta + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case appStoreVersionExperimentTreatmentLocalizations + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppStoreVersionExperimentTreatmentLocalizationAppPreviewSetsLinkagesResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppStoreVersionExperimentTreatmentLocalizationAppPreviewSetsLinkagesResponse.generated.swift new file mode 100644 index 00000000..51e62178 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppStoreVersionExperimentTreatmentLocalizationAppPreviewSetsLinkagesResponse.generated.swift @@ -0,0 +1,53 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct AppStoreVersionExperimentTreatmentLocalizationAppPreviewSetsLinkagesResponse: Hashable, Codable, Sendable { + public var data: [Data] + + public var links: PagedDocumentLinks + + public var meta: PagingInformation? + + public init( + data: [Data], + links: PagedDocumentLinks, + meta: PagingInformation? = nil + ) { + self.data = data + self.links = links + self.meta = meta + } + + private enum CodingKeys: String, CodingKey { + case data + case links + case meta + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case appPreviewSets + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppStoreVersionExperimentTreatmentLocalizationAppScreenshotSetsLinkagesResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppStoreVersionExperimentTreatmentLocalizationAppScreenshotSetsLinkagesResponse.generated.swift new file mode 100644 index 00000000..2447de2a --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppStoreVersionExperimentTreatmentLocalizationAppScreenshotSetsLinkagesResponse.generated.swift @@ -0,0 +1,53 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct AppStoreVersionExperimentTreatmentLocalizationAppScreenshotSetsLinkagesResponse: Hashable, Codable, Sendable { + public var data: [Data] + + public var links: PagedDocumentLinks + + public var meta: PagingInformation? + + public init( + data: [Data], + links: PagedDocumentLinks, + meta: PagingInformation? = nil + ) { + self.data = data + self.links = links + self.meta = meta + } + + private enum CodingKeys: String, CodingKey { + case data + case links + case meta + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case appScreenshotSets + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppStoreVersionExperimentTreatmentLocalizationResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppStoreVersionExperimentTreatmentLocalizationResponse.generated.swift index a7fc809b..9850a62f 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppStoreVersionExperimentTreatmentLocalizationResponse.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppStoreVersionExperimentTreatmentLocalizationResponse.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct AppStoreVersionExperimentTreatmentLocalizationResponse: Hashable, Codable { +public struct AppStoreVersionExperimentTreatmentLocalizationResponse: Hashable, Codable, Sendable { public var data: AppStoreVersionExperimentTreatmentLocalization public var included: [Included]? @@ -26,7 +26,7 @@ public struct AppStoreVersionExperimentTreatmentLocalizationResponse: Hashable, case links } - public enum Included: Hashable, Codable { + public enum Included: Hashable, Codable, Sendable { case appStoreVersionExperimentTreatment(AppStoreVersionExperimentTreatment) case appScreenshotSet(AppScreenshotSet) case appPreviewSet(AppPreviewSet) diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppStoreVersionExperimentTreatmentLocalizationsResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppStoreVersionExperimentTreatmentLocalizationsResponse.generated.swift index f7bcb5f6..96f8b8e0 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppStoreVersionExperimentTreatmentLocalizationsResponse.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppStoreVersionExperimentTreatmentLocalizationsResponse.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct AppStoreVersionExperimentTreatmentLocalizationsResponse: Hashable, Codable { +public struct AppStoreVersionExperimentTreatmentLocalizationsResponse: Hashable, Codable, Sendable { public var data: [AppStoreVersionExperimentTreatmentLocalization] public var included: [Included]? @@ -31,7 +31,7 @@ public struct AppStoreVersionExperimentTreatmentLocalizationsResponse: Hashable, case meta } - public enum Included: Hashable, Codable { + public enum Included: Hashable, Codable, Sendable { case appStoreVersionExperimentTreatment(AppStoreVersionExperimentTreatment) case appScreenshotSet(AppScreenshotSet) case appPreviewSet(AppPreviewSet) diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppStoreVersionExperimentTreatmentResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppStoreVersionExperimentTreatmentResponse.generated.swift index 11c03398..55ab9b76 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppStoreVersionExperimentTreatmentResponse.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppStoreVersionExperimentTreatmentResponse.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct AppStoreVersionExperimentTreatmentResponse: Hashable, Codable { +public struct AppStoreVersionExperimentTreatmentResponse: Hashable, Codable, Sendable { public var data: AppStoreVersionExperimentTreatment public var included: [Included]? @@ -26,7 +26,7 @@ public struct AppStoreVersionExperimentTreatmentResponse: Hashable, Codable { case links } - public enum Included: Hashable, Codable { + public enum Included: Hashable, Codable, Sendable { case appStoreVersionExperiment(AppStoreVersionExperiment) case appStoreVersionExperimentV2(AppStoreVersionExperimentV2) case appStoreVersionExperimentTreatmentLocalization(AppStoreVersionExperimentTreatmentLocalization) diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppStoreVersionExperimentTreatmentsResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppStoreVersionExperimentTreatmentsResponse.generated.swift index 6ffa91f0..a85f2703 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppStoreVersionExperimentTreatmentsResponse.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppStoreVersionExperimentTreatmentsResponse.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct AppStoreVersionExperimentTreatmentsResponse: Hashable, Codable { +public struct AppStoreVersionExperimentTreatmentsResponse: Hashable, Codable, Sendable { public var data: [AppStoreVersionExperimentTreatment] public var included: [Included]? @@ -31,7 +31,7 @@ public struct AppStoreVersionExperimentTreatmentsResponse: Hashable, Codable { case meta } - public enum Included: Hashable, Codable { + public enum Included: Hashable, Codable, Sendable { case appStoreVersionExperiment(AppStoreVersionExperiment) case appStoreVersionExperimentV2(AppStoreVersionExperimentV2) case appStoreVersionExperimentTreatmentLocalization(AppStoreVersionExperimentTreatmentLocalization) diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppStoreVersionExperimentV2AppStoreVersionExperimentTreatmentsLinkagesResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppStoreVersionExperimentV2AppStoreVersionExperimentTreatmentsLinkagesResponse.generated.swift new file mode 100644 index 00000000..1a89b784 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppStoreVersionExperimentV2AppStoreVersionExperimentTreatmentsLinkagesResponse.generated.swift @@ -0,0 +1,53 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct AppStoreVersionExperimentV2AppStoreVersionExperimentTreatmentsLinkagesResponse: Hashable, Codable, Sendable { + public var data: [Data] + + public var links: PagedDocumentLinks + + public var meta: PagingInformation? + + public init( + data: [Data], + links: PagedDocumentLinks, + meta: PagingInformation? = nil + ) { + self.data = data + self.links = links + self.meta = meta + } + + private enum CodingKeys: String, CodingKey { + case data + case links + case meta + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case appStoreVersionExperimentTreatments + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppStoreVersionExperimentV2Response.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppStoreVersionExperimentV2Response.generated.swift index c1a5507a..a086412f 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppStoreVersionExperimentV2Response.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppStoreVersionExperimentV2Response.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct AppStoreVersionExperimentV2Response: Hashable, Codable { +public struct AppStoreVersionExperimentV2Response: Hashable, Codable, Sendable { public var data: AppStoreVersionExperimentV2 public var included: [Included]? @@ -26,7 +26,7 @@ public struct AppStoreVersionExperimentV2Response: Hashable, Codable { case links } - public enum Included: Hashable, Codable { + public enum Included: Hashable, Codable, Sendable { case app(App) case appStoreVersion(AppStoreVersion) case appStoreVersionExperimentTreatment(AppStoreVersionExperimentTreatment) diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppStoreVersionExperimentsResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppStoreVersionExperimentsResponse.generated.swift index dd7ca454..b97c877e 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppStoreVersionExperimentsResponse.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppStoreVersionExperimentsResponse.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct AppStoreVersionExperimentsResponse: Hashable, Codable { +public struct AppStoreVersionExperimentsResponse: Hashable, Codable, Sendable { public var data: [AppStoreVersionExperiment] public var included: [Included]? @@ -31,7 +31,7 @@ public struct AppStoreVersionExperimentsResponse: Hashable, Codable { case meta } - public enum Included: Hashable, Codable { + public enum Included: Hashable, Codable, Sendable { case appStoreVersion(AppStoreVersion) case appStoreVersionExperimentTreatment(AppStoreVersionExperimentTreatment) diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppStoreVersionExperimentsV2Response.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppStoreVersionExperimentsV2Response.generated.swift index d8b1305e..ee1a3961 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppStoreVersionExperimentsV2Response.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppStoreVersionExperimentsV2Response.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct AppStoreVersionExperimentsV2Response: Hashable, Codable { +public struct AppStoreVersionExperimentsV2Response: Hashable, Codable, Sendable { public var data: [AppStoreVersionExperimentV2] public var included: [Included]? @@ -31,7 +31,7 @@ public struct AppStoreVersionExperimentsV2Response: Hashable, Codable { case meta } - public enum Included: Hashable, Codable { + public enum Included: Hashable, Codable, Sendable { case app(App) case appStoreVersion(AppStoreVersion) case appStoreVersionExperimentTreatment(AppStoreVersionExperimentTreatment) diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppStoreVersionGameCenterAppVersionLinkageResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppStoreVersionGameCenterAppVersionLinkageResponse.generated.swift new file mode 100644 index 00000000..a40ccb1e --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppStoreVersionGameCenterAppVersionLinkageResponse.generated.swift @@ -0,0 +1,48 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct AppStoreVersionGameCenterAppVersionLinkageResponse: Hashable, Codable, Sendable { + public var data: Data + + public var links: DocumentLinks + + public init( + data: Data, + links: DocumentLinks + ) { + self.data = data + self.links = links + } + + private enum CodingKeys: String, CodingKey { + case data + case links + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case gameCenterAppVersions + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppStoreVersionLocalizationAppPreviewSetsLinkagesResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppStoreVersionLocalizationAppPreviewSetsLinkagesResponse.generated.swift new file mode 100644 index 00000000..f70bf9a3 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppStoreVersionLocalizationAppPreviewSetsLinkagesResponse.generated.swift @@ -0,0 +1,53 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct AppStoreVersionLocalizationAppPreviewSetsLinkagesResponse: Hashable, Codable, Sendable { + public var data: [Data] + + public var links: PagedDocumentLinks + + public var meta: PagingInformation? + + public init( + data: [Data], + links: PagedDocumentLinks, + meta: PagingInformation? = nil + ) { + self.data = data + self.links = links + self.meta = meta + } + + private enum CodingKeys: String, CodingKey { + case data + case links + case meta + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case appPreviewSets + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppStoreVersionLocalizationAppScreenshotSetsLinkagesResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppStoreVersionLocalizationAppScreenshotSetsLinkagesResponse.generated.swift new file mode 100644 index 00000000..b2ee6f38 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppStoreVersionLocalizationAppScreenshotSetsLinkagesResponse.generated.swift @@ -0,0 +1,53 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct AppStoreVersionLocalizationAppScreenshotSetsLinkagesResponse: Hashable, Codable, Sendable { + public var data: [Data] + + public var links: PagedDocumentLinks + + public var meta: PagingInformation? + + public init( + data: [Data], + links: PagedDocumentLinks, + meta: PagingInformation? = nil + ) { + self.data = data + self.links = links + self.meta = meta + } + + private enum CodingKeys: String, CodingKey { + case data + case links + case meta + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case appScreenshotSets + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppStoreVersionLocalizationResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppStoreVersionLocalizationResponse.generated.swift index 5e7212a1..a4fac0a7 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppStoreVersionLocalizationResponse.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppStoreVersionLocalizationResponse.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct AppStoreVersionLocalizationResponse: Hashable, Codable { +public struct AppStoreVersionLocalizationResponse: Hashable, Codable, Sendable { public var data: AppStoreVersionLocalization public var included: [Included]? @@ -26,7 +26,7 @@ public struct AppStoreVersionLocalizationResponse: Hashable, Codable { case links } - public enum Included: Hashable, Codable { + public enum Included: Hashable, Codable, Sendable { case appStoreVersion(AppStoreVersion) case appScreenshotSet(AppScreenshotSet) case appPreviewSet(AppPreviewSet) diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppStoreVersionLocalizationsResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppStoreVersionLocalizationsResponse.generated.swift index 1d660700..f0db650d 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppStoreVersionLocalizationsResponse.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppStoreVersionLocalizationsResponse.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct AppStoreVersionLocalizationsResponse: Hashable, Codable { +public struct AppStoreVersionLocalizationsResponse: Hashable, Codable, Sendable { public var data: [AppStoreVersionLocalization] public var included: [Included]? @@ -31,7 +31,7 @@ public struct AppStoreVersionLocalizationsResponse: Hashable, Codable { case meta } - public enum Included: Hashable, Codable { + public enum Included: Hashable, Codable, Sendable { case appStoreVersion(AppStoreVersion) case appScreenshotSet(AppScreenshotSet) case appPreviewSet(AppPreviewSet) diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppStoreVersionPhasedReleaseResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppStoreVersionPhasedReleaseResponse.generated.swift index 87d9e789..625baedd 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppStoreVersionPhasedReleaseResponse.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppStoreVersionPhasedReleaseResponse.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct AppStoreVersionPhasedReleaseResponse: Hashable, Codable { +public struct AppStoreVersionPhasedReleaseResponse: Hashable, Codable, Sendable { public var data: AppStoreVersionPhasedRelease public var links: DocumentLinks diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppStoreVersionPhasedReleaseWithoutIncludesResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppStoreVersionPhasedReleaseWithoutIncludesResponse.generated.swift index 8d84d5e6..1c7ae3a7 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppStoreVersionPhasedReleaseWithoutIncludesResponse.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppStoreVersionPhasedReleaseWithoutIncludesResponse.generated.swift @@ -3,13 +3,13 @@ // swiftlint:disable all import Foundation -public struct AppStoreVersionPhasedReleaseWithoutIncludesResponse: Hashable, Codable { - public var data: AppStoreVersion +public struct AppStoreVersionPhasedReleaseWithoutIncludesResponse: Hashable, Codable, Sendable { + public var data: AppStoreVersionPhasedRelease public var links: DocumentLinks public init( - data: AppStoreVersion, + data: AppStoreVersionPhasedRelease, links: DocumentLinks ) { self.data = data diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppStoreVersionPromotionResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppStoreVersionPromotionResponse.generated.swift index 7ebd6462..fbb4b523 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppStoreVersionPromotionResponse.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppStoreVersionPromotionResponse.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct AppStoreVersionPromotionResponse: Hashable, Codable { +public struct AppStoreVersionPromotionResponse: Hashable, Codable, Sendable { public var data: AppStoreVersionPromotion public var links: DocumentLinks diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppStoreVersionReleaseRequestResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppStoreVersionReleaseRequestResponse.generated.swift index 831651e6..a6ca6ebe 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppStoreVersionReleaseRequestResponse.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppStoreVersionReleaseRequestResponse.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct AppStoreVersionReleaseRequestResponse: Hashable, Codable { +public struct AppStoreVersionReleaseRequestResponse: Hashable, Codable, Sendable { public var data: AppStoreVersionReleaseRequest public var links: DocumentLinks diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppStoreVersionResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppStoreVersionResponse.generated.swift index 9a290d1e..f12869d4 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppStoreVersionResponse.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppStoreVersionResponse.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct AppStoreVersionResponse: Hashable, Codable { +public struct AppStoreVersionResponse: Hashable, Codable, Sendable { public var data: AppStoreVersion public var included: [Included]? @@ -26,18 +26,20 @@ public struct AppStoreVersionResponse: Hashable, Codable { case links } - public enum Included: Hashable, Codable { + public enum Included: Hashable, Codable, Sendable { case app(App) case ageRatingDeclaration(AgeRatingDeclaration) case appStoreVersionLocalization(AppStoreVersionLocalization) case build(Build) case appStoreVersionPhasedRelease(AppStoreVersionPhasedRelease) + case gameCenterAppVersion(GameCenterAppVersion) case routingAppCoverage(RoutingAppCoverage) case appStoreReviewDetail(AppStoreReviewDetail) case appStoreVersionSubmission(AppStoreVersionSubmission) case appClipDefaultExperience(AppClipDefaultExperience) case appStoreVersionExperiment(AppStoreVersionExperiment) case appStoreVersionExperimentV2(AppStoreVersionExperimentV2) + case alternativeDistributionPackage(AlternativeDistributionPackage) public init(from decoder: Decoder) throws { self = try { @@ -67,6 +69,11 @@ public struct AppStoreVersionResponse: Hashable, Codable { } catch { lastError = error } + do { + return .gameCenterAppVersion(try GameCenterAppVersion(from: decoder)) + } catch { + lastError = error + } do { return .routingAppCoverage(try RoutingAppCoverage(from: decoder)) } catch { @@ -97,6 +104,11 @@ public struct AppStoreVersionResponse: Hashable, Codable { } catch { lastError = error } + do { + return .alternativeDistributionPackage(try AlternativeDistributionPackage(from: decoder)) + } catch { + lastError = error + } throw lastError }() } @@ -118,6 +130,9 @@ public struct AppStoreVersionResponse: Hashable, Codable { case .appStoreVersionPhasedRelease(let value): try value.encode(to: encoder) + case .gameCenterAppVersion(let value): + try value.encode(to: encoder) + case .routingAppCoverage(let value): try value.encode(to: encoder) @@ -135,6 +150,9 @@ public struct AppStoreVersionResponse: Hashable, Codable { case .appStoreVersionExperimentV2(let value): try value.encode(to: encoder) + + case .alternativeDistributionPackage(let value): + try value.encode(to: encoder) } } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppStoreVersionRoutingAppCoverageLinkageResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppStoreVersionRoutingAppCoverageLinkageResponse.generated.swift new file mode 100644 index 00000000..b6cc27bf --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppStoreVersionRoutingAppCoverageLinkageResponse.generated.swift @@ -0,0 +1,48 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct AppStoreVersionRoutingAppCoverageLinkageResponse: Hashable, Codable, Sendable { + public var data: Data + + public var links: DocumentLinks + + public init( + data: Data, + links: DocumentLinks + ) { + self.data = data + self.links = links + } + + private enum CodingKeys: String, CodingKey { + case data + case links + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case routingAppCoverages + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppStoreVersionSubmissionResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppStoreVersionSubmissionResponse.generated.swift index 228bfdce..6ccf77a6 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppStoreVersionSubmissionResponse.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppStoreVersionSubmissionResponse.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct AppStoreVersionSubmissionResponse: Hashable, Codable { +public struct AppStoreVersionSubmissionResponse: Hashable, Codable, Sendable { public var data: AppStoreVersionSubmission public var included: [AppStoreVersion]? diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppStoreVersionsResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppStoreVersionsResponse.generated.swift index 2538995a..1efe52e4 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppStoreVersionsResponse.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppStoreVersionsResponse.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct AppStoreVersionsResponse: Hashable, Codable { +public struct AppStoreVersionsResponse: Hashable, Codable, Sendable { public var data: [AppStoreVersion] public var included: [Included]? @@ -31,18 +31,20 @@ public struct AppStoreVersionsResponse: Hashable, Codable { case meta } - public enum Included: Hashable, Codable { + public enum Included: Hashable, Codable, Sendable { case app(App) case ageRatingDeclaration(AgeRatingDeclaration) case appStoreVersionLocalization(AppStoreVersionLocalization) case build(Build) case appStoreVersionPhasedRelease(AppStoreVersionPhasedRelease) + case gameCenterAppVersion(GameCenterAppVersion) case routingAppCoverage(RoutingAppCoverage) case appStoreReviewDetail(AppStoreReviewDetail) case appStoreVersionSubmission(AppStoreVersionSubmission) case appClipDefaultExperience(AppClipDefaultExperience) case appStoreVersionExperiment(AppStoreVersionExperiment) case appStoreVersionExperimentV2(AppStoreVersionExperimentV2) + case alternativeDistributionPackage(AlternativeDistributionPackage) public init(from decoder: Decoder) throws { self = try { @@ -72,6 +74,11 @@ public struct AppStoreVersionsResponse: Hashable, Codable { } catch { lastError = error } + do { + return .gameCenterAppVersion(try GameCenterAppVersion(from: decoder)) + } catch { + lastError = error + } do { return .routingAppCoverage(try RoutingAppCoverage(from: decoder)) } catch { @@ -102,6 +109,11 @@ public struct AppStoreVersionsResponse: Hashable, Codable { } catch { lastError = error } + do { + return .alternativeDistributionPackage(try AlternativeDistributionPackage(from: decoder)) + } catch { + lastError = error + } throw lastError }() } @@ -123,6 +135,9 @@ public struct AppStoreVersionsResponse: Hashable, Codable { case .appStoreVersionPhasedRelease(let value): try value.encode(to: encoder) + case .gameCenterAppVersion(let value): + try value.encode(to: encoder) + case .routingAppCoverage(let value): try value.encode(to: encoder) @@ -140,6 +155,9 @@ public struct AppStoreVersionsResponse: Hashable, Codable { case .appStoreVersionExperimentV2(let value): try value.encode(to: encoder) + + case .alternativeDistributionPackage(let value): + try value.encode(to: encoder) } } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppSubscriptionGracePeriodLinkageResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppSubscriptionGracePeriodLinkageResponse.generated.swift new file mode 100644 index 00000000..74a79cf7 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppSubscriptionGracePeriodLinkageResponse.generated.swift @@ -0,0 +1,48 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct AppSubscriptionGracePeriodLinkageResponse: Hashable, Codable, Sendable { + public var data: Data + + public var links: DocumentLinks + + public init( + data: Data, + links: DocumentLinks + ) { + self.data = data + self.links = links + } + + private enum CodingKeys: String, CodingKey { + case data + case links + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case subscriptionGracePeriods + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppSubscriptionGroupsLinkagesResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppSubscriptionGroupsLinkagesResponse.generated.swift new file mode 100644 index 00000000..1a314f35 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppSubscriptionGroupsLinkagesResponse.generated.swift @@ -0,0 +1,53 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct AppSubscriptionGroupsLinkagesResponse: Hashable, Codable, Sendable { + public var data: [Data] + + public var links: PagedDocumentLinks + + public var meta: PagingInformation? + + public init( + data: [Data], + links: PagedDocumentLinks, + meta: PagingInformation? = nil + ) { + self.data = data + self.links = links + self.meta = meta + } + + private enum CodingKeys: String, CodingKey { + case data + case links + case meta + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case subscriptionGroups + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppWebhooksLinkagesResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppWebhooksLinkagesResponse.generated.swift new file mode 100644 index 00000000..f2d8ba50 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppWebhooksLinkagesResponse.generated.swift @@ -0,0 +1,53 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct AppWebhooksLinkagesResponse: Hashable, Codable, Sendable { + public var data: [Data] + + public var links: PagedDocumentLinks + + public var meta: PagingInformation? + + public init( + data: [Data], + links: PagedDocumentLinks, + meta: PagingInformation? = nil + ) { + self.data = data + self.links = links + self.meta = meta + } + + private enum CodingKeys: String, CodingKey { + case data + case links + case meta + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case webhooks + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppWithoutIncludesResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppWithoutIncludesResponse.generated.swift index 6888fc97..d00ba58c 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppWithoutIncludesResponse.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppWithoutIncludesResponse.generated.swift @@ -3,13 +3,13 @@ // swiftlint:disable all import Foundation -public struct AppWithoutIncludesResponse: Hashable, Codable { - public var data: PrereleaseVersion +public struct AppWithoutIncludesResponse: Hashable, Codable, Sendable { + public var data: App public var links: DocumentLinks public init( - data: PrereleaseVersion, + data: App, links: DocumentLinks ) { self.data = data diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppsBetaTesterUsagesV1MetricResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppsBetaTesterUsagesV1MetricResponse.generated.swift index d466707a..901892db 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppsBetaTesterUsagesV1MetricResponse.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppsBetaTesterUsagesV1MetricResponse.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct AppsBetaTesterUsagesV1MetricResponse: Hashable, Codable { +public struct AppsBetaTesterUsagesV1MetricResponse: Hashable, Codable, Sendable { public var data: [Data] public var included: [BetaTester]? @@ -31,7 +31,7 @@ public struct AppsBetaTesterUsagesV1MetricResponse: Hashable, Codable { case meta } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var dataPoints: DataPoints? public var dimensions: Dimensions? @@ -49,7 +49,7 @@ public struct AppsBetaTesterUsagesV1MetricResponse: Hashable, Codable { case dimensions } - public struct DataPoints: Hashable, Codable { + public struct DataPoints: Hashable, Codable, Sendable { public var end: String? public var start: String? @@ -72,7 +72,7 @@ public struct AppsBetaTesterUsagesV1MetricResponse: Hashable, Codable { case values } - public struct Values: Hashable, Codable { + public struct Values: Hashable, Codable, Sendable { public var crashCount: Int? public var feedbackCount: Int? @@ -97,7 +97,7 @@ public struct AppsBetaTesterUsagesV1MetricResponse: Hashable, Codable { } } - public struct Dimensions: Hashable, Codable { + public struct Dimensions: Hashable, Codable, Sendable { public var betaTesters: BetaTesters? public init(betaTesters: BetaTesters? = nil) { @@ -108,18 +108,25 @@ public struct AppsBetaTesterUsagesV1MetricResponse: Hashable, Codable { case betaTesters } - public struct BetaTesters: Hashable, Codable { + public struct BetaTesters: Hashable, Codable, Sendable { + public var data: String? + public var links: Links? - public init(links: Links? = nil) { + public init( + data: String? = nil, + links: Links? = nil + ) { + self.data = data self.links = links } private enum CodingKeys: String, CodingKey { + case data case links } - public struct Links: Hashable, Codable { + public struct Links: Hashable, Codable, Sendable { public var groupBy: URL? public var related: URL? diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppsResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppsResponse.generated.swift index 62a8b423..633b3be7 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppsResponse.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppsResponse.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct AppsResponse: Hashable, Codable { +public struct AppsResponse: Hashable, Codable, Sendable { public var data: [App] public var included: [Included]? @@ -31,7 +31,7 @@ public struct AppsResponse: Hashable, Codable { case meta } - public enum Included: Hashable, Codable { + public enum Included: Hashable, Codable, Sendable { case appEncryptionDeclaration(AppEncryptionDeclaration) case ciProduct(CiProduct) case betaGroup(BetaGroup) @@ -44,9 +44,6 @@ public struct AppsResponse: Hashable, Codable { case appInfo(AppInfo) case appClip(AppClip) case endUserLicenseAgreement(EndUserLicenseAgreement) - case appPreOrder(AppPreOrder) - case appPrice(AppPrice) - case territory(Territory) case inAppPurchase(InAppPurchase) case subscriptionGroup(SubscriptionGroup) case gameCenterEnabledVersion(GameCenterEnabledVersion) @@ -122,21 +119,6 @@ public struct AppsResponse: Hashable, Codable { } catch { lastError = error } - do { - return .appPreOrder(try AppPreOrder(from: decoder)) - } catch { - lastError = error - } - do { - return .appPrice(try AppPrice(from: decoder)) - } catch { - lastError = error - } - do { - return .territory(try Territory(from: decoder)) - } catch { - lastError = error - } do { return .inAppPurchase(try InAppPurchase(from: decoder)) } catch { @@ -234,15 +216,6 @@ public struct AppsResponse: Hashable, Codable { case .endUserLicenseAgreement(let value): try value.encode(to: encoder) - case .appPreOrder(let value): - try value.encode(to: encoder) - - case .appPrice(let value): - try value.encode(to: encoder) - - case .territory(let value): - try value.encode(to: encoder) - case .inAppPurchase(let value): try value.encode(to: encoder) diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppsWithoutIncludesResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppsWithoutIncludesResponse.generated.swift index ef15bbf5..7328ae0f 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppsWithoutIncludesResponse.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppsWithoutIncludesResponse.generated.swift @@ -3,15 +3,15 @@ // swiftlint:disable all import Foundation -public struct AppsWithoutIncludesResponse: Hashable, Codable { - public var data: [User] +public struct AppsWithoutIncludesResponse: Hashable, Codable, Sendable { + public var data: [App] public var links: PagedDocumentLinks public var meta: PagingInformation? public init( - data: [User], + data: [App], links: PagedDocumentLinks, meta: PagingInformation? = nil ) { diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BackgroundAssetResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BackgroundAssetResponse.generated.swift new file mode 100644 index 00000000..d6b5ec34 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BackgroundAssetResponse.generated.swift @@ -0,0 +1,30 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct BackgroundAssetResponse: Hashable, Codable, Sendable { + public var data: BackgroundAsset + + public var included: [BackgroundAssetVersion]? + + public var links: DocumentLinks + + public init( + data: BackgroundAsset, + included: [BackgroundAssetVersion]? = nil, + links: DocumentLinks + ) { + self.data = data + self.included = included + self.links = links + } + + private enum CodingKeys: String, CodingKey { + case data + case included + case links + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BackgroundAssetUploadFileResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BackgroundAssetUploadFileResponse.generated.swift new file mode 100644 index 00000000..2bd53a0f --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BackgroundAssetUploadFileResponse.generated.swift @@ -0,0 +1,25 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct BackgroundAssetUploadFileResponse: Hashable, Codable, Sendable { + public var data: BackgroundAssetUploadFile + + public var links: DocumentLinks + + public init( + data: BackgroundAssetUploadFile, + links: DocumentLinks + ) { + self.data = data + self.links = links + } + + private enum CodingKeys: String, CodingKey { + case data + case links + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BackgroundAssetUploadFilesResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BackgroundAssetUploadFilesResponse.generated.swift new file mode 100644 index 00000000..1a07927d --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BackgroundAssetUploadFilesResponse.generated.swift @@ -0,0 +1,30 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct BackgroundAssetUploadFilesResponse: Hashable, Codable, Sendable { + public var data: [BackgroundAssetUploadFile] + + public var links: PagedDocumentLinks + + public var meta: PagingInformation? + + public init( + data: [BackgroundAssetUploadFile], + links: PagedDocumentLinks, + meta: PagingInformation? = nil + ) { + self.data = data + self.links = links + self.meta = meta + } + + private enum CodingKeys: String, CodingKey { + case data + case links + case meta + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BackgroundAssetVersionBackgroundAssetUploadFilesLinkagesResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BackgroundAssetVersionBackgroundAssetUploadFilesLinkagesResponse.generated.swift new file mode 100644 index 00000000..f0b94c7f --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BackgroundAssetVersionBackgroundAssetUploadFilesLinkagesResponse.generated.swift @@ -0,0 +1,53 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct BackgroundAssetVersionBackgroundAssetUploadFilesLinkagesResponse: Hashable, Codable, Sendable { + public var data: [Data] + + public var links: PagedDocumentLinks + + public var meta: PagingInformation? + + public init( + data: [Data], + links: PagedDocumentLinks, + meta: PagingInformation? = nil + ) { + self.data = data + self.links = links + self.meta = meta + } + + private enum CodingKeys: String, CodingKey { + case data + case links + case meta + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case backgroundAssetUploadFiles + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BackgroundAssetVersionInternalBetaReleaseResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BackgroundAssetVersionInternalBetaReleaseResponse.generated.swift new file mode 100644 index 00000000..f31261d2 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BackgroundAssetVersionInternalBetaReleaseResponse.generated.swift @@ -0,0 +1,30 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct BackgroundAssetVersionInternalBetaReleaseResponse: Hashable, Codable, Sendable { + public var data: BackgroundAssetVersionInternalBetaRelease + + public var included: [BackgroundAssetVersion]? + + public var links: DocumentLinks + + public init( + data: BackgroundAssetVersionInternalBetaRelease, + included: [BackgroundAssetVersion]? = nil, + links: DocumentLinks + ) { + self.data = data + self.included = included + self.links = links + } + + private enum CodingKeys: String, CodingKey { + case data + case included + case links + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BackgroundAssetVersionResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BackgroundAssetVersionResponse.generated.swift new file mode 100644 index 00000000..15ca83f8 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BackgroundAssetVersionResponse.generated.swift @@ -0,0 +1,62 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct BackgroundAssetVersionResponse: Hashable, Codable, Sendable { + public var data: BackgroundAssetVersion + + public var included: [Included]? + + public var links: DocumentLinks + + public init( + data: BackgroundAssetVersion, + included: [Included]? = nil, + links: DocumentLinks + ) { + self.data = data + self.included = included + self.links = links + } + + private enum CodingKeys: String, CodingKey { + case data + case included + case links + } + + public enum Included: Hashable, Codable, Sendable { + case backgroundAssetVersionInternalBetaRelease(BackgroundAssetVersionInternalBetaRelease) + case backgroundAssetUploadFile(BackgroundAssetUploadFile) + + public init(from decoder: Decoder) throws { + self = try { + var lastError: Error! + do { + return .backgroundAssetVersionInternalBetaRelease(try BackgroundAssetVersionInternalBetaRelease(from: decoder)) + } catch { + lastError = error + } + do { + return .backgroundAssetUploadFile(try BackgroundAssetUploadFile(from: decoder)) + } catch { + lastError = error + } + throw lastError + }() + } + + public func encode(to encoder: Encoder) throws { + switch self { + case .backgroundAssetVersionInternalBetaRelease(let value): + try value.encode(to: encoder) + + case .backgroundAssetUploadFile(let value): + try value.encode(to: encoder) + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BackgroundAssetVersionsLinkagesResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BackgroundAssetVersionsLinkagesResponse.generated.swift new file mode 100644 index 00000000..be77671c --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BackgroundAssetVersionsLinkagesResponse.generated.swift @@ -0,0 +1,53 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct BackgroundAssetVersionsLinkagesResponse: Hashable, Codable, Sendable { + public var data: [Data] + + public var links: PagedDocumentLinks + + public var meta: PagingInformation? + + public init( + data: [Data], + links: PagedDocumentLinks, + meta: PagingInformation? = nil + ) { + self.data = data + self.links = links + self.meta = meta + } + + private enum CodingKeys: String, CodingKey { + case data + case links + case meta + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case backgroundAssetVersions + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BackgroundAssetVersionsResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BackgroundAssetVersionsResponse.generated.swift new file mode 100644 index 00000000..7381126f --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BackgroundAssetVersionsResponse.generated.swift @@ -0,0 +1,67 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct BackgroundAssetVersionsResponse: Hashable, Codable, Sendable { + public var data: [BackgroundAssetVersion] + + public var included: [Included]? + + public var links: PagedDocumentLinks + + public var meta: PagingInformation? + + public init( + data: [BackgroundAssetVersion], + included: [Included]? = nil, + links: PagedDocumentLinks, + meta: PagingInformation? = nil + ) { + self.data = data + self.included = included + self.links = links + self.meta = meta + } + + private enum CodingKeys: String, CodingKey { + case data + case included + case links + case meta + } + + public enum Included: Hashable, Codable, Sendable { + case backgroundAssetVersionInternalBetaRelease(BackgroundAssetVersionInternalBetaRelease) + case backgroundAssetUploadFile(BackgroundAssetUploadFile) + + public init(from decoder: Decoder) throws { + self = try { + var lastError: Error! + do { + return .backgroundAssetVersionInternalBetaRelease(try BackgroundAssetVersionInternalBetaRelease(from: decoder)) + } catch { + lastError = error + } + do { + return .backgroundAssetUploadFile(try BackgroundAssetUploadFile(from: decoder)) + } catch { + lastError = error + } + throw lastError + }() + } + + public func encode(to encoder: Encoder) throws { + switch self { + case .backgroundAssetVersionInternalBetaRelease(let value): + try value.encode(to: encoder) + + case .backgroundAssetUploadFile(let value): + try value.encode(to: encoder) + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BackgroundAssetsResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BackgroundAssetsResponse.generated.swift new file mode 100644 index 00000000..79d57b46 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BackgroundAssetsResponse.generated.swift @@ -0,0 +1,35 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct BackgroundAssetsResponse: Hashable, Codable, Sendable { + public var data: [BackgroundAsset] + + public var included: [BackgroundAssetVersion]? + + public var links: PagedDocumentLinks + + public var meta: PagingInformation? + + public init( + data: [BackgroundAsset], + included: [BackgroundAssetVersion]? = nil, + links: PagedDocumentLinks, + meta: PagingInformation? = nil + ) { + self.data = data + self.included = included + self.links = links + self.meta = meta + } + + private enum CodingKeys: String, CodingKey { + case data + case included + case links + case meta + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BetaAppClipInvocationLocalizationResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BetaAppClipInvocationLocalizationResponse.generated.swift index d044c58e..ab99016f 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BetaAppClipInvocationLocalizationResponse.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BetaAppClipInvocationLocalizationResponse.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct BetaAppClipInvocationLocalizationResponse: Hashable, Codable { +public struct BetaAppClipInvocationLocalizationResponse: Hashable, Codable, Sendable { public var data: BetaAppClipInvocationLocalization public var links: DocumentLinks diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BetaAppClipInvocationResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BetaAppClipInvocationResponse.generated.swift index 1582822e..e7229201 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BetaAppClipInvocationResponse.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BetaAppClipInvocationResponse.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct BetaAppClipInvocationResponse: Hashable, Codable { +public struct BetaAppClipInvocationResponse: Hashable, Codable, Sendable { public var data: BetaAppClipInvocation public var included: [BetaAppClipInvocationLocalization]? diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BetaAppClipInvocationsResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BetaAppClipInvocationsResponse.generated.swift index 6dc36948..6f7085b9 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BetaAppClipInvocationsResponse.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BetaAppClipInvocationsResponse.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct BetaAppClipInvocationsResponse: Hashable, Codable { +public struct BetaAppClipInvocationsResponse: Hashable, Codable, Sendable { public var data: [BetaAppClipInvocation] public var included: [BetaAppClipInvocationLocalization]? diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BetaAppLocalizationAppLinkageResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BetaAppLocalizationAppLinkageResponse.generated.swift new file mode 100644 index 00000000..c028a4c9 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BetaAppLocalizationAppLinkageResponse.generated.swift @@ -0,0 +1,48 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct BetaAppLocalizationAppLinkageResponse: Hashable, Codable, Sendable { + public var data: Data + + public var links: DocumentLinks + + public init( + data: Data, + links: DocumentLinks + ) { + self.data = data + self.links = links + } + + private enum CodingKeys: String, CodingKey { + case data + case links + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case apps + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BetaAppLocalizationResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BetaAppLocalizationResponse.generated.swift index 90188fb7..83f76288 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BetaAppLocalizationResponse.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BetaAppLocalizationResponse.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct BetaAppLocalizationResponse: Hashable, Codable { +public struct BetaAppLocalizationResponse: Hashable, Codable, Sendable { public var data: BetaAppLocalization public var included: [App]? diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BetaAppLocalizationsResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BetaAppLocalizationsResponse.generated.swift index 729f7a93..031fa49c 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BetaAppLocalizationsResponse.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BetaAppLocalizationsResponse.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct BetaAppLocalizationsResponse: Hashable, Codable { +public struct BetaAppLocalizationsResponse: Hashable, Codable, Sendable { public var data: [BetaAppLocalization] public var included: [App]? diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BetaAppLocalizationsWithoutIncludesResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BetaAppLocalizationsWithoutIncludesResponse.generated.swift index b36cfb47..c2af7f30 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BetaAppLocalizationsWithoutIncludesResponse.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BetaAppLocalizationsWithoutIncludesResponse.generated.swift @@ -3,15 +3,15 @@ // swiftlint:disable all import Foundation -public struct BetaAppLocalizationsWithoutIncludesResponse: Hashable, Codable { - public var data: [App] +public struct BetaAppLocalizationsWithoutIncludesResponse: Hashable, Codable, Sendable { + public var data: [BetaAppLocalization] public var links: PagedDocumentLinks public var meta: PagingInformation? public init( - data: [App], + data: [BetaAppLocalization], links: PagedDocumentLinks, meta: PagingInformation? = nil ) { diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BetaAppReviewDetailAppLinkageResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BetaAppReviewDetailAppLinkageResponse.generated.swift new file mode 100644 index 00000000..1cd4c958 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BetaAppReviewDetailAppLinkageResponse.generated.swift @@ -0,0 +1,48 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct BetaAppReviewDetailAppLinkageResponse: Hashable, Codable, Sendable { + public var data: Data + + public var links: DocumentLinks + + public init( + data: Data, + links: DocumentLinks + ) { + self.data = data + self.links = links + } + + private enum CodingKeys: String, CodingKey { + case data + case links + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case apps + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BetaAppReviewDetailResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BetaAppReviewDetailResponse.generated.swift index 0adf5f07..8ae7f87a 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BetaAppReviewDetailResponse.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BetaAppReviewDetailResponse.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct BetaAppReviewDetailResponse: Hashable, Codable { +public struct BetaAppReviewDetailResponse: Hashable, Codable, Sendable { public var data: BetaAppReviewDetail public var included: [App]? diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BetaAppReviewDetailWithoutIncludesResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BetaAppReviewDetailWithoutIncludesResponse.generated.swift index 880d3a6f..a8c04a04 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BetaAppReviewDetailWithoutIncludesResponse.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BetaAppReviewDetailWithoutIncludesResponse.generated.swift @@ -3,13 +3,13 @@ // swiftlint:disable all import Foundation -public struct BetaAppReviewDetailWithoutIncludesResponse: Hashable, Codable { - public var data: App +public struct BetaAppReviewDetailWithoutIncludesResponse: Hashable, Codable, Sendable { + public var data: BetaAppReviewDetail public var links: DocumentLinks public init( - data: App, + data: BetaAppReviewDetail, links: DocumentLinks ) { self.data = data diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BetaAppReviewDetailsResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BetaAppReviewDetailsResponse.generated.swift index 359d251b..b339aa27 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BetaAppReviewDetailsResponse.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BetaAppReviewDetailsResponse.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct BetaAppReviewDetailsResponse: Hashable, Codable { +public struct BetaAppReviewDetailsResponse: Hashable, Codable, Sendable { public var data: [BetaAppReviewDetail] public var included: [App]? diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BetaAppReviewSubmissionBuildLinkageResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BetaAppReviewSubmissionBuildLinkageResponse.generated.swift new file mode 100644 index 00000000..f07663b4 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BetaAppReviewSubmissionBuildLinkageResponse.generated.swift @@ -0,0 +1,48 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct BetaAppReviewSubmissionBuildLinkageResponse: Hashable, Codable, Sendable { + public var data: Data + + public var links: DocumentLinks + + public init( + data: Data, + links: DocumentLinks + ) { + self.data = data + self.links = links + } + + private enum CodingKeys: String, CodingKey { + case data + case links + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case builds + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BetaAppReviewSubmissionResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BetaAppReviewSubmissionResponse.generated.swift index d270920f..e420c669 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BetaAppReviewSubmissionResponse.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BetaAppReviewSubmissionResponse.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct BetaAppReviewSubmissionResponse: Hashable, Codable { +public struct BetaAppReviewSubmissionResponse: Hashable, Codable, Sendable { public var data: BetaAppReviewSubmission public var included: [Build]? diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BetaAppReviewSubmissionWithoutIncludesResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BetaAppReviewSubmissionWithoutIncludesResponse.generated.swift index 8ceafcff..89937999 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BetaAppReviewSubmissionWithoutIncludesResponse.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BetaAppReviewSubmissionWithoutIncludesResponse.generated.swift @@ -3,13 +3,13 @@ // swiftlint:disable all import Foundation -public struct BetaAppReviewSubmissionWithoutIncludesResponse: Hashable, Codable { - public var data: Build +public struct BetaAppReviewSubmissionWithoutIncludesResponse: Hashable, Codable, Sendable { + public var data: BetaAppReviewSubmission public var links: DocumentLinks public init( - data: Build, + data: BetaAppReviewSubmission, links: DocumentLinks ) { self.data = data diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BetaAppReviewSubmissionsResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BetaAppReviewSubmissionsResponse.generated.swift index 3570258c..74350f08 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BetaAppReviewSubmissionsResponse.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BetaAppReviewSubmissionsResponse.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct BetaAppReviewSubmissionsResponse: Hashable, Codable { +public struct BetaAppReviewSubmissionsResponse: Hashable, Codable, Sendable { public var data: [BetaAppReviewSubmission] public var included: [Build]? diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BetaBuildLocalizationBuildLinkageResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BetaBuildLocalizationBuildLinkageResponse.generated.swift new file mode 100644 index 00000000..37e1ac14 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BetaBuildLocalizationBuildLinkageResponse.generated.swift @@ -0,0 +1,48 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct BetaBuildLocalizationBuildLinkageResponse: Hashable, Codable, Sendable { + public var data: Data + + public var links: DocumentLinks + + public init( + data: Data, + links: DocumentLinks + ) { + self.data = data + self.links = links + } + + private enum CodingKeys: String, CodingKey { + case data + case links + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case builds + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BetaBuildLocalizationResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BetaBuildLocalizationResponse.generated.swift index 09e2a09a..3f54511b 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BetaBuildLocalizationResponse.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BetaBuildLocalizationResponse.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct BetaBuildLocalizationResponse: Hashable, Codable { +public struct BetaBuildLocalizationResponse: Hashable, Codable, Sendable { public var data: BetaBuildLocalization public var included: [Build]? diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BetaBuildLocalizationsResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BetaBuildLocalizationsResponse.generated.swift index a5dd6eb4..b797f22d 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BetaBuildLocalizationsResponse.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BetaBuildLocalizationsResponse.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct BetaBuildLocalizationsResponse: Hashable, Codable { +public struct BetaBuildLocalizationsResponse: Hashable, Codable, Sendable { public var data: [BetaBuildLocalization] public var included: [Build]? diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BetaBuildLocalizationsWithoutIncludesResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BetaBuildLocalizationsWithoutIncludesResponse.generated.swift index d8211c39..9f1bbcc5 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BetaBuildLocalizationsWithoutIncludesResponse.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BetaBuildLocalizationsWithoutIncludesResponse.generated.swift @@ -3,15 +3,15 @@ // swiftlint:disable all import Foundation -public struct BetaBuildLocalizationsWithoutIncludesResponse: Hashable, Codable { - public var data: [Build] +public struct BetaBuildLocalizationsWithoutIncludesResponse: Hashable, Codable, Sendable { + public var data: [BetaBuildLocalization] public var links: PagedDocumentLinks public var meta: PagingInformation? public init( - data: [Build], + data: [BetaBuildLocalization], links: PagedDocumentLinks, meta: PagingInformation? = nil ) { diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BetaBuildUsagesV1MetricResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BetaBuildUsagesV1MetricResponse.generated.swift index 0d4fee3c..2041255b 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BetaBuildUsagesV1MetricResponse.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BetaBuildUsagesV1MetricResponse.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct BetaBuildUsagesV1MetricResponse: Hashable, Codable { +public struct BetaBuildUsagesV1MetricResponse: Hashable, Codable, Sendable { public var data: [Data] public var links: PagedDocumentLinks @@ -26,25 +26,18 @@ public struct BetaBuildUsagesV1MetricResponse: Hashable, Codable { case meta } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var dataPoints: DataPoints? - public var dimensions: Dimensions? - - public init( - dataPoints: DataPoints? = nil, - dimensions: Dimensions? = nil - ) { + public init(dataPoints: DataPoints? = nil) { self.dataPoints = dataPoints - self.dimensions = dimensions } private enum CodingKeys: String, CodingKey { case dataPoints - case dimensions } - public struct DataPoints: Hashable, Codable { + public struct DataPoints: Hashable, Codable, Sendable { public var end: String? public var start: String? @@ -67,7 +60,7 @@ public struct BetaBuildUsagesV1MetricResponse: Hashable, Codable { case values } - public struct Values: Hashable, Codable { + public struct Values: Hashable, Codable, Sendable { public var crashCount: Int? public var feedbackCount: Int? @@ -101,42 +94,6 @@ public struct BetaBuildUsagesV1MetricResponse: Hashable, Codable { } } } - - public struct Dimensions: Hashable, Codable { - public var bundleIds: BundleIds? - - public init(bundleIds: BundleIds? = nil) { - self.bundleIds = bundleIds - } - - private enum CodingKeys: String, CodingKey { - case bundleIds - } - - public struct BundleIds: Hashable, Codable { - public var links: Links? - - public init(links: Links? = nil) { - self.links = links - } - - private enum CodingKeys: String, CodingKey { - case links - } - - public struct Links: Hashable, Codable { - public var groupBy: URL? - - public init(groupBy: URL? = nil) { - self.groupBy = groupBy - } - - private enum CodingKeys: String, CodingKey { - case groupBy - } - } - } - } } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppPreOrderWithoutIncludesResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BetaCrashLogResponse.generated.swift similarity index 72% rename from Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppPreOrderWithoutIncludesResponse.generated.swift rename to Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BetaCrashLogResponse.generated.swift index 21b35cb7..20af9893 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppPreOrderWithoutIncludesResponse.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BetaCrashLogResponse.generated.swift @@ -3,13 +3,13 @@ // swiftlint:disable all import Foundation -public struct AppPreOrderWithoutIncludesResponse: Hashable, Codable { - public var data: App +public struct BetaCrashLogResponse: Hashable, Codable, Sendable { + public var data: BetaCrashLog public var links: DocumentLinks public init( - data: App, + data: BetaCrashLog, links: DocumentLinks ) { self.data = data diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BetaFeedbackCrashSubmissionCrashLogLinkageResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BetaFeedbackCrashSubmissionCrashLogLinkageResponse.generated.swift new file mode 100644 index 00000000..c48d0b53 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BetaFeedbackCrashSubmissionCrashLogLinkageResponse.generated.swift @@ -0,0 +1,48 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct BetaFeedbackCrashSubmissionCrashLogLinkageResponse: Hashable, Codable, Sendable { + public var data: Data + + public var links: DocumentLinks + + public init( + data: Data, + links: DocumentLinks + ) { + self.data = data + self.links = links + } + + private enum CodingKeys: String, CodingKey { + case data + case links + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case betaCrashLogs + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppPriceResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BetaFeedbackCrashSubmissionResponse.generated.swift similarity index 67% rename from Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppPriceResponse.generated.swift rename to Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BetaFeedbackCrashSubmissionResponse.generated.swift index 83b4dfa0..7eab2bba 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppPriceResponse.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BetaFeedbackCrashSubmissionResponse.generated.swift @@ -3,15 +3,15 @@ // swiftlint:disable all import Foundation -public struct AppPriceResponse: Hashable, Codable { - public var data: AppPrice +public struct BetaFeedbackCrashSubmissionResponse: Hashable, Codable, Sendable { + public var data: BetaFeedbackCrashSubmission public var included: [Included]? public var links: DocumentLinks public init( - data: AppPrice, + data: BetaFeedbackCrashSubmission, included: [Included]? = nil, links: DocumentLinks ) { @@ -26,20 +26,20 @@ public struct AppPriceResponse: Hashable, Codable { case links } - public enum Included: Hashable, Codable { - case app(App) - case appPriceTier(AppPriceTier) + public enum Included: Hashable, Codable, Sendable { + case build(Build) + case betaTester(BetaTester) public init(from decoder: Decoder) throws { self = try { var lastError: Error! do { - return .app(try App(from: decoder)) + return .build(try Build(from: decoder)) } catch { lastError = error } do { - return .appPriceTier(try AppPriceTier(from: decoder)) + return .betaTester(try BetaTester(from: decoder)) } catch { lastError = error } @@ -49,10 +49,10 @@ public struct AppPriceResponse: Hashable, Codable { public func encode(to encoder: Encoder) throws { switch self { - case .app(let value): + case .build(let value): try value.encode(to: encoder) - case .appPriceTier(let value): + case .betaTester(let value): try value.encode(to: encoder) } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppPricesResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BetaFeedbackCrashSubmissionsResponse.generated.swift similarity index 70% rename from Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppPricesResponse.generated.swift rename to Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BetaFeedbackCrashSubmissionsResponse.generated.swift index 592925b1..46cafd12 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppPricesResponse.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BetaFeedbackCrashSubmissionsResponse.generated.swift @@ -3,8 +3,8 @@ // swiftlint:disable all import Foundation -public struct AppPricesResponse: Hashable, Codable { - public var data: [AppPrice] +public struct BetaFeedbackCrashSubmissionsResponse: Hashable, Codable, Sendable { + public var data: [BetaFeedbackCrashSubmission] public var included: [Included]? @@ -13,7 +13,7 @@ public struct AppPricesResponse: Hashable, Codable { public var meta: PagingInformation? public init( - data: [AppPrice], + data: [BetaFeedbackCrashSubmission], included: [Included]? = nil, links: PagedDocumentLinks, meta: PagingInformation? = nil @@ -31,20 +31,20 @@ public struct AppPricesResponse: Hashable, Codable { case meta } - public enum Included: Hashable, Codable { - case app(App) - case appPriceTier(AppPriceTier) + public enum Included: Hashable, Codable, Sendable { + case build(Build) + case betaTester(BetaTester) public init(from decoder: Decoder) throws { self = try { var lastError: Error! do { - return .app(try App(from: decoder)) + return .build(try Build(from: decoder)) } catch { lastError = error } do { - return .appPriceTier(try AppPriceTier(from: decoder)) + return .betaTester(try BetaTester(from: decoder)) } catch { lastError = error } @@ -54,10 +54,10 @@ public struct AppPricesResponse: Hashable, Codable { public func encode(to encoder: Encoder) throws { switch self { - case .app(let value): + case .build(let value): try value.encode(to: encoder) - case .appPriceTier(let value): + case .betaTester(let value): try value.encode(to: encoder) } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppPricePointResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BetaFeedbackScreenshotSubmissionResponse.generated.swift similarity index 67% rename from Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppPricePointResponse.generated.swift rename to Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BetaFeedbackScreenshotSubmissionResponse.generated.swift index feb42a0f..4797f100 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppPricePointResponse.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BetaFeedbackScreenshotSubmissionResponse.generated.swift @@ -3,15 +3,15 @@ // swiftlint:disable all import Foundation -public struct AppPricePointResponse: Hashable, Codable { - public var data: AppPricePoint +public struct BetaFeedbackScreenshotSubmissionResponse: Hashable, Codable, Sendable { + public var data: BetaFeedbackScreenshotSubmission public var included: [Included]? public var links: DocumentLinks public init( - data: AppPricePoint, + data: BetaFeedbackScreenshotSubmission, included: [Included]? = nil, links: DocumentLinks ) { @@ -26,20 +26,20 @@ public struct AppPricePointResponse: Hashable, Codable { case links } - public enum Included: Hashable, Codable { - case appPriceTier(AppPriceTier) - case territory(Territory) + public enum Included: Hashable, Codable, Sendable { + case build(Build) + case betaTester(BetaTester) public init(from decoder: Decoder) throws { self = try { var lastError: Error! do { - return .appPriceTier(try AppPriceTier(from: decoder)) + return .build(try Build(from: decoder)) } catch { lastError = error } do { - return .territory(try Territory(from: decoder)) + return .betaTester(try BetaTester(from: decoder)) } catch { lastError = error } @@ -49,10 +49,10 @@ public struct AppPricePointResponse: Hashable, Codable { public func encode(to encoder: Encoder) throws { switch self { - case .appPriceTier(let value): + case .build(let value): try value.encode(to: encoder) - case .territory(let value): + case .betaTester(let value): try value.encode(to: encoder) } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BetaFeedbackScreenshotSubmissionsResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BetaFeedbackScreenshotSubmissionsResponse.generated.swift new file mode 100644 index 00000000..49ac56ea --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BetaFeedbackScreenshotSubmissionsResponse.generated.swift @@ -0,0 +1,67 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct BetaFeedbackScreenshotSubmissionsResponse: Hashable, Codable, Sendable { + public var data: [BetaFeedbackScreenshotSubmission] + + public var included: [Included]? + + public var links: PagedDocumentLinks + + public var meta: PagingInformation? + + public init( + data: [BetaFeedbackScreenshotSubmission], + included: [Included]? = nil, + links: PagedDocumentLinks, + meta: PagingInformation? = nil + ) { + self.data = data + self.included = included + self.links = links + self.meta = meta + } + + private enum CodingKeys: String, CodingKey { + case data + case included + case links + case meta + } + + public enum Included: Hashable, Codable, Sendable { + case build(Build) + case betaTester(BetaTester) + + public init(from decoder: Decoder) throws { + self = try { + var lastError: Error! + do { + return .build(try Build(from: decoder)) + } catch { + lastError = error + } + do { + return .betaTester(try BetaTester(from: decoder)) + } catch { + lastError = error + } + throw lastError + }() + } + + public func encode(to encoder: Encoder) throws { + switch self { + case .build(let value): + try value.encode(to: encoder) + + case .betaTester(let value): + try value.encode(to: encoder) + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BetaGroupAppLinkageResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BetaGroupAppLinkageResponse.generated.swift new file mode 100644 index 00000000..fd658eab --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BetaGroupAppLinkageResponse.generated.swift @@ -0,0 +1,48 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct BetaGroupAppLinkageResponse: Hashable, Codable, Sendable { + public var data: Data + + public var links: DocumentLinks + + public init( + data: Data, + links: DocumentLinks + ) { + self.data = data + self.links = links + } + + private enum CodingKeys: String, CodingKey { + case data + case links + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case apps + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BetaGroupBetaRecruitmentCriteriaLinkageResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BetaGroupBetaRecruitmentCriteriaLinkageResponse.generated.swift new file mode 100644 index 00000000..c4cdf233 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BetaGroupBetaRecruitmentCriteriaLinkageResponse.generated.swift @@ -0,0 +1,48 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct BetaGroupBetaRecruitmentCriteriaLinkageResponse: Hashable, Codable, Sendable { + public var data: Data + + public var links: DocumentLinks + + public init( + data: Data, + links: DocumentLinks + ) { + self.data = data + self.links = links + } + + private enum CodingKeys: String, CodingKey { + case data + case links + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case betaRecruitmentCriteria + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BetaGroupBetaRecruitmentCriterionCompatibleBuildCheckLinkageResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BetaGroupBetaRecruitmentCriterionCompatibleBuildCheckLinkageResponse.generated.swift new file mode 100644 index 00000000..92e3ab06 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BetaGroupBetaRecruitmentCriterionCompatibleBuildCheckLinkageResponse.generated.swift @@ -0,0 +1,48 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct BetaGroupBetaRecruitmentCriterionCompatibleBuildCheckLinkageResponse: Hashable, Codable, Sendable { + public var data: Data + + public var links: DocumentLinks + + public init( + data: Data, + links: DocumentLinks + ) { + self.data = data + self.links = links + } + + private enum CodingKeys: String, CodingKey { + case data + case links + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case betaRecruitmentCriterionCompatibleBuildChecks + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BetaGroupBetaTestersLinkagesResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BetaGroupBetaTestersLinkagesResponse.generated.swift index 817d3c13..eeb82e4d 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BetaGroupBetaTestersLinkagesResponse.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BetaGroupBetaTestersLinkagesResponse.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct BetaGroupBetaTestersLinkagesResponse: Hashable, Codable { +public struct BetaGroupBetaTestersLinkagesResponse: Hashable, Codable, Sendable { public var data: [Data] public var links: PagedDocumentLinks @@ -26,7 +26,7 @@ public struct BetaGroupBetaTestersLinkagesResponse: Hashable, Codable { case meta } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -44,7 +44,7 @@ public struct BetaGroupBetaTestersLinkagesResponse: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case betaTesters } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BetaGroupBuildsLinkagesResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BetaGroupBuildsLinkagesResponse.generated.swift index f906fe8d..f4596047 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BetaGroupBuildsLinkagesResponse.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BetaGroupBuildsLinkagesResponse.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct BetaGroupBuildsLinkagesResponse: Hashable, Codable { +public struct BetaGroupBuildsLinkagesResponse: Hashable, Codable, Sendable { public var data: [Data] public var links: PagedDocumentLinks @@ -26,7 +26,7 @@ public struct BetaGroupBuildsLinkagesResponse: Hashable, Codable { case meta } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -44,7 +44,7 @@ public struct BetaGroupBuildsLinkagesResponse: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case builds } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BetaGroupResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BetaGroupResponse.generated.swift index 55bdf397..60ed2d1f 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BetaGroupResponse.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BetaGroupResponse.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct BetaGroupResponse: Hashable, Codable { +public struct BetaGroupResponse: Hashable, Codable, Sendable { public var data: BetaGroup public var included: [Included]? @@ -26,10 +26,11 @@ public struct BetaGroupResponse: Hashable, Codable { case links } - public enum Included: Hashable, Codable { + public enum Included: Hashable, Codable, Sendable { case app(App) case build(Build) case betaTester(BetaTester) + case betaRecruitmentCriterion(BetaRecruitmentCriterion) public init(from decoder: Decoder) throws { self = try { @@ -49,6 +50,11 @@ public struct BetaGroupResponse: Hashable, Codable { } catch { lastError = error } + do { + return .betaRecruitmentCriterion(try BetaRecruitmentCriterion(from: decoder)) + } catch { + lastError = error + } throw lastError }() } @@ -63,6 +69,9 @@ public struct BetaGroupResponse: Hashable, Codable { case .betaTester(let value): try value.encode(to: encoder) + + case .betaRecruitmentCriterion(let value): + try value.encode(to: encoder) } } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BetaGroupsResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BetaGroupsResponse.generated.swift index 1cfd64ee..a187f335 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BetaGroupsResponse.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BetaGroupsResponse.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct BetaGroupsResponse: Hashable, Codable { +public struct BetaGroupsResponse: Hashable, Codable, Sendable { public var data: [BetaGroup] public var included: [Included]? @@ -31,10 +31,11 @@ public struct BetaGroupsResponse: Hashable, Codable { case meta } - public enum Included: Hashable, Codable { + public enum Included: Hashable, Codable, Sendable { case app(App) case build(Build) case betaTester(BetaTester) + case betaRecruitmentCriterion(BetaRecruitmentCriterion) public init(from decoder: Decoder) throws { self = try { @@ -54,6 +55,11 @@ public struct BetaGroupsResponse: Hashable, Codable { } catch { lastError = error } + do { + return .betaRecruitmentCriterion(try BetaRecruitmentCriterion(from: decoder)) + } catch { + lastError = error + } throw lastError }() } @@ -68,6 +74,9 @@ public struct BetaGroupsResponse: Hashable, Codable { case .betaTester(let value): try value.encode(to: encoder) + + case .betaRecruitmentCriterion(let value): + try value.encode(to: encoder) } } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BetaGroupsWithoutIncludesResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BetaGroupsWithoutIncludesResponse.generated.swift index 2add13cb..a1b283bd 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BetaGroupsWithoutIncludesResponse.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BetaGroupsWithoutIncludesResponse.generated.swift @@ -3,15 +3,15 @@ // swiftlint:disable all import Foundation -public struct BetaGroupsWithoutIncludesResponse: Hashable, Codable { - public var data: [BetaTester] +public struct BetaGroupsWithoutIncludesResponse: Hashable, Codable, Sendable { + public var data: [BetaGroup] public var links: PagedDocumentLinks public var meta: PagingInformation? public init( - data: [BetaTester], + data: [BetaGroup], links: PagedDocumentLinks, meta: PagingInformation? = nil ) { diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BetaLicenseAgreementAppLinkageResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BetaLicenseAgreementAppLinkageResponse.generated.swift new file mode 100644 index 00000000..4cbcda2f --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BetaLicenseAgreementAppLinkageResponse.generated.swift @@ -0,0 +1,48 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct BetaLicenseAgreementAppLinkageResponse: Hashable, Codable, Sendable { + public var data: Data + + public var links: DocumentLinks + + public init( + data: Data, + links: DocumentLinks + ) { + self.data = data + self.links = links + } + + private enum CodingKeys: String, CodingKey { + case data + case links + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case apps + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BetaLicenseAgreementResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BetaLicenseAgreementResponse.generated.swift index 66e49e19..5474f599 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BetaLicenseAgreementResponse.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BetaLicenseAgreementResponse.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct BetaLicenseAgreementResponse: Hashable, Codable { +public struct BetaLicenseAgreementResponse: Hashable, Codable, Sendable { public var data: BetaLicenseAgreement public var included: [App]? diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BetaLicenseAgreementWithoutIncludesResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BetaLicenseAgreementWithoutIncludesResponse.generated.swift index 8cf74ac3..9d30db09 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BetaLicenseAgreementWithoutIncludesResponse.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BetaLicenseAgreementWithoutIncludesResponse.generated.swift @@ -3,13 +3,13 @@ // swiftlint:disable all import Foundation -public struct BetaLicenseAgreementWithoutIncludesResponse: Hashable, Codable { - public var data: App +public struct BetaLicenseAgreementWithoutIncludesResponse: Hashable, Codable, Sendable { + public var data: BetaLicenseAgreement public var links: DocumentLinks public init( - data: App, + data: BetaLicenseAgreement, links: DocumentLinks ) { self.data = data diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BetaLicenseAgreementsResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BetaLicenseAgreementsResponse.generated.swift index 571b0791..07c07016 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BetaLicenseAgreementsResponse.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BetaLicenseAgreementsResponse.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct BetaLicenseAgreementsResponse: Hashable, Codable { +public struct BetaLicenseAgreementsResponse: Hashable, Codable, Sendable { public var data: [BetaLicenseAgreement] public var included: [App]? diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BetaPublicLinkUsagesV1MetricResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BetaPublicLinkUsagesV1MetricResponse.generated.swift new file mode 100644 index 00000000..3f1143cd --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BetaPublicLinkUsagesV1MetricResponse.generated.swift @@ -0,0 +1,110 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct BetaPublicLinkUsagesV1MetricResponse: Hashable, Codable, Sendable { + public var data: [Data] + + public var links: PagedDocumentLinks + + public var meta: PagingInformation? + + public init( + data: [Data], + links: PagedDocumentLinks, + meta: PagingInformation? = nil + ) { + self.data = data + self.links = links + self.meta = meta + } + + private enum CodingKeys: String, CodingKey { + case data + case links + case meta + } + + public struct Data: Hashable, Codable, Sendable { + public var dataPoints: DataPoints? + + public init(dataPoints: DataPoints? = nil) { + self.dataPoints = dataPoints + } + + private enum CodingKeys: String, CodingKey { + case dataPoints + } + + public struct DataPoints: Hashable, Codable, Sendable { + public var end: String? + + public var start: String? + + public var values: Values? + + public init( + end: String? = nil, + start: String? = nil, + values: Values? = nil + ) { + self.end = end + self.start = start + self.values = values + } + + private enum CodingKeys: String, CodingKey { + case end + case start + case values + } + + public struct Values: Hashable, Codable, Sendable { + public var acceptedCount: Int? + + public var didNotAcceptCount: Int? + + public var didNotMeetCriteriaCount: Int? + + public var notClearRatio: Float? + + public var notInterestingRatio: Float? + + public var notRelevantRatio: Float? + + public var viewCount: Int? + + public init( + acceptedCount: Int? = nil, + didNotAcceptCount: Int? = nil, + didNotMeetCriteriaCount: Int? = nil, + notClearRatio: Float? = nil, + notInterestingRatio: Float? = nil, + notRelevantRatio: Float? = nil, + viewCount: Int? = nil + ) { + self.acceptedCount = acceptedCount + self.didNotAcceptCount = didNotAcceptCount + self.didNotMeetCriteriaCount = didNotMeetCriteriaCount + self.notClearRatio = notClearRatio + self.notInterestingRatio = notInterestingRatio + self.notRelevantRatio = notRelevantRatio + self.viewCount = viewCount + } + + private enum CodingKeys: String, CodingKey { + case acceptedCount + case didNotAcceptCount + case didNotMeetCriteriaCount + case notClearRatio + case notInterestingRatio + case notRelevantRatio + case viewCount + } + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BetaRecruitmentCriterionCompatibleBuildCheckResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BetaRecruitmentCriterionCompatibleBuildCheckResponse.generated.swift new file mode 100644 index 00000000..7938afb1 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BetaRecruitmentCriterionCompatibleBuildCheckResponse.generated.swift @@ -0,0 +1,25 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct BetaRecruitmentCriterionCompatibleBuildCheckResponse: Hashable, Codable, Sendable { + public var data: BetaRecruitmentCriterionCompatibleBuildCheck + + public var links: DocumentLinks + + public init( + data: BetaRecruitmentCriterionCompatibleBuildCheck, + links: DocumentLinks + ) { + self.data = data + self.links = links + } + + private enum CodingKeys: String, CodingKey { + case data + case links + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BetaRecruitmentCriterionOptionsResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BetaRecruitmentCriterionOptionsResponse.generated.swift new file mode 100644 index 00000000..1e32800a --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BetaRecruitmentCriterionOptionsResponse.generated.swift @@ -0,0 +1,30 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct BetaRecruitmentCriterionOptionsResponse: Hashable, Codable, Sendable { + public var data: [BetaRecruitmentCriterionOption] + + public var links: PagedDocumentLinks + + public var meta: PagingInformation? + + public init( + data: [BetaRecruitmentCriterionOption], + links: PagedDocumentLinks, + meta: PagingInformation? = nil + ) { + self.data = data + self.links = links + self.meta = meta + } + + private enum CodingKeys: String, CodingKey { + case data + case links + case meta + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BetaRecruitmentCriterionResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BetaRecruitmentCriterionResponse.generated.swift new file mode 100644 index 00000000..5d06e516 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BetaRecruitmentCriterionResponse.generated.swift @@ -0,0 +1,25 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct BetaRecruitmentCriterionResponse: Hashable, Codable, Sendable { + public var data: BetaRecruitmentCriterion + + public var links: DocumentLinks + + public init( + data: BetaRecruitmentCriterion, + links: DocumentLinks + ) { + self.data = data + self.links = links + } + + private enum CodingKeys: String, CodingKey { + case data + case links + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BetaTesterAppsLinkagesResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BetaTesterAppsLinkagesResponse.generated.swift index e3e47d5e..361f6a9d 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BetaTesterAppsLinkagesResponse.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BetaTesterAppsLinkagesResponse.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct BetaTesterAppsLinkagesResponse: Hashable, Codable { +public struct BetaTesterAppsLinkagesResponse: Hashable, Codable, Sendable { public var data: [Data] public var links: PagedDocumentLinks @@ -26,7 +26,7 @@ public struct BetaTesterAppsLinkagesResponse: Hashable, Codable { case meta } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -44,7 +44,7 @@ public struct BetaTesterAppsLinkagesResponse: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case apps } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BetaTesterBetaGroupsLinkagesResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BetaTesterBetaGroupsLinkagesResponse.generated.swift index db939c91..98b98f57 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BetaTesterBetaGroupsLinkagesResponse.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BetaTesterBetaGroupsLinkagesResponse.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct BetaTesterBetaGroupsLinkagesResponse: Hashable, Codable { +public struct BetaTesterBetaGroupsLinkagesResponse: Hashable, Codable, Sendable { public var data: [Data] public var links: PagedDocumentLinks @@ -26,7 +26,7 @@ public struct BetaTesterBetaGroupsLinkagesResponse: Hashable, Codable { case meta } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -44,7 +44,7 @@ public struct BetaTesterBetaGroupsLinkagesResponse: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case betaGroups } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BetaTesterBuildsLinkagesResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BetaTesterBuildsLinkagesResponse.generated.swift index 44227b8b..35cf56f8 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BetaTesterBuildsLinkagesResponse.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BetaTesterBuildsLinkagesResponse.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct BetaTesterBuildsLinkagesResponse: Hashable, Codable { +public struct BetaTesterBuildsLinkagesResponse: Hashable, Codable, Sendable { public var data: [Data] public var links: PagedDocumentLinks @@ -26,7 +26,7 @@ public struct BetaTesterBuildsLinkagesResponse: Hashable, Codable { case meta } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -44,7 +44,7 @@ public struct BetaTesterBuildsLinkagesResponse: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case builds } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BetaTesterInvitationResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BetaTesterInvitationResponse.generated.swift index bb3a701f..9aabb607 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BetaTesterInvitationResponse.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BetaTesterInvitationResponse.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct BetaTesterInvitationResponse: Hashable, Codable { +public struct BetaTesterInvitationResponse: Hashable, Codable, Sendable { public var data: BetaTesterInvitation public var links: DocumentLinks diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BetaTesterResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BetaTesterResponse.generated.swift index 5b06dcc7..a1599a2c 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BetaTesterResponse.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BetaTesterResponse.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct BetaTesterResponse: Hashable, Codable { +public struct BetaTesterResponse: Hashable, Codable, Sendable { public var data: BetaTester public var included: [Included]? @@ -26,7 +26,7 @@ public struct BetaTesterResponse: Hashable, Codable { case links } - public enum Included: Hashable, Codable { + public enum Included: Hashable, Codable, Sendable { case app(App) case betaGroup(BetaGroup) case build(Build) diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BetaTesterUsagesV1MetricResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BetaTesterUsagesV1MetricResponse.generated.swift index 38a016ab..f29954e9 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BetaTesterUsagesV1MetricResponse.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BetaTesterUsagesV1MetricResponse.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct BetaTesterUsagesV1MetricResponse: Hashable, Codable { +public struct BetaTesterUsagesV1MetricResponse: Hashable, Codable, Sendable { public var data: [Data] public var links: PagedDocumentLinks @@ -26,7 +26,7 @@ public struct BetaTesterUsagesV1MetricResponse: Hashable, Codable { case meta } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var dataPoints: DataPoints? public var dimensions: Dimensions? @@ -44,7 +44,7 @@ public struct BetaTesterUsagesV1MetricResponse: Hashable, Codable { case dimensions } - public struct DataPoints: Hashable, Codable { + public struct DataPoints: Hashable, Codable, Sendable { public var end: String? public var start: String? @@ -67,7 +67,7 @@ public struct BetaTesterUsagesV1MetricResponse: Hashable, Codable { case values } - public struct Values: Hashable, Codable { + public struct Values: Hashable, Codable, Sendable { public var crashCount: Int? public var feedbackCount: Int? @@ -92,7 +92,7 @@ public struct BetaTesterUsagesV1MetricResponse: Hashable, Codable { } } - public struct Dimensions: Hashable, Codable { + public struct Dimensions: Hashable, Codable, Sendable { public var apps: Apps? public init(apps: Apps? = nil) { @@ -103,18 +103,25 @@ public struct BetaTesterUsagesV1MetricResponse: Hashable, Codable { case apps } - public struct Apps: Hashable, Codable { + public struct Apps: Hashable, Codable, Sendable { + public var data: String? + public var links: Links? - public init(links: Links? = nil) { + public init( + data: String? = nil, + links: Links? = nil + ) { + self.data = data self.links = links } private enum CodingKeys: String, CodingKey { + case data case links } - public struct Links: Hashable, Codable { + public struct Links: Hashable, Codable, Sendable { public var groupBy: URL? public var related: URL? diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BetaTestersResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BetaTestersResponse.generated.swift index 370d9181..b95df36d 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BetaTestersResponse.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BetaTestersResponse.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct BetaTestersResponse: Hashable, Codable { +public struct BetaTestersResponse: Hashable, Codable, Sendable { public var data: [BetaTester] public var included: [Included]? @@ -31,7 +31,7 @@ public struct BetaTestersResponse: Hashable, Codable { case meta } - public enum Included: Hashable, Codable { + public enum Included: Hashable, Codable, Sendable { case app(App) case betaGroup(BetaGroup) case build(Build) diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BetaTestersWithoutIncludesResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BetaTestersWithoutIncludesResponse.generated.swift index cf3812cd..a705df97 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BetaTestersWithoutIncludesResponse.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BetaTestersWithoutIncludesResponse.generated.swift @@ -3,15 +3,15 @@ // swiftlint:disable all import Foundation -public struct BetaTestersWithoutIncludesResponse: Hashable, Codable { - public var data: [Build] +public struct BetaTestersWithoutIncludesResponse: Hashable, Codable, Sendable { + public var data: [BetaTester] public var links: PagedDocumentLinks public var meta: PagingInformation? public init( - data: [Build], + data: [BetaTester], links: PagedDocumentLinks, meta: PagingInformation? = nil ) { diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BuildAppEncryptionDeclarationLinkageResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BuildAppEncryptionDeclarationLinkageResponse.generated.swift index 9bf7947f..5b4ac03b 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BuildAppEncryptionDeclarationLinkageResponse.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BuildAppEncryptionDeclarationLinkageResponse.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct BuildAppEncryptionDeclarationLinkageResponse: Hashable, Codable { +public struct BuildAppEncryptionDeclarationLinkageResponse: Hashable, Codable, Sendable { public var data: Data public var links: DocumentLinks @@ -21,7 +21,7 @@ public struct BuildAppEncryptionDeclarationLinkageResponse: Hashable, Codable { case links } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -39,7 +39,7 @@ public struct BuildAppEncryptionDeclarationLinkageResponse: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case appEncryptionDeclarations } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BuildAppLinkageResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BuildAppLinkageResponse.generated.swift new file mode 100644 index 00000000..86fbab2b --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BuildAppLinkageResponse.generated.swift @@ -0,0 +1,48 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct BuildAppLinkageResponse: Hashable, Codable, Sendable { + public var data: Data + + public var links: DocumentLinks + + public init( + data: Data, + links: DocumentLinks + ) { + self.data = data + self.links = links + } + + private enum CodingKeys: String, CodingKey { + case data + case links + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case apps + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BuildAppStoreVersionLinkageResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BuildAppStoreVersionLinkageResponse.generated.swift new file mode 100644 index 00000000..67345bf5 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BuildAppStoreVersionLinkageResponse.generated.swift @@ -0,0 +1,48 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct BuildAppStoreVersionLinkageResponse: Hashable, Codable, Sendable { + public var data: Data + + public var links: DocumentLinks + + public init( + data: Data, + links: DocumentLinks + ) { + self.data = data + self.links = links + } + + private enum CodingKeys: String, CodingKey { + case data + case links + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case appStoreVersions + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BuildBetaAppReviewSubmissionLinkageResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BuildBetaAppReviewSubmissionLinkageResponse.generated.swift new file mode 100644 index 00000000..02bbda95 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BuildBetaAppReviewSubmissionLinkageResponse.generated.swift @@ -0,0 +1,48 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct BuildBetaAppReviewSubmissionLinkageResponse: Hashable, Codable, Sendable { + public var data: Data + + public var links: DocumentLinks + + public init( + data: Data, + links: DocumentLinks + ) { + self.data = data + self.links = links + } + + private enum CodingKeys: String, CodingKey { + case data + case links + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case betaAppReviewSubmissions + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BuildBetaBuildLocalizationsLinkagesResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BuildBetaBuildLocalizationsLinkagesResponse.generated.swift new file mode 100644 index 00000000..f2e94cbc --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BuildBetaBuildLocalizationsLinkagesResponse.generated.swift @@ -0,0 +1,53 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct BuildBetaBuildLocalizationsLinkagesResponse: Hashable, Codable, Sendable { + public var data: [Data] + + public var links: PagedDocumentLinks + + public var meta: PagingInformation? + + public init( + data: [Data], + links: PagedDocumentLinks, + meta: PagingInformation? = nil + ) { + self.data = data + self.links = links + self.meta = meta + } + + private enum CodingKeys: String, CodingKey { + case data + case links + case meta + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case betaBuildLocalizations + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BuildBetaDetailBuildLinkageResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BuildBetaDetailBuildLinkageResponse.generated.swift new file mode 100644 index 00000000..9f440b32 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BuildBetaDetailBuildLinkageResponse.generated.swift @@ -0,0 +1,48 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct BuildBetaDetailBuildLinkageResponse: Hashable, Codable, Sendable { + public var data: Data + + public var links: DocumentLinks + + public init( + data: Data, + links: DocumentLinks + ) { + self.data = data + self.links = links + } + + private enum CodingKeys: String, CodingKey { + case data + case links + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case builds + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BuildBetaDetailResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BuildBetaDetailResponse.generated.swift index 8de09621..5b0d047a 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BuildBetaDetailResponse.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BuildBetaDetailResponse.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct BuildBetaDetailResponse: Hashable, Codable { +public struct BuildBetaDetailResponse: Hashable, Codable, Sendable { public var data: BuildBetaDetail public var included: [Build]? diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BuildBetaDetailsResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BuildBetaDetailsResponse.generated.swift index 8345389f..481ad692 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BuildBetaDetailsResponse.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BuildBetaDetailsResponse.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct BuildBetaDetailsResponse: Hashable, Codable { +public struct BuildBetaDetailsResponse: Hashable, Codable, Sendable { public var data: [BuildBetaDetail] public var included: [Build]? diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BuildBetaNotificationResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BuildBetaNotificationResponse.generated.swift index 388d3465..999dd151 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BuildBetaNotificationResponse.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BuildBetaNotificationResponse.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct BuildBetaNotificationResponse: Hashable, Codable { +public struct BuildBetaNotificationResponse: Hashable, Codable, Sendable { public var data: BuildBetaNotification public var links: DocumentLinks diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BuildBuildBetaDetailLinkageResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BuildBuildBetaDetailLinkageResponse.generated.swift new file mode 100644 index 00000000..c0232bd1 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BuildBuildBetaDetailLinkageResponse.generated.swift @@ -0,0 +1,48 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct BuildBuildBetaDetailLinkageResponse: Hashable, Codable, Sendable { + public var data: Data + + public var links: DocumentLinks + + public init( + data: Data, + links: DocumentLinks + ) { + self.data = data + self.links = links + } + + private enum CodingKeys: String, CodingKey { + case data + case links + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case buildBetaDetails + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BuildBundleAppClipDomainCacheStatusLinkageResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BuildBundleAppClipDomainCacheStatusLinkageResponse.generated.swift new file mode 100644 index 00000000..ca2d8ad1 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BuildBundleAppClipDomainCacheStatusLinkageResponse.generated.swift @@ -0,0 +1,48 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct BuildBundleAppClipDomainCacheStatusLinkageResponse: Hashable, Codable, Sendable { + public var data: Data + + public var links: DocumentLinks + + public init( + data: Data, + links: DocumentLinks + ) { + self.data = data + self.links = links + } + + private enum CodingKeys: String, CodingKey { + case data + case links + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case appClipDomainStatuses + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BuildBundleAppClipDomainDebugStatusLinkageResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BuildBundleAppClipDomainDebugStatusLinkageResponse.generated.swift new file mode 100644 index 00000000..f9dc315f --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BuildBundleAppClipDomainDebugStatusLinkageResponse.generated.swift @@ -0,0 +1,48 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct BuildBundleAppClipDomainDebugStatusLinkageResponse: Hashable, Codable, Sendable { + public var data: Data + + public var links: DocumentLinks + + public init( + data: Data, + links: DocumentLinks + ) { + self.data = data + self.links = links + } + + private enum CodingKeys: String, CodingKey { + case data + case links + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case appClipDomainStatuses + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BuildBundleBetaAppClipInvocationsLinkagesResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BuildBundleBetaAppClipInvocationsLinkagesResponse.generated.swift new file mode 100644 index 00000000..766c70fe --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BuildBundleBetaAppClipInvocationsLinkagesResponse.generated.swift @@ -0,0 +1,53 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct BuildBundleBetaAppClipInvocationsLinkagesResponse: Hashable, Codable, Sendable { + public var data: [Data] + + public var links: PagedDocumentLinks + + public var meta: PagingInformation? + + public init( + data: [Data], + links: PagedDocumentLinks, + meta: PagingInformation? = nil + ) { + self.data = data + self.links = links + self.meta = meta + } + + private enum CodingKeys: String, CodingKey { + case data + case links + case meta + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case betaAppClipInvocations + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BuildBundleBuildBundleFileSizesLinkagesResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BuildBundleBuildBundleFileSizesLinkagesResponse.generated.swift new file mode 100644 index 00000000..f5398c11 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BuildBundleBuildBundleFileSizesLinkagesResponse.generated.swift @@ -0,0 +1,53 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct BuildBundleBuildBundleFileSizesLinkagesResponse: Hashable, Codable, Sendable { + public var data: [Data] + + public var links: PagedDocumentLinks + + public var meta: PagingInformation? + + public init( + data: [Data], + links: PagedDocumentLinks, + meta: PagingInformation? = nil + ) { + self.data = data + self.links = links + self.meta = meta + } + + private enum CodingKeys: String, CodingKey { + case data + case links + case meta + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case buildBundleFileSizes + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BuildBundleFileSizesResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BuildBundleFileSizesResponse.generated.swift index 36924f2b..632b4409 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BuildBundleFileSizesResponse.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BuildBundleFileSizesResponse.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct BuildBundleFileSizesResponse: Hashable, Codable { +public struct BuildBundleFileSizesResponse: Hashable, Codable, Sendable { public var data: [BuildBundleFileSize] public var links: PagedDocumentLinks diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BuildDiagnosticSignaturesLinkagesResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BuildDiagnosticSignaturesLinkagesResponse.generated.swift new file mode 100644 index 00000000..84610c9c --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BuildDiagnosticSignaturesLinkagesResponse.generated.swift @@ -0,0 +1,53 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct BuildDiagnosticSignaturesLinkagesResponse: Hashable, Codable, Sendable { + public var data: [Data] + + public var links: PagedDocumentLinks + + public var meta: PagingInformation? + + public init( + data: [Data], + links: PagedDocumentLinks, + meta: PagingInformation? = nil + ) { + self.data = data + self.links = links + self.meta = meta + } + + private enum CodingKeys: String, CodingKey { + case data + case links + case meta + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case diagnosticSignatures + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BuildIconsLinkagesResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BuildIconsLinkagesResponse.generated.swift new file mode 100644 index 00000000..ae59cb93 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BuildIconsLinkagesResponse.generated.swift @@ -0,0 +1,53 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct BuildIconsLinkagesResponse: Hashable, Codable, Sendable { + public var data: [Data] + + public var links: PagedDocumentLinks + + public var meta: PagingInformation? + + public init( + data: [Data], + links: PagedDocumentLinks, + meta: PagingInformation? = nil + ) { + self.data = data + self.links = links + self.meta = meta + } + + private enum CodingKeys: String, CodingKey { + case data + case links + case meta + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case buildIcons + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BuildIconsResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BuildIconsResponse.generated.swift index c55a0481..7bddf3fd 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BuildIconsResponse.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BuildIconsResponse.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct BuildIconsResponse: Hashable, Codable { +public struct BuildIconsResponse: Hashable, Codable, Sendable { public var data: [BuildIcon] public var links: PagedDocumentLinks diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BuildIconsWithoutIncludesResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BuildIconsWithoutIncludesResponse.generated.swift index 71ddfa85..5b65522c 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BuildIconsWithoutIncludesResponse.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BuildIconsWithoutIncludesResponse.generated.swift @@ -3,15 +3,15 @@ // swiftlint:disable all import Foundation -public struct BuildIconsWithoutIncludesResponse: Hashable, Codable { - public var data: [Build] +public struct BuildIconsWithoutIncludesResponse: Hashable, Codable, Sendable { + public var data: [BuildIcon] public var links: PagedDocumentLinks public var meta: PagingInformation? public init( - data: [Build], + data: [BuildIcon], links: PagedDocumentLinks, meta: PagingInformation? = nil ) { diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BuildIndividualTestersLinkagesResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BuildIndividualTestersLinkagesResponse.generated.swift index fdc59d18..ea07e718 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BuildIndividualTestersLinkagesResponse.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BuildIndividualTestersLinkagesResponse.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct BuildIndividualTestersLinkagesResponse: Hashable, Codable { +public struct BuildIndividualTestersLinkagesResponse: Hashable, Codable, Sendable { public var data: [Data] public var links: PagedDocumentLinks @@ -26,7 +26,7 @@ public struct BuildIndividualTestersLinkagesResponse: Hashable, Codable { case meta } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -44,7 +44,7 @@ public struct BuildIndividualTestersLinkagesResponse: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case betaTesters } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BuildPerfPowerMetricsLinkagesResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BuildPerfPowerMetricsLinkagesResponse.generated.swift new file mode 100644 index 00000000..ea8f2c1d --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BuildPerfPowerMetricsLinkagesResponse.generated.swift @@ -0,0 +1,53 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct BuildPerfPowerMetricsLinkagesResponse: Hashable, Codable, Sendable { + public var data: [Data] + + public var links: PagedDocumentLinks + + public var meta: PagingInformation? + + public init( + data: [Data], + links: PagedDocumentLinks, + meta: PagingInformation? = nil + ) { + self.data = data + self.links = links + self.meta = meta + } + + private enum CodingKeys: String, CodingKey { + case data + case links + case meta + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case perfPowerMetrics + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BuildPreReleaseVersionLinkageResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BuildPreReleaseVersionLinkageResponse.generated.swift new file mode 100644 index 00000000..c19b1de6 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BuildPreReleaseVersionLinkageResponse.generated.swift @@ -0,0 +1,48 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct BuildPreReleaseVersionLinkageResponse: Hashable, Codable, Sendable { + public var data: Data + + public var links: DocumentLinks + + public init( + data: Data, + links: DocumentLinks + ) { + self.data = data + self.links = links + } + + private enum CodingKeys: String, CodingKey { + case data + case links + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case preReleaseVersions + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BuildResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BuildResponse.generated.swift index 4f4cca72..ebb0a075 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BuildResponse.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BuildResponse.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct BuildResponse: Hashable, Codable { +public struct BuildResponse: Hashable, Codable, Sendable { public var data: Build public var included: [Included]? @@ -26,7 +26,7 @@ public struct BuildResponse: Hashable, Codable { case links } - public enum Included: Hashable, Codable { + public enum Included: Hashable, Codable, Sendable { case prereleaseVersion(PrereleaseVersion) case betaTester(BetaTester) case betaGroup(BetaGroup) diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BuildWithoutIncludesResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BuildWithoutIncludesResponse.generated.swift index 106f1ab2..b1c70d1e 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BuildWithoutIncludesResponse.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BuildWithoutIncludesResponse.generated.swift @@ -3,13 +3,13 @@ // swiftlint:disable all import Foundation -public struct BuildWithoutIncludesResponse: Hashable, Codable { - public var data: BuildBetaDetail +public struct BuildWithoutIncludesResponse: Hashable, Codable, Sendable { + public var data: Build public var links: DocumentLinks public init( - data: BuildBetaDetail, + data: Build, links: DocumentLinks ) { self.data = data diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BuildsResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BuildsResponse.generated.swift index 6de3323a..fb6b462c 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BuildsResponse.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BuildsResponse.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct BuildsResponse: Hashable, Codable { +public struct BuildsResponse: Hashable, Codable, Sendable { public var data: [Build] public var included: [Included]? @@ -31,7 +31,7 @@ public struct BuildsResponse: Hashable, Codable { case meta } - public enum Included: Hashable, Codable { + public enum Included: Hashable, Codable, Sendable { case prereleaseVersion(PrereleaseVersion) case betaTester(BetaTester) case betaGroup(BetaGroup) diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BuildsWithoutIncludesResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BuildsWithoutIncludesResponse.generated.swift index b78d136f..21769bfe 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BuildsWithoutIncludesResponse.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BuildsWithoutIncludesResponse.generated.swift @@ -3,15 +3,15 @@ // swiftlint:disable all import Foundation -public struct BuildsWithoutIncludesResponse: Hashable, Codable { - public var data: [PrereleaseVersion] +public struct BuildsWithoutIncludesResponse: Hashable, Codable, Sendable { + public var data: [Build] public var links: PagedDocumentLinks public var meta: PagingInformation? public init( - data: [PrereleaseVersion], + data: [Build], links: PagedDocumentLinks, meta: PagingInformation? = nil ) { diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BundleIdAppLinkageResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BundleIdAppLinkageResponse.generated.swift new file mode 100644 index 00000000..370969ee --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BundleIdAppLinkageResponse.generated.swift @@ -0,0 +1,48 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct BundleIdAppLinkageResponse: Hashable, Codable, Sendable { + public var data: Data + + public var links: DocumentLinks + + public init( + data: Data, + links: DocumentLinks + ) { + self.data = data + self.links = links + } + + private enum CodingKeys: String, CodingKey { + case data + case links + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case apps + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BundleIdBundleIdCapabilitiesLinkagesResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BundleIdBundleIdCapabilitiesLinkagesResponse.generated.swift new file mode 100644 index 00000000..1bcb40de --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BundleIdBundleIdCapabilitiesLinkagesResponse.generated.swift @@ -0,0 +1,53 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct BundleIdBundleIdCapabilitiesLinkagesResponse: Hashable, Codable, Sendable { + public var data: [Data] + + public var links: PagedDocumentLinks + + public var meta: PagingInformation? + + public init( + data: [Data], + links: PagedDocumentLinks, + meta: PagingInformation? = nil + ) { + self.data = data + self.links = links + self.meta = meta + } + + private enum CodingKeys: String, CodingKey { + case data + case links + case meta + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case bundleIdCapabilities + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BundleIdCapabilitiesResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BundleIdCapabilitiesResponse.generated.swift index fb6f70ff..a04d9500 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BundleIdCapabilitiesResponse.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BundleIdCapabilitiesResponse.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct BundleIdCapabilitiesResponse: Hashable, Codable { +public struct BundleIdCapabilitiesResponse: Hashable, Codable, Sendable { public var data: [BundleIdCapability] public var links: PagedDocumentLinks diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BundleIdCapabilitiesWithoutIncludesResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BundleIdCapabilitiesWithoutIncludesResponse.generated.swift index 0e83090d..554c1455 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BundleIdCapabilitiesWithoutIncludesResponse.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BundleIdCapabilitiesWithoutIncludesResponse.generated.swift @@ -3,15 +3,15 @@ // swiftlint:disable all import Foundation -public struct BundleIdCapabilitiesWithoutIncludesResponse: Hashable, Codable { - public var data: [BundleId] +public struct BundleIdCapabilitiesWithoutIncludesResponse: Hashable, Codable, Sendable { + public var data: [BundleIdCapability] public var links: PagedDocumentLinks public var meta: PagingInformation? public init( - data: [BundleId], + data: [BundleIdCapability], links: PagedDocumentLinks, meta: PagingInformation? = nil ) { diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BundleIdCapabilityResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BundleIdCapabilityResponse.generated.swift index 609c48be..82e22e0d 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BundleIdCapabilityResponse.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BundleIdCapabilityResponse.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct BundleIdCapabilityResponse: Hashable, Codable { +public struct BundleIdCapabilityResponse: Hashable, Codable, Sendable { public var data: BundleIdCapability public var links: DocumentLinks diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BundleIdProfilesLinkagesResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BundleIdProfilesLinkagesResponse.generated.swift new file mode 100644 index 00000000..670c8639 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BundleIdProfilesLinkagesResponse.generated.swift @@ -0,0 +1,53 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct BundleIdProfilesLinkagesResponse: Hashable, Codable, Sendable { + public var data: [Data] + + public var links: PagedDocumentLinks + + public var meta: PagingInformation? + + public init( + data: [Data], + links: PagedDocumentLinks, + meta: PagingInformation? = nil + ) { + self.data = data + self.links = links + self.meta = meta + } + + private enum CodingKeys: String, CodingKey { + case data + case links + case meta + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case profiles + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BundleIdResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BundleIdResponse.generated.swift index 16e05ad4..b3818df4 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BundleIdResponse.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BundleIdResponse.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct BundleIdResponse: Hashable, Codable { +public struct BundleIdResponse: Hashable, Codable, Sendable { public var data: BundleId public var included: [Included]? @@ -26,7 +26,7 @@ public struct BundleIdResponse: Hashable, Codable { case links } - public enum Included: Hashable, Codable { + public enum Included: Hashable, Codable, Sendable { case profile(Profile) case bundleIdCapability(BundleIdCapability) case app(App) diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BundleIdWithoutIncludesResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BundleIdWithoutIncludesResponse.generated.swift index 70e7aa90..67187db8 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BundleIdWithoutIncludesResponse.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BundleIdWithoutIncludesResponse.generated.swift @@ -3,13 +3,13 @@ // swiftlint:disable all import Foundation -public struct BundleIdWithoutIncludesResponse: Hashable, Codable { - public var data: Profile +public struct BundleIdWithoutIncludesResponse: Hashable, Codable, Sendable { + public var data: BundleId public var links: DocumentLinks public init( - data: Profile, + data: BundleId, links: DocumentLinks ) { self.data = data diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BundleIdsResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BundleIdsResponse.generated.swift index 2b37f489..19395467 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BundleIdsResponse.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BundleIdsResponse.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct BundleIdsResponse: Hashable, Codable { +public struct BundleIdsResponse: Hashable, Codable, Sendable { public var data: [BundleId] public var included: [Included]? @@ -31,7 +31,7 @@ public struct BundleIdsResponse: Hashable, Codable { case meta } - public enum Included: Hashable, Codable { + public enum Included: Hashable, Codable, Sendable { case profile(Profile) case bundleIdCapability(BundleIdCapability) case app(App) diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/CertificatePassTypeIdLinkageResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/CertificatePassTypeIdLinkageResponse.generated.swift new file mode 100644 index 00000000..5c578ff2 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/CertificatePassTypeIdLinkageResponse.generated.swift @@ -0,0 +1,48 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct CertificatePassTypeIdLinkageResponse: Hashable, Codable, Sendable { + public var data: Data + + public var links: DocumentLinks + + public init( + data: Data, + links: DocumentLinks + ) { + self.data = data + self.links = links + } + + private enum CodingKeys: String, CodingKey { + case data + case links + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case passTypeIds + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/CertificateResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/CertificateResponse.generated.swift index f4d4200c..2b9f3c48 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/CertificateResponse.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/CertificateResponse.generated.swift @@ -3,21 +3,26 @@ // swiftlint:disable all import Foundation -public struct CertificateResponse: Hashable, Codable { +public struct CertificateResponse: Hashable, Codable, Sendable { public var data: Certificate + public var included: [PassTypeId]? + public var links: DocumentLinks public init( data: Certificate, + included: [PassTypeId]? = nil, links: DocumentLinks ) { self.data = data + self.included = included self.links = links } private enum CodingKeys: String, CodingKey { case data + case included case links } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/CertificatesResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/CertificatesResponse.generated.swift index e01460b7..dbf5f755 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/CertificatesResponse.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/CertificatesResponse.generated.swift @@ -3,25 +3,30 @@ // swiftlint:disable all import Foundation -public struct CertificatesResponse: Hashable, Codable { +public struct CertificatesResponse: Hashable, Codable, Sendable { public var data: [Certificate] + public var included: [PassTypeId]? + public var links: PagedDocumentLinks public var meta: PagingInformation? public init( data: [Certificate], + included: [PassTypeId]? = nil, links: PagedDocumentLinks, meta: PagingInformation? = nil ) { self.data = data + self.included = included self.links = links self.meta = meta } private enum CodingKeys: String, CodingKey { case data + case included case links case meta } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/CertificatesWithoutIncludesResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/CertificatesWithoutIncludesResponse.generated.swift index 72466e29..ff63c2b7 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/CertificatesWithoutIncludesResponse.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/CertificatesWithoutIncludesResponse.generated.swift @@ -3,15 +3,15 @@ // swiftlint:disable all import Foundation -public struct CertificatesWithoutIncludesResponse: Hashable, Codable { - public var data: [Profile] +public struct CertificatesWithoutIncludesResponse: Hashable, Codable, Sendable { + public var data: [Certificate] public var links: PagedDocumentLinks public var meta: PagingInformation? public init( - data: [Profile], + data: [Certificate], links: PagedDocumentLinks, meta: PagingInformation? = nil ) { diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/CiArtifactResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/CiArtifactResponse.generated.swift index ca413ca1..ed257337 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/CiArtifactResponse.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/CiArtifactResponse.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct CiArtifactResponse: Hashable, Codable { +public struct CiArtifactResponse: Hashable, Codable, Sendable { public var data: CiArtifact public var links: DocumentLinks diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/CiArtifactsResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/CiArtifactsResponse.generated.swift index 110ac8f5..7239f6ff 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/CiArtifactsResponse.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/CiArtifactsResponse.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct CiArtifactsResponse: Hashable, Codable { +public struct CiArtifactsResponse: Hashable, Codable, Sendable { public var data: [CiArtifact] public var links: PagedDocumentLinks diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/CiBuildActionArtifactsLinkagesResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/CiBuildActionArtifactsLinkagesResponse.generated.swift new file mode 100644 index 00000000..27d57801 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/CiBuildActionArtifactsLinkagesResponse.generated.swift @@ -0,0 +1,53 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct CiBuildActionArtifactsLinkagesResponse: Hashable, Codable, Sendable { + public var data: [Data] + + public var links: PagedDocumentLinks + + public var meta: PagingInformation? + + public init( + data: [Data], + links: PagedDocumentLinks, + meta: PagingInformation? = nil + ) { + self.data = data + self.links = links + self.meta = meta + } + + private enum CodingKeys: String, CodingKey { + case data + case links + case meta + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case ciArtifacts + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/CiBuildActionBuildRunLinkageResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/CiBuildActionBuildRunLinkageResponse.generated.swift new file mode 100644 index 00000000..671c0b72 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/CiBuildActionBuildRunLinkageResponse.generated.swift @@ -0,0 +1,48 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct CiBuildActionBuildRunLinkageResponse: Hashable, Codable, Sendable { + public var data: Data + + public var links: DocumentLinks + + public init( + data: Data, + links: DocumentLinks + ) { + self.data = data + self.links = links + } + + private enum CodingKeys: String, CodingKey { + case data + case links + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case ciBuildRuns + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/CiBuildActionIssuesLinkagesResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/CiBuildActionIssuesLinkagesResponse.generated.swift new file mode 100644 index 00000000..7acb0367 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/CiBuildActionIssuesLinkagesResponse.generated.swift @@ -0,0 +1,53 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct CiBuildActionIssuesLinkagesResponse: Hashable, Codable, Sendable { + public var data: [Data] + + public var links: PagedDocumentLinks + + public var meta: PagingInformation? + + public init( + data: [Data], + links: PagedDocumentLinks, + meta: PagingInformation? = nil + ) { + self.data = data + self.links = links + self.meta = meta + } + + private enum CodingKeys: String, CodingKey { + case data + case links + case meta + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case ciIssues + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/CiBuildActionResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/CiBuildActionResponse.generated.swift index 0c0a30b2..2b59b926 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/CiBuildActionResponse.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/CiBuildActionResponse.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct CiBuildActionResponse: Hashable, Codable { +public struct CiBuildActionResponse: Hashable, Codable, Sendable { public var data: CiBuildAction public var included: [CiBuildRun]? diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/CiBuildActionTestResultsLinkagesResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/CiBuildActionTestResultsLinkagesResponse.generated.swift new file mode 100644 index 00000000..ec2414c3 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/CiBuildActionTestResultsLinkagesResponse.generated.swift @@ -0,0 +1,53 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct CiBuildActionTestResultsLinkagesResponse: Hashable, Codable, Sendable { + public var data: [Data] + + public var links: PagedDocumentLinks + + public var meta: PagingInformation? + + public init( + data: [Data], + links: PagedDocumentLinks, + meta: PagingInformation? = nil + ) { + self.data = data + self.links = links + self.meta = meta + } + + private enum CodingKeys: String, CodingKey { + case data + case links + case meta + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case ciTestResults + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/CiBuildActionsResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/CiBuildActionsResponse.generated.swift index 04d409b5..e8de91d2 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/CiBuildActionsResponse.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/CiBuildActionsResponse.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct CiBuildActionsResponse: Hashable, Codable { +public struct CiBuildActionsResponse: Hashable, Codable, Sendable { public var data: [CiBuildAction] public var included: [CiBuildRun]? diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/CiBuildRunActionsLinkagesResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/CiBuildRunActionsLinkagesResponse.generated.swift new file mode 100644 index 00000000..d0186f86 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/CiBuildRunActionsLinkagesResponse.generated.swift @@ -0,0 +1,53 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct CiBuildRunActionsLinkagesResponse: Hashable, Codable, Sendable { + public var data: [Data] + + public var links: PagedDocumentLinks + + public var meta: PagingInformation? + + public init( + data: [Data], + links: PagedDocumentLinks, + meta: PagingInformation? = nil + ) { + self.data = data + self.links = links + self.meta = meta + } + + private enum CodingKeys: String, CodingKey { + case data + case links + case meta + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case ciBuildActions + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/CiBuildRunBuildsLinkagesResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/CiBuildRunBuildsLinkagesResponse.generated.swift new file mode 100644 index 00000000..0e95e788 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/CiBuildRunBuildsLinkagesResponse.generated.swift @@ -0,0 +1,53 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct CiBuildRunBuildsLinkagesResponse: Hashable, Codable, Sendable { + public var data: [Data] + + public var links: PagedDocumentLinks + + public var meta: PagingInformation? + + public init( + data: [Data], + links: PagedDocumentLinks, + meta: PagingInformation? = nil + ) { + self.data = data + self.links = links + self.meta = meta + } + + private enum CodingKeys: String, CodingKey { + case data + case links + case meta + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case builds + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/CiBuildRunResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/CiBuildRunResponse.generated.swift index 5dc4df6a..ed7addf4 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/CiBuildRunResponse.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/CiBuildRunResponse.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct CiBuildRunResponse: Hashable, Codable { +public struct CiBuildRunResponse: Hashable, Codable, Sendable { public var data: CiBuildRun public var included: [Included]? @@ -26,7 +26,7 @@ public struct CiBuildRunResponse: Hashable, Codable { case links } - public enum Included: Hashable, Codable { + public enum Included: Hashable, Codable, Sendable { case build(Build) case ciWorkflow(CiWorkflow) case ciProduct(CiProduct) diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/CiBuildRunsResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/CiBuildRunsResponse.generated.swift index 5cac5370..22447f9a 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/CiBuildRunsResponse.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/CiBuildRunsResponse.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct CiBuildRunsResponse: Hashable, Codable { +public struct CiBuildRunsResponse: Hashable, Codable, Sendable { public var data: [CiBuildRun] public var included: [Included]? @@ -31,7 +31,7 @@ public struct CiBuildRunsResponse: Hashable, Codable { case meta } - public enum Included: Hashable, Codable { + public enum Included: Hashable, Codable, Sendable { case build(Build) case ciWorkflow(CiWorkflow) case ciProduct(CiProduct) diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/CiIssueResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/CiIssueResponse.generated.swift index b956da9e..affdccc9 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/CiIssueResponse.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/CiIssueResponse.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct CiIssueResponse: Hashable, Codable { +public struct CiIssueResponse: Hashable, Codable, Sendable { public var data: CiIssue public var links: DocumentLinks diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/CiIssuesResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/CiIssuesResponse.generated.swift index 667ba5c1..81e9c586 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/CiIssuesResponse.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/CiIssuesResponse.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct CiIssuesResponse: Hashable, Codable { +public struct CiIssuesResponse: Hashable, Codable, Sendable { public var data: [CiIssue] public var links: PagedDocumentLinks diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/CiMacOsVersionResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/CiMacOsVersionResponse.generated.swift index 6274c906..b108cbec 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/CiMacOsVersionResponse.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/CiMacOsVersionResponse.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct CiMacOsVersionResponse: Hashable, Codable { +public struct CiMacOsVersionResponse: Hashable, Codable, Sendable { public var data: CiMacOsVersion public var included: [CiXcodeVersion]? diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/CiMacOsVersionXcodeVersionsLinkagesResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/CiMacOsVersionXcodeVersionsLinkagesResponse.generated.swift new file mode 100644 index 00000000..1e4fa6bd --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/CiMacOsVersionXcodeVersionsLinkagesResponse.generated.swift @@ -0,0 +1,53 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct CiMacOsVersionXcodeVersionsLinkagesResponse: Hashable, Codable, Sendable { + public var data: [Data] + + public var links: PagedDocumentLinks + + public var meta: PagingInformation? + + public init( + data: [Data], + links: PagedDocumentLinks, + meta: PagingInformation? = nil + ) { + self.data = data + self.links = links + self.meta = meta + } + + private enum CodingKeys: String, CodingKey { + case data + case links + case meta + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case ciXcodeVersions + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/CiMacOsVersionsResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/CiMacOsVersionsResponse.generated.swift index e9183569..7738601b 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/CiMacOsVersionsResponse.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/CiMacOsVersionsResponse.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct CiMacOsVersionsResponse: Hashable, Codable { +public struct CiMacOsVersionsResponse: Hashable, Codable, Sendable { public var data: [CiMacOsVersion] public var included: [CiXcodeVersion]? diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/CiProductAdditionalRepositoriesLinkagesResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/CiProductAdditionalRepositoriesLinkagesResponse.generated.swift new file mode 100644 index 00000000..00958c27 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/CiProductAdditionalRepositoriesLinkagesResponse.generated.swift @@ -0,0 +1,53 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct CiProductAdditionalRepositoriesLinkagesResponse: Hashable, Codable, Sendable { + public var data: [Data] + + public var links: PagedDocumentLinks + + public var meta: PagingInformation? + + public init( + data: [Data], + links: PagedDocumentLinks, + meta: PagingInformation? = nil + ) { + self.data = data + self.links = links + self.meta = meta + } + + private enum CodingKeys: String, CodingKey { + case data + case links + case meta + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case scmRepositories + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/CiProductAppLinkageResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/CiProductAppLinkageResponse.generated.swift new file mode 100644 index 00000000..b34fa825 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/CiProductAppLinkageResponse.generated.swift @@ -0,0 +1,48 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct CiProductAppLinkageResponse: Hashable, Codable, Sendable { + public var data: Data + + public var links: DocumentLinks + + public init( + data: Data, + links: DocumentLinks + ) { + self.data = data + self.links = links + } + + private enum CodingKeys: String, CodingKey { + case data + case links + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case apps + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/CiProductBuildRunsLinkagesResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/CiProductBuildRunsLinkagesResponse.generated.swift new file mode 100644 index 00000000..599a6ee3 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/CiProductBuildRunsLinkagesResponse.generated.swift @@ -0,0 +1,53 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct CiProductBuildRunsLinkagesResponse: Hashable, Codable, Sendable { + public var data: [Data] + + public var links: PagedDocumentLinks + + public var meta: PagingInformation? + + public init( + data: [Data], + links: PagedDocumentLinks, + meta: PagingInformation? = nil + ) { + self.data = data + self.links = links + self.meta = meta + } + + private enum CodingKeys: String, CodingKey { + case data + case links + case meta + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case ciBuildRuns + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/CiProductPrimaryRepositoriesLinkagesResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/CiProductPrimaryRepositoriesLinkagesResponse.generated.swift new file mode 100644 index 00000000..3212ffb9 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/CiProductPrimaryRepositoriesLinkagesResponse.generated.swift @@ -0,0 +1,53 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct CiProductPrimaryRepositoriesLinkagesResponse: Hashable, Codable, Sendable { + public var data: [Data] + + public var links: PagedDocumentLinks + + public var meta: PagingInformation? + + public init( + data: [Data], + links: PagedDocumentLinks, + meta: PagingInformation? = nil + ) { + self.data = data + self.links = links + self.meta = meta + } + + private enum CodingKeys: String, CodingKey { + case data + case links + case meta + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case scmRepositories + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/CiProductResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/CiProductResponse.generated.swift index 5fec8895..b2517c92 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/CiProductResponse.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/CiProductResponse.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct CiProductResponse: Hashable, Codable { +public struct CiProductResponse: Hashable, Codable, Sendable { public var data: CiProduct public var included: [Included]? @@ -26,7 +26,7 @@ public struct CiProductResponse: Hashable, Codable { case links } - public enum Included: Hashable, Codable { + public enum Included: Hashable, Codable, Sendable { case app(App) case bundleId(BundleId) case scmRepository(ScmRepository) diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/CiProductWorkflowsLinkagesResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/CiProductWorkflowsLinkagesResponse.generated.swift new file mode 100644 index 00000000..7eaeda50 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/CiProductWorkflowsLinkagesResponse.generated.swift @@ -0,0 +1,53 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct CiProductWorkflowsLinkagesResponse: Hashable, Codable, Sendable { + public var data: [Data] + + public var links: PagedDocumentLinks + + public var meta: PagingInformation? + + public init( + data: [Data], + links: PagedDocumentLinks, + meta: PagingInformation? = nil + ) { + self.data = data + self.links = links + self.meta = meta + } + + private enum CodingKeys: String, CodingKey { + case data + case links + case meta + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case ciWorkflows + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/CiProductsResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/CiProductsResponse.generated.swift index a622a59b..5cede59b 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/CiProductsResponse.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/CiProductsResponse.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct CiProductsResponse: Hashable, Codable { +public struct CiProductsResponse: Hashable, Codable, Sendable { public var data: [CiProduct] public var included: [Included]? @@ -31,7 +31,7 @@ public struct CiProductsResponse: Hashable, Codable { case meta } - public enum Included: Hashable, Codable { + public enum Included: Hashable, Codable, Sendable { case app(App) case bundleId(BundleId) case scmRepository(ScmRepository) diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/CiTestResultResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/CiTestResultResponse.generated.swift index 65b9bf45..1b3401ee 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/CiTestResultResponse.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/CiTestResultResponse.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct CiTestResultResponse: Hashable, Codable { +public struct CiTestResultResponse: Hashable, Codable, Sendable { public var data: CiTestResult public var links: DocumentLinks diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/CiTestResultsResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/CiTestResultsResponse.generated.swift index 942dd0a7..470dc1ef 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/CiTestResultsResponse.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/CiTestResultsResponse.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct CiTestResultsResponse: Hashable, Codable { +public struct CiTestResultsResponse: Hashable, Codable, Sendable { public var data: [CiTestResult] public var links: PagedDocumentLinks diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/CiWorkflowBuildRunsLinkagesResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/CiWorkflowBuildRunsLinkagesResponse.generated.swift new file mode 100644 index 00000000..b9476a8f --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/CiWorkflowBuildRunsLinkagesResponse.generated.swift @@ -0,0 +1,53 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct CiWorkflowBuildRunsLinkagesResponse: Hashable, Codable, Sendable { + public var data: [Data] + + public var links: PagedDocumentLinks + + public var meta: PagingInformation? + + public init( + data: [Data], + links: PagedDocumentLinks, + meta: PagingInformation? = nil + ) { + self.data = data + self.links = links + self.meta = meta + } + + private enum CodingKeys: String, CodingKey { + case data + case links + case meta + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case ciBuildRuns + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/CiWorkflowRepositoryLinkageResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/CiWorkflowRepositoryLinkageResponse.generated.swift new file mode 100644 index 00000000..d7ff5d3a --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/CiWorkflowRepositoryLinkageResponse.generated.swift @@ -0,0 +1,48 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct CiWorkflowRepositoryLinkageResponse: Hashable, Codable, Sendable { + public var data: Data + + public var links: DocumentLinks + + public init( + data: Data, + links: DocumentLinks + ) { + self.data = data + self.links = links + } + + private enum CodingKeys: String, CodingKey { + case data + case links + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case scmRepositories + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/CiWorkflowResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/CiWorkflowResponse.generated.swift index 0c1cc323..ecd4658f 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/CiWorkflowResponse.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/CiWorkflowResponse.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct CiWorkflowResponse: Hashable, Codable { +public struct CiWorkflowResponse: Hashable, Codable, Sendable { public var data: CiWorkflow public var included: [Included]? @@ -26,7 +26,7 @@ public struct CiWorkflowResponse: Hashable, Codable { case links } - public enum Included: Hashable, Codable { + public enum Included: Hashable, Codable, Sendable { case ciProduct(CiProduct) case scmRepository(ScmRepository) case ciXcodeVersion(CiXcodeVersion) diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/CiWorkflowsResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/CiWorkflowsResponse.generated.swift index 20936438..8c717905 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/CiWorkflowsResponse.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/CiWorkflowsResponse.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct CiWorkflowsResponse: Hashable, Codable { +public struct CiWorkflowsResponse: Hashable, Codable, Sendable { public var data: [CiWorkflow] public var included: [Included]? @@ -31,7 +31,7 @@ public struct CiWorkflowsResponse: Hashable, Codable { case meta } - public enum Included: Hashable, Codable { + public enum Included: Hashable, Codable, Sendable { case ciProduct(CiProduct) case scmRepository(ScmRepository) case ciXcodeVersion(CiXcodeVersion) diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/CiXcodeVersionMacOsVersionsLinkagesResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/CiXcodeVersionMacOsVersionsLinkagesResponse.generated.swift new file mode 100644 index 00000000..c99ad175 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/CiXcodeVersionMacOsVersionsLinkagesResponse.generated.swift @@ -0,0 +1,53 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct CiXcodeVersionMacOsVersionsLinkagesResponse: Hashable, Codable, Sendable { + public var data: [Data] + + public var links: PagedDocumentLinks + + public var meta: PagingInformation? + + public init( + data: [Data], + links: PagedDocumentLinks, + meta: PagingInformation? = nil + ) { + self.data = data + self.links = links + self.meta = meta + } + + private enum CodingKeys: String, CodingKey { + case data + case links + case meta + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case ciMacOsVersions + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/CiXcodeVersionResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/CiXcodeVersionResponse.generated.swift index 304114cf..7dd65da2 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/CiXcodeVersionResponse.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/CiXcodeVersionResponse.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct CiXcodeVersionResponse: Hashable, Codable { +public struct CiXcodeVersionResponse: Hashable, Codable, Sendable { public var data: CiXcodeVersion public var included: [CiMacOsVersion]? diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/CiXcodeVersionsResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/CiXcodeVersionsResponse.generated.swift index dffb18dc..fdb5853d 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/CiXcodeVersionsResponse.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/CiXcodeVersionsResponse.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct CiXcodeVersionsResponse: Hashable, Codable { +public struct CiXcodeVersionsResponse: Hashable, Codable, Sendable { public var data: [CiXcodeVersion] public var included: [CiMacOsVersion]? diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/CustomerReviewResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/CustomerReviewResponse.generated.swift index 9b3d717e..34356151 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/CustomerReviewResponse.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/CustomerReviewResponse.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct CustomerReviewResponse: Hashable, Codable { +public struct CustomerReviewResponse: Hashable, Codable, Sendable { public var data: CustomerReview public var included: [CustomerReviewResponseV1]? diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/CustomerReviewResponseLinkageResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/CustomerReviewResponseLinkageResponse.generated.swift new file mode 100644 index 00000000..fa6d30eb --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/CustomerReviewResponseLinkageResponse.generated.swift @@ -0,0 +1,48 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct CustomerReviewResponseLinkageResponse: Hashable, Codable, Sendable { + public var data: Data + + public var links: DocumentLinks + + public init( + data: Data, + links: DocumentLinks + ) { + self.data = data + self.links = links + } + + private enum CodingKeys: String, CodingKey { + case data + case links + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case customerReviewResponses + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/CustomerReviewResponseV1Response.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/CustomerReviewResponseV1Response.generated.swift index 30c2a58b..7358ebf8 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/CustomerReviewResponseV1Response.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/CustomerReviewResponseV1Response.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct CustomerReviewResponseV1Response: Hashable, Codable { +public struct CustomerReviewResponseV1Response: Hashable, Codable, Sendable { public var data: CustomerReviewResponseV1 public var included: [CustomerReview]? diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/CustomerReviewSummarizationsResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/CustomerReviewSummarizationsResponse.generated.swift new file mode 100644 index 00000000..e3bf6783 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/CustomerReviewSummarizationsResponse.generated.swift @@ -0,0 +1,35 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct CustomerReviewSummarizationsResponse: Hashable, Codable, Sendable { + public var data: [CustomerReviewSummarization] + + public var included: [Territory]? + + public var links: PagedDocumentLinks + + public var meta: PagingInformation? + + public init( + data: [CustomerReviewSummarization], + included: [Territory]? = nil, + links: PagedDocumentLinks, + meta: PagingInformation? = nil + ) { + self.data = data + self.included = included + self.links = links + self.meta = meta + } + + private enum CodingKeys: String, CodingKey { + case data + case included + case links + case meta + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/CustomerReviewsResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/CustomerReviewsResponse.generated.swift index 97031305..b4e8b4de 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/CustomerReviewsResponse.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/CustomerReviewsResponse.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct CustomerReviewsResponse: Hashable, Codable { +public struct CustomerReviewsResponse: Hashable, Codable, Sendable { public var data: [CustomerReview] public var included: [CustomerReviewResponseV1]? diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/DeviceResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/DeviceResponse.generated.swift index dd10ec20..c28feded 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/DeviceResponse.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/DeviceResponse.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct DeviceResponse: Hashable, Codable { +public struct DeviceResponse: Hashable, Codable, Sendable { public var data: Device public var links: DocumentLinks diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/DevicesResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/DevicesResponse.generated.swift index 7bf4e93c..215fe208 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/DevicesResponse.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/DevicesResponse.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct DevicesResponse: Hashable, Codable { +public struct DevicesResponse: Hashable, Codable, Sendable { public var data: [Device] public var links: PagedDocumentLinks diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/DevicesWithoutIncludesResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/DevicesWithoutIncludesResponse.generated.swift index 15c9143d..4a56ff9f 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/DevicesWithoutIncludesResponse.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/DevicesWithoutIncludesResponse.generated.swift @@ -3,15 +3,15 @@ // swiftlint:disable all import Foundation -public struct DevicesWithoutIncludesResponse: Hashable, Codable { - public var data: [Profile] +public struct DevicesWithoutIncludesResponse: Hashable, Codable, Sendable { + public var data: [Device] public var links: PagedDocumentLinks public var meta: PagingInformation? public init( - data: [Profile], + data: [Device], links: PagedDocumentLinks, meta: PagingInformation? = nil ) { diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/DiagnosticSignatureLogsLinkagesResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/DiagnosticSignatureLogsLinkagesResponse.generated.swift new file mode 100644 index 00000000..30c0b742 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/DiagnosticSignatureLogsLinkagesResponse.generated.swift @@ -0,0 +1,53 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct DiagnosticSignatureLogsLinkagesResponse: Hashable, Codable, Sendable { + public var data: [Data] + + public var links: PagedDocumentLinks + + public var meta: PagingInformation? + + public init( + data: [Data], + links: PagedDocumentLinks, + meta: PagingInformation? = nil + ) { + self.data = data + self.links = links + self.meta = meta + } + + private enum CodingKeys: String, CodingKey { + case data + case links + case meta + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case diagnosticLogs + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/DiagnosticSignaturesResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/DiagnosticSignaturesResponse.generated.swift index d17677d0..fd1b4199 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/DiagnosticSignaturesResponse.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/DiagnosticSignaturesResponse.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct DiagnosticSignaturesResponse: Hashable, Codable { +public struct DiagnosticSignaturesResponse: Hashable, Codable, Sendable { public var data: [DiagnosticSignature] public var links: PagedDocumentLinks diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/EndAppAvailabilityPreOrderResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/EndAppAvailabilityPreOrderResponse.generated.swift index ca857e69..baad4c47 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/EndAppAvailabilityPreOrderResponse.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/EndAppAvailabilityPreOrderResponse.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct EndAppAvailabilityPreOrderResponse: Hashable, Codable { +public struct EndAppAvailabilityPreOrderResponse: Hashable, Codable, Sendable { public var data: EndAppAvailabilityPreOrder public var links: DocumentLinks diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/EndUserLicenseAgreementResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/EndUserLicenseAgreementResponse.generated.swift index dba10680..8c2bb822 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/EndUserLicenseAgreementResponse.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/EndUserLicenseAgreementResponse.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct EndUserLicenseAgreementResponse: Hashable, Codable { +public struct EndUserLicenseAgreementResponse: Hashable, Codable, Sendable { public var data: EndUserLicenseAgreement public var included: [Included]? @@ -26,7 +26,7 @@ public struct EndUserLicenseAgreementResponse: Hashable, Codable { case links } - public enum Included: Hashable, Codable { + public enum Included: Hashable, Codable, Sendable { case app(App) case territory(Territory) diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/EndUserLicenseAgreementTerritoriesLinkagesResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/EndUserLicenseAgreementTerritoriesLinkagesResponse.generated.swift new file mode 100644 index 00000000..8827f1b8 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/EndUserLicenseAgreementTerritoriesLinkagesResponse.generated.swift @@ -0,0 +1,53 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct EndUserLicenseAgreementTerritoriesLinkagesResponse: Hashable, Codable, Sendable { + public var data: [Data] + + public var links: PagedDocumentLinks + + public var meta: PagingInformation? + + public init( + data: [Data], + links: PagedDocumentLinks, + meta: PagingInformation? = nil + ) { + self.data = data + self.links = links + self.meta = meta + } + + private enum CodingKeys: String, CodingKey { + case data + case links + case meta + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case territories + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/EndUserLicenseAgreementWithoutIncludesResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/EndUserLicenseAgreementWithoutIncludesResponse.generated.swift index 72e5d9f1..199a94b4 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/EndUserLicenseAgreementWithoutIncludesResponse.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/EndUserLicenseAgreementWithoutIncludesResponse.generated.swift @@ -3,13 +3,13 @@ // swiftlint:disable all import Foundation -public struct EndUserLicenseAgreementWithoutIncludesResponse: Hashable, Codable { - public var data: App +public struct EndUserLicenseAgreementWithoutIncludesResponse: Hashable, Codable, Sendable { + public var data: EndUserLicenseAgreement public var links: DocumentLinks public init( - data: App, + data: EndUserLicenseAgreement, links: DocumentLinks ) { self.data = data diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/ErrorResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/ErrorResponse.generated.swift index 6981e857..77601e16 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/ErrorResponse.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/ErrorResponse.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct ErrorResponse: Error, Hashable, Codable { +public struct ErrorResponse: Error, Hashable, Codable, Sendable { public var errors: [Errors]? public init(errors: [Errors]? = nil) { @@ -14,13 +14,17 @@ public struct ErrorResponse: Error, Hashable, Codable { case errors } - public struct Errors: Hashable, Codable { + public struct Errors: Hashable, Codable, Sendable { public var id: String? public var code: String public var detail: String + public var links: ErrorLinks? + + public var meta: [String: Data]? + public var source: Source? public var status: String @@ -31,6 +35,8 @@ public struct ErrorResponse: Error, Hashable, Codable { id: String? = nil, code: String, detail: String, + links: ErrorLinks? = nil, + meta: [String: Data]? = nil, source: Source? = nil, status: String, title: String @@ -38,6 +44,8 @@ public struct ErrorResponse: Error, Hashable, Codable { self.id = id self.code = code self.detail = detail + self.links = links + self.meta = meta self.source = source self.status = status self.title = title @@ -47,12 +55,14 @@ public struct ErrorResponse: Error, Hashable, Codable { case id case code case detail + case links + case meta case source case status case title } - public enum Source: Hashable, Codable { + public enum Source: Hashable, Codable, Sendable { case jsonPointer(JsonPointer) case parameter(Parameter) diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterAchievementGroupAchievementLinkageResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterAchievementGroupAchievementLinkageResponse.generated.swift index a0422232..f964c21c 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterAchievementGroupAchievementLinkageResponse.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterAchievementGroupAchievementLinkageResponse.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct GameCenterAchievementGroupAchievementLinkageResponse: Hashable, Codable { +public struct GameCenterAchievementGroupAchievementLinkageResponse: Hashable, Codable, Sendable { public var data: Data public var links: DocumentLinks @@ -21,7 +21,7 @@ public struct GameCenterAchievementGroupAchievementLinkageResponse: Hashable, Co case links } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -39,7 +39,7 @@ public struct GameCenterAchievementGroupAchievementLinkageResponse: Hashable, Co case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case gameCenterAchievements } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterAchievementImageResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterAchievementImageResponse.generated.swift index ee2eddfd..73ab1706 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterAchievementImageResponse.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterAchievementImageResponse.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct GameCenterAchievementImageResponse: Hashable, Codable { +public struct GameCenterAchievementImageResponse: Hashable, Codable, Sendable { public var data: GameCenterAchievementImage public var included: [GameCenterAchievementLocalization]? diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterAchievementLocalizationGameCenterAchievementImageLinkageResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterAchievementLocalizationGameCenterAchievementImageLinkageResponse.generated.swift new file mode 100644 index 00000000..74c2eaf6 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterAchievementLocalizationGameCenterAchievementImageLinkageResponse.generated.swift @@ -0,0 +1,48 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct GameCenterAchievementLocalizationGameCenterAchievementImageLinkageResponse: Hashable, Codable, Sendable { + public var data: Data + + public var links: DocumentLinks + + public init( + data: Data, + links: DocumentLinks + ) { + self.data = data + self.links = links + } + + private enum CodingKeys: String, CodingKey { + case data + case links + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case gameCenterAchievementImages + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterAchievementLocalizationGameCenterAchievementLinkageResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterAchievementLocalizationGameCenterAchievementLinkageResponse.generated.swift new file mode 100644 index 00000000..6b6b100a --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterAchievementLocalizationGameCenterAchievementLinkageResponse.generated.swift @@ -0,0 +1,48 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct GameCenterAchievementLocalizationGameCenterAchievementLinkageResponse: Hashable, Codable, Sendable { + public var data: Data + + public var links: DocumentLinks + + public init( + data: Data, + links: DocumentLinks + ) { + self.data = data + self.links = links + } + + private enum CodingKeys: String, CodingKey { + case data + case links + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case gameCenterAchievements + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterAchievementLocalizationResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterAchievementLocalizationResponse.generated.swift index cc77812b..c174e43d 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterAchievementLocalizationResponse.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterAchievementLocalizationResponse.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct GameCenterAchievementLocalizationResponse: Hashable, Codable { +public struct GameCenterAchievementLocalizationResponse: Hashable, Codable, Sendable { public var data: GameCenterAchievementLocalization public var included: [Included]? @@ -26,7 +26,7 @@ public struct GameCenterAchievementLocalizationResponse: Hashable, Codable { case links } - public enum Included: Hashable, Codable { + public enum Included: Hashable, Codable, Sendable { case gameCenterAchievement(GameCenterAchievement) case gameCenterAchievementImage(GameCenterAchievementImage) diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterAchievementLocalizationsLinkagesResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterAchievementLocalizationsLinkagesResponse.generated.swift new file mode 100644 index 00000000..3ad418e7 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterAchievementLocalizationsLinkagesResponse.generated.swift @@ -0,0 +1,53 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct GameCenterAchievementLocalizationsLinkagesResponse: Hashable, Codable, Sendable { + public var data: [Data] + + public var links: PagedDocumentLinks + + public var meta: PagingInformation? + + public init( + data: [Data], + links: PagedDocumentLinks, + meta: PagingInformation? = nil + ) { + self.data = data + self.links = links + self.meta = meta + } + + private enum CodingKeys: String, CodingKey { + case data + case links + case meta + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case gameCenterAchievementLocalizations + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterAchievementLocalizationsResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterAchievementLocalizationsResponse.generated.swift index c536d539..44ea5fc1 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterAchievementLocalizationsResponse.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterAchievementLocalizationsResponse.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct GameCenterAchievementLocalizationsResponse: Hashable, Codable { +public struct GameCenterAchievementLocalizationsResponse: Hashable, Codable, Sendable { public var data: [GameCenterAchievementLocalization] public var included: [Included]? @@ -31,7 +31,7 @@ public struct GameCenterAchievementLocalizationsResponse: Hashable, Codable { case meta } - public enum Included: Hashable, Codable { + public enum Included: Hashable, Codable, Sendable { case gameCenterAchievement(GameCenterAchievement) case gameCenterAchievementImage(GameCenterAchievementImage) diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterAchievementReleaseResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterAchievementReleaseResponse.generated.swift index b0ccb713..894c71bd 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterAchievementReleaseResponse.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterAchievementReleaseResponse.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct GameCenterAchievementReleaseResponse: Hashable, Codable { +public struct GameCenterAchievementReleaseResponse: Hashable, Codable, Sendable { public var data: GameCenterAchievementRelease public var included: [Included]? @@ -26,7 +26,7 @@ public struct GameCenterAchievementReleaseResponse: Hashable, Codable { case links } - public enum Included: Hashable, Codable { + public enum Included: Hashable, Codable, Sendable { case gameCenterDetail(GameCenterDetail) case gameCenterAchievement(GameCenterAchievement) diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterAchievementReleasesLinkagesResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterAchievementReleasesLinkagesResponse.generated.swift new file mode 100644 index 00000000..c3a7acd6 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterAchievementReleasesLinkagesResponse.generated.swift @@ -0,0 +1,53 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct GameCenterAchievementReleasesLinkagesResponse: Hashable, Codable, Sendable { + public var data: [Data] + + public var links: PagedDocumentLinks + + public var meta: PagingInformation? + + public init( + data: [Data], + links: PagedDocumentLinks, + meta: PagingInformation? = nil + ) { + self.data = data + self.links = links + self.meta = meta + } + + private enum CodingKeys: String, CodingKey { + case data + case links + case meta + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case gameCenterAchievementReleases + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterAchievementReleasesResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterAchievementReleasesResponse.generated.swift index 1113831c..ed2b27c1 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterAchievementReleasesResponse.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterAchievementReleasesResponse.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct GameCenterAchievementReleasesResponse: Hashable, Codable { +public struct GameCenterAchievementReleasesResponse: Hashable, Codable, Sendable { public var data: [GameCenterAchievementRelease] public var included: [Included]? @@ -31,7 +31,7 @@ public struct GameCenterAchievementReleasesResponse: Hashable, Codable { case meta } - public enum Included: Hashable, Codable { + public enum Included: Hashable, Codable, Sendable { case gameCenterDetail(GameCenterDetail) case gameCenterAchievement(GameCenterAchievement) diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterAchievementResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterAchievementResponse.generated.swift index ec5bc1c8..f98fcb38 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterAchievementResponse.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterAchievementResponse.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct GameCenterAchievementResponse: Hashable, Codable { +public struct GameCenterAchievementResponse: Hashable, Codable, Sendable { public var data: GameCenterAchievement public var included: [Included]? @@ -26,12 +26,13 @@ public struct GameCenterAchievementResponse: Hashable, Codable { case links } - public enum Included: Hashable, Codable { + public enum Included: Hashable, Codable, Sendable { case gameCenterDetail(GameCenterDetail) case gameCenterGroup(GameCenterGroup) case gameCenterAchievement(GameCenterAchievement) case gameCenterAchievementLocalization(GameCenterAchievementLocalization) case gameCenterAchievementRelease(GameCenterAchievementRelease) + case gameCenterActivity(GameCenterActivity) public init(from decoder: Decoder) throws { self = try { @@ -61,6 +62,11 @@ public struct GameCenterAchievementResponse: Hashable, Codable { } catch { lastError = error } + do { + return .gameCenterActivity(try GameCenterActivity(from: decoder)) + } catch { + lastError = error + } throw lastError }() } @@ -81,6 +87,9 @@ public struct GameCenterAchievementResponse: Hashable, Codable { case .gameCenterAchievementRelease(let value): try value.encode(to: encoder) + + case .gameCenterActivity(let value): + try value.encode(to: encoder) } } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterAchievementsResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterAchievementsResponse.generated.swift index 99ab5024..2c50f635 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterAchievementsResponse.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterAchievementsResponse.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct GameCenterAchievementsResponse: Hashable, Codable { +public struct GameCenterAchievementsResponse: Hashable, Codable, Sendable { public var data: [GameCenterAchievement] public var included: [Included]? @@ -31,12 +31,13 @@ public struct GameCenterAchievementsResponse: Hashable, Codable { case meta } - public enum Included: Hashable, Codable { + public enum Included: Hashable, Codable, Sendable { case gameCenterDetail(GameCenterDetail) case gameCenterGroup(GameCenterGroup) case gameCenterAchievement(GameCenterAchievement) case gameCenterAchievementLocalization(GameCenterAchievementLocalization) case gameCenterAchievementRelease(GameCenterAchievementRelease) + case gameCenterActivity(GameCenterActivity) public init(from decoder: Decoder) throws { self = try { @@ -66,6 +67,11 @@ public struct GameCenterAchievementsResponse: Hashable, Codable { } catch { lastError = error } + do { + return .gameCenterActivity(try GameCenterActivity(from: decoder)) + } catch { + lastError = error + } throw lastError }() } @@ -86,6 +92,9 @@ public struct GameCenterAchievementsResponse: Hashable, Codable { case .gameCenterAchievementRelease(let value): try value.encode(to: encoder) + + case .gameCenterActivity(let value): + try value.encode(to: encoder) } } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterActivitiesResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterActivitiesResponse.generated.swift new file mode 100644 index 00000000..c6b6c33c --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterActivitiesResponse.generated.swift @@ -0,0 +1,94 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct GameCenterActivitiesResponse: Hashable, Codable, Sendable { + public var data: [GameCenterActivity] + + public var included: [Included]? + + public var links: PagedDocumentLinks + + public var meta: PagingInformation? + + public init( + data: [GameCenterActivity], + included: [Included]? = nil, + links: PagedDocumentLinks, + meta: PagingInformation? = nil + ) { + self.data = data + self.included = included + self.links = links + self.meta = meta + } + + private enum CodingKeys: String, CodingKey { + case data + case included + case links + case meta + } + + public enum Included: Hashable, Codable, Sendable { + case gameCenterDetail(GameCenterDetail) + case gameCenterGroup(GameCenterGroup) + case gameCenterAchievement(GameCenterAchievement) + case gameCenterLeaderboard(GameCenterLeaderboard) + case gameCenterActivityVersion(GameCenterActivityVersion) + + public init(from decoder: Decoder) throws { + self = try { + var lastError: Error! + do { + return .gameCenterDetail(try GameCenterDetail(from: decoder)) + } catch { + lastError = error + } + do { + return .gameCenterGroup(try GameCenterGroup(from: decoder)) + } catch { + lastError = error + } + do { + return .gameCenterAchievement(try GameCenterAchievement(from: decoder)) + } catch { + lastError = error + } + do { + return .gameCenterLeaderboard(try GameCenterLeaderboard(from: decoder)) + } catch { + lastError = error + } + do { + return .gameCenterActivityVersion(try GameCenterActivityVersion(from: decoder)) + } catch { + lastError = error + } + throw lastError + }() + } + + public func encode(to encoder: Encoder) throws { + switch self { + case .gameCenterDetail(let value): + try value.encode(to: encoder) + + case .gameCenterGroup(let value): + try value.encode(to: encoder) + + case .gameCenterAchievement(let value): + try value.encode(to: encoder) + + case .gameCenterLeaderboard(let value): + try value.encode(to: encoder) + + case .gameCenterActivityVersion(let value): + try value.encode(to: encoder) + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterActivityImageResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterActivityImageResponse.generated.swift new file mode 100644 index 00000000..6f215b7e --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterActivityImageResponse.generated.swift @@ -0,0 +1,25 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct GameCenterActivityImageResponse: Hashable, Codable, Sendable { + public var data: GameCenterActivityImage + + public var links: DocumentLinks + + public init( + data: GameCenterActivityImage, + links: DocumentLinks + ) { + self.data = data + self.links = links + } + + private enum CodingKeys: String, CodingKey { + case data + case links + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterActivityLocalizationImageLinkageResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterActivityLocalizationImageLinkageResponse.generated.swift new file mode 100644 index 00000000..5f7f6abe --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterActivityLocalizationImageLinkageResponse.generated.swift @@ -0,0 +1,48 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct GameCenterActivityLocalizationImageLinkageResponse: Hashable, Codable, Sendable { + public var data: Data + + public var links: DocumentLinks + + public init( + data: Data, + links: DocumentLinks + ) { + self.data = data + self.links = links + } + + private enum CodingKeys: String, CodingKey { + case data + case links + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case gameCenterActivityImages + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterActivityLocalizationResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterActivityLocalizationResponse.generated.swift new file mode 100644 index 00000000..86ad80d0 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterActivityLocalizationResponse.generated.swift @@ -0,0 +1,62 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct GameCenterActivityLocalizationResponse: Hashable, Codable, Sendable { + public var data: GameCenterActivityLocalization + + public var included: [Included]? + + public var links: DocumentLinks + + public init( + data: GameCenterActivityLocalization, + included: [Included]? = nil, + links: DocumentLinks + ) { + self.data = data + self.included = included + self.links = links + } + + private enum CodingKeys: String, CodingKey { + case data + case included + case links + } + + public enum Included: Hashable, Codable, Sendable { + case gameCenterActivityVersion(GameCenterActivityVersion) + case gameCenterActivityImage(GameCenterActivityImage) + + public init(from decoder: Decoder) throws { + self = try { + var lastError: Error! + do { + return .gameCenterActivityVersion(try GameCenterActivityVersion(from: decoder)) + } catch { + lastError = error + } + do { + return .gameCenterActivityImage(try GameCenterActivityImage(from: decoder)) + } catch { + lastError = error + } + throw lastError + }() + } + + public func encode(to encoder: Encoder) throws { + switch self { + case .gameCenterActivityVersion(let value): + try value.encode(to: encoder) + + case .gameCenterActivityImage(let value): + try value.encode(to: encoder) + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterActivityLocalizationsResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterActivityLocalizationsResponse.generated.swift new file mode 100644 index 00000000..ea04f887 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterActivityLocalizationsResponse.generated.swift @@ -0,0 +1,67 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct GameCenterActivityLocalizationsResponse: Hashable, Codable, Sendable { + public var data: [GameCenterActivityLocalization] + + public var included: [Included]? + + public var links: PagedDocumentLinks + + public var meta: PagingInformation? + + public init( + data: [GameCenterActivityLocalization], + included: [Included]? = nil, + links: PagedDocumentLinks, + meta: PagingInformation? = nil + ) { + self.data = data + self.included = included + self.links = links + self.meta = meta + } + + private enum CodingKeys: String, CodingKey { + case data + case included + case links + case meta + } + + public enum Included: Hashable, Codable, Sendable { + case gameCenterActivityVersion(GameCenterActivityVersion) + case gameCenterActivityImage(GameCenterActivityImage) + + public init(from decoder: Decoder) throws { + self = try { + var lastError: Error! + do { + return .gameCenterActivityVersion(try GameCenterActivityVersion(from: decoder)) + } catch { + lastError = error + } + do { + return .gameCenterActivityImage(try GameCenterActivityImage(from: decoder)) + } catch { + lastError = error + } + throw lastError + }() + } + + public func encode(to encoder: Encoder) throws { + switch self { + case .gameCenterActivityVersion(let value): + try value.encode(to: encoder) + + case .gameCenterActivityImage(let value): + try value.encode(to: encoder) + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterActivityResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterActivityResponse.generated.swift new file mode 100644 index 00000000..82f1f01e --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterActivityResponse.generated.swift @@ -0,0 +1,89 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct GameCenterActivityResponse: Hashable, Codable, Sendable { + public var data: GameCenterActivity + + public var included: [Included]? + + public var links: DocumentLinks + + public init( + data: GameCenterActivity, + included: [Included]? = nil, + links: DocumentLinks + ) { + self.data = data + self.included = included + self.links = links + } + + private enum CodingKeys: String, CodingKey { + case data + case included + case links + } + + public enum Included: Hashable, Codable, Sendable { + case gameCenterDetail(GameCenterDetail) + case gameCenterGroup(GameCenterGroup) + case gameCenterAchievement(GameCenterAchievement) + case gameCenterLeaderboard(GameCenterLeaderboard) + case gameCenterActivityVersion(GameCenterActivityVersion) + + public init(from decoder: Decoder) throws { + self = try { + var lastError: Error! + do { + return .gameCenterDetail(try GameCenterDetail(from: decoder)) + } catch { + lastError = error + } + do { + return .gameCenterGroup(try GameCenterGroup(from: decoder)) + } catch { + lastError = error + } + do { + return .gameCenterAchievement(try GameCenterAchievement(from: decoder)) + } catch { + lastError = error + } + do { + return .gameCenterLeaderboard(try GameCenterLeaderboard(from: decoder)) + } catch { + lastError = error + } + do { + return .gameCenterActivityVersion(try GameCenterActivityVersion(from: decoder)) + } catch { + lastError = error + } + throw lastError + }() + } + + public func encode(to encoder: Encoder) throws { + switch self { + case .gameCenterDetail(let value): + try value.encode(to: encoder) + + case .gameCenterGroup(let value): + try value.encode(to: encoder) + + case .gameCenterAchievement(let value): + try value.encode(to: encoder) + + case .gameCenterLeaderboard(let value): + try value.encode(to: encoder) + + case .gameCenterActivityVersion(let value): + try value.encode(to: encoder) + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterActivityVersionDefaultImageLinkageResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterActivityVersionDefaultImageLinkageResponse.generated.swift new file mode 100644 index 00000000..e5dca8ce --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterActivityVersionDefaultImageLinkageResponse.generated.swift @@ -0,0 +1,48 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct GameCenterActivityVersionDefaultImageLinkageResponse: Hashable, Codable, Sendable { + public var data: Data + + public var links: DocumentLinks + + public init( + data: Data, + links: DocumentLinks + ) { + self.data = data + self.links = links + } + + private enum CodingKeys: String, CodingKey { + case data + case links + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case gameCenterActivityImages + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterActivityVersionLocalizationsLinkagesResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterActivityVersionLocalizationsLinkagesResponse.generated.swift new file mode 100644 index 00000000..2ea55e83 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterActivityVersionLocalizationsLinkagesResponse.generated.swift @@ -0,0 +1,53 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct GameCenterActivityVersionLocalizationsLinkagesResponse: Hashable, Codable, Sendable { + public var data: [Data] + + public var links: PagedDocumentLinks + + public var meta: PagingInformation? + + public init( + data: [Data], + links: PagedDocumentLinks, + meta: PagingInformation? = nil + ) { + self.data = data + self.links = links + self.meta = meta + } + + private enum CodingKeys: String, CodingKey { + case data + case links + case meta + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case gameCenterActivityLocalizations + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterActivityVersionReleaseResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterActivityVersionReleaseResponse.generated.swift new file mode 100644 index 00000000..f53c07f5 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterActivityVersionReleaseResponse.generated.swift @@ -0,0 +1,30 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct GameCenterActivityVersionReleaseResponse: Hashable, Codable, Sendable { + public var data: GameCenterActivityVersionRelease + + public var included: [GameCenterActivityVersion]? + + public var links: DocumentLinks + + public init( + data: GameCenterActivityVersionRelease, + included: [GameCenterActivityVersion]? = nil, + links: DocumentLinks + ) { + self.data = data + self.included = included + self.links = links + } + + private enum CodingKeys: String, CodingKey { + case data + case included + case links + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterActivityVersionReleasesResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterActivityVersionReleasesResponse.generated.swift new file mode 100644 index 00000000..893c181b --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterActivityVersionReleasesResponse.generated.swift @@ -0,0 +1,35 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct GameCenterActivityVersionReleasesResponse: Hashable, Codable, Sendable { + public var data: [GameCenterActivityVersionRelease] + + public var included: [GameCenterActivityVersion]? + + public var links: PagedDocumentLinks + + public var meta: PagingInformation? + + public init( + data: [GameCenterActivityVersionRelease], + included: [GameCenterActivityVersion]? = nil, + links: PagedDocumentLinks, + meta: PagingInformation? = nil + ) { + self.data = data + self.included = included + self.links = links + self.meta = meta + } + + private enum CodingKeys: String, CodingKey { + case data + case included + case links + case meta + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterActivityVersionResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterActivityVersionResponse.generated.swift new file mode 100644 index 00000000..bb97742d --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterActivityVersionResponse.generated.swift @@ -0,0 +1,80 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct GameCenterActivityVersionResponse: Hashable, Codable, Sendable { + public var data: GameCenterActivityVersion + + public var included: [Included]? + + public var links: DocumentLinks + + public init( + data: GameCenterActivityVersion, + included: [Included]? = nil, + links: DocumentLinks + ) { + self.data = data + self.included = included + self.links = links + } + + private enum CodingKeys: String, CodingKey { + case data + case included + case links + } + + public enum Included: Hashable, Codable, Sendable { + case gameCenterActivity(GameCenterActivity) + case gameCenterActivityLocalization(GameCenterActivityLocalization) + case gameCenterActivityImage(GameCenterActivityImage) + case gameCenterActivityVersionRelease(GameCenterActivityVersionRelease) + + public init(from decoder: Decoder) throws { + self = try { + var lastError: Error! + do { + return .gameCenterActivity(try GameCenterActivity(from: decoder)) + } catch { + lastError = error + } + do { + return .gameCenterActivityLocalization(try GameCenterActivityLocalization(from: decoder)) + } catch { + lastError = error + } + do { + return .gameCenterActivityImage(try GameCenterActivityImage(from: decoder)) + } catch { + lastError = error + } + do { + return .gameCenterActivityVersionRelease(try GameCenterActivityVersionRelease(from: decoder)) + } catch { + lastError = error + } + throw lastError + }() + } + + public func encode(to encoder: Encoder) throws { + switch self { + case .gameCenterActivity(let value): + try value.encode(to: encoder) + + case .gameCenterActivityLocalization(let value): + try value.encode(to: encoder) + + case .gameCenterActivityImage(let value): + try value.encode(to: encoder) + + case .gameCenterActivityVersionRelease(let value): + try value.encode(to: encoder) + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterActivityVersionsLinkagesResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterActivityVersionsLinkagesResponse.generated.swift new file mode 100644 index 00000000..cb19ef79 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterActivityVersionsLinkagesResponse.generated.swift @@ -0,0 +1,53 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct GameCenterActivityVersionsLinkagesResponse: Hashable, Codable, Sendable { + public var data: [Data] + + public var links: PagedDocumentLinks + + public var meta: PagingInformation? + + public init( + data: [Data], + links: PagedDocumentLinks, + meta: PagingInformation? = nil + ) { + self.data = data + self.links = links + self.meta = meta + } + + private enum CodingKeys: String, CodingKey { + case data + case links + case meta + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case gameCenterActivityVersions + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterActivityVersionsResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterActivityVersionsResponse.generated.swift new file mode 100644 index 00000000..6c65bb76 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterActivityVersionsResponse.generated.swift @@ -0,0 +1,85 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct GameCenterActivityVersionsResponse: Hashable, Codable, Sendable { + public var data: [GameCenterActivityVersion] + + public var included: [Included]? + + public var links: PagedDocumentLinks + + public var meta: PagingInformation? + + public init( + data: [GameCenterActivityVersion], + included: [Included]? = nil, + links: PagedDocumentLinks, + meta: PagingInformation? = nil + ) { + self.data = data + self.included = included + self.links = links + self.meta = meta + } + + private enum CodingKeys: String, CodingKey { + case data + case included + case links + case meta + } + + public enum Included: Hashable, Codable, Sendable { + case gameCenterActivity(GameCenterActivity) + case gameCenterActivityLocalization(GameCenterActivityLocalization) + case gameCenterActivityImage(GameCenterActivityImage) + case gameCenterActivityVersionRelease(GameCenterActivityVersionRelease) + + public init(from decoder: Decoder) throws { + self = try { + var lastError: Error! + do { + return .gameCenterActivity(try GameCenterActivity(from: decoder)) + } catch { + lastError = error + } + do { + return .gameCenterActivityLocalization(try GameCenterActivityLocalization(from: decoder)) + } catch { + lastError = error + } + do { + return .gameCenterActivityImage(try GameCenterActivityImage(from: decoder)) + } catch { + lastError = error + } + do { + return .gameCenterActivityVersionRelease(try GameCenterActivityVersionRelease(from: decoder)) + } catch { + lastError = error + } + throw lastError + }() + } + + public func encode(to encoder: Encoder) throws { + switch self { + case .gameCenterActivity(let value): + try value.encode(to: encoder) + + case .gameCenterActivityLocalization(let value): + try value.encode(to: encoder) + + case .gameCenterActivityImage(let value): + try value.encode(to: encoder) + + case .gameCenterActivityVersionRelease(let value): + try value.encode(to: encoder) + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterAppVersionAppStoreVersionLinkageResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterAppVersionAppStoreVersionLinkageResponse.generated.swift new file mode 100644 index 00000000..b589c7dc --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterAppVersionAppStoreVersionLinkageResponse.generated.swift @@ -0,0 +1,48 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct GameCenterAppVersionAppStoreVersionLinkageResponse: Hashable, Codable, Sendable { + public var data: Data + + public var links: DocumentLinks + + public init( + data: Data, + links: DocumentLinks + ) { + self.data = data + self.links = links + } + + private enum CodingKeys: String, CodingKey { + case data + case links + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case appStoreVersions + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterAppVersionCompatibilityVersionsLinkagesResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterAppVersionCompatibilityVersionsLinkagesResponse.generated.swift index d7c1e542..669a4a96 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterAppVersionCompatibilityVersionsLinkagesResponse.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterAppVersionCompatibilityVersionsLinkagesResponse.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct GameCenterAppVersionCompatibilityVersionsLinkagesResponse: Hashable, Codable { +public struct GameCenterAppVersionCompatibilityVersionsLinkagesResponse: Hashable, Codable, Sendable { public var data: [Data] public var links: PagedDocumentLinks @@ -26,7 +26,7 @@ public struct GameCenterAppVersionCompatibilityVersionsLinkagesResponse: Hashabl case meta } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -44,7 +44,7 @@ public struct GameCenterAppVersionCompatibilityVersionsLinkagesResponse: Hashabl case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case gameCenterAppVersions } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterAppVersionResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterAppVersionResponse.generated.swift index dcba73fa..28607a37 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterAppVersionResponse.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterAppVersionResponse.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct GameCenterAppVersionResponse: Hashable, Codable { +public struct GameCenterAppVersionResponse: Hashable, Codable, Sendable { public var data: GameCenterAppVersion public var included: [Included]? @@ -26,7 +26,7 @@ public struct GameCenterAppVersionResponse: Hashable, Codable { case links } - public enum Included: Hashable, Codable { + public enum Included: Hashable, Codable, Sendable { case gameCenterAppVersion(GameCenterAppVersion) case appStoreVersion(AppStoreVersion) diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterAppVersionsResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterAppVersionsResponse.generated.swift index e91f233a..0359fbf4 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterAppVersionsResponse.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterAppVersionsResponse.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct GameCenterAppVersionsResponse: Hashable, Codable { +public struct GameCenterAppVersionsResponse: Hashable, Codable, Sendable { public var data: [GameCenterAppVersion] public var included: [Included]? @@ -31,7 +31,7 @@ public struct GameCenterAppVersionsResponse: Hashable, Codable { case meta } - public enum Included: Hashable, Codable { + public enum Included: Hashable, Codable, Sendable { case gameCenterAppVersion(GameCenterAppVersion) case appStoreVersion(AppStoreVersion) diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterChallengeImageResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterChallengeImageResponse.generated.swift new file mode 100644 index 00000000..8fdfd1f7 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterChallengeImageResponse.generated.swift @@ -0,0 +1,25 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct GameCenterChallengeImageResponse: Hashable, Codable, Sendable { + public var data: GameCenterChallengeImage + + public var links: DocumentLinks + + public init( + data: GameCenterChallengeImage, + links: DocumentLinks + ) { + self.data = data + self.links = links + } + + private enum CodingKeys: String, CodingKey { + case data + case links + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterChallengeLocalizationImageLinkageResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterChallengeLocalizationImageLinkageResponse.generated.swift new file mode 100644 index 00000000..078dcf46 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterChallengeLocalizationImageLinkageResponse.generated.swift @@ -0,0 +1,48 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct GameCenterChallengeLocalizationImageLinkageResponse: Hashable, Codable, Sendable { + public var data: Data + + public var links: DocumentLinks + + public init( + data: Data, + links: DocumentLinks + ) { + self.data = data + self.links = links + } + + private enum CodingKeys: String, CodingKey { + case data + case links + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case gameCenterChallengeImages + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterChallengeLocalizationResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterChallengeLocalizationResponse.generated.swift new file mode 100644 index 00000000..a839f8a8 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterChallengeLocalizationResponse.generated.swift @@ -0,0 +1,62 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct GameCenterChallengeLocalizationResponse: Hashable, Codable, Sendable { + public var data: GameCenterChallengeLocalization + + public var included: [Included]? + + public var links: DocumentLinks + + public init( + data: GameCenterChallengeLocalization, + included: [Included]? = nil, + links: DocumentLinks + ) { + self.data = data + self.included = included + self.links = links + } + + private enum CodingKeys: String, CodingKey { + case data + case included + case links + } + + public enum Included: Hashable, Codable, Sendable { + case gameCenterChallengeVersion(GameCenterChallengeVersion) + case gameCenterChallengeImage(GameCenterChallengeImage) + + public init(from decoder: Decoder) throws { + self = try { + var lastError: Error! + do { + return .gameCenterChallengeVersion(try GameCenterChallengeVersion(from: decoder)) + } catch { + lastError = error + } + do { + return .gameCenterChallengeImage(try GameCenterChallengeImage(from: decoder)) + } catch { + lastError = error + } + throw lastError + }() + } + + public func encode(to encoder: Encoder) throws { + switch self { + case .gameCenterChallengeVersion(let value): + try value.encode(to: encoder) + + case .gameCenterChallengeImage(let value): + try value.encode(to: encoder) + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterChallengeLocalizationsResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterChallengeLocalizationsResponse.generated.swift new file mode 100644 index 00000000..2b70f428 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterChallengeLocalizationsResponse.generated.swift @@ -0,0 +1,67 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct GameCenterChallengeLocalizationsResponse: Hashable, Codable, Sendable { + public var data: [GameCenterChallengeLocalization] + + public var included: [Included]? + + public var links: PagedDocumentLinks + + public var meta: PagingInformation? + + public init( + data: [GameCenterChallengeLocalization], + included: [Included]? = nil, + links: PagedDocumentLinks, + meta: PagingInformation? = nil + ) { + self.data = data + self.included = included + self.links = links + self.meta = meta + } + + private enum CodingKeys: String, CodingKey { + case data + case included + case links + case meta + } + + public enum Included: Hashable, Codable, Sendable { + case gameCenterChallengeVersion(GameCenterChallengeVersion) + case gameCenterChallengeImage(GameCenterChallengeImage) + + public init(from decoder: Decoder) throws { + self = try { + var lastError: Error! + do { + return .gameCenterChallengeVersion(try GameCenterChallengeVersion(from: decoder)) + } catch { + lastError = error + } + do { + return .gameCenterChallengeImage(try GameCenterChallengeImage(from: decoder)) + } catch { + lastError = error + } + throw lastError + }() + } + + public func encode(to encoder: Encoder) throws { + switch self { + case .gameCenterChallengeVersion(let value): + try value.encode(to: encoder) + + case .gameCenterChallengeImage(let value): + try value.encode(to: encoder) + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterChallengeResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterChallengeResponse.generated.swift new file mode 100644 index 00000000..c64771eb --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterChallengeResponse.generated.swift @@ -0,0 +1,80 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct GameCenterChallengeResponse: Hashable, Codable, Sendable { + public var data: GameCenterChallenge + + public var included: [Included]? + + public var links: DocumentLinks + + public init( + data: GameCenterChallenge, + included: [Included]? = nil, + links: DocumentLinks + ) { + self.data = data + self.included = included + self.links = links + } + + private enum CodingKeys: String, CodingKey { + case data + case included + case links + } + + public enum Included: Hashable, Codable, Sendable { + case gameCenterDetail(GameCenterDetail) + case gameCenterGroup(GameCenterGroup) + case gameCenterChallengeVersion(GameCenterChallengeVersion) + case gameCenterLeaderboard(GameCenterLeaderboard) + + public init(from decoder: Decoder) throws { + self = try { + var lastError: Error! + do { + return .gameCenterDetail(try GameCenterDetail(from: decoder)) + } catch { + lastError = error + } + do { + return .gameCenterGroup(try GameCenterGroup(from: decoder)) + } catch { + lastError = error + } + do { + return .gameCenterChallengeVersion(try GameCenterChallengeVersion(from: decoder)) + } catch { + lastError = error + } + do { + return .gameCenterLeaderboard(try GameCenterLeaderboard(from: decoder)) + } catch { + lastError = error + } + throw lastError + }() + } + + public func encode(to encoder: Encoder) throws { + switch self { + case .gameCenterDetail(let value): + try value.encode(to: encoder) + + case .gameCenterGroup(let value): + try value.encode(to: encoder) + + case .gameCenterChallengeVersion(let value): + try value.encode(to: encoder) + + case .gameCenterLeaderboard(let value): + try value.encode(to: encoder) + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterChallengeVersionDefaultImageLinkageResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterChallengeVersionDefaultImageLinkageResponse.generated.swift new file mode 100644 index 00000000..9da51236 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterChallengeVersionDefaultImageLinkageResponse.generated.swift @@ -0,0 +1,48 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct GameCenterChallengeVersionDefaultImageLinkageResponse: Hashable, Codable, Sendable { + public var data: Data + + public var links: DocumentLinks + + public init( + data: Data, + links: DocumentLinks + ) { + self.data = data + self.links = links + } + + private enum CodingKeys: String, CodingKey { + case data + case links + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case gameCenterChallengeImages + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterChallengeVersionLocalizationsLinkagesResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterChallengeVersionLocalizationsLinkagesResponse.generated.swift new file mode 100644 index 00000000..085ad346 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterChallengeVersionLocalizationsLinkagesResponse.generated.swift @@ -0,0 +1,53 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct GameCenterChallengeVersionLocalizationsLinkagesResponse: Hashable, Codable, Sendable { + public var data: [Data] + + public var links: PagedDocumentLinks + + public var meta: PagingInformation? + + public init( + data: [Data], + links: PagedDocumentLinks, + meta: PagingInformation? = nil + ) { + self.data = data + self.links = links + self.meta = meta + } + + private enum CodingKeys: String, CodingKey { + case data + case links + case meta + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case gameCenterChallengeLocalizations + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterChallengeVersionReleaseResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterChallengeVersionReleaseResponse.generated.swift new file mode 100644 index 00000000..4849f715 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterChallengeVersionReleaseResponse.generated.swift @@ -0,0 +1,30 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct GameCenterChallengeVersionReleaseResponse: Hashable, Codable, Sendable { + public var data: GameCenterChallengeVersionRelease + + public var included: [GameCenterChallengeVersion]? + + public var links: DocumentLinks + + public init( + data: GameCenterChallengeVersionRelease, + included: [GameCenterChallengeVersion]? = nil, + links: DocumentLinks + ) { + self.data = data + self.included = included + self.links = links + } + + private enum CodingKeys: String, CodingKey { + case data + case included + case links + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterChallengeVersionReleasesResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterChallengeVersionReleasesResponse.generated.swift new file mode 100644 index 00000000..721467bf --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterChallengeVersionReleasesResponse.generated.swift @@ -0,0 +1,35 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct GameCenterChallengeVersionReleasesResponse: Hashable, Codable, Sendable { + public var data: [GameCenterChallengeVersionRelease] + + public var included: [GameCenterChallengeVersion]? + + public var links: PagedDocumentLinks + + public var meta: PagingInformation? + + public init( + data: [GameCenterChallengeVersionRelease], + included: [GameCenterChallengeVersion]? = nil, + links: PagedDocumentLinks, + meta: PagingInformation? = nil + ) { + self.data = data + self.included = included + self.links = links + self.meta = meta + } + + private enum CodingKeys: String, CodingKey { + case data + case included + case links + case meta + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterChallengeVersionResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterChallengeVersionResponse.generated.swift new file mode 100644 index 00000000..aa38e1fd --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterChallengeVersionResponse.generated.swift @@ -0,0 +1,80 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct GameCenterChallengeVersionResponse: Hashable, Codable, Sendable { + public var data: GameCenterChallengeVersion + + public var included: [Included]? + + public var links: DocumentLinks + + public init( + data: GameCenterChallengeVersion, + included: [Included]? = nil, + links: DocumentLinks + ) { + self.data = data + self.included = included + self.links = links + } + + private enum CodingKeys: String, CodingKey { + case data + case included + case links + } + + public enum Included: Hashable, Codable, Sendable { + case gameCenterChallenge(GameCenterChallenge) + case gameCenterChallengeLocalization(GameCenterChallengeLocalization) + case gameCenterChallengeVersionRelease(GameCenterChallengeVersionRelease) + case gameCenterChallengeImage(GameCenterChallengeImage) + + public init(from decoder: Decoder) throws { + self = try { + var lastError: Error! + do { + return .gameCenterChallenge(try GameCenterChallenge(from: decoder)) + } catch { + lastError = error + } + do { + return .gameCenterChallengeLocalization(try GameCenterChallengeLocalization(from: decoder)) + } catch { + lastError = error + } + do { + return .gameCenterChallengeVersionRelease(try GameCenterChallengeVersionRelease(from: decoder)) + } catch { + lastError = error + } + do { + return .gameCenterChallengeImage(try GameCenterChallengeImage(from: decoder)) + } catch { + lastError = error + } + throw lastError + }() + } + + public func encode(to encoder: Encoder) throws { + switch self { + case .gameCenterChallenge(let value): + try value.encode(to: encoder) + + case .gameCenterChallengeLocalization(let value): + try value.encode(to: encoder) + + case .gameCenterChallengeVersionRelease(let value): + try value.encode(to: encoder) + + case .gameCenterChallengeImage(let value): + try value.encode(to: encoder) + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterChallengeVersionsLinkagesResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterChallengeVersionsLinkagesResponse.generated.swift new file mode 100644 index 00000000..cb906c3d --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterChallengeVersionsLinkagesResponse.generated.swift @@ -0,0 +1,53 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct GameCenterChallengeVersionsLinkagesResponse: Hashable, Codable, Sendable { + public var data: [Data] + + public var links: PagedDocumentLinks + + public var meta: PagingInformation? + + public init( + data: [Data], + links: PagedDocumentLinks, + meta: PagingInformation? = nil + ) { + self.data = data + self.links = links + self.meta = meta + } + + private enum CodingKeys: String, CodingKey { + case data + case links + case meta + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case gameCenterChallengeVersions + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterChallengeVersionsResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterChallengeVersionsResponse.generated.swift new file mode 100644 index 00000000..90bab9f3 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterChallengeVersionsResponse.generated.swift @@ -0,0 +1,85 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct GameCenterChallengeVersionsResponse: Hashable, Codable, Sendable { + public var data: [GameCenterChallengeVersion] + + public var included: [Included]? + + public var links: PagedDocumentLinks + + public var meta: PagingInformation? + + public init( + data: [GameCenterChallengeVersion], + included: [Included]? = nil, + links: PagedDocumentLinks, + meta: PagingInformation? = nil + ) { + self.data = data + self.included = included + self.links = links + self.meta = meta + } + + private enum CodingKeys: String, CodingKey { + case data + case included + case links + case meta + } + + public enum Included: Hashable, Codable, Sendable { + case gameCenterChallenge(GameCenterChallenge) + case gameCenterChallengeLocalization(GameCenterChallengeLocalization) + case gameCenterChallengeVersionRelease(GameCenterChallengeVersionRelease) + case gameCenterChallengeImage(GameCenterChallengeImage) + + public init(from decoder: Decoder) throws { + self = try { + var lastError: Error! + do { + return .gameCenterChallenge(try GameCenterChallenge(from: decoder)) + } catch { + lastError = error + } + do { + return .gameCenterChallengeLocalization(try GameCenterChallengeLocalization(from: decoder)) + } catch { + lastError = error + } + do { + return .gameCenterChallengeVersionRelease(try GameCenterChallengeVersionRelease(from: decoder)) + } catch { + lastError = error + } + do { + return .gameCenterChallengeImage(try GameCenterChallengeImage(from: decoder)) + } catch { + lastError = error + } + throw lastError + }() + } + + public func encode(to encoder: Encoder) throws { + switch self { + case .gameCenterChallenge(let value): + try value.encode(to: encoder) + + case .gameCenterChallengeLocalization(let value): + try value.encode(to: encoder) + + case .gameCenterChallengeVersionRelease(let value): + try value.encode(to: encoder) + + case .gameCenterChallengeImage(let value): + try value.encode(to: encoder) + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterChallengesResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterChallengesResponse.generated.swift new file mode 100644 index 00000000..71605bb9 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterChallengesResponse.generated.swift @@ -0,0 +1,85 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct GameCenterChallengesResponse: Hashable, Codable, Sendable { + public var data: [GameCenterChallenge] + + public var included: [Included]? + + public var links: PagedDocumentLinks + + public var meta: PagingInformation? + + public init( + data: [GameCenterChallenge], + included: [Included]? = nil, + links: PagedDocumentLinks, + meta: PagingInformation? = nil + ) { + self.data = data + self.included = included + self.links = links + self.meta = meta + } + + private enum CodingKeys: String, CodingKey { + case data + case included + case links + case meta + } + + public enum Included: Hashable, Codable, Sendable { + case gameCenterDetail(GameCenterDetail) + case gameCenterGroup(GameCenterGroup) + case gameCenterChallengeVersion(GameCenterChallengeVersion) + case gameCenterLeaderboard(GameCenterLeaderboard) + + public init(from decoder: Decoder) throws { + self = try { + var lastError: Error! + do { + return .gameCenterDetail(try GameCenterDetail(from: decoder)) + } catch { + lastError = error + } + do { + return .gameCenterGroup(try GameCenterGroup(from: decoder)) + } catch { + lastError = error + } + do { + return .gameCenterChallengeVersion(try GameCenterChallengeVersion(from: decoder)) + } catch { + lastError = error + } + do { + return .gameCenterLeaderboard(try GameCenterLeaderboard(from: decoder)) + } catch { + lastError = error + } + throw lastError + }() + } + + public func encode(to encoder: Encoder) throws { + switch self { + case .gameCenterDetail(let value): + try value.encode(to: encoder) + + case .gameCenterGroup(let value): + try value.encode(to: encoder) + + case .gameCenterChallengeVersion(let value): + try value.encode(to: encoder) + + case .gameCenterLeaderboard(let value): + try value.encode(to: encoder) + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterDetailAchievementReleasesLinkagesResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterDetailAchievementReleasesLinkagesResponse.generated.swift new file mode 100644 index 00000000..1e3da5f8 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterDetailAchievementReleasesLinkagesResponse.generated.swift @@ -0,0 +1,53 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct GameCenterDetailAchievementReleasesLinkagesResponse: Hashable, Codable, Sendable { + public var data: [Data] + + public var links: PagedDocumentLinks + + public var meta: PagingInformation? + + public init( + data: [Data], + links: PagedDocumentLinks, + meta: PagingInformation? = nil + ) { + self.data = data + self.links = links + self.meta = meta + } + + private enum CodingKeys: String, CodingKey { + case data + case links + case meta + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case gameCenterAchievementReleases + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterDetailActivityReleasesLinkagesResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterDetailActivityReleasesLinkagesResponse.generated.swift new file mode 100644 index 00000000..e951715f --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterDetailActivityReleasesLinkagesResponse.generated.swift @@ -0,0 +1,53 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct GameCenterDetailActivityReleasesLinkagesResponse: Hashable, Codable, Sendable { + public var data: [Data] + + public var links: PagedDocumentLinks + + public var meta: PagingInformation? + + public init( + data: [Data], + links: PagedDocumentLinks, + meta: PagingInformation? = nil + ) { + self.data = data + self.links = links + self.meta = meta + } + + private enum CodingKeys: String, CodingKey { + case data + case links + case meta + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case gameCenterActivityVersionReleases + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterDetailChallengeReleasesLinkagesResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterDetailChallengeReleasesLinkagesResponse.generated.swift new file mode 100644 index 00000000..b66398c7 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterDetailChallengeReleasesLinkagesResponse.generated.swift @@ -0,0 +1,53 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct GameCenterDetailChallengeReleasesLinkagesResponse: Hashable, Codable, Sendable { + public var data: [Data] + + public var links: PagedDocumentLinks + + public var meta: PagingInformation? + + public init( + data: [Data], + links: PagedDocumentLinks, + meta: PagingInformation? = nil + ) { + self.data = data + self.links = links + self.meta = meta + } + + private enum CodingKeys: String, CodingKey { + case data + case links + case meta + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case gameCenterChallengeVersionReleases + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterDetailGameCenterAchievementsLinkagesResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterDetailGameCenterAchievementsLinkagesResponse.generated.swift index d67eb01d..0c564250 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterDetailGameCenterAchievementsLinkagesResponse.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterDetailGameCenterAchievementsLinkagesResponse.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct GameCenterDetailGameCenterAchievementsLinkagesResponse: Hashable, Codable { +public struct GameCenterDetailGameCenterAchievementsLinkagesResponse: Hashable, Codable, Sendable { public var data: [Data] public var links: PagedDocumentLinks @@ -26,7 +26,7 @@ public struct GameCenterDetailGameCenterAchievementsLinkagesResponse: Hashable, case meta } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -44,7 +44,7 @@ public struct GameCenterDetailGameCenterAchievementsLinkagesResponse: Hashable, case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case gameCenterAchievements } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterDetailGameCenterActivitiesLinkagesResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterDetailGameCenterActivitiesLinkagesResponse.generated.swift new file mode 100644 index 00000000..e8c78b47 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterDetailGameCenterActivitiesLinkagesResponse.generated.swift @@ -0,0 +1,53 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct GameCenterDetailGameCenterActivitiesLinkagesResponse: Hashable, Codable, Sendable { + public var data: [Data] + + public var links: PagedDocumentLinks + + public var meta: PagingInformation? + + public init( + data: [Data], + links: PagedDocumentLinks, + meta: PagingInformation? = nil + ) { + self.data = data + self.links = links + self.meta = meta + } + + private enum CodingKeys: String, CodingKey { + case data + case links + case meta + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case gameCenterActivities + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterDetailGameCenterAppVersionsLinkagesResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterDetailGameCenterAppVersionsLinkagesResponse.generated.swift new file mode 100644 index 00000000..5893089d --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterDetailGameCenterAppVersionsLinkagesResponse.generated.swift @@ -0,0 +1,53 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct GameCenterDetailGameCenterAppVersionsLinkagesResponse: Hashable, Codable, Sendable { + public var data: [Data] + + public var links: PagedDocumentLinks + + public var meta: PagingInformation? + + public init( + data: [Data], + links: PagedDocumentLinks, + meta: PagingInformation? = nil + ) { + self.data = data + self.links = links + self.meta = meta + } + + private enum CodingKeys: String, CodingKey { + case data + case links + case meta + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case gameCenterAppVersions + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterDetailGameCenterChallengesLinkagesResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterDetailGameCenterChallengesLinkagesResponse.generated.swift new file mode 100644 index 00000000..e55f8db8 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterDetailGameCenterChallengesLinkagesResponse.generated.swift @@ -0,0 +1,53 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct GameCenterDetailGameCenterChallengesLinkagesResponse: Hashable, Codable, Sendable { + public var data: [Data] + + public var links: PagedDocumentLinks + + public var meta: PagingInformation? + + public init( + data: [Data], + links: PagedDocumentLinks, + meta: PagingInformation? = nil + ) { + self.data = data + self.links = links + self.meta = meta + } + + private enum CodingKeys: String, CodingKey { + case data + case links + case meta + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case gameCenterChallenges + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterDetailGameCenterGroupLinkageResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterDetailGameCenterGroupLinkageResponse.generated.swift new file mode 100644 index 00000000..0eac6ec8 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterDetailGameCenterGroupLinkageResponse.generated.swift @@ -0,0 +1,48 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct GameCenterDetailGameCenterGroupLinkageResponse: Hashable, Codable, Sendable { + public var data: Data + + public var links: DocumentLinks + + public init( + data: Data, + links: DocumentLinks + ) { + self.data = data + self.links = links + } + + private enum CodingKeys: String, CodingKey { + case data + case links + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case gameCenterGroups + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterDetailGameCenterLeaderboardSetsLinkagesResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterDetailGameCenterLeaderboardSetsLinkagesResponse.generated.swift index 8986cdb0..622073f0 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterDetailGameCenterLeaderboardSetsLinkagesResponse.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterDetailGameCenterLeaderboardSetsLinkagesResponse.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct GameCenterDetailGameCenterLeaderboardSetsLinkagesResponse: Hashable, Codable { +public struct GameCenterDetailGameCenterLeaderboardSetsLinkagesResponse: Hashable, Codable, Sendable { public var data: [Data] public var links: PagedDocumentLinks @@ -26,7 +26,7 @@ public struct GameCenterDetailGameCenterLeaderboardSetsLinkagesResponse: Hashabl case meta } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -44,7 +44,7 @@ public struct GameCenterDetailGameCenterLeaderboardSetsLinkagesResponse: Hashabl case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case gameCenterLeaderboardSets } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterDetailGameCenterLeaderboardsLinkagesResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterDetailGameCenterLeaderboardsLinkagesResponse.generated.swift index de3e6c0e..118d70f9 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterDetailGameCenterLeaderboardsLinkagesResponse.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterDetailGameCenterLeaderboardsLinkagesResponse.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct GameCenterDetailGameCenterLeaderboardsLinkagesResponse: Hashable, Codable { +public struct GameCenterDetailGameCenterLeaderboardsLinkagesResponse: Hashable, Codable, Sendable { public var data: [Data] public var links: PagedDocumentLinks @@ -26,7 +26,7 @@ public struct GameCenterDetailGameCenterLeaderboardsLinkagesResponse: Hashable, case meta } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -44,7 +44,7 @@ public struct GameCenterDetailGameCenterLeaderboardsLinkagesResponse: Hashable, case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case gameCenterLeaderboards } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterDetailLeaderboardReleasesLinkagesResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterDetailLeaderboardReleasesLinkagesResponse.generated.swift new file mode 100644 index 00000000..b096e6ab --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterDetailLeaderboardReleasesLinkagesResponse.generated.swift @@ -0,0 +1,53 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct GameCenterDetailLeaderboardReleasesLinkagesResponse: Hashable, Codable, Sendable { + public var data: [Data] + + public var links: PagedDocumentLinks + + public var meta: PagingInformation? + + public init( + data: [Data], + links: PagedDocumentLinks, + meta: PagingInformation? = nil + ) { + self.data = data + self.links = links + self.meta = meta + } + + private enum CodingKeys: String, CodingKey { + case data + case links + case meta + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case gameCenterLeaderboardReleases + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterDetailLeaderboardSetReleasesLinkagesResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterDetailLeaderboardSetReleasesLinkagesResponse.generated.swift new file mode 100644 index 00000000..07a10e68 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterDetailLeaderboardSetReleasesLinkagesResponse.generated.swift @@ -0,0 +1,53 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct GameCenterDetailLeaderboardSetReleasesLinkagesResponse: Hashable, Codable, Sendable { + public var data: [Data] + + public var links: PagedDocumentLinks + + public var meta: PagingInformation? + + public init( + data: [Data], + links: PagedDocumentLinks, + meta: PagingInformation? = nil + ) { + self.data = data + self.links = links + self.meta = meta + } + + private enum CodingKeys: String, CodingKey { + case data + case links + case meta + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case gameCenterLeaderboardSetReleases + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterDetailResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterDetailResponse.generated.swift index 7671b3ad..bebab783 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterDetailResponse.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterDetailResponse.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct GameCenterDetailResponse: Hashable, Codable { +public struct GameCenterDetailResponse: Hashable, Codable, Sendable { public var data: GameCenterDetail public var included: [Included]? @@ -26,16 +26,21 @@ public struct GameCenterDetailResponse: Hashable, Codable { case links } - public enum Included: Hashable, Codable { + public enum Included: Hashable, Codable, Sendable { case app(App) case gameCenterAppVersion(GameCenterAppVersion) case gameCenterGroup(GameCenterGroup) case gameCenterLeaderboard(GameCenterLeaderboard) case gameCenterLeaderboardSet(GameCenterLeaderboardSet) case gameCenterAchievement(GameCenterAchievement) + case gameCenterActivity(GameCenterActivity) + case gameCenterChallenge(GameCenterChallenge) case gameCenterAchievementRelease(GameCenterAchievementRelease) + case gameCenterActivityVersionRelease(GameCenterActivityVersionRelease) + case gameCenterChallengeVersionRelease(GameCenterChallengeVersionRelease) case gameCenterLeaderboardRelease(GameCenterLeaderboardRelease) case gameCenterLeaderboardSetRelease(GameCenterLeaderboardSetRelease) + case appStoreVersion(AppStoreVersion) public init(from decoder: Decoder) throws { self = try { @@ -70,11 +75,31 @@ public struct GameCenterDetailResponse: Hashable, Codable { } catch { lastError = error } + do { + return .gameCenterActivity(try GameCenterActivity(from: decoder)) + } catch { + lastError = error + } + do { + return .gameCenterChallenge(try GameCenterChallenge(from: decoder)) + } catch { + lastError = error + } do { return .gameCenterAchievementRelease(try GameCenterAchievementRelease(from: decoder)) } catch { lastError = error } + do { + return .gameCenterActivityVersionRelease(try GameCenterActivityVersionRelease(from: decoder)) + } catch { + lastError = error + } + do { + return .gameCenterChallengeVersionRelease(try GameCenterChallengeVersionRelease(from: decoder)) + } catch { + lastError = error + } do { return .gameCenterLeaderboardRelease(try GameCenterLeaderboardRelease(from: decoder)) } catch { @@ -85,6 +110,11 @@ public struct GameCenterDetailResponse: Hashable, Codable { } catch { lastError = error } + do { + return .appStoreVersion(try AppStoreVersion(from: decoder)) + } catch { + lastError = error + } throw lastError }() } @@ -109,14 +139,29 @@ public struct GameCenterDetailResponse: Hashable, Codable { case .gameCenterAchievement(let value): try value.encode(to: encoder) + case .gameCenterActivity(let value): + try value.encode(to: encoder) + + case .gameCenterChallenge(let value): + try value.encode(to: encoder) + case .gameCenterAchievementRelease(let value): try value.encode(to: encoder) + case .gameCenterActivityVersionRelease(let value): + try value.encode(to: encoder) + + case .gameCenterChallengeVersionRelease(let value): + try value.encode(to: encoder) + case .gameCenterLeaderboardRelease(let value): try value.encode(to: encoder) case .gameCenterLeaderboardSetRelease(let value): try value.encode(to: encoder) + + case .appStoreVersion(let value): + try value.encode(to: encoder) } } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterDetailsResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterDetailsResponse.generated.swift index 661a033a..810023d7 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterDetailsResponse.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterDetailsResponse.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct GameCenterDetailsResponse: Hashable, Codable { +public struct GameCenterDetailsResponse: Hashable, Codable, Sendable { public var data: [GameCenterDetail] public var included: [Included]? @@ -31,16 +31,21 @@ public struct GameCenterDetailsResponse: Hashable, Codable { case meta } - public enum Included: Hashable, Codable { + public enum Included: Hashable, Codable, Sendable { case app(App) case gameCenterAppVersion(GameCenterAppVersion) case gameCenterGroup(GameCenterGroup) case gameCenterLeaderboard(GameCenterLeaderboard) case gameCenterLeaderboardSet(GameCenterLeaderboardSet) case gameCenterAchievement(GameCenterAchievement) + case gameCenterActivity(GameCenterActivity) + case gameCenterChallenge(GameCenterChallenge) case gameCenterAchievementRelease(GameCenterAchievementRelease) + case gameCenterActivityVersionRelease(GameCenterActivityVersionRelease) + case gameCenterChallengeVersionRelease(GameCenterChallengeVersionRelease) case gameCenterLeaderboardRelease(GameCenterLeaderboardRelease) case gameCenterLeaderboardSetRelease(GameCenterLeaderboardSetRelease) + case appStoreVersion(AppStoreVersion) public init(from decoder: Decoder) throws { self = try { @@ -75,11 +80,31 @@ public struct GameCenterDetailsResponse: Hashable, Codable { } catch { lastError = error } + do { + return .gameCenterActivity(try GameCenterActivity(from: decoder)) + } catch { + lastError = error + } + do { + return .gameCenterChallenge(try GameCenterChallenge(from: decoder)) + } catch { + lastError = error + } do { return .gameCenterAchievementRelease(try GameCenterAchievementRelease(from: decoder)) } catch { lastError = error } + do { + return .gameCenterActivityVersionRelease(try GameCenterActivityVersionRelease(from: decoder)) + } catch { + lastError = error + } + do { + return .gameCenterChallengeVersionRelease(try GameCenterChallengeVersionRelease(from: decoder)) + } catch { + lastError = error + } do { return .gameCenterLeaderboardRelease(try GameCenterLeaderboardRelease(from: decoder)) } catch { @@ -90,6 +115,11 @@ public struct GameCenterDetailsResponse: Hashable, Codable { } catch { lastError = error } + do { + return .appStoreVersion(try AppStoreVersion(from: decoder)) + } catch { + lastError = error + } throw lastError }() } @@ -114,14 +144,29 @@ public struct GameCenterDetailsResponse: Hashable, Codable { case .gameCenterAchievement(let value): try value.encode(to: encoder) + case .gameCenterActivity(let value): + try value.encode(to: encoder) + + case .gameCenterChallenge(let value): + try value.encode(to: encoder) + case .gameCenterAchievementRelease(let value): try value.encode(to: encoder) + case .gameCenterActivityVersionRelease(let value): + try value.encode(to: encoder) + + case .gameCenterChallengeVersionRelease(let value): + try value.encode(to: encoder) + case .gameCenterLeaderboardRelease(let value): try value.encode(to: encoder) case .gameCenterLeaderboardSetRelease(let value): try value.encode(to: encoder) + + case .appStoreVersion(let value): + try value.encode(to: encoder) } } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterEnabledVersionCompatibleVersionsLinkagesResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterEnabledVersionCompatibleVersionsLinkagesResponse.generated.swift index 647ae21d..c9e01e39 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterEnabledVersionCompatibleVersionsLinkagesResponse.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterEnabledVersionCompatibleVersionsLinkagesResponse.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct GameCenterEnabledVersionCompatibleVersionsLinkagesResponse: Hashable, Codable { +public struct GameCenterEnabledVersionCompatibleVersionsLinkagesResponse: Hashable, Codable, Sendable { public var data: [Data] public var links: PagedDocumentLinks @@ -26,7 +26,7 @@ public struct GameCenterEnabledVersionCompatibleVersionsLinkagesResponse: Hashab case meta } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -44,7 +44,7 @@ public struct GameCenterEnabledVersionCompatibleVersionsLinkagesResponse: Hashab case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case gameCenterEnabledVersions } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterEnabledVersionsResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterEnabledVersionsResponse.generated.swift index c17f3e90..3bb12105 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterEnabledVersionsResponse.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterEnabledVersionsResponse.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct GameCenterEnabledVersionsResponse: Hashable, Codable { +public struct GameCenterEnabledVersionsResponse: Hashable, Codable, Sendable { public var data: [GameCenterEnabledVersion] public var included: [Included]? @@ -31,7 +31,7 @@ public struct GameCenterEnabledVersionsResponse: Hashable, Codable { case meta } - public enum Included: Hashable, Codable { + public enum Included: Hashable, Codable, Sendable { case gameCenterEnabledVersion(GameCenterEnabledVersion) case app(App) diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterGroupGameCenterAchievementsLinkagesResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterGroupGameCenterAchievementsLinkagesResponse.generated.swift index 3ee37c31..3694744b 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterGroupGameCenterAchievementsLinkagesResponse.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterGroupGameCenterAchievementsLinkagesResponse.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct GameCenterGroupGameCenterAchievementsLinkagesResponse: Hashable, Codable { +public struct GameCenterGroupGameCenterAchievementsLinkagesResponse: Hashable, Codable, Sendable { public var data: [Data] public var links: PagedDocumentLinks @@ -26,7 +26,7 @@ public struct GameCenterGroupGameCenterAchievementsLinkagesResponse: Hashable, C case meta } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -44,7 +44,7 @@ public struct GameCenterGroupGameCenterAchievementsLinkagesResponse: Hashable, C case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case gameCenterAchievements } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterGroupGameCenterActivitiesLinkagesResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterGroupGameCenterActivitiesLinkagesResponse.generated.swift new file mode 100644 index 00000000..ceacd607 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterGroupGameCenterActivitiesLinkagesResponse.generated.swift @@ -0,0 +1,53 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct GameCenterGroupGameCenterActivitiesLinkagesResponse: Hashable, Codable, Sendable { + public var data: [Data] + + public var links: PagedDocumentLinks + + public var meta: PagingInformation? + + public init( + data: [Data], + links: PagedDocumentLinks, + meta: PagingInformation? = nil + ) { + self.data = data + self.links = links + self.meta = meta + } + + private enum CodingKeys: String, CodingKey { + case data + case links + case meta + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case gameCenterActivities + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterGroupGameCenterChallengesLinkagesResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterGroupGameCenterChallengesLinkagesResponse.generated.swift new file mode 100644 index 00000000..29123671 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterGroupGameCenterChallengesLinkagesResponse.generated.swift @@ -0,0 +1,53 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct GameCenterGroupGameCenterChallengesLinkagesResponse: Hashable, Codable, Sendable { + public var data: [Data] + + public var links: PagedDocumentLinks + + public var meta: PagingInformation? + + public init( + data: [Data], + links: PagedDocumentLinks, + meta: PagingInformation? = nil + ) { + self.data = data + self.links = links + self.meta = meta + } + + private enum CodingKeys: String, CodingKey { + case data + case links + case meta + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case gameCenterChallenges + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterGroupGameCenterDetailsLinkagesResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterGroupGameCenterDetailsLinkagesResponse.generated.swift new file mode 100644 index 00000000..e4704cec --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterGroupGameCenterDetailsLinkagesResponse.generated.swift @@ -0,0 +1,53 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct GameCenterGroupGameCenterDetailsLinkagesResponse: Hashable, Codable, Sendable { + public var data: [Data] + + public var links: PagedDocumentLinks + + public var meta: PagingInformation? + + public init( + data: [Data], + links: PagedDocumentLinks, + meta: PagingInformation? = nil + ) { + self.data = data + self.links = links + self.meta = meta + } + + private enum CodingKeys: String, CodingKey { + case data + case links + case meta + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case gameCenterDetails + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterGroupGameCenterLeaderboardSetsLinkagesResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterGroupGameCenterLeaderboardSetsLinkagesResponse.generated.swift index 159bd26f..f0da72c9 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterGroupGameCenterLeaderboardSetsLinkagesResponse.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterGroupGameCenterLeaderboardSetsLinkagesResponse.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct GameCenterGroupGameCenterLeaderboardSetsLinkagesResponse: Hashable, Codable { +public struct GameCenterGroupGameCenterLeaderboardSetsLinkagesResponse: Hashable, Codable, Sendable { public var data: [Data] public var links: PagedDocumentLinks @@ -26,7 +26,7 @@ public struct GameCenterGroupGameCenterLeaderboardSetsLinkagesResponse: Hashable case meta } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -44,7 +44,7 @@ public struct GameCenterGroupGameCenterLeaderboardSetsLinkagesResponse: Hashable case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case gameCenterLeaderboardSets } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterGroupGameCenterLeaderboardsLinkagesResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterGroupGameCenterLeaderboardsLinkagesResponse.generated.swift index aafc456f..679b8d6d 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterGroupGameCenterLeaderboardsLinkagesResponse.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterGroupGameCenterLeaderboardsLinkagesResponse.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct GameCenterGroupGameCenterLeaderboardsLinkagesResponse: Hashable, Codable { +public struct GameCenterGroupGameCenterLeaderboardsLinkagesResponse: Hashable, Codable, Sendable { public var data: [Data] public var links: PagedDocumentLinks @@ -26,7 +26,7 @@ public struct GameCenterGroupGameCenterLeaderboardsLinkagesResponse: Hashable, C case meta } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -44,7 +44,7 @@ public struct GameCenterGroupGameCenterLeaderboardsLinkagesResponse: Hashable, C case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case gameCenterLeaderboards } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterGroupResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterGroupResponse.generated.swift index 6a2661b0..af459b7d 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterGroupResponse.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterGroupResponse.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct GameCenterGroupResponse: Hashable, Codable { +public struct GameCenterGroupResponse: Hashable, Codable, Sendable { public var data: GameCenterGroup public var included: [Included]? @@ -26,11 +26,13 @@ public struct GameCenterGroupResponse: Hashable, Codable { case links } - public enum Included: Hashable, Codable { + public enum Included: Hashable, Codable, Sendable { case gameCenterDetail(GameCenterDetail) case gameCenterLeaderboard(GameCenterLeaderboard) case gameCenterLeaderboardSet(GameCenterLeaderboardSet) case gameCenterAchievement(GameCenterAchievement) + case gameCenterActivity(GameCenterActivity) + case gameCenterChallenge(GameCenterChallenge) public init(from decoder: Decoder) throws { self = try { @@ -55,6 +57,16 @@ public struct GameCenterGroupResponse: Hashable, Codable { } catch { lastError = error } + do { + return .gameCenterActivity(try GameCenterActivity(from: decoder)) + } catch { + lastError = error + } + do { + return .gameCenterChallenge(try GameCenterChallenge(from: decoder)) + } catch { + lastError = error + } throw lastError }() } @@ -72,6 +84,12 @@ public struct GameCenterGroupResponse: Hashable, Codable { case .gameCenterAchievement(let value): try value.encode(to: encoder) + + case .gameCenterActivity(let value): + try value.encode(to: encoder) + + case .gameCenterChallenge(let value): + try value.encode(to: encoder) } } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterGroupsResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterGroupsResponse.generated.swift index 96217712..30d18ddb 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterGroupsResponse.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterGroupsResponse.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct GameCenterGroupsResponse: Hashable, Codable { +public struct GameCenterGroupsResponse: Hashable, Codable, Sendable { public var data: [GameCenterGroup] public var included: [Included]? @@ -31,11 +31,13 @@ public struct GameCenterGroupsResponse: Hashable, Codable { case meta } - public enum Included: Hashable, Codable { + public enum Included: Hashable, Codable, Sendable { case gameCenterDetail(GameCenterDetail) case gameCenterLeaderboard(GameCenterLeaderboard) case gameCenterLeaderboardSet(GameCenterLeaderboardSet) case gameCenterAchievement(GameCenterAchievement) + case gameCenterActivity(GameCenterActivity) + case gameCenterChallenge(GameCenterChallenge) public init(from decoder: Decoder) throws { self = try { @@ -60,6 +62,16 @@ public struct GameCenterGroupsResponse: Hashable, Codable { } catch { lastError = error } + do { + return .gameCenterActivity(try GameCenterActivity(from: decoder)) + } catch { + lastError = error + } + do { + return .gameCenterChallenge(try GameCenterChallenge(from: decoder)) + } catch { + lastError = error + } throw lastError }() } @@ -77,6 +89,12 @@ public struct GameCenterGroupsResponse: Hashable, Codable { case .gameCenterAchievement(let value): try value.encode(to: encoder) + + case .gameCenterActivity(let value): + try value.encode(to: encoder) + + case .gameCenterChallenge(let value): + try value.encode(to: encoder) } } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterLeaderboardEntrySubmissionResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterLeaderboardEntrySubmissionResponse.generated.swift new file mode 100644 index 00000000..2b737f20 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterLeaderboardEntrySubmissionResponse.generated.swift @@ -0,0 +1,25 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct GameCenterLeaderboardEntrySubmissionResponse: Hashable, Codable, Sendable { + public var data: GameCenterLeaderboardEntrySubmission + + public var links: DocumentLinks + + public init( + data: GameCenterLeaderboardEntrySubmission, + links: DocumentLinks + ) { + self.data = data + self.links = links + } + + private enum CodingKeys: String, CodingKey { + case data + case links + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterLeaderboardGroupLeaderboardLinkageResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterLeaderboardGroupLeaderboardLinkageResponse.generated.swift index a4ffb0a2..8ed79aa0 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterLeaderboardGroupLeaderboardLinkageResponse.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterLeaderboardGroupLeaderboardLinkageResponse.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct GameCenterLeaderboardGroupLeaderboardLinkageResponse: Hashable, Codable { +public struct GameCenterLeaderboardGroupLeaderboardLinkageResponse: Hashable, Codable, Sendable { public var data: Data public var links: DocumentLinks @@ -21,7 +21,7 @@ public struct GameCenterLeaderboardGroupLeaderboardLinkageResponse: Hashable, Co case links } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -39,7 +39,7 @@ public struct GameCenterLeaderboardGroupLeaderboardLinkageResponse: Hashable, Co case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case gameCenterLeaderboards } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterLeaderboardImageResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterLeaderboardImageResponse.generated.swift index caccad87..aad0ff8c 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterLeaderboardImageResponse.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterLeaderboardImageResponse.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct GameCenterLeaderboardImageResponse: Hashable, Codable { +public struct GameCenterLeaderboardImageResponse: Hashable, Codable, Sendable { public var data: GameCenterLeaderboardImage public var included: [GameCenterLeaderboardLocalization]? diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterLeaderboardLocalizationGameCenterLeaderboardImageLinkageResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterLeaderboardLocalizationGameCenterLeaderboardImageLinkageResponse.generated.swift new file mode 100644 index 00000000..18ecc894 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterLeaderboardLocalizationGameCenterLeaderboardImageLinkageResponse.generated.swift @@ -0,0 +1,48 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct GameCenterLeaderboardLocalizationGameCenterLeaderboardImageLinkageResponse: Hashable, Codable, Sendable { + public var data: Data + + public var links: DocumentLinks + + public init( + data: Data, + links: DocumentLinks + ) { + self.data = data + self.links = links + } + + private enum CodingKeys: String, CodingKey { + case data + case links + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case gameCenterLeaderboardImages + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterLeaderboardLocalizationResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterLeaderboardLocalizationResponse.generated.swift index ff8336e8..8076e2df 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterLeaderboardLocalizationResponse.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterLeaderboardLocalizationResponse.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct GameCenterLeaderboardLocalizationResponse: Hashable, Codable { +public struct GameCenterLeaderboardLocalizationResponse: Hashable, Codable, Sendable { public var data: GameCenterLeaderboardLocalization public var included: [Included]? @@ -26,7 +26,7 @@ public struct GameCenterLeaderboardLocalizationResponse: Hashable, Codable { case links } - public enum Included: Hashable, Codable { + public enum Included: Hashable, Codable, Sendable { case gameCenterLeaderboard(GameCenterLeaderboard) case gameCenterLeaderboardImage(GameCenterLeaderboardImage) diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterLeaderboardLocalizationsLinkagesResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterLeaderboardLocalizationsLinkagesResponse.generated.swift new file mode 100644 index 00000000..ef238699 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterLeaderboardLocalizationsLinkagesResponse.generated.swift @@ -0,0 +1,53 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct GameCenterLeaderboardLocalizationsLinkagesResponse: Hashable, Codable, Sendable { + public var data: [Data] + + public var links: PagedDocumentLinks + + public var meta: PagingInformation? + + public init( + data: [Data], + links: PagedDocumentLinks, + meta: PagingInformation? = nil + ) { + self.data = data + self.links = links + self.meta = meta + } + + private enum CodingKeys: String, CodingKey { + case data + case links + case meta + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case gameCenterLeaderboardLocalizations + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterLeaderboardLocalizationsResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterLeaderboardLocalizationsResponse.generated.swift index 51bba536..5cb999fa 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterLeaderboardLocalizationsResponse.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterLeaderboardLocalizationsResponse.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct GameCenterLeaderboardLocalizationsResponse: Hashable, Codable { +public struct GameCenterLeaderboardLocalizationsResponse: Hashable, Codable, Sendable { public var data: [GameCenterLeaderboardLocalization] public var included: [Included]? @@ -31,7 +31,7 @@ public struct GameCenterLeaderboardLocalizationsResponse: Hashable, Codable { case meta } - public enum Included: Hashable, Codable { + public enum Included: Hashable, Codable, Sendable { case gameCenterLeaderboard(GameCenterLeaderboard) case gameCenterLeaderboardImage(GameCenterLeaderboardImage) diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterLeaderboardReleaseResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterLeaderboardReleaseResponse.generated.swift index 3b385480..0516550a 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterLeaderboardReleaseResponse.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterLeaderboardReleaseResponse.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct GameCenterLeaderboardReleaseResponse: Hashable, Codable { +public struct GameCenterLeaderboardReleaseResponse: Hashable, Codable, Sendable { public var data: GameCenterLeaderboardRelease public var included: [Included]? @@ -26,7 +26,7 @@ public struct GameCenterLeaderboardReleaseResponse: Hashable, Codable { case links } - public enum Included: Hashable, Codable { + public enum Included: Hashable, Codable, Sendable { case gameCenterDetail(GameCenterDetail) case gameCenterLeaderboard(GameCenterLeaderboard) diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterLeaderboardReleasesLinkagesResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterLeaderboardReleasesLinkagesResponse.generated.swift new file mode 100644 index 00000000..05b75c61 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterLeaderboardReleasesLinkagesResponse.generated.swift @@ -0,0 +1,53 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct GameCenterLeaderboardReleasesLinkagesResponse: Hashable, Codable, Sendable { + public var data: [Data] + + public var links: PagedDocumentLinks + + public var meta: PagingInformation? + + public init( + data: [Data], + links: PagedDocumentLinks, + meta: PagingInformation? = nil + ) { + self.data = data + self.links = links + self.meta = meta + } + + private enum CodingKeys: String, CodingKey { + case data + case links + case meta + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case gameCenterLeaderboardReleases + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterLeaderboardReleasesResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterLeaderboardReleasesResponse.generated.swift index 22404fad..4de1eaf6 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterLeaderboardReleasesResponse.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterLeaderboardReleasesResponse.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct GameCenterLeaderboardReleasesResponse: Hashable, Codable { +public struct GameCenterLeaderboardReleasesResponse: Hashable, Codable, Sendable { public var data: [GameCenterLeaderboardRelease] public var included: [Included]? @@ -31,7 +31,7 @@ public struct GameCenterLeaderboardReleasesResponse: Hashable, Codable { case meta } - public enum Included: Hashable, Codable { + public enum Included: Hashable, Codable, Sendable { case gameCenterDetail(GameCenterDetail) case gameCenterLeaderboard(GameCenterLeaderboard) diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterLeaderboardResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterLeaderboardResponse.generated.swift index 7cea2505..eb966529 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterLeaderboardResponse.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterLeaderboardResponse.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct GameCenterLeaderboardResponse: Hashable, Codable { +public struct GameCenterLeaderboardResponse: Hashable, Codable, Sendable { public var data: GameCenterLeaderboard public var included: [Included]? @@ -26,13 +26,15 @@ public struct GameCenterLeaderboardResponse: Hashable, Codable { case links } - public enum Included: Hashable, Codable { + public enum Included: Hashable, Codable, Sendable { case gameCenterDetail(GameCenterDetail) case gameCenterGroup(GameCenterGroup) case gameCenterLeaderboard(GameCenterLeaderboard) case gameCenterLeaderboardSet(GameCenterLeaderboardSet) case gameCenterLeaderboardLocalization(GameCenterLeaderboardLocalization) case gameCenterLeaderboardRelease(GameCenterLeaderboardRelease) + case gameCenterActivity(GameCenterActivity) + case gameCenterChallenge(GameCenterChallenge) public init(from decoder: Decoder) throws { self = try { @@ -67,6 +69,16 @@ public struct GameCenterLeaderboardResponse: Hashable, Codable { } catch { lastError = error } + do { + return .gameCenterActivity(try GameCenterActivity(from: decoder)) + } catch { + lastError = error + } + do { + return .gameCenterChallenge(try GameCenterChallenge(from: decoder)) + } catch { + lastError = error + } throw lastError }() } @@ -90,6 +102,12 @@ public struct GameCenterLeaderboardResponse: Hashable, Codable { case .gameCenterLeaderboardRelease(let value): try value.encode(to: encoder) + + case .gameCenterActivity(let value): + try value.encode(to: encoder) + + case .gameCenterChallenge(let value): + try value.encode(to: encoder) } } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterLeaderboardSetGameCenterLeaderboardsLinkagesResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterLeaderboardSetGameCenterLeaderboardsLinkagesResponse.generated.swift index 60a96de1..50e26b00 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterLeaderboardSetGameCenterLeaderboardsLinkagesResponse.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterLeaderboardSetGameCenterLeaderboardsLinkagesResponse.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct GameCenterLeaderboardSetGameCenterLeaderboardsLinkagesResponse: Hashable, Codable { +public struct GameCenterLeaderboardSetGameCenterLeaderboardsLinkagesResponse: Hashable, Codable, Sendable { public var data: [Data] public var links: PagedDocumentLinks @@ -26,7 +26,7 @@ public struct GameCenterLeaderboardSetGameCenterLeaderboardsLinkagesResponse: Ha case meta } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -44,7 +44,7 @@ public struct GameCenterLeaderboardSetGameCenterLeaderboardsLinkagesResponse: Ha case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case gameCenterLeaderboards } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterLeaderboardSetGroupLeaderboardSetLinkageResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterLeaderboardSetGroupLeaderboardSetLinkageResponse.generated.swift index f4704bb0..127ed496 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterLeaderboardSetGroupLeaderboardSetLinkageResponse.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterLeaderboardSetGroupLeaderboardSetLinkageResponse.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct GameCenterLeaderboardSetGroupLeaderboardSetLinkageResponse: Hashable, Codable { +public struct GameCenterLeaderboardSetGroupLeaderboardSetLinkageResponse: Hashable, Codable, Sendable { public var data: Data public var links: DocumentLinks @@ -21,7 +21,7 @@ public struct GameCenterLeaderboardSetGroupLeaderboardSetLinkageResponse: Hashab case links } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -39,7 +39,7 @@ public struct GameCenterLeaderboardSetGroupLeaderboardSetLinkageResponse: Hashab case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case gameCenterLeaderboardSets } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterLeaderboardSetImageResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterLeaderboardSetImageResponse.generated.swift index 8499f941..00196f10 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterLeaderboardSetImageResponse.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterLeaderboardSetImageResponse.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct GameCenterLeaderboardSetImageResponse: Hashable, Codable { +public struct GameCenterLeaderboardSetImageResponse: Hashable, Codable, Sendable { public var data: GameCenterLeaderboardSetImage public var included: [GameCenterLeaderboardSetLocalization]? diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterLeaderboardSetLocalizationGameCenterLeaderboardSetImageLinkageResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterLeaderboardSetLocalizationGameCenterLeaderboardSetImageLinkageResponse.generated.swift new file mode 100644 index 00000000..c70a8506 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterLeaderboardSetLocalizationGameCenterLeaderboardSetImageLinkageResponse.generated.swift @@ -0,0 +1,48 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct GameCenterLeaderboardSetLocalizationGameCenterLeaderboardSetImageLinkageResponse: Hashable, Codable, Sendable { + public var data: Data + + public var links: DocumentLinks + + public init( + data: Data, + links: DocumentLinks + ) { + self.data = data + self.links = links + } + + private enum CodingKeys: String, CodingKey { + case data + case links + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case gameCenterLeaderboardSetImages + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterLeaderboardSetLocalizationResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterLeaderboardSetLocalizationResponse.generated.swift index f999413c..7def5d1d 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterLeaderboardSetLocalizationResponse.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterLeaderboardSetLocalizationResponse.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct GameCenterLeaderboardSetLocalizationResponse: Hashable, Codable { +public struct GameCenterLeaderboardSetLocalizationResponse: Hashable, Codable, Sendable { public var data: GameCenterLeaderboardSetLocalization public var included: [Included]? @@ -26,7 +26,7 @@ public struct GameCenterLeaderboardSetLocalizationResponse: Hashable, Codable { case links } - public enum Included: Hashable, Codable { + public enum Included: Hashable, Codable, Sendable { case gameCenterLeaderboardSet(GameCenterLeaderboardSet) case gameCenterLeaderboardSetImage(GameCenterLeaderboardSetImage) diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterLeaderboardSetLocalizationsLinkagesResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterLeaderboardSetLocalizationsLinkagesResponse.generated.swift new file mode 100644 index 00000000..7adf0b0c --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterLeaderboardSetLocalizationsLinkagesResponse.generated.swift @@ -0,0 +1,53 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct GameCenterLeaderboardSetLocalizationsLinkagesResponse: Hashable, Codable, Sendable { + public var data: [Data] + + public var links: PagedDocumentLinks + + public var meta: PagingInformation? + + public init( + data: [Data], + links: PagedDocumentLinks, + meta: PagingInformation? = nil + ) { + self.data = data + self.links = links + self.meta = meta + } + + private enum CodingKeys: String, CodingKey { + case data + case links + case meta + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case gameCenterLeaderboardSetLocalizations + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterLeaderboardSetLocalizationsResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterLeaderboardSetLocalizationsResponse.generated.swift index ea3df711..1e948f83 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterLeaderboardSetLocalizationsResponse.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterLeaderboardSetLocalizationsResponse.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct GameCenterLeaderboardSetLocalizationsResponse: Hashable, Codable { +public struct GameCenterLeaderboardSetLocalizationsResponse: Hashable, Codable, Sendable { public var data: [GameCenterLeaderboardSetLocalization] public var included: [Included]? @@ -31,7 +31,7 @@ public struct GameCenterLeaderboardSetLocalizationsResponse: Hashable, Codable { case meta } - public enum Included: Hashable, Codable { + public enum Included: Hashable, Codable, Sendable { case gameCenterLeaderboardSet(GameCenterLeaderboardSet) case gameCenterLeaderboardSetImage(GameCenterLeaderboardSetImage) diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterLeaderboardSetMemberLocalizationGameCenterLeaderboardLinkageResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterLeaderboardSetMemberLocalizationGameCenterLeaderboardLinkageResponse.generated.swift new file mode 100644 index 00000000..c409ef94 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterLeaderboardSetMemberLocalizationGameCenterLeaderboardLinkageResponse.generated.swift @@ -0,0 +1,48 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct GameCenterLeaderboardSetMemberLocalizationGameCenterLeaderboardLinkageResponse: Hashable, Codable, Sendable { + public var data: Data + + public var links: DocumentLinks + + public init( + data: Data, + links: DocumentLinks + ) { + self.data = data + self.links = links + } + + private enum CodingKeys: String, CodingKey { + case data + case links + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case gameCenterLeaderboards + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterLeaderboardSetMemberLocalizationGameCenterLeaderboardSetLinkageResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterLeaderboardSetMemberLocalizationGameCenterLeaderboardSetLinkageResponse.generated.swift new file mode 100644 index 00000000..e67a3747 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterLeaderboardSetMemberLocalizationGameCenterLeaderboardSetLinkageResponse.generated.swift @@ -0,0 +1,48 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct GameCenterLeaderboardSetMemberLocalizationGameCenterLeaderboardSetLinkageResponse: Hashable, Codable, Sendable { + public var data: Data + + public var links: DocumentLinks + + public init( + data: Data, + links: DocumentLinks + ) { + self.data = data + self.links = links + } + + private enum CodingKeys: String, CodingKey { + case data + case links + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case gameCenterLeaderboardSets + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterLeaderboardSetMemberLocalizationResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterLeaderboardSetMemberLocalizationResponse.generated.swift index c3a22b92..a5359cdd 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterLeaderboardSetMemberLocalizationResponse.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterLeaderboardSetMemberLocalizationResponse.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct GameCenterLeaderboardSetMemberLocalizationResponse: Hashable, Codable { +public struct GameCenterLeaderboardSetMemberLocalizationResponse: Hashable, Codable, Sendable { public var data: GameCenterLeaderboardSetMemberLocalization public var included: [Included]? @@ -26,7 +26,7 @@ public struct GameCenterLeaderboardSetMemberLocalizationResponse: Hashable, Coda case links } - public enum Included: Hashable, Codable { + public enum Included: Hashable, Codable, Sendable { case gameCenterLeaderboardSet(GameCenterLeaderboardSet) case gameCenterLeaderboard(GameCenterLeaderboard) diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterLeaderboardSetMemberLocalizationsResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterLeaderboardSetMemberLocalizationsResponse.generated.swift index a9153703..87968738 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterLeaderboardSetMemberLocalizationsResponse.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterLeaderboardSetMemberLocalizationsResponse.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct GameCenterLeaderboardSetMemberLocalizationsResponse: Hashable, Codable { +public struct GameCenterLeaderboardSetMemberLocalizationsResponse: Hashable, Codable, Sendable { public var data: [GameCenterLeaderboardSetMemberLocalization] public var included: [Included]? @@ -31,7 +31,7 @@ public struct GameCenterLeaderboardSetMemberLocalizationsResponse: Hashable, Cod case meta } - public enum Included: Hashable, Codable { + public enum Included: Hashable, Codable, Sendable { case gameCenterLeaderboardSet(GameCenterLeaderboardSet) case gameCenterLeaderboard(GameCenterLeaderboard) diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterLeaderboardSetReleaseResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterLeaderboardSetReleaseResponse.generated.swift index 8594d291..e18f2987 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterLeaderboardSetReleaseResponse.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterLeaderboardSetReleaseResponse.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct GameCenterLeaderboardSetReleaseResponse: Hashable, Codable { +public struct GameCenterLeaderboardSetReleaseResponse: Hashable, Codable, Sendable { public var data: GameCenterLeaderboardSetRelease public var included: [Included]? @@ -26,7 +26,7 @@ public struct GameCenterLeaderboardSetReleaseResponse: Hashable, Codable { case links } - public enum Included: Hashable, Codable { + public enum Included: Hashable, Codable, Sendable { case gameCenterDetail(GameCenterDetail) case gameCenterLeaderboardSet(GameCenterLeaderboardSet) diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterLeaderboardSetReleasesLinkagesResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterLeaderboardSetReleasesLinkagesResponse.generated.swift new file mode 100644 index 00000000..0db54658 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterLeaderboardSetReleasesLinkagesResponse.generated.swift @@ -0,0 +1,53 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct GameCenterLeaderboardSetReleasesLinkagesResponse: Hashable, Codable, Sendable { + public var data: [Data] + + public var links: PagedDocumentLinks + + public var meta: PagingInformation? + + public init( + data: [Data], + links: PagedDocumentLinks, + meta: PagingInformation? = nil + ) { + self.data = data + self.links = links + self.meta = meta + } + + private enum CodingKeys: String, CodingKey { + case data + case links + case meta + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case gameCenterLeaderboardSetReleases + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterLeaderboardSetReleasesResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterLeaderboardSetReleasesResponse.generated.swift index da4e6e7e..b28970b6 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterLeaderboardSetReleasesResponse.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterLeaderboardSetReleasesResponse.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct GameCenterLeaderboardSetReleasesResponse: Hashable, Codable { +public struct GameCenterLeaderboardSetReleasesResponse: Hashable, Codable, Sendable { public var data: [GameCenterLeaderboardSetRelease] public var included: [Included]? @@ -31,7 +31,7 @@ public struct GameCenterLeaderboardSetReleasesResponse: Hashable, Codable { case meta } - public enum Included: Hashable, Codable { + public enum Included: Hashable, Codable, Sendable { case gameCenterDetail(GameCenterDetail) case gameCenterLeaderboardSet(GameCenterLeaderboardSet) diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterLeaderboardSetResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterLeaderboardSetResponse.generated.swift index 9fb7b7e2..9d9be71a 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterLeaderboardSetResponse.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterLeaderboardSetResponse.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct GameCenterLeaderboardSetResponse: Hashable, Codable { +public struct GameCenterLeaderboardSetResponse: Hashable, Codable, Sendable { public var data: GameCenterLeaderboardSet public var included: [Included]? @@ -26,7 +26,7 @@ public struct GameCenterLeaderboardSetResponse: Hashable, Codable { case links } - public enum Included: Hashable, Codable { + public enum Included: Hashable, Codable, Sendable { case gameCenterDetail(GameCenterDetail) case gameCenterGroup(GameCenterGroup) case gameCenterLeaderboardSet(GameCenterLeaderboardSet) diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterLeaderboardSetsResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterLeaderboardSetsResponse.generated.swift index 87b94b49..daa66443 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterLeaderboardSetsResponse.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterLeaderboardSetsResponse.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct GameCenterLeaderboardSetsResponse: Hashable, Codable { +public struct GameCenterLeaderboardSetsResponse: Hashable, Codable, Sendable { public var data: [GameCenterLeaderboardSet] public var included: [Included]? @@ -31,7 +31,7 @@ public struct GameCenterLeaderboardSetsResponse: Hashable, Codable { case meta } - public enum Included: Hashable, Codable { + public enum Included: Hashable, Codable, Sendable { case gameCenterDetail(GameCenterDetail) case gameCenterGroup(GameCenterGroup) case gameCenterLeaderboardSet(GameCenterLeaderboardSet) diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterLeaderboardsResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterLeaderboardsResponse.generated.swift index e7866212..a2ade220 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterLeaderboardsResponse.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterLeaderboardsResponse.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct GameCenterLeaderboardsResponse: Hashable, Codable { +public struct GameCenterLeaderboardsResponse: Hashable, Codable, Sendable { public var data: [GameCenterLeaderboard] public var included: [Included]? @@ -31,13 +31,15 @@ public struct GameCenterLeaderboardsResponse: Hashable, Codable { case meta } - public enum Included: Hashable, Codable { + public enum Included: Hashable, Codable, Sendable { case gameCenterDetail(GameCenterDetail) case gameCenterGroup(GameCenterGroup) case gameCenterLeaderboard(GameCenterLeaderboard) case gameCenterLeaderboardSet(GameCenterLeaderboardSet) case gameCenterLeaderboardLocalization(GameCenterLeaderboardLocalization) case gameCenterLeaderboardRelease(GameCenterLeaderboardRelease) + case gameCenterActivity(GameCenterActivity) + case gameCenterChallenge(GameCenterChallenge) public init(from decoder: Decoder) throws { self = try { @@ -72,6 +74,16 @@ public struct GameCenterLeaderboardsResponse: Hashable, Codable { } catch { lastError = error } + do { + return .gameCenterActivity(try GameCenterActivity(from: decoder)) + } catch { + lastError = error + } + do { + return .gameCenterChallenge(try GameCenterChallenge(from: decoder)) + } catch { + lastError = error + } throw lastError }() } @@ -95,6 +107,12 @@ public struct GameCenterLeaderboardsResponse: Hashable, Codable { case .gameCenterLeaderboardRelease(let value): try value.encode(to: encoder) + + case .gameCenterActivity(let value): + try value.encode(to: encoder) + + case .gameCenterChallenge(let value): + try value.encode(to: encoder) } } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterMatchmakingAppRequestsV1MetricResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterMatchmakingAppRequestsV1MetricResponse.generated.swift index 4dd2e1a0..3ae8cf0c 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterMatchmakingAppRequestsV1MetricResponse.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterMatchmakingAppRequestsV1MetricResponse.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct GameCenterMatchmakingAppRequestsV1MetricResponse: Hashable, Codable { +public struct GameCenterMatchmakingAppRequestsV1MetricResponse: Hashable, Codable, Sendable { public var data: [Data] public var links: PagedDocumentLinks @@ -26,7 +26,7 @@ public struct GameCenterMatchmakingAppRequestsV1MetricResponse: Hashable, Codabl case meta } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var dataPoints: DataPoints? public var dimensions: Dimensions? @@ -49,7 +49,7 @@ public struct GameCenterMatchmakingAppRequestsV1MetricResponse: Hashable, Codabl case granularity } - public struct DataPoints: Hashable, Codable { + public struct DataPoints: Hashable, Codable, Sendable { public var end: String? public var start: String? @@ -72,7 +72,7 @@ public struct GameCenterMatchmakingAppRequestsV1MetricResponse: Hashable, Codabl case values } - public struct Values: Hashable, Codable { + public struct Values: Hashable, Codable, Sendable { public var averageSecondsInQueue: Float? public var count: Int? @@ -102,7 +102,7 @@ public struct GameCenterMatchmakingAppRequestsV1MetricResponse: Hashable, Codabl } } - public struct Dimensions: Hashable, Codable { + public struct Dimensions: Hashable, Codable, Sendable { public var result: Result? public init(result: Result? = nil) { @@ -113,18 +113,49 @@ public struct GameCenterMatchmakingAppRequestsV1MetricResponse: Hashable, Codabl case result } - public struct Result: Hashable, Codable { + public struct Result: Hashable, Codable, Sendable { + public var data: Data? + public var links: Links? - public init(links: Links? = nil) { + public init( + data: Data? = nil, + links: Links? = nil + ) { + self.data = data self.links = links } private enum CodingKeys: String, CodingKey { + case data case links } - public struct Links: Hashable, Codable { + public struct Data: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var canceled: Self { + .init(rawValue: "CANCELED") + } + + public static var expired: Self { + .init(rawValue: "EXPIRED") + } + + public static var matched: Self { + .init(rawValue: "MATCHED") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct Links: Hashable, Codable, Sendable { public var groupBy: URL? public init(groupBy: URL? = nil) { @@ -138,28 +169,27 @@ public struct GameCenterMatchmakingAppRequestsV1MetricResponse: Hashable, Codabl } } - public enum Granularity: Hashable, Codable, RawRepresentable { - case p1D - case pT15M - case pT1H - case unknown(String) - - public var rawValue: String { - switch self { - case .p1D: return "P1D" - case .pT15M: return "PT15M" - case .pT1H: return "PT1H" - case .unknown(let rawValue): return rawValue - } + public struct Granularity: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var p1D: Self { + .init(rawValue: "P1D") + } + + public static var pT15M: Self { + .init(rawValue: "PT15M") } + public static var pT1H: Self { + .init(rawValue: "PT1H") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "P1D": self = .p1D - case "PT15M": self = .pT15M - case "PT1H": self = .pT1H - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterMatchmakingBooleanRuleResultsV1MetricResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterMatchmakingBooleanRuleResultsV1MetricResponse.generated.swift index d4fbdc86..7a25c8e9 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterMatchmakingBooleanRuleResultsV1MetricResponse.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterMatchmakingBooleanRuleResultsV1MetricResponse.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct GameCenterMatchmakingBooleanRuleResultsV1MetricResponse: Hashable, Codable { +public struct GameCenterMatchmakingBooleanRuleResultsV1MetricResponse: Hashable, Codable, Sendable { public var data: [Data] public var links: PagedDocumentLinks @@ -26,7 +26,7 @@ public struct GameCenterMatchmakingBooleanRuleResultsV1MetricResponse: Hashable, case meta } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var dataPoints: DataPoints? public var dimensions: Dimensions? @@ -49,7 +49,7 @@ public struct GameCenterMatchmakingBooleanRuleResultsV1MetricResponse: Hashable, case granularity } - public struct DataPoints: Hashable, Codable { + public struct DataPoints: Hashable, Codable, Sendable { public var end: String? public var start: String? @@ -72,7 +72,7 @@ public struct GameCenterMatchmakingBooleanRuleResultsV1MetricResponse: Hashable, case values } - public struct Values: Hashable, Codable { + public struct Values: Hashable, Codable, Sendable { public var count: Int? public init(count: Int? = nil) { @@ -85,7 +85,7 @@ public struct GameCenterMatchmakingBooleanRuleResultsV1MetricResponse: Hashable, } } - public struct Dimensions: Hashable, Codable { + public struct Dimensions: Hashable, Codable, Sendable { public var gameCenterMatchmakingQueue: GameCenterMatchmakingQueue? public var result: Result? @@ -103,18 +103,25 @@ public struct GameCenterMatchmakingBooleanRuleResultsV1MetricResponse: Hashable, case result } - public struct GameCenterMatchmakingQueue: Hashable, Codable { + public struct GameCenterMatchmakingQueue: Hashable, Codable, Sendable { + public var data: String? + public var links: Links? - public init(links: Links? = nil) { + public init( + data: String? = nil, + links: Links? = nil + ) { + self.data = data self.links = links } private enum CodingKeys: String, CodingKey { + case data case links } - public struct Links: Hashable, Codable { + public struct Links: Hashable, Codable, Sendable { public var groupBy: URL? public var related: URL? @@ -134,18 +141,25 @@ public struct GameCenterMatchmakingBooleanRuleResultsV1MetricResponse: Hashable, } } - public struct Result: Hashable, Codable { + public struct Result: Hashable, Codable, Sendable { + public var data: String? + public var links: Links? - public init(links: Links? = nil) { + public init( + data: String? = nil, + links: Links? = nil + ) { + self.data = data self.links = links } private enum CodingKeys: String, CodingKey { + case data case links } - public struct Links: Hashable, Codable { + public struct Links: Hashable, Codable, Sendable { public var groupBy: URL? public init(groupBy: URL? = nil) { @@ -159,28 +173,27 @@ public struct GameCenterMatchmakingBooleanRuleResultsV1MetricResponse: Hashable, } } - public enum Granularity: Hashable, Codable, RawRepresentable { - case p1D - case pT15M - case pT1H - case unknown(String) - - public var rawValue: String { - switch self { - case .p1D: return "P1D" - case .pT15M: return "PT15M" - case .pT1H: return "PT1H" - case .unknown(let rawValue): return rawValue - } + public struct Granularity: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var p1D: Self { + .init(rawValue: "P1D") } + public static var pT15M: Self { + .init(rawValue: "PT15M") + } + + public static var pT1H: Self { + .init(rawValue: "PT1H") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "P1D": self = .p1D - case "PT15M": self = .pT15M - case "PT1H": self = .pT1H - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterMatchmakingNumberRuleResultsV1MetricResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterMatchmakingNumberRuleResultsV1MetricResponse.generated.swift index bc545b45..4e5708c9 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterMatchmakingNumberRuleResultsV1MetricResponse.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterMatchmakingNumberRuleResultsV1MetricResponse.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct GameCenterMatchmakingNumberRuleResultsV1MetricResponse: Hashable, Codable { +public struct GameCenterMatchmakingNumberRuleResultsV1MetricResponse: Hashable, Codable, Sendable { public var data: [Data] public var links: PagedDocumentLinks @@ -26,7 +26,7 @@ public struct GameCenterMatchmakingNumberRuleResultsV1MetricResponse: Hashable, case meta } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var dataPoints: DataPoints? public var dimensions: Dimensions? @@ -49,7 +49,7 @@ public struct GameCenterMatchmakingNumberRuleResultsV1MetricResponse: Hashable, case granularity } - public struct DataPoints: Hashable, Codable { + public struct DataPoints: Hashable, Codable, Sendable { public var end: String? public var start: String? @@ -72,7 +72,7 @@ public struct GameCenterMatchmakingNumberRuleResultsV1MetricResponse: Hashable, case values } - public struct Values: Hashable, Codable { + public struct Values: Hashable, Codable, Sendable { public var averageResult: Float? public var count: Int? @@ -102,7 +102,7 @@ public struct GameCenterMatchmakingNumberRuleResultsV1MetricResponse: Hashable, } } - public struct Dimensions: Hashable, Codable { + public struct Dimensions: Hashable, Codable, Sendable { public var gameCenterMatchmakingQueue: GameCenterMatchmakingQueue? public init(gameCenterMatchmakingQueue: GameCenterMatchmakingQueue? = nil) { @@ -113,18 +113,25 @@ public struct GameCenterMatchmakingNumberRuleResultsV1MetricResponse: Hashable, case gameCenterMatchmakingQueue } - public struct GameCenterMatchmakingQueue: Hashable, Codable { + public struct GameCenterMatchmakingQueue: Hashable, Codable, Sendable { + public var data: String? + public var links: Links? - public init(links: Links? = nil) { + public init( + data: String? = nil, + links: Links? = nil + ) { + self.data = data self.links = links } private enum CodingKeys: String, CodingKey { + case data case links } - public struct Links: Hashable, Codable { + public struct Links: Hashable, Codable, Sendable { public var groupBy: URL? public var related: URL? @@ -145,28 +152,27 @@ public struct GameCenterMatchmakingNumberRuleResultsV1MetricResponse: Hashable, } } - public enum Granularity: Hashable, Codable, RawRepresentable { - case p1D - case pT15M - case pT1H - case unknown(String) - - public var rawValue: String { - switch self { - case .p1D: return "P1D" - case .pT15M: return "PT15M" - case .pT1H: return "PT1H" - case .unknown(let rawValue): return rawValue - } + public struct Granularity: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var p1D: Self { + .init(rawValue: "P1D") + } + + public static var pT15M: Self { + .init(rawValue: "PT15M") } + public static var pT1H: Self { + .init(rawValue: "PT1H") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "P1D": self = .p1D - case "PT15M": self = .pT15M - case "PT1H": self = .pT1H - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterMatchmakingQueueRequestsV1MetricResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterMatchmakingQueueRequestsV1MetricResponse.generated.swift index 27104889..0172f4a3 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterMatchmakingQueueRequestsV1MetricResponse.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterMatchmakingQueueRequestsV1MetricResponse.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct GameCenterMatchmakingQueueRequestsV1MetricResponse: Hashable, Codable { +public struct GameCenterMatchmakingQueueRequestsV1MetricResponse: Hashable, Codable, Sendable { public var data: [Data] public var links: PagedDocumentLinks @@ -26,7 +26,7 @@ public struct GameCenterMatchmakingQueueRequestsV1MetricResponse: Hashable, Coda case meta } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var dataPoints: DataPoints? public var dimensions: Dimensions? @@ -49,7 +49,7 @@ public struct GameCenterMatchmakingQueueRequestsV1MetricResponse: Hashable, Coda case granularity } - public struct DataPoints: Hashable, Codable { + public struct DataPoints: Hashable, Codable, Sendable { public var end: String? public var start: String? @@ -72,7 +72,7 @@ public struct GameCenterMatchmakingQueueRequestsV1MetricResponse: Hashable, Coda case values } - public struct Values: Hashable, Codable { + public struct Values: Hashable, Codable, Sendable { public var averageSecondsInQueue: Float? public var count: Int? @@ -102,7 +102,7 @@ public struct GameCenterMatchmakingQueueRequestsV1MetricResponse: Hashable, Coda } } - public struct Dimensions: Hashable, Codable { + public struct Dimensions: Hashable, Codable, Sendable { public var gameCenterDetail: GameCenterDetail? public var result: Result? @@ -120,18 +120,25 @@ public struct GameCenterMatchmakingQueueRequestsV1MetricResponse: Hashable, Coda case result } - public struct GameCenterDetail: Hashable, Codable { + public struct GameCenterDetail: Hashable, Codable, Sendable { + public var data: String? + public var links: Links? - public init(links: Links? = nil) { + public init( + data: String? = nil, + links: Links? = nil + ) { + self.data = data self.links = links } private enum CodingKeys: String, CodingKey { + case data case links } - public struct Links: Hashable, Codable { + public struct Links: Hashable, Codable, Sendable { public var groupBy: URL? public var related: URL? @@ -151,18 +158,49 @@ public struct GameCenterMatchmakingQueueRequestsV1MetricResponse: Hashable, Coda } } - public struct Result: Hashable, Codable { + public struct Result: Hashable, Codable, Sendable { + public var data: Data? + public var links: Links? - public init(links: Links? = nil) { + public init( + data: Data? = nil, + links: Links? = nil + ) { + self.data = data self.links = links } private enum CodingKeys: String, CodingKey { + case data case links } - public struct Links: Hashable, Codable { + public struct Data: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var canceled: Self { + .init(rawValue: "CANCELED") + } + + public static var expired: Self { + .init(rawValue: "EXPIRED") + } + + public static var matched: Self { + .init(rawValue: "MATCHED") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct Links: Hashable, Codable, Sendable { public var groupBy: URL? public init(groupBy: URL? = nil) { @@ -176,28 +214,27 @@ public struct GameCenterMatchmakingQueueRequestsV1MetricResponse: Hashable, Coda } } - public enum Granularity: Hashable, Codable, RawRepresentable { - case p1D - case pT15M - case pT1H - case unknown(String) - - public var rawValue: String { - switch self { - case .p1D: return "P1D" - case .pT15M: return "PT15M" - case .pT1H: return "PT1H" - case .unknown(let rawValue): return rawValue - } + public struct Granularity: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var p1D: Self { + .init(rawValue: "P1D") + } + + public static var pT15M: Self { + .init(rawValue: "PT15M") } + public static var pT1H: Self { + .init(rawValue: "PT1H") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "P1D": self = .p1D - case "PT15M": self = .pT15M - case "PT1H": self = .pT1H - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterMatchmakingQueueResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterMatchmakingQueueResponse.generated.swift index 93484b8c..a4820fba 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterMatchmakingQueueResponse.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterMatchmakingQueueResponse.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct GameCenterMatchmakingQueueResponse: Hashable, Codable { +public struct GameCenterMatchmakingQueueResponse: Hashable, Codable, Sendable { public var data: GameCenterMatchmakingQueue public var included: [GameCenterMatchmakingRuleSet]? diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterMatchmakingQueueSizesV1MetricResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterMatchmakingQueueSizesV1MetricResponse.generated.swift index b4a48d28..7d2bfea9 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterMatchmakingQueueSizesV1MetricResponse.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterMatchmakingQueueSizesV1MetricResponse.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct GameCenterMatchmakingQueueSizesV1MetricResponse: Hashable, Codable { +public struct GameCenterMatchmakingQueueSizesV1MetricResponse: Hashable, Codable, Sendable { public var data: [Data] public var links: PagedDocumentLinks @@ -26,7 +26,7 @@ public struct GameCenterMatchmakingQueueSizesV1MetricResponse: Hashable, Codable case meta } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var dataPoints: DataPoints? public var granularity: Granularity? @@ -44,7 +44,7 @@ public struct GameCenterMatchmakingQueueSizesV1MetricResponse: Hashable, Codable case granularity } - public struct DataPoints: Hashable, Codable { + public struct DataPoints: Hashable, Codable, Sendable { public var end: String? public var start: String? @@ -67,7 +67,7 @@ public struct GameCenterMatchmakingQueueSizesV1MetricResponse: Hashable, Codable case values } - public struct Values: Hashable, Codable { + public struct Values: Hashable, Codable, Sendable { public var averageNumberOfRequests: Float? public var count: Int? @@ -97,28 +97,27 @@ public struct GameCenterMatchmakingQueueSizesV1MetricResponse: Hashable, Codable } } - public enum Granularity: Hashable, Codable, RawRepresentable { - case p1D - case pT15M - case pT1H - case unknown(String) - - public var rawValue: String { - switch self { - case .p1D: return "P1D" - case .pT15M: return "PT15M" - case .pT1H: return "PT1H" - case .unknown(let rawValue): return rawValue - } + public struct Granularity: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var p1D: Self { + .init(rawValue: "P1D") + } + + public static var pT15M: Self { + .init(rawValue: "PT15M") + } + + public static var pT1H: Self { + .init(rawValue: "PT1H") } + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "P1D": self = .p1D - case "PT15M": self = .pT15M - case "PT1H": self = .pT1H - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterMatchmakingQueuesResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterMatchmakingQueuesResponse.generated.swift index f1d59e66..dfd60ef5 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterMatchmakingQueuesResponse.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterMatchmakingQueuesResponse.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct GameCenterMatchmakingQueuesResponse: Hashable, Codable { +public struct GameCenterMatchmakingQueuesResponse: Hashable, Codable, Sendable { public var data: [GameCenterMatchmakingQueue] public var included: [GameCenterMatchmakingRuleSet]? diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterMatchmakingRuleErrorsV1MetricResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterMatchmakingRuleErrorsV1MetricResponse.generated.swift index 11bb4974..019a82ed 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterMatchmakingRuleErrorsV1MetricResponse.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterMatchmakingRuleErrorsV1MetricResponse.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct GameCenterMatchmakingRuleErrorsV1MetricResponse: Hashable, Codable { +public struct GameCenterMatchmakingRuleErrorsV1MetricResponse: Hashable, Codable, Sendable { public var data: [Data] public var links: PagedDocumentLinks @@ -26,7 +26,7 @@ public struct GameCenterMatchmakingRuleErrorsV1MetricResponse: Hashable, Codable case meta } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var dataPoints: DataPoints? public var dimensions: Dimensions? @@ -49,7 +49,7 @@ public struct GameCenterMatchmakingRuleErrorsV1MetricResponse: Hashable, Codable case granularity } - public struct DataPoints: Hashable, Codable { + public struct DataPoints: Hashable, Codable, Sendable { public var end: String? public var start: String? @@ -72,7 +72,7 @@ public struct GameCenterMatchmakingRuleErrorsV1MetricResponse: Hashable, Codable case values } - public struct Values: Hashable, Codable { + public struct Values: Hashable, Codable, Sendable { public var count: Int? public init(count: Int? = nil) { @@ -85,7 +85,7 @@ public struct GameCenterMatchmakingRuleErrorsV1MetricResponse: Hashable, Codable } } - public struct Dimensions: Hashable, Codable { + public struct Dimensions: Hashable, Codable, Sendable { public var gameCenterMatchmakingQueue: GameCenterMatchmakingQueue? public init(gameCenterMatchmakingQueue: GameCenterMatchmakingQueue? = nil) { @@ -96,18 +96,25 @@ public struct GameCenterMatchmakingRuleErrorsV1MetricResponse: Hashable, Codable case gameCenterMatchmakingQueue } - public struct GameCenterMatchmakingQueue: Hashable, Codable { + public struct GameCenterMatchmakingQueue: Hashable, Codable, Sendable { + public var data: String? + public var links: Links? - public init(links: Links? = nil) { + public init( + data: String? = nil, + links: Links? = nil + ) { + self.data = data self.links = links } private enum CodingKeys: String, CodingKey { + case data case links } - public struct Links: Hashable, Codable { + public struct Links: Hashable, Codable, Sendable { public var groupBy: URL? public var related: URL? @@ -128,28 +135,27 @@ public struct GameCenterMatchmakingRuleErrorsV1MetricResponse: Hashable, Codable } } - public enum Granularity: Hashable, Codable, RawRepresentable { - case p1D - case pT15M - case pT1H - case unknown(String) - - public var rawValue: String { - switch self { - case .p1D: return "P1D" - case .pT15M: return "PT15M" - case .pT1H: return "PT1H" - case .unknown(let rawValue): return rawValue - } + public struct Granularity: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var p1D: Self { + .init(rawValue: "P1D") + } + + public static var pT15M: Self { + .init(rawValue: "PT15M") + } + + public static var pT1H: Self { + .init(rawValue: "PT1H") + } + + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "P1D": self = .p1D - case "PT15M": self = .pT15M - case "PT1H": self = .pT1H - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterMatchmakingRuleResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterMatchmakingRuleResponse.generated.swift index 8d99def6..2c2be667 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterMatchmakingRuleResponse.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterMatchmakingRuleResponse.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct GameCenterMatchmakingRuleResponse: Hashable, Codable { +public struct GameCenterMatchmakingRuleResponse: Hashable, Codable, Sendable { public var data: GameCenterMatchmakingRule public var links: DocumentLinks diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterMatchmakingRuleSetMatchmakingQueuesLinkagesResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterMatchmakingRuleSetMatchmakingQueuesLinkagesResponse.generated.swift new file mode 100644 index 00000000..37625088 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterMatchmakingRuleSetMatchmakingQueuesLinkagesResponse.generated.swift @@ -0,0 +1,53 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct GameCenterMatchmakingRuleSetMatchmakingQueuesLinkagesResponse: Hashable, Codable, Sendable { + public var data: [Data] + + public var links: PagedDocumentLinks + + public var meta: PagingInformation? + + public init( + data: [Data], + links: PagedDocumentLinks, + meta: PagingInformation? = nil + ) { + self.data = data + self.links = links + self.meta = meta + } + + private enum CodingKeys: String, CodingKey { + case data + case links + case meta + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case gameCenterMatchmakingQueues + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterMatchmakingRuleSetResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterMatchmakingRuleSetResponse.generated.swift index 10fcb833..01f2fd74 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterMatchmakingRuleSetResponse.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterMatchmakingRuleSetResponse.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct GameCenterMatchmakingRuleSetResponse: Hashable, Codable { +public struct GameCenterMatchmakingRuleSetResponse: Hashable, Codable, Sendable { public var data: GameCenterMatchmakingRuleSet public var included: [Included]? @@ -26,7 +26,7 @@ public struct GameCenterMatchmakingRuleSetResponse: Hashable, Codable { case links } - public enum Included: Hashable, Codable { + public enum Included: Hashable, Codable, Sendable { case gameCenterMatchmakingTeam(GameCenterMatchmakingTeam) case gameCenterMatchmakingRule(GameCenterMatchmakingRule) case gameCenterMatchmakingQueue(GameCenterMatchmakingQueue) diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterMatchmakingRuleSetRulesLinkagesResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterMatchmakingRuleSetRulesLinkagesResponse.generated.swift new file mode 100644 index 00000000..38a3dc3e --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterMatchmakingRuleSetRulesLinkagesResponse.generated.swift @@ -0,0 +1,53 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct GameCenterMatchmakingRuleSetRulesLinkagesResponse: Hashable, Codable, Sendable { + public var data: [Data] + + public var links: PagedDocumentLinks + + public var meta: PagingInformation? + + public init( + data: [Data], + links: PagedDocumentLinks, + meta: PagingInformation? = nil + ) { + self.data = data + self.links = links + self.meta = meta + } + + private enum CodingKeys: String, CodingKey { + case data + case links + case meta + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case gameCenterMatchmakingRules + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterMatchmakingRuleSetTeamsLinkagesResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterMatchmakingRuleSetTeamsLinkagesResponse.generated.swift new file mode 100644 index 00000000..71bcfd16 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterMatchmakingRuleSetTeamsLinkagesResponse.generated.swift @@ -0,0 +1,53 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct GameCenterMatchmakingRuleSetTeamsLinkagesResponse: Hashable, Codable, Sendable { + public var data: [Data] + + public var links: PagedDocumentLinks + + public var meta: PagingInformation? + + public init( + data: [Data], + links: PagedDocumentLinks, + meta: PagingInformation? = nil + ) { + self.data = data + self.links = links + self.meta = meta + } + + private enum CodingKeys: String, CodingKey { + case data + case links + case meta + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case gameCenterMatchmakingTeams + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterMatchmakingRuleSetTestResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterMatchmakingRuleSetTestResponse.generated.swift index 05d6e223..bd2fcdcb 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterMatchmakingRuleSetTestResponse.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterMatchmakingRuleSetTestResponse.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct GameCenterMatchmakingRuleSetTestResponse: Hashable, Codable { +public struct GameCenterMatchmakingRuleSetTestResponse: Hashable, Codable, Sendable { public var data: GameCenterMatchmakingRuleSetTest public var links: DocumentLinks diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterMatchmakingRuleSetsResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterMatchmakingRuleSetsResponse.generated.swift index 916e12b2..771fc14d 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterMatchmakingRuleSetsResponse.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterMatchmakingRuleSetsResponse.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct GameCenterMatchmakingRuleSetsResponse: Hashable, Codable { +public struct GameCenterMatchmakingRuleSetsResponse: Hashable, Codable, Sendable { public var data: [GameCenterMatchmakingRuleSet] public var included: [Included]? @@ -31,7 +31,7 @@ public struct GameCenterMatchmakingRuleSetsResponse: Hashable, Codable { case meta } - public enum Included: Hashable, Codable { + public enum Included: Hashable, Codable, Sendable { case gameCenterMatchmakingTeam(GameCenterMatchmakingTeam) case gameCenterMatchmakingRule(GameCenterMatchmakingRule) case gameCenterMatchmakingQueue(GameCenterMatchmakingQueue) diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterMatchmakingRulesResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterMatchmakingRulesResponse.generated.swift index 51906557..bef3fce5 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterMatchmakingRulesResponse.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterMatchmakingRulesResponse.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct GameCenterMatchmakingRulesResponse: Hashable, Codable { +public struct GameCenterMatchmakingRulesResponse: Hashable, Codable, Sendable { public var data: [GameCenterMatchmakingRule] public var links: PagedDocumentLinks diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterMatchmakingSessionsV1MetricResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterMatchmakingSessionsV1MetricResponse.generated.swift index 214cfc4f..b5805625 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterMatchmakingSessionsV1MetricResponse.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterMatchmakingSessionsV1MetricResponse.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct GameCenterMatchmakingSessionsV1MetricResponse: Hashable, Codable { +public struct GameCenterMatchmakingSessionsV1MetricResponse: Hashable, Codable, Sendable { public var data: [Data] public var links: PagedDocumentLinks @@ -26,7 +26,7 @@ public struct GameCenterMatchmakingSessionsV1MetricResponse: Hashable, Codable { case meta } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var dataPoints: DataPoints? public var granularity: Granularity? @@ -44,7 +44,7 @@ public struct GameCenterMatchmakingSessionsV1MetricResponse: Hashable, Codable { case granularity } - public struct DataPoints: Hashable, Codable { + public struct DataPoints: Hashable, Codable, Sendable { public var end: String? public var start: String? @@ -67,7 +67,7 @@ public struct GameCenterMatchmakingSessionsV1MetricResponse: Hashable, Codable { case values } - public struct Values: Hashable, Codable { + public struct Values: Hashable, Codable, Sendable { public var averagePlayerCount: Float? public var count: Int? @@ -97,28 +97,27 @@ public struct GameCenterMatchmakingSessionsV1MetricResponse: Hashable, Codable { } } - public enum Granularity: Hashable, Codable, RawRepresentable { - case p1D - case pT15M - case pT1H - case unknown(String) - - public var rawValue: String { - switch self { - case .p1D: return "P1D" - case .pT15M: return "PT15M" - case .pT1H: return "PT1H" - case .unknown(let rawValue): return rawValue - } + public struct Granularity: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var p1D: Self { + .init(rawValue: "P1D") + } + + public static var pT15M: Self { + .init(rawValue: "PT15M") + } + + public static var pT1H: Self { + .init(rawValue: "PT1H") } + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "P1D": self = .p1D - case "PT15M": self = .pT15M - case "PT1H": self = .pT1H - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterMatchmakingTeamResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterMatchmakingTeamResponse.generated.swift index 4ef0a06b..c460ec59 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterMatchmakingTeamResponse.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterMatchmakingTeamResponse.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct GameCenterMatchmakingTeamResponse: Hashable, Codable { +public struct GameCenterMatchmakingTeamResponse: Hashable, Codable, Sendable { public var data: GameCenterMatchmakingTeam public var links: DocumentLinks diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterMatchmakingTeamsResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterMatchmakingTeamsResponse.generated.swift index e5d2c0b9..4fa4064a 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterMatchmakingTeamsResponse.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterMatchmakingTeamsResponse.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct GameCenterMatchmakingTeamsResponse: Hashable, Codable { +public struct GameCenterMatchmakingTeamsResponse: Hashable, Codable, Sendable { public var data: [GameCenterMatchmakingTeam] public var links: PagedDocumentLinks diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterPlayerAchievementSubmissionResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterPlayerAchievementSubmissionResponse.generated.swift new file mode 100644 index 00000000..8ca0d0e7 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/GameCenterPlayerAchievementSubmissionResponse.generated.swift @@ -0,0 +1,25 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct GameCenterPlayerAchievementSubmissionResponse: Hashable, Codable, Sendable { + public var data: GameCenterPlayerAchievementSubmission + + public var links: DocumentLinks + + public init( + data: GameCenterPlayerAchievementSubmission, + links: DocumentLinks + ) { + self.data = data + self.links = links + } + + private enum CodingKeys: String, CodingKey { + case data + case links + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/InAppPurchaseAppStoreReviewScreenshotResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/InAppPurchaseAppStoreReviewScreenshotResponse.generated.swift index 28ba15ca..01464811 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/InAppPurchaseAppStoreReviewScreenshotResponse.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/InAppPurchaseAppStoreReviewScreenshotResponse.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct InAppPurchaseAppStoreReviewScreenshotResponse: Hashable, Codable { +public struct InAppPurchaseAppStoreReviewScreenshotResponse: Hashable, Codable, Sendable { public var data: InAppPurchaseAppStoreReviewScreenshot public var included: [InAppPurchaseV2]? diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/InAppPurchaseAvailabilityAvailableTerritoriesLinkagesResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/InAppPurchaseAvailabilityAvailableTerritoriesLinkagesResponse.generated.swift new file mode 100644 index 00000000..a59e0cf9 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/InAppPurchaseAvailabilityAvailableTerritoriesLinkagesResponse.generated.swift @@ -0,0 +1,53 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct InAppPurchaseAvailabilityAvailableTerritoriesLinkagesResponse: Hashable, Codable, Sendable { + public var data: [Data] + + public var links: PagedDocumentLinks + + public var meta: PagingInformation? + + public init( + data: [Data], + links: PagedDocumentLinks, + meta: PagingInformation? = nil + ) { + self.data = data + self.links = links + self.meta = meta + } + + private enum CodingKeys: String, CodingKey { + case data + case links + case meta + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case territories + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/InAppPurchaseAvailabilityResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/InAppPurchaseAvailabilityResponse.generated.swift index 64c2c0f4..6b9a120d 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/InAppPurchaseAvailabilityResponse.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/InAppPurchaseAvailabilityResponse.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct InAppPurchaseAvailabilityResponse: Hashable, Codable { +public struct InAppPurchaseAvailabilityResponse: Hashable, Codable, Sendable { public var data: InAppPurchaseAvailability public var included: [Territory]? diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/InAppPurchaseContentResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/InAppPurchaseContentResponse.generated.swift index 67d0c4c0..2d195dca 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/InAppPurchaseContentResponse.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/InAppPurchaseContentResponse.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct InAppPurchaseContentResponse: Hashable, Codable { +public struct InAppPurchaseContentResponse: Hashable, Codable, Sendable { public var data: InAppPurchaseContent public var included: [InAppPurchaseV2]? diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/PromotedPurchaseImageResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/InAppPurchaseImageResponse.generated.swift similarity index 62% rename from Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/PromotedPurchaseImageResponse.generated.swift rename to Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/InAppPurchaseImageResponse.generated.swift index 75715f4d..695c2c5f 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/PromotedPurchaseImageResponse.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/InAppPurchaseImageResponse.generated.swift @@ -3,16 +3,16 @@ // swiftlint:disable all import Foundation -public struct PromotedPurchaseImageResponse: Hashable, Codable { - public var data: PromotedPurchaseImage +public struct InAppPurchaseImageResponse: Hashable, Codable, Sendable { + public var data: InAppPurchaseImage - public var included: [PromotedPurchase]? + public var included: [InAppPurchaseV2]? public var links: DocumentLinks public init( - data: PromotedPurchaseImage, - included: [PromotedPurchase]? = nil, + data: InAppPurchaseImage, + included: [InAppPurchaseV2]? = nil, links: DocumentLinks ) { self.data = data diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/PromotedPurchaseImagesResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/InAppPurchaseImagesResponse.generated.swift similarity index 68% rename from Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/PromotedPurchaseImagesResponse.generated.swift rename to Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/InAppPurchaseImagesResponse.generated.swift index 2e378f4a..8db76d47 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/PromotedPurchaseImagesResponse.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/InAppPurchaseImagesResponse.generated.swift @@ -3,18 +3,18 @@ // swiftlint:disable all import Foundation -public struct PromotedPurchaseImagesResponse: Hashable, Codable { - public var data: [PromotedPurchaseImage] +public struct InAppPurchaseImagesResponse: Hashable, Codable, Sendable { + public var data: [InAppPurchaseImage] - public var included: [PromotedPurchase]? + public var included: [InAppPurchaseV2]? public var links: PagedDocumentLinks public var meta: PagingInformation? public init( - data: [PromotedPurchaseImage], - included: [PromotedPurchase]? = nil, + data: [InAppPurchaseImage], + included: [InAppPurchaseV2]? = nil, links: PagedDocumentLinks, meta: PagingInformation? = nil ) { diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/InAppPurchaseLocalizationResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/InAppPurchaseLocalizationResponse.generated.swift index 0d91381f..7eb3c7ec 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/InAppPurchaseLocalizationResponse.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/InAppPurchaseLocalizationResponse.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct InAppPurchaseLocalizationResponse: Hashable, Codable { +public struct InAppPurchaseLocalizationResponse: Hashable, Codable, Sendable { public var data: InAppPurchaseLocalization public var included: [InAppPurchaseV2]? diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/InAppPurchaseLocalizationsResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/InAppPurchaseLocalizationsResponse.generated.swift index 485b171e..10f05963 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/InAppPurchaseLocalizationsResponse.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/InAppPurchaseLocalizationsResponse.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct InAppPurchaseLocalizationsResponse: Hashable, Codable { +public struct InAppPurchaseLocalizationsResponse: Hashable, Codable, Sendable { public var data: [InAppPurchaseLocalization] public var included: [InAppPurchaseV2]? diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/InAppPurchasePricePointEqualizationsLinkagesResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/InAppPurchasePricePointEqualizationsLinkagesResponse.generated.swift new file mode 100644 index 00000000..a506f34f --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/InAppPurchasePricePointEqualizationsLinkagesResponse.generated.swift @@ -0,0 +1,53 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct InAppPurchasePricePointEqualizationsLinkagesResponse: Hashable, Codable, Sendable { + public var data: [Data] + + public var links: PagedDocumentLinks + + public var meta: PagingInformation? + + public init( + data: [Data], + links: PagedDocumentLinks, + meta: PagingInformation? = nil + ) { + self.data = data + self.links = links + self.meta = meta + } + + private enum CodingKeys: String, CodingKey { + case data + case links + case meta + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case inAppPurchasePricePoints + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/InAppPurchasePricePointsResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/InAppPurchasePricePointsResponse.generated.swift index c5bb71de..2afc1814 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/InAppPurchasePricePointsResponse.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/InAppPurchasePricePointsResponse.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct InAppPurchasePricePointsResponse: Hashable, Codable { +public struct InAppPurchasePricePointsResponse: Hashable, Codable, Sendable { public var data: [InAppPurchasePricePoint] public var included: [Territory]? diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/InAppPurchasePriceScheduleAutomaticPricesLinkagesResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/InAppPurchasePriceScheduleAutomaticPricesLinkagesResponse.generated.swift new file mode 100644 index 00000000..79b3845a --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/InAppPurchasePriceScheduleAutomaticPricesLinkagesResponse.generated.swift @@ -0,0 +1,53 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct InAppPurchasePriceScheduleAutomaticPricesLinkagesResponse: Hashable, Codable, Sendable { + public var data: [Data] + + public var links: PagedDocumentLinks + + public var meta: PagingInformation? + + public init( + data: [Data], + links: PagedDocumentLinks, + meta: PagingInformation? = nil + ) { + self.data = data + self.links = links + self.meta = meta + } + + private enum CodingKeys: String, CodingKey { + case data + case links + case meta + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case inAppPurchasePrices + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/InAppPurchasePriceScheduleBaseTerritoryLinkageResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/InAppPurchasePriceScheduleBaseTerritoryLinkageResponse.generated.swift new file mode 100644 index 00000000..8c6b9277 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/InAppPurchasePriceScheduleBaseTerritoryLinkageResponse.generated.swift @@ -0,0 +1,48 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct InAppPurchasePriceScheduleBaseTerritoryLinkageResponse: Hashable, Codable, Sendable { + public var data: Data + + public var links: DocumentLinks + + public init( + data: Data, + links: DocumentLinks + ) { + self.data = data + self.links = links + } + + private enum CodingKeys: String, CodingKey { + case data + case links + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case territories + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/InAppPurchasePriceScheduleManualPricesLinkagesResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/InAppPurchasePriceScheduleManualPricesLinkagesResponse.generated.swift new file mode 100644 index 00000000..19aeecfd --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/InAppPurchasePriceScheduleManualPricesLinkagesResponse.generated.swift @@ -0,0 +1,53 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct InAppPurchasePriceScheduleManualPricesLinkagesResponse: Hashable, Codable, Sendable { + public var data: [Data] + + public var links: PagedDocumentLinks + + public var meta: PagingInformation? + + public init( + data: [Data], + links: PagedDocumentLinks, + meta: PagingInformation? = nil + ) { + self.data = data + self.links = links + self.meta = meta + } + + private enum CodingKeys: String, CodingKey { + case data + case links + case meta + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case inAppPurchasePrices + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/InAppPurchasePriceScheduleResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/InAppPurchasePriceScheduleResponse.generated.swift index bf2ec3bc..201a12af 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/InAppPurchasePriceScheduleResponse.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/InAppPurchasePriceScheduleResponse.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct InAppPurchasePriceScheduleResponse: Hashable, Codable { +public struct InAppPurchasePriceScheduleResponse: Hashable, Codable, Sendable { public var data: InAppPurchasePriceSchedule public var included: [Included]? @@ -26,19 +26,13 @@ public struct InAppPurchasePriceScheduleResponse: Hashable, Codable { case links } - public enum Included: Hashable, Codable { - case inAppPurchaseV2(InAppPurchaseV2) + public enum Included: Hashable, Codable, Sendable { case territory(Territory) case inAppPurchasePrice(InAppPurchasePrice) public init(from decoder: Decoder) throws { self = try { var lastError: Error! - do { - return .inAppPurchaseV2(try InAppPurchaseV2(from: decoder)) - } catch { - lastError = error - } do { return .territory(try Territory(from: decoder)) } catch { @@ -55,9 +49,6 @@ public struct InAppPurchasePriceScheduleResponse: Hashable, Codable { public func encode(to encoder: Encoder) throws { switch self { - case .inAppPurchaseV2(let value): - try value.encode(to: encoder) - case .territory(let value): try value.encode(to: encoder) diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/InAppPurchasePricesResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/InAppPurchasePricesResponse.generated.swift index 61b10b40..a3bf7607 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/InAppPurchasePricesResponse.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/InAppPurchasePricesResponse.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct InAppPurchasePricesResponse: Hashable, Codable { +public struct InAppPurchasePricesResponse: Hashable, Codable, Sendable { public var data: [InAppPurchasePrice] public var included: [Included]? @@ -31,7 +31,7 @@ public struct InAppPurchasePricesResponse: Hashable, Codable { case meta } - public enum Included: Hashable, Codable { + public enum Included: Hashable, Codable, Sendable { case inAppPurchasePricePoint(InAppPurchasePricePoint) case territory(Territory) diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/InAppPurchaseResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/InAppPurchaseResponse.generated.swift index 3027700c..5ae90c2f 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/InAppPurchaseResponse.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/InAppPurchaseResponse.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct InAppPurchaseResponse: Hashable, Codable { +public struct InAppPurchaseResponse: Hashable, Codable, Sendable { public var data: InAppPurchase public var included: [App]? diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/InAppPurchaseSubmissionResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/InAppPurchaseSubmissionResponse.generated.swift index 95e50129..32d29741 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/InAppPurchaseSubmissionResponse.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/InAppPurchaseSubmissionResponse.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct InAppPurchaseSubmissionResponse: Hashable, Codable { +public struct InAppPurchaseSubmissionResponse: Hashable, Codable, Sendable { public var data: InAppPurchaseSubmission public var included: [InAppPurchaseV2]? diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/InAppPurchaseV2AppStoreReviewScreenshotLinkageResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/InAppPurchaseV2AppStoreReviewScreenshotLinkageResponse.generated.swift new file mode 100644 index 00000000..b9e5dba8 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/InAppPurchaseV2AppStoreReviewScreenshotLinkageResponse.generated.swift @@ -0,0 +1,48 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct InAppPurchaseV2AppStoreReviewScreenshotLinkageResponse: Hashable, Codable, Sendable { + public var data: Data + + public var links: DocumentLinks + + public init( + data: Data, + links: DocumentLinks + ) { + self.data = data + self.links = links + } + + private enum CodingKeys: String, CodingKey { + case data + case links + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case inAppPurchaseAppStoreReviewScreenshots + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/InAppPurchaseV2ContentLinkageResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/InAppPurchaseV2ContentLinkageResponse.generated.swift new file mode 100644 index 00000000..7e0a51be --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/InAppPurchaseV2ContentLinkageResponse.generated.swift @@ -0,0 +1,48 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct InAppPurchaseV2ContentLinkageResponse: Hashable, Codable, Sendable { + public var data: Data + + public var links: DocumentLinks + + public init( + data: Data, + links: DocumentLinks + ) { + self.data = data + self.links = links + } + + private enum CodingKeys: String, CodingKey { + case data + case links + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case inAppPurchaseContents + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/InAppPurchaseV2IapPriceScheduleLinkageResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/InAppPurchaseV2IapPriceScheduleLinkageResponse.generated.swift new file mode 100644 index 00000000..882bf60a --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/InAppPurchaseV2IapPriceScheduleLinkageResponse.generated.swift @@ -0,0 +1,48 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct InAppPurchaseV2IapPriceScheduleLinkageResponse: Hashable, Codable, Sendable { + public var data: Data + + public var links: DocumentLinks + + public init( + data: Data, + links: DocumentLinks + ) { + self.data = data + self.links = links + } + + private enum CodingKeys: String, CodingKey { + case data + case links + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case inAppPurchasePriceSchedules + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/InAppPurchaseV2ImagesLinkagesResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/InAppPurchaseV2ImagesLinkagesResponse.generated.swift new file mode 100644 index 00000000..51d957de --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/InAppPurchaseV2ImagesLinkagesResponse.generated.swift @@ -0,0 +1,53 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct InAppPurchaseV2ImagesLinkagesResponse: Hashable, Codable, Sendable { + public var data: [Data] + + public var links: PagedDocumentLinks + + public var meta: PagingInformation? + + public init( + data: [Data], + links: PagedDocumentLinks, + meta: PagingInformation? = nil + ) { + self.data = data + self.links = links + self.meta = meta + } + + private enum CodingKeys: String, CodingKey { + case data + case links + case meta + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case inAppPurchaseImages + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/InAppPurchaseV2InAppPurchaseAvailabilityLinkageResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/InAppPurchaseV2InAppPurchaseAvailabilityLinkageResponse.generated.swift new file mode 100644 index 00000000..3b5492c1 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/InAppPurchaseV2InAppPurchaseAvailabilityLinkageResponse.generated.swift @@ -0,0 +1,48 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct InAppPurchaseV2InAppPurchaseAvailabilityLinkageResponse: Hashable, Codable, Sendable { + public var data: Data + + public var links: DocumentLinks + + public init( + data: Data, + links: DocumentLinks + ) { + self.data = data + self.links = links + } + + private enum CodingKeys: String, CodingKey { + case data + case links + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case inAppPurchaseAvailabilities + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/InAppPurchaseV2InAppPurchaseLocalizationsLinkagesResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/InAppPurchaseV2InAppPurchaseLocalizationsLinkagesResponse.generated.swift new file mode 100644 index 00000000..f6714e1a --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/InAppPurchaseV2InAppPurchaseLocalizationsLinkagesResponse.generated.swift @@ -0,0 +1,53 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct InAppPurchaseV2InAppPurchaseLocalizationsLinkagesResponse: Hashable, Codable, Sendable { + public var data: [Data] + + public var links: PagedDocumentLinks + + public var meta: PagingInformation? + + public init( + data: [Data], + links: PagedDocumentLinks, + meta: PagingInformation? = nil + ) { + self.data = data + self.links = links + self.meta = meta + } + + private enum CodingKeys: String, CodingKey { + case data + case links + case meta + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case inAppPurchaseLocalizations + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/InAppPurchaseV2PricePointsLinkagesResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/InAppPurchaseV2PricePointsLinkagesResponse.generated.swift new file mode 100644 index 00000000..bf66f0b0 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/InAppPurchaseV2PricePointsLinkagesResponse.generated.swift @@ -0,0 +1,53 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct InAppPurchaseV2PricePointsLinkagesResponse: Hashable, Codable, Sendable { + public var data: [Data] + + public var links: PagedDocumentLinks + + public var meta: PagingInformation? + + public init( + data: [Data], + links: PagedDocumentLinks, + meta: PagingInformation? = nil + ) { + self.data = data + self.links = links + self.meta = meta + } + + private enum CodingKeys: String, CodingKey { + case data + case links + case meta + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case inAppPurchasePricePoints + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/InAppPurchaseV2PromotedPurchaseLinkageResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/InAppPurchaseV2PromotedPurchaseLinkageResponse.generated.swift new file mode 100644 index 00000000..006f22b6 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/InAppPurchaseV2PromotedPurchaseLinkageResponse.generated.swift @@ -0,0 +1,48 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct InAppPurchaseV2PromotedPurchaseLinkageResponse: Hashable, Codable, Sendable { + public var data: Data + + public var links: DocumentLinks + + public init( + data: Data, + links: DocumentLinks + ) { + self.data = data + self.links = links + } + + private enum CodingKeys: String, CodingKey { + case data + case links + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case promotedPurchases + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/InAppPurchaseV2Response.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/InAppPurchaseV2Response.generated.swift index fd5c9f2f..25ae31bf 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/InAppPurchaseV2Response.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/InAppPurchaseV2Response.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct InAppPurchaseV2Response: Hashable, Codable { +public struct InAppPurchaseV2Response: Hashable, Codable, Sendable { public var data: InAppPurchaseV2 public var included: [Included]? @@ -26,7 +26,7 @@ public struct InAppPurchaseV2Response: Hashable, Codable { case links } - public enum Included: Hashable, Codable { + public enum Included: Hashable, Codable, Sendable { case inAppPurchaseLocalization(InAppPurchaseLocalization) case inAppPurchasePricePoint(InAppPurchasePricePoint) case inAppPurchaseContent(InAppPurchaseContent) @@ -34,6 +34,7 @@ public struct InAppPurchaseV2Response: Hashable, Codable { case promotedPurchase(PromotedPurchase) case inAppPurchasePriceSchedule(InAppPurchasePriceSchedule) case inAppPurchaseAvailability(InAppPurchaseAvailability) + case inAppPurchaseImage(InAppPurchaseImage) public init(from decoder: Decoder) throws { self = try { @@ -73,6 +74,11 @@ public struct InAppPurchaseV2Response: Hashable, Codable { } catch { lastError = error } + do { + return .inAppPurchaseImage(try InAppPurchaseImage(from: decoder)) + } catch { + lastError = error + } throw lastError }() } @@ -99,6 +105,9 @@ public struct InAppPurchaseV2Response: Hashable, Codable { case .inAppPurchaseAvailability(let value): try value.encode(to: encoder) + + case .inAppPurchaseImage(let value): + try value.encode(to: encoder) } } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/InAppPurchasesResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/InAppPurchasesResponse.generated.swift index 636d3fe7..bd564fe1 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/InAppPurchasesResponse.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/InAppPurchasesResponse.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct InAppPurchasesResponse: Hashable, Codable { +public struct InAppPurchasesResponse: Hashable, Codable, Sendable { public var data: [InAppPurchase] public var included: [App]? diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/InAppPurchasesV2Response.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/InAppPurchasesV2Response.generated.swift index 55a90e12..8870cd50 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/InAppPurchasesV2Response.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/InAppPurchasesV2Response.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct InAppPurchasesV2Response: Hashable, Codable { +public struct InAppPurchasesV2Response: Hashable, Codable, Sendable { public var data: [InAppPurchaseV2] public var included: [Included]? @@ -31,7 +31,7 @@ public struct InAppPurchasesV2Response: Hashable, Codable { case meta } - public enum Included: Hashable, Codable { + public enum Included: Hashable, Codable, Sendable { case inAppPurchaseLocalization(InAppPurchaseLocalization) case inAppPurchasePricePoint(InAppPurchasePricePoint) case inAppPurchaseContent(InAppPurchaseContent) @@ -39,6 +39,7 @@ public struct InAppPurchasesV2Response: Hashable, Codable { case promotedPurchase(PromotedPurchase) case inAppPurchasePriceSchedule(InAppPurchasePriceSchedule) case inAppPurchaseAvailability(InAppPurchaseAvailability) + case inAppPurchaseImage(InAppPurchaseImage) public init(from decoder: Decoder) throws { self = try { @@ -78,6 +79,11 @@ public struct InAppPurchasesV2Response: Hashable, Codable { } catch { lastError = error } + do { + return .inAppPurchaseImage(try InAppPurchaseImage(from: decoder)) + } catch { + lastError = error + } throw lastError }() } @@ -104,6 +110,9 @@ public struct InAppPurchasesV2Response: Hashable, Codable { case .inAppPurchaseAvailability(let value): try value.encode(to: encoder) + + case .inAppPurchaseImage(let value): + try value.encode(to: encoder) } } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/MarketplaceSearchDetailResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/MarketplaceSearchDetailResponse.generated.swift new file mode 100644 index 00000000..d7970484 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/MarketplaceSearchDetailResponse.generated.swift @@ -0,0 +1,25 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct MarketplaceSearchDetailResponse: Hashable, Codable, Sendable { + public var data: MarketplaceSearchDetail + + public var links: DocumentLinks + + public init( + data: MarketplaceSearchDetail, + links: DocumentLinks + ) { + self.data = data + self.links = links + } + + private enum CodingKeys: String, CodingKey { + case data + case links + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/MarketplaceWebhookResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/MarketplaceWebhookResponse.generated.swift new file mode 100644 index 00000000..992e09c5 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/MarketplaceWebhookResponse.generated.swift @@ -0,0 +1,25 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct MarketplaceWebhookResponse: Hashable, Codable, Sendable { + public var data: MarketplaceWebhook + + public var links: DocumentLinks + + public init( + data: MarketplaceWebhook, + links: DocumentLinks + ) { + self.data = data + self.links = links + } + + private enum CodingKeys: String, CodingKey { + case data + case links + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/MarketplaceWebhooksResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/MarketplaceWebhooksResponse.generated.swift new file mode 100644 index 00000000..3b72f5ec --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/MarketplaceWebhooksResponse.generated.swift @@ -0,0 +1,30 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct MarketplaceWebhooksResponse: Hashable, Codable, Sendable { + public var data: [MarketplaceWebhook] + + public var links: PagedDocumentLinks + + public var meta: PagingInformation? + + public init( + data: [MarketplaceWebhook], + links: PagedDocumentLinks, + meta: PagingInformation? = nil + ) { + self.data = data + self.links = links + self.meta = meta + } + + private enum CodingKeys: String, CodingKey { + case data + case links + case meta + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/MerchantIdCertificatesLinkagesResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/MerchantIdCertificatesLinkagesResponse.generated.swift new file mode 100644 index 00000000..a1713067 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/MerchantIdCertificatesLinkagesResponse.generated.swift @@ -0,0 +1,53 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct MerchantIdCertificatesLinkagesResponse: Hashable, Codable, Sendable { + public var data: [Data] + + public var links: PagedDocumentLinks + + public var meta: PagingInformation? + + public init( + data: [Data], + links: PagedDocumentLinks, + meta: PagingInformation? = nil + ) { + self.data = data + self.links = links + self.meta = meta + } + + private enum CodingKeys: String, CodingKey { + case data + case links + case meta + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case certificates + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppPriceTierResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/MerchantIdResponse.generated.swift similarity index 65% rename from Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppPriceTierResponse.generated.swift rename to Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/MerchantIdResponse.generated.swift index 1d13cc47..c24142a5 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppPriceTierResponse.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/MerchantIdResponse.generated.swift @@ -3,16 +3,16 @@ // swiftlint:disable all import Foundation -public struct AppPriceTierResponse: Hashable, Codable { - public var data: AppPriceTier +public struct MerchantIdResponse: Hashable, Codable, Sendable { + public var data: MerchantId - public var included: [AppPricePoint]? + public var included: [Certificate]? public var links: DocumentLinks public init( - data: AppPriceTier, - included: [AppPricePoint]? = nil, + data: MerchantId, + included: [Certificate]? = nil, links: DocumentLinks ) { self.data = data diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppPriceTiersResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/MerchantIdsResponse.generated.swift similarity index 71% rename from Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppPriceTiersResponse.generated.swift rename to Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/MerchantIdsResponse.generated.swift index 4159fedd..b3e031d8 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppPriceTiersResponse.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/MerchantIdsResponse.generated.swift @@ -3,18 +3,18 @@ // swiftlint:disable all import Foundation -public struct AppPriceTiersResponse: Hashable, Codable { - public var data: [AppPriceTier] +public struct MerchantIdsResponse: Hashable, Codable, Sendable { + public var data: [MerchantId] - public var included: [AppPricePoint]? + public var included: [Certificate]? public var links: PagedDocumentLinks public var meta: PagingInformation? public init( - data: [AppPriceTier], - included: [AppPricePoint]? = nil, + data: [MerchantId], + included: [Certificate]? = nil, links: PagedDocumentLinks, meta: PagingInformation? = nil ) { diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppAvailabilityResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/NominationResponse.generated.swift similarity index 63% rename from Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppAvailabilityResponse.generated.swift rename to Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/NominationResponse.generated.swift index 65df73b3..36d69d41 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppAvailabilityResponse.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/NominationResponse.generated.swift @@ -3,15 +3,15 @@ // swiftlint:disable all import Foundation -public struct AppAvailabilityResponse: Hashable, Codable { - public var data: AppAvailability +public struct NominationResponse: Hashable, Codable, Sendable { + public var data: Nomination public var included: [Included]? public var links: DocumentLinks public init( - data: AppAvailability, + data: Nomination, included: [Included]? = nil, links: DocumentLinks ) { @@ -26,8 +26,10 @@ public struct AppAvailabilityResponse: Hashable, Codable { case links } - public enum Included: Hashable, Codable { + public enum Included: Hashable, Codable, Sendable { case app(App) + case actor(Actor) + case appEvent(AppEvent) case territory(Territory) public init(from decoder: Decoder) throws { @@ -38,6 +40,16 @@ public struct AppAvailabilityResponse: Hashable, Codable { } catch { lastError = error } + do { + return .actor(try Actor(from: decoder)) + } catch { + lastError = error + } + do { + return .appEvent(try AppEvent(from: decoder)) + } catch { + lastError = error + } do { return .territory(try Territory(from: decoder)) } catch { @@ -52,6 +64,12 @@ public struct AppAvailabilityResponse: Hashable, Codable { case .app(let value): try value.encode(to: encoder) + case .actor(let value): + try value.encode(to: encoder) + + case .appEvent(let value): + try value.encode(to: encoder) + case .territory(let value): try value.encode(to: encoder) } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppPricePointsV2Response.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/NominationsResponse.generated.swift similarity index 72% rename from Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppPricePointsV2Response.generated.swift rename to Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/NominationsResponse.generated.swift index febac4db..98f46d89 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppPricePointsV2Response.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/NominationsResponse.generated.swift @@ -3,8 +3,8 @@ // swiftlint:disable all import Foundation -public struct AppPricePointsV2Response: Hashable, Codable { - public var data: [AppPricePointV2] +public struct NominationsResponse: Hashable, Codable, Sendable { + public var data: [Nomination] public var included: [Included]? @@ -13,7 +13,7 @@ public struct AppPricePointsV2Response: Hashable, Codable { public var meta: PagingInformation? public init( - data: [AppPricePointV2], + data: [Nomination], included: [Included]? = nil, links: PagedDocumentLinks, meta: PagingInformation? = nil @@ -31,9 +31,10 @@ public struct AppPricePointsV2Response: Hashable, Codable { case meta } - public enum Included: Hashable, Codable { + public enum Included: Hashable, Codable, Sendable { case app(App) - case appPriceTier(AppPriceTier) + case actor(Actor) + case appEvent(AppEvent) case territory(Territory) public init(from decoder: Decoder) throws { @@ -45,7 +46,12 @@ public struct AppPricePointsV2Response: Hashable, Codable { lastError = error } do { - return .appPriceTier(try AppPriceTier(from: decoder)) + return .actor(try Actor(from: decoder)) + } catch { + lastError = error + } + do { + return .appEvent(try AppEvent(from: decoder)) } catch { lastError = error } @@ -63,7 +69,10 @@ public struct AppPricePointsV2Response: Hashable, Codable { case .app(let value): try value.encode(to: encoder) - case .appPriceTier(let value): + case .actor(let value): + try value.encode(to: encoder) + + case .appEvent(let value): try value.encode(to: encoder) case .territory(let value): diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/PassTypeIdCertificatesLinkagesResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/PassTypeIdCertificatesLinkagesResponse.generated.swift new file mode 100644 index 00000000..e3104bf6 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/PassTypeIdCertificatesLinkagesResponse.generated.swift @@ -0,0 +1,53 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct PassTypeIdCertificatesLinkagesResponse: Hashable, Codable, Sendable { + public var data: [Data] + + public var links: PagedDocumentLinks + + public var meta: PagingInformation? + + public init( + data: [Data], + links: PagedDocumentLinks, + meta: PagingInformation? = nil + ) { + self.data = data + self.links = links + self.meta = meta + } + + private enum CodingKeys: String, CodingKey { + case data + case links + case meta + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case certificates + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/PassTypeIdResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/PassTypeIdResponse.generated.swift new file mode 100644 index 00000000..82d4d475 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/PassTypeIdResponse.generated.swift @@ -0,0 +1,30 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct PassTypeIdResponse: Hashable, Codable, Sendable { + public var data: PassTypeId + + public var included: [Certificate]? + + public var links: DocumentLinks + + public init( + data: PassTypeId, + included: [Certificate]? = nil, + links: DocumentLinks + ) { + self.data = data + self.included = included + self.links = links + } + + private enum CodingKeys: String, CodingKey { + case data + case included + case links + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/PassTypeIdsResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/PassTypeIdsResponse.generated.swift new file mode 100644 index 00000000..21a2ce67 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/PassTypeIdsResponse.generated.swift @@ -0,0 +1,35 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct PassTypeIdsResponse: Hashable, Codable, Sendable { + public var data: [PassTypeId] + + public var included: [Certificate]? + + public var links: PagedDocumentLinks + + public var meta: PagingInformation? + + public init( + data: [PassTypeId], + included: [Certificate]? = nil, + links: PagedDocumentLinks, + meta: PagingInformation? = nil + ) { + self.data = data + self.included = included + self.links = links + self.meta = meta + } + + private enum CodingKeys: String, CodingKey { + case data + case included + case links + case meta + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/PreReleaseVersionsResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/PreReleaseVersionsResponse.generated.swift index a6ee891f..1664f339 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/PreReleaseVersionsResponse.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/PreReleaseVersionsResponse.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct PreReleaseVersionsResponse: Hashable, Codable { +public struct PreReleaseVersionsResponse: Hashable, Codable, Sendable { public var data: [PrereleaseVersion] public var included: [Included]? @@ -31,7 +31,7 @@ public struct PreReleaseVersionsResponse: Hashable, Codable { case meta } - public enum Included: Hashable, Codable { + public enum Included: Hashable, Codable, Sendable { case build(Build) case app(App) diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/PreReleaseVersionsWithoutIncludesResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/PreReleaseVersionsWithoutIncludesResponse.generated.swift index 584b5d21..5c599768 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/PreReleaseVersionsWithoutIncludesResponse.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/PreReleaseVersionsWithoutIncludesResponse.generated.swift @@ -3,15 +3,15 @@ // swiftlint:disable all import Foundation -public struct PreReleaseVersionsWithoutIncludesResponse: Hashable, Codable { - public var data: [App] +public struct PreReleaseVersionsWithoutIncludesResponse: Hashable, Codable, Sendable { + public var data: [PrereleaseVersion] public var links: PagedDocumentLinks public var meta: PagingInformation? public init( - data: [App], + data: [PrereleaseVersion], links: PagedDocumentLinks, meta: PagingInformation? = nil ) { diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/PrereleaseVersionAppLinkageResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/PrereleaseVersionAppLinkageResponse.generated.swift new file mode 100644 index 00000000..4c61ce8d --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/PrereleaseVersionAppLinkageResponse.generated.swift @@ -0,0 +1,48 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct PrereleaseVersionAppLinkageResponse: Hashable, Codable, Sendable { + public var data: Data + + public var links: DocumentLinks + + public init( + data: Data, + links: DocumentLinks + ) { + self.data = data + self.links = links + } + + private enum CodingKeys: String, CodingKey { + case data + case links + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case apps + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/PrereleaseVersionBuildsLinkagesResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/PrereleaseVersionBuildsLinkagesResponse.generated.swift new file mode 100644 index 00000000..58ff09bf --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/PrereleaseVersionBuildsLinkagesResponse.generated.swift @@ -0,0 +1,53 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct PrereleaseVersionBuildsLinkagesResponse: Hashable, Codable, Sendable { + public var data: [Data] + + public var links: PagedDocumentLinks + + public var meta: PagingInformation? + + public init( + data: [Data], + links: PagedDocumentLinks, + meta: PagingInformation? = nil + ) { + self.data = data + self.links = links + self.meta = meta + } + + private enum CodingKeys: String, CodingKey { + case data + case links + case meta + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case builds + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/PrereleaseVersionResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/PrereleaseVersionResponse.generated.swift index f5df1e48..fb1caa7e 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/PrereleaseVersionResponse.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/PrereleaseVersionResponse.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct PrereleaseVersionResponse: Hashable, Codable { +public struct PrereleaseVersionResponse: Hashable, Codable, Sendable { public var data: PrereleaseVersion public var included: [Included]? @@ -26,7 +26,7 @@ public struct PrereleaseVersionResponse: Hashable, Codable { case links } - public enum Included: Hashable, Codable { + public enum Included: Hashable, Codable, Sendable { case build(Build) case app(App) diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/PrereleaseVersionWithoutIncludesResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/PrereleaseVersionWithoutIncludesResponse.generated.swift index 1543bf17..cd3c857d 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/PrereleaseVersionWithoutIncludesResponse.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/PrereleaseVersionWithoutIncludesResponse.generated.swift @@ -3,13 +3,13 @@ // swiftlint:disable all import Foundation -public struct PrereleaseVersionWithoutIncludesResponse: Hashable, Codable { - public var data: Build +public struct PrereleaseVersionWithoutIncludesResponse: Hashable, Codable, Sendable { + public var data: PrereleaseVersion public var links: DocumentLinks public init( - data: Build, + data: PrereleaseVersion, links: DocumentLinks ) { self.data = data diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/ProfileBundleIdLinkageResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/ProfileBundleIdLinkageResponse.generated.swift new file mode 100644 index 00000000..d7d305ee --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/ProfileBundleIdLinkageResponse.generated.swift @@ -0,0 +1,48 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct ProfileBundleIdLinkageResponse: Hashable, Codable, Sendable { + public var data: Data + + public var links: DocumentLinks + + public init( + data: Data, + links: DocumentLinks + ) { + self.data = data + self.links = links + } + + private enum CodingKeys: String, CodingKey { + case data + case links + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case bundleIds + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/ProfileCertificatesLinkagesResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/ProfileCertificatesLinkagesResponse.generated.swift new file mode 100644 index 00000000..5f105dcd --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/ProfileCertificatesLinkagesResponse.generated.swift @@ -0,0 +1,53 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct ProfileCertificatesLinkagesResponse: Hashable, Codable, Sendable { + public var data: [Data] + + public var links: PagedDocumentLinks + + public var meta: PagingInformation? + + public init( + data: [Data], + links: PagedDocumentLinks, + meta: PagingInformation? = nil + ) { + self.data = data + self.links = links + self.meta = meta + } + + private enum CodingKeys: String, CodingKey { + case data + case links + case meta + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case certificates + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/ProfileDevicesLinkagesResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/ProfileDevicesLinkagesResponse.generated.swift new file mode 100644 index 00000000..32ecdadb --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/ProfileDevicesLinkagesResponse.generated.swift @@ -0,0 +1,53 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct ProfileDevicesLinkagesResponse: Hashable, Codable, Sendable { + public var data: [Data] + + public var links: PagedDocumentLinks + + public var meta: PagingInformation? + + public init( + data: [Data], + links: PagedDocumentLinks, + meta: PagingInformation? = nil + ) { + self.data = data + self.links = links + self.meta = meta + } + + private enum CodingKeys: String, CodingKey { + case data + case links + case meta + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case devices + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/ProfileResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/ProfileResponse.generated.swift index ffa47b6b..a3b85526 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/ProfileResponse.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/ProfileResponse.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct ProfileResponse: Hashable, Codable { +public struct ProfileResponse: Hashable, Codable, Sendable { public var data: Profile public var included: [Included]? @@ -26,7 +26,7 @@ public struct ProfileResponse: Hashable, Codable { case links } - public enum Included: Hashable, Codable { + public enum Included: Hashable, Codable, Sendable { case bundleId(BundleId) case device(Device) case certificate(Certificate) diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/ProfilesResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/ProfilesResponse.generated.swift index a9411852..1f97f7f6 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/ProfilesResponse.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/ProfilesResponse.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct ProfilesResponse: Hashable, Codable { +public struct ProfilesResponse: Hashable, Codable, Sendable { public var data: [Profile] public var included: [Included]? @@ -31,7 +31,7 @@ public struct ProfilesResponse: Hashable, Codable { case meta } - public enum Included: Hashable, Codable { + public enum Included: Hashable, Codable, Sendable { case bundleId(BundleId) case device(Device) case certificate(Certificate) diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/ProfilesWithoutIncludesResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/ProfilesWithoutIncludesResponse.generated.swift index f2bbd696..0e967849 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/ProfilesWithoutIncludesResponse.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/ProfilesWithoutIncludesResponse.generated.swift @@ -3,15 +3,15 @@ // swiftlint:disable all import Foundation -public struct ProfilesWithoutIncludesResponse: Hashable, Codable { - public var data: [BundleId] +public struct ProfilesWithoutIncludesResponse: Hashable, Codable, Sendable { + public var data: [Profile] public var links: PagedDocumentLinks public var meta: PagingInformation? public init( - data: [BundleId], + data: [Profile], links: PagedDocumentLinks, meta: PagingInformation? = nil ) { diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/PromotedPurchaseResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/PromotedPurchaseResponse.generated.swift index 5bcc7daa..9747b524 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/PromotedPurchaseResponse.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/PromotedPurchaseResponse.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct PromotedPurchaseResponse: Hashable, Codable { +public struct PromotedPurchaseResponse: Hashable, Codable, Sendable { public var data: PromotedPurchase public var included: [Included]? @@ -26,10 +26,9 @@ public struct PromotedPurchaseResponse: Hashable, Codable { case links } - public enum Included: Hashable, Codable { + public enum Included: Hashable, Codable, Sendable { case inAppPurchaseV2(InAppPurchaseV2) case subscription(Subscription) - case promotedPurchaseImage(PromotedPurchaseImage) public init(from decoder: Decoder) throws { self = try { @@ -44,11 +43,6 @@ public struct PromotedPurchaseResponse: Hashable, Codable { } catch { lastError = error } - do { - return .promotedPurchaseImage(try PromotedPurchaseImage(from: decoder)) - } catch { - lastError = error - } throw lastError }() } @@ -60,9 +54,6 @@ public struct PromotedPurchaseResponse: Hashable, Codable { case .subscription(let value): try value.encode(to: encoder) - - case .promotedPurchaseImage(let value): - try value.encode(to: encoder) } } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/PromotedPurchasesResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/PromotedPurchasesResponse.generated.swift index d74f22c4..abcc7378 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/PromotedPurchasesResponse.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/PromotedPurchasesResponse.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct PromotedPurchasesResponse: Hashable, Codable { +public struct PromotedPurchasesResponse: Hashable, Codable, Sendable { public var data: [PromotedPurchase] public var included: [Included]? @@ -31,10 +31,9 @@ public struct PromotedPurchasesResponse: Hashable, Codable { case meta } - public enum Included: Hashable, Codable { + public enum Included: Hashable, Codable, Sendable { case inAppPurchaseV2(InAppPurchaseV2) case subscription(Subscription) - case promotedPurchaseImage(PromotedPurchaseImage) public init(from decoder: Decoder) throws { self = try { @@ -49,11 +48,6 @@ public struct PromotedPurchasesResponse: Hashable, Codable { } catch { lastError = error } - do { - return .promotedPurchaseImage(try PromotedPurchaseImage(from: decoder)) - } catch { - lastError = error - } throw lastError }() } @@ -65,9 +59,6 @@ public struct PromotedPurchasesResponse: Hashable, Codable { case .subscription(let value): try value.encode(to: encoder) - - case .promotedPurchaseImage(let value): - try value.encode(to: encoder) } } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/ReviewSubmissionItemResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/ReviewSubmissionItemResponse.generated.swift index 84301982..4cedffc3 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/ReviewSubmissionItemResponse.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/ReviewSubmissionItemResponse.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct ReviewSubmissionItemResponse: Hashable, Codable { +public struct ReviewSubmissionItemResponse: Hashable, Codable, Sendable { public var data: ReviewSubmissionItem public var included: [Included]? @@ -26,7 +26,7 @@ public struct ReviewSubmissionItemResponse: Hashable, Codable { case links } - public enum Included: Hashable, Codable { + public enum Included: Hashable, Codable, Sendable { case appStoreVersion(AppStoreVersion) case appCustomProductPageVersion(AppCustomProductPageVersion) case appStoreVersionExperiment(AppStoreVersionExperiment) diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/ReviewSubmissionItemsLinkagesResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/ReviewSubmissionItemsLinkagesResponse.generated.swift new file mode 100644 index 00000000..ade50652 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/ReviewSubmissionItemsLinkagesResponse.generated.swift @@ -0,0 +1,53 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct ReviewSubmissionItemsLinkagesResponse: Hashable, Codable, Sendable { + public var data: [Data] + + public var links: PagedDocumentLinks + + public var meta: PagingInformation? + + public init( + data: [Data], + links: PagedDocumentLinks, + meta: PagingInformation? = nil + ) { + self.data = data + self.links = links + self.meta = meta + } + + private enum CodingKeys: String, CodingKey { + case data + case links + case meta + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case reviewSubmissionItems + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/ReviewSubmissionItemsResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/ReviewSubmissionItemsResponse.generated.swift index f1976af3..83158842 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/ReviewSubmissionItemsResponse.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/ReviewSubmissionItemsResponse.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct ReviewSubmissionItemsResponse: Hashable, Codable { +public struct ReviewSubmissionItemsResponse: Hashable, Codable, Sendable { public var data: [ReviewSubmissionItem] public var included: [Included]? @@ -31,7 +31,7 @@ public struct ReviewSubmissionItemsResponse: Hashable, Codable { case meta } - public enum Included: Hashable, Codable { + public enum Included: Hashable, Codable, Sendable { case appStoreVersion(AppStoreVersion) case appCustomProductPageVersion(AppCustomProductPageVersion) case appStoreVersionExperiment(AppStoreVersionExperiment) diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/ReviewSubmissionResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/ReviewSubmissionResponse.generated.swift index 300cce13..627d30fa 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/ReviewSubmissionResponse.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/ReviewSubmissionResponse.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct ReviewSubmissionResponse: Hashable, Codable { +public struct ReviewSubmissionResponse: Hashable, Codable, Sendable { public var data: ReviewSubmission public var included: [Included]? @@ -26,7 +26,7 @@ public struct ReviewSubmissionResponse: Hashable, Codable { case links } - public enum Included: Hashable, Codable { + public enum Included: Hashable, Codable, Sendable { case app(App) case reviewSubmissionItem(ReviewSubmissionItem) case appStoreVersion(AppStoreVersion) diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/ReviewSubmissionsResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/ReviewSubmissionsResponse.generated.swift index b0419a17..b72a6d21 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/ReviewSubmissionsResponse.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/ReviewSubmissionsResponse.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct ReviewSubmissionsResponse: Hashable, Codable { +public struct ReviewSubmissionsResponse: Hashable, Codable, Sendable { public var data: [ReviewSubmission] public var included: [Included]? @@ -31,7 +31,7 @@ public struct ReviewSubmissionsResponse: Hashable, Codable { case meta } - public enum Included: Hashable, Codable { + public enum Included: Hashable, Codable, Sendable { case app(App) case reviewSubmissionItem(ReviewSubmissionItem) case appStoreVersion(AppStoreVersion) diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/RoutingAppCoverageResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/RoutingAppCoverageResponse.generated.swift index b6ded558..49b60734 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/RoutingAppCoverageResponse.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/RoutingAppCoverageResponse.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct RoutingAppCoverageResponse: Hashable, Codable { +public struct RoutingAppCoverageResponse: Hashable, Codable, Sendable { public var data: RoutingAppCoverage public var included: [AppStoreVersion]? diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/RoutingAppCoverageWithoutIncludesResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/RoutingAppCoverageWithoutIncludesResponse.generated.swift index 471b9fcb..5156cfd2 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/RoutingAppCoverageWithoutIncludesResponse.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/RoutingAppCoverageWithoutIncludesResponse.generated.swift @@ -3,13 +3,13 @@ // swiftlint:disable all import Foundation -public struct RoutingAppCoverageWithoutIncludesResponse: Hashable, Codable { - public var data: AppStoreVersion +public struct RoutingAppCoverageWithoutIncludesResponse: Hashable, Codable, Sendable { + public var data: RoutingAppCoverage public var links: DocumentLinks public init( - data: AppStoreVersion, + data: RoutingAppCoverage, links: DocumentLinks ) { self.data = data diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/SandboxTesterV2Response.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/SandboxTesterV2Response.generated.swift index 96c2f478..cf1416de 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/SandboxTesterV2Response.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/SandboxTesterV2Response.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct SandboxTesterV2Response: Hashable, Codable { +public struct SandboxTesterV2Response: Hashable, Codable, Sendable { public var data: SandboxTesterV2 public var links: DocumentLinks diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/SandboxTestersClearPurchaseHistoryRequestV2Response.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/SandboxTestersClearPurchaseHistoryRequestV2Response.generated.swift index 60ea68ea..47a65e00 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/SandboxTestersClearPurchaseHistoryRequestV2Response.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/SandboxTestersClearPurchaseHistoryRequestV2Response.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct SandboxTestersClearPurchaseHistoryRequestV2Response: Hashable, Codable { +public struct SandboxTestersClearPurchaseHistoryRequestV2Response: Hashable, Codable, Sendable { public var data: SandboxTestersClearPurchaseHistoryRequestV2 public var links: DocumentLinks diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/SandboxTestersV2Response.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/SandboxTestersV2Response.generated.swift index 28443910..a47685f5 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/SandboxTestersV2Response.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/SandboxTestersV2Response.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct SandboxTestersV2Response: Hashable, Codable { +public struct SandboxTestersV2Response: Hashable, Codable, Sendable { public var data: [SandboxTesterV2] public var links: PagedDocumentLinks diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/ScmGitReferenceResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/ScmGitReferenceResponse.generated.swift index 9280e67f..f7344f39 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/ScmGitReferenceResponse.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/ScmGitReferenceResponse.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct ScmGitReferenceResponse: Hashable, Codable { +public struct ScmGitReferenceResponse: Hashable, Codable, Sendable { public var data: ScmGitReference public var included: [ScmRepository]? diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/ScmGitReferencesResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/ScmGitReferencesResponse.generated.swift index 52507dc1..dac66c0c 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/ScmGitReferencesResponse.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/ScmGitReferencesResponse.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct ScmGitReferencesResponse: Hashable, Codable { +public struct ScmGitReferencesResponse: Hashable, Codable, Sendable { public var data: [ScmGitReference] public var included: [ScmRepository]? diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/ScmProviderRepositoriesLinkagesResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/ScmProviderRepositoriesLinkagesResponse.generated.swift new file mode 100644 index 00000000..f1912a9c --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/ScmProviderRepositoriesLinkagesResponse.generated.swift @@ -0,0 +1,53 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct ScmProviderRepositoriesLinkagesResponse: Hashable, Codable, Sendable { + public var data: [Data] + + public var links: PagedDocumentLinks + + public var meta: PagingInformation? + + public init( + data: [Data], + links: PagedDocumentLinks, + meta: PagingInformation? = nil + ) { + self.data = data + self.links = links + self.meta = meta + } + + private enum CodingKeys: String, CodingKey { + case data + case links + case meta + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case scmRepositories + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/ScmProviderResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/ScmProviderResponse.generated.swift index cc7df82d..34a02bb3 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/ScmProviderResponse.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/ScmProviderResponse.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct ScmProviderResponse: Hashable, Codable { +public struct ScmProviderResponse: Hashable, Codable, Sendable { public var data: ScmProvider public var links: DocumentLinks diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/ScmProvidersResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/ScmProvidersResponse.generated.swift index d9512d4e..170852f2 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/ScmProvidersResponse.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/ScmProvidersResponse.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct ScmProvidersResponse: Hashable, Codable { +public struct ScmProvidersResponse: Hashable, Codable, Sendable { public var data: [ScmProvider] public var links: PagedDocumentLinks diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/ScmPullRequestResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/ScmPullRequestResponse.generated.swift index c9340c7e..32988ddd 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/ScmPullRequestResponse.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/ScmPullRequestResponse.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct ScmPullRequestResponse: Hashable, Codable { +public struct ScmPullRequestResponse: Hashable, Codable, Sendable { public var data: ScmPullRequest public var included: [ScmRepository]? diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/ScmPullRequestsResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/ScmPullRequestsResponse.generated.swift index 96680b1e..cc096533 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/ScmPullRequestsResponse.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/ScmPullRequestsResponse.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct ScmPullRequestsResponse: Hashable, Codable { +public struct ScmPullRequestsResponse: Hashable, Codable, Sendable { public var data: [ScmPullRequest] public var included: [ScmRepository]? diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/ScmRepositoriesResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/ScmRepositoriesResponse.generated.swift index b4bb26ef..2caa8e27 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/ScmRepositoriesResponse.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/ScmRepositoriesResponse.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct ScmRepositoriesResponse: Hashable, Codable { +public struct ScmRepositoriesResponse: Hashable, Codable, Sendable { public var data: [ScmRepository] public var included: [Included]? @@ -31,7 +31,7 @@ public struct ScmRepositoriesResponse: Hashable, Codable { case meta } - public enum Included: Hashable, Codable { + public enum Included: Hashable, Codable, Sendable { case scmProvider(ScmProvider) case scmGitReference(ScmGitReference) diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/ScmRepositoryGitReferencesLinkagesResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/ScmRepositoryGitReferencesLinkagesResponse.generated.swift new file mode 100644 index 00000000..593b499e --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/ScmRepositoryGitReferencesLinkagesResponse.generated.swift @@ -0,0 +1,53 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct ScmRepositoryGitReferencesLinkagesResponse: Hashable, Codable, Sendable { + public var data: [Data] + + public var links: PagedDocumentLinks + + public var meta: PagingInformation? + + public init( + data: [Data], + links: PagedDocumentLinks, + meta: PagingInformation? = nil + ) { + self.data = data + self.links = links + self.meta = meta + } + + private enum CodingKeys: String, CodingKey { + case data + case links + case meta + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case scmGitReferences + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/ScmRepositoryPullRequestsLinkagesResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/ScmRepositoryPullRequestsLinkagesResponse.generated.swift new file mode 100644 index 00000000..5a0a8993 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/ScmRepositoryPullRequestsLinkagesResponse.generated.swift @@ -0,0 +1,53 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct ScmRepositoryPullRequestsLinkagesResponse: Hashable, Codable, Sendable { + public var data: [Data] + + public var links: PagedDocumentLinks + + public var meta: PagingInformation? + + public init( + data: [Data], + links: PagedDocumentLinks, + meta: PagingInformation? = nil + ) { + self.data = data + self.links = links + self.meta = meta + } + + private enum CodingKeys: String, CodingKey { + case data + case links + case meta + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case scmPullRequests + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/ScmRepositoryResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/ScmRepositoryResponse.generated.swift index a2f979b6..8620b645 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/ScmRepositoryResponse.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/ScmRepositoryResponse.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct ScmRepositoryResponse: Hashable, Codable { +public struct ScmRepositoryResponse: Hashable, Codable, Sendable { public var data: ScmRepository public var included: [Included]? @@ -26,7 +26,7 @@ public struct ScmRepositoryResponse: Hashable, Codable { case links } - public enum Included: Hashable, Codable { + public enum Included: Hashable, Codable, Sendable { case scmProvider(ScmProvider) case scmGitReference(ScmGitReference) diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/SubscriptionAppStoreReviewScreenshotLinkageResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/SubscriptionAppStoreReviewScreenshotLinkageResponse.generated.swift new file mode 100644 index 00000000..728c0052 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/SubscriptionAppStoreReviewScreenshotLinkageResponse.generated.swift @@ -0,0 +1,48 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct SubscriptionAppStoreReviewScreenshotLinkageResponse: Hashable, Codable, Sendable { + public var data: Data + + public var links: DocumentLinks + + public init( + data: Data, + links: DocumentLinks + ) { + self.data = data + self.links = links + } + + private enum CodingKeys: String, CodingKey { + case data + case links + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case subscriptionAppStoreReviewScreenshots + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/SubscriptionAppStoreReviewScreenshotResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/SubscriptionAppStoreReviewScreenshotResponse.generated.swift index 3328073d..22f2bfc7 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/SubscriptionAppStoreReviewScreenshotResponse.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/SubscriptionAppStoreReviewScreenshotResponse.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct SubscriptionAppStoreReviewScreenshotResponse: Hashable, Codable { +public struct SubscriptionAppStoreReviewScreenshotResponse: Hashable, Codable, Sendable { public var data: SubscriptionAppStoreReviewScreenshot public var included: [Subscription]? diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/SubscriptionAvailabilityAvailableTerritoriesLinkagesResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/SubscriptionAvailabilityAvailableTerritoriesLinkagesResponse.generated.swift new file mode 100644 index 00000000..e1a71ab2 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/SubscriptionAvailabilityAvailableTerritoriesLinkagesResponse.generated.swift @@ -0,0 +1,53 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct SubscriptionAvailabilityAvailableTerritoriesLinkagesResponse: Hashable, Codable, Sendable { + public var data: [Data] + + public var links: PagedDocumentLinks + + public var meta: PagingInformation? + + public init( + data: [Data], + links: PagedDocumentLinks, + meta: PagingInformation? = nil + ) { + self.data = data + self.links = links + self.meta = meta + } + + private enum CodingKeys: String, CodingKey { + case data + case links + case meta + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case territories + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/SubscriptionAvailabilityResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/SubscriptionAvailabilityResponse.generated.swift index c38b110b..9f117963 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/SubscriptionAvailabilityResponse.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/SubscriptionAvailabilityResponse.generated.swift @@ -3,16 +3,16 @@ // swiftlint:disable all import Foundation -public struct SubscriptionAvailabilityResponse: Hashable, Codable { +public struct SubscriptionAvailabilityResponse: Hashable, Codable, Sendable { public var data: SubscriptionAvailability - public var included: [Included]? + public var included: [Territory]? public var links: DocumentLinks public init( data: SubscriptionAvailability, - included: [Included]? = nil, + included: [Territory]? = nil, links: DocumentLinks ) { self.data = data @@ -25,38 +25,6 @@ public struct SubscriptionAvailabilityResponse: Hashable, Codable { case included case links } - - public enum Included: Hashable, Codable { - case subscription(Subscription) - case territory(Territory) - - public init(from decoder: Decoder) throws { - self = try { - var lastError: Error! - do { - return .subscription(try Subscription(from: decoder)) - } catch { - lastError = error - } - do { - return .territory(try Territory(from: decoder)) - } catch { - lastError = error - } - throw lastError - }() - } - - public func encode(to encoder: Encoder) throws { - switch self { - case .subscription(let value): - try value.encode(to: encoder) - - case .territory(let value): - try value.encode(to: encoder) - } - } - } } // swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/SubscriptionGracePeriodResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/SubscriptionGracePeriodResponse.generated.swift index 0ec90040..3a144452 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/SubscriptionGracePeriodResponse.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/SubscriptionGracePeriodResponse.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct SubscriptionGracePeriodResponse: Hashable, Codable { +public struct SubscriptionGracePeriodResponse: Hashable, Codable, Sendable { public var data: SubscriptionGracePeriod public var links: DocumentLinks diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/SubscriptionGroupLocalizationResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/SubscriptionGroupLocalizationResponse.generated.swift index 11789b54..7d72e821 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/SubscriptionGroupLocalizationResponse.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/SubscriptionGroupLocalizationResponse.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct SubscriptionGroupLocalizationResponse: Hashable, Codable { +public struct SubscriptionGroupLocalizationResponse: Hashable, Codable, Sendable { public var data: SubscriptionGroupLocalization public var included: [SubscriptionGroup]? diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/SubscriptionGroupLocalizationsResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/SubscriptionGroupLocalizationsResponse.generated.swift index e0f72462..708c6e4b 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/SubscriptionGroupLocalizationsResponse.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/SubscriptionGroupLocalizationsResponse.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct SubscriptionGroupLocalizationsResponse: Hashable, Codable { +public struct SubscriptionGroupLocalizationsResponse: Hashable, Codable, Sendable { public var data: [SubscriptionGroupLocalization] public var included: [SubscriptionGroup]? diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/SubscriptionGroupResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/SubscriptionGroupResponse.generated.swift index 2ae5a275..1a3bd9b4 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/SubscriptionGroupResponse.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/SubscriptionGroupResponse.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct SubscriptionGroupResponse: Hashable, Codable { +public struct SubscriptionGroupResponse: Hashable, Codable, Sendable { public var data: SubscriptionGroup public var included: [Included]? @@ -26,7 +26,7 @@ public struct SubscriptionGroupResponse: Hashable, Codable { case links } - public enum Included: Hashable, Codable { + public enum Included: Hashable, Codable, Sendable { case subscription(Subscription) case subscriptionGroupLocalization(SubscriptionGroupLocalization) diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/SubscriptionGroupSubmissionResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/SubscriptionGroupSubmissionResponse.generated.swift index e4aa74ec..9e84db8d 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/SubscriptionGroupSubmissionResponse.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/SubscriptionGroupSubmissionResponse.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct SubscriptionGroupSubmissionResponse: Hashable, Codable { +public struct SubscriptionGroupSubmissionResponse: Hashable, Codable, Sendable { public var data: SubscriptionGroupSubmission public var links: DocumentLinks diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/SubscriptionGroupSubscriptionGroupLocalizationsLinkagesResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/SubscriptionGroupSubscriptionGroupLocalizationsLinkagesResponse.generated.swift new file mode 100644 index 00000000..9da99175 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/SubscriptionGroupSubscriptionGroupLocalizationsLinkagesResponse.generated.swift @@ -0,0 +1,53 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct SubscriptionGroupSubscriptionGroupLocalizationsLinkagesResponse: Hashable, Codable, Sendable { + public var data: [Data] + + public var links: PagedDocumentLinks + + public var meta: PagingInformation? + + public init( + data: [Data], + links: PagedDocumentLinks, + meta: PagingInformation? = nil + ) { + self.data = data + self.links = links + self.meta = meta + } + + private enum CodingKeys: String, CodingKey { + case data + case links + case meta + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case subscriptionGroupLocalizations + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/SubscriptionGroupSubscriptionsLinkagesResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/SubscriptionGroupSubscriptionsLinkagesResponse.generated.swift new file mode 100644 index 00000000..4dae626e --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/SubscriptionGroupSubscriptionsLinkagesResponse.generated.swift @@ -0,0 +1,53 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct SubscriptionGroupSubscriptionsLinkagesResponse: Hashable, Codable, Sendable { + public var data: [Data] + + public var links: PagedDocumentLinks + + public var meta: PagingInformation? + + public init( + data: [Data], + links: PagedDocumentLinks, + meta: PagingInformation? = nil + ) { + self.data = data + self.links = links + self.meta = meta + } + + private enum CodingKeys: String, CodingKey { + case data + case links + case meta + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case subscriptions + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/SubscriptionGroupsResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/SubscriptionGroupsResponse.generated.swift index 85b70e6b..148244a7 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/SubscriptionGroupsResponse.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/SubscriptionGroupsResponse.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct SubscriptionGroupsResponse: Hashable, Codable { +public struct SubscriptionGroupsResponse: Hashable, Codable, Sendable { public var data: [SubscriptionGroup] public var included: [Included]? @@ -31,7 +31,7 @@ public struct SubscriptionGroupsResponse: Hashable, Codable { case meta } - public enum Included: Hashable, Codable { + public enum Included: Hashable, Codable, Sendable { case subscription(Subscription) case subscriptionGroupLocalization(SubscriptionGroupLocalization) diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/SubscriptionImageResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/SubscriptionImageResponse.generated.swift new file mode 100644 index 00000000..d209e7ac --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/SubscriptionImageResponse.generated.swift @@ -0,0 +1,30 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct SubscriptionImageResponse: Hashable, Codable, Sendable { + public var data: SubscriptionImage + + public var included: [Subscription]? + + public var links: DocumentLinks + + public init( + data: SubscriptionImage, + included: [Subscription]? = nil, + links: DocumentLinks + ) { + self.data = data + self.included = included + self.links = links + } + + private enum CodingKeys: String, CodingKey { + case data + case included + case links + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/SubscriptionImagesLinkagesResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/SubscriptionImagesLinkagesResponse.generated.swift new file mode 100644 index 00000000..ceb63714 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/SubscriptionImagesLinkagesResponse.generated.swift @@ -0,0 +1,53 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct SubscriptionImagesLinkagesResponse: Hashable, Codable, Sendable { + public var data: [Data] + + public var links: PagedDocumentLinks + + public var meta: PagingInformation? + + public init( + data: [Data], + links: PagedDocumentLinks, + meta: PagingInformation? = nil + ) { + self.data = data + self.links = links + self.meta = meta + } + + private enum CodingKeys: String, CodingKey { + case data + case links + case meta + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case subscriptionImages + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/SubscriptionImagesResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/SubscriptionImagesResponse.generated.swift new file mode 100644 index 00000000..3726c890 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/SubscriptionImagesResponse.generated.swift @@ -0,0 +1,35 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct SubscriptionImagesResponse: Hashable, Codable, Sendable { + public var data: [SubscriptionImage] + + public var included: [Subscription]? + + public var links: PagedDocumentLinks + + public var meta: PagingInformation? + + public init( + data: [SubscriptionImage], + included: [Subscription]? = nil, + links: PagedDocumentLinks, + meta: PagingInformation? = nil + ) { + self.data = data + self.included = included + self.links = links + self.meta = meta + } + + private enum CodingKeys: String, CodingKey { + case data + case included + case links + case meta + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/SubscriptionIntroductoryOfferResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/SubscriptionIntroductoryOfferResponse.generated.swift index c2d2f9aa..b35abc30 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/SubscriptionIntroductoryOfferResponse.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/SubscriptionIntroductoryOfferResponse.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct SubscriptionIntroductoryOfferResponse: Hashable, Codable { +public struct SubscriptionIntroductoryOfferResponse: Hashable, Codable, Sendable { public var data: SubscriptionIntroductoryOffer public var included: [Included]? @@ -26,7 +26,7 @@ public struct SubscriptionIntroductoryOfferResponse: Hashable, Codable { case links } - public enum Included: Hashable, Codable { + public enum Included: Hashable, Codable, Sendable { case subscription(Subscription) case territory(Territory) case subscriptionPricePoint(SubscriptionPricePoint) diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/SubscriptionIntroductoryOffersLinkagesResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/SubscriptionIntroductoryOffersLinkagesResponse.generated.swift index c0841026..dbe6913e 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/SubscriptionIntroductoryOffersLinkagesResponse.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/SubscriptionIntroductoryOffersLinkagesResponse.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct SubscriptionIntroductoryOffersLinkagesResponse: Hashable, Codable { +public struct SubscriptionIntroductoryOffersLinkagesResponse: Hashable, Codable, Sendable { public var data: [Data] public var links: PagedDocumentLinks @@ -26,7 +26,7 @@ public struct SubscriptionIntroductoryOffersLinkagesResponse: Hashable, Codable case meta } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -44,7 +44,7 @@ public struct SubscriptionIntroductoryOffersLinkagesResponse: Hashable, Codable case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case subscriptionIntroductoryOffers } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/SubscriptionIntroductoryOffersResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/SubscriptionIntroductoryOffersResponse.generated.swift index 2814d581..f586247d 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/SubscriptionIntroductoryOffersResponse.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/SubscriptionIntroductoryOffersResponse.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct SubscriptionIntroductoryOffersResponse: Hashable, Codable { +public struct SubscriptionIntroductoryOffersResponse: Hashable, Codable, Sendable { public var data: [SubscriptionIntroductoryOffer] public var included: [Included]? @@ -31,7 +31,7 @@ public struct SubscriptionIntroductoryOffersResponse: Hashable, Codable { case meta } - public enum Included: Hashable, Codable { + public enum Included: Hashable, Codable, Sendable { case subscription(Subscription) case territory(Territory) case subscriptionPricePoint(SubscriptionPricePoint) diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/SubscriptionLocalizationResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/SubscriptionLocalizationResponse.generated.swift index 8028a415..c4c64bb0 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/SubscriptionLocalizationResponse.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/SubscriptionLocalizationResponse.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct SubscriptionLocalizationResponse: Hashable, Codable { +public struct SubscriptionLocalizationResponse: Hashable, Codable, Sendable { public var data: SubscriptionLocalization public var included: [Subscription]? diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/SubscriptionLocalizationsResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/SubscriptionLocalizationsResponse.generated.swift index 559acf9d..b4fa6178 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/SubscriptionLocalizationsResponse.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/SubscriptionLocalizationsResponse.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct SubscriptionLocalizationsResponse: Hashable, Codable { +public struct SubscriptionLocalizationsResponse: Hashable, Codable, Sendable { public var data: [SubscriptionLocalization] public var included: [Subscription]? diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/SubscriptionOfferCodeCustomCodeResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/SubscriptionOfferCodeCustomCodeResponse.generated.swift index c1db6f59..507c20b9 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/SubscriptionOfferCodeCustomCodeResponse.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/SubscriptionOfferCodeCustomCodeResponse.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct SubscriptionOfferCodeCustomCodeResponse: Hashable, Codable { +public struct SubscriptionOfferCodeCustomCodeResponse: Hashable, Codable, Sendable { public var data: SubscriptionOfferCodeCustomCode public var included: [SubscriptionOfferCode]? diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/SubscriptionOfferCodeCustomCodesLinkagesResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/SubscriptionOfferCodeCustomCodesLinkagesResponse.generated.swift new file mode 100644 index 00000000..6a019274 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/SubscriptionOfferCodeCustomCodesLinkagesResponse.generated.swift @@ -0,0 +1,53 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct SubscriptionOfferCodeCustomCodesLinkagesResponse: Hashable, Codable, Sendable { + public var data: [Data] + + public var links: PagedDocumentLinks + + public var meta: PagingInformation? + + public init( + data: [Data], + links: PagedDocumentLinks, + meta: PagingInformation? = nil + ) { + self.data = data + self.links = links + self.meta = meta + } + + private enum CodingKeys: String, CodingKey { + case data + case links + case meta + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case subscriptionOfferCodeCustomCodes + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/SubscriptionOfferCodeCustomCodesResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/SubscriptionOfferCodeCustomCodesResponse.generated.swift index 308b6f90..8f930ac1 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/SubscriptionOfferCodeCustomCodesResponse.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/SubscriptionOfferCodeCustomCodesResponse.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct SubscriptionOfferCodeCustomCodesResponse: Hashable, Codable { +public struct SubscriptionOfferCodeCustomCodesResponse: Hashable, Codable, Sendable { public var data: [SubscriptionOfferCodeCustomCode] public var included: [SubscriptionOfferCode]? diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/SubscriptionOfferCodeOneTimeUseCodeResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/SubscriptionOfferCodeOneTimeUseCodeResponse.generated.swift index 751f9468..76bbe40c 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/SubscriptionOfferCodeOneTimeUseCodeResponse.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/SubscriptionOfferCodeOneTimeUseCodeResponse.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct SubscriptionOfferCodeOneTimeUseCodeResponse: Hashable, Codable { +public struct SubscriptionOfferCodeOneTimeUseCodeResponse: Hashable, Codable, Sendable { public var data: SubscriptionOfferCodeOneTimeUseCode public var included: [SubscriptionOfferCode]? diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/SubscriptionOfferCodeOneTimeUseCodeValuesLinkageResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/SubscriptionOfferCodeOneTimeUseCodeValuesLinkageResponse.generated.swift new file mode 100644 index 00000000..ca57890c --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/SubscriptionOfferCodeOneTimeUseCodeValuesLinkageResponse.generated.swift @@ -0,0 +1,48 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct SubscriptionOfferCodeOneTimeUseCodeValuesLinkageResponse: Hashable, Codable, Sendable { + public var data: Data + + public var links: DocumentLinks + + public init( + data: Data, + links: DocumentLinks + ) { + self.data = data + self.links = links + } + + private enum CodingKeys: String, CodingKey { + case data + case links + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case subscriptionOfferCodeOneTimeUseCodeValues + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/SubscriptionOfferCodeOneTimeUseCodesLinkagesResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/SubscriptionOfferCodeOneTimeUseCodesLinkagesResponse.generated.swift new file mode 100644 index 00000000..b8d77923 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/SubscriptionOfferCodeOneTimeUseCodesLinkagesResponse.generated.swift @@ -0,0 +1,53 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct SubscriptionOfferCodeOneTimeUseCodesLinkagesResponse: Hashable, Codable, Sendable { + public var data: [Data] + + public var links: PagedDocumentLinks + + public var meta: PagingInformation? + + public init( + data: [Data], + links: PagedDocumentLinks, + meta: PagingInformation? = nil + ) { + self.data = data + self.links = links + self.meta = meta + } + + private enum CodingKeys: String, CodingKey { + case data + case links + case meta + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case subscriptionOfferCodeOneTimeUseCodes + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/SubscriptionOfferCodeOneTimeUseCodesResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/SubscriptionOfferCodeOneTimeUseCodesResponse.generated.swift index 27c1c74f..d6b85dba 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/SubscriptionOfferCodeOneTimeUseCodesResponse.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/SubscriptionOfferCodeOneTimeUseCodesResponse.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct SubscriptionOfferCodeOneTimeUseCodesResponse: Hashable, Codable { +public struct SubscriptionOfferCodeOneTimeUseCodesResponse: Hashable, Codable, Sendable { public var data: [SubscriptionOfferCodeOneTimeUseCode] public var included: [SubscriptionOfferCode]? diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/SubscriptionOfferCodePricesLinkagesResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/SubscriptionOfferCodePricesLinkagesResponse.generated.swift new file mode 100644 index 00000000..5cebaae1 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/SubscriptionOfferCodePricesLinkagesResponse.generated.swift @@ -0,0 +1,53 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct SubscriptionOfferCodePricesLinkagesResponse: Hashable, Codable, Sendable { + public var data: [Data] + + public var links: PagedDocumentLinks + + public var meta: PagingInformation? + + public init( + data: [Data], + links: PagedDocumentLinks, + meta: PagingInformation? = nil + ) { + self.data = data + self.links = links + self.meta = meta + } + + private enum CodingKeys: String, CodingKey { + case data + case links + case meta + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case subscriptionOfferCodePrices + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/SubscriptionOfferCodePricesResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/SubscriptionOfferCodePricesResponse.generated.swift index 65d331a5..b730c4a9 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/SubscriptionOfferCodePricesResponse.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/SubscriptionOfferCodePricesResponse.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct SubscriptionOfferCodePricesResponse: Hashable, Codable { +public struct SubscriptionOfferCodePricesResponse: Hashable, Codable, Sendable { public var data: [SubscriptionOfferCodePrice] public var included: [Included]? @@ -31,7 +31,7 @@ public struct SubscriptionOfferCodePricesResponse: Hashable, Codable { case meta } - public enum Included: Hashable, Codable { + public enum Included: Hashable, Codable, Sendable { case territory(Territory) case subscriptionPricePoint(SubscriptionPricePoint) diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/SubscriptionOfferCodeResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/SubscriptionOfferCodeResponse.generated.swift index 5d37fcf1..af1db6a9 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/SubscriptionOfferCodeResponse.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/SubscriptionOfferCodeResponse.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct SubscriptionOfferCodeResponse: Hashable, Codable { +public struct SubscriptionOfferCodeResponse: Hashable, Codable, Sendable { public var data: SubscriptionOfferCode public var included: [Included]? @@ -26,7 +26,7 @@ public struct SubscriptionOfferCodeResponse: Hashable, Codable { case links } - public enum Included: Hashable, Codable { + public enum Included: Hashable, Codable, Sendable { case subscription(Subscription) case subscriptionOfferCodeOneTimeUseCode(SubscriptionOfferCodeOneTimeUseCode) case subscriptionOfferCodeCustomCode(SubscriptionOfferCodeCustomCode) diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/SubscriptionOfferCodesLinkagesResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/SubscriptionOfferCodesLinkagesResponse.generated.swift new file mode 100644 index 00000000..ed4b472c --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/SubscriptionOfferCodesLinkagesResponse.generated.swift @@ -0,0 +1,53 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct SubscriptionOfferCodesLinkagesResponse: Hashable, Codable, Sendable { + public var data: [Data] + + public var links: PagedDocumentLinks + + public var meta: PagingInformation? + + public init( + data: [Data], + links: PagedDocumentLinks, + meta: PagingInformation? = nil + ) { + self.data = data + self.links = links + self.meta = meta + } + + private enum CodingKeys: String, CodingKey { + case data + case links + case meta + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case subscriptionOfferCodes + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/SubscriptionOfferCodesResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/SubscriptionOfferCodesResponse.generated.swift index d37a2b77..0a968c65 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/SubscriptionOfferCodesResponse.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/SubscriptionOfferCodesResponse.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct SubscriptionOfferCodesResponse: Hashable, Codable { +public struct SubscriptionOfferCodesResponse: Hashable, Codable, Sendable { public var data: [SubscriptionOfferCode] public var included: [Included]? @@ -31,7 +31,7 @@ public struct SubscriptionOfferCodesResponse: Hashable, Codable { case meta } - public enum Included: Hashable, Codable { + public enum Included: Hashable, Codable, Sendable { case subscription(Subscription) case subscriptionOfferCodeOneTimeUseCode(SubscriptionOfferCodeOneTimeUseCode) case subscriptionOfferCodeCustomCode(SubscriptionOfferCodeCustomCode) diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/SubscriptionPricePointEqualizationsLinkagesResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/SubscriptionPricePointEqualizationsLinkagesResponse.generated.swift new file mode 100644 index 00000000..2238b39b --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/SubscriptionPricePointEqualizationsLinkagesResponse.generated.swift @@ -0,0 +1,53 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct SubscriptionPricePointEqualizationsLinkagesResponse: Hashable, Codable, Sendable { + public var data: [Data] + + public var links: PagedDocumentLinks + + public var meta: PagingInformation? + + public init( + data: [Data], + links: PagedDocumentLinks, + meta: PagingInformation? = nil + ) { + self.data = data + self.links = links + self.meta = meta + } + + private enum CodingKeys: String, CodingKey { + case data + case links + case meta + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case subscriptionPricePoints + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/SubscriptionPricePointResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/SubscriptionPricePointResponse.generated.swift index cbdbb04b..628e796e 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/SubscriptionPricePointResponse.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/SubscriptionPricePointResponse.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct SubscriptionPricePointResponse: Hashable, Codable { +public struct SubscriptionPricePointResponse: Hashable, Codable, Sendable { public var data: SubscriptionPricePoint public var included: [Territory]? diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/SubscriptionPricePointsLinkagesResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/SubscriptionPricePointsLinkagesResponse.generated.swift new file mode 100644 index 00000000..538402ec --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/SubscriptionPricePointsLinkagesResponse.generated.swift @@ -0,0 +1,53 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct SubscriptionPricePointsLinkagesResponse: Hashable, Codable, Sendable { + public var data: [Data] + + public var links: PagedDocumentLinks + + public var meta: PagingInformation? + + public init( + data: [Data], + links: PagedDocumentLinks, + meta: PagingInformation? = nil + ) { + self.data = data + self.links = links + self.meta = meta + } + + private enum CodingKeys: String, CodingKey { + case data + case links + case meta + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case subscriptionPricePoints + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/SubscriptionPricePointsResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/SubscriptionPricePointsResponse.generated.swift index b57fbd7e..da918bd8 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/SubscriptionPricePointsResponse.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/SubscriptionPricePointsResponse.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct SubscriptionPricePointsResponse: Hashable, Codable { +public struct SubscriptionPricePointsResponse: Hashable, Codable, Sendable { public var data: [SubscriptionPricePoint] public var included: [Territory]? diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/SubscriptionPriceResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/SubscriptionPriceResponse.generated.swift index 81cb3fe2..c6647b79 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/SubscriptionPriceResponse.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/SubscriptionPriceResponse.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct SubscriptionPriceResponse: Hashable, Codable { +public struct SubscriptionPriceResponse: Hashable, Codable, Sendable { public var data: SubscriptionPrice public var included: [Included]? @@ -26,7 +26,7 @@ public struct SubscriptionPriceResponse: Hashable, Codable { case links } - public enum Included: Hashable, Codable { + public enum Included: Hashable, Codable, Sendable { case territory(Territory) case subscriptionPricePoint(SubscriptionPricePoint) diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/SubscriptionPricesLinkagesResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/SubscriptionPricesLinkagesResponse.generated.swift index bc594d20..190df3dd 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/SubscriptionPricesLinkagesResponse.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/SubscriptionPricesLinkagesResponse.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct SubscriptionPricesLinkagesResponse: Hashable, Codable { +public struct SubscriptionPricesLinkagesResponse: Hashable, Codable, Sendable { public var data: [Data] public var links: PagedDocumentLinks @@ -26,7 +26,7 @@ public struct SubscriptionPricesLinkagesResponse: Hashable, Codable { case meta } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -44,7 +44,7 @@ public struct SubscriptionPricesLinkagesResponse: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case subscriptionPrices } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/SubscriptionPricesResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/SubscriptionPricesResponse.generated.swift index 9332a01f..b171e021 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/SubscriptionPricesResponse.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/SubscriptionPricesResponse.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct SubscriptionPricesResponse: Hashable, Codable { +public struct SubscriptionPricesResponse: Hashable, Codable, Sendable { public var data: [SubscriptionPrice] public var included: [Included]? @@ -31,7 +31,7 @@ public struct SubscriptionPricesResponse: Hashable, Codable { case meta } - public enum Included: Hashable, Codable { + public enum Included: Hashable, Codable, Sendable { case territory(Territory) case subscriptionPricePoint(SubscriptionPricePoint) diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/SubscriptionPromotedPurchaseLinkageResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/SubscriptionPromotedPurchaseLinkageResponse.generated.swift new file mode 100644 index 00000000..7b74a0b8 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/SubscriptionPromotedPurchaseLinkageResponse.generated.swift @@ -0,0 +1,48 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct SubscriptionPromotedPurchaseLinkageResponse: Hashable, Codable, Sendable { + public var data: Data + + public var links: DocumentLinks + + public init( + data: Data, + links: DocumentLinks + ) { + self.data = data + self.links = links + } + + private enum CodingKeys: String, CodingKey { + case data + case links + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case promotedPurchases + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/SubscriptionPromotionalOfferPricesLinkagesResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/SubscriptionPromotionalOfferPricesLinkagesResponse.generated.swift new file mode 100644 index 00000000..0cce230a --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/SubscriptionPromotionalOfferPricesLinkagesResponse.generated.swift @@ -0,0 +1,53 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct SubscriptionPromotionalOfferPricesLinkagesResponse: Hashable, Codable, Sendable { + public var data: [Data] + + public var links: PagedDocumentLinks + + public var meta: PagingInformation? + + public init( + data: [Data], + links: PagedDocumentLinks, + meta: PagingInformation? = nil + ) { + self.data = data + self.links = links + self.meta = meta + } + + private enum CodingKeys: String, CodingKey { + case data + case links + case meta + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case subscriptionPromotionalOfferPrices + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/SubscriptionPromotionalOfferPricesResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/SubscriptionPromotionalOfferPricesResponse.generated.swift index 0694cdc5..bf546dd2 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/SubscriptionPromotionalOfferPricesResponse.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/SubscriptionPromotionalOfferPricesResponse.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct SubscriptionPromotionalOfferPricesResponse: Hashable, Codable { +public struct SubscriptionPromotionalOfferPricesResponse: Hashable, Codable, Sendable { public var data: [SubscriptionPromotionalOfferPrice] public var included: [Included]? @@ -31,7 +31,7 @@ public struct SubscriptionPromotionalOfferPricesResponse: Hashable, Codable { case meta } - public enum Included: Hashable, Codable { + public enum Included: Hashable, Codable, Sendable { case territory(Territory) case subscriptionPricePoint(SubscriptionPricePoint) diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/SubscriptionPromotionalOfferResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/SubscriptionPromotionalOfferResponse.generated.swift index 0587deef..9b4afc96 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/SubscriptionPromotionalOfferResponse.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/SubscriptionPromotionalOfferResponse.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct SubscriptionPromotionalOfferResponse: Hashable, Codable { +public struct SubscriptionPromotionalOfferResponse: Hashable, Codable, Sendable { public var data: SubscriptionPromotionalOffer public var included: [Included]? @@ -26,7 +26,7 @@ public struct SubscriptionPromotionalOfferResponse: Hashable, Codable { case links } - public enum Included: Hashable, Codable { + public enum Included: Hashable, Codable, Sendable { case subscription(Subscription) case subscriptionPromotionalOfferPrice(SubscriptionPromotionalOfferPrice) diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/SubscriptionPromotionalOffersLinkagesResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/SubscriptionPromotionalOffersLinkagesResponse.generated.swift new file mode 100644 index 00000000..f396c48c --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/SubscriptionPromotionalOffersLinkagesResponse.generated.swift @@ -0,0 +1,53 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct SubscriptionPromotionalOffersLinkagesResponse: Hashable, Codable, Sendable { + public var data: [Data] + + public var links: PagedDocumentLinks + + public var meta: PagingInformation? + + public init( + data: [Data], + links: PagedDocumentLinks, + meta: PagingInformation? = nil + ) { + self.data = data + self.links = links + self.meta = meta + } + + private enum CodingKeys: String, CodingKey { + case data + case links + case meta + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case subscriptionPromotionalOffers + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/SubscriptionPromotionalOffersResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/SubscriptionPromotionalOffersResponse.generated.swift index 968b7aad..ba382536 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/SubscriptionPromotionalOffersResponse.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/SubscriptionPromotionalOffersResponse.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct SubscriptionPromotionalOffersResponse: Hashable, Codable { +public struct SubscriptionPromotionalOffersResponse: Hashable, Codable, Sendable { public var data: [SubscriptionPromotionalOffer] public var included: [Included]? @@ -31,7 +31,7 @@ public struct SubscriptionPromotionalOffersResponse: Hashable, Codable { case meta } - public enum Included: Hashable, Codable { + public enum Included: Hashable, Codable, Sendable { case subscription(Subscription) case subscriptionPromotionalOfferPrice(SubscriptionPromotionalOfferPrice) diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/SubscriptionResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/SubscriptionResponse.generated.swift index aedfd79b..ef788c02 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/SubscriptionResponse.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/SubscriptionResponse.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct SubscriptionResponse: Hashable, Codable { +public struct SubscriptionResponse: Hashable, Codable, Sendable { public var data: Subscription public var included: [Included]? @@ -26,7 +26,7 @@ public struct SubscriptionResponse: Hashable, Codable { case links } - public enum Included: Hashable, Codable { + public enum Included: Hashable, Codable, Sendable { case subscriptionLocalization(SubscriptionLocalization) case subscriptionAppStoreReviewScreenshot(SubscriptionAppStoreReviewScreenshot) case subscriptionGroup(SubscriptionGroup) @@ -36,6 +36,8 @@ public struct SubscriptionResponse: Hashable, Codable { case subscriptionPrice(SubscriptionPrice) case promotedPurchase(PromotedPurchase) case subscriptionAvailability(SubscriptionAvailability) + case winBackOffer(WinBackOffer) + case subscriptionImage(SubscriptionImage) public init(from decoder: Decoder) throws { self = try { @@ -85,6 +87,16 @@ public struct SubscriptionResponse: Hashable, Codable { } catch { lastError = error } + do { + return .winBackOffer(try WinBackOffer(from: decoder)) + } catch { + lastError = error + } + do { + return .subscriptionImage(try SubscriptionImage(from: decoder)) + } catch { + lastError = error + } throw lastError }() } @@ -117,6 +129,12 @@ public struct SubscriptionResponse: Hashable, Codable { case .subscriptionAvailability(let value): try value.encode(to: encoder) + + case .winBackOffer(let value): + try value.encode(to: encoder) + + case .subscriptionImage(let value): + try value.encode(to: encoder) } } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/SubscriptionSubmissionResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/SubscriptionSubmissionResponse.generated.swift index 25bad203..2c091d38 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/SubscriptionSubmissionResponse.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/SubscriptionSubmissionResponse.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct SubscriptionSubmissionResponse: Hashable, Codable { +public struct SubscriptionSubmissionResponse: Hashable, Codable, Sendable { public var data: SubscriptionSubmission public var included: [Subscription]? diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/SubscriptionSubscriptionAvailabilityLinkageResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/SubscriptionSubscriptionAvailabilityLinkageResponse.generated.swift new file mode 100644 index 00000000..e42e0e7f --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/SubscriptionSubscriptionAvailabilityLinkageResponse.generated.swift @@ -0,0 +1,48 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct SubscriptionSubscriptionAvailabilityLinkageResponse: Hashable, Codable, Sendable { + public var data: Data + + public var links: DocumentLinks + + public init( + data: Data, + links: DocumentLinks + ) { + self.data = data + self.links = links + } + + private enum CodingKeys: String, CodingKey { + case data + case links + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case subscriptionAvailabilities + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/SubscriptionSubscriptionLocalizationsLinkagesResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/SubscriptionSubscriptionLocalizationsLinkagesResponse.generated.swift new file mode 100644 index 00000000..5902f9b9 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/SubscriptionSubscriptionLocalizationsLinkagesResponse.generated.swift @@ -0,0 +1,53 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct SubscriptionSubscriptionLocalizationsLinkagesResponse: Hashable, Codable, Sendable { + public var data: [Data] + + public var links: PagedDocumentLinks + + public var meta: PagingInformation? + + public init( + data: [Data], + links: PagedDocumentLinks, + meta: PagingInformation? = nil + ) { + self.data = data + self.links = links + self.meta = meta + } + + private enum CodingKeys: String, CodingKey { + case data + case links + case meta + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case subscriptionLocalizations + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/SubscriptionWinBackOffersLinkagesResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/SubscriptionWinBackOffersLinkagesResponse.generated.swift new file mode 100644 index 00000000..223ad77e --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/SubscriptionWinBackOffersLinkagesResponse.generated.swift @@ -0,0 +1,53 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct SubscriptionWinBackOffersLinkagesResponse: Hashable, Codable, Sendable { + public var data: [Data] + + public var links: PagedDocumentLinks + + public var meta: PagingInformation? + + public init( + data: [Data], + links: PagedDocumentLinks, + meta: PagingInformation? = nil + ) { + self.data = data + self.links = links + self.meta = meta + } + + private enum CodingKeys: String, CodingKey { + case data + case links + case meta + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case winBackOffers + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/SubscriptionsResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/SubscriptionsResponse.generated.swift index ab6e4b1e..af8e5bbe 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/SubscriptionsResponse.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/SubscriptionsResponse.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct SubscriptionsResponse: Hashable, Codable { +public struct SubscriptionsResponse: Hashable, Codable, Sendable { public var data: [Subscription] public var included: [Included]? @@ -31,7 +31,7 @@ public struct SubscriptionsResponse: Hashable, Codable { case meta } - public enum Included: Hashable, Codable { + public enum Included: Hashable, Codable, Sendable { case subscriptionLocalization(SubscriptionLocalization) case subscriptionAppStoreReviewScreenshot(SubscriptionAppStoreReviewScreenshot) case subscriptionGroup(SubscriptionGroup) @@ -41,6 +41,8 @@ public struct SubscriptionsResponse: Hashable, Codable { case subscriptionPrice(SubscriptionPrice) case promotedPurchase(PromotedPurchase) case subscriptionAvailability(SubscriptionAvailability) + case winBackOffer(WinBackOffer) + case subscriptionImage(SubscriptionImage) public init(from decoder: Decoder) throws { self = try { @@ -90,6 +92,16 @@ public struct SubscriptionsResponse: Hashable, Codable { } catch { lastError = error } + do { + return .winBackOffer(try WinBackOffer(from: decoder)) + } catch { + lastError = error + } + do { + return .subscriptionImage(try SubscriptionImage(from: decoder)) + } catch { + lastError = error + } throw lastError }() } @@ -122,6 +134,12 @@ public struct SubscriptionsResponse: Hashable, Codable { case .subscriptionAvailability(let value): try value.encode(to: encoder) + + case .winBackOffer(let value): + try value.encode(to: encoder) + + case .subscriptionImage(let value): + try value.encode(to: encoder) } } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/TerritoriesResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/TerritoriesResponse.generated.swift index 18c4bcbb..65482fda 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/TerritoriesResponse.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/TerritoriesResponse.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct TerritoriesResponse: Hashable, Codable { +public struct TerritoriesResponse: Hashable, Codable, Sendable { public var data: [Territory] public var links: PagedDocumentLinks diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/TerritoriesWithoutIncludesResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/TerritoriesWithoutIncludesResponse.generated.swift index 2640add9..898d112b 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/TerritoriesWithoutIncludesResponse.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/TerritoriesWithoutIncludesResponse.generated.swift @@ -3,15 +3,15 @@ // swiftlint:disable all import Foundation -public struct TerritoriesWithoutIncludesResponse: Hashable, Codable { - public var data: [EndUserLicenseAgreement] +public struct TerritoriesWithoutIncludesResponse: Hashable, Codable, Sendable { + public var data: [Territory] public var links: PagedDocumentLinks public var meta: PagingInformation? public init( - data: [EndUserLicenseAgreement], + data: [Territory], links: PagedDocumentLinks, meta: PagingInformation? = nil ) { diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/TerritoryAvailabilitiesResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/TerritoryAvailabilitiesResponse.generated.swift index 4b254e7f..c208af89 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/TerritoryAvailabilitiesResponse.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/TerritoryAvailabilitiesResponse.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct TerritoryAvailabilitiesResponse: Hashable, Codable { +public struct TerritoryAvailabilitiesResponse: Hashable, Codable, Sendable { public var data: [TerritoryAvailability] public var included: [Territory]? diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/TerritoryAvailabilityResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/TerritoryAvailabilityResponse.generated.swift index 56dd29cf..914d2976 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/TerritoryAvailabilityResponse.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/TerritoryAvailabilityResponse.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct TerritoryAvailabilityResponse: Hashable, Codable { +public struct TerritoryAvailabilityResponse: Hashable, Codable, Sendable { public var data: TerritoryAvailability public var included: [Territory]? diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/TerritoryResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/TerritoryResponse.generated.swift index 36952c54..084c689c 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/TerritoryResponse.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/TerritoryResponse.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct TerritoryResponse: Hashable, Codable { +public struct TerritoryResponse: Hashable, Codable, Sendable { public var data: Territory public var links: DocumentLinks diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/UserInvitationResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/UserInvitationResponse.generated.swift index 59423546..95261342 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/UserInvitationResponse.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/UserInvitationResponse.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct UserInvitationResponse: Hashable, Codable { +public struct UserInvitationResponse: Hashable, Codable, Sendable { public var data: UserInvitation public var included: [App]? diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/UserInvitationVisibleAppsLinkagesResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/UserInvitationVisibleAppsLinkagesResponse.generated.swift new file mode 100644 index 00000000..cfb7cc30 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/UserInvitationVisibleAppsLinkagesResponse.generated.swift @@ -0,0 +1,53 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct UserInvitationVisibleAppsLinkagesResponse: Hashable, Codable, Sendable { + public var data: [Data] + + public var links: PagedDocumentLinks + + public var meta: PagingInformation? + + public init( + data: [Data], + links: PagedDocumentLinks, + meta: PagingInformation? = nil + ) { + self.data = data + self.links = links + self.meta = meta + } + + private enum CodingKeys: String, CodingKey { + case data + case links + case meta + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case apps + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/UserInvitationsResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/UserInvitationsResponse.generated.swift index 4b8c146b..31b57101 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/UserInvitationsResponse.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/UserInvitationsResponse.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct UserInvitationsResponse: Hashable, Codable { +public struct UserInvitationsResponse: Hashable, Codable, Sendable { public var data: [UserInvitation] public var included: [App]? diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/UserResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/UserResponse.generated.swift index 8f5842b3..7f925f1f 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/UserResponse.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/UserResponse.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct UserResponse: Hashable, Codable { +public struct UserResponse: Hashable, Codable, Sendable { public var data: User public var included: [App]? diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/UserVisibleAppsLinkagesResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/UserVisibleAppsLinkagesResponse.generated.swift index 26c18da9..1afca825 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/UserVisibleAppsLinkagesResponse.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/UserVisibleAppsLinkagesResponse.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct UserVisibleAppsLinkagesResponse: Hashable, Codable { +public struct UserVisibleAppsLinkagesResponse: Hashable, Codable, Sendable { public var data: [Data] public var links: PagedDocumentLinks @@ -26,7 +26,7 @@ public struct UserVisibleAppsLinkagesResponse: Hashable, Codable { case meta } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -44,7 +44,7 @@ public struct UserVisibleAppsLinkagesResponse: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case apps } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/UsersResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/UsersResponse.generated.swift index 284c128d..cfd8f1bf 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/UsersResponse.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/UsersResponse.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct UsersResponse: Hashable, Codable { +public struct UsersResponse: Hashable, Codable, Sendable { public var data: [User] public var included: [App]? diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/WebhookDeliveriesLinkagesResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/WebhookDeliveriesLinkagesResponse.generated.swift new file mode 100644 index 00000000..108701be --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/WebhookDeliveriesLinkagesResponse.generated.swift @@ -0,0 +1,53 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct WebhookDeliveriesLinkagesResponse: Hashable, Codable, Sendable { + public var data: [Data] + + public var links: PagedDocumentLinks + + public var meta: PagingInformation? + + public init( + data: [Data], + links: PagedDocumentLinks, + meta: PagingInformation? = nil + ) { + self.data = data + self.links = links + self.meta = meta + } + + private enum CodingKeys: String, CodingKey { + case data + case links + case meta + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case webhookDeliveries + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/WebhookDeliveriesResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/WebhookDeliveriesResponse.generated.swift new file mode 100644 index 00000000..79e3d108 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/WebhookDeliveriesResponse.generated.swift @@ -0,0 +1,35 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct WebhookDeliveriesResponse: Hashable, Codable, Sendable { + public var data: [WebhookDelivery] + + public var included: [WebhookEvent]? + + public var links: PagedDocumentLinks + + public var meta: PagingInformation? + + public init( + data: [WebhookDelivery], + included: [WebhookEvent]? = nil, + links: PagedDocumentLinks, + meta: PagingInformation? = nil + ) { + self.data = data + self.included = included + self.links = links + self.meta = meta + } + + private enum CodingKeys: String, CodingKey { + case data + case included + case links + case meta + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/WebhookDeliveryResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/WebhookDeliveryResponse.generated.swift new file mode 100644 index 00000000..35dc344d --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/WebhookDeliveryResponse.generated.swift @@ -0,0 +1,30 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct WebhookDeliveryResponse: Hashable, Codable, Sendable { + public var data: WebhookDelivery + + public var included: [WebhookEvent]? + + public var links: DocumentLinks + + public init( + data: WebhookDelivery, + included: [WebhookEvent]? = nil, + links: DocumentLinks + ) { + self.data = data + self.included = included + self.links = links + } + + private enum CodingKeys: String, CodingKey { + case data + case included + case links + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BuildBetaDetailWithoutIncludesResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/WebhookPingResponse.generated.swift similarity index 72% rename from Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BuildBetaDetailWithoutIncludesResponse.generated.swift rename to Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/WebhookPingResponse.generated.swift index 13515375..042e070d 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/BuildBetaDetailWithoutIncludesResponse.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/WebhookPingResponse.generated.swift @@ -3,13 +3,13 @@ // swiftlint:disable all import Foundation -public struct BuildBetaDetailWithoutIncludesResponse: Hashable, Codable { - public var data: Build +public struct WebhookPingResponse: Hashable, Codable, Sendable { + public var data: WebhookPing public var links: DocumentLinks public init( - data: Build, + data: WebhookPing, links: DocumentLinks ) { self.data = data diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppPreOrderResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/WebhookResponse.generated.swift similarity index 79% rename from Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppPreOrderResponse.generated.swift rename to Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/WebhookResponse.generated.swift index 9334a85a..da80628f 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppPreOrderResponse.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/WebhookResponse.generated.swift @@ -3,15 +3,15 @@ // swiftlint:disable all import Foundation -public struct AppPreOrderResponse: Hashable, Codable { - public var data: AppPreOrder +public struct WebhookResponse: Hashable, Codable, Sendable { + public var data: Webhook public var included: [App]? public var links: DocumentLinks public init( - data: AppPreOrder, + data: Webhook, included: [App]? = nil, links: DocumentLinks ) { diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/WebhooksResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/WebhooksResponse.generated.swift new file mode 100644 index 00000000..3f21257e --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/WebhooksResponse.generated.swift @@ -0,0 +1,35 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct WebhooksResponse: Hashable, Codable, Sendable { + public var data: [Webhook] + + public var included: [App]? + + public var links: PagedDocumentLinks + + public var meta: PagingInformation? + + public init( + data: [Webhook], + included: [App]? = nil, + links: PagedDocumentLinks, + meta: PagingInformation? = nil + ) { + self.data = data + self.included = included + self.links = links + self.meta = meta + } + + private enum CodingKeys: String, CodingKey { + case data + case included + case links + case meta + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/WinBackOfferPricesLinkagesResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/WinBackOfferPricesLinkagesResponse.generated.swift new file mode 100644 index 00000000..d62747ef --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/WinBackOfferPricesLinkagesResponse.generated.swift @@ -0,0 +1,53 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct WinBackOfferPricesLinkagesResponse: Hashable, Codable, Sendable { + public var data: [Data] + + public var links: PagedDocumentLinks + + public var meta: PagingInformation? + + public init( + data: [Data], + links: PagedDocumentLinks, + meta: PagingInformation? = nil + ) { + self.data = data + self.links = links + self.meta = meta + } + + private enum CodingKeys: String, CodingKey { + case data + case links + case meta + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case winBackOfferPrices + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppPricePointsResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/WinBackOfferPricesResponse.generated.swift similarity index 76% rename from Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppPricePointsResponse.generated.swift rename to Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/WinBackOfferPricesResponse.generated.swift index ea7c060f..760761e3 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/AppPricePointsResponse.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/WinBackOfferPricesResponse.generated.swift @@ -3,8 +3,8 @@ // swiftlint:disable all import Foundation -public struct AppPricePointsResponse: Hashable, Codable { - public var data: [AppPricePoint] +public struct WinBackOfferPricesResponse: Hashable, Codable, Sendable { + public var data: [WinBackOfferPrice] public var included: [Included]? @@ -13,7 +13,7 @@ public struct AppPricePointsResponse: Hashable, Codable { public var meta: PagingInformation? public init( - data: [AppPricePoint], + data: [WinBackOfferPrice], included: [Included]? = nil, links: PagedDocumentLinks, meta: PagingInformation? = nil @@ -31,20 +31,20 @@ public struct AppPricePointsResponse: Hashable, Codable { case meta } - public enum Included: Hashable, Codable { - case appPriceTier(AppPriceTier) + public enum Included: Hashable, Codable, Sendable { case territory(Territory) + case subscriptionPricePoint(SubscriptionPricePoint) public init(from decoder: Decoder) throws { self = try { var lastError: Error! do { - return .appPriceTier(try AppPriceTier(from: decoder)) + return .territory(try Territory(from: decoder)) } catch { lastError = error } do { - return .territory(try Territory(from: decoder)) + return .subscriptionPricePoint(try SubscriptionPricePoint(from: decoder)) } catch { lastError = error } @@ -54,10 +54,10 @@ public struct AppPricePointsResponse: Hashable, Codable { public func encode(to encoder: Encoder) throws { switch self { - case .appPriceTier(let value): + case .territory(let value): try value.encode(to: encoder) - case .territory(let value): + case .subscriptionPricePoint(let value): try value.encode(to: encoder) } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/WinBackOfferResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/WinBackOfferResponse.generated.swift new file mode 100644 index 00000000..c6b0974f --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/WinBackOfferResponse.generated.swift @@ -0,0 +1,30 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct WinBackOfferResponse: Hashable, Codable, Sendable { + public var data: WinBackOffer + + public var included: [WinBackOfferPrice]? + + public var links: DocumentLinks + + public init( + data: WinBackOffer, + included: [WinBackOfferPrice]? = nil, + links: DocumentLinks + ) { + self.data = data + self.included = included + self.links = links + } + + private enum CodingKeys: String, CodingKey { + case data + case included + case links + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/WinBackOffersResponse.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/WinBackOffersResponse.generated.swift new file mode 100644 index 00000000..84a87e26 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Responses/WinBackOffersResponse.generated.swift @@ -0,0 +1,35 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct WinBackOffersResponse: Hashable, Codable, Sendable { + public var data: [WinBackOffer] + + public var included: [WinBackOfferPrice]? + + public var links: PagedDocumentLinks + + public var meta: PagingInformation? + + public init( + data: [WinBackOffer], + included: [WinBackOfferPrice]? = nil, + links: PagedDocumentLinks, + meta: PagingInformation? = nil + ) { + self.data = data + self.included = included + self.links = links + self.meta = meta + } + + private enum CodingKeys: String, CodingKey { + case data + case included + case links + case meta + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/ReviewSubmission.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/ReviewSubmission.generated.swift index 836f6936..1ad9739c 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/ReviewSubmission.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/ReviewSubmission.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct ReviewSubmission: Hashable, Codable { +public struct ReviewSubmission: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -36,11 +36,11 @@ public struct ReviewSubmission: Hashable, Codable { case links } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case reviewSubmissions } - public struct Attributes: Hashable, Codable { + public struct Attributes: Hashable, Codable, Sendable { public var platform: Platform? public var state: State? @@ -63,45 +63,48 @@ public struct ReviewSubmission: Hashable, Codable { case submittedDate } - public enum State: Hashable, Codable, RawRepresentable { - case canceling - case complete - case completing - case inReview - case readyForReview - case unresolvedIssues - case waitingForReview - case unknown(String) - - public var rawValue: String { - switch self { - case .canceling: return "CANCELING" - case .complete: return "COMPLETE" - case .completing: return "COMPLETING" - case .inReview: return "IN_REVIEW" - case .readyForReview: return "READY_FOR_REVIEW" - case .unresolvedIssues: return "UNRESOLVED_ISSUES" - case .waitingForReview: return "WAITING_FOR_REVIEW" - case .unknown(let rawValue): return rawValue - } + public struct State: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var canceling: Self { + .init(rawValue: "CANCELING") + } + + public static var complete: Self { + .init(rawValue: "COMPLETE") + } + + public static var completing: Self { + .init(rawValue: "COMPLETING") + } + + public static var inReview: Self { + .init(rawValue: "IN_REVIEW") + } + + public static var readyForReview: Self { + .init(rawValue: "READY_FOR_REVIEW") + } + + public static var unresolvedIssues: Self { + .init(rawValue: "UNRESOLVED_ISSUES") } + public static var waitingForReview: Self { + .init(rawValue: "WAITING_FOR_REVIEW") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "CANCELING": self = .canceling - case "COMPLETE": self = .complete - case "COMPLETING": self = .completing - case "IN_REVIEW": self = .inReview - case "READY_FOR_REVIEW": self = .readyForReview - case "UNRESOLVED_ISSUES": self = .unresolvedIssues - case "WAITING_FOR_REVIEW": self = .waitingForReview - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } } - public struct Relationships: Hashable, Codable { + public struct Relationships: Hashable, Codable, Sendable { public var app: App? public var appStoreVersionForReview: AppStoreVersionForReview? @@ -134,25 +137,18 @@ public struct ReviewSubmission: Hashable, Codable { case submittedByActor } - public struct App: Hashable, Codable { + public struct App: Hashable, Codable, Sendable { public var data: Data? - public var links: Links? - - public init( - data: Data? = nil, - links: Links? = nil - ) { + public init(data: Data? = nil) { self.data = data - self.links = links } private enum CodingKeys: String, CodingKey { case data - case links } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -170,50 +166,24 @@ public struct ReviewSubmission: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case apps } } - - public struct Links: Hashable, Codable { - public var related: URL? - - public var `self`: URL? - - public init( - related: URL? = nil, - self _self: URL? = nil - ) { - self.related = related - self.`self` = _self - } - - private enum CodingKeys: String, CodingKey { - case related - case `self` = "self" - } - } } - public struct AppStoreVersionForReview: Hashable, Codable { + public struct AppStoreVersionForReview: Hashable, Codable, Sendable { public var data: Data? - public var links: Links? - - public init( - data: Data? = nil, - links: Links? = nil - ) { + public init(data: Data? = nil) { self.data = data - self.links = links } private enum CodingKeys: String, CodingKey { case data - case links } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -231,41 +201,22 @@ public struct ReviewSubmission: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case appStoreVersions } } - - public struct Links: Hashable, Codable { - public var related: URL? - - public var `self`: URL? - - public init( - related: URL? = nil, - self _self: URL? = nil - ) { - self.related = related - self.`self` = _self - } - - private enum CodingKeys: String, CodingKey { - case related - case `self` = "self" - } - } } - public struct Items: Hashable, Codable { + public struct Items: Hashable, Codable, Sendable { public var data: [Data]? - public var links: Links? + public var links: RelationshipLinks? public var meta: PagingInformation? public init( data: [Data]? = nil, - links: Links? = nil, + links: RelationshipLinks? = nil, meta: PagingInformation? = nil ) { self.data = data @@ -279,7 +230,7 @@ public struct ReviewSubmission: Hashable, Codable { case meta } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -297,50 +248,24 @@ public struct ReviewSubmission: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case reviewSubmissionItems } } - - public struct Links: Hashable, Codable { - public var related: URL? - - public var `self`: URL? - - public init( - related: URL? = nil, - self _self: URL? = nil - ) { - self.related = related - self.`self` = _self - } - - private enum CodingKeys: String, CodingKey { - case related - case `self` = "self" - } - } } - public struct LastUpdatedByActor: Hashable, Codable { + public struct LastUpdatedByActor: Hashable, Codable, Sendable { public var data: Data? - public var links: Links? - - public init( - data: Data? = nil, - links: Links? = nil - ) { + public init(data: Data? = nil) { self.data = data - self.links = links } private enum CodingKeys: String, CodingKey { case data - case links } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -358,50 +283,24 @@ public struct ReviewSubmission: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case actors } } - - public struct Links: Hashable, Codable { - public var related: URL? - - public var `self`: URL? - - public init( - related: URL? = nil, - self _self: URL? = nil - ) { - self.related = related - self.`self` = _self - } - - private enum CodingKeys: String, CodingKey { - case related - case `self` = "self" - } - } } - public struct SubmittedByActor: Hashable, Codable { + public struct SubmittedByActor: Hashable, Codable, Sendable { public var data: Data? - public var links: Links? - - public init( - data: Data? = nil, - links: Links? = nil - ) { + public init(data: Data? = nil) { self.data = data - self.links = links } private enum CodingKeys: String, CodingKey { case data - case links } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -419,29 +318,10 @@ public struct ReviewSubmission: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case actors } } - - public struct Links: Hashable, Codable { - public var related: URL? - - public var `self`: URL? - - public init( - related: URL? = nil, - self _self: URL? = nil - ) { - self.related = related - self.`self` = _self - } - - private enum CodingKeys: String, CodingKey { - case related - case `self` = "self" - } - } } } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/ReviewSubmissionItem.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/ReviewSubmissionItem.generated.swift index dd5c5561..c36c59ef 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/ReviewSubmissionItem.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/ReviewSubmissionItem.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct ReviewSubmissionItem: Hashable, Codable { +public struct ReviewSubmissionItem: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -36,11 +36,11 @@ public struct ReviewSubmissionItem: Hashable, Codable { case links } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case reviewSubmissionItems } - public struct Attributes: Hashable, Codable { + public struct Attributes: Hashable, Codable, Sendable { public var state: State? public init(state: State? = nil) { @@ -51,39 +51,40 @@ public struct ReviewSubmissionItem: Hashable, Codable { case state } - public enum State: Hashable, Codable, RawRepresentable { - case accepted - case approved - case readyForReview - case rejected - case removed - case unknown(String) - - public var rawValue: String { - switch self { - case .accepted: return "ACCEPTED" - case .approved: return "APPROVED" - case .readyForReview: return "READY_FOR_REVIEW" - case .rejected: return "REJECTED" - case .removed: return "REMOVED" - case .unknown(let rawValue): return rawValue - } + public struct State: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var accepted: Self { + .init(rawValue: "ACCEPTED") + } + + public static var approved: Self { + .init(rawValue: "APPROVED") + } + + public static var readyForReview: Self { + .init(rawValue: "READY_FOR_REVIEW") + } + + public static var rejected: Self { + .init(rawValue: "REJECTED") + } + + public static var removed: Self { + .init(rawValue: "REMOVED") } + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "ACCEPTED": self = .accepted - case "APPROVED": self = .approved - case "READY_FOR_REVIEW": self = .readyForReview - case "REJECTED": self = .rejected - case "REMOVED": self = .removed - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } } - public struct Relationships: Hashable, Codable { + public struct Relationships: Hashable, Codable, Sendable { public var appCustomProductPageVersion: AppCustomProductPageVersion? public var appEvent: AppEvent? @@ -116,25 +117,18 @@ public struct ReviewSubmissionItem: Hashable, Codable { case appStoreVersionExperimentV2 } - public struct AppCustomProductPageVersion: Hashable, Codable { + public struct AppCustomProductPageVersion: Hashable, Codable, Sendable { public var data: Data? - public var links: Links? - - public init( - data: Data? = nil, - links: Links? = nil - ) { + public init(data: Data? = nil) { self.data = data - self.links = links } private enum CodingKeys: String, CodingKey { case data - case links } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -152,50 +146,24 @@ public struct ReviewSubmissionItem: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case appCustomProductPageVersions } } - - public struct Links: Hashable, Codable { - public var related: URL? - - public var `self`: URL? - - public init( - related: URL? = nil, - self _self: URL? = nil - ) { - self.related = related - self.`self` = _self - } - - private enum CodingKeys: String, CodingKey { - case related - case `self` = "self" - } - } } - public struct AppEvent: Hashable, Codable { + public struct AppEvent: Hashable, Codable, Sendable { public var data: Data? - public var links: Links? - - public init( - data: Data? = nil, - links: Links? = nil - ) { + public init(data: Data? = nil) { self.data = data - self.links = links } private enum CodingKeys: String, CodingKey { case data - case links } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -213,50 +181,24 @@ public struct ReviewSubmissionItem: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case appEvents } } - - public struct Links: Hashable, Codable { - public var related: URL? - - public var `self`: URL? - - public init( - related: URL? = nil, - self _self: URL? = nil - ) { - self.related = related - self.`self` = _self - } - - private enum CodingKeys: String, CodingKey { - case related - case `self` = "self" - } - } } - public struct AppStoreVersion: Hashable, Codable { + public struct AppStoreVersion: Hashable, Codable, Sendable { public var data: Data? - public var links: Links? - - public init( - data: Data? = nil, - links: Links? = nil - ) { + public init(data: Data? = nil) { self.data = data - self.links = links } private enum CodingKeys: String, CodingKey { case data - case links } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -274,50 +216,24 @@ public struct ReviewSubmissionItem: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case appStoreVersions } } - - public struct Links: Hashable, Codable { - public var related: URL? - - public var `self`: URL? - - public init( - related: URL? = nil, - self _self: URL? = nil - ) { - self.related = related - self.`self` = _self - } - - private enum CodingKeys: String, CodingKey { - case related - case `self` = "self" - } - } } - public struct AppStoreVersionExperiment: Hashable, Codable { + public struct AppStoreVersionExperiment: Hashable, Codable, Sendable { public var data: Data? - public var links: Links? - - public init( - data: Data? = nil, - links: Links? = nil - ) { + public init(data: Data? = nil) { self.data = data - self.links = links } private enum CodingKeys: String, CodingKey { case data - case links } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -335,50 +251,24 @@ public struct ReviewSubmissionItem: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case appStoreVersionExperiments } } - - public struct Links: Hashable, Codable { - public var related: URL? - - public var `self`: URL? - - public init( - related: URL? = nil, - self _self: URL? = nil - ) { - self.related = related - self.`self` = _self - } - - private enum CodingKeys: String, CodingKey { - case related - case `self` = "self" - } - } } - public struct AppStoreVersionExperimentV2: Hashable, Codable { + public struct AppStoreVersionExperimentV2: Hashable, Codable, Sendable { public var data: Data? - public var links: Links? - - public init( - data: Data? = nil, - links: Links? = nil - ) { + public init(data: Data? = nil) { self.data = data - self.links = links } private enum CodingKeys: String, CodingKey { case data - case links } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -396,29 +286,10 @@ public struct ReviewSubmissionItem: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case appStoreVersionExperiments } } - - public struct Links: Hashable, Codable { - public var related: URL? - - public var `self`: URL? - - public init( - related: URL? = nil, - self _self: URL? = nil - ) { - self.related = related - self.`self` = _self - } - - private enum CodingKeys: String, CodingKey { - case related - case `self` = "self" - } - } } } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/RoutingAppCoverage.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/RoutingAppCoverage.generated.swift index 777a8d6e..af17f316 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/RoutingAppCoverage.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/RoutingAppCoverage.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct RoutingAppCoverage: Hashable, Codable { +public struct RoutingAppCoverage: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -36,11 +36,11 @@ public struct RoutingAppCoverage: Hashable, Codable { case links } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case routingAppCoverages } - public struct Attributes: Hashable, Codable { + public struct Attributes: Hashable, Codable, Sendable { public var assetDeliveryState: AppMediaAssetState? public var fileName: String? @@ -74,7 +74,7 @@ public struct RoutingAppCoverage: Hashable, Codable { } } - public struct Relationships: Hashable, Codable { + public struct Relationships: Hashable, Codable, Sendable { public var appStoreVersion: AppStoreVersion? public init(appStoreVersion: AppStoreVersion? = nil) { @@ -85,25 +85,18 @@ public struct RoutingAppCoverage: Hashable, Codable { case appStoreVersion } - public struct AppStoreVersion: Hashable, Codable { + public struct AppStoreVersion: Hashable, Codable, Sendable { public var data: Data? - public var links: Links? - - public init( - data: Data? = nil, - links: Links? = nil - ) { + public init(data: Data? = nil) { self.data = data - self.links = links } private enum CodingKeys: String, CodingKey { case data - case links } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -121,29 +114,10 @@ public struct RoutingAppCoverage: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case appStoreVersions } } - - public struct Links: Hashable, Codable { - public var related: URL? - - public var `self`: URL? - - public init( - related: URL? = nil, - self _self: URL? = nil - ) { - self.related = related - self.`self` = _self - } - - private enum CodingKeys: String, CodingKey { - case related - case `self` = "self" - } - } } } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/SandboxTesterV2.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/SandboxTesterV2.generated.swift index d670547c..ccf4c3c7 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/SandboxTesterV2.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/SandboxTesterV2.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct SandboxTesterV2: Hashable, Codable { +public struct SandboxTesterV2: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -31,11 +31,11 @@ public struct SandboxTesterV2: Hashable, Codable { case links } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case sandboxTesters } - public struct Attributes: Hashable, Codable { + public struct Attributes: Hashable, Codable, Sendable { public var acAccountName: String? public var applePayCompatible: Bool? @@ -78,34 +78,35 @@ public struct SandboxTesterV2: Hashable, Codable { case territory } - public enum SubscriptionRenewalRate: Hashable, Codable, RawRepresentable { - case monthlyRenewalEveryFifteenMinutes - case monthlyRenewalEveryFiveMinutes - case monthlyRenewalEveryOneHour - case monthlyRenewalEveryThirtyMinutes - case monthlyRenewalEveryThreeMinutes - case unknown(String) - - public var rawValue: String { - switch self { - case .monthlyRenewalEveryFifteenMinutes: return "MONTHLY_RENEWAL_EVERY_FIFTEEN_MINUTES" - case .monthlyRenewalEveryFiveMinutes: return "MONTHLY_RENEWAL_EVERY_FIVE_MINUTES" - case .monthlyRenewalEveryOneHour: return "MONTHLY_RENEWAL_EVERY_ONE_HOUR" - case .monthlyRenewalEveryThirtyMinutes: return "MONTHLY_RENEWAL_EVERY_THIRTY_MINUTES" - case .monthlyRenewalEveryThreeMinutes: return "MONTHLY_RENEWAL_EVERY_THREE_MINUTES" - case .unknown(let rawValue): return rawValue - } + public struct SubscriptionRenewalRate: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var monthlyRenewalEveryFifteenMinutes: Self { + .init(rawValue: "MONTHLY_RENEWAL_EVERY_FIFTEEN_MINUTES") } + public static var monthlyRenewalEveryFiveMinutes: Self { + .init(rawValue: "MONTHLY_RENEWAL_EVERY_FIVE_MINUTES") + } + + public static var monthlyRenewalEveryOneHour: Self { + .init(rawValue: "MONTHLY_RENEWAL_EVERY_ONE_HOUR") + } + + public static var monthlyRenewalEveryThirtyMinutes: Self { + .init(rawValue: "MONTHLY_RENEWAL_EVERY_THIRTY_MINUTES") + } + + public static var monthlyRenewalEveryThreeMinutes: Self { + .init(rawValue: "MONTHLY_RENEWAL_EVERY_THREE_MINUTES") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "MONTHLY_RENEWAL_EVERY_FIFTEEN_MINUTES": self = .monthlyRenewalEveryFifteenMinutes - case "MONTHLY_RENEWAL_EVERY_FIVE_MINUTES": self = .monthlyRenewalEveryFiveMinutes - case "MONTHLY_RENEWAL_EVERY_ONE_HOUR": self = .monthlyRenewalEveryOneHour - case "MONTHLY_RENEWAL_EVERY_THIRTY_MINUTES": self = .monthlyRenewalEveryThirtyMinutes - case "MONTHLY_RENEWAL_EVERY_THREE_MINUTES": self = .monthlyRenewalEveryThreeMinutes - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/SandboxTestersClearPurchaseHistoryRequestV2.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/SandboxTestersClearPurchaseHistoryRequestV2.generated.swift index 0838d0e8..f0c1b568 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/SandboxTestersClearPurchaseHistoryRequestV2.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/SandboxTestersClearPurchaseHistoryRequestV2.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct SandboxTestersClearPurchaseHistoryRequestV2: Hashable, Codable { +public struct SandboxTestersClearPurchaseHistoryRequestV2: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -26,7 +26,7 @@ public struct SandboxTestersClearPurchaseHistoryRequestV2: Hashable, Codable { case links } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case sandboxTestersClearPurchaseHistoryRequest } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/ScmGitReference.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/ScmGitReference.generated.swift index 925b76e0..f1468244 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/ScmGitReference.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/ScmGitReference.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct ScmGitReference: Hashable, Codable { +public struct ScmGitReference: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -36,11 +36,11 @@ public struct ScmGitReference: Hashable, Codable { case links } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case scmGitReferences } - public struct Attributes: Hashable, Codable { + public struct Attributes: Hashable, Codable, Sendable { public var canonicalName: String? public var isDeleted: Bool? @@ -69,7 +69,7 @@ public struct ScmGitReference: Hashable, Codable { } } - public struct Relationships: Hashable, Codable { + public struct Relationships: Hashable, Codable, Sendable { public var repository: Repository? public init(repository: Repository? = nil) { @@ -80,25 +80,18 @@ public struct ScmGitReference: Hashable, Codable { case repository } - public struct Repository: Hashable, Codable { + public struct Repository: Hashable, Codable, Sendable { public var data: Data? - public var links: Links? - - public init( - data: Data? = nil, - links: Links? = nil - ) { + public init(data: Data? = nil) { self.data = data - self.links = links } private enum CodingKeys: String, CodingKey { case data - case links } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -116,29 +109,10 @@ public struct ScmGitReference: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case scmRepositories } } - - public struct Links: Hashable, Codable { - public var related: URL? - - public var `self`: URL? - - public init( - related: URL? = nil, - self _self: URL? = nil - ) { - self.related = related - self.`self` = _self - } - - private enum CodingKeys: String, CodingKey { - case related - case `self` = "self" - } - } } } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/ScmProvider.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/ScmProvider.generated.swift index 2957115c..f0be10f4 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/ScmProvider.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/ScmProvider.generated.swift @@ -3,24 +3,28 @@ // swiftlint:disable all import Foundation -public struct ScmProvider: Hashable, Codable { +public struct ScmProvider: Hashable, Codable, Sendable { public var id: String public var type: `Type` public var attributes: Attributes? + public var relationships: Relationships? + public var links: ResourceLinks? public init( id: String, type: `Type`, attributes: Attributes? = nil, + relationships: Relationships? = nil, links: ResourceLinks? = nil ) { self.id = id self.type = type self.attributes = attributes + self.relationships = relationships self.links = links } @@ -28,14 +32,15 @@ public struct ScmProvider: Hashable, Codable { case id case type case attributes + case relationships case links } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case scmProviders } - public struct Attributes: Hashable, Codable { + public struct Attributes: Hashable, Codable, Sendable { public var scmProviderType: ScmProviderType? public var url: URL? @@ -53,6 +58,30 @@ public struct ScmProvider: Hashable, Codable { case url } } + + public struct Relationships: Hashable, Codable, Sendable { + public var repositories: Repositories? + + public init(repositories: Repositories? = nil) { + self.repositories = repositories + } + + private enum CodingKeys: String, CodingKey { + case repositories + } + + public struct Repositories: Hashable, Codable, Sendable { + public var links: RelationshipLinks? + + public init(links: RelationshipLinks? = nil) { + self.links = links + } + + private enum CodingKeys: String, CodingKey { + case links + } + } + } } // swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/ScmProviderType.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/ScmProviderType.generated.swift index 226c401a..dfac4194 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/ScmProviderType.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/ScmProviderType.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct ScmProviderType: Hashable, Codable { +public struct ScmProviderType: Hashable, Codable, Sendable { public var displayName: String? public var isOnPremise: Bool? @@ -26,37 +26,39 @@ public struct ScmProviderType: Hashable, Codable { case kind } - public enum Kind: Hashable, Codable, RawRepresentable { - case bitbucketCloud - case bitbucketServer - case githubCloud - case githubEnterprise - case gitlabCloud - case gitlabSelfManaged - case unknown(String) - - public var rawValue: String { - switch self { - case .bitbucketCloud: return "BITBUCKET_CLOUD" - case .bitbucketServer: return "BITBUCKET_SERVER" - case .githubCloud: return "GITHUB_CLOUD" - case .githubEnterprise: return "GITHUB_ENTERPRISE" - case .gitlabCloud: return "GITLAB_CLOUD" - case .gitlabSelfManaged: return "GITLAB_SELF_MANAGED" - case .unknown(let rawValue): return rawValue - } + public struct Kind: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var bitbucketCloud: Self { + .init(rawValue: "BITBUCKET_CLOUD") } + public static var bitbucketServer: Self { + .init(rawValue: "BITBUCKET_SERVER") + } + + public static var githubCloud: Self { + .init(rawValue: "GITHUB_CLOUD") + } + + public static var githubEnterprise: Self { + .init(rawValue: "GITHUB_ENTERPRISE") + } + + public static var gitlabCloud: Self { + .init(rawValue: "GITLAB_CLOUD") + } + + public static var gitlabSelfManaged: Self { + .init(rawValue: "GITLAB_SELF_MANAGED") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "BITBUCKET_CLOUD": self = .bitbucketCloud - case "BITBUCKET_SERVER": self = .bitbucketServer - case "GITHUB_CLOUD": self = .githubCloud - case "GITHUB_ENTERPRISE": self = .githubEnterprise - case "GITLAB_CLOUD": self = .gitlabCloud - case "GITLAB_SELF_MANAGED": self = .gitlabSelfManaged - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/ScmRepository.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/ScmRepository.generated.swift index 85967539..db03f6a9 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/ScmRepository.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/ScmRepository.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct ScmRepository: Hashable, Codable { +public struct ScmRepository: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -36,11 +36,11 @@ public struct ScmRepository: Hashable, Codable { case links } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case scmRepositories } - public struct Attributes: Hashable, Codable { + public struct Attributes: Hashable, Codable, Sendable { public var httpCloneUrl: URL? public var lastAccessedDate: String? @@ -74,43 +74,46 @@ public struct ScmRepository: Hashable, Codable { } } - public struct Relationships: Hashable, Codable { + public struct Relationships: Hashable, Codable, Sendable { public var defaultBranch: DefaultBranch? + public var gitReferences: GitReferences? + + public var pullRequests: PullRequests? + public var scmProvider: ScmProvider? public init( defaultBranch: DefaultBranch? = nil, + gitReferences: GitReferences? = nil, + pullRequests: PullRequests? = nil, scmProvider: ScmProvider? = nil ) { self.defaultBranch = defaultBranch + self.gitReferences = gitReferences + self.pullRequests = pullRequests self.scmProvider = scmProvider } private enum CodingKeys: String, CodingKey { case defaultBranch + case gitReferences + case pullRequests case scmProvider } - public struct DefaultBranch: Hashable, Codable { + public struct DefaultBranch: Hashable, Codable, Sendable { public var data: Data? - public var links: Links? - - public init( - data: Data? = nil, - links: Links? = nil - ) { + public init(data: Data? = nil) { self.data = data - self.links = links } private enum CodingKeys: String, CodingKey { case data - case links } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -128,50 +131,48 @@ public struct ScmRepository: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case scmGitReferences } } + } - public struct Links: Hashable, Codable { - public var related: URL? + public struct GitReferences: Hashable, Codable, Sendable { + public var links: RelationshipLinks? - public var `self`: URL? + public init(links: RelationshipLinks? = nil) { + self.links = links + } - public init( - related: URL? = nil, - self _self: URL? = nil - ) { - self.related = related - self.`self` = _self - } + private enum CodingKeys: String, CodingKey { + case links + } + } - private enum CodingKeys: String, CodingKey { - case related - case `self` = "self" - } + public struct PullRequests: Hashable, Codable, Sendable { + public var links: RelationshipLinks? + + public init(links: RelationshipLinks? = nil) { + self.links = links + } + + private enum CodingKeys: String, CodingKey { + case links } } - public struct ScmProvider: Hashable, Codable { + public struct ScmProvider: Hashable, Codable, Sendable { public var data: Data? - public var links: Links? - - public init( - data: Data? = nil, - links: Links? = nil - ) { + public init(data: Data? = nil) { self.data = data - self.links = links } private enum CodingKeys: String, CodingKey { case data - case links } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -189,29 +190,10 @@ public struct ScmRepository: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case scmProviders } } - - public struct Links: Hashable, Codable { - public var related: URL? - - public var `self`: URL? - - public init( - related: URL? = nil, - self _self: URL? = nil - ) { - self.related = related - self.`self` = _self - } - - private enum CodingKeys: String, CodingKey { - case related - case `self` = "self" - } - } } } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/ScreenshotDisplayType.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/ScreenshotDisplayType.generated.swift index dbebcdb7..b29729f0 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/ScreenshotDisplayType.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/ScreenshotDisplayType.generated.swift @@ -3,112 +3,147 @@ // swiftlint:disable all import Foundation -public enum ScreenshotDisplayType: Hashable, Codable, RawRepresentable { - case appAppleTv - case appDesktop - case appIpad105 - case appIpad97 - case appIpadPro129 - case appIpadPro3Gen11 - case appIpadPro3Gen129 - case appIphone35 - case appIphone40 - case appIphone47 - case appIphone55 - case appIphone58 - case appIphone61 - case appIphone65 - case appIphone67 - case appWatchSeries3 - case appWatchSeries4 - case appWatchSeries7 - case appWatchUltra - case imessageAppIpad105 - case imessageAppIpad97 - case imessageAppIpadPro129 - case imessageAppIpadPro3Gen11 - case imessageAppIpadPro3Gen129 - case imessageAppIphone40 - case imessageAppIphone47 - case imessageAppIphone55 - case imessageAppIphone58 - case imessageAppIphone61 - case imessageAppIphone65 - case imessageAppIphone67 - case unknown(String) - - public var rawValue: String { - switch self { - case .appAppleTv: return "APP_APPLE_TV" - case .appDesktop: return "APP_DESKTOP" - case .appIpad105: return "APP_IPAD_105" - case .appIpad97: return "APP_IPAD_97" - case .appIpadPro129: return "APP_IPAD_PRO_129" - case .appIpadPro3Gen11: return "APP_IPAD_PRO_3GEN_11" - case .appIpadPro3Gen129: return "APP_IPAD_PRO_3GEN_129" - case .appIphone35: return "APP_IPHONE_35" - case .appIphone40: return "APP_IPHONE_40" - case .appIphone47: return "APP_IPHONE_47" - case .appIphone55: return "APP_IPHONE_55" - case .appIphone58: return "APP_IPHONE_58" - case .appIphone61: return "APP_IPHONE_61" - case .appIphone65: return "APP_IPHONE_65" - case .appIphone67: return "APP_IPHONE_67" - case .appWatchSeries3: return "APP_WATCH_SERIES_3" - case .appWatchSeries4: return "APP_WATCH_SERIES_4" - case .appWatchSeries7: return "APP_WATCH_SERIES_7" - case .appWatchUltra: return "APP_WATCH_ULTRA" - case .imessageAppIpad105: return "IMESSAGE_APP_IPAD_105" - case .imessageAppIpad97: return "IMESSAGE_APP_IPAD_97" - case .imessageAppIpadPro129: return "IMESSAGE_APP_IPAD_PRO_129" - case .imessageAppIpadPro3Gen11: return "IMESSAGE_APP_IPAD_PRO_3GEN_11" - case .imessageAppIpadPro3Gen129: return "IMESSAGE_APP_IPAD_PRO_3GEN_129" - case .imessageAppIphone40: return "IMESSAGE_APP_IPHONE_40" - case .imessageAppIphone47: return "IMESSAGE_APP_IPHONE_47" - case .imessageAppIphone55: return "IMESSAGE_APP_IPHONE_55" - case .imessageAppIphone58: return "IMESSAGE_APP_IPHONE_58" - case .imessageAppIphone61: return "IMESSAGE_APP_IPHONE_61" - case .imessageAppIphone65: return "IMESSAGE_APP_IPHONE_65" - case .imessageAppIphone67: return "IMESSAGE_APP_IPHONE_67" - case .unknown(let rawValue): return rawValue - } +public struct ScreenshotDisplayType: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var appAppleTv: Self { + .init(rawValue: "APP_APPLE_TV") } + public static var appAppleVisionPro: Self { + .init(rawValue: "APP_APPLE_VISION_PRO") + } + + public static var appDesktop: Self { + .init(rawValue: "APP_DESKTOP") + } + + public static var appIpad105: Self { + .init(rawValue: "APP_IPAD_105") + } + + public static var appIpad97: Self { + .init(rawValue: "APP_IPAD_97") + } + + public static var appIpadPro129: Self { + .init(rawValue: "APP_IPAD_PRO_129") + } + + public static var appIpadPro3Gen11: Self { + .init(rawValue: "APP_IPAD_PRO_3GEN_11") + } + + public static var appIpadPro3Gen129: Self { + .init(rawValue: "APP_IPAD_PRO_3GEN_129") + } + + public static var appIphone35: Self { + .init(rawValue: "APP_IPHONE_35") + } + + public static var appIphone40: Self { + .init(rawValue: "APP_IPHONE_40") + } + + public static var appIphone47: Self { + .init(rawValue: "APP_IPHONE_47") + } + + public static var appIphone55: Self { + .init(rawValue: "APP_IPHONE_55") + } + + public static var appIphone58: Self { + .init(rawValue: "APP_IPHONE_58") + } + + public static var appIphone61: Self { + .init(rawValue: "APP_IPHONE_61") + } + + public static var appIphone65: Self { + .init(rawValue: "APP_IPHONE_65") + } + + public static var appIphone67: Self { + .init(rawValue: "APP_IPHONE_67") + } + + public static var appWatchSeries10: Self { + .init(rawValue: "APP_WATCH_SERIES_10") + } + + public static var appWatchSeries3: Self { + .init(rawValue: "APP_WATCH_SERIES_3") + } + + public static var appWatchSeries4: Self { + .init(rawValue: "APP_WATCH_SERIES_4") + } + + public static var appWatchSeries7: Self { + .init(rawValue: "APP_WATCH_SERIES_7") + } + + public static var appWatchUltra: Self { + .init(rawValue: "APP_WATCH_ULTRA") + } + + public static var imessageAppIpad105: Self { + .init(rawValue: "IMESSAGE_APP_IPAD_105") + } + + public static var imessageAppIpad97: Self { + .init(rawValue: "IMESSAGE_APP_IPAD_97") + } + + public static var imessageAppIpadPro129: Self { + .init(rawValue: "IMESSAGE_APP_IPAD_PRO_129") + } + + public static var imessageAppIpadPro3Gen11: Self { + .init(rawValue: "IMESSAGE_APP_IPAD_PRO_3GEN_11") + } + + public static var imessageAppIpadPro3Gen129: Self { + .init(rawValue: "IMESSAGE_APP_IPAD_PRO_3GEN_129") + } + + public static var imessageAppIphone40: Self { + .init(rawValue: "IMESSAGE_APP_IPHONE_40") + } + + public static var imessageAppIphone47: Self { + .init(rawValue: "IMESSAGE_APP_IPHONE_47") + } + + public static var imessageAppIphone55: Self { + .init(rawValue: "IMESSAGE_APP_IPHONE_55") + } + + public static var imessageAppIphone58: Self { + .init(rawValue: "IMESSAGE_APP_IPHONE_58") + } + + public static var imessageAppIphone61: Self { + .init(rawValue: "IMESSAGE_APP_IPHONE_61") + } + + public static var imessageAppIphone65: Self { + .init(rawValue: "IMESSAGE_APP_IPHONE_65") + } + + public static var imessageAppIphone67: Self { + .init(rawValue: "IMESSAGE_APP_IPHONE_67") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "APP_APPLE_TV": self = .appAppleTv - case "APP_DESKTOP": self = .appDesktop - case "APP_IPAD_105": self = .appIpad105 - case "APP_IPAD_97": self = .appIpad97 - case "APP_IPAD_PRO_129": self = .appIpadPro129 - case "APP_IPAD_PRO_3GEN_11": self = .appIpadPro3Gen11 - case "APP_IPAD_PRO_3GEN_129": self = .appIpadPro3Gen129 - case "APP_IPHONE_35": self = .appIphone35 - case "APP_IPHONE_40": self = .appIphone40 - case "APP_IPHONE_47": self = .appIphone47 - case "APP_IPHONE_55": self = .appIphone55 - case "APP_IPHONE_58": self = .appIphone58 - case "APP_IPHONE_61": self = .appIphone61 - case "APP_IPHONE_65": self = .appIphone65 - case "APP_IPHONE_67": self = .appIphone67 - case "APP_WATCH_SERIES_3": self = .appWatchSeries3 - case "APP_WATCH_SERIES_4": self = .appWatchSeries4 - case "APP_WATCH_SERIES_7": self = .appWatchSeries7 - case "APP_WATCH_ULTRA": self = .appWatchUltra - case "IMESSAGE_APP_IPAD_105": self = .imessageAppIpad105 - case "IMESSAGE_APP_IPAD_97": self = .imessageAppIpad97 - case "IMESSAGE_APP_IPAD_PRO_129": self = .imessageAppIpadPro129 - case "IMESSAGE_APP_IPAD_PRO_3GEN_11": self = .imessageAppIpadPro3Gen11 - case "IMESSAGE_APP_IPAD_PRO_3GEN_129": self = .imessageAppIpadPro3Gen129 - case "IMESSAGE_APP_IPHONE_40": self = .imessageAppIphone40 - case "IMESSAGE_APP_IPHONE_47": self = .imessageAppIphone47 - case "IMESSAGE_APP_IPHONE_55": self = .imessageAppIphone55 - case "IMESSAGE_APP_IPHONE_58": self = .imessageAppIphone58 - case "IMESSAGE_APP_IPHONE_61": self = .imessageAppIphone61 - case "IMESSAGE_APP_IPHONE_65": self = .imessageAppIphone65 - case "IMESSAGE_APP_IPHONE_67": self = .imessageAppIphone67 - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Subscription.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Subscription.generated.swift index ec248662..333c0f8e 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Subscription.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Subscription.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct Subscription: Hashable, Codable { +public struct Subscription: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -36,14 +36,11 @@ public struct Subscription: Hashable, Codable { case links } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case subscriptions } - public struct Attributes: Hashable, Codable { - @available(*, deprecated) - public var availableInAllTerritories: Bool? - + public struct Attributes: Hashable, Codable, Sendable { public var familySharable: Bool? public var groupLevel: Int? @@ -59,7 +56,6 @@ public struct Subscription: Hashable, Codable { public var subscriptionPeriod: SubscriptionPeriod? public init( - availableInAllTerritories: Bool? = nil, familySharable: Bool? = nil, groupLevel: Int? = nil, name: String? = nil, @@ -68,7 +64,6 @@ public struct Subscription: Hashable, Codable { state: State? = nil, subscriptionPeriod: SubscriptionPeriod? = nil ) { - self.availableInAllTerritories = availableInAllTerritories self.familySharable = familySharable self.groupLevel = groupLevel self.name = name @@ -79,7 +74,6 @@ public struct Subscription: Hashable, Codable { } private enum CodingKeys: String, CodingKey { - case availableInAllTerritories case familySharable case groupLevel case name @@ -89,96 +83,108 @@ public struct Subscription: Hashable, Codable { case subscriptionPeriod } - public enum State: Hashable, Codable, RawRepresentable { - case approved - case developerActionNeeded - case developerRemovedFromSale - case inReview - case missingMetadata - case pendingBinaryApproval - case readyToSubmit - case rejected - case removedFromSale - case waitingForReview - case unknown(String) - - public var rawValue: String { - switch self { - case .approved: return "APPROVED" - case .developerActionNeeded: return "DEVELOPER_ACTION_NEEDED" - case .developerRemovedFromSale: return "DEVELOPER_REMOVED_FROM_SALE" - case .inReview: return "IN_REVIEW" - case .missingMetadata: return "MISSING_METADATA" - case .pendingBinaryApproval: return "PENDING_BINARY_APPROVAL" - case .readyToSubmit: return "READY_TO_SUBMIT" - case .rejected: return "REJECTED" - case .removedFromSale: return "REMOVED_FROM_SALE" - case .waitingForReview: return "WAITING_FOR_REVIEW" - case .unknown(let rawValue): return rawValue - } + public struct State: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var approved: Self { + .init(rawValue: "APPROVED") + } + + public static var developerActionNeeded: Self { + .init(rawValue: "DEVELOPER_ACTION_NEEDED") + } + + public static var developerRemovedFromSale: Self { + .init(rawValue: "DEVELOPER_REMOVED_FROM_SALE") + } + + public static var inReview: Self { + .init(rawValue: "IN_REVIEW") + } + + public static var missingMetadata: Self { + .init(rawValue: "MISSING_METADATA") + } + + public static var pendingBinaryApproval: Self { + .init(rawValue: "PENDING_BINARY_APPROVAL") + } + + public static var readyToSubmit: Self { + .init(rawValue: "READY_TO_SUBMIT") + } + + public static var rejected: Self { + .init(rawValue: "REJECTED") + } + + public static var removedFromSale: Self { + .init(rawValue: "REMOVED_FROM_SALE") + } + + public static var waitingForReview: Self { + .init(rawValue: "WAITING_FOR_REVIEW") + } + + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "APPROVED": self = .approved - case "DEVELOPER_ACTION_NEEDED": self = .developerActionNeeded - case "DEVELOPER_REMOVED_FROM_SALE": self = .developerRemovedFromSale - case "IN_REVIEW": self = .inReview - case "MISSING_METADATA": self = .missingMetadata - case "PENDING_BINARY_APPROVAL": self = .pendingBinaryApproval - case "READY_TO_SUBMIT": self = .readyToSubmit - case "REJECTED": self = .rejected - case "REMOVED_FROM_SALE": self = .removedFromSale - case "WAITING_FOR_REVIEW": self = .waitingForReview - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } - public enum SubscriptionPeriod: Hashable, Codable, RawRepresentable { - case oneMonth - case oneWeek - case oneYear - case sixMonths - case threeMonths - case twoMonths - case unknown(String) + public struct SubscriptionPeriod: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var oneMonth: Self { + .init(rawValue: "ONE_MONTH") + } + + public static var oneWeek: Self { + .init(rawValue: "ONE_WEEK") + } - public var rawValue: String { - switch self { - case .oneMonth: return "ONE_MONTH" - case .oneWeek: return "ONE_WEEK" - case .oneYear: return "ONE_YEAR" - case .sixMonths: return "SIX_MONTHS" - case .threeMonths: return "THREE_MONTHS" - case .twoMonths: return "TWO_MONTHS" - case .unknown(let rawValue): return rawValue - } + public static var oneYear: Self { + .init(rawValue: "ONE_YEAR") + } + + public static var sixMonths: Self { + .init(rawValue: "SIX_MONTHS") + } + + public static var threeMonths: Self { + .init(rawValue: "THREE_MONTHS") + } + + public static var twoMonths: Self { + .init(rawValue: "TWO_MONTHS") + } + + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "ONE_MONTH": self = .oneMonth - case "ONE_WEEK": self = .oneWeek - case "ONE_YEAR": self = .oneYear - case "SIX_MONTHS": self = .sixMonths - case "THREE_MONTHS": self = .threeMonths - case "TWO_MONTHS": self = .twoMonths - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } } - public struct Relationships: Hashable, Codable { + public struct Relationships: Hashable, Codable, Sendable { public var appStoreReviewScreenshot: AppStoreReviewScreenshot? public var group: Group? + public var images: Images? + public var introductoryOffers: IntroductoryOffers? public var offerCodes: OfferCodes? + public var pricePoints: PricePoints? + public var prices: Prices? public var promotedPurchase: PromotedPurchase? @@ -189,48 +195,59 @@ public struct Subscription: Hashable, Codable { public var subscriptionLocalizations: SubscriptionLocalizations? + public var winBackOffers: WinBackOffers? + public init( appStoreReviewScreenshot: AppStoreReviewScreenshot? = nil, group: Group? = nil, + images: Images? = nil, introductoryOffers: IntroductoryOffers? = nil, offerCodes: OfferCodes? = nil, + pricePoints: PricePoints? = nil, prices: Prices? = nil, promotedPurchase: PromotedPurchase? = nil, promotionalOffers: PromotionalOffers? = nil, subscriptionAvailability: SubscriptionAvailability? = nil, - subscriptionLocalizations: SubscriptionLocalizations? = nil + subscriptionLocalizations: SubscriptionLocalizations? = nil, + winBackOffers: WinBackOffers? = nil ) { self.appStoreReviewScreenshot = appStoreReviewScreenshot self.group = group + self.images = images self.introductoryOffers = introductoryOffers self.offerCodes = offerCodes + self.pricePoints = pricePoints self.prices = prices self.promotedPurchase = promotedPurchase self.promotionalOffers = promotionalOffers self.subscriptionAvailability = subscriptionAvailability self.subscriptionLocalizations = subscriptionLocalizations + self.winBackOffers = winBackOffers } private enum CodingKeys: String, CodingKey { case appStoreReviewScreenshot case group + case images case introductoryOffers case offerCodes + case pricePoints case prices case promotedPurchase case promotionalOffers case subscriptionAvailability case subscriptionLocalizations + case winBackOffers } - public struct AppStoreReviewScreenshot: Hashable, Codable { + public struct AppStoreReviewScreenshot: Hashable, Codable, Sendable { public var data: Data? - public var links: Links? + public var links: RelationshipLinks? public init( data: Data? = nil, - links: Links? = nil + links: RelationshipLinks? = nil ) { self.data = data self.links = links @@ -241,7 +258,7 @@ public struct Subscription: Hashable, Codable { case links } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -259,50 +276,71 @@ public struct Subscription: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case subscriptionAppStoreReviewScreenshots } } + } - public struct Links: Hashable, Codable { - public var related: URL? + public struct Group: Hashable, Codable, Sendable { + public var data: Data? - public var `self`: URL? + public init(data: Data? = nil) { + self.data = data + } + + private enum CodingKeys: String, CodingKey { + case data + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` public init( - related: URL? = nil, - self _self: URL? = nil + id: String, + type: `Type` ) { - self.related = related - self.`self` = _self + self.id = id + self.type = type } private enum CodingKeys: String, CodingKey { - case related - case `self` = "self" + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case subscriptionGroups } } } - public struct Group: Hashable, Codable { - public var data: Data? + public struct Images: Hashable, Codable, Sendable { + public var data: [Data]? - public var links: Links? + public var links: RelationshipLinks? + + public var meta: PagingInformation? public init( - data: Data? = nil, - links: Links? = nil + data: [Data]? = nil, + links: RelationshipLinks? = nil, + meta: PagingInformation? = nil ) { self.data = data self.links = links + self.meta = meta } private enum CodingKeys: String, CodingKey { case data case links + case meta } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -320,41 +358,22 @@ public struct Subscription: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { - case subscriptionGroups - } - } - - public struct Links: Hashable, Codable { - public var related: URL? - - public var `self`: URL? - - public init( - related: URL? = nil, - self _self: URL? = nil - ) { - self.related = related - self.`self` = _self - } - - private enum CodingKeys: String, CodingKey { - case related - case `self` = "self" + public enum `Type`: String, Hashable, Codable, Sendable { + case subscriptionImages } } } - public struct IntroductoryOffers: Hashable, Codable { + public struct IntroductoryOffers: Hashable, Codable, Sendable { public var data: [Data]? - public var links: Links? + public var links: RelationshipLinks? public var meta: PagingInformation? public init( data: [Data]? = nil, - links: Links? = nil, + links: RelationshipLinks? = nil, meta: PagingInformation? = nil ) { self.data = data @@ -368,7 +387,7 @@ public struct Subscription: Hashable, Codable { case meta } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -386,41 +405,22 @@ public struct Subscription: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case subscriptionIntroductoryOffers } } - - public struct Links: Hashable, Codable { - public var related: URL? - - public var `self`: URL? - - public init( - related: URL? = nil, - self _self: URL? = nil - ) { - self.related = related - self.`self` = _self - } - - private enum CodingKeys: String, CodingKey { - case related - case `self` = "self" - } - } } - public struct OfferCodes: Hashable, Codable { + public struct OfferCodes: Hashable, Codable, Sendable { public var data: [Data]? - public var links: Links? + public var links: RelationshipLinks? public var meta: PagingInformation? public init( data: [Data]? = nil, - links: Links? = nil, + links: RelationshipLinks? = nil, meta: PagingInformation? = nil ) { self.data = data @@ -434,7 +434,7 @@ public struct Subscription: Hashable, Codable { case meta } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -452,41 +452,34 @@ public struct Subscription: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case subscriptionOfferCodes } } + } - public struct Links: Hashable, Codable { - public var related: URL? - - public var `self`: URL? + public struct PricePoints: Hashable, Codable, Sendable { + public var links: RelationshipLinks? - public init( - related: URL? = nil, - self _self: URL? = nil - ) { - self.related = related - self.`self` = _self - } + public init(links: RelationshipLinks? = nil) { + self.links = links + } - private enum CodingKeys: String, CodingKey { - case related - case `self` = "self" - } + private enum CodingKeys: String, CodingKey { + case links } } - public struct Prices: Hashable, Codable { + public struct Prices: Hashable, Codable, Sendable { public var data: [Data]? - public var links: Links? + public var links: RelationshipLinks? public var meta: PagingInformation? public init( data: [Data]? = nil, - links: Links? = nil, + links: RelationshipLinks? = nil, meta: PagingInformation? = nil ) { self.data = data @@ -500,7 +493,7 @@ public struct Subscription: Hashable, Codable { case meta } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -518,39 +511,20 @@ public struct Subscription: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case subscriptionPrices } } - - public struct Links: Hashable, Codable { - public var related: URL? - - public var `self`: URL? - - public init( - related: URL? = nil, - self _self: URL? = nil - ) { - self.related = related - self.`self` = _self - } - - private enum CodingKeys: String, CodingKey { - case related - case `self` = "self" - } - } } - public struct PromotedPurchase: Hashable, Codable { + public struct PromotedPurchase: Hashable, Codable, Sendable { public var data: Data? - public var links: Links? + public var links: RelationshipLinks? public init( data: Data? = nil, - links: Links? = nil + links: RelationshipLinks? = nil ) { self.data = data self.links = links @@ -561,7 +535,7 @@ public struct Subscription: Hashable, Codable { case links } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -579,41 +553,22 @@ public struct Subscription: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case promotedPurchases } } - - public struct Links: Hashable, Codable { - public var related: URL? - - public var `self`: URL? - - public init( - related: URL? = nil, - self _self: URL? = nil - ) { - self.related = related - self.`self` = _self - } - - private enum CodingKeys: String, CodingKey { - case related - case `self` = "self" - } - } } - public struct PromotionalOffers: Hashable, Codable { + public struct PromotionalOffers: Hashable, Codable, Sendable { public var data: [Data]? - public var links: Links? + public var links: RelationshipLinks? public var meta: PagingInformation? public init( data: [Data]? = nil, - links: Links? = nil, + links: RelationshipLinks? = nil, meta: PagingInformation? = nil ) { self.data = data @@ -627,7 +582,7 @@ public struct Subscription: Hashable, Codable { case meta } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -645,39 +600,20 @@ public struct Subscription: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case subscriptionPromotionalOffers } } - - public struct Links: Hashable, Codable { - public var related: URL? - - public var `self`: URL? - - public init( - related: URL? = nil, - self _self: URL? = nil - ) { - self.related = related - self.`self` = _self - } - - private enum CodingKeys: String, CodingKey { - case related - case `self` = "self" - } - } } - public struct SubscriptionAvailability: Hashable, Codable { + public struct SubscriptionAvailability: Hashable, Codable, Sendable { public var data: Data? - public var links: Links? + public var links: RelationshipLinks? public init( data: Data? = nil, - links: Links? = nil + links: RelationshipLinks? = nil ) { self.data = data self.links = links @@ -688,7 +624,7 @@ public struct Subscription: Hashable, Codable { case links } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -706,41 +642,22 @@ public struct Subscription: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case subscriptionAvailabilities } } - - public struct Links: Hashable, Codable { - public var related: URL? - - public var `self`: URL? - - public init( - related: URL? = nil, - self _self: URL? = nil - ) { - self.related = related - self.`self` = _self - } - - private enum CodingKeys: String, CodingKey { - case related - case `self` = "self" - } - } } - public struct SubscriptionLocalizations: Hashable, Codable { + public struct SubscriptionLocalizations: Hashable, Codable, Sendable { public var data: [Data]? - public var links: Links? + public var links: RelationshipLinks? public var meta: PagingInformation? public init( data: [Data]? = nil, - links: Links? = nil, + links: RelationshipLinks? = nil, meta: PagingInformation? = nil ) { self.data = data @@ -754,7 +671,7 @@ public struct Subscription: Hashable, Codable { case meta } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -772,27 +689,55 @@ public struct Subscription: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case subscriptionLocalizations } } + } + + public struct WinBackOffers: Hashable, Codable, Sendable { + public var data: [Data]? - public struct Links: Hashable, Codable { - public var related: URL? + public var links: RelationshipLinks? - public var `self`: URL? + public var meta: PagingInformation? + + public init( + data: [Data]? = nil, + links: RelationshipLinks? = nil, + meta: PagingInformation? = nil + ) { + self.data = data + self.links = links + self.meta = meta + } + + private enum CodingKeys: String, CodingKey { + case data + case links + case meta + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` public init( - related: URL? = nil, - self _self: URL? = nil + id: String, + type: `Type` ) { - self.related = related - self.`self` = _self + self.id = id + self.type = type } private enum CodingKeys: String, CodingKey { - case related - case `self` = "self" + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case winBackOffers } } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/SubscriptionAppStoreReviewScreenshot.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/SubscriptionAppStoreReviewScreenshot.generated.swift index a6ef0979..6de8072e 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/SubscriptionAppStoreReviewScreenshot.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/SubscriptionAppStoreReviewScreenshot.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct SubscriptionAppStoreReviewScreenshot: Hashable, Codable { +public struct SubscriptionAppStoreReviewScreenshot: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -36,11 +36,11 @@ public struct SubscriptionAppStoreReviewScreenshot: Hashable, Codable { case links } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case subscriptionAppStoreReviewScreenshots } - public struct Attributes: Hashable, Codable { + public struct Attributes: Hashable, Codable, Sendable { public var assetDeliveryState: AppMediaAssetState? public var assetToken: String? @@ -89,7 +89,7 @@ public struct SubscriptionAppStoreReviewScreenshot: Hashable, Codable { } } - public struct Relationships: Hashable, Codable { + public struct Relationships: Hashable, Codable, Sendable { public var subscription: Subscription? public init(subscription: Subscription? = nil) { @@ -100,25 +100,18 @@ public struct SubscriptionAppStoreReviewScreenshot: Hashable, Codable { case subscription } - public struct Subscription: Hashable, Codable { + public struct Subscription: Hashable, Codable, Sendable { public var data: Data? - public var links: Links? - - public init( - data: Data? = nil, - links: Links? = nil - ) { + public init(data: Data? = nil) { self.data = data - self.links = links } private enum CodingKeys: String, CodingKey { case data - case links } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -136,29 +129,10 @@ public struct SubscriptionAppStoreReviewScreenshot: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case subscriptions } } - - public struct Links: Hashable, Codable { - public var related: URL? - - public var `self`: URL? - - public init( - related: URL? = nil, - self _self: URL? = nil - ) { - self.related = related - self.`self` = _self - } - - private enum CodingKeys: String, CodingKey { - case related - case `self` = "self" - } - } } } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/SubscriptionAvailability.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/SubscriptionAvailability.generated.swift index 3f4f751d..c78f5ff6 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/SubscriptionAvailability.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/SubscriptionAvailability.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct SubscriptionAvailability: Hashable, Codable { +public struct SubscriptionAvailability: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -36,11 +36,11 @@ public struct SubscriptionAvailability: Hashable, Codable { case links } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case subscriptionAvailabilities } - public struct Attributes: Hashable, Codable { + public struct Attributes: Hashable, Codable, Sendable { public var availableInNewTerritories: Bool? public init(availableInNewTerritories: Bool? = nil) { @@ -52,34 +52,27 @@ public struct SubscriptionAvailability: Hashable, Codable { } } - public struct Relationships: Hashable, Codable { + public struct Relationships: Hashable, Codable, Sendable { public var availableTerritories: AvailableTerritories? - public var subscription: Subscription? - - public init( - availableTerritories: AvailableTerritories? = nil, - subscription: Subscription? = nil - ) { + public init(availableTerritories: AvailableTerritories? = nil) { self.availableTerritories = availableTerritories - self.subscription = subscription } private enum CodingKeys: String, CodingKey { case availableTerritories - case subscription } - public struct AvailableTerritories: Hashable, Codable { + public struct AvailableTerritories: Hashable, Codable, Sendable { public var data: [Data]? - public var links: Links? + public var links: RelationshipLinks? public var meta: PagingInformation? public init( data: [Data]? = nil, - links: Links? = nil, + links: RelationshipLinks? = nil, meta: PagingInformation? = nil ) { self.data = data @@ -93,7 +86,7 @@ public struct SubscriptionAvailability: Hashable, Codable { case meta } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -111,90 +104,10 @@ public struct SubscriptionAvailability: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case territories } } - - public struct Links: Hashable, Codable { - public var related: URL? - - public var `self`: URL? - - public init( - related: URL? = nil, - self _self: URL? = nil - ) { - self.related = related - self.`self` = _self - } - - private enum CodingKeys: String, CodingKey { - case related - case `self` = "self" - } - } - } - - public struct Subscription: Hashable, Codable { - public var data: Data? - - public var links: Links? - - public init( - data: Data? = nil, - links: Links? = nil - ) { - self.data = data - self.links = links - } - - private enum CodingKeys: String, CodingKey { - case data - case links - } - - public struct Data: Hashable, Codable { - public var id: String - - public var type: `Type` - - public init( - id: String, - type: `Type` - ) { - self.id = id - self.type = type - } - - private enum CodingKeys: String, CodingKey { - case id - case type - } - - public enum `Type`: String, Hashable, Codable { - case subscriptions - } - } - - public struct Links: Hashable, Codable { - public var related: URL? - - public var `self`: URL? - - public init( - related: URL? = nil, - self _self: URL? = nil - ) { - self.related = related - self.`self` = _self - } - - private enum CodingKeys: String, CodingKey { - case related - case `self` = "self" - } - } } } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/SubscriptionCustomerEligibility.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/SubscriptionCustomerEligibility.generated.swift index 87b64d45..6f594feb 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/SubscriptionCustomerEligibility.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/SubscriptionCustomerEligibility.generated.swift @@ -3,28 +3,27 @@ // swiftlint:disable all import Foundation -public enum SubscriptionCustomerEligibility: Hashable, Codable, RawRepresentable { - case existing - case expired - case new - case unknown(String) - - public var rawValue: String { - switch self { - case .existing: return "EXISTING" - case .expired: return "EXPIRED" - case .new: return "NEW" - case .unknown(let rawValue): return rawValue - } +public struct SubscriptionCustomerEligibility: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var existing: Self { + .init(rawValue: "EXISTING") } + public static var expired: Self { + .init(rawValue: "EXPIRED") + } + + public static var new: Self { + .init(rawValue: "NEW") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "EXISTING": self = .existing - case "EXPIRED": self = .expired - case "NEW": self = .new - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/SubscriptionGracePeriod.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/SubscriptionGracePeriod.generated.swift index 71d2dc39..8e232da7 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/SubscriptionGracePeriod.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/SubscriptionGracePeriod.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct SubscriptionGracePeriod: Hashable, Codable { +public struct SubscriptionGracePeriod: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -31,11 +31,11 @@ public struct SubscriptionGracePeriod: Hashable, Codable { case links } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case subscriptionGracePeriods } - public struct Attributes: Hashable, Codable { + public struct Attributes: Hashable, Codable, Sendable { public var duration: SubscriptionGracePeriodDuration? public var optIn: Bool? @@ -63,25 +63,23 @@ public struct SubscriptionGracePeriod: Hashable, Codable { case sandboxOptIn } - public enum RenewalType: Hashable, Codable, RawRepresentable { - case allRenewals - case paidToPaidOnly - case unknown(String) - - public var rawValue: String { - switch self { - case .allRenewals: return "ALL_RENEWALS" - case .paidToPaidOnly: return "PAID_TO_PAID_ONLY" - case .unknown(let rawValue): return rawValue - } + public struct RenewalType: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var allRenewals: Self { + .init(rawValue: "ALL_RENEWALS") } + public static var paidToPaidOnly: Self { + .init(rawValue: "PAID_TO_PAID_ONLY") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "ALL_RENEWALS": self = .allRenewals - case "PAID_TO_PAID_ONLY": self = .paidToPaidOnly - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/SubscriptionGracePeriodDuration.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/SubscriptionGracePeriodDuration.generated.swift index eaf03404..e8cc6637 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/SubscriptionGracePeriodDuration.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/SubscriptionGracePeriodDuration.generated.swift @@ -3,28 +3,27 @@ // swiftlint:disable all import Foundation -public enum SubscriptionGracePeriodDuration: Hashable, Codable, RawRepresentable { - case sixteenDays - case threeDays - case twentyEightDays - case unknown(String) - - public var rawValue: String { - switch self { - case .sixteenDays: return "SIXTEEN_DAYS" - case .threeDays: return "THREE_DAYS" - case .twentyEightDays: return "TWENTY_EIGHT_DAYS" - case .unknown(let rawValue): return rawValue - } +public struct SubscriptionGracePeriodDuration: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var sixteenDays: Self { + .init(rawValue: "SIXTEEN_DAYS") } + public static var threeDays: Self { + .init(rawValue: "THREE_DAYS") + } + + public static var twentyEightDays: Self { + .init(rawValue: "TWENTY_EIGHT_DAYS") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "SIXTEEN_DAYS": self = .sixteenDays - case "THREE_DAYS": self = .threeDays - case "TWENTY_EIGHT_DAYS": self = .twentyEightDays - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/SubscriptionGroup.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/SubscriptionGroup.generated.swift index 8fff8f26..cb207db8 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/SubscriptionGroup.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/SubscriptionGroup.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct SubscriptionGroup: Hashable, Codable { +public struct SubscriptionGroup: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -36,11 +36,11 @@ public struct SubscriptionGroup: Hashable, Codable { case links } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case subscriptionGroups } - public struct Attributes: Hashable, Codable { + public struct Attributes: Hashable, Codable, Sendable { public var referenceName: String? public init(referenceName: String? = nil) { @@ -52,7 +52,7 @@ public struct SubscriptionGroup: Hashable, Codable { } } - public struct Relationships: Hashable, Codable { + public struct Relationships: Hashable, Codable, Sendable { public var subscriptionGroupLocalizations: SubscriptionGroupLocalizations? public var subscriptions: Subscriptions? @@ -70,16 +70,16 @@ public struct SubscriptionGroup: Hashable, Codable { case subscriptions } - public struct SubscriptionGroupLocalizations: Hashable, Codable { + public struct SubscriptionGroupLocalizations: Hashable, Codable, Sendable { public var data: [Data]? - public var links: Links? + public var links: RelationshipLinks? public var meta: PagingInformation? public init( data: [Data]? = nil, - links: Links? = nil, + links: RelationshipLinks? = nil, meta: PagingInformation? = nil ) { self.data = data @@ -93,7 +93,7 @@ public struct SubscriptionGroup: Hashable, Codable { case meta } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -111,41 +111,22 @@ public struct SubscriptionGroup: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case subscriptionGroupLocalizations } } - - public struct Links: Hashable, Codable { - public var related: URL? - - public var `self`: URL? - - public init( - related: URL? = nil, - self _self: URL? = nil - ) { - self.related = related - self.`self` = _self - } - - private enum CodingKeys: String, CodingKey { - case related - case `self` = "self" - } - } } - public struct Subscriptions: Hashable, Codable { + public struct Subscriptions: Hashable, Codable, Sendable { public var data: [Data]? - public var links: Links? + public var links: RelationshipLinks? public var meta: PagingInformation? public init( data: [Data]? = nil, - links: Links? = nil, + links: RelationshipLinks? = nil, meta: PagingInformation? = nil ) { self.data = data @@ -159,7 +140,7 @@ public struct SubscriptionGroup: Hashable, Codable { case meta } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -177,29 +158,10 @@ public struct SubscriptionGroup: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case subscriptions } } - - public struct Links: Hashable, Codable { - public var related: URL? - - public var `self`: URL? - - public init( - related: URL? = nil, - self _self: URL? = nil - ) { - self.related = related - self.`self` = _self - } - - private enum CodingKeys: String, CodingKey { - case related - case `self` = "self" - } - } } } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/SubscriptionGroupLocalization.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/SubscriptionGroupLocalization.generated.swift index 4f2e01a7..0aa59312 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/SubscriptionGroupLocalization.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/SubscriptionGroupLocalization.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct SubscriptionGroupLocalization: Hashable, Codable { +public struct SubscriptionGroupLocalization: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -36,11 +36,11 @@ public struct SubscriptionGroupLocalization: Hashable, Codable { case links } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case subscriptionGroupLocalizations } - public struct Attributes: Hashable, Codable { + public struct Attributes: Hashable, Codable, Sendable { public var customAppName: String? public var locale: String? @@ -68,36 +68,36 @@ public struct SubscriptionGroupLocalization: Hashable, Codable { case state } - public enum State: Hashable, Codable, RawRepresentable { - case approved - case prepareForSubmission - case rejected - case waitingForReview - case unknown(String) - - public var rawValue: String { - switch self { - case .approved: return "APPROVED" - case .prepareForSubmission: return "PREPARE_FOR_SUBMISSION" - case .rejected: return "REJECTED" - case .waitingForReview: return "WAITING_FOR_REVIEW" - case .unknown(let rawValue): return rawValue - } + public struct State: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var approved: Self { + .init(rawValue: "APPROVED") + } + + public static var prepareForSubmission: Self { + .init(rawValue: "PREPARE_FOR_SUBMISSION") } + public static var rejected: Self { + .init(rawValue: "REJECTED") + } + + public static var waitingForReview: Self { + .init(rawValue: "WAITING_FOR_REVIEW") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "APPROVED": self = .approved - case "PREPARE_FOR_SUBMISSION": self = .prepareForSubmission - case "REJECTED": self = .rejected - case "WAITING_FOR_REVIEW": self = .waitingForReview - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } } - public struct Relationships: Hashable, Codable { + public struct Relationships: Hashable, Codable, Sendable { public var subscriptionGroup: SubscriptionGroup? public init(subscriptionGroup: SubscriptionGroup? = nil) { @@ -108,25 +108,18 @@ public struct SubscriptionGroupLocalization: Hashable, Codable { case subscriptionGroup } - public struct SubscriptionGroup: Hashable, Codable { + public struct SubscriptionGroup: Hashable, Codable, Sendable { public var data: Data? - public var links: Links? - - public init( - data: Data? = nil, - links: Links? = nil - ) { + public init(data: Data? = nil) { self.data = data - self.links = links } private enum CodingKeys: String, CodingKey { case data - case links } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -144,29 +137,10 @@ public struct SubscriptionGroupLocalization: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case subscriptionGroups } } - - public struct Links: Hashable, Codable { - public var related: URL? - - public var `self`: URL? - - public init( - related: URL? = nil, - self _self: URL? = nil - ) { - self.related = related - self.`self` = _self - } - - private enum CodingKeys: String, CodingKey { - case related - case `self` = "self" - } - } } } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/SubscriptionGroupSubmission.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/SubscriptionGroupSubmission.generated.swift index 1c135a30..e1b5505c 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/SubscriptionGroupSubmission.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/SubscriptionGroupSubmission.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct SubscriptionGroupSubmission: Hashable, Codable { +public struct SubscriptionGroupSubmission: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -26,7 +26,7 @@ public struct SubscriptionGroupSubmission: Hashable, Codable { case links } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case subscriptionGroupSubmissions } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/SubscriptionImage.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/SubscriptionImage.generated.swift new file mode 100644 index 00000000..7381919a --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/SubscriptionImage.generated.swift @@ -0,0 +1,175 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct SubscriptionImage: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public var attributes: Attributes? + + public var relationships: Relationships? + + public var links: ResourceLinks? + + public init( + id: String, + type: `Type`, + attributes: Attributes? = nil, + relationships: Relationships? = nil, + links: ResourceLinks? = nil + ) { + self.id = id + self.type = type + self.attributes = attributes + self.relationships = relationships + self.links = links + } + + private enum CodingKeys: String, CodingKey { + case id + case type + case attributes + case relationships + case links + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case subscriptionImages + } + + public struct Attributes: Hashable, Codable, Sendable { + public var assetToken: String? + + public var fileName: String? + + public var fileSize: Int? + + public var imageAsset: ImageAsset? + + public var sourceFileChecksum: String? + + public var state: State? + + public var uploadOperations: [UploadOperation]? + + public init( + assetToken: String? = nil, + fileName: String? = nil, + fileSize: Int? = nil, + imageAsset: ImageAsset? = nil, + sourceFileChecksum: String? = nil, + state: State? = nil, + uploadOperations: [UploadOperation]? = nil + ) { + self.assetToken = assetToken + self.fileName = fileName + self.fileSize = fileSize + self.imageAsset = imageAsset + self.sourceFileChecksum = sourceFileChecksum + self.state = state + self.uploadOperations = uploadOperations + } + + private enum CodingKeys: String, CodingKey { + case assetToken + case fileName + case fileSize + case imageAsset + case sourceFileChecksum + case state + case uploadOperations + } + + public struct State: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var approved: Self { + .init(rawValue: "APPROVED") + } + + public static var awaitingUpload: Self { + .init(rawValue: "AWAITING_UPLOAD") + } + + public static var failed: Self { + .init(rawValue: "FAILED") + } + + public static var prepareForSubmission: Self { + .init(rawValue: "PREPARE_FOR_SUBMISSION") + } + + public static var rejected: Self { + .init(rawValue: "REJECTED") + } + + public static var uploadComplete: Self { + .init(rawValue: "UPLOAD_COMPLETE") + } + + public static var waitingForReview: Self { + .init(rawValue: "WAITING_FOR_REVIEW") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + } + + public struct Relationships: Hashable, Codable, Sendable { + public var subscription: Subscription? + + public init(subscription: Subscription? = nil) { + self.subscription = subscription + } + + private enum CodingKeys: String, CodingKey { + case subscription + } + + public struct Subscription: Hashable, Codable, Sendable { + public var data: Data? + + public init(data: Data? = nil) { + self.data = data + } + + private enum CodingKeys: String, CodingKey { + case data + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case subscriptions + } + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/SubscriptionIntroductoryOffer.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/SubscriptionIntroductoryOffer.generated.swift index 22601c52..b623914a 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/SubscriptionIntroductoryOffer.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/SubscriptionIntroductoryOffer.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct SubscriptionIntroductoryOffer: Hashable, Codable { +public struct SubscriptionIntroductoryOffer: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -36,11 +36,11 @@ public struct SubscriptionIntroductoryOffer: Hashable, Codable { case links } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case subscriptionIntroductoryOffers } - public struct Attributes: Hashable, Codable { + public struct Attributes: Hashable, Codable, Sendable { public var duration: SubscriptionOfferDuration? public var endDate: String? @@ -74,7 +74,7 @@ public struct SubscriptionIntroductoryOffer: Hashable, Codable { } } - public struct Relationships: Hashable, Codable { + public struct Relationships: Hashable, Codable, Sendable { public var subscription: Subscription? public var subscriptionPricePoint: SubscriptionPricePoint? @@ -97,25 +97,18 @@ public struct SubscriptionIntroductoryOffer: Hashable, Codable { case territory } - public struct Subscription: Hashable, Codable { + public struct Subscription: Hashable, Codable, Sendable { public var data: Data? - public var links: Links? - - public init( - data: Data? = nil, - links: Links? = nil - ) { + public init(data: Data? = nil) { self.data = data - self.links = links } private enum CodingKeys: String, CodingKey { case data - case links } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -133,50 +126,24 @@ public struct SubscriptionIntroductoryOffer: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case subscriptions } } - - public struct Links: Hashable, Codable { - public var related: URL? - - public var `self`: URL? - - public init( - related: URL? = nil, - self _self: URL? = nil - ) { - self.related = related - self.`self` = _self - } - - private enum CodingKeys: String, CodingKey { - case related - case `self` = "self" - } - } } - public struct SubscriptionPricePoint: Hashable, Codable { + public struct SubscriptionPricePoint: Hashable, Codable, Sendable { public var data: Data? - public var links: Links? - - public init( - data: Data? = nil, - links: Links? = nil - ) { + public init(data: Data? = nil) { self.data = data - self.links = links } private enum CodingKeys: String, CodingKey { case data - case links } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -194,50 +161,24 @@ public struct SubscriptionIntroductoryOffer: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case subscriptionPricePoints } } - - public struct Links: Hashable, Codable { - public var related: URL? - - public var `self`: URL? - - public init( - related: URL? = nil, - self _self: URL? = nil - ) { - self.related = related - self.`self` = _self - } - - private enum CodingKeys: String, CodingKey { - case related - case `self` = "self" - } - } } - public struct Territory: Hashable, Codable { + public struct Territory: Hashable, Codable, Sendable { public var data: Data? - public var links: Links? - - public init( - data: Data? = nil, - links: Links? = nil - ) { + public init(data: Data? = nil) { self.data = data - self.links = links } private enum CodingKeys: String, CodingKey { case data - case links } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -255,29 +196,10 @@ public struct SubscriptionIntroductoryOffer: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case territories } } - - public struct Links: Hashable, Codable { - public var related: URL? - - public var `self`: URL? - - public init( - related: URL? = nil, - self _self: URL? = nil - ) { - self.related = related - self.`self` = _self - } - - private enum CodingKeys: String, CodingKey { - case related - case `self` = "self" - } - } } } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/SubscriptionIntroductoryOfferInlineCreate.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/SubscriptionIntroductoryOfferInlineCreate.generated.swift index 32a930a8..8bd9bed8 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/SubscriptionIntroductoryOfferInlineCreate.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/SubscriptionIntroductoryOfferInlineCreate.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct SubscriptionIntroductoryOfferInlineCreate: Hashable, Codable { +public struct SubscriptionIntroductoryOfferInlineCreate: Hashable, Codable, Sendable { public var id: String? public var type: `Type` @@ -31,11 +31,11 @@ public struct SubscriptionIntroductoryOfferInlineCreate: Hashable, Codable { case relationships } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case subscriptionIntroductoryOffers } - public struct Attributes: Hashable, Codable { + public struct Attributes: Hashable, Codable, Sendable { public var duration: SubscriptionOfferDuration public var endDate: String? @@ -69,7 +69,7 @@ public struct SubscriptionIntroductoryOfferInlineCreate: Hashable, Codable { } } - public struct Relationships: Hashable, Codable { + public struct Relationships: Hashable, Codable, Sendable { public var subscription: Subscription? public var subscriptionPricePoint: SubscriptionPricePoint? @@ -92,7 +92,7 @@ public struct SubscriptionIntroductoryOfferInlineCreate: Hashable, Codable { case territory } - public struct Subscription: Hashable, Codable { + public struct Subscription: Hashable, Codable, Sendable { public var data: Data? public init(data: Data? = nil) { @@ -103,7 +103,7 @@ public struct SubscriptionIntroductoryOfferInlineCreate: Hashable, Codable { case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -121,13 +121,13 @@ public struct SubscriptionIntroductoryOfferInlineCreate: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case subscriptions } } } - public struct SubscriptionPricePoint: Hashable, Codable { + public struct SubscriptionPricePoint: Hashable, Codable, Sendable { public var data: Data? public init(data: Data? = nil) { @@ -138,7 +138,7 @@ public struct SubscriptionIntroductoryOfferInlineCreate: Hashable, Codable { case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -156,13 +156,13 @@ public struct SubscriptionIntroductoryOfferInlineCreate: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case subscriptionPricePoints } } } - public struct Territory: Hashable, Codable { + public struct Territory: Hashable, Codable, Sendable { public var data: Data? public init(data: Data? = nil) { @@ -173,7 +173,7 @@ public struct SubscriptionIntroductoryOfferInlineCreate: Hashable, Codable { case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -191,7 +191,7 @@ public struct SubscriptionIntroductoryOfferInlineCreate: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case territories } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/SubscriptionLocalization.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/SubscriptionLocalization.generated.swift index 200aad23..710a6d77 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/SubscriptionLocalization.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/SubscriptionLocalization.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct SubscriptionLocalization: Hashable, Codable { +public struct SubscriptionLocalization: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -36,11 +36,11 @@ public struct SubscriptionLocalization: Hashable, Codable { case links } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case subscriptionLocalizations } - public struct Attributes: Hashable, Codable { + public struct Attributes: Hashable, Codable, Sendable { public var description: String? public var locale: String? @@ -68,36 +68,36 @@ public struct SubscriptionLocalization: Hashable, Codable { case state } - public enum State: Hashable, Codable, RawRepresentable { - case approved - case prepareForSubmission - case rejected - case waitingForReview - case unknown(String) - - public var rawValue: String { - switch self { - case .approved: return "APPROVED" - case .prepareForSubmission: return "PREPARE_FOR_SUBMISSION" - case .rejected: return "REJECTED" - case .waitingForReview: return "WAITING_FOR_REVIEW" - case .unknown(let rawValue): return rawValue - } + public struct State: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var approved: Self { + .init(rawValue: "APPROVED") + } + + public static var prepareForSubmission: Self { + .init(rawValue: "PREPARE_FOR_SUBMISSION") } + public static var rejected: Self { + .init(rawValue: "REJECTED") + } + + public static var waitingForReview: Self { + .init(rawValue: "WAITING_FOR_REVIEW") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "APPROVED": self = .approved - case "PREPARE_FOR_SUBMISSION": self = .prepareForSubmission - case "REJECTED": self = .rejected - case "WAITING_FOR_REVIEW": self = .waitingForReview - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } } - public struct Relationships: Hashable, Codable { + public struct Relationships: Hashable, Codable, Sendable { public var subscription: Subscription? public init(subscription: Subscription? = nil) { @@ -108,25 +108,18 @@ public struct SubscriptionLocalization: Hashable, Codable { case subscription } - public struct Subscription: Hashable, Codable { + public struct Subscription: Hashable, Codable, Sendable { public var data: Data? - public var links: Links? - - public init( - data: Data? = nil, - links: Links? = nil - ) { + public init(data: Data? = nil) { self.data = data - self.links = links } private enum CodingKeys: String, CodingKey { case data - case links } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -144,29 +137,10 @@ public struct SubscriptionLocalization: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case subscriptions } } - - public struct Links: Hashable, Codable { - public var related: URL? - - public var `self`: URL? - - public init( - related: URL? = nil, - self _self: URL? = nil - ) { - self.related = related - self.`self` = _self - } - - private enum CodingKeys: String, CodingKey { - case related - case `self` = "self" - } - } } } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/SubscriptionOfferCode.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/SubscriptionOfferCode.generated.swift index 79154347..f9d58a25 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/SubscriptionOfferCode.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/SubscriptionOfferCode.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct SubscriptionOfferCode: Hashable, Codable { +public struct SubscriptionOfferCode: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -36,11 +36,11 @@ public struct SubscriptionOfferCode: Hashable, Codable { case links } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case subscriptionOfferCodes } - public struct Attributes: Hashable, Codable { + public struct Attributes: Hashable, Codable, Sendable { public var active: Bool? public var customerEligibilities: [SubscriptionCustomerEligibility]? @@ -55,8 +55,6 @@ public struct SubscriptionOfferCode: Hashable, Codable { public var offerMode: SubscriptionOfferMode? - public var totalNumberOfCodes: Int? - public init( active: Bool? = nil, customerEligibilities: [SubscriptionCustomerEligibility]? = nil, @@ -64,8 +62,7 @@ public struct SubscriptionOfferCode: Hashable, Codable { name: String? = nil, numberOfPeriods: Int? = nil, offerEligibility: SubscriptionOfferEligibility? = nil, - offerMode: SubscriptionOfferMode? = nil, - totalNumberOfCodes: Int? = nil + offerMode: SubscriptionOfferMode? = nil ) { self.active = active self.customerEligibilities = customerEligibilities @@ -74,7 +71,6 @@ public struct SubscriptionOfferCode: Hashable, Codable { self.numberOfPeriods = numberOfPeriods self.offerEligibility = offerEligibility self.offerMode = offerMode - self.totalNumberOfCodes = totalNumberOfCodes } private enum CodingKeys: String, CodingKey { @@ -85,11 +81,10 @@ public struct SubscriptionOfferCode: Hashable, Codable { case numberOfPeriods case offerEligibility case offerMode - case totalNumberOfCodes } } - public struct Relationships: Hashable, Codable { + public struct Relationships: Hashable, Codable, Sendable { public var customCodes: CustomCodes? public var oneTimeUseCodes: OneTimeUseCodes? @@ -117,16 +112,16 @@ public struct SubscriptionOfferCode: Hashable, Codable { case subscription } - public struct CustomCodes: Hashable, Codable { + public struct CustomCodes: Hashable, Codable, Sendable { public var data: [Data]? - public var links: Links? + public var links: RelationshipLinks? public var meta: PagingInformation? public init( data: [Data]? = nil, - links: Links? = nil, + links: RelationshipLinks? = nil, meta: PagingInformation? = nil ) { self.data = data @@ -140,7 +135,7 @@ public struct SubscriptionOfferCode: Hashable, Codable { case meta } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -158,41 +153,22 @@ public struct SubscriptionOfferCode: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case subscriptionOfferCodeCustomCodes } } - - public struct Links: Hashable, Codable { - public var related: URL? - - public var `self`: URL? - - public init( - related: URL? = nil, - self _self: URL? = nil - ) { - self.related = related - self.`self` = _self - } - - private enum CodingKeys: String, CodingKey { - case related - case `self` = "self" - } - } } - public struct OneTimeUseCodes: Hashable, Codable { + public struct OneTimeUseCodes: Hashable, Codable, Sendable { public var data: [Data]? - public var links: Links? + public var links: RelationshipLinks? public var meta: PagingInformation? public init( data: [Data]? = nil, - links: Links? = nil, + links: RelationshipLinks? = nil, meta: PagingInformation? = nil ) { self.data = data @@ -206,7 +182,7 @@ public struct SubscriptionOfferCode: Hashable, Codable { case meta } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -224,41 +200,22 @@ public struct SubscriptionOfferCode: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case subscriptionOfferCodeOneTimeUseCodes } } - - public struct Links: Hashable, Codable { - public var related: URL? - - public var `self`: URL? - - public init( - related: URL? = nil, - self _self: URL? = nil - ) { - self.related = related - self.`self` = _self - } - - private enum CodingKeys: String, CodingKey { - case related - case `self` = "self" - } - } } - public struct Prices: Hashable, Codable { + public struct Prices: Hashable, Codable, Sendable { public var data: [Data]? - public var links: Links? + public var links: RelationshipLinks? public var meta: PagingInformation? public init( data: [Data]? = nil, - links: Links? = nil, + links: RelationshipLinks? = nil, meta: PagingInformation? = nil ) { self.data = data @@ -272,7 +229,7 @@ public struct SubscriptionOfferCode: Hashable, Codable { case meta } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -290,50 +247,24 @@ public struct SubscriptionOfferCode: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case subscriptionOfferCodePrices } } - - public struct Links: Hashable, Codable { - public var related: URL? - - public var `self`: URL? - - public init( - related: URL? = nil, - self _self: URL? = nil - ) { - self.related = related - self.`self` = _self - } - - private enum CodingKeys: String, CodingKey { - case related - case `self` = "self" - } - } } - public struct Subscription: Hashable, Codable { + public struct Subscription: Hashable, Codable, Sendable { public var data: Data? - public var links: Links? - - public init( - data: Data? = nil, - links: Links? = nil - ) { + public init(data: Data? = nil) { self.data = data - self.links = links } private enum CodingKeys: String, CodingKey { case data - case links } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -351,29 +282,10 @@ public struct SubscriptionOfferCode: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case subscriptions } } - - public struct Links: Hashable, Codable { - public var related: URL? - - public var `self`: URL? - - public init( - related: URL? = nil, - self _self: URL? = nil - ) { - self.related = related - self.`self` = _self - } - - private enum CodingKeys: String, CodingKey { - case related - case `self` = "self" - } - } } } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/SubscriptionOfferCodeCustomCode.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/SubscriptionOfferCodeCustomCode.generated.swift index 7ad01ffb..3db12e94 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/SubscriptionOfferCodeCustomCode.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/SubscriptionOfferCodeCustomCode.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct SubscriptionOfferCodeCustomCode: Hashable, Codable { +public struct SubscriptionOfferCodeCustomCode: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -36,11 +36,11 @@ public struct SubscriptionOfferCodeCustomCode: Hashable, Codable { case links } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case subscriptionOfferCodeCustomCodes } - public struct Attributes: Hashable, Codable { + public struct Attributes: Hashable, Codable, Sendable { public var active: Bool? public var createdDate: String? @@ -74,7 +74,7 @@ public struct SubscriptionOfferCodeCustomCode: Hashable, Codable { } } - public struct Relationships: Hashable, Codable { + public struct Relationships: Hashable, Codable, Sendable { public var offerCode: OfferCode? public init(offerCode: OfferCode? = nil) { @@ -85,25 +85,18 @@ public struct SubscriptionOfferCodeCustomCode: Hashable, Codable { case offerCode } - public struct OfferCode: Hashable, Codable { + public struct OfferCode: Hashable, Codable, Sendable { public var data: Data? - public var links: Links? - - public init( - data: Data? = nil, - links: Links? = nil - ) { + public init(data: Data? = nil) { self.data = data - self.links = links } private enum CodingKeys: String, CodingKey { case data - case links } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -121,29 +114,10 @@ public struct SubscriptionOfferCodeCustomCode: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case subscriptionOfferCodes } } - - public struct Links: Hashable, Codable { - public var related: URL? - - public var `self`: URL? - - public init( - related: URL? = nil, - self _self: URL? = nil - ) { - self.related = related - self.`self` = _self - } - - private enum CodingKeys: String, CodingKey { - case related - case `self` = "self" - } - } } } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/SubscriptionOfferCodeOneTimeUseCode.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/SubscriptionOfferCodeOneTimeUseCode.generated.swift index f9fdc8f1..503e3bab 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/SubscriptionOfferCodeOneTimeUseCode.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/SubscriptionOfferCodeOneTimeUseCode.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct SubscriptionOfferCodeOneTimeUseCode: Hashable, Codable { +public struct SubscriptionOfferCodeOneTimeUseCode: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -36,11 +36,11 @@ public struct SubscriptionOfferCodeOneTimeUseCode: Hashable, Codable { case links } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case subscriptionOfferCodeOneTimeUseCodes } - public struct Attributes: Hashable, Codable { + public struct Attributes: Hashable, Codable, Sendable { public var active: Bool? public var createdDate: String? @@ -69,36 +69,36 @@ public struct SubscriptionOfferCodeOneTimeUseCode: Hashable, Codable { } } - public struct Relationships: Hashable, Codable { + public struct Relationships: Hashable, Codable, Sendable { public var offerCode: OfferCode? - public init(offerCode: OfferCode? = nil) { + public var values: Values? + + public init( + offerCode: OfferCode? = nil, + values: Values? = nil + ) { self.offerCode = offerCode + self.values = values } private enum CodingKeys: String, CodingKey { case offerCode + case values } - public struct OfferCode: Hashable, Codable { + public struct OfferCode: Hashable, Codable, Sendable { public var data: Data? - public var links: Links? - - public init( - data: Data? = nil, - links: Links? = nil - ) { + public init(data: Data? = nil) { self.data = data - self.links = links } private enum CodingKeys: String, CodingKey { case data - case links } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -116,28 +116,21 @@ public struct SubscriptionOfferCodeOneTimeUseCode: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case subscriptionOfferCodes } } + } - public struct Links: Hashable, Codable { - public var related: URL? - - public var `self`: URL? + public struct Values: Hashable, Codable, Sendable { + public var links: RelationshipLinks? - public init( - related: URL? = nil, - self _self: URL? = nil - ) { - self.related = related - self.`self` = _self - } + public init(links: RelationshipLinks? = nil) { + self.links = links + } - private enum CodingKeys: String, CodingKey { - case related - case `self` = "self" - } + private enum CodingKeys: String, CodingKey { + case links } } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/SubscriptionOfferCodeOneTimeUseCodeValue.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/SubscriptionOfferCodeOneTimeUseCodeValue.generated.swift index c5facd64..555dc401 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/SubscriptionOfferCodeOneTimeUseCodeValue.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/SubscriptionOfferCodeOneTimeUseCodeValue.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct SubscriptionOfferCodeOneTimeUseCodeValue: Hashable, Codable { +public struct SubscriptionOfferCodeOneTimeUseCodeValue: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -26,7 +26,7 @@ public struct SubscriptionOfferCodeOneTimeUseCodeValue: Hashable, Codable { case links } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case subscriptionOfferCodeOneTimeUseCodeValues } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/SubscriptionOfferCodePrice.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/SubscriptionOfferCodePrice.generated.swift index c338ed24..379b8667 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/SubscriptionOfferCodePrice.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/SubscriptionOfferCodePrice.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct SubscriptionOfferCodePrice: Hashable, Codable { +public struct SubscriptionOfferCodePrice: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -31,11 +31,11 @@ public struct SubscriptionOfferCodePrice: Hashable, Codable { case links } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case subscriptionOfferCodePrices } - public struct Relationships: Hashable, Codable { + public struct Relationships: Hashable, Codable, Sendable { public var subscriptionPricePoint: SubscriptionPricePoint? public var territory: Territory? @@ -53,25 +53,18 @@ public struct SubscriptionOfferCodePrice: Hashable, Codable { case territory } - public struct SubscriptionPricePoint: Hashable, Codable { + public struct SubscriptionPricePoint: Hashable, Codable, Sendable { public var data: Data? - public var links: Links? - - public init( - data: Data? = nil, - links: Links? = nil - ) { + public init(data: Data? = nil) { self.data = data - self.links = links } private enum CodingKeys: String, CodingKey { case data - case links } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -89,50 +82,24 @@ public struct SubscriptionOfferCodePrice: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case subscriptionPricePoints } } - - public struct Links: Hashable, Codable { - public var related: URL? - - public var `self`: URL? - - public init( - related: URL? = nil, - self _self: URL? = nil - ) { - self.related = related - self.`self` = _self - } - - private enum CodingKeys: String, CodingKey { - case related - case `self` = "self" - } - } } - public struct Territory: Hashable, Codable { + public struct Territory: Hashable, Codable, Sendable { public var data: Data? - public var links: Links? - - public init( - data: Data? = nil, - links: Links? = nil - ) { + public init(data: Data? = nil) { self.data = data - self.links = links } private enum CodingKeys: String, CodingKey { case data - case links } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -150,29 +117,10 @@ public struct SubscriptionOfferCodePrice: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case territories } } - - public struct Links: Hashable, Codable { - public var related: URL? - - public var `self`: URL? - - public init( - related: URL? = nil, - self _self: URL? = nil - ) { - self.related = related - self.`self` = _self - } - - private enum CodingKeys: String, CodingKey { - case related - case `self` = "self" - } - } } } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/SubscriptionOfferCodePriceInlineCreate.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/SubscriptionOfferCodePriceInlineCreate.generated.swift index 0b9e2112..382b998c 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/SubscriptionOfferCodePriceInlineCreate.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/SubscriptionOfferCodePriceInlineCreate.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct SubscriptionOfferCodePriceInlineCreate: Hashable, Codable { +public struct SubscriptionOfferCodePriceInlineCreate: Hashable, Codable, Sendable { public var id: String? public var type: `Type` @@ -26,11 +26,11 @@ public struct SubscriptionOfferCodePriceInlineCreate: Hashable, Codable { case relationships } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case subscriptionOfferCodePrices } - public struct Relationships: Hashable, Codable { + public struct Relationships: Hashable, Codable, Sendable { public var subscriptionPricePoint: SubscriptionPricePoint? public var territory: Territory? @@ -48,7 +48,7 @@ public struct SubscriptionOfferCodePriceInlineCreate: Hashable, Codable { case territory } - public struct SubscriptionPricePoint: Hashable, Codable { + public struct SubscriptionPricePoint: Hashable, Codable, Sendable { public var data: Data? public init(data: Data? = nil) { @@ -59,7 +59,7 @@ public struct SubscriptionOfferCodePriceInlineCreate: Hashable, Codable { case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -77,13 +77,13 @@ public struct SubscriptionOfferCodePriceInlineCreate: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case subscriptionPricePoints } } } - public struct Territory: Hashable, Codable { + public struct Territory: Hashable, Codable, Sendable { public var data: Data? public init(data: Data? = nil) { @@ -94,7 +94,7 @@ public struct SubscriptionOfferCodePriceInlineCreate: Hashable, Codable { case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -112,7 +112,7 @@ public struct SubscriptionOfferCodePriceInlineCreate: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case territories } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/SubscriptionOfferDuration.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/SubscriptionOfferDuration.generated.swift index 6dcb8719..3b26a100 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/SubscriptionOfferDuration.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/SubscriptionOfferDuration.generated.swift @@ -3,46 +3,47 @@ // swiftlint:disable all import Foundation -public enum SubscriptionOfferDuration: Hashable, Codable, RawRepresentable { - case oneDay - case oneMonth - case oneWeek - case oneYear - case sixMonths - case threeDays - case threeMonths - case twoMonths - case twoWeeks - case unknown(String) - - public var rawValue: String { - switch self { - case .oneDay: return "ONE_DAY" - case .oneMonth: return "ONE_MONTH" - case .oneWeek: return "ONE_WEEK" - case .oneYear: return "ONE_YEAR" - case .sixMonths: return "SIX_MONTHS" - case .threeDays: return "THREE_DAYS" - case .threeMonths: return "THREE_MONTHS" - case .twoMonths: return "TWO_MONTHS" - case .twoWeeks: return "TWO_WEEKS" - case .unknown(let rawValue): return rawValue - } +public struct SubscriptionOfferDuration: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var oneMonth: Self { + .init(rawValue: "ONE_MONTH") } + public static var oneWeek: Self { + .init(rawValue: "ONE_WEEK") + } + + public static var oneYear: Self { + .init(rawValue: "ONE_YEAR") + } + + public static var sixMonths: Self { + .init(rawValue: "SIX_MONTHS") + } + + public static var threeDays: Self { + .init(rawValue: "THREE_DAYS") + } + + public static var threeMonths: Self { + .init(rawValue: "THREE_MONTHS") + } + + public static var twoMonths: Self { + .init(rawValue: "TWO_MONTHS") + } + + public static var twoWeeks: Self { + .init(rawValue: "TWO_WEEKS") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "ONE_DAY": self = .oneDay - case "ONE_MONTH": self = .oneMonth - case "ONE_WEEK": self = .oneWeek - case "ONE_YEAR": self = .oneYear - case "SIX_MONTHS": self = .sixMonths - case "THREE_DAYS": self = .threeDays - case "THREE_MONTHS": self = .threeMonths - case "TWO_MONTHS": self = .twoMonths - case "TWO_WEEKS": self = .twoWeeks - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/SubscriptionOfferEligibility.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/SubscriptionOfferEligibility.generated.swift index 8b0f4ca1..c439ebba 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/SubscriptionOfferEligibility.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/SubscriptionOfferEligibility.generated.swift @@ -3,25 +3,23 @@ // swiftlint:disable all import Foundation -public enum SubscriptionOfferEligibility: Hashable, Codable, RawRepresentable { - case replaceIntroOffers - case stackWithIntroOffers - case unknown(String) +public struct SubscriptionOfferEligibility: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var replaceIntroOffers: Self { + .init(rawValue: "REPLACE_INTRO_OFFERS") + } + + public static var stackWithIntroOffers: Self { + .init(rawValue: "STACK_WITH_INTRO_OFFERS") + } - public var rawValue: String { - switch self { - case .replaceIntroOffers: return "REPLACE_INTRO_OFFERS" - case .stackWithIntroOffers: return "STACK_WITH_INTRO_OFFERS" - case .unknown(let rawValue): return rawValue - } + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "REPLACE_INTRO_OFFERS": self = .replaceIntroOffers - case "STACK_WITH_INTRO_OFFERS": self = .stackWithIntroOffers - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/SubscriptionOfferMode.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/SubscriptionOfferMode.generated.swift index 31df0e98..144a1c11 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/SubscriptionOfferMode.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/SubscriptionOfferMode.generated.swift @@ -3,28 +3,27 @@ // swiftlint:disable all import Foundation -public enum SubscriptionOfferMode: Hashable, Codable, RawRepresentable { - case freeTrial - case payAsYouGo - case payUpFront - case unknown(String) - - public var rawValue: String { - switch self { - case .freeTrial: return "FREE_TRIAL" - case .payAsYouGo: return "PAY_AS_YOU_GO" - case .payUpFront: return "PAY_UP_FRONT" - case .unknown(let rawValue): return rawValue - } +public struct SubscriptionOfferMode: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var freeTrial: Self { + .init(rawValue: "FREE_TRIAL") } + public static var payAsYouGo: Self { + .init(rawValue: "PAY_AS_YOU_GO") + } + + public static var payUpFront: Self { + .init(rawValue: "PAY_UP_FRONT") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "FREE_TRIAL": self = .freeTrial - case "PAY_AS_YOU_GO": self = .payAsYouGo - case "PAY_UP_FRONT": self = .payUpFront - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/SubscriptionPrice.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/SubscriptionPrice.generated.swift index 6b70a72e..5d86ff60 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/SubscriptionPrice.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/SubscriptionPrice.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct SubscriptionPrice: Hashable, Codable { +public struct SubscriptionPrice: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -36,11 +36,11 @@ public struct SubscriptionPrice: Hashable, Codable { case links } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case subscriptionPrices } - public struct Attributes: Hashable, Codable { + public struct Attributes: Hashable, Codable, Sendable { public var preserved: Bool? public var startDate: String? @@ -59,7 +59,7 @@ public struct SubscriptionPrice: Hashable, Codable { } } - public struct Relationships: Hashable, Codable { + public struct Relationships: Hashable, Codable, Sendable { public var subscriptionPricePoint: SubscriptionPricePoint? public var territory: Territory? @@ -77,25 +77,18 @@ public struct SubscriptionPrice: Hashable, Codable { case territory } - public struct SubscriptionPricePoint: Hashable, Codable { + public struct SubscriptionPricePoint: Hashable, Codable, Sendable { public var data: Data? - public var links: Links? - - public init( - data: Data? = nil, - links: Links? = nil - ) { + public init(data: Data? = nil) { self.data = data - self.links = links } private enum CodingKeys: String, CodingKey { case data - case links } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -113,50 +106,24 @@ public struct SubscriptionPrice: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case subscriptionPricePoints } } - - public struct Links: Hashable, Codable { - public var related: URL? - - public var `self`: URL? - - public init( - related: URL? = nil, - self _self: URL? = nil - ) { - self.related = related - self.`self` = _self - } - - private enum CodingKeys: String, CodingKey { - case related - case `self` = "self" - } - } } - public struct Territory: Hashable, Codable { + public struct Territory: Hashable, Codable, Sendable { public var data: Data? - public var links: Links? - - public init( - data: Data? = nil, - links: Links? = nil - ) { + public init(data: Data? = nil) { self.data = data - self.links = links } private enum CodingKeys: String, CodingKey { case data - case links } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -174,29 +141,10 @@ public struct SubscriptionPrice: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case territories } } - - public struct Links: Hashable, Codable { - public var related: URL? - - public var `self`: URL? - - public init( - related: URL? = nil, - self _self: URL? = nil - ) { - self.related = related - self.`self` = _self - } - - private enum CodingKeys: String, CodingKey { - case related - case `self` = "self" - } - } } } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/SubscriptionPriceInlineCreate.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/SubscriptionPriceInlineCreate.generated.swift index 3cd976a6..3ec50c74 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/SubscriptionPriceInlineCreate.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/SubscriptionPriceInlineCreate.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct SubscriptionPriceInlineCreate: Hashable, Codable { +public struct SubscriptionPriceInlineCreate: Hashable, Codable, Sendable { public var id: String? public var type: `Type` @@ -31,11 +31,11 @@ public struct SubscriptionPriceInlineCreate: Hashable, Codable { case relationships } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case subscriptionPrices } - public struct Attributes: Hashable, Codable { + public struct Attributes: Hashable, Codable, Sendable { public var preserveCurrentPrice: Bool? public var startDate: String? @@ -54,7 +54,7 @@ public struct SubscriptionPriceInlineCreate: Hashable, Codable { } } - public struct Relationships: Hashable, Codable { + public struct Relationships: Hashable, Codable, Sendable { public var subscription: Subscription? public var subscriptionPricePoint: SubscriptionPricePoint? @@ -77,7 +77,7 @@ public struct SubscriptionPriceInlineCreate: Hashable, Codable { case territory } - public struct Subscription: Hashable, Codable { + public struct Subscription: Hashable, Codable, Sendable { public var data: Data? public init(data: Data? = nil) { @@ -88,7 +88,7 @@ public struct SubscriptionPriceInlineCreate: Hashable, Codable { case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -106,13 +106,13 @@ public struct SubscriptionPriceInlineCreate: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case subscriptions } } } - public struct SubscriptionPricePoint: Hashable, Codable { + public struct SubscriptionPricePoint: Hashable, Codable, Sendable { public var data: Data? public init(data: Data? = nil) { @@ -123,7 +123,7 @@ public struct SubscriptionPriceInlineCreate: Hashable, Codable { case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -141,13 +141,13 @@ public struct SubscriptionPriceInlineCreate: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case subscriptionPricePoints } } } - public struct Territory: Hashable, Codable { + public struct Territory: Hashable, Codable, Sendable { public var data: Data? public init(data: Data? = nil) { @@ -158,7 +158,7 @@ public struct SubscriptionPriceInlineCreate: Hashable, Codable { case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -176,7 +176,7 @@ public struct SubscriptionPriceInlineCreate: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case territories } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/SubscriptionPricePoint.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/SubscriptionPricePoint.generated.swift index f8cdee5e..6318ec67 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/SubscriptionPricePoint.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/SubscriptionPricePoint.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct SubscriptionPricePoint: Hashable, Codable { +public struct SubscriptionPricePoint: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -36,11 +36,11 @@ public struct SubscriptionPricePoint: Hashable, Codable { case links } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case subscriptionPricePoints } - public struct Attributes: Hashable, Codable { + public struct Attributes: Hashable, Codable, Sendable { public var customerPrice: String? public var proceeds: String? @@ -64,36 +64,48 @@ public struct SubscriptionPricePoint: Hashable, Codable { } } - public struct Relationships: Hashable, Codable { + public struct Relationships: Hashable, Codable, Sendable { + public var equalizations: Equalizations? + public var territory: Territory? - public init(territory: Territory? = nil) { + public init( + equalizations: Equalizations? = nil, + territory: Territory? = nil + ) { + self.equalizations = equalizations self.territory = territory } private enum CodingKeys: String, CodingKey { + case equalizations case territory } - public struct Territory: Hashable, Codable { - public var data: Data? + public struct Equalizations: Hashable, Codable, Sendable { + public var links: RelationshipLinks? + + public init(links: RelationshipLinks? = nil) { + self.links = links + } - public var links: Links? + private enum CodingKeys: String, CodingKey { + case links + } + } + + public struct Territory: Hashable, Codable, Sendable { + public var data: Data? - public init( - data: Data? = nil, - links: Links? = nil - ) { + public init(data: Data? = nil) { self.data = data - self.links = links } private enum CodingKeys: String, CodingKey { case data - case links } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -111,29 +123,10 @@ public struct SubscriptionPricePoint: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case territories } } - - public struct Links: Hashable, Codable { - public var related: URL? - - public var `self`: URL? - - public init( - related: URL? = nil, - self _self: URL? = nil - ) { - self.related = related - self.`self` = _self - } - - private enum CodingKeys: String, CodingKey { - case related - case `self` = "self" - } - } } } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/SubscriptionPricePointInlineCreate.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/SubscriptionPricePointInlineCreate.generated.swift index 1d008669..2092c75f 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/SubscriptionPricePointInlineCreate.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/SubscriptionPricePointInlineCreate.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct SubscriptionPricePointInlineCreate: Hashable, Codable { +public struct SubscriptionPricePointInlineCreate: Hashable, Codable, Sendable { public var id: String? public var type: `Type` @@ -21,7 +21,7 @@ public struct SubscriptionPricePointInlineCreate: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case subscriptionPricePoints } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/SubscriptionPromotionalOffer.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/SubscriptionPromotionalOffer.generated.swift index ec69c539..89d9233b 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/SubscriptionPromotionalOffer.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/SubscriptionPromotionalOffer.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct SubscriptionPromotionalOffer: Hashable, Codable { +public struct SubscriptionPromotionalOffer: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -36,11 +36,11 @@ public struct SubscriptionPromotionalOffer: Hashable, Codable { case links } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case subscriptionPromotionalOffers } - public struct Attributes: Hashable, Codable { + public struct Attributes: Hashable, Codable, Sendable { public var duration: SubscriptionOfferDuration? public var name: String? @@ -74,7 +74,7 @@ public struct SubscriptionPromotionalOffer: Hashable, Codable { } } - public struct Relationships: Hashable, Codable { + public struct Relationships: Hashable, Codable, Sendable { public var prices: Prices? public var subscription: Subscription? @@ -92,16 +92,16 @@ public struct SubscriptionPromotionalOffer: Hashable, Codable { case subscription } - public struct Prices: Hashable, Codable { + public struct Prices: Hashable, Codable, Sendable { public var data: [Data]? - public var links: Links? + public var links: RelationshipLinks? public var meta: PagingInformation? public init( data: [Data]? = nil, - links: Links? = nil, + links: RelationshipLinks? = nil, meta: PagingInformation? = nil ) { self.data = data @@ -115,7 +115,7 @@ public struct SubscriptionPromotionalOffer: Hashable, Codable { case meta } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -133,50 +133,24 @@ public struct SubscriptionPromotionalOffer: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case subscriptionPromotionalOfferPrices } } - - public struct Links: Hashable, Codable { - public var related: URL? - - public var `self`: URL? - - public init( - related: URL? = nil, - self _self: URL? = nil - ) { - self.related = related - self.`self` = _self - } - - private enum CodingKeys: String, CodingKey { - case related - case `self` = "self" - } - } } - public struct Subscription: Hashable, Codable { + public struct Subscription: Hashable, Codable, Sendable { public var data: Data? - public var links: Links? - - public init( - data: Data? = nil, - links: Links? = nil - ) { + public init(data: Data? = nil) { self.data = data - self.links = links } private enum CodingKeys: String, CodingKey { case data - case links } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -194,29 +168,10 @@ public struct SubscriptionPromotionalOffer: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case subscriptions } } - - public struct Links: Hashable, Codable { - public var related: URL? - - public var `self`: URL? - - public init( - related: URL? = nil, - self _self: URL? = nil - ) { - self.related = related - self.`self` = _self - } - - private enum CodingKeys: String, CodingKey { - case related - case `self` = "self" - } - } } } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/SubscriptionPromotionalOfferInlineCreate.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/SubscriptionPromotionalOfferInlineCreate.generated.swift index 098dab24..f6adbabe 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/SubscriptionPromotionalOfferInlineCreate.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/SubscriptionPromotionalOfferInlineCreate.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct SubscriptionPromotionalOfferInlineCreate: Hashable, Codable { +public struct SubscriptionPromotionalOfferInlineCreate: Hashable, Codable, Sendable { public var id: String? public var type: `Type` @@ -31,11 +31,11 @@ public struct SubscriptionPromotionalOfferInlineCreate: Hashable, Codable { case relationships } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case subscriptionPromotionalOffers } - public struct Attributes: Hashable, Codable { + public struct Attributes: Hashable, Codable, Sendable { public var duration: SubscriptionOfferDuration public var name: String @@ -69,7 +69,7 @@ public struct SubscriptionPromotionalOfferInlineCreate: Hashable, Codable { } } - public struct Relationships: Hashable, Codable { + public struct Relationships: Hashable, Codable, Sendable { public var prices: Prices? public var subscription: Subscription? @@ -87,7 +87,7 @@ public struct SubscriptionPromotionalOfferInlineCreate: Hashable, Codable { case subscription } - public struct Prices: Hashable, Codable { + public struct Prices: Hashable, Codable, Sendable { public var data: [Data]? public init(data: [Data]? = nil) { @@ -98,7 +98,7 @@ public struct SubscriptionPromotionalOfferInlineCreate: Hashable, Codable { case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -116,13 +116,13 @@ public struct SubscriptionPromotionalOfferInlineCreate: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case subscriptionPromotionalOfferPrices } } } - public struct Subscription: Hashable, Codable { + public struct Subscription: Hashable, Codable, Sendable { public var data: Data? public init(data: Data? = nil) { @@ -133,7 +133,7 @@ public struct SubscriptionPromotionalOfferInlineCreate: Hashable, Codable { case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -151,7 +151,7 @@ public struct SubscriptionPromotionalOfferInlineCreate: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case subscriptions } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/SubscriptionPromotionalOfferPrice.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/SubscriptionPromotionalOfferPrice.generated.swift index 582c8917..a06785b0 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/SubscriptionPromotionalOfferPrice.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/SubscriptionPromotionalOfferPrice.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct SubscriptionPromotionalOfferPrice: Hashable, Codable { +public struct SubscriptionPromotionalOfferPrice: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -31,11 +31,11 @@ public struct SubscriptionPromotionalOfferPrice: Hashable, Codable { case links } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case subscriptionPromotionalOfferPrices } - public struct Relationships: Hashable, Codable { + public struct Relationships: Hashable, Codable, Sendable { public var subscriptionPricePoint: SubscriptionPricePoint? public var territory: Territory? @@ -53,25 +53,18 @@ public struct SubscriptionPromotionalOfferPrice: Hashable, Codable { case territory } - public struct SubscriptionPricePoint: Hashable, Codable { + public struct SubscriptionPricePoint: Hashable, Codable, Sendable { public var data: Data? - public var links: Links? - - public init( - data: Data? = nil, - links: Links? = nil - ) { + public init(data: Data? = nil) { self.data = data - self.links = links } private enum CodingKeys: String, CodingKey { case data - case links } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -89,50 +82,24 @@ public struct SubscriptionPromotionalOfferPrice: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case subscriptionPricePoints } } - - public struct Links: Hashable, Codable { - public var related: URL? - - public var `self`: URL? - - public init( - related: URL? = nil, - self _self: URL? = nil - ) { - self.related = related - self.`self` = _self - } - - private enum CodingKeys: String, CodingKey { - case related - case `self` = "self" - } - } } - public struct Territory: Hashable, Codable { + public struct Territory: Hashable, Codable, Sendable { public var data: Data? - public var links: Links? - - public init( - data: Data? = nil, - links: Links? = nil - ) { + public init(data: Data? = nil) { self.data = data - self.links = links } private enum CodingKeys: String, CodingKey { case data - case links } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -150,29 +117,10 @@ public struct SubscriptionPromotionalOfferPrice: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case territories } } - - public struct Links: Hashable, Codable { - public var related: URL? - - public var `self`: URL? - - public init( - related: URL? = nil, - self _self: URL? = nil - ) { - self.related = related - self.`self` = _self - } - - private enum CodingKeys: String, CodingKey { - case related - case `self` = "self" - } - } } } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/SubscriptionPromotionalOfferPriceInlineCreate.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/SubscriptionPromotionalOfferPriceInlineCreate.generated.swift index f5db28ba..b10f1992 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/SubscriptionPromotionalOfferPriceInlineCreate.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/SubscriptionPromotionalOfferPriceInlineCreate.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct SubscriptionPromotionalOfferPriceInlineCreate: Hashable, Codable { +public struct SubscriptionPromotionalOfferPriceInlineCreate: Hashable, Codable, Sendable { public var id: String? public var type: `Type` @@ -26,11 +26,11 @@ public struct SubscriptionPromotionalOfferPriceInlineCreate: Hashable, Codable { case relationships } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case subscriptionPromotionalOfferPrices } - public struct Relationships: Hashable, Codable { + public struct Relationships: Hashable, Codable, Sendable { public var subscriptionPricePoint: SubscriptionPricePoint? public var territory: Territory? @@ -48,7 +48,7 @@ public struct SubscriptionPromotionalOfferPriceInlineCreate: Hashable, Codable { case territory } - public struct SubscriptionPricePoint: Hashable, Codable { + public struct SubscriptionPricePoint: Hashable, Codable, Sendable { public var data: Data? public init(data: Data? = nil) { @@ -59,7 +59,7 @@ public struct SubscriptionPromotionalOfferPriceInlineCreate: Hashable, Codable { case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -77,13 +77,13 @@ public struct SubscriptionPromotionalOfferPriceInlineCreate: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case subscriptionPricePoints } } } - public struct Territory: Hashable, Codable { + public struct Territory: Hashable, Codable, Sendable { public var data: Data? public init(data: Data? = nil) { @@ -94,7 +94,7 @@ public struct SubscriptionPromotionalOfferPriceInlineCreate: Hashable, Codable { case data } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -112,7 +112,7 @@ public struct SubscriptionPromotionalOfferPriceInlineCreate: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case territories } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/SubscriptionStatusUrlVersion.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/SubscriptionStatusUrlVersion.generated.swift index 74d40b5f..c103645d 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/SubscriptionStatusUrlVersion.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/SubscriptionStatusUrlVersion.generated.swift @@ -3,31 +3,23 @@ // swiftlint:disable all import Foundation -public enum SubscriptionStatusUrlVersion: Hashable, Codable, RawRepresentable { - case V1 - case V2 - case v1 - case v2 - case unknown(String) +public struct SubscriptionStatusUrlVersion: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var v1: Self { + .init(rawValue: "V1") + } + + public static var v2: Self { + .init(rawValue: "V2") + } - public var rawValue: String { - switch self { - case .V1: return "V1" - case .V2: return "V2" - case .v1: return "v1" - case .v2: return "v2" - case .unknown(let rawValue): return rawValue - } + public var description: String { + rawValue } + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "V1": self = .V1 - case "V2": self = .V2 - case "v1": self = .v1 - case "v2": self = .v2 - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/SubscriptionSubmission.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/SubscriptionSubmission.generated.swift index 25c4ec0d..ac653511 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/SubscriptionSubmission.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/SubscriptionSubmission.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct SubscriptionSubmission: Hashable, Codable { +public struct SubscriptionSubmission: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -31,11 +31,11 @@ public struct SubscriptionSubmission: Hashable, Codable { case links } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case subscriptionSubmissions } - public struct Relationships: Hashable, Codable { + public struct Relationships: Hashable, Codable, Sendable { public var subscription: Subscription? public init(subscription: Subscription? = nil) { @@ -46,25 +46,18 @@ public struct SubscriptionSubmission: Hashable, Codable { case subscription } - public struct Subscription: Hashable, Codable { + public struct Subscription: Hashable, Codable, Sendable { public var data: Data? - public var links: Links? - - public init( - data: Data? = nil, - links: Links? = nil - ) { + public init(data: Data? = nil) { self.data = data - self.links = links } private enum CodingKeys: String, CodingKey { case data - case links } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -82,29 +75,10 @@ public struct SubscriptionSubmission: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case subscriptions } } - - public struct Links: Hashable, Codable { - public var related: URL? - - public var `self`: URL? - - public init( - related: URL? = nil, - self _self: URL? = nil - ) { - self.related = related - self.`self` = _self - } - - private enum CodingKeys: String, CodingKey { - case related - case `self` = "self" - } - } } } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Territory.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Territory.generated.swift index 902be43b..5e94d154 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Territory.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Territory.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct Territory: Hashable, Codable { +public struct Territory: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -31,11 +31,11 @@ public struct Territory: Hashable, Codable { case links } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case territories } - public struct Attributes: Hashable, Codable { + public struct Attributes: Hashable, Codable, Sendable { public var currency: String? public init(currency: String? = nil) { diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/TerritoryAvailability.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/TerritoryAvailability.generated.swift index cd1449b3..c845fd6d 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/TerritoryAvailability.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/TerritoryAvailability.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct TerritoryAvailability: Hashable, Codable { +public struct TerritoryAvailability: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -36,11 +36,11 @@ public struct TerritoryAvailability: Hashable, Codable { case links } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case territoryAvailabilities } - public struct Attributes: Hashable, Codable { + public struct Attributes: Hashable, Codable, Sendable { public var available: Bool? public var contentStatuses: [ContentStatuses]? @@ -73,123 +73,140 @@ public struct TerritoryAvailability: Hashable, Codable { case releaseDate } - public enum ContentStatuses: Hashable, Codable, RawRepresentable { - case available - case availableForPreorder - case availableForPreorderOnDate - case availableForSaleUnreleasedApp - case brazilRequiredTaxId - case cannotSell - case cannotSellAdultOnly - case cannotSellCasino - case cannotSellCasinoWithoutAgeVerification - case cannotSellCasinoWithoutGrac - case cannotSellContests - case cannotSellFrequentIntense - case cannotSellFrequentIntenseAlcoholTobaccoDrugs - case cannotSellFrequentIntenseGambling - case cannotSellFrequentIntenseSexualContentNudity - case cannotSellFrequentIntenseViolence - case cannotSellFrequentIntenseWithoutGrac - case cannotSellGambling - case cannotSellGamblingContests - case cannotSellInfrequentMildAlcoholTobaccoDrugs - case cannotSellInfrequentMildSexualContentNudity - case cannotSellNoniOSGames - case cannotSellRestrictedRating - case cannotSellSeventeenPlusApps - case cannotSellSeventeenPlusGames - case cannotSellSexuallyExplicit - case missingGrn - case missingRating - case preorderOnUnreleasedApp - case processingToAvailable - case processingToNotAvailable - case processingToPreOrder - case unverifiedGrn - case unknown(String) - - public var rawValue: String { - switch self { - case .available: return "AVAILABLE" - case .availableForPreorder: return "AVAILABLE_FOR_PREORDER" - case .availableForPreorderOnDate: return "AVAILABLE_FOR_PREORDER_ON_DATE" - case .availableForSaleUnreleasedApp: return "AVAILABLE_FOR_SALE_UNRELEASED_APP" - case .brazilRequiredTaxId: return "BRAZIL_REQUIRED_TAX_ID" - case .cannotSell: return "CANNOT_SELL" - case .cannotSellAdultOnly: return "CANNOT_SELL_ADULT_ONLY" - case .cannotSellCasino: return "CANNOT_SELL_CASINO" - case .cannotSellCasinoWithoutAgeVerification: return "CANNOT_SELL_CASINO_WITHOUT_AGE_VERIFICATION" - case .cannotSellCasinoWithoutGrac: return "CANNOT_SELL_CASINO_WITHOUT_GRAC" - case .cannotSellContests: return "CANNOT_SELL_CONTESTS" - case .cannotSellFrequentIntense: return "CANNOT_SELL_FREQUENT_INTENSE" - case .cannotSellFrequentIntenseAlcoholTobaccoDrugs: return "CANNOT_SELL_FREQUENT_INTENSE_ALCOHOL_TOBACCO_DRUGS" - case .cannotSellFrequentIntenseGambling: return "CANNOT_SELL_FREQUENT_INTENSE_GAMBLING" - case .cannotSellFrequentIntenseSexualContentNudity: return "CANNOT_SELL_FREQUENT_INTENSE_SEXUAL_CONTENT_NUDITY" - case .cannotSellFrequentIntenseViolence: return "CANNOT_SELL_FREQUENT_INTENSE_VIOLENCE" - case .cannotSellFrequentIntenseWithoutGrac: return "CANNOT_SELL_FREQUENT_INTENSE_WITHOUT_GRAC" - case .cannotSellGambling: return "CANNOT_SELL_GAMBLING" - case .cannotSellGamblingContests: return "CANNOT_SELL_GAMBLING_CONTESTS" - case .cannotSellInfrequentMildAlcoholTobaccoDrugs: return "CANNOT_SELL_INFREQUENT_MILD_ALCOHOL_TOBACCO_DRUGS" - case .cannotSellInfrequentMildSexualContentNudity: return "CANNOT_SELL_INFREQUENT_MILD_SEXUAL_CONTENT_NUDITY" - case .cannotSellNoniOSGames: return "CANNOT_SELL_NON_IOS_GAMES" - case .cannotSellRestrictedRating: return "CANNOT_SELL_RESTRICTED_RATING" - case .cannotSellSeventeenPlusApps: return "CANNOT_SELL_SEVENTEEN_PLUS_APPS" - case .cannotSellSeventeenPlusGames: return "CANNOT_SELL_SEVENTEEN_PLUS_GAMES" - case .cannotSellSexuallyExplicit: return "CANNOT_SELL_SEXUALLY_EXPLICIT" - case .missingGrn: return "MISSING_GRN" - case .missingRating: return "MISSING_RATING" - case .preorderOnUnreleasedApp: return "PREORDER_ON_UNRELEASED_APP" - case .processingToAvailable: return "PROCESSING_TO_AVAILABLE" - case .processingToNotAvailable: return "PROCESSING_TO_NOT_AVAILABLE" - case .processingToPreOrder: return "PROCESSING_TO_PRE_ORDER" - case .unverifiedGrn: return "UNVERIFIED_GRN" - case .unknown(let rawValue): return rawValue - } + public struct ContentStatuses: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var available: Self { + .init(rawValue: "AVAILABLE") + } + + public static var availableForPreorder: Self { + .init(rawValue: "AVAILABLE_FOR_PREORDER") + } + + public static var availableForPreorderOnDate: Self { + .init(rawValue: "AVAILABLE_FOR_PREORDER_ON_DATE") + } + + public static var availableForSaleUnreleasedApp: Self { + .init(rawValue: "AVAILABLE_FOR_SALE_UNRELEASED_APP") + } + + public static var brazilRequiredTaxId: Self { + .init(rawValue: "BRAZIL_REQUIRED_TAX_ID") + } + + public static var cannotSell: Self { + .init(rawValue: "CANNOT_SELL") + } + + public static var cannotSellAdultOnly: Self { + .init(rawValue: "CANNOT_SELL_ADULT_ONLY") + } + + public static var cannotSellCasino: Self { + .init(rawValue: "CANNOT_SELL_CASINO") + } + + public static var cannotSellCasinoWithoutAgeVerification: Self { + .init(rawValue: "CANNOT_SELL_CASINO_WITHOUT_AGE_VERIFICATION") + } + + public static var cannotSellCasinoWithoutGrac: Self { + .init(rawValue: "CANNOT_SELL_CASINO_WITHOUT_GRAC") + } + + public static var cannotSellContests: Self { + .init(rawValue: "CANNOT_SELL_CONTESTS") + } + + public static var cannotSellGambling: Self { + .init(rawValue: "CANNOT_SELL_GAMBLING") + } + + public static var cannotSellGamblingContests: Self { + .init(rawValue: "CANNOT_SELL_GAMBLING_CONTESTS") + } + + public static var cannotSellNoniOSGames: Self { + .init(rawValue: "CANNOT_SELL_NON_IOS_GAMES") + } + + public static var cannotSellRestrictedRating: Self { + .init(rawValue: "CANNOT_SELL_RESTRICTED_RATING") + } + + public static var cannotSellSeventeenPlusApps: Self { + .init(rawValue: "CANNOT_SELL_SEVENTEEN_PLUS_APPS") + } + + public static var cannotSellSeventeenPlusGames: Self { + .init(rawValue: "CANNOT_SELL_SEVENTEEN_PLUS_GAMES") + } + + public static var cannotSellSexuallyExplicit: Self { + .init(rawValue: "CANNOT_SELL_SEXUALLY_EXPLICIT") + } + + public static var icpNumberInvalid: Self { + .init(rawValue: "ICP_NUMBER_INVALID") } + public static var icpNumberMissing: Self { + .init(rawValue: "ICP_NUMBER_MISSING") + } + + public static var missingGrn: Self { + .init(rawValue: "MISSING_GRN") + } + + public static var missingRating: Self { + .init(rawValue: "MISSING_RATING") + } + + public static var preorderOnUnreleasedApp: Self { + .init(rawValue: "PREORDER_ON_UNRELEASED_APP") + } + + public static var processingToAvailable: Self { + .init(rawValue: "PROCESSING_TO_AVAILABLE") + } + + public static var processingToNotAvailable: Self { + .init(rawValue: "PROCESSING_TO_NOT_AVAILABLE") + } + + public static var processingToPreOrder: Self { + .init(rawValue: "PROCESSING_TO_PRE_ORDER") + } + + public static var traderStatusNotProvided: Self { + .init(rawValue: "TRADER_STATUS_NOT_PROVIDED") + } + + public static var traderStatusVerificationFailed: Self { + .init(rawValue: "TRADER_STATUS_VERIFICATION_FAILED") + } + + public static var traderStatusVerificationStatusMissing: Self { + .init(rawValue: "TRADER_STATUS_VERIFICATION_STATUS_MISSING") + } + + public static var unverifiedGrn: Self { + .init(rawValue: "UNVERIFIED_GRN") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "AVAILABLE": self = .available - case "AVAILABLE_FOR_PREORDER": self = .availableForPreorder - case "AVAILABLE_FOR_PREORDER_ON_DATE": self = .availableForPreorderOnDate - case "AVAILABLE_FOR_SALE_UNRELEASED_APP": self = .availableForSaleUnreleasedApp - case "BRAZIL_REQUIRED_TAX_ID": self = .brazilRequiredTaxId - case "CANNOT_SELL": self = .cannotSell - case "CANNOT_SELL_ADULT_ONLY": self = .cannotSellAdultOnly - case "CANNOT_SELL_CASINO": self = .cannotSellCasino - case "CANNOT_SELL_CASINO_WITHOUT_AGE_VERIFICATION": self = .cannotSellCasinoWithoutAgeVerification - case "CANNOT_SELL_CASINO_WITHOUT_GRAC": self = .cannotSellCasinoWithoutGrac - case "CANNOT_SELL_CONTESTS": self = .cannotSellContests - case "CANNOT_SELL_FREQUENT_INTENSE": self = .cannotSellFrequentIntense - case "CANNOT_SELL_FREQUENT_INTENSE_ALCOHOL_TOBACCO_DRUGS": self = .cannotSellFrequentIntenseAlcoholTobaccoDrugs - case "CANNOT_SELL_FREQUENT_INTENSE_GAMBLING": self = .cannotSellFrequentIntenseGambling - case "CANNOT_SELL_FREQUENT_INTENSE_SEXUAL_CONTENT_NUDITY": self = .cannotSellFrequentIntenseSexualContentNudity - case "CANNOT_SELL_FREQUENT_INTENSE_VIOLENCE": self = .cannotSellFrequentIntenseViolence - case "CANNOT_SELL_FREQUENT_INTENSE_WITHOUT_GRAC": self = .cannotSellFrequentIntenseWithoutGrac - case "CANNOT_SELL_GAMBLING": self = .cannotSellGambling - case "CANNOT_SELL_GAMBLING_CONTESTS": self = .cannotSellGamblingContests - case "CANNOT_SELL_INFREQUENT_MILD_ALCOHOL_TOBACCO_DRUGS": self = .cannotSellInfrequentMildAlcoholTobaccoDrugs - case "CANNOT_SELL_INFREQUENT_MILD_SEXUAL_CONTENT_NUDITY": self = .cannotSellInfrequentMildSexualContentNudity - case "CANNOT_SELL_NON_IOS_GAMES": self = .cannotSellNoniOSGames - case "CANNOT_SELL_RESTRICTED_RATING": self = .cannotSellRestrictedRating - case "CANNOT_SELL_SEVENTEEN_PLUS_APPS": self = .cannotSellSeventeenPlusApps - case "CANNOT_SELL_SEVENTEEN_PLUS_GAMES": self = .cannotSellSeventeenPlusGames - case "CANNOT_SELL_SEXUALLY_EXPLICIT": self = .cannotSellSexuallyExplicit - case "MISSING_GRN": self = .missingGrn - case "MISSING_RATING": self = .missingRating - case "PREORDER_ON_UNRELEASED_APP": self = .preorderOnUnreleasedApp - case "PROCESSING_TO_AVAILABLE": self = .processingToAvailable - case "PROCESSING_TO_NOT_AVAILABLE": self = .processingToNotAvailable - case "PROCESSING_TO_PRE_ORDER": self = .processingToPreOrder - case "UNVERIFIED_GRN": self = .unverifiedGrn - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } } - public struct Relationships: Hashable, Codable { + public struct Relationships: Hashable, Codable, Sendable { public var territory: Territory? public init(territory: Territory? = nil) { @@ -200,25 +217,18 @@ public struct TerritoryAvailability: Hashable, Codable { case territory } - public struct Territory: Hashable, Codable { + public struct Territory: Hashable, Codable, Sendable { public var data: Data? - public var links: Links? - - public init( - data: Data? = nil, - links: Links? = nil - ) { + public init(data: Data? = nil) { self.data = data - self.links = links } private enum CodingKeys: String, CodingKey { case data - case links } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -236,29 +246,10 @@ public struct TerritoryAvailability: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case territories } } - - public struct Links: Hashable, Codable { - public var related: URL? - - public var `self`: URL? - - public init( - related: URL? = nil, - self _self: URL? = nil - ) { - self.related = related - self.`self` = _self - } - - private enum CodingKeys: String, CodingKey { - case related - case `self` = "self" - } - } } } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/TerritoryAvailabilityInlineCreate.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/TerritoryAvailabilityInlineCreate.generated.swift index 6ee61aa1..37939c18 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/TerritoryAvailabilityInlineCreate.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/TerritoryAvailabilityInlineCreate.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct TerritoryAvailabilityInlineCreate: Hashable, Codable { +public struct TerritoryAvailabilityInlineCreate: Hashable, Codable, Sendable { public var id: String? public var type: `Type` @@ -21,7 +21,7 @@ public struct TerritoryAvailabilityInlineCreate: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case territoryAvailabilities } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/TerritoryCode.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/TerritoryCode.generated.swift index 59fc5a53..2cf6066e 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/TerritoryCode.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/TerritoryCode.generated.swift @@ -3,715 +3,943 @@ // swiftlint:disable all import Foundation -public enum TerritoryCode: Hashable, Codable, RawRepresentable { - case abw - case afg - case ago - case aia - case alb - case and - case ant - case are - case arg - case arm - case asm - case atg - case aus - case aut - case aze - case bdi - case bel - case ben - case bes - case bfa - case bgd - case bgr - case bhr - case bhs - case bih - case blr - case blz - case bmu - case bol - case bra - case brb - case brn - case btn - case bwa - case caf - case can - case che - case chl - case chn - case civ - case cmr - case cod - case cog - case cok - case col - case com - case cpv - case cri - case cub - case cuw - case cxr - case cym - case cyp - case cze - case deu - case dji - case dma - case dnk - case dom - case dza - case ecu - case egy - case eri - case esp - case est - case eth - case fin - case fji - case flk - case fra - case fro - case fsm - case gab - case gbr - case geo - case ggy - case gha - case gib - case gin - case glp - case gmb - case gnb - case gnq - case grc - case grd - case grl - case gtm - case guf - case gum - case guy - case hkg - case hnd - case hrv - case hti - case hun - case idn - case imn - case ind - case irl - case irq - case isl - case isr - case ita - case jam - case jey - case jor - case jpn - case kaz - case ken - case kgz - case khm - case kir - case kna - case kor - case kwt - case lao - case lbn - case lbr - case lby - case lca - case lie - case lka - case lso - case ltu - case lux - case lva - case mac - case mar - case mco - case mda - case mdg - case mdv - case mex - case mhl - case mkd - case mli - case mlt - case mmr - case mne - case mng - case mnp - case moz - case mrt - case msr - case mtq - case mus - case mwi - case mys - case myt - case nam - case ncl - case ner - case nfk - case nga - case nic - case niu - case nld - case nor - case npl - case nru - case nzl - case omn - case pak - case pan - case per - case phl - case plw - case png - case pol - case pri - case prt - case pry - case pse - case pyf - case qat - case reu - case rou - case rus - case rwa - case sau - case sen - case sgp - case shn - case slb - case sle - case slv - case smr - case som - case spm - case srb - case ssd - case stp - case sur - case svk - case svn - case swe - case swz - case sxm - case syc - case tca - case tcd - case tgo - case tha - case tjk - case tkm - case tls - case ton - case tto - case tun - case tur - case tuv - case twn - case tza - case uga - case ukr - case umi - case ury - case usa - case uzb - case vat - case vct - case ven - case vgb - case vir - case vnm - case vut - case wlf - case wsm - case yem - case zaf - case zmb - case zwe - case unknown(String) - - public var rawValue: String { - switch self { - case .abw: return "ABW" - case .afg: return "AFG" - case .ago: return "AGO" - case .aia: return "AIA" - case .alb: return "ALB" - case .and: return "AND" - case .ant: return "ANT" - case .are: return "ARE" - case .arg: return "ARG" - case .arm: return "ARM" - case .asm: return "ASM" - case .atg: return "ATG" - case .aus: return "AUS" - case .aut: return "AUT" - case .aze: return "AZE" - case .bdi: return "BDI" - case .bel: return "BEL" - case .ben: return "BEN" - case .bes: return "BES" - case .bfa: return "BFA" - case .bgd: return "BGD" - case .bgr: return "BGR" - case .bhr: return "BHR" - case .bhs: return "BHS" - case .bih: return "BIH" - case .blr: return "BLR" - case .blz: return "BLZ" - case .bmu: return "BMU" - case .bol: return "BOL" - case .bra: return "BRA" - case .brb: return "BRB" - case .brn: return "BRN" - case .btn: return "BTN" - case .bwa: return "BWA" - case .caf: return "CAF" - case .can: return "CAN" - case .che: return "CHE" - case .chl: return "CHL" - case .chn: return "CHN" - case .civ: return "CIV" - case .cmr: return "CMR" - case .cod: return "COD" - case .cog: return "COG" - case .cok: return "COK" - case .col: return "COL" - case .com: return "COM" - case .cpv: return "CPV" - case .cri: return "CRI" - case .cub: return "CUB" - case .cuw: return "CUW" - case .cxr: return "CXR" - case .cym: return "CYM" - case .cyp: return "CYP" - case .cze: return "CZE" - case .deu: return "DEU" - case .dji: return "DJI" - case .dma: return "DMA" - case .dnk: return "DNK" - case .dom: return "DOM" - case .dza: return "DZA" - case .ecu: return "ECU" - case .egy: return "EGY" - case .eri: return "ERI" - case .esp: return "ESP" - case .est: return "EST" - case .eth: return "ETH" - case .fin: return "FIN" - case .fji: return "FJI" - case .flk: return "FLK" - case .fra: return "FRA" - case .fro: return "FRO" - case .fsm: return "FSM" - case .gab: return "GAB" - case .gbr: return "GBR" - case .geo: return "GEO" - case .ggy: return "GGY" - case .gha: return "GHA" - case .gib: return "GIB" - case .gin: return "GIN" - case .glp: return "GLP" - case .gmb: return "GMB" - case .gnb: return "GNB" - case .gnq: return "GNQ" - case .grc: return "GRC" - case .grd: return "GRD" - case .grl: return "GRL" - case .gtm: return "GTM" - case .guf: return "GUF" - case .gum: return "GUM" - case .guy: return "GUY" - case .hkg: return "HKG" - case .hnd: return "HND" - case .hrv: return "HRV" - case .hti: return "HTI" - case .hun: return "HUN" - case .idn: return "IDN" - case .imn: return "IMN" - case .ind: return "IND" - case .irl: return "IRL" - case .irq: return "IRQ" - case .isl: return "ISL" - case .isr: return "ISR" - case .ita: return "ITA" - case .jam: return "JAM" - case .jey: return "JEY" - case .jor: return "JOR" - case .jpn: return "JPN" - case .kaz: return "KAZ" - case .ken: return "KEN" - case .kgz: return "KGZ" - case .khm: return "KHM" - case .kir: return "KIR" - case .kna: return "KNA" - case .kor: return "KOR" - case .kwt: return "KWT" - case .lao: return "LAO" - case .lbn: return "LBN" - case .lbr: return "LBR" - case .lby: return "LBY" - case .lca: return "LCA" - case .lie: return "LIE" - case .lka: return "LKA" - case .lso: return "LSO" - case .ltu: return "LTU" - case .lux: return "LUX" - case .lva: return "LVA" - case .mac: return "MAC" - case .mar: return "MAR" - case .mco: return "MCO" - case .mda: return "MDA" - case .mdg: return "MDG" - case .mdv: return "MDV" - case .mex: return "MEX" - case .mhl: return "MHL" - case .mkd: return "MKD" - case .mli: return "MLI" - case .mlt: return "MLT" - case .mmr: return "MMR" - case .mne: return "MNE" - case .mng: return "MNG" - case .mnp: return "MNP" - case .moz: return "MOZ" - case .mrt: return "MRT" - case .msr: return "MSR" - case .mtq: return "MTQ" - case .mus: return "MUS" - case .mwi: return "MWI" - case .mys: return "MYS" - case .myt: return "MYT" - case .nam: return "NAM" - case .ncl: return "NCL" - case .ner: return "NER" - case .nfk: return "NFK" - case .nga: return "NGA" - case .nic: return "NIC" - case .niu: return "NIU" - case .nld: return "NLD" - case .nor: return "NOR" - case .npl: return "NPL" - case .nru: return "NRU" - case .nzl: return "NZL" - case .omn: return "OMN" - case .pak: return "PAK" - case .pan: return "PAN" - case .per: return "PER" - case .phl: return "PHL" - case .plw: return "PLW" - case .png: return "PNG" - case .pol: return "POL" - case .pri: return "PRI" - case .prt: return "PRT" - case .pry: return "PRY" - case .pse: return "PSE" - case .pyf: return "PYF" - case .qat: return "QAT" - case .reu: return "REU" - case .rou: return "ROU" - case .rus: return "RUS" - case .rwa: return "RWA" - case .sau: return "SAU" - case .sen: return "SEN" - case .sgp: return "SGP" - case .shn: return "SHN" - case .slb: return "SLB" - case .sle: return "SLE" - case .slv: return "SLV" - case .smr: return "SMR" - case .som: return "SOM" - case .spm: return "SPM" - case .srb: return "SRB" - case .ssd: return "SSD" - case .stp: return "STP" - case .sur: return "SUR" - case .svk: return "SVK" - case .svn: return "SVN" - case .swe: return "SWE" - case .swz: return "SWZ" - case .sxm: return "SXM" - case .syc: return "SYC" - case .tca: return "TCA" - case .tcd: return "TCD" - case .tgo: return "TGO" - case .tha: return "THA" - case .tjk: return "TJK" - case .tkm: return "TKM" - case .tls: return "TLS" - case .ton: return "TON" - case .tto: return "TTO" - case .tun: return "TUN" - case .tur: return "TUR" - case .tuv: return "TUV" - case .twn: return "TWN" - case .tza: return "TZA" - case .uga: return "UGA" - case .ukr: return "UKR" - case .umi: return "UMI" - case .ury: return "URY" - case .usa: return "USA" - case .uzb: return "UZB" - case .vat: return "VAT" - case .vct: return "VCT" - case .ven: return "VEN" - case .vgb: return "VGB" - case .vir: return "VIR" - case .vnm: return "VNM" - case .vut: return "VUT" - case .wlf: return "WLF" - case .wsm: return "WSM" - case .yem: return "YEM" - case .zaf: return "ZAF" - case .zmb: return "ZMB" - case .zwe: return "ZWE" - case .unknown(let rawValue): return rawValue - } +public struct TerritoryCode: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var abw: Self { + .init(rawValue: "ABW") } + public static var afg: Self { + .init(rawValue: "AFG") + } + + public static var ago: Self { + .init(rawValue: "AGO") + } + + public static var aia: Self { + .init(rawValue: "AIA") + } + + public static var alb: Self { + .init(rawValue: "ALB") + } + + public static var and: Self { + .init(rawValue: "AND") + } + + public static var ant: Self { + .init(rawValue: "ANT") + } + + public static var are: Self { + .init(rawValue: "ARE") + } + + public static var arg: Self { + .init(rawValue: "ARG") + } + + public static var arm: Self { + .init(rawValue: "ARM") + } + + public static var asm: Self { + .init(rawValue: "ASM") + } + + public static var atg: Self { + .init(rawValue: "ATG") + } + + public static var aus: Self { + .init(rawValue: "AUS") + } + + public static var aut: Self { + .init(rawValue: "AUT") + } + + public static var aze: Self { + .init(rawValue: "AZE") + } + + public static var bdi: Self { + .init(rawValue: "BDI") + } + + public static var bel: Self { + .init(rawValue: "BEL") + } + + public static var ben: Self { + .init(rawValue: "BEN") + } + + public static var bes: Self { + .init(rawValue: "BES") + } + + public static var bfa: Self { + .init(rawValue: "BFA") + } + + public static var bgd: Self { + .init(rawValue: "BGD") + } + + public static var bgr: Self { + .init(rawValue: "BGR") + } + + public static var bhr: Self { + .init(rawValue: "BHR") + } + + public static var bhs: Self { + .init(rawValue: "BHS") + } + + public static var bih: Self { + .init(rawValue: "BIH") + } + + public static var blr: Self { + .init(rawValue: "BLR") + } + + public static var blz: Self { + .init(rawValue: "BLZ") + } + + public static var bmu: Self { + .init(rawValue: "BMU") + } + + public static var bol: Self { + .init(rawValue: "BOL") + } + + public static var bra: Self { + .init(rawValue: "BRA") + } + + public static var brb: Self { + .init(rawValue: "BRB") + } + + public static var brn: Self { + .init(rawValue: "BRN") + } + + public static var btn: Self { + .init(rawValue: "BTN") + } + + public static var bwa: Self { + .init(rawValue: "BWA") + } + + public static var caf: Self { + .init(rawValue: "CAF") + } + + public static var can: Self { + .init(rawValue: "CAN") + } + + public static var che: Self { + .init(rawValue: "CHE") + } + + public static var chl: Self { + .init(rawValue: "CHL") + } + + public static var chn: Self { + .init(rawValue: "CHN") + } + + public static var civ: Self { + .init(rawValue: "CIV") + } + + public static var cmr: Self { + .init(rawValue: "CMR") + } + + public static var cod: Self { + .init(rawValue: "COD") + } + + public static var cog: Self { + .init(rawValue: "COG") + } + + public static var cok: Self { + .init(rawValue: "COK") + } + + public static var col: Self { + .init(rawValue: "COL") + } + + public static var com: Self { + .init(rawValue: "COM") + } + + public static var cpv: Self { + .init(rawValue: "CPV") + } + + public static var cri: Self { + .init(rawValue: "CRI") + } + + public static var cub: Self { + .init(rawValue: "CUB") + } + + public static var cuw: Self { + .init(rawValue: "CUW") + } + + public static var cxr: Self { + .init(rawValue: "CXR") + } + + public static var cym: Self { + .init(rawValue: "CYM") + } + + public static var cyp: Self { + .init(rawValue: "CYP") + } + + public static var cze: Self { + .init(rawValue: "CZE") + } + + public static var deu: Self { + .init(rawValue: "DEU") + } + + public static var dji: Self { + .init(rawValue: "DJI") + } + + public static var dma: Self { + .init(rawValue: "DMA") + } + + public static var dnk: Self { + .init(rawValue: "DNK") + } + + public static var dom: Self { + .init(rawValue: "DOM") + } + + public static var dza: Self { + .init(rawValue: "DZA") + } + + public static var ecu: Self { + .init(rawValue: "ECU") + } + + public static var egy: Self { + .init(rawValue: "EGY") + } + + public static var eri: Self { + .init(rawValue: "ERI") + } + + public static var esp: Self { + .init(rawValue: "ESP") + } + + public static var est: Self { + .init(rawValue: "EST") + } + + public static var eth: Self { + .init(rawValue: "ETH") + } + + public static var fin: Self { + .init(rawValue: "FIN") + } + + public static var fji: Self { + .init(rawValue: "FJI") + } + + public static var flk: Self { + .init(rawValue: "FLK") + } + + public static var fra: Self { + .init(rawValue: "FRA") + } + + public static var fro: Self { + .init(rawValue: "FRO") + } + + public static var fsm: Self { + .init(rawValue: "FSM") + } + + public static var gab: Self { + .init(rawValue: "GAB") + } + + public static var gbr: Self { + .init(rawValue: "GBR") + } + + public static var geo: Self { + .init(rawValue: "GEO") + } + + public static var ggy: Self { + .init(rawValue: "GGY") + } + + public static var gha: Self { + .init(rawValue: "GHA") + } + + public static var gib: Self { + .init(rawValue: "GIB") + } + + public static var gin: Self { + .init(rawValue: "GIN") + } + + public static var glp: Self { + .init(rawValue: "GLP") + } + + public static var gmb: Self { + .init(rawValue: "GMB") + } + + public static var gnb: Self { + .init(rawValue: "GNB") + } + + public static var gnq: Self { + .init(rawValue: "GNQ") + } + + public static var grc: Self { + .init(rawValue: "GRC") + } + + public static var grd: Self { + .init(rawValue: "GRD") + } + + public static var grl: Self { + .init(rawValue: "GRL") + } + + public static var gtm: Self { + .init(rawValue: "GTM") + } + + public static var guf: Self { + .init(rawValue: "GUF") + } + + public static var gum: Self { + .init(rawValue: "GUM") + } + + public static var guy: Self { + .init(rawValue: "GUY") + } + + public static var hkg: Self { + .init(rawValue: "HKG") + } + + public static var hnd: Self { + .init(rawValue: "HND") + } + + public static var hrv: Self { + .init(rawValue: "HRV") + } + + public static var hti: Self { + .init(rawValue: "HTI") + } + + public static var hun: Self { + .init(rawValue: "HUN") + } + + public static var idn: Self { + .init(rawValue: "IDN") + } + + public static var imn: Self { + .init(rawValue: "IMN") + } + + public static var ind: Self { + .init(rawValue: "IND") + } + + public static var irl: Self { + .init(rawValue: "IRL") + } + + public static var irq: Self { + .init(rawValue: "IRQ") + } + + public static var isl: Self { + .init(rawValue: "ISL") + } + + public static var isr: Self { + .init(rawValue: "ISR") + } + + public static var ita: Self { + .init(rawValue: "ITA") + } + + public static var jam: Self { + .init(rawValue: "JAM") + } + + public static var jey: Self { + .init(rawValue: "JEY") + } + + public static var jor: Self { + .init(rawValue: "JOR") + } + + public static var jpn: Self { + .init(rawValue: "JPN") + } + + public static var kaz: Self { + .init(rawValue: "KAZ") + } + + public static var ken: Self { + .init(rawValue: "KEN") + } + + public static var kgz: Self { + .init(rawValue: "KGZ") + } + + public static var khm: Self { + .init(rawValue: "KHM") + } + + public static var kir: Self { + .init(rawValue: "KIR") + } + + public static var kna: Self { + .init(rawValue: "KNA") + } + + public static var kor: Self { + .init(rawValue: "KOR") + } + + public static var kwt: Self { + .init(rawValue: "KWT") + } + + public static var lao: Self { + .init(rawValue: "LAO") + } + + public static var lbn: Self { + .init(rawValue: "LBN") + } + + public static var lbr: Self { + .init(rawValue: "LBR") + } + + public static var lby: Self { + .init(rawValue: "LBY") + } + + public static var lca: Self { + .init(rawValue: "LCA") + } + + public static var lie: Self { + .init(rawValue: "LIE") + } + + public static var lka: Self { + .init(rawValue: "LKA") + } + + public static var lso: Self { + .init(rawValue: "LSO") + } + + public static var ltu: Self { + .init(rawValue: "LTU") + } + + public static var lux: Self { + .init(rawValue: "LUX") + } + + public static var lva: Self { + .init(rawValue: "LVA") + } + + public static var mac: Self { + .init(rawValue: "MAC") + } + + public static var mar: Self { + .init(rawValue: "MAR") + } + + public static var mco: Self { + .init(rawValue: "MCO") + } + + public static var mda: Self { + .init(rawValue: "MDA") + } + + public static var mdg: Self { + .init(rawValue: "MDG") + } + + public static var mdv: Self { + .init(rawValue: "MDV") + } + + public static var mex: Self { + .init(rawValue: "MEX") + } + + public static var mhl: Self { + .init(rawValue: "MHL") + } + + public static var mkd: Self { + .init(rawValue: "MKD") + } + + public static var mli: Self { + .init(rawValue: "MLI") + } + + public static var mlt: Self { + .init(rawValue: "MLT") + } + + public static var mmr: Self { + .init(rawValue: "MMR") + } + + public static var mne: Self { + .init(rawValue: "MNE") + } + + public static var mng: Self { + .init(rawValue: "MNG") + } + + public static var mnp: Self { + .init(rawValue: "MNP") + } + + public static var moz: Self { + .init(rawValue: "MOZ") + } + + public static var mrt: Self { + .init(rawValue: "MRT") + } + + public static var msr: Self { + .init(rawValue: "MSR") + } + + public static var mtq: Self { + .init(rawValue: "MTQ") + } + + public static var mus: Self { + .init(rawValue: "MUS") + } + + public static var mwi: Self { + .init(rawValue: "MWI") + } + + public static var mys: Self { + .init(rawValue: "MYS") + } + + public static var myt: Self { + .init(rawValue: "MYT") + } + + public static var nam: Self { + .init(rawValue: "NAM") + } + + public static var ncl: Self { + .init(rawValue: "NCL") + } + + public static var ner: Self { + .init(rawValue: "NER") + } + + public static var nfk: Self { + .init(rawValue: "NFK") + } + + public static var nga: Self { + .init(rawValue: "NGA") + } + + public static var nic: Self { + .init(rawValue: "NIC") + } + + public static var niu: Self { + .init(rawValue: "NIU") + } + + public static var nld: Self { + .init(rawValue: "NLD") + } + + public static var nor: Self { + .init(rawValue: "NOR") + } + + public static var npl: Self { + .init(rawValue: "NPL") + } + + public static var nru: Self { + .init(rawValue: "NRU") + } + + public static var nzl: Self { + .init(rawValue: "NZL") + } + + public static var omn: Self { + .init(rawValue: "OMN") + } + + public static var pak: Self { + .init(rawValue: "PAK") + } + + public static var pan: Self { + .init(rawValue: "PAN") + } + + public static var per: Self { + .init(rawValue: "PER") + } + + public static var phl: Self { + .init(rawValue: "PHL") + } + + public static var plw: Self { + .init(rawValue: "PLW") + } + + public static var png: Self { + .init(rawValue: "PNG") + } + + public static var pol: Self { + .init(rawValue: "POL") + } + + public static var pri: Self { + .init(rawValue: "PRI") + } + + public static var prt: Self { + .init(rawValue: "PRT") + } + + public static var pry: Self { + .init(rawValue: "PRY") + } + + public static var pse: Self { + .init(rawValue: "PSE") + } + + public static var pyf: Self { + .init(rawValue: "PYF") + } + + public static var qat: Self { + .init(rawValue: "QAT") + } + + public static var reu: Self { + .init(rawValue: "REU") + } + + public static var rou: Self { + .init(rawValue: "ROU") + } + + public static var rus: Self { + .init(rawValue: "RUS") + } + + public static var rwa: Self { + .init(rawValue: "RWA") + } + + public static var sau: Self { + .init(rawValue: "SAU") + } + + public static var sen: Self { + .init(rawValue: "SEN") + } + + public static var sgp: Self { + .init(rawValue: "SGP") + } + + public static var shn: Self { + .init(rawValue: "SHN") + } + + public static var slb: Self { + .init(rawValue: "SLB") + } + + public static var sle: Self { + .init(rawValue: "SLE") + } + + public static var slv: Self { + .init(rawValue: "SLV") + } + + public static var smr: Self { + .init(rawValue: "SMR") + } + + public static var som: Self { + .init(rawValue: "SOM") + } + + public static var spm: Self { + .init(rawValue: "SPM") + } + + public static var srb: Self { + .init(rawValue: "SRB") + } + + public static var ssd: Self { + .init(rawValue: "SSD") + } + + public static var stp: Self { + .init(rawValue: "STP") + } + + public static var sur: Self { + .init(rawValue: "SUR") + } + + public static var svk: Self { + .init(rawValue: "SVK") + } + + public static var svn: Self { + .init(rawValue: "SVN") + } + + public static var swe: Self { + .init(rawValue: "SWE") + } + + public static var swz: Self { + .init(rawValue: "SWZ") + } + + public static var sxm: Self { + .init(rawValue: "SXM") + } + + public static var syc: Self { + .init(rawValue: "SYC") + } + + public static var tca: Self { + .init(rawValue: "TCA") + } + + public static var tcd: Self { + .init(rawValue: "TCD") + } + + public static var tgo: Self { + .init(rawValue: "TGO") + } + + public static var tha: Self { + .init(rawValue: "THA") + } + + public static var tjk: Self { + .init(rawValue: "TJK") + } + + public static var tkm: Self { + .init(rawValue: "TKM") + } + + public static var tls: Self { + .init(rawValue: "TLS") + } + + public static var ton: Self { + .init(rawValue: "TON") + } + + public static var tto: Self { + .init(rawValue: "TTO") + } + + public static var tun: Self { + .init(rawValue: "TUN") + } + + public static var tur: Self { + .init(rawValue: "TUR") + } + + public static var tuv: Self { + .init(rawValue: "TUV") + } + + public static var twn: Self { + .init(rawValue: "TWN") + } + + public static var tza: Self { + .init(rawValue: "TZA") + } + + public static var uga: Self { + .init(rawValue: "UGA") + } + + public static var ukr: Self { + .init(rawValue: "UKR") + } + + public static var umi: Self { + .init(rawValue: "UMI") + } + + public static var ury: Self { + .init(rawValue: "URY") + } + + public static var usa: Self { + .init(rawValue: "USA") + } + + public static var uzb: Self { + .init(rawValue: "UZB") + } + + public static var vat: Self { + .init(rawValue: "VAT") + } + + public static var vct: Self { + .init(rawValue: "VCT") + } + + public static var ven: Self { + .init(rawValue: "VEN") + } + + public static var vgb: Self { + .init(rawValue: "VGB") + } + + public static var vir: Self { + .init(rawValue: "VIR") + } + + public static var vnm: Self { + .init(rawValue: "VNM") + } + + public static var vut: Self { + .init(rawValue: "VUT") + } + + public static var wlf: Self { + .init(rawValue: "WLF") + } + + public static var wsm: Self { + .init(rawValue: "WSM") + } + + public static var yem: Self { + .init(rawValue: "YEM") + } + + public static var zaf: Self { + .init(rawValue: "ZAF") + } + + public static var zmb: Self { + .init(rawValue: "ZMB") + } + + public static var zwe: Self { + .init(rawValue: "ZWE") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "ABW": self = .abw - case "AFG": self = .afg - case "AGO": self = .ago - case "AIA": self = .aia - case "ALB": self = .alb - case "AND": self = .and - case "ANT": self = .ant - case "ARE": self = .are - case "ARG": self = .arg - case "ARM": self = .arm - case "ASM": self = .asm - case "ATG": self = .atg - case "AUS": self = .aus - case "AUT": self = .aut - case "AZE": self = .aze - case "BDI": self = .bdi - case "BEL": self = .bel - case "BEN": self = .ben - case "BES": self = .bes - case "BFA": self = .bfa - case "BGD": self = .bgd - case "BGR": self = .bgr - case "BHR": self = .bhr - case "BHS": self = .bhs - case "BIH": self = .bih - case "BLR": self = .blr - case "BLZ": self = .blz - case "BMU": self = .bmu - case "BOL": self = .bol - case "BRA": self = .bra - case "BRB": self = .brb - case "BRN": self = .brn - case "BTN": self = .btn - case "BWA": self = .bwa - case "CAF": self = .caf - case "CAN": self = .can - case "CHE": self = .che - case "CHL": self = .chl - case "CHN": self = .chn - case "CIV": self = .civ - case "CMR": self = .cmr - case "COD": self = .cod - case "COG": self = .cog - case "COK": self = .cok - case "COL": self = .col - case "COM": self = .com - case "CPV": self = .cpv - case "CRI": self = .cri - case "CUB": self = .cub - case "CUW": self = .cuw - case "CXR": self = .cxr - case "CYM": self = .cym - case "CYP": self = .cyp - case "CZE": self = .cze - case "DEU": self = .deu - case "DJI": self = .dji - case "DMA": self = .dma - case "DNK": self = .dnk - case "DOM": self = .dom - case "DZA": self = .dza - case "ECU": self = .ecu - case "EGY": self = .egy - case "ERI": self = .eri - case "ESP": self = .esp - case "EST": self = .est - case "ETH": self = .eth - case "FIN": self = .fin - case "FJI": self = .fji - case "FLK": self = .flk - case "FRA": self = .fra - case "FRO": self = .fro - case "FSM": self = .fsm - case "GAB": self = .gab - case "GBR": self = .gbr - case "GEO": self = .geo - case "GGY": self = .ggy - case "GHA": self = .gha - case "GIB": self = .gib - case "GIN": self = .gin - case "GLP": self = .glp - case "GMB": self = .gmb - case "GNB": self = .gnb - case "GNQ": self = .gnq - case "GRC": self = .grc - case "GRD": self = .grd - case "GRL": self = .grl - case "GTM": self = .gtm - case "GUF": self = .guf - case "GUM": self = .gum - case "GUY": self = .guy - case "HKG": self = .hkg - case "HND": self = .hnd - case "HRV": self = .hrv - case "HTI": self = .hti - case "HUN": self = .hun - case "IDN": self = .idn - case "IMN": self = .imn - case "IND": self = .ind - case "IRL": self = .irl - case "IRQ": self = .irq - case "ISL": self = .isl - case "ISR": self = .isr - case "ITA": self = .ita - case "JAM": self = .jam - case "JEY": self = .jey - case "JOR": self = .jor - case "JPN": self = .jpn - case "KAZ": self = .kaz - case "KEN": self = .ken - case "KGZ": self = .kgz - case "KHM": self = .khm - case "KIR": self = .kir - case "KNA": self = .kna - case "KOR": self = .kor - case "KWT": self = .kwt - case "LAO": self = .lao - case "LBN": self = .lbn - case "LBR": self = .lbr - case "LBY": self = .lby - case "LCA": self = .lca - case "LIE": self = .lie - case "LKA": self = .lka - case "LSO": self = .lso - case "LTU": self = .ltu - case "LUX": self = .lux - case "LVA": self = .lva - case "MAC": self = .mac - case "MAR": self = .mar - case "MCO": self = .mco - case "MDA": self = .mda - case "MDG": self = .mdg - case "MDV": self = .mdv - case "MEX": self = .mex - case "MHL": self = .mhl - case "MKD": self = .mkd - case "MLI": self = .mli - case "MLT": self = .mlt - case "MMR": self = .mmr - case "MNE": self = .mne - case "MNG": self = .mng - case "MNP": self = .mnp - case "MOZ": self = .moz - case "MRT": self = .mrt - case "MSR": self = .msr - case "MTQ": self = .mtq - case "MUS": self = .mus - case "MWI": self = .mwi - case "MYS": self = .mys - case "MYT": self = .myt - case "NAM": self = .nam - case "NCL": self = .ncl - case "NER": self = .ner - case "NFK": self = .nfk - case "NGA": self = .nga - case "NIC": self = .nic - case "NIU": self = .niu - case "NLD": self = .nld - case "NOR": self = .nor - case "NPL": self = .npl - case "NRU": self = .nru - case "NZL": self = .nzl - case "OMN": self = .omn - case "PAK": self = .pak - case "PAN": self = .pan - case "PER": self = .per - case "PHL": self = .phl - case "PLW": self = .plw - case "PNG": self = .png - case "POL": self = .pol - case "PRI": self = .pri - case "PRT": self = .prt - case "PRY": self = .pry - case "PSE": self = .pse - case "PYF": self = .pyf - case "QAT": self = .qat - case "REU": self = .reu - case "ROU": self = .rou - case "RUS": self = .rus - case "RWA": self = .rwa - case "SAU": self = .sau - case "SEN": self = .sen - case "SGP": self = .sgp - case "SHN": self = .shn - case "SLB": self = .slb - case "SLE": self = .sle - case "SLV": self = .slv - case "SMR": self = .smr - case "SOM": self = .som - case "SPM": self = .spm - case "SRB": self = .srb - case "SSD": self = .ssd - case "STP": self = .stp - case "SUR": self = .sur - case "SVK": self = .svk - case "SVN": self = .svn - case "SWE": self = .swe - case "SWZ": self = .swz - case "SXM": self = .sxm - case "SYC": self = .syc - case "TCA": self = .tca - case "TCD": self = .tcd - case "TGO": self = .tgo - case "THA": self = .tha - case "TJK": self = .tjk - case "TKM": self = .tkm - case "TLS": self = .tls - case "TON": self = .ton - case "TTO": self = .tto - case "TUN": self = .tun - case "TUR": self = .tur - case "TUV": self = .tuv - case "TWN": self = .twn - case "TZA": self = .tza - case "UGA": self = .uga - case "UKR": self = .ukr - case "UMI": self = .umi - case "URY": self = .ury - case "USA": self = .usa - case "UZB": self = .uzb - case "VAT": self = .vat - case "VCT": self = .vct - case "VEN": self = .ven - case "VGB": self = .vgb - case "VIR": self = .vir - case "VNM": self = .vnm - case "VUT": self = .vut - case "WLF": self = .wlf - case "WSM": self = .wsm - case "YEM": self = .yem - case "ZAF": self = .zaf - case "ZMB": self = .zmb - case "ZWE": self = .zwe - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/TerritoryInlineCreate.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/TerritoryInlineCreate.generated.swift index 5368b38c..96058d3e 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/TerritoryInlineCreate.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/TerritoryInlineCreate.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct TerritoryInlineCreate: Hashable, Codable { +public struct TerritoryInlineCreate: Hashable, Codable, Sendable { public var id: String? public var type: `Type` @@ -21,7 +21,7 @@ public struct TerritoryInlineCreate: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case territories } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/UploadOperation.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/UploadOperation.generated.swift index 57d8d34a..92a0c3b1 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/UploadOperation.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/UploadOperation.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct UploadOperation: Hashable, Codable { +public struct UploadOperation: Hashable, Codable, Sendable { public var length: Int? public var method: String? diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/User.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/User.generated.swift index ac30db80..df2d0570 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/User.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/User.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct User: Hashable, Codable { +public struct User: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -36,11 +36,11 @@ public struct User: Hashable, Codable { case links } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case users } - public struct Attributes: Hashable, Codable { + public struct Attributes: Hashable, Codable, Sendable { public var allAppsVisible: Bool? public var firstName: String? @@ -79,7 +79,7 @@ public struct User: Hashable, Codable { } } - public struct Relationships: Hashable, Codable { + public struct Relationships: Hashable, Codable, Sendable { public var visibleApps: VisibleApps? public init(visibleApps: VisibleApps? = nil) { @@ -90,16 +90,16 @@ public struct User: Hashable, Codable { case visibleApps } - public struct VisibleApps: Hashable, Codable { + public struct VisibleApps: Hashable, Codable, Sendable { public var data: [Data]? - public var links: Links? + public var links: RelationshipLinks? public var meta: PagingInformation? public init( data: [Data]? = nil, - links: Links? = nil, + links: RelationshipLinks? = nil, meta: PagingInformation? = nil ) { self.data = data @@ -113,7 +113,7 @@ public struct User: Hashable, Codable { case meta } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -131,29 +131,10 @@ public struct User: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case apps } } - - public struct Links: Hashable, Codable { - public var related: URL? - - public var `self`: URL? - - public init( - related: URL? = nil, - self _self: URL? = nil - ) { - self.related = related - self.`self` = _self - } - - private enum CodingKeys: String, CodingKey { - case related - case `self` = "self" - } - } } } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/UserInvitation.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/UserInvitation.generated.swift index 7ada3c19..aa5dcb19 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/UserInvitation.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/UserInvitation.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct UserInvitation: Hashable, Codable { +public struct UserInvitation: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -36,11 +36,11 @@ public struct UserInvitation: Hashable, Codable { case links } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case userInvitations } - public struct Attributes: Hashable, Codable { + public struct Attributes: Hashable, Codable, Sendable { public var allAppsVisible: Bool? public var email: String? @@ -84,7 +84,7 @@ public struct UserInvitation: Hashable, Codable { } } - public struct Relationships: Hashable, Codable { + public struct Relationships: Hashable, Codable, Sendable { public var visibleApps: VisibleApps? public init(visibleApps: VisibleApps? = nil) { @@ -95,16 +95,16 @@ public struct UserInvitation: Hashable, Codable { case visibleApps } - public struct VisibleApps: Hashable, Codable { + public struct VisibleApps: Hashable, Codable, Sendable { public var data: [Data]? - public var links: Links? + public var links: RelationshipLinks? public var meta: PagingInformation? public init( data: [Data]? = nil, - links: Links? = nil, + links: RelationshipLinks? = nil, meta: PagingInformation? = nil ) { self.data = data @@ -118,7 +118,7 @@ public struct UserInvitation: Hashable, Codable { case meta } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -136,29 +136,10 @@ public struct UserInvitation: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case apps } } - - public struct Links: Hashable, Codable { - public var related: URL? - - public var `self`: URL? - - public init( - related: URL? = nil, - self _self: URL? = nil - ) { - self.related = related - self.`self` = _self - } - - private enum CodingKeys: String, CodingKey { - case related - case `self` = "self" - } - } } } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/UserRole.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/UserRole.generated.swift index 3e44750f..0f766ad0 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/UserRole.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/UserRole.generated.swift @@ -3,58 +3,67 @@ // swiftlint:disable all import Foundation -public enum UserRole: Hashable, Codable, RawRepresentable { - case accessToReports - case accountHolder - case admin - case appManager - case cloudManagedAppDistribution - case cloudManagedDeveloperId - case createApps - case customerSupport - case developer - case finance - case imageManager - case marketing - case sales - case unknown(String) - - public var rawValue: String { - switch self { - case .accessToReports: return "ACCESS_TO_REPORTS" - case .accountHolder: return "ACCOUNT_HOLDER" - case .admin: return "ADMIN" - case .appManager: return "APP_MANAGER" - case .cloudManagedAppDistribution: return "CLOUD_MANAGED_APP_DISTRIBUTION" - case .cloudManagedDeveloperId: return "CLOUD_MANAGED_DEVELOPER_ID" - case .createApps: return "CREATE_APPS" - case .customerSupport: return "CUSTOMER_SUPPORT" - case .developer: return "DEVELOPER" - case .finance: return "FINANCE" - case .imageManager: return "IMAGE_MANAGER" - case .marketing: return "MARKETING" - case .sales: return "SALES" - case .unknown(let rawValue): return rawValue - } +public struct UserRole: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var accessToReports: Self { + .init(rawValue: "ACCESS_TO_REPORTS") } + public static var accountHolder: Self { + .init(rawValue: "ACCOUNT_HOLDER") + } + + public static var admin: Self { + .init(rawValue: "ADMIN") + } + + public static var appManager: Self { + .init(rawValue: "APP_MANAGER") + } + + public static var cloudManagedAppDistribution: Self { + .init(rawValue: "CLOUD_MANAGED_APP_DISTRIBUTION") + } + + public static var cloudManagedDeveloperId: Self { + .init(rawValue: "CLOUD_MANAGED_DEVELOPER_ID") + } + + public static var createApps: Self { + .init(rawValue: "CREATE_APPS") + } + + public static var customerSupport: Self { + .init(rawValue: "CUSTOMER_SUPPORT") + } + + public static var developer: Self { + .init(rawValue: "DEVELOPER") + } + + public static var finance: Self { + .init(rawValue: "FINANCE") + } + + public static var generateIndividualKeys: Self { + .init(rawValue: "GENERATE_INDIVIDUAL_KEYS") + } + + public static var marketing: Self { + .init(rawValue: "MARKETING") + } + + public static var sales: Self { + .init(rawValue: "SALES") + } + + public var description: String { + rawValue + } + + public var rawValue: String + public init(rawValue: String) { - switch rawValue { - case "ACCESS_TO_REPORTS": self = .accessToReports - case "ACCOUNT_HOLDER": self = .accountHolder - case "ADMIN": self = .admin - case "APP_MANAGER": self = .appManager - case "CLOUD_MANAGED_APP_DISTRIBUTION": self = .cloudManagedAppDistribution - case "CLOUD_MANAGED_DEVELOPER_ID": self = .cloudManagedDeveloperId - case "CREATE_APPS": self = .createApps - case "CUSTOMER_SUPPORT": self = .customerSupport - case "DEVELOPER": self = .developer - case "FINANCE": self = .finance - case "IMAGE_MANAGER": self = .imageManager - case "MARKETING": self = .marketing - case "SALES": self = .sales - default: self = .unknown(rawValue) - } + self.rawValue = rawValue } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/AppPreOrder.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/Webhook.generated.swift similarity index 54% rename from Sources/AppStoreConnectKit/autogenerated/Schemas/AppPreOrder.generated.swift rename to Sources/AppStoreConnectKit/autogenerated/Schemas/Webhook.generated.swift index 71e51045..4d8c454b 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/AppPreOrder.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/Webhook.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct AppPreOrder: Hashable, Codable { +public struct Webhook: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -36,59 +36,69 @@ public struct AppPreOrder: Hashable, Codable { case links } - public enum `Type`: String, Hashable, Codable { - case appPreOrders + public enum `Type`: String, Hashable, Codable, Sendable { + case webhooks } - public struct Attributes: Hashable, Codable { - public var appReleaseDate: String? + public struct Attributes: Hashable, Codable, Sendable { + public var enabled: Bool? - public var preOrderAvailableDate: String? + public var eventTypes: [WebhookEventType]? + + public var name: String? + + public var url: URL? public init( - appReleaseDate: String? = nil, - preOrderAvailableDate: String? = nil + enabled: Bool? = nil, + eventTypes: [WebhookEventType]? = nil, + name: String? = nil, + url: URL? = nil ) { - self.appReleaseDate = appReleaseDate - self.preOrderAvailableDate = preOrderAvailableDate + self.enabled = enabled + self.eventTypes = eventTypes + self.name = name + self.url = url } private enum CodingKeys: String, CodingKey { - case appReleaseDate - case preOrderAvailableDate + case enabled + case eventTypes + case name + case url } } - public struct Relationships: Hashable, Codable { + public struct Relationships: Hashable, Codable, Sendable { public var app: App? - public init(app: App? = nil) { + public var deliveries: Deliveries? + + public init( + app: App? = nil, + deliveries: Deliveries? = nil + ) { self.app = app + self.deliveries = deliveries } private enum CodingKeys: String, CodingKey { case app + case deliveries } - public struct App: Hashable, Codable { + public struct App: Hashable, Codable, Sendable { public var data: Data? - public var links: Links? - - public init( - data: Data? = nil, - links: Links? = nil - ) { + public init(data: Data? = nil) { self.data = data - self.links = links } private enum CodingKeys: String, CodingKey { case data - case links } - public struct Data: Hashable, Codable { + public struct Data: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -106,28 +116,21 @@ public struct AppPreOrder: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { + public enum `Type`: String, Hashable, Codable, Sendable { case apps } } + } - public struct Links: Hashable, Codable { - public var related: URL? - - public var `self`: URL? + public struct Deliveries: Hashable, Codable, Sendable { + public var links: RelationshipLinks? - public init( - related: URL? = nil, - self _self: URL? = nil - ) { - self.related = related - self.`self` = _self - } + public init(links: RelationshipLinks? = nil) { + self.links = links + } - private enum CodingKeys: String, CodingKey { - case related - case `self` = "self" - } + private enum CodingKeys: String, CodingKey { + case links } } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/WebhookDelivery.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/WebhookDelivery.generated.swift new file mode 100644 index 00000000..cfd167d0 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/WebhookDelivery.generated.swift @@ -0,0 +1,190 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct WebhookDelivery: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public var attributes: Attributes? + + public var relationships: Relationships? + + public var links: ResourceLinks? + + public init( + id: String, + type: `Type`, + attributes: Attributes? = nil, + relationships: Relationships? = nil, + links: ResourceLinks? = nil + ) { + self.id = id + self.type = type + self.attributes = attributes + self.relationships = relationships + self.links = links + } + + private enum CodingKeys: String, CodingKey { + case id + case type + case attributes + case relationships + case links + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case webhookDeliveries + } + + public struct Attributes: Hashable, Codable, Sendable { + public var createdDate: String? + + public var deliveryState: DeliveryState? + + public var errorMessage: String? + + public var redelivery: Bool? + + public var request: Request? + + public var response: Response? + + public var sentDate: String? + + public init( + createdDate: String? = nil, + deliveryState: DeliveryState? = nil, + errorMessage: String? = nil, + redelivery: Bool? = nil, + request: Request? = nil, + response: Response? = nil, + sentDate: String? = nil + ) { + self.createdDate = createdDate + self.deliveryState = deliveryState + self.errorMessage = errorMessage + self.redelivery = redelivery + self.request = request + self.response = response + self.sentDate = sentDate + } + + private enum CodingKeys: String, CodingKey { + case createdDate + case deliveryState + case errorMessage + case redelivery + case request + case response + case sentDate + } + + public struct DeliveryState: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var failed: Self { + .init(rawValue: "FAILED") + } + + public static var pending: Self { + .init(rawValue: "PENDING") + } + + public static var succeeded: Self { + .init(rawValue: "SUCCEEDED") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct Request: Hashable, Codable, Sendable { + public var url: URL? + + public init(url: URL? = nil) { + self.url = url + } + + private enum CodingKeys: String, CodingKey { + case url + } + } + + public struct Response: Hashable, Codable, Sendable { + public var body: String? + + public var httpStatusCode: Int? + + public init( + body: String? = nil, + httpStatusCode: Int? = nil + ) { + self.body = body + self.httpStatusCode = httpStatusCode + } + + private enum CodingKeys: String, CodingKey { + case body + case httpStatusCode + } + } + } + + public struct Relationships: Hashable, Codable, Sendable { + public var event: Event? + + public init(event: Event? = nil) { + self.event = event + } + + private enum CodingKeys: String, CodingKey { + case event + } + + public struct Event: Hashable, Codable, Sendable { + public var data: Data? + + public init(data: Data? = nil) { + self.data = data + } + + private enum CodingKeys: String, CodingKey { + case data + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case webhookEvents + } + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/WebhookEvent.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/WebhookEvent.generated.swift new file mode 100644 index 00000000..7bbe55bd --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/WebhookEvent.generated.swift @@ -0,0 +1,68 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct WebhookEvent: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public var attributes: Attributes? + + public var links: ResourceLinks? + + public init( + id: String, + type: `Type`, + attributes: Attributes? = nil, + links: ResourceLinks? = nil + ) { + self.id = id + self.type = type + self.attributes = attributes + self.links = links + } + + private enum CodingKeys: String, CodingKey { + case id + case type + case attributes + case links + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case webhookEvents + } + + public struct Attributes: Hashable, Codable, Sendable { + public var createdDate: String? + + public var eventType: WebhookEventType? + + public var payload: String? + + public var ping: Bool? + + public init( + createdDate: String? = nil, + eventType: WebhookEventType? = nil, + payload: String? = nil, + ping: Bool? = nil + ) { + self.createdDate = createdDate + self.eventType = eventType + self.payload = payload + self.ping = ping + } + + private enum CodingKeys: String, CodingKey { + case createdDate + case eventType + case payload + case ping + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/WebhookEventType.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/WebhookEventType.generated.swift new file mode 100644 index 00000000..c46ba0f0 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/WebhookEventType.generated.swift @@ -0,0 +1,30 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct WebhookEventType: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var appStoreVersionAppVersionStateUpdated: Self { + .init(rawValue: "APP_STORE_VERSION_APP_VERSION_STATE_UPDATED") + } + + public static var betaFeedbackCrashSubmissionCreated: Self { + .init(rawValue: "BETA_FEEDBACK_CRASH_SUBMISSION_CREATED") + } + + public static var betaFeedbackScreenshotSubmissionCreated: Self { + .init(rawValue: "BETA_FEEDBACK_SCREENSHOT_SUBMISSION_CREATED") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterMatchmakingTestRequest.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/WebhookPing.generated.swift similarity index 74% rename from Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterMatchmakingTestRequest.generated.swift rename to Sources/AppStoreConnectKit/autogenerated/Schemas/WebhookPing.generated.swift index dfe2f4dc..c257327d 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/Requests/GameCenterMatchmakingTestRequest.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/WebhookPing.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct GameCenterMatchmakingTestRequest: Hashable, Codable { +public struct WebhookPing: Hashable, Codable, Sendable { public var id: String public var type: `Type` @@ -26,8 +26,8 @@ public struct GameCenterMatchmakingTestRequest: Hashable, Codable { case links } - public enum `Type`: String, Hashable, Codable { - case gameCenterMatchmakingTestRequests + public enum `Type`: String, Hashable, Codable, Sendable { + case webhookPings } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/WinBackOffer.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/WinBackOffer.generated.swift new file mode 100644 index 00000000..0b772869 --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/WinBackOffer.generated.swift @@ -0,0 +1,212 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct WinBackOffer: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public var attributes: Attributes? + + public var relationships: Relationships? + + public var links: ResourceLinks? + + public init( + id: String, + type: `Type`, + attributes: Attributes? = nil, + relationships: Relationships? = nil, + links: ResourceLinks? = nil + ) { + self.id = id + self.type = type + self.attributes = attributes + self.relationships = relationships + self.links = links + } + + private enum CodingKeys: String, CodingKey { + case id + case type + case attributes + case relationships + case links + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case winBackOffers + } + + public struct Attributes: Hashable, Codable, Sendable { + public var customerEligibilityPaidSubscriptionDurationInMonths: Int? + + public var customerEligibilityTimeSinceLastSubscribedInMonths: IntegerRange? + + public var customerEligibilityWaitBetweenOffersInMonths: Int? + + public var duration: SubscriptionOfferDuration? + + public var endDate: String? + + public var offerId: String? + + public var offerMode: SubscriptionOfferMode? + + public var periodCount: Int? + + public var priority: Priority? + + public var promotionIntent: PromotionIntent? + + public var referenceName: String? + + public var startDate: String? + + public init( + customerEligibilityPaidSubscriptionDurationInMonths: Int? = nil, + customerEligibilityTimeSinceLastSubscribedInMonths: IntegerRange? = nil, + customerEligibilityWaitBetweenOffersInMonths: Int? = nil, + duration: SubscriptionOfferDuration? = nil, + endDate: String? = nil, + offerId: String? = nil, + offerMode: SubscriptionOfferMode? = nil, + periodCount: Int? = nil, + priority: Priority? = nil, + promotionIntent: PromotionIntent? = nil, + referenceName: String? = nil, + startDate: String? = nil + ) { + self.customerEligibilityPaidSubscriptionDurationInMonths = customerEligibilityPaidSubscriptionDurationInMonths + self.customerEligibilityTimeSinceLastSubscribedInMonths = customerEligibilityTimeSinceLastSubscribedInMonths + self.customerEligibilityWaitBetweenOffersInMonths = customerEligibilityWaitBetweenOffersInMonths + self.duration = duration + self.endDate = endDate + self.offerId = offerId + self.offerMode = offerMode + self.periodCount = periodCount + self.priority = priority + self.promotionIntent = promotionIntent + self.referenceName = referenceName + self.startDate = startDate + } + + private enum CodingKeys: String, CodingKey { + case customerEligibilityPaidSubscriptionDurationInMonths + case customerEligibilityTimeSinceLastSubscribedInMonths + case customerEligibilityWaitBetweenOffersInMonths + case duration + case endDate + case offerId + case offerMode + case periodCount + case priority + case promotionIntent + case referenceName + case startDate + } + + public struct Priority: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var high: Self { + .init(rawValue: "HIGH") + } + + public static var normal: Self { + .init(rawValue: "NORMAL") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + + public struct PromotionIntent: Hashable, Codable, RawRepresentable, CustomStringConvertible, Sendable { + public static var notPromoted: Self { + .init(rawValue: "NOT_PROMOTED") + } + + public static var useAutoGeneratedAssets: Self { + .init(rawValue: "USE_AUTO_GENERATED_ASSETS") + } + + public var description: String { + rawValue + } + + public var rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } + } + } + + public struct Relationships: Hashable, Codable, Sendable { + public var prices: Prices? + + public init(prices: Prices? = nil) { + self.prices = prices + } + + private enum CodingKeys: String, CodingKey { + case prices + } + + public struct Prices: Hashable, Codable, Sendable { + public var data: [Data]? + + public var links: RelationshipLinks? + + public var meta: PagingInformation? + + public init( + data: [Data]? = nil, + links: RelationshipLinks? = nil, + meta: PagingInformation? = nil + ) { + self.data = data + self.links = links + self.meta = meta + } + + private enum CodingKeys: String, CodingKey { + case data + case links + case meta + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case winBackOfferPrices + } + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/WinBackOfferPrice.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/WinBackOfferPrice.generated.swift new file mode 100644 index 00000000..fd10b19f --- /dev/null +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/WinBackOfferPrice.generated.swift @@ -0,0 +1,128 @@ +// autogenerated + +// swiftlint:disable all +import Foundation + +public struct WinBackOfferPrice: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public var relationships: Relationships? + + public var links: ResourceLinks? + + public init( + id: String, + type: `Type`, + relationships: Relationships? = nil, + links: ResourceLinks? = nil + ) { + self.id = id + self.type = type + self.relationships = relationships + self.links = links + } + + private enum CodingKeys: String, CodingKey { + case id + case type + case relationships + case links + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case winBackOfferPrices + } + + public struct Relationships: Hashable, Codable, Sendable { + public var subscriptionPricePoint: SubscriptionPricePoint? + + public var territory: Territory? + + public init( + subscriptionPricePoint: SubscriptionPricePoint? = nil, + territory: Territory? = nil + ) { + self.subscriptionPricePoint = subscriptionPricePoint + self.territory = territory + } + + private enum CodingKeys: String, CodingKey { + case subscriptionPricePoint + case territory + } + + public struct SubscriptionPricePoint: Hashable, Codable, Sendable { + public var data: Data? + + public init(data: Data? = nil) { + self.data = data + } + + private enum CodingKeys: String, CodingKey { + case data + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case subscriptionPricePoints + } + } + } + + public struct Territory: Hashable, Codable, Sendable { + public var data: Data? + + public init(data: Data? = nil) { + self.data = data + } + + private enum CodingKeys: String, CodingKey { + case data + } + + public struct Data: Hashable, Codable, Sendable { + public var id: String + + public var type: `Type` + + public init( + id: String, + type: `Type` + ) { + self.id = id + self.type = type + } + + private enum CodingKeys: String, CodingKey { + case id + case type + } + + public enum `Type`: String, Hashable, Codable, Sendable { + case territories + } + } + } + } +} + +// swiftlint:enable all diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/AppPriceInlineCreate.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/WinBackOfferPriceInlineCreate.generated.swift similarity index 68% rename from Sources/AppStoreConnectKit/autogenerated/Schemas/AppPriceInlineCreate.generated.swift rename to Sources/AppStoreConnectKit/autogenerated/Schemas/WinBackOfferPriceInlineCreate.generated.swift index 8133c345..df6c5719 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/AppPriceInlineCreate.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/WinBackOfferPriceInlineCreate.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct AppPriceInlineCreate: Hashable, Codable { +public struct WinBackOfferPriceInlineCreate: Hashable, Codable, Sendable { public var id: String? public var type: `Type` @@ -21,8 +21,8 @@ public struct AppPriceInlineCreate: Hashable, Codable { case type } - public enum `Type`: String, Hashable, Codable { - case appPrices + public enum `Type`: String, Hashable, Codable, Sendable { + case winBackOfferPrices } } diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/diagnosticLogs.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/diagnosticLogs.generated.swift index 73d406d6..70ede77f 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/diagnosticLogs.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/diagnosticLogs.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct DiagnosticLogs: Hashable, Codable { +public struct DiagnosticLogs: Hashable, Codable, Sendable { public var productData: [ProductData]? public var version: String? @@ -21,7 +21,7 @@ public struct DiagnosticLogs: Hashable, Codable { case version } - public struct ProductData: Hashable, Codable { + public struct ProductData: Hashable, Codable, Sendable { public var diagnosticInsights: [DiagnosticInsights]? public var diagnosticLogs: [DiagnosticLogs]? @@ -44,7 +44,7 @@ public struct DiagnosticLogs: Hashable, Codable { case signatureId } - public struct DiagnosticInsights: Hashable, Codable { + public struct DiagnosticInsights: Hashable, Codable, Sendable { public var insightsCategory: String? public var insightsString: String? @@ -68,7 +68,7 @@ public struct DiagnosticLogs: Hashable, Codable { } } - public struct DiagnosticLogs: Hashable, Codable { + public struct DiagnosticLogs: Hashable, Codable, Sendable { public var callStackTree: [CallStackTree]? public var diagnosticMetaData: DiagnosticMetaData? @@ -86,7 +86,7 @@ public struct DiagnosticLogs: Hashable, Codable { case diagnosticMetaData } - public struct CallStackTree: Hashable, Codable { + public struct CallStackTree: Hashable, Codable, Sendable { public var callStackPerThread: Bool? public var callStacks: [CallStacks]? @@ -104,7 +104,7 @@ public struct DiagnosticLogs: Hashable, Codable { case callStacks } - public struct CallStacks: Hashable, Codable { + public struct CallStacks: Hashable, Codable, Sendable { public var callStackRootFrames: [DiagnosticLogCallStackNode]? public init(callStackRootFrames: [DiagnosticLogCallStackNode]? = nil) { @@ -117,7 +117,7 @@ public struct DiagnosticLogs: Hashable, Codable { } } - public struct DiagnosticMetaData: Hashable, Codable { + public struct DiagnosticMetaData: Hashable, Codable, Sendable { public var appVersion: String? public var buildVersion: String? diff --git a/Sources/AppStoreConnectKit/autogenerated/Schemas/xcodeMetrics.generated.swift b/Sources/AppStoreConnectKit/autogenerated/Schemas/xcodeMetrics.generated.swift index fe57c7a4..ae3a4133 100644 --- a/Sources/AppStoreConnectKit/autogenerated/Schemas/xcodeMetrics.generated.swift +++ b/Sources/AppStoreConnectKit/autogenerated/Schemas/xcodeMetrics.generated.swift @@ -3,7 +3,7 @@ // swiftlint:disable all import Foundation -public struct XcodeMetrics: Hashable, Codable { +public struct XcodeMetrics: Hashable, Codable, Sendable { public var insights: Insights? public var productData: [ProductData]? @@ -26,7 +26,7 @@ public struct XcodeMetrics: Hashable, Codable { case version } - public struct Insights: Hashable, Codable { + public struct Insights: Hashable, Codable, Sendable { public var regressions: [MetricsInsight]? public var trendingUp: [MetricsInsight]? @@ -45,7 +45,7 @@ public struct XcodeMetrics: Hashable, Codable { } } - public struct ProductData: Hashable, Codable { + public struct ProductData: Hashable, Codable, Sendable { public var metricCategories: [MetricCategories]? public var platform: String? @@ -63,7 +63,7 @@ public struct XcodeMetrics: Hashable, Codable { case platform } - public struct MetricCategories: Hashable, Codable { + public struct MetricCategories: Hashable, Codable, Sendable { public var identifier: MetricCategory? public var metrics: [Metrics]? @@ -81,7 +81,7 @@ public struct XcodeMetrics: Hashable, Codable { case metrics } - public struct Metrics: Hashable, Codable { + public struct Metrics: Hashable, Codable, Sendable { public var datasets: [Datasets]? public var goalKeys: [GoalKeys]? @@ -109,25 +109,30 @@ public struct XcodeMetrics: Hashable, Codable { case unit } - public struct Datasets: Hashable, Codable { + public struct Datasets: Hashable, Codable, Sendable { public var filterCriteria: FilterCriteria? public var points: [Points]? + public var recommendedMetricGoal: RecommendedMetricGoal? + public init( filterCriteria: FilterCriteria? = nil, - points: [Points]? = nil + points: [Points]? = nil, + recommendedMetricGoal: RecommendedMetricGoal? = nil ) { self.filterCriteria = filterCriteria self.points = points + self.recommendedMetricGoal = recommendedMetricGoal } private enum CodingKeys: String, CodingKey { case filterCriteria case points + case recommendedMetricGoal } - public struct FilterCriteria: Hashable, Codable { + public struct FilterCriteria: Hashable, Codable, Sendable { public var device: String? public var deviceMarketingName: String? @@ -151,7 +156,7 @@ public struct XcodeMetrics: Hashable, Codable { } } - public struct Points: Hashable, Codable { + public struct Points: Hashable, Codable, Sendable { public var errorMargin: Float? public var goal: String? @@ -184,7 +189,7 @@ public struct XcodeMetrics: Hashable, Codable { case version } - public struct PercentageBreakdown: Hashable, Codable { + public struct PercentageBreakdown: Hashable, Codable, Sendable { public var subSystemLabel: String? public var value: Float? @@ -203,9 +208,28 @@ public struct XcodeMetrics: Hashable, Codable { } } } + + public struct RecommendedMetricGoal: Hashable, Codable, Sendable { + public var detail: String? + + public var value: Float? + + public init( + detail: String? = nil, + value: Float? = nil + ) { + self.detail = detail + self.value = value + } + + private enum CodingKeys: String, CodingKey { + case detail + case value + } + } } - public struct GoalKeys: Hashable, Codable { + public struct GoalKeys: Hashable, Codable, Sendable { public var goalKey: String? public var lowerBound: Int? @@ -229,7 +253,7 @@ public struct XcodeMetrics: Hashable, Codable { } } - public struct Unit: Hashable, Codable { + public struct Unit: Hashable, Codable, Sendable { public var displayName: String? public var identifier: String?